1999 Posts in 530 Topics by 433 members
E-Commerce Modules
SilverStripe Forums » E-Commerce Modules » Thumbnails in shopping cart (0.81)
Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.
Moderators: martimiz, Nicolaas, Howard, Sean, Ryan M., biapar, Willr, Ingo, Jedateach, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 586 Views |
-
Thumbnails in shopping cart (0.81)

27 January 2011 at 10:08am
I am using ecommerce 0.81 and I would like to use thumbnails of the products to be purchased in the shopping cart. I have tried many ideas but can't seem to be able to reference the product thumbnail in Cart.ss. For example:
<% if Image.ContentImage %>
<img class="productImage" src="$Image.ContentImage.URL" alt="<% sprintf(_t("IMAGE","%s image"),$Title) %>" />
<% else %>
<div class="noimage">$CartID.$Image.Thumbnail </div>
<% end_if %>is false and gives me "Cart_ProductVariation_OrderItem_DB_69"
Also, is it possible to have an unordered list for Variations of a Product. In the CMS if I enter three Variations, "Small" "Medium" and "Large", it gets sorted in the CMS in alphabetical order (Large --> Small) whereas I would like it to remain in the order I entered (Small --> Large). I know I can put numbers before the text as a kludge but is there a variable setting I can use to make it more elegant?
-
Re: Thumbnails in shopping cart (0.81)

27 January 2011 at 5:00pm
Not sure about your variations question, this is how I got thumbnails to work in 0.6.1
I added the following function to the Product_OrderItem class in Products.php
class Product_OrderItem extends OrderItem {
...
function Image() {
return $this->Product()->Image();
}
...
}Its highly likely not the correct implementation of the code as it wont stand up to having the ecommerce files updated by future releases.
| 586 Views | ||
|
Page:
1
|
Go to Top |

