def create(self, amount):
     payable = self.checkPayable(self.content)
     nitem = self.createLineItem(payable, amount)
     self.cart[nitem.item_id] = nitem
     # not being able to set the came from does not seem a good
     # reason to explode
     try:
         sessions.set_came_from_url(self.content)
     except:
         pass
     return nitem
 def create(self, amount):
     payable = self.checkPayable(self.content)
     nitem = self.createLineItem(payable, amount)
     self.cart[nitem.item_id] = nitem
     # not being able to set the came from does not seem a good
     # reason to explode
     try:
         sessions.set_came_from_url(self.content)
     except:
         pass
     return nitem
    def onSuccess(self, fields, REQUEST=None):
        """
        Will call the on success method according to the chosen template
        """

        result = getattr(self,self.success_callback)(fields, REQUEST)

        # This needs to occur after we add the item to our cart since
        # doing that sets came_from_url to the item
        if sessions and getattr(self, 'useFormAsContinueDestination', False):
            sessions.set_came_from_url(aq_parent(self))

        return result
    def create(self, quantity=1):
        if self.checkIncrementCart(self.content, quantity=quantity):
            return

        payable = self.checkPayable(self.content)
        nitem = self.createLineItem(payable, quantity)
        self.cart[nitem.item_id] = nitem
        # not being able to set the came from does not seem a good
        # reason to explode
        try:
            sessions.set_came_from_url(self.content)
        except:
            pass
        return nitem
    def create(self, quantity=1):
        if self.checkIncrementCart(self.content, quantity=quantity):
            return

        payable = self.checkPayable(self.content)
        nitem = self.createLineItem(payable, quantity)
        self.cart[nitem.item_id] = nitem
        # not being able to set the came from does not seem a good
        # reason to explode
        try:
            sessions.set_came_from_url(self.content)
        except:
            pass
        return nitem