Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ProductImage #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sebastienhouzet
Copy link

Hello

Add ProductImage on $resources to add images on product

$product_image_info = array(
'src' => $image->link
);
$image_shopify = $shopify->ProductImage->post($product_image_info,$shopify->Product->generateUrl(array(),$product_shopify['id']."/images"));

Hello

Add ProductImage on $resources to add images on product

$product_image_info = array(
                'src' => $image->link
            );
$image_shopify = $shopify->ProductImage->post($product_image_info,$shopify->Product->generateUrl(array(),$product_shopify['id']."/images"));
@tareqtms
Copy link
Contributor

@sebastienhouzet
ProductImage is a child resource of Product. So the ideal way of doing this should be like

$product_image_info = array(
    'src' => $image->link
);
$image_shopify = $shopify->Product($product_shopify['id'])->Image->post($product_image_info));

Please let me know if you are having any issues with that way.

@joeyhub joeyhub mentioned this pull request Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants