possible jrStore issues

blindmime
@blindmime
8 years ago
772 posts
We have this in jrElastic's list template in the jrStore module: {if strlen($item._product_images.0)}. Does this imply >0?

Also, let's say the product is a t-shirt and I'm uploading a front and back image. I upload the front first and the back 2nd. On the form page, the front appears first, the back 2nd. On the product page the front is displayed with a (2) showing more than one image is available. I can click on it and the front shows first and the back 2nd.

However, on a list page, the back side is displayed. Is $item._product_images.0 the last image uploaded? I believe you would most likely want the same image displaying in a list as the primary image which is displayed on the product page.
updated by @blindmime: 03/21/17 05:33:25PM
michael
@michael
8 years ago
7,715 posts
blindmime:...
We have this in jrElastic's list template in the jrStore module: {if strlen($item._product_images.0)}. Does this imply >0? ....
Nope, that reads, "If the string length of the first item in the _product_images array is greater than zero"

So its checking that there is a product image set.

I would expect that the order of the images would always have them in the same order, so _product_image.0 should be the same in any location. If its not, then it could be that the product images are being sorted.

URL's to see locations where it happens please. :)
blindmime
@blindmime
8 years ago
772 posts
On the index page here http://blindmime.com I have list of merch on the right. The Henry the Lima Bean t-shirt in the list is showing the 2nd image I uploaded. Go to the product page and it shows the 1st image I uploaded.

Tags