Hi Folks,

I have a tricky problem I can't get my head around.

I have a site that sells image prints that have sepia or black and white options. I can get this to work well no problem following the great screencast for this module. I.e. the user can select which colour option they want using a dropdown menu on the add to cart form.

The problem:
- I now need to add frame and canvas options to the same existing products. E.g. Frame A, Frame B or no frame.
- These frames have a cost but don't need to display an image
- I can get the colour options to display on the add to cart form, options mentioned above, however when the product is purchased the frame selection is not added.

What I've done:
- I added the frames as separate products so that the client can edit them as needed. (add / remove/ change price etc)
- I then referenced these products in the new line item type I created to display the product image colour options

Any help and guidance would be much appreciated.

Thanks in advance.

Brendan

CommentFileSizeAuthor
#2 product view141.75 KBBrendanP
#2 cart view87.21 KBBrendanP
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BrendanP’s picture

Apologies, just to clarify:

I can get both the frame options and the colour option to display on the add to cart form, but only the colour option seems to work.

BrendanP’s picture

FileSize
87.21 KB
141.75 KB

Right, I think I'm close but not sure where to go from here. Attached two screenshots which help show what I'm on about. All seems to be fine except that the pricing is not updating to reflect the additional purchased frame or canvas option.

BrendanP’s picture

Status: Active » Closed (works as designed)

Quick update.

My issue was with rules. Due to various changes trying to make this work in various ways, the rule to update the product price was not set correctly (my bad).

Once the rule was set to update the price if the line item was available, all went well.

A side note, if you using the "commerce multi-currency" module, make sure it triggers after you add the line item price. Otherwise it does not add the value as in the correct currency, giving you a bad total.

rfay’s picture

Thanks so much for following up.

sportel’s picture

Hello Brendan,

I'm trying to achieve something simular to what you've been doing. I'm struggling with the rules part of this task. What rule do I need to modify, and what is the modification?
I hope you (or someone else) can help me out.

Thanks,

Mike.

BrendanP’s picture

Hi Mike,

Crumbs you thrown me a curve ball! A few moons have passed, the client never launched the site and I'm not invoved with the project any longer, I fired the client..., so I can't reference what I actually did.

I believe I should have a copy of the site in a backup somewhere though, so I could reference that if you stuck.

Off the top of my head I believe the issue was that I'd broken a the rule that updates the price. I believe what I did was fix it to check if there was a line item and then update the price as it should.

Let me know if you want me to dig around for that.

Cheers
Brendan

sportel’s picture

Hi Brendan,

I'm using Commerce Pricing Attributes now for this. That works simple and great. It means however that the product options are not products themselve. For some people that might be a problem, but for me it works.

So, no need for you to dig around, but thanks for offering.

Mike

BrendanP’s picture

Hi Mike,

Glad you got sorted and thanks for letting me know.

Good luck with the rest of the project.

Cheers
Brendan