Jump to content


Photo

Show items out of stock/custom message


This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1 pauneugen

pauneugen

    LemonRegular

  • Members
  • PipPipPip
  • 45 posts

Posted 05 February 2010 - 12:34 AM

I have searched through the Wiki and found the variable $product_unavailable. Not really sure how to use it as in the backend I have only the options to hide a product when it is out of stock.

It would be nice to be able to show how many items there are in stock and if in case one item goes out of stock to be able to show a custom message something like "We will be restocking soon this items, please come back later"

Any ideas, please?

#2 Aleksey

Aleksey

    Co-Founder

  • +Administrators
  • 4168 posts

Posted 07 February 2010 - 11:51 PM

Hi! Yes, the $product_unavailable variable can be confusing. Maybe we will remove it from the API.

It would be nice to be able to show how many items there are in stock and if in case one item goes out of stock to be able to show a custom message something like "We will be restocking soon this items, please come back later"


To do it you should uncheck the "Hide if Out Of Stock" checkbox in the Edit Product form. After that you can display the number of items in stock and the out of stock message using the following code:

<? if ($product->track_inventory && $product->in_stock > 0): ?>
            <p>Number of items in stock: <strong><?= $product->in_stock ?></strong></p>
      <? endif ?>

      <? if ($product->is_out_of_stock()): ?>
          <p>
            <strong>This product is temporarily unavailable</strong>
            <? if ($product->expected_availability_date): ?>  
                <br/>The expected availability date is <strong><?= $product->displayField('expected_availability_date') ?></strong>
            <? endif ?>
          </p>
      <? endif ?>

The Expected Availability Date field has been added a couple of days ago. You can find it on the Inventory tab of the Create/Edit Product page. We will update the Demo store template soon, and it will include all added features.

Thank you

#3 pauneugen

pauneugen

    LemonRegular

  • Members
  • PipPipPip
  • 45 posts

Posted 08 February 2010 - 01:42 PM

Thank you very much! :)

#4 MarkF

MarkF

    LemonFan

  • Members
  • PipPipPipPipPip
  • 50 posts

Posted 14 February 2010 - 10:29 AM

Hi,

if a product is out of stock, is it possible to allow a customer to click a link to request an email notification when that product comes back into stock?

Great way not to lose a customer! ;)

Regards
Mark :)

#5 Aleksey

Aleksey

    Co-Founder

  • +Administrators
  • 4168 posts

Posted 14 February 2010 - 03:12 PM

Hi, Mark!

I added this request to the wish-list. :-)

Aleksey

#6 MarkF

MarkF

    LemonFan

  • Members
  • PipPipPipPipPip
  • 50 posts

Posted 15 February 2010 - 03:17 PM

Thanks! :)

#7 zone

zone

    Member

  • Members
  • 27 posts

Posted 17 April 2010 - 10:36 AM

Any updates on Mark's suggestion? I didn't realize this feature was missing...it's really important to retain customers! :D

Edited by zone, 17 April 2010 - 10:39 AM.


#8 Aleksey

Aleksey

    Co-Founder

  • +Administrators
  • 4168 posts

Posted 17 April 2010 - 05:57 PM

Hi!

No updates yet, sorry. We will try to publish this feature in version 1.0, or soon after the release.

Aleksey

#9 NickToye

NickToye

    LemonElite

  • Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 492 posts

Posted 10 April 2012 - 02:33 PM

Hi!

No updates yet, sorry. We will try to publish this feature in version 1.0, or soon after the release.

Aleksey


I know you've got loads on, and I for one appreciate all the work that has gone into Lemonstand, but do you think this feature could be implemented?

My client recently has been dreaming up hacks to get this to work. Like sending people off to a subs page where they can check a box in a Campaign Monitor form. Personally I don't think it's worth hacking like that, a native Lemonstand solution would be awesome.