I'm going to be importing thousands of products into my products channel. The imported data will have "cost" information.

By default, I want to "selling price" to be based on whatever category the product is assigned to (the category will have a "markup field" that'll either be in dollar value or percentage). I do want the store operator to be able set the markup at the product level (so the channel will also have something like a "markup field").

How can I do this in Store? Is Carthrob able to do this?

1 Answer 1


There is nothing built into Store (or CartThrob) that would allow you to do this out of the box. Without writing a custom add-on to handle the logic the best place to start would be looking at the

Added the ability to enable "custom prices" on a per-channel basis. This allows you to use a user-submitted price in the add to cart form (for example with donations).

Which was added in Store v2. From there you would need to calculate the base price by the category modifier and then populate a hidden field with the price. Depending on how you are doing the calculations you will probably need to use an embedded template to get around parse order issues.

This approach doesn't prevent a determined user from modifying the hidden field however to adjust the price so you will probably need some other logic to make sure that the item total is correct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.