0

I need another attribute for each product in Magento that works in the same way that weight does.

When the order is placed I want to be able to call the attribute but for it to already have done

product1.new_attribute + product2.new_attribute + product3.new_attribute = new_attribute

The reason I need this is for my shipping, I want to be able to tell me courier how many boxes Im sending for each order 1 box can be made up of a number of different products.

Can any one point me in the right direction as Im not sure where to start?

1 Answer 1

2

You need to create the new attribute, this can be done in the magento admin or see here:

http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/installing_custom_attributes_with_your_module

You can then either query this on the fly when loading the order, or a better way is to add an observer on sales_order_place_after and then calculate the total number of boxes and store that in a new column on the sales_flat_order table.

To add to sales_flat_order there are various blogs out there e.g. http://www.atwix.com/magento/custom-product-attribute-quote-order-item/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.