[Skip to main content](#vessel-content)

#   trigger events for product option change

##

- **[buzibuzi](/forum/user/30472-buzibuzi "View buzibuzi's Profile")**
- [![buzibuzi's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/butterfly.gif)](/forum/user/30472-buzibuzi "View buzibuzi's Profile") Topic Author
- [ Offline](/forum/user/30472-buzibuzi)

Less More

- Posts: 19
- Thank you received: 0
-
- [](http://www.hubeza.com)
-

10 years 1 month ago [\#249400](#249400) by [buzibuzi](/forum/user/30472-buzibuzi "View buzibuzi's Profile")  *[trigger events for product option change](/forum/31-development/886320-trigger-events-for-product-option-change#249400 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : chrome 52.0.2743.116 m  Hi, im developing a plugin that will recalculate product price in the front end based on a certain percentage taken from product option change, (since product option doesn't have an option to use %)  example:  product name: &quot;custom business card print&quot;  product variations: 1. amount (100,200,300....) 2. lamination (yes, no)  product options: 1.paper type: a. normal (price $0) ( total price + 0%) b. special (price $0) ( total price + 20%) c. recycled (price $0) ( total price + 35% d. metal (price $0) ( total price + 70%  challenge:  recalculate total product price on product option change event .  looking for the event trigger that happens after product option change. does this exist ? if not, what should i do : 1. to catch such an event 2. what function can i use to get current total price, change it and update it on the product page (just like it happens when variations or product options are changed)  Thanks")* was created by *[buzibuzi](/forum/user/30472-buzibuzi "View buzibuzi's Profile")*

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.4.45
-- Browser(s) name and version -- : chrome 52.0.2743.116 m

Hi,
im developing a plugin that will recalculate product price in the front end based on a certain percentage taken from product option change,
(since product option doesn't have an option to use %)

example:

product name:
"custom business card print"

product variations:
1. amount (100,200,300....)
2. lamination (yes, no)

product options:
1.paper type:
a. normal (price $0) ( total price + 0%)
b. special (price $0) ( total price + 20%)
c. recycled (price $0) ( total price + 35%
d. metal (price $0) ( total price + 70%

challenge:

recalculate total product price on product option change event .

looking for the event trigger that happens after product option change. does this exist ?
if not, what should i do :
1. to catch such an event
2. what function can i use to get current total price, change it and update it on the product page (just like it happens when variations or product options are changed)

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4NjMyMC10cmlnZ2VyLWV2ZW50cy1mb3ItcHJvZHVjdC1vcHRpb24tY2hhbmdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

10 years 1 month ago [\#249403](#249403) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[trigger events for product option change](/forum/31-development/886320-trigger-events-for-product-option-change#249403 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : chrome 52.0.2743.116 m  Hi, im developing a plugin that will recalculate product price in the front end based on a certain percentage taken from product option change, (since product option doesn't have an option to use %)  example:  product name: &quot;custom business card print&quot;  product variations: 1. amount (100,200,300....) 2. lamination (yes, no)  product options: 1.paper type: a. normal (price $0) ( total price + 0%) b. special (price $0) ( total price + 20%) c. recycled (price $0) ( total price + 35% d. metal (price $0) ( total price + 70%  challenge:  recalculate total product price on product option change event .  looking for the event trigger that happens after product option change. does this exist ? if not, what should i do : 1. to catch such an event 2. what function can i use to get current total price, change it and update it on the product page (just like it happens when variations or product options are changed)  Thanks")*

Hi,

You can edit the file "option" of the view "product" via the menu Display&gt;Views.
There, you can modify the javascript code to add your own code and recalculate the product price based on your needs.
You'll see in the javascript code there, the total price calculated is in price_with_options.value

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4NjMyMC10cmlnZ2VyLWV2ZW50cy1mb3ItcHJvZHVjdC1vcHRpb24tY2hhbmdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[buzibuzi](/forum/user/30472-buzibuzi "View buzibuzi's Profile")**
- [![buzibuzi's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/butterfly.gif)](/forum/user/30472-buzibuzi "View buzibuzi's Profile") Topic Author
- [ Offline](/forum/user/30472-buzibuzi)

Less More

- Posts: 19
- Thank you received: 0
-
- [](http://www.hubeza.com)
-

10 years 1 month ago [\#249468](#249468) by [buzibuzi](/forum/user/30472-buzibuzi "View buzibuzi's Profile")  Replied by *[buzibuzi](/forum/user/30472-buzibuzi "View buzibuzi's Profile")* on topic *[trigger events for product option change](/forum/31-development/886320-trigger-events-for-product-option-change#249468 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : chrome 52.0.2743.116 m  Hi, im developing a plugin that will recalculate product price in the front end based on a certain percentage taken from product option change, (since product option doesn't have an option to use %)  example:  product name: &quot;custom business card print&quot;  product variations: 1. amount (100,200,300....) 2. lamination (yes, no)  product options: 1.paper type: a. normal (price $0) ( total price + 0%) b. special (price $0) ( total price + 20%) c. recycled (price $0) ( total price + 35% d. metal (price $0) ( total price + 70%  challenge:  recalculate total product price on product option change event .  looking for the event trigger that happens after product option change. does this exist ? if not, what should i do : 1. to catch such an event 2. what function can i use to get current total price, change it and update it on the product page (just like it happens when variations or product options are changed)  Thanks")*

Thanks very much.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4NjMyMC10cmlnZ2VyLWV2ZW50cy1mb3ItcHJvZHVjdC1vcHRpb24tY2hhbmdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.095 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
