Condition the display and calculation of option prices to the custom fields

  • Posts: 145
  • Thank you received: 6
2 hours 44 minutes ago #372677

Hi
I want to write a plugin for Hikashop that displays and calculates the price of optional products based on the Product Custom Field that the customer selects. Also, in each option, based on the variant that the customer chooses (by comparing the Custom Field of each option's variants with the custom fields of the other product's variants), other variants of the option products are displayed.

Let me explain the scenario I'm looking for:
There is a curtain store website.
The customer chooses the product variant (color or model) he wants, by doing this, the product price changes.
Then he enters the length and width of the product in the custom fields created for this purpose.
Using the price calculation plugin (length * width * price), the product cost is calculated.
There is also a Product Custom Field where the customer chooses whether he wants electric or manual curtains. If the customer chooses manual, there is no need for Options, but if he chooses electric, the Option products (motor and fittings) must be displayed.
These 2 options (motor and fittings) have variants that have their own prices. Also, these variants have Product Custom Fields that They contain the maximum weight, length, and width they can withstand. For example, if the length of the curtain entered by the user is more than 3 meters, only the heavy motor, which is one of the motor variants and has the ability to move the curtain more than 3 meters, should be displayed in the motor option, but if the curtain length is less than 3 meters, both the light motor and the heavy motor options should be displayed so that the customer can choose whichever he likes.
Regarding the fittings, the appropriate fittings should be displayed depending on the length and width of the curtain. These options are finally added to the calculated price in the price calculation plugin.

Is it possible to implement such a plugin in Hikashop and can you advise me on what events I should use?


Life is the unique stage of our art. Everyone sings their own song and leaves the stage. The stage is always permanent. Blessed is that song that people remember.

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

Time to create page: 0.054 seconds
Powered by Kunena Forum