cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Terms and Conditions based on Product Selection

SOLVED

Dynamic Terms and Conditions based on Product Selection

Is there a way of only showing SPECIFIC Terms and Conditions during the checkout process only if SPECIFIC products are in the basket?

 

I am currently using Bartosz Górski's Conditional Agreements module.

https://github.com/bgorski/conditionalagreements

 

However, this module shows ALL terms and conditions if specific products are in the basket. If none of the relevent products are in the basket, then NONE of the terms and conditions are shown. 

(It works by products having a 'show agreements' attribute)

 

What I really want is something like this:

 

Basket Contains Product A => Show Agreement A only

Basket Contains Product B => Show Agreement B only

Basket Contains Products A & B => Show Agreement A and Agreement B

 

Rather than what I have with the current module

 

Basket Contains Product A => Show Agreement A and B

Basket Contains Product B => Show Agreement A and B

Basket Contains Products A & B => Show Agreement A and B

 

Any ideas where I can go with this?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Dynamic Terms and Conditions based on Product Selection

looks only 2 people need a solution so far, Smiley LOL

I made a free extension here

https://www.magentocommerce.com/magento-connect/conditional-terms-1.html

View solution in original post

13 REPLIES 13

Re: Dynamic Terms and Conditions based on Product Selection

We have done something like that in MageSetup, see https://github.com/firegento/firegento-magesetup/. You can do a full text search for "revocation_product_type" as that's the name of the new product attribute which we use to define which agreements should be shown. There is a European law which requires to show different agreements for differen product types, mainly downloadable products. Hope that helps.

Andreas von Studnitz, Trainer, Consultant, Developer and CEO of integer_net, Germany.

Re: Dynamic Terms and Conditions based on Product Selection

Thanks for the info. However, I've had a look at MageSetup but I don't understand how it relates to my problem.

Also, MageSetup seems to contain a lot of features that I really don't need at this time.

I only need to show different agreements at checkout, depending on the product selection.

Re: Dynamic Terms and Conditions based on Product Selection

Are you asking for coding suggestion?

I don't have that extension so I can't give a specific code for that, but it should be pretty straight forward.

first you need to change that 'show agreements' attributes from boolean type to mutiselect, and change the source model of this attribute to agreement collection so you can select which agreements show for that product.

then find out where that extension controls agreement visibility, instead of finding if any products have 'show agreements' true, you find the unique array of  'show agreements' in theproduct collection, and use that as a filter to the agreement, then you might be good to go(2 places you need to pay attention to, page order review which shows agreements and controller saveOrder which validate agreements). 

Re: Dynamic Terms and Conditions based on Product Selection

Well, to be honest I was hoping for a more specific detailed solution.

I don't have to use that particular extension - and I certainly wouldn't feel comfortable adjusting it without proper instructions from someone who knows it inside-out.

 

Surely I can't be the only person with this problem?

Re: Dynamic Terms and Conditions based on Product Selection

I don't know, if 2 more people + this question, I will create a module for this Smiley Happy

Re: Dynamic Terms and Conditions based on Product Selection

looks only 2 people need a solution so far, Smiley LOL

I made a free extension here

https://www.magentocommerce.com/magento-connect/conditional-terms-1.html

Re: Dynamic Terms and Conditions based on Product Selection

You, sir, are a diamond Smiley Happy 

I'll install it as soon as I can!

Re: Dynamic Terms and Conditions based on Product Selection

Any chance of you making one that's compatible with Magento 2? Smiley Happy

(Or is it already compatible???)

 

regards

Phil

Re: Dynamic Terms and Conditions based on Product Selection

Can i get this extension please