Advanced Commands grant you more control over your feeds. They provide a way to create your own attribute, map from non-standard ones or modify and delete feed data.
- Creating Default Attributes with Advanced Commands
- Mapping/Remapping with Advanced Commands
- Comprehensive Advanced Commands can be found here: More Advanced Commands – *PDF
How To Use Advanced Commands
After selecting a Merchant Type, navigate to the bottom of the page and click [Open Advanced Commands].
A textbox will be displayed where you can enter commands to apply rules and customize your feed.
The advanced command can be used to customize your feed:
In the above example:
The first command sets the brand attribute as “Your Store Name” for all items
The second line adds a discount rule: multiplies all regular prices by 1.2 (essentially increases all prices by 20%)
Don’t forget to hit Update. Click “Get Feed” again for immediate changes
List of some Advanced Commands
Enter each command on a new line in the Advanced Commands box
Command | Description |
---|---|
set allow_additional_images as false | disables additional images in the feed (true by default) |
set currency as XYZ | Sets feed currency to XYZ |
setAttributeDefault brand as “Your Brand” | Sets all items to ‘Your Brand’ |
rule discount(x) | Take x dollars off price |
rule discount(5, s) | Take 5 dollars off sale price if sale price exists |
rule discount(0.95, *, p) | Take 95% of price (5% discount) |
rule discount(1.05, *) | Increase price by 5% |
rule discount(0.95, *, s) | Take 95% of sale price (5% discount) |
set get_wc_shipping_attributes as true | pulls WooCommerce shipping attributes: length, width & height into attributes: “length”, “width” & “height” respectively |
$google_merchant_center | Enables mapping from the WooCommerce Google Product Feed fields |
$hide_out_of_stock | Hides/removes out of stock items from the feed |
$max_custom_field = 50000 | sets the max custom fields to 5000. May resolve some feed generation issues |
rule shipping(0) | Set shipping cost to 0.00 |
rule shipping(5) | set shipping cost is 5 dollars |
rule shipping(0.95, *) | Shipping is 95% of the full price |
rule shipping(0.95, *, s) | Shipping is 95% of the sale price |
rule shipping(air, t) | Set shipping type as air (type ground is default) |
$strip_html_markup | |
$timeout = 300 | Sets PHP execution timeout to 300 seconds |
set weight_unit as xx | sets weight unit to xx |
Advanced commands unique to this feed
To apply advanced commands unique to a given feed:
1. First create the feed.
2. Then navigate to CartProductFeed > Manage Feeds and edit the feed in question.
3. Open the advanced commands box again and check the “advanced commands unique to this feed” box. Click update again.
You may now create a new feed with a new set of advanced commands.