Magento:Getting selected attribute value of product in Checkout Shipping module -


In my website, some products are not for sale in California, in the user's checkout, I have to make legality like California in the car There are no items for sale in and the user's shipping address is in California, the user can be prevented from checking out.

The admin side is set up in sales by CA, using an 'AVL' attribute.

Here is the code I repeat through the car and check for the attribute

  ........ ...... ....... $ cart = Dana :: getSingleton ('Checkout / Session') -> Mens Coat () -> Meet All Info (); Forex Currency ($ cart $ _item) {$ _product = $ _item-> getProduct (); // If the status of the availability of at least one product is set to California, then set the flag and brake if ($ _product-> getResource () -> getAttribute ('avl') -> getFrontend () -> getValue ( $ _ Product) == 'NC') {$ flag = true; break; } ......................  

OK, now the problem is that I am able to get 'aval' 'Amount of fixed price from admin side'

Any idea about how to regain attribute value of this code local // checkout / block / onepage / shipping.php

is?

Thanks in advance. To achieve product attributes during checkout, the easiest way is to fully load the product:

$ _ product = Dana :: Millmodel ('catalog / product') - & gt; Load ($ _me-> GetProduct ()); $ _avl = $ _product- & gt; GetAvl ();

There are more overheads with loading a product but this is the fastest way to get attribute value from the cart item.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -