How to hide the extra properties showing up in the line item in the admin Orders page

seamonsterwes
Shopify Expert
1 0 0

Our client's store has an option to add a gift box to any item they sell. When this is chosen, it adds the expected line item to the Order in the admin of the site. When it's not selected, though, sometimes it adds a line item referencing the option that wasn't chosen (in gobbledegook metadata-like language), and sometimes it doesn't. It seems to always add the expected line item in the expected language when it's supposed to, but then it adds gobbledegook afterwards. Is there a way to hide the gobbledegook both in the order where the option isn't added and where it is? Failing that, can we at least hide it when the option isn't chosen? 

Examples:

~in the admin order of an item without the gift-box option~

Add Gift Box?
_boldOptionLocalStorageId:
1829418467363_-1612161848

~in the admin order of an item with the gift box selected~ 

Add Gift Box?:
Yes, I'd like a gift box
Add a Gift Message:
Dad:
Happy Birthday. We love you!. Happy 50th! Scott and Kathy
_boldVariantNames:
Yes%2C I'd like a gift box
_boldVariantIds:
32789867528255
_boldProductIds:
4716390940735
_boldVariantPrices:
295
_boldBuilderId:
-1512148339
_boldOptionLocalStorageId:
580134862880_1040715238
Replies 2 (2)

PaulNewton
Shopify Partner
6274 573 1319

There is dunder, double underscores __, to make cart attributes hidden and private so you would need to either modify what is adding these attributes in the files or modify them with javascript when forms before the forms are submitted.

 

You cannot modify the shopify admin code that makes the interfaces, so the only other approach is a browser extension that lets you apply custom CSS styles or JS userscripts to hide irrelevant content for any webpage.

 

While this is a UX annoyance there's also just learning to ignore and not get distracted by noise.

If this gobbledegook is causing some sort of distraction timesink there also using automation tools to properly pre tag such orders as "has-gift-box" so staff can process all those first then move on to orders that have excess noisy info attributes. 

 

It's either that or make a custom admin dashboard using the api.

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


DIGIDY
Shopify Partner
8 0 3

Hi, maybe it helps. 

 

You need to check  cart-template.liquid for 

 

{%- for p in item.properties -%}

...

{%- endfor -%}

 

----

{%- for p in item.properties -%}
{%- if p.first.first == '_' -%}{% continue %}{%- endif -%}
....
{%- endfor -%}

 

With this code you check each item property for options with _