Variants> select options

  • Posts: 39
  • Thank you received: 2
  • Hikashop Business
1 week 4 days ago #366947

-- HikaShop version -- : Business 5.1.6
-- Joomla version -- : 5.2.5
-- PHP version -- : 8.2

Hi,
I have made a webshop with Hikashop (actually not really selling things, but calculate prices and create offers).

The products are products that are custom made, based on a width and height given by the customer.

The items are custom made on the demanded size. To show the prices I have created variants, with (for example) select width: and than a dropdown list like up to 500mm, up to 600mm, up to 700mm etc. Same for height. Some products have over 400 variants because of the wide range of sizes that can be ordered.

The client doesn't like the dropdown. He says: the customer should have fields to fill in the width and height by entering the right size and the system should show the price that is suitable for this size. E.g. if a customer needs a product to be 510mm x 840mm the system shoud show the price for the variant with a width up to 600mm and a height up to 900mm.
The prices for all those variants are already in Hikashop, but is there a way to use this with a field where a client wriets just a number instead of a dropdown selection?

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

  • Posts: 83776
  • Thank you received: 13560
  • MODERATOR
1 week 3 days ago #366950

Hi,

You can have input fields on the product page by creating custom fields of the table "item":
www.hikashop.com/support/documentation/4...shop-field-form.html
And if you want to have the system calculate the price of the product based on what is entered in these fields, you want to use the price calculations plugin:
www.hikashop.com/marketplace/product/148...ce-calculations.html
It will allow you to enter conditions and prices (or formulas) for these conditions so that the correct price will be displayed to the user.

This also means that you can remove the variants and the associated dropdowns.

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

  • Posts: 39
  • Thank you received: 2
  • Hikashop Business
1 day 5 hours ago #367072

Thanks. I am aware of the price calculations plugin. Only, there is nothing to calculate. DIfferent sizes have different prices, sizes increase with 100 mm. Is it possible to have a field where a client can type 1960 as width > and hikashop will show the price of the variant with a width up to 2000 mm. And if the client types 1825 as a width, Hikashop will show the price of the variant of a width up to 1900 mm.

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

  • Posts: 83776
  • Thank you received: 13560
  • MODERATOR
1 day 2 hours ago #367074

Hi,

Sorry for not specifying this in my previous message. You can directly enter the price you want in the formula.
So, you can have a bunch of formulas (with just the resulting price in each) and use the "condition" setting so that each one only apply based on a specific condition.
So, for example, you could have a condition like this:
{product.xxx}>=1900 && {product.xxx}<2000
with the formula:
20
This way, if the user enters a number between 1900 and 1999 in the field with the column name "xxx", the price will be 20€.
So you can just rince and repeat the formulas to cover all the price brackets. And thus, no variants needed.

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

  • Posts: 39
  • Thank you received: 2
  • Hikashop Business
1 day 1 hour ago #367077

Ok, I see.
But some of the products have like 800 variants. Seems a bit awkward to enter all these prices in the plugin. And what about when the prices change. Let's say, if all the prices increase with 10%.

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

  • Posts: 83776
  • Thank you received: 13560
  • MODERATOR
22 hours 20 minutes ago #367078

Hi,

Well, you could create custom fields of the table "product" so that you would use their tag instead of a fixed price in the formula of the plugin.
For example, you could have a field with the column name "price_1900" and use the tag {product.price_1900} in the formula.
Then, in each product, you would just have to enter the price in each field.
And then you could easily change the prices with mass actions, or a CSV export / import of the products data.

Now, I understand you want to keep using variants and not go with custom fields because you've already configured everything in the variants. But in that case, you would need a custom item field to enter the value, and then add custom javascript code to the product layout to auto select the variant based on the value entered by the user. While that's possible, it would require hiring a developer to work on this.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum