Passing through custom product price to the cart object

New Member
2 0 1

Hi All,

The client I am currently working for has requested that a few new options be made available on the product page which will either increase or decrease the total product price. These options won't be new variants, they will be permanent options that are available on each product page.

So essentially I want to be able to say 'if dropdown option a == selected, increase price by 10' etc...

However, as I said above, these new options are always going to be on the product page and they aren't product variants - and the way the current form works is by switching between product variants whenever the customer selects a new option; and then from there when they click 'add to cart' it just passes the variant ID/product ID over to a cart script which I don't have access to (add.js).

So the issue I am currently facing is that in the UI I can change the price that is displayed when a user selects options no problem. However I cannot find a way to change the actual background data to represent the price change. So when the user adds to cart, even if they have extras selected increasing the price by £50 - this new price is not being added to the cart because the background data has not been updated. If that makes sense?

What I need to know is if there is any way that when the person clicks 'add to cart' I can pass through my own dynamic custom price through to the cart object? And then from there whenever the person views the checkout, they will be seeing the 'custom' price (dictated by their chosen options on the product page).


Please let me know if the above is confusing and I will try to explain better.


I would prefer a coded solution as then I will have more control over how it works. (I'm not afraid of getting dirty with code)