A few simple questions/changes
- William_firefold
- Commander (CMDR)
- Posts: 186
- Joined: Fri Aug 01, 2008 8:38 am
A few simple questions/changes
I have a couple of small fixes that I need some help with.
In the green box:
We need this to show only when the item is in stock. When the item is out of stock, this should go away to prevent customers from getting confused. It should be a simple if/else but we dont know where to put it.
In the red box:
We just need to take this part out. Both lines. The first line is extra info, and the second line doesn't convey any new info.
Any info or fixes for this are much appreciated.
Thanks
In the green box:
We need this to show only when the item is in stock. When the item is out of stock, this should go away to prevent customers from getting confused. It should be a simple if/else but we dont know where to put it.
In the red box:
We just need to take this part out. Both lines. The first line is extra info, and the second line doesn't convey any new info.
Any info or fixes for this are much appreciated.
Thanks
Re: A few simple questions/changes
This can be done with some NVelocity Code. Edit the ShowProduct1 scriptlet and locate the following lineIn the green box:
We need this to show only when the item is in stock. When the item is out of stock, this should go away to prevent customers from getting confused. It should be a simple if/else but we dont know where to put it.
Code: Select all
[[ConLib:BuyProductDialog]]
Code: Select all
#if($Product.InStock > 0 )
Your Custom Message or html will be here
#end
-
- Commodore (COMO)
- Posts: 433
- Joined: Wed May 28, 2008 9:42 am
- Location: Concord, NC
- Contact:
Re: A few simple questions/changes
I fixed the 'red' bug.
Gotta be careful when adding rows. If you click add row - and then click save without entering information.. you get 0 on 0.
Gotta be careful when adding rows. If you click add row - and then click save without entering information.. you get 0 on 0.
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 36
- Joined: Mon Jul 21, 2008 3:45 pm
Re: A few simple questions/changes
Thank you Mazhar, I tried the code but nothing seems to be displaying.
Code: Select all
<tr>
<td>
[[ConLib:BuyProductDialog]]
</td>
</tr>
<tr>
<td>
#if($Product.InStock > 0)
<span style="font-weight:bold;">Ships Same Day</span>
#end
</td>
</tr>
<tr>
<td>
#if ($Product.ManufacturerId != 0)
Other products by <a href="Search.aspx?m=$Product.ManufacturerId">$Product.Manufacturer.Name</a>
#end
</td>
</tr>
Re: A few simple questions/changes
First Make sure from the merchant side that from the store configurations that Enable Inventory Management option is checked and and also for the product you are using for testing has the optoin Inventory Tracking: Track Product and some positive InStock value.
if this doesn't work then Make sure that you are editing the right scriptlet. Navigate to the store side and and go to the product details page and then edit the Show Product Page 1 scriptlet in browser and check weather it contains the newly added code or not, i mean the if statement.
if this doesn't work then Make sure that you are editing the right scriptlet. Navigate to the store side and and go to the product details page and then edit the Show Product Page 1 scriptlet in browser and check weather it contains the newly added code or not, i mean the if statement.
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 36
- Joined: Mon Jul 21, 2008 3:45 pm
Re: A few simple questions/changes
Thank you, that suggestion works 100%.
One last question regarding this matter:
We do not track inventory on some products, and we'd like our message to display on those pages. On the items that we DO track inventory we'd like to call the function which you've helped me with thus far.
One last question regarding this matter:
We do not track inventory on some products, and we'd like our message to display on those pages. On the items that we DO track inventory we'd like to call the function which you've helped me with thus far.
Last edited by evanb@firefold.com on Thu Aug 14, 2008 1:37 pm, edited 1 time in total.
Re: A few simple questions/changes
You can check the inventory mode id to check wheather the Inventory is off or not. InventoryModeId is equal to 0 means it is off 1 for track the product and 2 for variants. So a check that should only execute when inventory is off could be as below
Code: Select all
#if($Product.InventoryModeId == 0 )
Inventory Off
#end
Last edited by mazhar on Mon Oct 20, 2008 10:58 am, edited 1 time in total.
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 36
- Joined: Mon Jul 21, 2008 3:45 pm
Re: A few simple questions/changes
Thanks, I took what you said and got it to work with this:
If someone wants a message to display when the stock quantity is 0, then this:
Code: Select all
#if($Product.InventoryModeId == 0)
<span style="font-weight:bold;">Ships Same Day</span>
#end
#if($Product.InventoryModeId == 1)
#if($Product.InStock > 0)
<span style="font-weight:bold;">Ships Same Day</span>
#end
#else
#end
Code: Select all
#if($Product.InventoryModeId == 0)
<span style="font-weight:bold;">Ships Same Day</span>
#end
#if($Product.InventoryModeId == 1)
#if($Product.InStock == 0)
<span style="font-weight:bold;">Out of stock</span>
#end
#if($Product.InStock > 0)
<span style="font-weight:bold;">Ships Same Day</span>
#end
#else
#end