def generate_steps(self, cart):
    self.cart = cart
    self.details_step = DetailsStep(self.request, self.storage['details'], checkout=self)
    if self.is_shipping_required():
        self.shipping_address_step = ShippingAddressStep(self.request, self.storage['shipping_address'], checkout=self)
        shipping_address = self.shipping_address_step.address
        self.steps.append(self.shipping_address_step)
        self.shipping_method_step = ShippingMethodStep(self.request, self.storage['shipping_method'], shipping_address, self.cart, checkout=self)
        self.steps.append(self.shipping_method_step)
    else:
        shipping_address = None
        self.shipping_address_step = None
        self.shipping_method_step = None
    summary_step = SummaryStep(self.request, self.storage['summary'], shipping_address, checkout=self)
    self.steps.append(summary_step)
def generate_steps(self, cart):
    self.cart = cart
    self.details_step = DetailsStep(self.request, self.storage['details'], checkout=self)
    if self.is_shipping_required():
        self.shipping_address_step = ShippingAddressStep(self.request, self.storage['shipping_address'], checkout=self)
        shipping_address = self.shipping_address_step.address
        self.steps.append(self.shipping_address_step)
        self.shipping_method_step = ShippingMethodStep(self.request, self.storage['shipping_method'], shipping_address, self.cart, checkout=self)
        self.steps.append(self.shipping_method_step)
    else:
        shipping_address = None
        self.shipping_address_step = None
        self.shipping_method_step = None
    summary_step = SummaryStep(self.request, self.storage['summary'], shipping_address, checkout=self)
    self.steps.append(summary_step)