Page 1 of 1

Unique Out of Stock Msg - per SKU

Posted: Mon Oct 29, 2007 4:07 pm
by Smurf
I just purchased 7.0 and I am floored. Great product! One thing missing (for me anyway), is unique availabilty messages per SKU/Variant.


Currently we have:

In Stock Message:
{0} units available

Out of stock message:
The product is currently out of stock

Which sets it globally. I need custom availability dates per product and variant.

IF out of stock "display custom message".

I am looking at the product templates and see that this could be used to store the message, but then there would need to be a script added as well. It would be great if this was something that was added to your cart. I am sure a lot of users need this feature.


If anyone has any sugestions on how I could implement this, I am all eyes. :)

Thanks!
Smurf
Able 7 RC1

Posted: Tue Nov 06, 2007 10:46 am
by Smurf
Bump. :D

Am I really the only one that needs this feature? It seems like this is standard on most sites now.

Posted: Tue Nov 06, 2007 10:59 am
by Will
Real programmers will probably cringe at this, but I think you could use a merchant field for this (under product templates).

- set up a merchant field called "stock message" (or whatever you want to call it)
- set the message for the given product

Use the nVelocity script to get the value and assign it to a variable:

Code: Select all

#foreach($tf in $Product.TemplateFields)
#if ($tf.InputField.IsMerchantField)
#if ($tf.InputField.Name == "stock message") #set ($pStockMessage = $tf.InputValue) 
#end
#end							
#end
Then you can display the message wherever you want using:

Code: Select all

$pStockMessage
Or you can skip the variable step and just say:

If out of stock...

Code: Select all

#foreach($tf in $Product.TemplateFields)
#if ($tf.InputField.IsMerchantField)
#if ($tf.InputField.Name == "stock message") 
$tf.InputField.Value
#end
#end							
#end
I think either should work.

Posted: Wed Nov 07, 2007 9:59 am
by Smurf
Thanks Will! I will give this a shot.

Out of Stock

Posted: Thu Jan 10, 2008 4:29 pm
by DonAshby
We need this... did the custom script work for you?
Don :?:

Posted: Thu Jan 10, 2008 5:22 pm
by Smurf
I did not try this yet. We got caught up in the holiday rush and had to set this aside for a bit. As soon as we get everything caught back up, I plan to get back to work on ablecommerce. :)

Message in "options"

Posted: Mon Jan 28, 2008 10:50 am
by Falala
So this code would put an "out of stock" message in the options?

ie- If Elbow Pads, size 7, color blue was out, it would only put "out of stock" on this option and leave the rest of the sizes/colors alone?

thanks! :D