Exemplo n.º 1
0
 /**
  * @return string
  */
 public function removeallLink()
 {
     $buyable = $this->Buyable();
     return $buyable ? ShoppingCart_Controller::remove_all_item_link($buyable, $this->uniquedata()) : '';
 }
Exemplo n.º 2
0
 /**
  * Link to remove all of this product from cart.
  * @return string link
  */
 public function removeallLink()
 {
     return ShoppingCart_Controller::remove_all_item_link($this);
 }
 public function testVariations()
 {
     $this->loadFixture('silvershop/tests/fixtures/variations.yml');
     $ballRoot = $this->objFromFixture('Product', 'ball');
     $ballRoot->publish('Stage', 'Live');
     $ball1 = $this->objFromFixture('ProductVariation', 'redlarge');
     $ball2 = $this->objFromFixture('ProductVariation', 'redsmall');
     // Add the two variation items
     $this->get(ShoppingCart_Controller::add_item_link($ball1));
     $this->get(ShoppingCart_Controller::add_item_link($ball2));
     $items = ShoppingCart::curr()->Items();
     $this->assertNotNull($items);
     $this->assertEquals($items->Count(), 2, 'There are 2 items in the cart');
     // Remove one and see what happens
     $this->get(ShoppingCart_Controller::remove_all_item_link($ball1));
     $this->assertEquals($items->Count(), 1, 'There is 1 item in the cart');
     $this->assertFalse($this->cart->get($ball1), "first item not in cart");
     $this->assertNotNull($this->cart->get($ball1), "second item is in cart");
 }
 /**
  * remove all of this buyable's orderitem from cart
  * @return String (Link)
  */
 function RemoveAllLink()
 {
     return ShoppingCart_Controller::remove_all_item_link($this->ID, $this->ClassName, $this->linkParameters());
 }
Exemplo n.º 5
0
 public function removeallLink()
 {
     return ShoppingCart_Controller::remove_all_item_link($this->Buyable(), $this->uniquedata());
 }
Exemplo n.º 6
0
 function removeallLink()
 {
     return ShoppingCart_Controller::remove_all_item_link($this->_productID);
 }