- Posts: 8
- Thank you received: 1
Show Quantity in Catalog Mode?
14 years 3 months ago #54692
by arydiel
Show Quantity in Catalog Mode? was created by arydiel
Hi again,
So far the only way I can get the quantity to show for a product is by switching our shop from catalog mode to store mode and using the Add to Cart module. Is there any way to just show the quantity (without any buttons) for a product in catalog mode?
Thanks for your help!
=Arydiel=
So far the only way I can get the quantity to show for a product is by switching our shop from catalog mode to store mode and using the Add to Cart module. Is there any way to just show the quantity (without any buttons) for a product in catalog mode?
Thanks for your help!
=Arydiel=
Please Log in or Create an account to join the conversation.
14 years 3 months ago #54714
by nicolas
Replied by nicolas on topic Re: Show Quantity in Catalog Mode?
Hi,
There is no option for that. You will have to edit the file "show_default via the menu Display>Views and add the line of code:
<?php echo JText::sprintf('X_ITEMS_IN_STOCK',$this->element->product_quantity); ?>
There is no option for that. You will have to edit the file "show_default via the menu Display>Views and add the line of code:
<?php echo JText::sprintf('X_ITEMS_IN_STOCK',$this->element->product_quantity); ?>
Please Log in or Create an account to join the conversation.
14 years 3 months ago #55165
by arydiel
Replied by arydiel on topic Re: Show Quantity in Catalog Mode?
Thanks! That worked. Just one more question:The products with 'unlimited quantity are showing -1. Is there anyway to fix that?
Please Log in or Create an account to join the conversation.
14 years 3 months ago #55174
by nicolas
Replied by nicolas on topic Re: Show Quantity in Catalog Mode?
You can do like that:
<?php if($this->element->product_quantity>0) echo JText::sprintf('X_ITEMS_IN_STOCK',$this->element->product_quantity); ?>
<?php if($this->element->product_quantity>0) echo JText::sprintf('X_ITEMS_IN_STOCK',$this->element->product_quantity); ?>
Please Log in or Create an account to join the conversation.
14 years 3 months ago #55204
by arydiel
Replied by arydiel on topic Re: Show Quantity in Catalog Mode?
Am I missing something - do I need to edit something in that last one? Or is there somewhere specific it needs to be pasted All it did was make it repeat itself : ie 1 item in stock 1 item in stock and it didn't seem to affect the -1 items in stock any different. I pasted it in as is in that same file.
Please Log in or Create an account to join the conversation.
14 years 3 months ago #55233
by nicolas
Replied by nicolas on topic Re: Show Quantity in Catalog Mode?
You need to use that line of code instead of the previous one.
The following user(s) said Thank You: arydiel
Please Log in or Create an account to join the conversation.
Time to create page: 0.196 seconds