Magento: Using Custom Attributes with a Legacy Integration
*This is a legacy article intended for users connecting ShipWorks to Magento with the php Module. These instructions are not applicable to Magento Connect. Using Magento Connect is recommended.
To modify the Magento integration to pull custom attributes, you will need to find how your attribute is listed on your Magento administration page and then edit the ShipWorks3.php file. These instructions assume familiarity with FTP and uploading a file to your server. If you are not familiar with how to access the bin location, please contact your resident geek or tech guru.
1. In Magento, go to Catalog Attributes Manage Attributes.
2. Find the "Attribute Code" of the attribute you want to pull into ShipWorks. In this example, we're looking for bin_location.
1. Open the shipworks3.php file (the file you placed on your server during your initial ShipWorks/Magento configuration) and navigate to the writeStartTag("Item") section.
2. Add the following line to "get" the custom attribute you want. In our example, we're using the attribute bin_location. Replace this with your custom attribute. Notice that we've removed the underscore. Magento shows underscores as spaces, so remove the underscore in this line of code.
writeElement("Location", $product->getBinLocation());
As another example, if the attribute you want is mfgr_loc, then your line of code would be: writeElement("Location", $product->getMfgrLoc());
3. Save your file and upload the revised file to your server (rewriting any existing file, if necessary). Click "Download" in ShipWorks to connect to Magento and test how your information displays. Your information should appear in the ShipWorks "Main Order Grid" (see below).
Still Need Help?
Please feel free to reach out to one of our awesome Technical Support Representatives in St. Louis. We are happy to help.
Have a comment to share about this article? We'd love to hear from you. You must be logged in to your Support Portal account to leave a comment.
Comments
0 comments