| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Replace Quantity Available Message with "Available" | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi ...
On the product detail template page (product.tpl) rather than having a message for the Quantity that displays how many items are available in stock, can that be replaced with something simple like "Item is Available" and for items that are out of stock display something like "Item is Currently on Order" ... is this possible ? thanks & regards Shafiq :sK
__________________
Cart Version 4.0.12 |
|||||||
#2
|
|||||||
|
|||||||
![]() File: /customer/main/product.tpl
Change... Code:
to... Code:
You might also want to change $lng.lbl_quantity to "Availability" |
|||||||
#3
|
|||||||
|
|||||||
![]() i tried that ....
and got the following message: Fatal error: Smarty error: [in customer/main/product.tpl line 151]: syntax error: unclosed tag {else} (opened line 10). (Smarty_Compiler.class.php, line 30 ![]() any ideas ? should i need to upgrade to version 4.0.13 for this to work ? thanks shafiq :sK
__________________
Cart Version 4.0.12 |
|||||||
#4
|
|||||||
|
|||||||
![]() I like the mod but when i try it nothing happens.
Do i need to change anything else? WP
__________________
X-Cart Gold 4.13 X-Configurator X-ROM Easy Checkout |
|||||||
#5
|
|||||||
|
|||||||
![]() It only shows up on the detailed page. I would like it to show up on the page with all the products too. Is there a way to do this?
WP
__________________
X-Cart Gold 4.13 X-Configurator X-ROM Easy Checkout |
|||||||
#6
|
|||||||
|
|||||||
![]() Quote:
Make sure you did not remove the {/if} at the end of the line. |
|||||||
#7
|
|||||||
|
|||||||
![]() Quote:
I don't think the quantity is the in the products array when viewing products_t.tpl, you would need to modify the php to do that. |
|||||||
#8
|
|||||||
|
|||||||
![]() Quote:
i think i did .... seems to work now ... thank you for your help ![]() shafiq :sK
__________________
Cart Version 4.0.12 |
|||||||
#9
|
|||||||
|
|||||||
![]() Quote:
Ok basically I did this, I even played around with the code myself, looked into the PHP side too, and well I can see when out of stock it says No, but when it's in stock still shows Numbers, how do I get rid of the numbers I just want it to simply say Available. Thanks for the info, but it's probably just me having a moment.. xcart 4/13
__________________
.-=.=-. |
|||||||
#10
|
|||||||
|
|||||||
![]() How I was saying about the Numbers I have fixed it, if any one else was looking for a code like this, in 4.X/13 I have made it work.
{if $config.Appearance.show_in_stock eq "Y" and $config.General.unlimited_products ne "Y" and $product.distribution eq ""} <TR><TD width="30%">In Stock</TD><TD nowrap>{if $product.avail gt 0}<font color=green>In Stock</font>{else}<font color=red>Out Of Stock</font>{/if}</TD></TR> {/if} os the new code, replace it in your /cart/skin1/customer/main/product.tpl Around line 27.. hope this helps and I have included the simple Red if out, Green if in font colors, you can change as you desire. Hope everyone enjoys and good luck out there.
__________________
.-=.=-. |
|||||||
|
|||
X-Cart forums © 2001-2020
|