*This is a legacy article intended for users connecting ShipWorks to Magento with the php Module. These instructions are not applicable to Magento ConnectUsing 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. (You can download this here if you click the "Download Magento Module" link). 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. 


Locating Your Attribute using the Magento Administration Settings


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. 



Editing the ShipWorks3.php File

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). 
magento_item_location_display_in_sw.png

Still Need Help?

Please feel free to reach out to one of our awesome Customer Care Representatives in St. Louis. We are happy to help.