lightspeedretail / webstore

Web Store eCommerce solution for Lightspeed
http://www.lightspeedpos.com/webstore
Open Software License 3.0
85 stars 63 forks source link

Product->GetImages() inconsistencies #597

Closed mjvotaw closed 10 years ago

mjvotaw commented 10 years ago

I'm curious if there's a reason why Product->Images/Product->GetImages() returns different types of elements based on the number of images available for a product.

This difference is illustrated here: screen shot 2014-03-05 at 10 03 11 am

It seems to me that it would be a lot more consistent to always assume that this method will return an array of arrays, rather than having to figure out if you're dealing with a single associative array of image paths OR an array of multiple images. It's just a one line change (removing line 308 from Product.php), and I can put a pull request together for it if you'd like.

ktwbc commented 10 years ago

Hi,

This code was rewritten with the change to the new Image Viewer, cloudzoom. This was ticket WS-699 completed for version 3.1.0.

The call to $model->ProductPhotos used in product/_photos.php now returns a consistent array formatted for that viewer.