Ruby script - Compare the product tag and customer tag.

WizardofDeath
Tourist
9 0 0

Hi Team, 

I want to write a ruby script where at the checkout page - customer will only be able to purchase the product if the customer tag "wholesale" matches with product tag "wholesale"

Case 1: If product tag is wholesale and customer tag is something else he cannot purchase that product.

Case 2: if a product tag is "something else" and customer tag is wholesale he cannot purchase the item

Case 3: if the product tag is something else and customer tag is something else - then they can purchase the product.

Case 4: product tag is wholesale and customer tag is wholesale - then they can buy product

 

Replies 0 (0)