price per weight, select pack size

  • Posts: 4
  • Thank you received: 0
9 years 10 months ago #218682

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.4.30

I sell meat. I want to show the product a price per weight and managed this with a custom field and translation. It works so far.
I want to let the customer choose a pack size (250g, 1kg, 1,5kg etc.). I tried to do this with a custom field dropdown list, and I programmed it to calculate the price (percentage of 1kg-price). Works so far, but now the calculated "pack price" is shown as "price per kg", wich is not correct (except for the 1kg-pack)!
How can I display both the fix price per weight for all specifications and the specific pack price for each specification?

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

  • Posts: 13201
  • Thank you received: 2322
9 years 10 months ago #218700

Hi,

Sorry, I am not sure to understand all the requirements.
Could you give us a screenshot explaining what you are looking for ?

To mange prices per weight, why not use the variants ?
www.hikashop.com/support/support/documen...html#characteristics

Then for the display a simple view override could maybe do the job.
www.hikashop.com/support/support/documen...ize-the-display.html

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

  • Posts: 4
  • Thank you received: 0
9 years 10 months ago #219364

I want to give the customer the choice, wich pack size he wants to buy, the price must be calculated automatically, I only want to enter the price per kg manually. If the price per kg is 20€, the 100g-pack shall cost 2€ and the 500g-pack shall cost 10€. I found out, this can be done with the variants. I generated 5 variants: 100g, 200g etc. and gave each a percentage-price (10%, 20% etc.). So far, so good.

Now the problem is the display: With help of the custom fields I managed to make the page show the price "per kg" on the main (standard) page for the 1kg-pack (as explained in FAQ). It shows "20€ per kg" for the standard pack of 1kg. But if the customer selects another pack size, the pack price is shown as "price per kg", wich is wrong!
How can I make the pack price be shown besides the price per kg?
And why does the "show price per unit weight"-function not work? Nothing changes when I activate it!
And how to remove the display of the "specifications"-table from the frontend product page?

Attachments:

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

  • Posts: 84306
  • Thank you received: 13701
  • MODERATOR
9 years 10 months ago #219376

Hi,

1. The FAQ that you followed is to just change the "per unit" next to the price to something else for the whole product.
So yes, of course, if you change the variant selected, you'll still get the same "per unit".
I think that what you did is not the solution you're looking for.
You'll have to modify the code of the file "listing_price" of the view "product" via the menu Display>Views and add custom code in order to handle that display the way you need it.
You'll need a developer to help you with that if you're not one yourself.

2. The "show price per unit weight" function isn't made to support percentage prices in variants. That's why it doesn't work in your case.

3. Go in the menu Display>Custom fields and turn of the "frontend" setting of your product custom fields.

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

Time to create page: 0.071 seconds
Powered by Kunena Forum