Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

forcing an attribute option


Recommended Posts

Hi guys and gals,


Just a quick one -does anyone know how to force a particular attribute option based on the order quantity a customer has chosen? In other words can you write an IF statement that detects quantity (e.g. when order passed to the cart contents) and changes an attribute's option ID accordingly?


For example (albeit a silly example, the real example is too complicated to explain), if you have a drop down select box for a T-Shirt in product_info that allows you to choose red, yellow, or green, for that T-shirt, is it then possible, say, that even if the customer chose green, but then went on to specify a quantity of 100 T-shirts, that the option could be changed on the fly to 'red' somewhere along the way (e.g. when passed to shopping_cart.php).


I really need this to work, hope someone has some ideas...



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...