|
In my store an attribute exists for all products, this attribute makes a control of a recurrent shipping.
The attribute is called frequency. and has the following options: - Weekly - Every two weeks - One-time
By identifying these values in the shopping cart, I have to limit what values of this attribute that can be selected in the following products.
Lets say the first product added to cart is set to “weekly”, so the following products I view in the store may not have added the option of “One-time”.
I have identified products shopping cart by checking attributes using the array:
$ items = Mage :: getSingleton ('checkout / session') -> getQuote () -> getAllItems ();
And I built a helper function to return me a value for each attribute, I have no problem with this.
The problem is that I can not find information on how I can selectively disable the options Based on the result of the function. How do I remove / disable one or two of the 3 possible options by code?. I can not delete the option for obvious reasons, I just need that those are not selectable while the opposite condition is selected for a product that is in the cart.
Forgive my bad english.
|