[Skip to main content](#vessel-content)

#   Product Category display

##

- **[HappyHammer](/forum/user/852-happyhammer "View HappyHammer's Profile")**
- [![HappyHammer's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar852.jpg)](/forum/user/852-happyhammer "View HappyHammer's Profile") Topic Author
- [ Offline](/forum/user/852-happyhammer)

Less More

- Posts: 43
- Thank you received: 0
-
-

15 years 4 months ago [\#21527](#21527) by [HappyHammer](/forum/user/852-happyhammer "View HappyHammer's Profile")  *[Product Category display](/forum/4-how-to/21527-product-category-display#21527 "I have a product that is sold by length so I have setup variants from 0.5m to 5m in 0.5m increments to enable the price to be discounted as the length ordered increases. As expected this means the Add To Cart button is replaced with a Choose Options button. This also results in the amount of stock available not being shown above the button. I have the following requirements;  1. Stock available to be shown above Choose Option button in category view and in individual product view. 2. Text on Choose Option button to be changed to Choose Length 3. Text each on category display to be changed to First 0.5m  Can you please point me in the right direction in the CSS file or the display fields code?  Thanks, HH.")* was created by *[HappyHammer](/forum/user/852-happyhammer "View HappyHammer's Profile")*

I have a product that is sold by length so I have setup variants from 0.5m to 5m in 0.5m increments to enable the price to be discounted as the length ordered increases. As expected this means the **Add To Cart** button is replaced with a **Choose Options** button. This also results in the amount of stock available not being shown above the button. I have the following requirements;

1. Stock available to be shown above Choose Option button in category view and in individual product view.
2. Text on **Choose Option** button to be changed to **Choose Length**
3. Text **each** on category display to be changed to **First 0.5m**

Can you please point me in the right direction in the CSS file or the display fields code?

Thanks, HH.

---

always look on the bright side....

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIxNTI3LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

15 years 4 months ago [\#21539](#21539) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Product Category display](/forum/4-how-to/21527-product-category-display#21539 "I have a product that is sold by length so I have setup variants from 0.5m to 5m in 0.5m increments to enable the price to be discounted as the length ordered increases. As expected this means the Add To Cart button is replaced with a Choose Options button. This also results in the amount of stock available not being shown above the button. I have the following requirements;  1. Stock available to be shown above Choose Option button in category view and in individual product view. 2. Text on Choose Option button to be changed to Choose Length 3. Text each on category display to be changed to First 0.5m  Can you please point me in the right direction in the CSS file or the display fields code?  Thanks, HH.")*

1. The choose option button is added int he file quantity of the view product that you can edit via the menu Display-&gt;Views. You can add your code there.

2. The Choose option text can be changed by override it via the interface available in the Languages tab of the configuration when you edit your translation file.

3. You can do like 2 but you will have it replaced everywhere. You could also remove it so that it just displays the price. If you want to display a different text based on the context, you will have to edit the file listing_price of the view product via the menu Display-&gt;Views and modify the code displaying the each word...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIxNTI3LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[HappyHammer](/forum/user/852-happyhammer "View HappyHammer's Profile")**
- [![HappyHammer's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar852.jpg)](/forum/user/852-happyhammer "View HappyHammer's Profile") Topic Author
- [ Offline](/forum/user/852-happyhammer)

Less More

- Posts: 43
- Thank you received: 0
-
-

15 years 4 months ago -  15 years 4 months ago [\#21616](#21616) by [HappyHammer](/forum/user/852-happyhammer "View HappyHammer's Profile")  Replied by *[HappyHammer](/forum/user/852-happyhammer "View HappyHammer's Profile")* on topic *[Re: Product Category display](/forum/4-how-to/21527-product-category-display#21616 "I have a product that is sold by length so I have setup variants from 0.5m to 5m in 0.5m increments to enable the price to be discounted as the length ordered increases. As expected this means the Add To Cart button is replaced with a Choose Options button. This also results in the amount of stock available not being shown above the button. I have the following requirements;  1. Stock available to be shown above Choose Option button in category view and in individual product view. 2. Text on Choose Option button to be changed to Choose Length 3. Text each on category display to be changed to First 0.5m  Can you please point me in the right direction in the CSS file or the display fields code?  Thanks, HH.")*

**nicolas wrote:**

> 1\. The choose option button is added int he file quantity of the view product that you can edit via the menu Display-&gt;Views. You can add your code there.

Thanks can you tell me where to find the code to insert, that displays the current stock quantity, and where to insert it, sorry a bit of a code novice.

**nicolas wrote:**

> 2\. The Choose option text can be changed by override it via the interface available in the Languages tab of the configuration when you edit your translation file.

Thanks I did this in the Display-&gt;Views product quantity is that OK? I replaced the CAPS and noncaps instances of CHOOSE_OPTION with Select Length

**nicolas wrote:**

> 3\. You can do like 2 but you will have it replaced everywhere. You could also remove it so that it just displays the price. If you want to display a different text based on the context, you will have to edit the file listing\_price of the view product via the menu Display-&gt;Views and modify the code displaying the each word...

The only instance of the word each in Display-&gt;Views-&gt;listing_price is as follows which I'm assuming is not correct?

> echo JText::\_('PRICE\_BEGINNING');for**each**($this-&gt;row-&gt;prices as $price)

Thanks, HH.

---

always look on the bright side....

Last edit: 15 years 4 months ago by [HappyHammer](/forum/user/852-happyhammer "View HappyHammer's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIxNTI3LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

15 years 4 months ago [\#21631](#21631) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Product Category display](/forum/4-how-to/21527-product-category-display#21631 "I have a product that is sold by length so I have setup variants from 0.5m to 5m in 0.5m increments to enable the price to be discounted as the length ordered increases. As expected this means the Add To Cart button is replaced with a Choose Options button. This also results in the amount of stock available not being shown above the button. I have the following requirements;  1. Stock available to be shown above Choose Option button in category view and in individual product view. 2. Text on Choose Option button to be changed to Choose Length 3. Text each on category display to be changed to First 0.5m  Can you please point me in the right direction in the CSS file or the display fields code?  Thanks, HH.")*

1. It's on the third line:
echo $this-&gt;cart-&gt;displayButton(JText::_('CHOOSE_OPTIONS'),'choose_options',$this-&gt;params,hikashop_completeLink('product&amp;task=show&amp;product_id='.$this-&gt;row-&gt;product_id.$this-&gt;itemid),'window.location = \''.hikashop_completeLink('product&amp;task=show&amp;product_id='.$this-&gt;row-&gt;product_id.$this-&gt;itemid).'\';return false;','');

2. Sure, if you replace it in the view it works as well. It's just that you can't have it in several languages anymore.

3. It's the code: echo JText::_('PER_UNIT');
because in the translation file you have the line:
PER_UNIT=" each"

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIxNTI3LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.056 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
