public
Created

Shopify modify assset PHP

  • Download Gist
shopify_modify_asset_php
1 2 3 4 5 6 7 8 9 10 11 12 13
// Update 404 page HTML with pixel
$liquid_404_pixel = $this->shopify->call('PUT', '/admin/themes/' . $main_theme_id . '/assets.json',
array(
'asset' =>
array(
'key' => 'templates/404.liquid',
'value' => ($liquid_404_html . $this->load->view('pixel', array('client_id' => $this->session->userdata('client_id')), true))
)
)
);
 
// Part that returns the error
var_dump($liquid_404_pixel);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.