I use ss2.4 with ecommerce 0.6 trunk r98047
I've got a problem with managing the productvariations...
from post http://silverstripe.org/e-commerce-module-forum/show/266407
i changed:
shoppingcart.php on line 116-129
FROM:
static function add_new_item(OrderItem $item) {
$itemsTableIndex = self::items_table_name();
if($serializedItems = Session::get($itemsTableIndex)) {
foreach($serializedItems as $itemIndex => $serializedItem) {
if($serializedItem != null) {
$unserializedItem = unserialize($serializedItem);
if($unserializedItem->hasSameContent($item)) return self::add_item($itemIndex, $item-
>getQuantity());
}
}
}
self::set_item($item->getProductID(), $item);
}
TO:
function getProductVariationID() {
return $this->_productVariationID;
}
static function add_new_item(OrderItem $item) {
$itemsTableIndex = self::items_table_name();
if($serializedItems = Session::get($itemsTableIndex)) {
foreach($serializedItems as $itemIndex => $serializedItem) {
if($serializedItem != null) {
$unserializedItem = unserialize($serializedItem);
if($unserializedItem->hasSameContent($item)) return self::add_item($itemIndex, $item-
>getQuantity());
}
}
}
if(($item->getProductVariationID())){
self::set_item($item->getProductVariationID(), $item);
}else{
self::set_item($item->getProductID(), $item);
}
}
In productvariation.php i added on line 108
function getProductVariationID() {
return $this->_productVariationID;
}
function removeallLink() {
return ShoppingCart_Controller::remove_all_item_link($this->_productVariationID);
}
In OrderItem.php i added on line 48
function getProductVariationID() {
return $this->_productVariationID;
}
then run an dev/build?flush=1
Now i can ad multiple variations and normal products without variation in the cart.
The problem:
- i can remove the items but not update (eg 1 --> 2 with + or -) from the cart, whatever i do... when i click the + or - i get an blank page htt://mysite.nl/shoppingcart/additem/9 with tab namen HTTP failure 500 - internal server failure instead of getting back to the checkout or productpage and added one more product.
With adding an product without variation there is no problem
The site is in devmode with no errors
Any idea how to solve this?
Next... how do i get into ss 2.4 into the cms admin section the order reports to change the status???
With earlier versions you have a reports tab to browse the orders... now with the new version it became the links and no orderreports show up