I'm working on a site that involves possibly customising an item before adding it to cart and the final price will be based on a couple of things asked by the customer. These aren't customisable options in terms of different version of a product (like sizing and colours for instance) but are a fixed set of questions that will change the price of the item before it is added to cart.

The site sells shirts on which printing can be done. What I'm trying to achieve now is add a few questions to be answered by the customer on the product view page before clicking 'add to cart'. Depending on the answers to these questions (things like "Do you need something printed on the shirt?" "If so, how many colours?" and so on) the final price for the item will be adjusted.

I first thought of creating different products for each print job and somehow have the appropriate product be added to cart depending on the customer's request but the price of the printing job depends on the price of the shirt (for instance, printing on a $20 sweatshirt will be a bit more expensive than printing on a $10 t-shirt).

As a reference here's an example:

Customer finds a sweatshirt and goes to the product page, picks the colour they want and the size. The price shown is now $20. Next they are asked if they want printing done on the shirt. If not they can simply click 'Add to Cart' and be on their way. If they do, they would select "I need printing" at which point they would be asked for how many colours they need printed. The customer selects "2 colours" and the price is updated: $20 + $5 for printing + 10% of $20 for '2 colours'. The final price is $27 is now displayed and shows up in the cart.

I have found the documentation for the Price Calculation Logic (https://wiki.magento.com/display/MAGE2DOC/Price+Calculation+Logic) but I'm not sure this is the way to go and would appreciate any tips and guidance.

Thank you


This is a configurable product, it fits exactly in the definition of that. Read this for some more reference, it might sound weird when you start but this is definitely what you are looking for.

Before coming back with "this is for size and color" give it another chance and read the link I sent you again.

| improve this answer | |
  • Any way you could describe how you'd achieve something like this with configurable products only? When I first read your answer it made total sense and I thought "How could I have not thought of this before?" but after playing around for the last 20 minutes or so I can't figure out how you'd ever do it. The price variation for printing has many options but it's basically always the same 'formula' applied to all prices. If I were to use an attribute such as "Number of colours for printing (1-4)" wouldn't I need to create 4 additional 'versions' of each simple product? Thanks for clarifying! – mast Oct 17 '14 at 19:41
  • EDIT (first comment too long): I think I could maybe use a Custom Option on the configurable product instead. Thanks! – mast Oct 17 '14 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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