how to add assign new attribute to Community Store package.

Permalink
Hello every one,

I am using the Community Store package for shop handling. in the checkout page, package put data for the following attributes
billing_first_name, billing_last_name, billing_address, billing_phone, billing_company


I have a question, how I can assign further attributes for the checkout page. I found one clue in the package code.
1- following the code runs, when order created after check out.
$this->setAttribute("billing_first_name", $billing_first_name);
        $this->setAttribute("billing_last_name", $billing_last_name);
        $this->setAttribute("billing_address", $billing_address);
        $this->setAttribute("billing_phone", $billing_phone);
        $this->setAttribute("billing_company", $billing_company);

here is saving billing data through "setAttribute" method
if a add one more attribute suppose "anrede"
$this->setAttribute("anrede", $billing_anrede);

it giving exception

Please check the exception screenshot in the attachment.

Thanks, Abdul Qayyum

View Replies: View Best Answer
vergedesign replied on at Permalink Reply
vergedesign
Hello abdulqayyum,

I have used the Community Store for a couple projects now, and my first suggestion would be to first make sure that you add your custom attribute to the Orders Attribute list. If you go to the Store Backend in the Dashboard Side Panel, and Click ORDERS, you will see a secondary ATTRIBUTES menu item.

Click that menu item, and add your custom attribute with the ADD ATTRIBUTE pull down menu at the bottom of the list, using the handle you mentioned in your original post. There are a few options for the type of attribute that is best suited for your content.

I apologize if you have already tried this.

Craig
abdulqayyum replied on at Permalink Reply
Thanks vergedesign,

Your suggestion is working for me.
vergedesign replied on at Permalink Best Answer Reply
vergedesign
Make sure that you add your custom attribute to the Orders Attribute list. If you go to the Store Backend in the Dashboard Side Panel, and Click ORDERS, you will see a secondary ATTRIBUTES menu item.

Click that menu item, and add your custom attribute with the ADD ATTRIBUTE pull down menu at the bottom of the list, using the handle you mentioned in your original post. There are a few options for the type of attribute that is best suited for your content.