Accepting credit cards, warehouses, and shipping and fulfilling orders
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 boxAdd 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
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
Hello @PaulNewton , Is there already a way to hide the Custom Attribute in the Order Details in Admin? To avoid user to edit the value.
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 _
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024