- Posts: 2
- Thank you received: 0
price by weight
- noelclarke
-
Topic Author
- Offline
My question - how can I set up products to sell by weight?
I'm building an online butchers shop and need to sell, for example, Rump Steak at £15.70 per kilo but have the shopper choose whether they want 250g, 500g, 750g, 1 kilo or 1.5 kilo and be charged the appropriate price. Other products can be sold per unit, say burgers, so that's no problem. I suppose I use the product characteristics but can anyone explain how this could work.
Thanks
Please Log in or Create an account to join the conversation.
Create one characteristic weight with the values 250g, 500g, 750g, 1kg and 1.5kg and then add it to your products when editing them. Then, via the manage variants button, you can set a price for each variant.
Please Log in or Create an account to join the conversation.
- noelclarke
-
Topic Author
- Offline
- Posts: 2
- Thank you received: 0
Please Log in or Create an account to join the conversation.
If you know your way around in PHP, we have a documentation about the creation of product quantity calculation plugins: www.hikashop.com/support/documentation/6...tation.html#override
Please Log in or Create an account to join the conversation.
- Posts: 102
- Thank you received: 0
which file would i edit to change this?
Please Log in or Create an account to join the conversation.
www.hikashop.com/download/languages.html#modify
Please Log in or Create an account to join the conversation.
- Posts: 102
- Thank you received: 0
i want the variation name to show up. i have for instance variations of half pint, pint and quart... each with a separate price...
Please Log in or Create an account to join the conversation.
Then, edit the file listing_price of the view product via the menu Display->Views and change the line:
echo JText::_('PER_UNIT');
to use that custom field value instead:
echo $this->element->CUSTOM_FIELD_COLUMN;
Please Log in or Create an account to join the conversation.
- Posts: 102
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Posts: 102
- Thank you received: 0
sorry, i got it.. actually if you want it to work in both screens you need to call
echo $this->row->measurement;
Please Log in or Create an account to join the conversation.
$this->row->CUSTOM_FIELD_COLUMN;
Please Log in or Create an account to join the conversation.
- Posts: 102
- Thank you received: 0
thanks Liz
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
However it appears that you have also put a piece of code to display custom fields, so my custom field is called in a location where i didn't place any code.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
If i enable front end for the field i see it in the right place in category AND product page (next to the price) but also in product page i have it shown under a H4 heading 'Specifications'.
Please Log in or Create an account to join the conversation.
In that case, you should try with this for the product page:
echo $this->element->main->CUSTOM_FIELD_COLUMN;
Please Log in or Create an account to join the conversation.
because ...
$this->element->main->CUSTOM_FIELD_COLUMN // this shows on the main product page but not on the category list page
$this->row->CUSTOM_FIELD_COLUMN // this doesn't show on the main product page but DOES on the category list page
Please Log in or Create an account to join the conversation.