Shopify themes, liquid, logos, and UX
We are using below code to include custom liquid file on main-product.liquid, it is not inserting. But the same code works for product.liquid. How to make it work for main-product.liquid?
We are testing on two different stores having product.liquid and main-product.liquid
$productData = [ 'asset' => [ 'key' => 'templates/main-product.liquid' ] ];
$productPageData = $shop->api()->rest('GET', '/admin/themes/'.$activeThemeId.'/assets.json', $productData)['body']['container']['asset']['value'];
$productPageData = $productPageData."\n{% include 'custom-product-btn' %}";
$productPageContent = [ 'asset' => [ 'key' => 'templates/main-product.liquid', 'value' => $productPageData ] ];
$shop->api()->rest('PUT', '/admin/themes/'.$activeThemeId.'/assets.json', $productPageContent);
$shopdata = Customize::where('storeName', $shopName)->first();
$shopdata->appIntegrated = '1';
$shopdata->save();
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024