Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Smoky Barnable

♥Ambassador
  • Posts

    184
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by Smoky Barnable

  1. On 5/12/2022 at 11:28 PM, Smoky Barnable said:

    Anyone get this cool add-on to work in PHP8?  I almost have it working but I get the following error upon initial page load.

     

    "DataTables warning: table id=dataTable - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1"

    Finally got this working with PHP 8. The issue was the JSON response was being corrupted with PHP undefined array key warnings.

  2. 9 hours ago, Mort-lemur said:

    @Jack_mcs I think for the time being I will get round this by the following:

    1) Create (but don't upload) datafeed

    2) From google merchant center add the path to where the file is located eg: https://wwwmysite.co.uk/feeds/name_of_file.csv

    Set for google to retrieve the file daily

    Can you see any problems with this?

    Many Thanks

    Yes, as I previously mentioned in this thread creating a daily cron job and having the file fetched daily has been working great for me. No need to upload via FTP.

  3. For those who still want to display first class package rates, the following changes are needed as of today.

    Change:

    if( preg_match( '#First\-Class#', $request_type ) && $this->usps_weight < 16/16 )

    to:

     if( preg_match( '#USPS Ground AdvantageTM#', $request_type ) && $this->usps_weight < 16/16 )

    Change:

    \'First-ClassTM Package Service\',

    to:

    \'USPS Ground AdvantageTM\',

    And update in configuration_key MODULE_SHIPPING_USPS_TYPES in the configuration table in the database as well.

  4. On 4/28/2023 at 2:02 PM, Jack_mcs said:

    Are you using the latest version here?

    I have the cron working now. The problem was the chdir('../') in googlefeeder.php which moves up one directory wasn't functioning as intended in the shell environment. I replaced with chdir('public_html') in my cron file. Since I use SEO urls the tep_href_link was using the function in the admin directory, which is why the urls were not correct.

  5. Currently working fine in the browser but the cron job results in "Failed to open stream: No such file or directory". The only way I can get the cron job working is by changing chdir('../'); to chdir('public_html/admin'); in googlefeeder.php. This breaks the script however and the product urls are not accurate. Tried changing directory in the cron command itself but no luck. cd /home/xxxx/public_html/admin/ && /usr/local/bin/php googlefeedercron.php

  6. Had a strange occurrence today. Two customers arrived at the checkout confirmation page at the same time. They both had the same product and the same quantity in their carts. One customer submitted their credit card info about 40 seconds before the other customer. Both payments were successful but I did not have the stock to fulfill one of them. I guess I'm going to have to add a stock check on stripe payment process somewhere. I understand the web-hook deducts stock but that wouldn't deduct the stock in the other customers cart if they were on the final payment page entering their credit card info. Oddly enough, both customers were located in the same small city and had the same first name. Checking the map they live about 4 minutes from each other. What are the odds...considering thousands of products? Any statistics geeks out there?

  7. We need access to the old addons now, not "shortly". If you refuse to provide access to this open source content authored by developers who offered this content for free, would you at least consider paid access? It's impossible for forum members to provide support to those in need if we can't reference the files.

  8. I have this working on PHP8 but occasionally see a fatal error in my logs?

    		if (is_countable($uspsQuote) && count($uspsQuote) > 0)  {
            $PackageSize = ($order->delivery['country']['iso_code_2'] == 'US' ? sizeof($uspsQuote['Package']) : sizeof($uspsQuote['Package']['Service']));

    The error is: PHP Fatal error:  Uncaught TypeError: sizeof(): Argument #1 ($value) must be of type Countable|array, null given

     

  9. 15 minutes ago, cigarsforless said:

    was scratching my head trying to figure out why domestic rates are failing but international are still working

     

    thanks so much!

    changed the TM to RM in the usps.php file but still no domestic rates,
    sigh, I really hate the post office devs

     

    I manually changed the configuration_key MODULE_SHIPPING_USPS_TYPES in the configuration table in the database as well. If you already made the changes in usps.php, then removing and installing the module would update the table. Seems to work ok now. Yeah, really tired of the usps api changes over the years.😠

  10. I've got view counter working on my local xampp server with PHP 8 and MySQL 5.5 however when I uploaded to my host I see the database query in view_counter.php returning an empty result set. This query returns data on my xampp server but is empty on my production site:

    select *, TIME_TO_SEC( UNIX_TIMESTAMP( now( ) ) - UNIX_TIMESTAMP( last_date ) ) as time, DATE_FORMAT(last_date, '%a, %D %T') as date_time from view_counter where ip_active=1 and language_id = 1 and isbot = 0 and ( (isadmin <> '/admin/')) order by last_date desc limit 20 offset 0

    I should note that on my test server there is also some warnings "#1292 Incorrect time value". I'm wondering if this might be because my live site is using MySQL 5.7?

  11. I can capture customers ip address during the checkout process when customer pays with PayPal,  but this fails when customer uses stripe. Is there a way to capture the ip during order creation? Trying to capture in web hook or checkout success has failed thus far. If not, I could just capture upon account creation.

  12. 7 hours ago, Jack_mcs said:

    CloudFlare replaces the IP that View Counter sees so it won't work properly. The code works fine but the displayed IP's belong to CloudFlare and so they are useless. There used to be a module CF offered to show the real IP but that no longer works. They have a different way of doing it now but I could never get it to work. CF wanted to run tests to see why but it was a live shop so that wasn't possible.

    They never mentioned that SERVER variable. If that is always available and valid, then you change the following in includes/modules/view_counter.php

    
    $thisIP = $_SERVER['REMOTE_ADDR']; //increase scope
     
     switch (true) {  

    to

    
     $thisIP = $_SERVER['HTTP_CF_CONNECTING_IP']; //increase scope
     
     switch (false) {  
     

     

    It actually was getting most IPv4's ok but for IPv6 this code seems to get both when using CloudFlare.

    if(isset($_SERVER['HTTP_CF_CONNECTING_IP'])){
    $thisIP = $_SERVER['HTTP_CF_CONNECTING_IP'];
    }else{
    $thisIP = $_SERVER['REMOTE_ADDR'];
    }

     

  13. A recent customer contacted me to make sure her payment went through. She was confused because in her account area the saved card page showed an old expiration date. Doesn't this expiration date get updated automatically when customers get a new card with the same account number? Perhaps she must delete this card and checkout with new card? Regardless, her payment was successful using her saved card which had the wrong expiration date.

×
×
  • Create New...