Amazon Makes FBA Liquidations Default and Mandates Donations from Sept 2025
Effective: September 30, 2025 (U.S. & Canada) Amazon is overhauling its inventory recovery programs. Starting
When you shop for any product especially clothing or shoes, when you click on the product, along with the product the colours available for it are also displayed. You can simply click on each colour and view the product. How is this feature made possible in Magento? In Magento PWA Studio this is made possible through colour swatches. Customers can click on the swatch and check all the colour options for a particular product. So here’s a blog dedicated to how to add a custom attributes in PWA Studio.
This is the third blog in our series dedicated to Magento PWA Studio, the first two being How to add a newsletter to the footer and How to add banner on a category page, both interesting reads which you can check out.
Without further ado let’s see how it’s done.
Check out our Cenia Pro Theme for Magento 2 PWA, a fast and seamless PWA solution
Magento has a feature to show product attributes as a swatch be it visual swatch for colors or product swatch. In Venia Pwa Studio, By default, only fashion_color attribute is added as a swatch attribute. So if your website has custom attributes as a swatch then it will not display as a swatch image out of the box. So here we have come up with the solution of how you can show your custom attribute as a swatch image on product pages. For this, you need to specify your attribute in the option type array list inside
/venia-ui/lib/components/ProductOptions/getOptionType.js
Click to embrace the technological evolution with our Magento 2 PWA Theme
To achieve this first create a Venia project through scaffolding https://magento.github.io/pwa-studio/pwa-buildpack/scaffolding/ yarn create @magento/pwa
Once you have your scaffolded Venia project:
node_modules/@magento/venia-ui/lib/components/ProductOptions/getOptionType.js
We are going to add it with the help of targetable introduced in PW Studio.
Interesting Reads: Benefits of Magento PWA for eCommerce websites
Here I am taking Magento with sample data installed as a backend. So my default installation looks like this
To show the color attribute as a swatch I will add the below code in the local-intercept.js file
local-intercept.js [YOUR_PROJECT_NAME/local-intercept.js]
const { Targetables } = require('@magento/pwa-buildpack'); module.exports = targets => { const targetableFactory = Targetables.using(targets); // Create a TargetableModule instance that points to the getOptionType.js source const OptionsType = targetableFactory.module( '@magento/venia-ui/lib/components/ProductOptions/getOptionType.js' ); const instruction = { after: 'const customAttributes = {', insert: "color: 'swatch'," }; OptionsType.spliceSource(instruction); };
Get a tour of our Demo marketplace
After that run your project yarn build yarn start
Now check your product page. It should show your attribute as a swatch like this
This is the procedure that you can follow for Magento PWA Studio to add a custom attribute in PWA Studio. We hope we were able to share it in a simple way and would encourage you to give it a try.
You can expect similar articles as we want to share what we have learned, things that have made Cedcommerce what we are today.
Contact us for any related queries and we will be happy to help!
Effective: September 30, 2025 (U.S. & Canada) Amazon is overhauling its inventory recovery programs. Starting
TikTok has rolled out a set of new support tools for TikTok Shop creators, aiming
Amazon has launched FBA Damaged Inventory Ownership, a program that lets sellers take direct control
Alibaba Group has unveiled a sweeping restructuring of its consumer-facing operations, merging Taobao, Tmall, Ele.me,
Walmart is ramping up its efforts to recruit merchants from the United Kingdom and continental
Amazon is doubling down on artificial intelligence in eCommerce with the launch of Lens Live,
For the first time since 2020, U.S. consumers are planning to cut back on holiday
Temu, the rapidly growing eCommerce platform, has announced the launch of its Local Seller Program
Etsy has announced important updates to its new Etsy Payments Policy, effective October 9, 2025,
Amazon has launched its first-ever “Second Chance Deal Days“ sales event in Europe, exclusively featuring
The Update Amazon has strategically resumed its Google Shopping ad campaigns across all international markets—
TikTok has updated its account policies, LIVE rules, monetization eligibility, and enforcement measures. The changes
Think Black Friday is when holiday shopping begins? Think again. Your future customers are already
eBay is rolling out eBay Live in the UK, offering sellers a new way to
eBay is giving its auto parts and accessories marketplace a tune-up, announcing the launch of
Walmart is set to revamp its Pro Seller Program at the end of September 2025,
Pinterest is diving headfirst into the burgeoning secondhand market with the launch of “Thrift Shop,”
Why Pinterest Is a Growth Channel for Etsy Sellers Discovery drives eCommerce growth. With 482
In a strategic move to enable smaller businesses with global ambitions, international logistics giant DHL
In a turn of events that highlights the volatility and responsiveness of global eCommerce logistics,