Domanda

I'm working on a onepage checkout,

In the original version of magento, when I erase the firstname of a user in database, and load checkout page, it will automatically redirect to edit profile page to fill the firstname field.

I want to use this feature, Can you suggest some approches?

Ofcource , if anyone can explain the magento way, I would appreciate that more.

UPDATE :

I want an approach to add another field for user, just like the firstname field. So that whenever that field is empty, the checkout page should redirect to "edit profile" page.

È stato utile?

Soluzione

You can add custom field for Customer by following this link https://magento.stackexchange.com/questions/5905/adding-custom-attribute-to-customer-registration-form or the tutorial http://www.magentocommerce.com/wiki/5_-_modules_and_development/customers_and_accounts/registration_fields

Then add validation condition for your attribute just like other validations in Customer Model file app/code/core/Mage/Customer/Mode/Customer.php. Arround line number 792 look for method public function validate()

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top