Jump to content

Remove/Disable County/State in 6.1.5


Eduard J
 Share

Recommended Posts

Hi,

I've been trying to remove state/county from checkout form page, up until now all i had to do is change cubecart/validate.js file  for state from true to false and it has been working fine, but when i change it now i get stuck on checkout page. When i hit the checkout button for few seconds it will redirect me to next page and jumps back. Also tried to hide it from checkout.confirm.php file but get same result. It would be really helpfull to resolve this, choosing from dropdown list makes customers not friendly experience at checkout. I'm using foundtation skin and also lookup address,county in UK  is no longer required. Any advise will be appreciated.

Link to comment
Share on other sites

  • 3 weeks later...

See noone had time to look into it, I spent some time on it and so far menaged to remove it for unregistered users but still having trouble with users who wants to register tried to edit content.addressbook.php with no luck maybe somebody can point me to right direction. Here is so far what i've done :

order.class.php - removed

271 'state'   => getStateFormat($order_summary['state']),
284 'state'   => getStateFormat($order_summary['state_d']),

content checkout.confirm.php - removed

21 {$DATA.state},
39  {$address.state}
53 {$BILLING.state},
69 {$DELIVERY.state},
147 hidden
202 hidden

content.address.php - removed

29 {$address.state},<br/>


cubecart.class.php removed

963 'state_id'   => $_POST['billing']['state'],
    'state'   => getStateFormat($_POST['billing']['state'], 'id', 'name'),
    'state_abbrev'  => getStateFormat($_POST['billing']['state'], 'id', 'abbrev'),
1000'state_id'   => $_POST['delivery']['state'],
    'state'   => getStateFormat($_POST['delivery']['state'], 'id', 'name'),
    'state_abbrev'  => getStateFormat($_POST['delivery']['state'], 'id', 'abbrev'),

Main issue is when customer has no state updated in his paypal account for express checkout it jumps to address book asking to ad it which delays whole and easy quick checkout.

Link to comment
Share on other sites

  • 7 months later...

The quicker way I found was to force a value of "N/A" on the state

content.checkout.confirm

         <div class="small-12 large-8 columns"><label for="delivery_state" class="show-for-medium-up">{$LANG.address.state}</label></span><input type="text" name="delivery[state]" id="delivery_state" value="No County"></div>

Content.addressbook.php

         <div class="small-12 large-8 columns"><label for="state">{$LANG.address.state}</label><input type="text" name="state" id="state-list" value="No County"></div>

 

It seems like way to much work to make it not actually check what it's not supposed to check.

I had to add the "no County" zone to the UK.

Actually the whole problem can be sorted just by having a default value.

Edited by Lastwolf
Link to comment
Share on other sites

On 27/10/2017 at 5:04 PM, Lastwolf said:

The quicker way I found was to force a value of "N/A" on the state

content.checkout.confirm

         <div class="small-12 large-8 columns"><label for="delivery_state" class="show-for-medium-up">{$LANG.address.state}</label></span><input type="text" name="delivery[state]" id="delivery_state" value="No County"></div>

Content.addressbook.php

         <div class="small-12 large-8 columns"><label for="state">{$LANG.address.state}</label><input type="text" name="state" id="state-list" value="No County"></div>

 

It seems like way to much work to make it not actually check what it's not supposed to check.

I had to add the "no County" zone to the UK.

Actually the whole problem can be sorted just by having a default value.

Hi, yes i've done exactly the same thing a while back, this option seems to work best. Thanks for your update it should help others too.

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...