Page 1 of 1

[SOLVED] Bring Price added to attribute option using ajax

Posted: 23 Jun 2022, 07:34
by kartikbhat
I have created a attribute (eg: flavour) then I have added options to it in backend
  • Orange
  • Mango
  • Choco
created dropdown for this options on my frontend

Here I have added price for each options from backend; like
  • Orange - $5
  • Mango - $6
  • Choco - $7
Now I need to bring price of specific option on select of it from dropdown using AJAX;

Help me to call ajax with proper urls and parameters to be send to it;

TIA :)

Re: Bring Price added to attribute option using ajax

Posted: 24 Jun 2022, 11:52
by aimeos
If you need to calculate the total price of the product including all selected options before it's added to the basket, you need to sum up the attribute prices using a few lines of custom JS code. The Aimeos JSON API won't give you that value until the article is added to the basket.