News:

AbanteCart v1.4.3 is released.

Main Menu

Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Heemet

#1
Upgrade / Re: upgrading from V.1.4.1 to V. 1.4.2
December 04, 2025, 04:37:18 PM
Hello,

I am posting in this tread as I am not sure the solution offered works.  I am getting this error as well when trying to upgrade from V.1.4.1 to V.1.4.2:

2025-12-04 21:19:34 - Unknown Error: AbanteCart core v.1.4.1 SQL-ERROR: "array (
'error_text' => 'Can\'t DROP INDEX `abdx_lang_definition_idx`; check that it exists',
'errno' => 1091,
)" in /home/padufnnp/public_html/store/core/lib/package_manager.php on line 832


Here are the indexes I have in abdx_language_definitions:

PRIMARY
ac_lang_definition_idx
abdx_lang_definition_idx

I added the last one to solve the can't drop error, but that did not work.  Is there perhaps another table where I need to add this index so that it can be dropped?

Thanks!
#2
I am attempting to add a sound clip to the description field of a product using the audio HTML tag.  When I save the product information, I get a 403 error.  I assume that my host doesn't like injecting HTML into the database via the admin site.

Using my host database interface, I can add the HTML tag manually.  However, I can't switch over to the AbanteCart admin site to edit a product with an audio tag that I've added manually into the database.

I can see that AbanteCart is encoding HTML tags in the product description field, e.g., <p> gets encoded to remove the "<" and ">".  I'd like to modify the code to do the same for audio tags, but I can't find in the source code where this is happening.

So, in short, does anyone know where AbanteCart encodes "<p>" before being sent to the product database?

Thanks in advance.

Peter
#3
Thanks, Basara.  I modified the default_usps.php file to find out what exactly was happening with the cURL request.  It was properly formatted.  The response I was getting was a 400 bad gateway.

Per your suggestion, I followed up with the hosting provider.  They had recently moved my site to a new server.  I told them that I thought the problem was with the PHP cURL package.  They decided to move my site to another server, and sure enough, the problem went away.

So, the problem turned out to be in the host's cURL package.  It was a tough bug to track down.
#4
Thanks.  The request sent to the USPS API is well formatted.  If I paste it into the address bar on my browser, I get a response with the correct information fro the USPS API.  However, the response being logged in AbanteCart's log is empty.  The problem isn't with customer address, usps settings (location), or store address, I don't believe.  I've verified those.

I think something is going wrong with cURL session, but I'm not terribly familiar with php.
#5
Thanks for the link. 

It appears that the USPS extension did not update when I updated to AbanteCart 1.2.13.  I updated the extension manually, uninstalled it, and then reinstalled it and tried it out in a test shopping cart.  It is still not working.

I added the following to public_html/store/extensions/default_usps/storefront/model/extension/default_usps.php (lines 234-241):

$this->log->write(var_export($xml,true));
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://secure.shippingapis.com/ShippingAPI.dll?'.$request);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
curl_close($curl);
$this->log->write(var_export($result,true));


I'm not getting a response back from the USPS after clicking "Estimate" in the shopping cart.

This is what the log file shows:
2018-09-13 2:47:06 - '<RateV4Request USERID="XXX" PASSWORD="XXX">   <Package ID="1"> <Service>ALL</Service> <ZipOrigination>02138</ZipOrigination> <ZipDestination>02138</ZipDestination> <Pounds>0</Pounds> <Ounces>2.08</Ounces> <Container>VARIABLE</Container> <Size>REGULAR</Size> <Width>11.875</Width> <Length>13.625</Length> <Height>3.375</Height> <Girth>44.1</Girth> <Machinable>true</Machinable>   </Package></RateV4Request>'

2018-09-13 2:47:06 - ''

The default USPS extension worked prior to the upgrade.  Any advice is appreciated.

Thanks!
#6
I guess what I'm saying is that it does not appear that the USPS extension upgraded when I upgraded from AbanteCart 1.2.12 to 1.2.13.  I suspect that is the reason it is no longer working. 

How do I download the entire default_usps folder from GitHub so that I can copy it into CPanel?  Or can I delete the extension from within the store admin site and reinstall it?

Thanks!
#7
The top of default_usps.php installed in my store still says © 2011-2017 Belavier Commerce LLC.  Is that right, or does that indicate that it is not the right version of default_usps.php for v 1.2.13?
#8
It appears that the problem has reappeared.  I have upgraded to AbanteCart v 1.2.13, and the USPS option has disappeared as a shipping option.  I do not see it when estimating shipping in my shopping cart.

I modified the usps extension to log the xml request and response (lines 231-238 of public_html/extensions/default_usps/storefront/model/extension/default_usps.php):
$this->log->write(var_export($xml,true));
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://secure.shippingapis.com/ShippingAPI.dll?' . $request);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
curl_close($curl);
$this->log->write(var_export($result,true));


I checked the log file.  The request is well formed, but the result is blank.

