nogs Posted July 30, 2015 Share Posted July 30, 2015 I would like to know how I can configure PS 1.6 so that when my customers check out using the default PS "guest checkout" system, they have to enter no other information other than their first and last name, email and mobile number. To clarify I don't want them to even see "social title", "date of birth", "address", "zip/postal code", "city", "country", "state" or any of these fields under the "Invoice Address". Thanks in advance. Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted July 30, 2015 Share Posted July 30, 2015 (edited) Before we begin, I would like to inform if the following variables is associated with customer object (only certain variables mentioned here): id_gender (social title), firstname, lastname, email, birthday (date of birth) Whereas "address", "zip/postal code", "city", "country", "state", "phone", "mobile phone" are variables associated with address object. Since you only need : first and last name, email and mobile number, then you only need to activate one country (your country of course). Conditions : Prestashop v.1.6.1.0 Order process type > One-page Checkout Guest Checkout > Enabled 1st, change the address format, go to : B.O > Localization > CountriesPick your country and change the address format, click the "Edit" menu available on the right.Scroll down to the "Address format" field optionRemove all default values available on "Address format" but keep the "phone_mobile"Set all of the following configuration options to "NO" : "Does it need Zip/postal code?", "Contains states", "Do you need a tax identification number?"Set the "Zip/postal code format" empty/blankSave the changes. 2nd, modify theme file order-opc-new-account.tpl to remove (hide) the unnecessary fields. Add new class "hide" into the corresponding div tag which wrapping the unecessary fields. For example if we want to hide "Social title", then find <label>{l s='Social title'}</label> and add new class "hide" to the div wrapper (it's above the label html tag). <div class="hide required clearfix gender-line"> <label>{l s='Social title'}</label> {* Rest of smarty code here *} </div> Do the same procedure for the unnecessary fields.Then try to place a test order on your shop and checkout with "Instant Checkout" / "Guest Checkout", the unnecessary fields should be hidden right now. . ... Next 3rd, create dummy address by defining default field value Edited July 30, 2015 by gonebdg - webindoshop.com (see edit history) 1 Link to comment Share on other sites More sharing options...
Lionheartmatrix Posted August 25, 2015 Share Posted August 25, 2015 Hi. Waiting for 3rd... Thank you Regards Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted September 2, 2015 Share Posted September 2, 2015 Ok let's continue. 3rd, modify theme file order-opc-new-account.tpl to create dummy address by defining default field value If the 1st step already done correctly, then only: addrees, city, country, and alias are the required fields. Add following smarty code on the top of the file : {assign var=default_address value='My address'} {assign var=default_city value='My city'} {assign var=default_country value='DEFAULT_COUNTRY_ID'} {assign var=default_alias value='My dummy address'} Attention! replace DEFAULT_COUNTRY_ID with your default country ID Feel free to change the value for the others dummy var as you wish Then for each corresponding HTML input, put the dummy smarty variable as the input value Below are an example about how to defining default value for field address1 {* commenting the original smarty code OR you might remove it completely <input type="text" class="text form-control validate" name="address1" id="address1" data-validate="isAddress" value="{if isset($guestInformations) && isset($guestInformations.address1) && isset($guestInformations) && isset($guestInformations.address1) && $guestInformations.address1}{$guestInformations.address1}{/if}" /> *} <input type="text" class="text form-control validate" name="address1" id="address1" data-validate="isAddress" value="{$default_address}" /> Do the same procedure for city and alias Except for country field input, we need to remove the original field (HTML select) and create a hidden input field {* commenting the original smarty code OR you might remove it completely <select name="id_country" id="id_country" class="form-control"> {foreach from=$countries item=v} <option value="{$v.id_country}"{if (isset($guestInformations) && isset($guestInformations.id_country) && $guestInformations.id_country == $v.id_country) || (!isset($guestInformations) && $sl_country == $v.id_country)} selected="selected"{/if}>{$v.name|escape:'html':'UTF-8'}</option> {/foreach} </select> *} <input type="hidden" name="id_country" id="id_country" value="{$default_country}" /> That's it, now all required fields for address have default value, so customers doesn't have to fill an address, however if the 2nd step above already done correctly then there is no address fields displayed on the form. 2 Link to comment Share on other sites More sharing options...
DreamquestMultimedia Posted September 9, 2015 Share Posted September 9, 2015 What about for version 1.6.1.1? PrestaShop seems to crack when it comes to handling downloadable products. The money spent on this article -> http://www.matthewwoodward.co.uk/tutorials/sell-digital-products-online-prestashop/ would have been better spent making sure it was actually suitable for this purpose. Once I get the payment gateway figured out, I might switch to WooCommerce. This is too much work. Link to comment Share on other sites More sharing options...
DreamquestMultimedia Posted September 9, 2015 Share Posted September 9, 2015 The payment gateway works. I just finished the test. Frankly, that is the limit of how far I want to go for now. I am not moving to WooCommerce. But until the day PrestaShop can make this feature turned on and off, recommending it would be hard. Link to comment Share on other sites More sharing options...
remoteONE Posted September 10, 2015 Share Posted September 10, 2015 (edited) I was quite stunned when I realized that the Title and DOB fields were, unless I am mistaken, HARDCODED into the Registration and Guest checkout forms. I looked for an "Age Restriction" module to disable, because, thats the ONLY reason a shopping cart would EVER need to ask a customers birthday. Having to input such personal info for no customer benifit, just puts customers off. Alss, No Age Restriction module could be found.. So in v1.6.1.1, is there still SIMPLE no way to disable these fields from the backend? Also, for Australia at least, no one bothers with Salutations anymore. Need to easily turn off the DOB and Title fields.. So I set about changing the code, and adding "hide to the clas. Made the changes to order-opc-new-account.tpl, then order-opc-new-account-advanced.tpl then even changed the only other instance of "{l s='Social title'}" that I could find in identity.tpl. Deleted the Cache folder each time, and cleared local cache. but to no avail, the "Title field still shows. Maybe a hook somewhere? Edited September 10, 2015 by remoteONE (see edit history) Link to comment Share on other sites More sharing options...
remoteONE Posted September 10, 2015 Share Posted September 10, 2015 (edited) For 1.6.1.1 at least the instruction for the "Create An Account" page is: Search for code {l s='Title'} in the authentication.tpl file. Another thing of concern is that there is no Password Confirmation filed ! Edited September 10, 2015 by remoteONE (see edit history) Link to comment Share on other sites More sharing options...
Rubida Posted October 21, 2015 Share Posted October 21, 2015 Hello I am using version 1.6.1.1 and have tried all the solutions suggested above. I cannot get this to work. I still see all the fields and the guest checkout is still asked for a delivery address. Can anyone advise me how to remove the required labels from the form during the checkout process and to stop the delivery details from appearing? Thanks! Link to comment Share on other sites More sharing options...
blackflow Posted November 3, 2015 Share Posted November 3, 2015 Before we begin, I would like to inform if the following variables is associated with customer object (only certain variables mentioned here): id_gender (social title), firstname, lastname, email, birthday (date of birth) Whereas "address", "zip/postal code", "city", "country", "state", "phone", "mobile phone" are variables associated with address object. Since you only need : first and last name, email and mobile number, then you only need to activate one country (your country of course). Conditions : Prestashop v.1.6.1.0 Order process type > One-page Checkout Guest Checkout > Enabled 1st, change the address format, go to : B.O > Localization > Countries Pick your country and change the address format, click the "Edit" menu available on the right. Scroll down to the "Address format" field option Remove all default values available on "Address format" but keep the "phone_mobile" Set all of the following configuration options to "NO" : "Does it need Zip/postal code?", "Contains states", "Do you need a tax identification number?" Set the "Zip/postal code format" empty/blank Save the changes. 2nd, modify theme file order-opc-new-account.tpl to remove (hide) the unnecessary fields. Add new class "hide" into the corresponding div tag which wrapping the unecessary fields. For example if we want to hide "Social title", then find <label>{l s='Social title'}</label> and add new class "hide" to the div wrapper (it's above the label html tag). <div class="hide required clearfix gender-line"> <label>{l s='Social title'}</label> {* Rest of smarty code here *} </div> Do the same procedure for the unnecessary fields. Then try to place a test order on your shop and checkout with "Instant Checkout" / "Guest Checkout", the unnecessary fields should be hidden right now. . ... Next 3rd, create dummy address by defining default field value I have question to your solution- I wanted to disable few fields but mainly "country". Problem is that when I disable it, postal code doesn't work- It validates but the field is "red". It's something to do with hiding the country. Any ideas? (prestashop 1.6.1 Link to comment Share on other sites More sharing options...
Mixa_RU Posted November 30, 2015 Share Posted November 30, 2015 Hi blackflow! Did you set ZIP/Postal index to OFF in BO->Localization->Countries? Link to comment Share on other sites More sharing options...
chahidkhan Posted February 10, 2016 Share Posted February 10, 2016 (edited) Hi , this is very interesting for me but i'm using PrestaShop™ 1.5.6.2 , i was searching more than 1 week , tested many ways but i still get errors ! Can you help me please with PS 1.5.6.2 I in guest checkout :First Name :Last Name :Email :Comment :Only , adress and all other option will be disabled !! Thanks in advance Edited February 10, 2016 by chahidkhan (see edit history) Link to comment Share on other sites More sharing options...
gabberlt Posted April 21, 2016 Share Posted April 21, 2016 (edited) Thank you gonebdg very much for this post, solved address issue for newest Presta 1.6.1.4 Very greatful for your help Edited April 21, 2016 by gabberlt (see edit history) Link to comment Share on other sites More sharing options...
kalvak Posted November 1, 2016 Share Posted November 1, 2016 Hi, i did 1+2+3 steps but still have error: There is 2 errors: address1 is required. city is required. tnx Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now