support

Guest Checkout bypass province - uses "Please select" as an option (BUG_

Started by MoeDawood15, July 04, 2024, 02:20:41 AM

Previous topic - Next topic

MoeDawood15

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

Basara


MoeDawood15

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

MoeDawood15


abolabo

to solve just open file public_html/storefront/controller/pages/checkout/guest_step_1.php
find method _validate ( line 632)
You need to replace
        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

       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

Forum Rules Code of conduct
AbanteCart.com 2010 -