Any idea what happened?
#9
My hosting service suggested that I try to login to the admin site in incognito mode to edit the banners.  I did that, and I was able to modify the banners.

So, I cleared cookies, and sure enough, the problem went away.
#10
Thanks for your suggestions.  I was able to disable ModSecurity, but that didn't help.  There is nothing in the AbanteCart error log.  I'm checking with hosting support.  I will revert with my findings.
#11
Hello,

When clicking on "edit" for an existing text banner in the admin site, I get the following error message in my browser:

"This site can't be reached
The webpage at [site address]/index.php?rt=extension/banner_manager/edit&banner_id=8&s=[admin]&token=[toke] might be temporarily down or it may have moved permanently to a new web address.
ERR_FAILED"

The existing banner appears on my site, but I cannot access it through the admin site.  Is something happening between the admin site and the SQL database?  What should I look for?  There is nothing in the error log.

FYI, I can enable and disable the existing banner, and I can see the "status" field change from "0" to "1" and back again in the "banners" table in the SQL database in CPanel, so I know the admin site is able to communicate with the SQL database.  I just can't edit any of the banners.

Any help would be appreciated.

Thanks,
Peter
#12
Thank you, gentlemen, for your assistance with this.  I successfully applied the fix manually, and it works perfectly now.

:)
#13
Hi Basara,

I inputted the zip code.  Here's the log for the outgoing XML (USERID and PASSWORD redacted):

2017-11-23 22:53:54 - '<RateV4Request USERID="XXXXX" PASSWORD="XXXXX">   <Package ID="1">   <Service>ALL</Service>   <ZipOrigination>19610</ZipOrigination> <ZipDestination>19610</ZipDestination>   <Pounds>1</Pounds>   <Ounces>9.12</Ounces>   <Container>VARIABLE</Container>   <Size>REGULAR</Size>   <Width>11.875</Width>   <Length>13.625</Length> <Height>3.375</Height>   <Girth>44.1</Girth>   <Machinable>true</Machinable>   </Package></RateV4Request>'

Here's the of the XML response from the USPS:

2017-11-23 22:53:55 - '<?xml version="1.0" encoding="UTF-8"?>
<RateV4Response><Package ID="1"><ZipOrigination>19610</ZipOrigination><ZipDestination>19610</ZipDestination><Pounds>1</Pounds><Ounces>9.12</Ounces><Size>REGULAR</Size><Machinable>TRUE</Machinable><Zone>1</Zone><Postage CLASSID="3"><MailService>Priority Mail Express 2-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;</MailService><Rate>23.75</Rate></Postage><Postage CLASSID="2"><MailService>Priority Mail Express 2-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Hold For Pickup</MailService><Rate>23.75</Rate></Postage><Postage CLASSID="1"><MailService>Priority Mail 2-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;</MailService><Rate>7.20</Rate></Postage><Postage CLASSID="17"><MailService>Priority Mail 2-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Medium Flat Rate Box</MailService><Rate>13.60</Rate></Postage><Postage CLASSID="6"><MailService>Media Mail Parcel</MailService><Rate>3.12</Rate></Postage><Postage CLASSID="7"><MailService>Library Mail Parcel</MailService><Rate>2.97</Rate></Postage></Package></RateV4Response>'

The response is correct.  The item costs USD 3.12 to ship via media mail.  However, none of the prices are showing up in the drop down box in the shipping estimator.

Thanks!
#14
Thanks you, abolabo! 

The XML code passed to the USPS's API and visible in the error-log is correct.

I added the following to line 238 of default_usps.php and I logged a response back from the USPS:
$this->log->write(var_export($result,true));

The response is well formed, and the prices are correct, but I'm seeing no estimates for USPS shipping options in the cart estimator.  I have only first class, priority mail, and media mail enabled.

I guess the data back from the USPS isn't getting into the drop-down box?
#15
Thanks for your reply and your continued help.  I disabled Cloudflare and changed the nameservers back to my original host's.  USPS shipping is still not showing up as an option.  I've confirmed that the page is being served by my host and no longer Cloudflare.

When I first view the cart, the form data sent with the POST (request URL "Request URL:.../store/index.php?rt=r/checkout/cart/change_zone_get_shipping_methods") sent by the shipping estimator is "country_id=223&zone_id=3663&postcode=", which makes sense, since no zip code was inputted yet.  The response is "{"default_usps":{"title":"United States Postal Service","quote":[],"sort_order":"0","error":"Missing value for ZipDestination."},"selectbox":""}", which also makes sense.

When I input the zip code in the shipping calculator, the URL request is the same, and the form data includes the zip code.  However, the response (in the browser's console) is blank.

How do I check the XML sent to the USPS's API and the response?

ETA: My workaround for this is to set up weight-based shipping, which I can easily do because all of my items will ship USPS media mail, which is solely a weight-based shipping method.  At this point, I'm trying to get to the bottom of this for the sake of others who might be facing a similar problem.  Thank you!

Forum Rules Code of conduct
AbanteCart.com 2010 -