Comments (8)
This is why it needs more documentation :).
The productImageSize
filter relies on Shopify's Shopify.Image.getSizedImageUrl
method being available, although I believe that should be available on any page with option_selectors.js
included. But anyway, first step would be to double check that method's available by entering that in your console.
Another thing that might be causing a problem here is that reading the upgrade notes for Rivets.js from 0.6.0 (the bundled version prior to v0.3.0 of Cart.js) to 0.8.0, they note that arguments to formatters should now be wrapped in quotes if they're meant to be strings, as in the case of the small
argument here. So I'd try changing your example to:
<img rv-src="item.image | productImageSize 'small'">
and seeing if that helps.
from cartjs.
Hi :),
I've tried to use the productImageSize filter, but it always return me the biggest image:
<img rv-src="item.image | productImageSize small">
What am I doing wrong?
from cartjs.
Bingo ! Adding the quotes worked! Thanks a lot !
Envoyé de mon iPhone
Le 28 juin 2015 à 12:11, Gavin Ballard [email protected] a écrit :
This is why it needs more documentation :).
The productImageSize filter relies on Shopify's Shopify.Image.getSizedImageUrl method being available, although I believe that should be available on any page with option_selectors.js included. But anyway, first step would be to double check that method's available by entering that in your console.
Another thing that might be causing a problem here is that reading the upgrade notes for Rivets.js from 0.6.0 (the bundled version prior to v0.3.0 of Cart.js) to 0.8.0, they note that arguments to formatters should now be wrapped in quotes if they're meant to be strings, as in the case of the small argument here. So I'd try changing your example to:
and seeing if that helps.
—
Reply to this email directly or view it on GitHub.
from cartjs.
@gavinballard Would you like me to factor this issue into work on #55?
from cartjs.
@michaelrshannon That would be awesome, thank you!
I'd also like to bring product images into the advanced cart example on the Cart.js homepage.
from cartjs.
Np - I can do that at the same time.
from cartjs.
I love the plugin but I'm stuck on getting images to appear, tried the method above. Is new documentation still going to happen? Particularly around Rivets.
from cartjs.
@michaelrshannon? ;)
from cartjs.
Related Issues (20)
- New site for "Built With" Page: http://shop.thenewcompany.com/
- cart.requestComplete Vanilla js? HOT 2
- 'selling_plan_allocation' key is showing up twice in CartJS Line item properties.
- Feature: Option to output price without currency symbol
- New site for "Built With" Page: http://nunoo.eu
- cart.requestComplete not firing? HOT 1
- How can I add Error message when exceeding the product quantity in Mini cart? HOT 1
- "Required parameter missing or invalid: items" Error when adding to cart
- Callbacks functiona not wroking when I set selling_price option
- Liquid code in rivets.js
- New site for "Built With" Page: https://atlasteaclub.com/
- UpdateItem with quantity undefined does not leave quantity as-is
- Changes to cart.items results in unwanted class/functionality duplication
- New site for Waist Beads "Built With" Page: https://www.wisonline.com.ng/beads
- New site for "Built With" Page: http://web.com HOT 1
- After coming back from checkout, json has the old data HOT 2
- Hh HOT 1
- New site for "Built With" Page: http://file:///C:/Users/acer/Desktop/Cosmetics/index.html HOT 1
- Can we use it with core php project or its only for Shopify HOT 1
- Current status
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cartjs.