An app (ShopSync) is adding cart attributes (mc_cid and created_at) that are eventually making their way to packing slips. I would prefer that this wasn’t the case and would like to remove the attributes so that they do not show up in the Additional Details section of Shopify and get transferred to ShipStation as notes. I am having trouble with the forceful removal of these attributes as they seem to persist regardless of what I do to them. Below is the code I’m attempting to use for removal. This works for removing but on cart update, the attributes come back.
I am not familiar with ShopSync, but maybe there is some configuration/setting to prevent the cart attribute from being written in the first place?
If that isn’t possible, you might check where the packing slips are printed. If you are using the Order Printer app, templates can be customized to include cart attributes like this:
{% for attribute in attributes %}
{{ attribute | first }}: {{ attribute | last }}
{% endfor %}
If that is the case, a simple template modification may suffice.
Thanks for replying @kerrieclark831 . There seems to be no configuration setting for ShopSync. We have attempted to use Order Printer but it has not been able to meet our needs as ShipStation offers better order filtering and order splitting that we use regularly. Thanks for the suggestions!
I have not been able to figure out a way to remove the attributes. According to ShopSync support, it is a bug that they are looking in to but gave no timeline
Shopify.getCart(function(cart) {
var existingAttributes = cart.attributes;
console.log(“Your cart”, cart);
// Step 2: Remove the existing attribute with the old key / just assign empty value
var oldKey = ‘package-type product-id 8600755339557 variant-no-1 sku 8157552-002’;
if (existingAttributes[oldKey]) {
console.log(“old key exists”);
existingAttributes[oldKey] = ‘’;
}
// Step 3: Add the attribute with the new key
var newKey = ‘new_attribute_key’;
existingAttributes[newKey] = ‘new_attribute_value11’;