Magento Forum

   
Not require address (for downloads for example)
 
SeanBlake
Jr. Member
 
Total Posts:  2
Joined:  2009-01-22
 

Hey!

When a user makes a purchase from my store, all I need is their name and email address. I have managed to make it so that my form only requires their name, email address, country and province/state (which is better already) however when they go to pay with paypal (the only payment option we accept) Paypal says that the address is invalid and that it needs to be valid because my website said I need to ship to that particular address. How do I stop telling PayPal that I need the shipping address? I already have my products set up as virtual products.

PS here is how I got this far:

Went to app/design/frontend/default/default/template/checkout/onepage/ and removed all the required stars and “required-field” classes from all but the names and email address.

Then I went to app/code/core/Mage/Customer/Model/Address/ and commented out:

if (!Zend_Validate::is($this->getStreet(1), 'NotEmpty')) {
            $errors[] 
$helper->__('Please enter street.');
        
}

        
if (!Zend_Validate::is($this->getCity(), 'NotEmpty')) {
            $errors[] 
$helper->__('Please enter city.');
        
}

        
if (!Zend_Validate::is($this->getTelephone(), 'NotEmpty')) {
            $errors[] 
$helper->__('Please enter telephone.');
        
}

        
if (!Zend_Validate::is($this->getPostcode(), 'NotEmpty')) {
            $errors[] 
$helper->__('Please enter zip/postal code.');
        
}

        
if (!Zend_Validate::is($this->getCountryId(), 'NotEmpty')) {
            $errors[] 
$helper->__('Please enter country.');
        
}

        
if ($this->getCountryModel()->getRegionCollection()->getSize()
               && !
Zend_Validate::is($this->getRegionId(), 'NotEmpty')) {
            $errors[] 
$helper->__('Please enter state/province.');
        
}

Help is appreciated smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
SeanBlake
Jr. Member
 
Total Posts:  2
Joined:  2009-01-22
 

Been mucking around in the settings and stuff to see if I could figure out, no luck yet. I found that Paypal accepts the following HTML variable: “no_shipping” where value 0 = Prompt for an address, but do not require one, 1= Do not prompt for an address and 2 = Require an address. I tried to add it to a file that seemed to pass other variables off to PayPal in an array but it did not work.

Again i would greatly appreciate if someone could throw me in the right direction for having PayPal not require a shipping address. Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top