Product Category display

  • Posts: 43
  • Thank you received: 0
13 years 4 months ago #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.


always look on the bright side....

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #21539

1. The choose option button is added int he file quantity of the view product that you can edit via the menu Display->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->Views and modify the code displaying the each word...

Please Log in or Create an account to join the conversation.

  • Posts: 43
  • Thank you received: 0
13 years 4 months ago #21616

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->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->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->Views and modify the code displaying the each word...

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

echo JText::_('PRICE_BEGINNING');foreach($this->row->prices as $price)


Thanks, HH.


always look on the bright side....
Last edit: 13 years 4 months ago by HappyHammer.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #21631

1. It's on the third line:
echo $this->cart->displayButton(JText::_('CHOOSE_OPTIONS'),'choose_options',$this->params,hikashop_completeLink('product&task=show&product_id='.$this->row->product_id.$this->itemid),'window.location = \''.hikashop_completeLink('product&task=show&product_id='.$this->row->product_id.$this->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 or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum