Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Guest Checkout bypass province - uses "Please select" as an option (BUG_  (Read 2920 times)

Offline MoeDawood15

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Hi

Hope all is well

I may have picked up a small bug on the Guest checkout with the other abantecart template (old one)

On guest checkout it allows me to checkout without selecting a Region/State and this causes issues when calculating tax

Please advise if there is a fix for this

Please see attached

Kind Regards

MoeDawood15

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5966
  • Karma: +284/-2
    • View Profile
Hello.
What is your AbanteCart version and theme?

Offline MoeDawood15

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Hi

I have v1.3.4

Default template enabled same as the demo site

Fast checkout is disabled

Steps to Reproduce

Add Item to cart
Click on checkout
Select guest checkout
Fill in details
Leave state/region as is
Click continue

I have replicated on the demo site

Offline MoeDawood15

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Hi

Any feedback here ? Is there a fix currently ?

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2066
  • Karma: +326/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
to solve just open file public_html/storefront/controller/pages/checkout/guest_step_1.php
find method _validate ( line 632)
You need to replace
Code: [Select]
        if ($data['country_id'] == 'FALSE') {
            $this->error['country'] = $this->language->get('error_country');
        }

        if ($data['zone_id'] == 'FALSE') {
            $this->error['zone'] = $this->language->get('error_zone');
        }

with this
Code: [Select]
       if (!$data['country_id'] || $data['country_id'] == 'FALSE') {
            $this->error['country'] = $this->language->get('error_country');
        }

        if (!$data['zone_id'] || $data['zone_id'] == 'FALSE') {
            $this->error['zone'] = $this->language->get('error_zone');
        }
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod