Add 2 products to cart using a single product page

Perebble
Tourist
3 0 1

Hi all,

I'm currently helping my partner set up a Shopify page for her business and I've come across a problem that I've not been able to find a solution for.

Her business offers customisable gift boxes and has a number of options available for each item. I have created a product template (example screenshot below) which allows customers to specify whether they want to add a message (which will be free) or a photo (at a cost of £1.50) to their order.

What I want to do is have it so when people select the photo option, it will add the product plus a 'Polaroid Photo' product to the cart. Ideally, I would like to add something to the product template that links the Polaroid Photo product to the radio button.

I would prefer to do this through code rather than a separate app, and I am choosing to not use variants of this product for inventory management purposes.

Thanks in advanced!

 

Example using product template:

Capture.PNG

 

What I'm hoping for in the cart:

Capture2.PNG

Perebble
Tourist
3 0 1

Hey all,

We've actually decided to update the format of the product page so the photo can now be an add-on instead of forcing the customer to pick one or the other, so I'm bumping this up in the hopes of getting a reply.

As before, we would like it so when you tick the polaroid checkbox and upload your photo, it will add both the current item to the cart and a separate "Polaroid Photo" listing. Any assistance of how to code this into the Add to Cart button (or likewise) would be great. The 'Polaroid Photo' variant ID is 37752158945438.

Many thanks!

 

New screenshot from product page:

Capture.PNG

And a screenshot of what we're hoping for in the cart:

Capture2.PNG

 

0 Likes
Perebble
Tourist
3 0 1

I have fortunately found a way to handle this by playing around with the gift wrapping code.

I have been able to update it to check how many items in my cart have the property called 'Polaroid' and add that quantity of the 'Polaroid Photo' listing to the cart.

If anyone does find a way to add two items at once as per my original request, I'd be happy to hear how you managed it.

0 Likes