Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

altoid

♥Ambassador
  • Content count

    1,571
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by altoid


  1. On 2/22/2019 at 11:54 AM, Jack_mcs said:

    You should be able to just upload the seo.class.php file. There is a change to the code in the application_top.php file, which you found, that needs to be made to prevent warnings with php 7 but no other changes are needed.

    OK  thanks..for application_top.php the change was from

     if ((!defined(SEO_ENABLED)) || (SEO_ENABLED == 'true')) {
       include_once('includes/classes/seo.class.php');
       if ( ! (isset($seo_urls) && is_object($seo_urls)) ){
         $seo_urls = new SEO_URL($languages_id);
       }
     }

    to

    if ((!defined('SEO_ENABLED')) || (SEO_ENABLED == 'true')) {
      include_once('includes/classes/seo.class.php');
      if ( isset($seo_urls) && !is_object($seo_urls) ){
        $seo_urls = new SEO_URL($languages_id);
      }
    }

    if I have that correct.

    Otherwise with the  new seo.class.php uploaded should be up to date then.


  2. 12 hours ago, Jack_mcs said:

    A new version has been uploaded. Itjust fixes the problem with the ConnectDB introduced in the last version. If you have applied the fix mentioned in this thread, you don't need the update. But if you want to apply it, just upload the includes/classes/seo.class.php file.

    Jack, I am two versions back on this.  Can I just install the latest or should I install each version incrementally?

    I am currently at Version 2.2d-16

    Thank you


  3. using CE Frozen, running php 7.0.*

    In the error log I see these notices...not a critical issue at this time but for housekeeping purposes would be nice to fix.  Any ideas?

    [09-Nov-2018 07:16:47 America/New_York] PHP Notice:  Undefined index: PriorityMailExpress in /home/UserName/public_html/includes/modules/shipping/usps.php on line 91
    [09-Nov-2018 07:16:47 America/New_York] PHP Notice:  Undefined variable: shipping_method in /home/UserName/public_html/includes/modules/shipping/zones.php on line 161
    [09-Nov-2018 07:16:47 America/New_York] PHP Notice:  Undefined variable: shipping_cost in /home/UserName/public_html/includes/modules/shipping/zones.php on line 162
    [09-Nov-2018 07:16:47 America/New_York] PHP Notice:  Undefined offset: 0 in /home/UserName/public_html/includes/modules/shipping/usps.php on line 428
    [09-Nov-2018 07:16:47 America/New_York] PHP Notice:  Undefined offset: 1 in /home/UserName/public_html/includes/modules/shipping/usps.php on line 428
    [09-Nov-2018 07:16:47 America/New_York] PHP Notice:  Undefined offset: 2 in /home/UserName/public_html/includes/modules/shipping/usps.php on line 428
    [09-Nov-2018 07:16:47 America/New_York] PHP Notice:  Undefined offset: 3 in /home/UserName/public_html/includes/modules/shipping/usps.php on line 428
    [09-Nov-2018 07:16:47 America/New_York] PHP Notice:  Undefined offset: 4 in /home/UserName/public_html/includes/modules/shipping/usps.php on line 428
    [09-Nov-2018 07:16:47 America/New_York] PHP Notice:  Undefined offset: 5 in /home/UserName/public_html/includes/modules/shipping/usps.php on line 428
    [09-Nov-2018 07:16:47 America/New_York] PHP Notice:  Undefined offset: 6 in /home/UserName/public_html/includes/modules/shipping/usps.php on line 428
    [09-Nov-2018 07:16:47 America/New_York] PHP Notice:  Undefined offset: 7 in /home/UserName/public_html/includes/modules/shipping/usps.php on line 428
    [09-Nov-2018 07:16:47 America/New_York] PHP Notice:  Undefined offset: 8 in /home/UserName/public_html/includes/modules/shipping/usps.php on line 428


  4. @raiwa Just an FYI.  This evening using Chrome, when going to a product to edit I was getting "unable to load URL" or something like that pop up window.  In the edit product page the attribute manager would not show. Access to stock was OK. I just could not work with attributes on this page.

    No errors noted in the log.

    I then uploaded the new update you provided today, and still got the same message and result.

    I switched to Firefox and everything worked OK. 

    So back in Chrome I cleared the cache in Chrome, and upon restart of that browser and going to edit a product, all worked..meaning attribute manager appeared again.

    I'm not sure what the cause of that was, the only thing I was working on earlier this afternoon was adding attributes and I saved a new template I created in AM and was loading it onto a couple other products.  Which all worked, then I shut down and later upon attempting to pick up where I left off the above happened.

    So anyway, just an FYI and mentioning for documentation in the event someone else has this happen.

    Thx..SK

     


  5. On 10/20/2018 at 3:39 PM, BrockleyJohn said:

    Actually, now that you/they bring it up, I've a feeling that Chemo's class doesn't close the connection (while of course the core db functions do that via application_bottom). So you have a double saving - one connection instead of two and nothing left hanging around after the page is built.

    @BrockleyJohn couple of days now and there's not been any max_user_connections warnings after modifying the code you provided. I'm going to watch the error logs further to see what happens.


  6. 20 minutes ago, BrockleyJohn said:

    @altoid you can reduce the number of connections required with a simple edit, in the file seo.class.php, in the database handling class at the top, edit the function ConnectDB so that it is simply:

    
    function ConnectDB(){
    	global $db_link;
    	$this->link_id = $db_link;
    }

    This makes the class reuse the connection that you already made with tep_db_connect, so each page request only needs a single connection.

    Thx John. Will work on this upon return to workstation. Question, does this have anything to do with what my host asked of me...which is "does you code close it's database connection when it completes it's action"..or whatever. I am clueless on this topic?


  7. 2 minutes ago, Jack_mcs said:

    @altoidThat is probably a server issue. It can be caused by this addon if you have a very large number of products, the cache set in the settings and your site is busy. But it is usually a server issue.

    The problem is that the server has a setting for the number of calls allowed for the database in a certain period. When that limit is reached, you see that error. Once the connections fall back down, the page will then load. You can ask your host if they will increase the max user connections limit. But even if they do, it just allows for more connections and once that new limit is reached the same error will occur.

    If you have View Counter installed, check for data skimmers since they can cause the connections to increase dramatically and that increases the likelihood of this error.

    thanks Jack.  I did contact my host and they said since I'm on a shared plan they can't do anything on the setting.  This AM I manually blocked the IP for a China source.

    I may try the view counter to help root these out.  Is it CE and PHP 7 good to go?

    Thx


  8. Hi Jack...I am getting this type warning in my error log:

    [10-Oct-2018 02:37:26 America/New_York] PHP Warning:  mysqli_connect(): (HY000/1203): User barkav5_osc1 already has more than 'max_user_connections' active connections in /home/UserName/public_html/includes/classes/seo.class.php on line 86

    Here's what I see about in that location:

            function ConnectDB(){
    			    $this->link_id = mysqli_connect($this->host, $this->user, $this->pass, $this->db);
    	    if (!$this->link_id) {
        die('Connect Error (' . mysqli_connect_errno() . ') '
    		    . mysqli_connect_error());

    Any ideas? Thx


  9. 3 hours ago, raiwa said:

    @altoid,

    Steve, sorry I forgot this detail:

    Sort order support and configuration entry is only added if the sort order column is detected on module installation.

    As you added the sort order at a later point, you need to uninstall and reinstall the product_info/QTPro options module.

    Then you will see the Configuration entry "Use Option/Attribute Sort Order" below " Show default "Please Select" option"

    @raiwa  Thank you for the explanation.  I uninstalled and reinstalled..set up some values and they are all in order now. 👍


  10. On 10/13/2018 at 4:15 AM, raiwa said:

    Hello Steve @altoid,

    I just checked again and on my test/develop store the sort order in the drop down menu corresponds to the sort order etablished in admin attributes manager.

    Do you have in your product info qtpro attributes module this entry: Use Option/Attribute Sort Order

    and set it to "true"

    If not you may need to update to the latest version.

    The other solution would be to add "desc" behind the sort order in the pad_base queries:

    
            // product options sort order support
            if ( defined('MODULE_CONTENT_PRODUCT_INFO_QTPRO_OPTIONS_USE_OPT_ATTR_SORT_ORDER') && MODULE_CONTENT_PRODUCT_INFO_QTPRO_OPTIONS_USE_OPT_ATTR_SORT_ORDER == 'True' ) {
              $products_attributes_sort = ' order by pa.products_options_sort_order desc';
            } else {
              $products_attributes_sort = '';
            }

    this inverts the sort order.

    Hello, I believe I have the latest version of QT Pro..

    oscom-qtpro-bs-e317m-0xjSb

    for product info modules I have 

    cm_pi_qtpro_options

    cm_pi_qtpro_table

    My options settings are:

    image.png.3b117f3edefb13593def157d2a648906.png

    I can add the descending parameter and report back.


  11. @raiwa I came up with plan B, a work around that takes care of what I want to do.  In the attribute manager I enter the attributes in reverse order from what I want the drop down to show.  It works and the table remains as I want it to as well.

    image.thumb.png.0082575ac10ad0e372be2dcd0f6edff6.png


  12. 5 hours ago, raiwa said:

    Supposed the drop down menu sort order is correct, it seems the sort order support for the table module is incorrect.

    Please try this chang ein includes/modules/content/product_info/cm_pi_qtpro_table.php:

    find:

    
          // get the option names
          $products_options_name_query = tep_db_query("SELECT distinct popt.products_options_id, popt.products_options_name 
                                                       FROM products_options popt, products_attributes patrib 
                                                       WHERE patrib.products_id='" . (int)$_GET['products_id'] . "' 
                                                       AND patrib.options_id = popt.products_options_id 
                                                       AND popt.products_options_track_stock = '1' 
                                                       AND popt.language_id = '" . (int)$languages_id . "' 
                                                       ORDER BY popt.products_options_id");			
        
          // build array of attributes price delta
          $attributes_price = array();
          $products_attributes_query = tep_db_query("SELECT pa.options_id, pa.options_values_id, pa.options_values_price, pa.price_prefix 
                                                     FROM products_attributes pa 
                                                     WHERE pa.products_id = '" . (int)$_GET['products_id'] . "'"); 
              $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from products_attributes pa, products_options_values pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'" . $products_attributes_sort);
          while ($products_attributes_values = tep_db_fetch_array($products_attributes_query)) {
            $option_price = $products_attributes_values['options_values_price'];
            if ($products_attributes_values['price_prefix'] == "-") $option_price= -1*$option_price;
              $attributes_price[$products_attributes_values['options_id']][$products_attributes_values['options_values_id']] = $option_price;
          }									   

    change to:

    
          // product options sort order support
          if ( defined('MODULE_CONTENT_PRODUCT_INFO_QTPRO_OPTIONS_USE_OPT_ATTR_SORT_ORDER') && MODULE_CONTENT_PRODUCT_INFO_QTPRO_OPTIONS_USE_OPT_ATTR_SORT_ORDER == 'True' ) {
            $products_options_sort = 'popt.products_options_sort_order';
          } else {
            $products_options_sort = 'popt.products_options_name';
          }
          // get the option names
          $products_options_name_query = tep_db_query("SELECT distinct popt.products_options_id, popt.products_options_name 
                                                       FROM products_options popt, products_attributes patrib 
                                                       WHERE patrib.products_id='" . (int)$_GET['products_id'] . "' 
                                                       AND patrib.options_id = popt.products_options_id 
                                                       AND popt.products_options_track_stock = '1' 
                                                       AND popt.language_id = '" . (int)$languages_id . "' 
                                                       ORDER BY " . $products_options_sort);			
        
          // build array of attributes price delta
          $attributes_price = array();
          // product options sort order support
          if ( defined('MODULE_CONTENT_PRODUCT_INFO_QTPRO_OPTIONS_USE_OPT_ATTR_SORT_ORDER') && MODULE_CONTENT_PRODUCT_INFO_QTPRO_OPTIONS_USE_OPT_ATTR_SORT_ORDER == 'True' ) {
            $products_attributes_sort = ' order by pa.products_options_sort_order';
          } else {
            $products_attributes_sort = '';
          }
    
          $products_attributes_query = tep_db_query("SELECT pa.options_id, pa.options_values_id, pa.options_values_price, pa.price_prefix 
                                                     FROM products_attributes pa 
                                                     WHERE pa.products_id = '" . (int)$_GET['products_id'] . "'"); 
              $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from products_attributes pa, products_options_values pov where pa.products_id = '" . (int)$_GET['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'" . $products_attributes_sort);
          while ($products_attributes_values = tep_db_fetch_array($products_attributes_query)) {
            $option_price = $products_attributes_values['options_values_price'];
            if ($products_attributes_values['price_prefix'] == "-") $option_price= -1*$option_price;
              $attributes_price[$products_attributes_values['options_id']][$products_attributes_values['options_values_id']] = $option_price;
          }									   

     

    that's yielding this error:

    [12-Oct-2018 14:53:25 America/New_York] PHP Parse error:  syntax error, unexpected '$attributes_price' (T_VARIABLE) in /home/Username/public_html/includes/modules/content/product_info/cm_pi_qtpro_table.php on line 80
    

    but I want to note, the my table looks fine to me, the products are showing ascending properly from smallest to largest.

    it's the drop down that reverses the order (from largest to smallest) that I want to change to match the table.

    Thx


  13. 5 hours ago, raiwa said:

    Hello Steve @altoid,

    Please check if you have activated sort order support in the ajax attribute manager config class:

    
             $this->add('AM_USE_SORT_ORDER' , false);

    Then you can controle the sort order in ajax attribute manager moving the options/attributes with the arrows on the right.

    This works without additional installations, but you have to do it with ajax attribute manager. In the standard products_attributes.php page, sort order control is only available with the additional sort order add-on.

    Sort order support is already included in the pad_base class.

    In the product info qtpro products attribute content module, you have to switch on the option: "Sort Order"

     

    Hello...I changed to

       /**
             * Options Sort Order
             */
             $this->add('AM_USE_SORT_ORDER' , true);

    and I see in admin how I can move the values up and down.

    What I can't figure out is to get the attributes drop down to sort like the table as follows:

    image.thumb.png.2ead4d324845bf6023be3d9de39b786f.png

    For reference, here is a product I did with just QT Pro before I added AJAX AM:

    image.thumb.png.bd4314be2ad9d1ad70ba2b0fa04804f9.png

     

    Is there something I have to change in the pad_base class file? Thx


  14. I have QT Pro installed with the Ajax Attribute Manager.  As far as adding attributes, all's good. But in the product info page the option drop down is in reverse order of what I'd like it to be.  The QT Pro Currently On Stock table is ordered as I want it.

    So looking at the sort order add on, it is so far out of date I am hesitant to mix that in with my CE shop running a PHP 7.1* version..  I was thinking about modifying a SQL statement in the padbase file with an order by to perhaps achieve to sorting I want.

    Thoughts?

     


  15. On 9/25/2018 at 11:56 AM, Jack_mcs said:

    Those are due to the field not being declared for the array before it is used. The fix is to declare the field before it is used. But, at a quick glance, that doesn't appear to be a quick fix. For now, I suggest changing the error_reporting line in includes/application_top.php to the following:

    
      error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_DEPRECATED);
      ini_set('display_errors','0'); 

     

    Hi Jack, for clarification,  I am not having problems with SEO URLs working shopside.  The URLs are generating as they should.

    I am only letting you know what showed up in the error log as an FYI.

    I use php.ini for my settings rather than change application_top.php.  I've been considering disabling notices and may eventually do so as they are not critical at this point.

    But if I understand how this works, eventually a notice could turn into a warning with a future php release.  Then an even later release the warning could lead to a fatal error. So just long term thinking here is all.

    Thanks  SK


  16. 1 hour ago, Rosyweb said:

    I have re-installed the OSCommerce version v2.3.4.1 CE   and re-downloaded the QTPro 2.3.4.1 CE Frozen package and re-done the install again for this.

     

    So I've resolved the back end issues with the language files, its picking those up correctly now.   Everything seems to be working as it should - back end (in admin).

    BUT - the product_info.php page is still not rendering correctly.   Yes Raiwa, it is the header showing with the main content blank.  

    Here's my link.  This is just a test site. 

    https://www.rosweb.co.uk/alpine_mobileEdge/product_info.php?products_id=28

    
    code stops at line 76 
    <div class="row is-product">

    I have uploaded all the content modules.  Checked and checked again.  I have not modified product_info.php

    Any ideas?

    And installed and set up the appropriate product info modules in admin?


  17. 15 minutes ago, Rosyweb said:

    Thank you for that reply. That's the one I've been using - but within that download there are 2 versions to choose from.

    2.3.4.1. CE Frozen version

    and

    2.3.4.(1) Edge version

     

    I've tried both and neither seem to render properly.  

    I think its supposed to be the   2.3.4.1. CE Frozen version I should use, as I have OSCommerce version v2.3.4.1 CE  installed.   So both have CE in their names. 

    Trying to get that to work.  The first problem is on the public - product view page.  Product_info.php    is rendered blank.  Looking at the source code, is there up till line 76

    
      <div class="row is-product">

       then nothing after that. 

     

    In the admin side, looking at the modules - they're not linking to their language file properly.  Have checked this over and over to make sure its in the right location - it is.  Not sure why not linking to it??   

    But that is the least of my worries - not rendering on the public - product_info.php  page is the main thing.   

    ??  Any ideas.  I have done the install about 3 times now to make sure I'm doing it right. 

     

     

     

     

     

    Hello...I am using the 2.3.4.1 CE version about 4 commits behind what is in the repo that this time.

    For QT Pro..from the most recent update I am using the 2.3.4.1. CE Frozen file package.

    By and large I am a paint by numbers coder so the inner secrets of coding lore are beyond my calling.

    However, for the product_info issue since this is a modular thing, if it was was me I'd start looking for something in this area ...

    \includes\modules\content\product_info and the associate language files.

    and how/where they are loaded and activated.

    That's just a guess though.

     


  18. Jack, according to the error log so far so good for the undefined constant fix.

    Here are the other php notices I see now in the log.

    PHP Notice:  Undefined index: path in /home/barkav5/public_html/includes/classes/seo.class.php on line 2605

                    if (strpos($this->attributes['SEO_REDIRECT']['URI_PARSED']['path'], '.html') !== FALSE) {
                        $u1 = $this->attributes['SEO_REDIRECT']['URI_PARSED']['path'];

    PHP Notice:  Undefined index: path in /home/barkav5/public_html/includes/classes/seo.class.php on line 2642

                    if (strpos($this->attributes['SEO_REDIRECT']['URI_PARSED']['path'], '.html') !== FALSE) {
                        $u1 = $this->attributes['SEO_REDIRECT']['URI_PARSED']['path'];
                        
    PHP Notice:  Undefined index: path in /home/barkav5/public_html/includes/classes/seo.class.php on line 2713

                    if (strpos($this->attributes['SEO_REDIRECT']['URI_PARSED']['path'], '.html') !== FALSE) {
                        $u1 = $this->attributes['SEO_REDIRECT']['URI_PARSED']['path'];
                        
    PHP Notice:  Undefined index: path in /home/barkav5/public_html/includes/classes/seo.class.php on line 2743

                                                                   else if (($pStart = strpos($this->uri_parsed['path'], "-c-")) !== FALSE) {

     

×