zdaroff Posted October 2, 2014 Share Posted October 2, 2014 (edited) Greetings to all! I apologize for my English. I have a problem. I'm doing a virtual goods store. The idea is if the goods are assigned as virtual, then the purchase step with the delivery address to be missed. But I have it does not disappear. I do not need it at all. After registration, the person should immediately get to the methods of payment and receive your file. How can I solve this problem? Thanks to all who can help you in any way !!! Edited October 2, 2014 by zdaroff (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted October 2, 2014 Share Posted October 2, 2014 be very careful, when you remove registration then it's 'very' possible that payment methods will not work as most require this information (passed by payment module) to gateway to validate payment. Link to comment Share on other sites More sharing options...
zdaroff Posted October 2, 2014 Author Share Posted October 2, 2014 I do not want to delete the registration completely, but only some unnecessary fields and address Link to comment Share on other sites More sharing options...
jgarciaf Posted April 4, 2015 Share Posted April 4, 2015 I have the same case. Maybe desable the some "Requerid Fields" like address, fone, Zip Code, phone... I'm using "Paypal Express checkout" and the first CHECKOUT apear Proceed to Checkout button and bellow apear also the Checkout Express Paypal button. If the costumer click in the second button, go direct to Paypal paiment. So I think that if hide of Prestashop button it work normal. I do not know. You can active Express Paypal in Modules Link to comment Share on other sites More sharing options...
cүвεя_נυηкιε Posted April 20, 2015 Share Posted April 20, 2015 Did you get this sorted after ? I am trying to do the same thing, I have a store i sell digital downloads, and have no use for the delivery or address fields Any help would be great Thanks Link to comment Share on other sites More sharing options...
vivekp Posted May 7, 2015 Share Posted May 7, 2015 Hello All, So anyone got a fix for this. Is prestashop developers working on this bug of lack of this feature. Link to comment Share on other sites More sharing options...
trevorgilligan Posted May 26, 2015 Share Posted May 26, 2015 same, only need email. also if you wish to make fields not mandatory i got this yesteray but havent tried it: go to /classes/Customer.php and .tpl file and you will see : protected $fieldsValidate = array . remove any fields in the array you dont want mandatory 1 Link to comment Share on other sites More sharing options...
KiaAzad Posted June 6, 2015 Share Posted June 6, 2015 for some reason nobody will answer this particular question and developers don't even care to read. Link to comment Share on other sites More sharing options...
Scott DeFusco Posted June 10, 2015 Share Posted June 10, 2015 I have the same question. We only sell virtual products and so the delivery fields step that appears in checkout is completely irrelevant to our customers. It will actually lead to cart abandonment. I have my products setup as virtual so I would have thought that when checking out, delivery address fields would not be displayed. Any help with how to remove those fields from checkout would be greatly appreciated! Link to comment Share on other sites More sharing options...
trevorgilligan Posted June 11, 2015 Share Posted June 11, 2015 depends if its opc or 5 steps . either way, remove the addresses forms in the html code . if they say mandatory then do this as i said before: go to /classes/Customer.php and .tpl file and you will see : protected $fieldsValidate = array . remove any fields in the array you dont want mandatory i would think that would sort it Trev Link to comment Share on other sites More sharing options...
DotMedia Posted June 11, 2015 Share Posted June 11, 2015 Hi Guys,What happens if you enable Preference > Orders > Enable guest checkout ?DM Link to comment Share on other sites More sharing options...
trevorgilligan Posted June 16, 2015 Share Posted June 16, 2015 they dont have to register on website to check out, they can buy as a guest! Link to comment Share on other sites More sharing options...
formen Posted March 28, 2017 Share Posted March 28, 2017 Hi all, It's my first post, however, I think I figured out the way, how you can set address fields as optional and hide the fields.Btw, I'm using Prestashop v1.6.1.7.NB! It will affect only the quest one-page checkout form! NBNB! Please make copies of your original files (as backup)!There are 3 main things to do: Make changes in classes/address.php Make changes in themes/default-bootstrap/order-opc-new-account.tpl Make changes in themes/default-bootstrap/js/order-opc.js 1) So first of all, in address.php go to the constructor and change: (This change is making those fields as optional) 'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), to 'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => false), === 'alias' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), to 'alias' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => false, 'size' => 32), === 'address1' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'required' => true, 'size' => 128), to 'address1' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'required' => false, 'size' => 128), === 'city' => array('type' => self::TYPE_STRING, 'validate' => 'isCityName', 'required' => true, 'size' => 64), to 'city' => array('type' => self::TYPE_STRING, 'validate' => 'isCityName', 'required' => false, 'size' => 64), 2) Go to themes/default-bootstrap/order-opc-new-account.tpl and comment out related fields {elseif $field_name eq "address1"} <div class="required text form-group"> <label for="address1">{l s='Address'} <sup>*</sup></label> <input type="text" class="text form-control validate" name="address1" id="address1" data-vali date="isAddress" value="{$default_address}" /> </div> to {* elseif $field_name eq "address1"} <div class="required text form-group"> <label for="address1">{l s='Address'} <sup>*</sup></label> <input type="text" class="text form-control validate" name="address1" id="address1" data-vali date="isAddress" value="{$default_address}" /> </div> *} And so on for div wrappers for country, alias, city fields. In addition, to hide the invoice_address wrapper, just change lines (around 210) <input type="hidden" name="alias" id="alias" value="{l s='My address'}"/> <div class="checkbox"> <label for="invoice_address"> to <input type="hidden" name="alias" id="alias" value="{l s='My address'}"/> <div class="hide checkbox"> <label for="invoice_address"> 3) Go to themes/default-bootstrap/js/order-opc.js and change following: var params = 'firstname=' + encodeURIComponent($('#firstname' + (type == 'invoice' ? '_invoice' : '')).val()) + '&lastname= ' + encodeURIComponent($('#lastname' + (type == 'invoice' ? '_invoice' : '')).val()) + '&'; to var params = 'firstname=' + encodeURIComponent($('#customer_firstname' + (type == 'invoice' ? '_invoice' : '')).val()) + '&lastname= ' + encodeURIComponent($('#customer_lastname' + (type == 'invoice' ? '_invoice' : '')).val()) + '&'; This will basically use/ copy the inserted data from the existing first- and lastname fields.How it will look like: http://imgur.com/a/hLUPd. I hope it works for you. Any questions, suggestions - just let me know.Cheers! Link to comment Share on other sites More sharing options...
Recommended Posts