Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Ajaxify image #304

Merged
merged 6 commits into from Dec 23, 2014
Merged

Ajaxify image #304

merged 6 commits into from Dec 23, 2014

Conversation

cshold
Copy link
Contributor

@cshold cshold commented Dec 23, 2014

Issue: There is an issue in the ajaxify.js, when the default cart is used (useCartTemplate = false).
If the product that is added to the cart has no image, the ajaxify shopping cart doesn't open.

Reason: There is a hack in this code that create the thumbnail of the image by adding "_small" at the end of the file name. However, /cart.js will return null for products with no image.

Good Solution: Change the Shopify API to return the "no-image" thumbnail instead of null when there is no image assigned to the product

Hack Solution: hard-coding the url of the default no-image thumbnail. I just used the one that I got from my shop. It doesn't look to be the generic one, and also it is medium according to the url.

Edit: I added some minor syntax fixes in the last commit. All the rest was done by @afshing

@cshold cshold mentioned this pull request Dec 23, 2014
cshold added a commit that referenced this pull request Dec 23, 2014
Ajaxi cart fix for when products have no image
@cshold cshold merged commit 4bb908c into master Dec 23, 2014
@cshold cshold deleted the afshing-ajaxify-image branch December 23, 2014 20:32
@afshing
Copy link
Contributor

afshing commented Dec 23, 2014

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants