abantecart / abantecart-src

AbanteCart is a free PHP based eCommerce solution for merchants to provide ability creating online business and sell products online quick and efficient. AbanteCart application is built and supported by experienced enthusiasts that are passionate about their work and contribution to rapidly evolving eCommerce industry. AbanteCart is more than just a shopping cart, it is rapidly growing eCommerce platform
www.abantecart.com
Open Software License 3.0
142 stars 161 forks source link

Cannot load any shipping extension on Abantecart (localhost - XAMPP) #1594

Closed yiedpozi closed 1 year ago

yiedpozi commented 1 year ago

Describe the bug

After performing a fresh installation of Abantecart version 1.3.3, I tried to add a product on the storefront. However, upon being redirected to the cart page, I received the following error message: undefined

image

Upon checking the Network tab in my Chrome browser, got 400 HTTP error on index.php?rt=r/checkout/cart/change_zone_get_shipping_methods. The response is as follows:

{
    "error_title": "Application Error!",
    "error_text": "Please check error log for more information",
    "error_code": 400
}

This is the error log message from the system/logs/error.txt file.

2023-07-07 9:29:12 - load error:  AbanteCart core v.1.3.3 Error: Could not load model extension/default_flat_rate_shipping
Trace: 
#0 C:\xampp\htdocs\abantecart\core\engine\controller.php:332
#1 C:\xampp\htdocs\abantecart\storefront\controller\responses\checkout\cart.php:121
#2 C:\xampp\htdocs\abantecart\core\engine\dispatcher.php:306
#3 C:\xampp\htdocs\abantecart\core\engine\response.php:87
#4 C:\xampp\htdocs\abantecart\core\engine\router.php:223
#5 C:\xampp\htdocs\abantecart\core\engine\router.php:86
#6 C:\xampp\htdocs\abantecart\index.php:97
 in <b>C:\xampp\htdocs\abantecart\core\engine\loader.php</b> on line <b>122</b>

I also tried to disable the flat rate shipping and use another shipping method, but I encountered the same error.

Steps to Reproduce

  1. Install Abantecart version 1.3.3 on XAMPP.
  2. Add any product, then navigate to the cart page.
  3. You will see an error message popping up on your cart page as per above screenshot.

Expected Behaviour

After adding a product to the cart, we should be able to see the item and select a shipping method on the cart page.

Environment

BasaraABC commented 1 year ago

Hello. Make sure the URL you visit and Store URl are same in your settings https://abantecart.atlassian.net/wiki/spaces/AD/pages/5832828/Store+URLs+SSL

yiedpozi commented 1 year ago

Store URL set in the system settings:

image

Cart page that I visited: http://localhost/abantecart/index.php?rt=checkout/cart

BasaraABC commented 1 year ago

Please try to set both the Store url and Secure url and enable HTTPS for both. For localhost accept browser warning to visit site.

yiedpozi commented 1 year ago

Still returns same error message on https://localhost/abantecart/index.php?rt=checkout/cart after updating both Store URL and Secure URL and enable HTTPS for both settings. Also tried on incognito, same results.

abolabo commented 1 year ago

_Could not load model extension/default_flat_rateshipping @yiedpozi is this file presents on hard drive? i mean public_html/extensions/default_flat_rate_shipping/storefront/model/extension/default_flat_rate_shipping.php

yiedpozi commented 1 year ago

Yup, the file exists and accessible.

BasaraABC commented 1 year ago

@yiedpozi the file permissions can be incorrect and your local server cannot access it

yiedpozi commented 1 year ago

Nope, file permissions is okay.

BasaraABC commented 1 year ago

The issue can be OS-related (if you have Windows) you can try to use a docker for localhost https://hub.docker.com/r/abantecart/abantecart https://abantecart.atlassian.net/wiki/spaces/AD/pages/1118339077/Docker+Installation

yiedpozi commented 1 year ago

Issue solved after using Docker on my OS (Windows), as recommended by @BasaraABC. Thanks ya.