def _editedAddress(self): """ """ if self.context.REQUEST.get("also_invoice_address", "yes") == "yes": url = self.context.absolute_url() + "/checkout-shipping" else: customer = ICustomerManagement(self.context).getAuthenticatedCustomer() invoice_address = IAddressManagement(customer).getInvoiceAddress() if invoice_address is None: url = self.context.absolute_url() + "/checkout-add-address?address_type=invoice" else: url = invoice_address.absolute_url() + "/checkout-edit-address" return url
def _editedAddress(self): """ """ if self.context.REQUEST.get("also_invoice_address", "yes") == "yes": url = self.context.absolute_url() + "/checkout-shipping" else: customer = ICustomerManagement( self.context).getAuthenticatedCustomer() invoice_address = IAddressManagement(customer).getInvoiceAddress() if invoice_address is None: url = self.context.absolute_url( ) + "/checkout-add-address?address_type=invoice" else: url = invoice_address.absolute_url() + "/checkout-edit-address" return url
def _gotoAddresses(self): """ """ customer = ICustomerManagement(self.context).getAuthenticatedCustomer() shipping_address = IAddressManagement(customer).getShippingAddress() mtool = getToolByName(self.context, "portal_membership") if mtool.isAnonymousUser(): if shipping_address is None: return self.context.absolute_url() + "/checkout-add-address" else: return shipping_address.absolute_url() + "/checkout-edit-address" else: if shipping_address is None: return self.context.absolute_url() + "/checkout-add-address" else: return self.context.absolute_url() + "/checkout-select-addresses"
def _gotoAddresses(self): """ """ customer = ICustomerManagement(self.context).getAuthenticatedCustomer() shipping_address = IAddressManagement(customer).getShippingAddress() mtool = getToolByName(self.context, "portal_membership") if mtool.isAnonymousUser(): if shipping_address is None: return self.context.absolute_url() + "/checkout-add-address" else: return shipping_address.absolute_url( ) + "/checkout-edit-address" else: if shipping_address is None: return self.context.absolute_url() + "/checkout-add-address" else: return self.context.absolute_url( ) + "/checkout-select-addresses"