Page 1 of 2 12 LastLast
Results 1 to 10 of 169

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,567
    Plugin Contributions
    74

    Default Re: Cross Sell Advanced [Support Thread]

    If you were previously using a different version of this plugin, the auto installer doesn't remove the old database entries. The logic could be improved so that duplicate DB entry errors are not a problem.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Cross Sell Advanced [Support Thread]

    Maybe I am not reading the code right in the file:
    YOUR_ADMIN\includes\init_includes\init_xsell_config.php

    but if there wasn't an old version or a previous version to clean up, wouldn't this end up deleting the configuration_keys for:
    PRODUCTS_OPTIONS_TYPE_SELECT
    UPLOAD_PREFIX
    TEXT_PREFIX

    I have not tried to install this, but I was peeking at the code and it made me start to wonder about doom and gloom ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Cross Sell Advanced [Support Thread]

    Quote Originally Posted by numinix View Post
    If you were previously using a different version of this plugin, the auto installer doesn't remove the old database entries. The logic could be improved so that duplicate DB entry errors are not a problem.
    If you are seeing this then perhaps you are right.. I'm not seeing the problem for no other reason except that I'm not really a true code monkey.. so perhaps a HINT on what the issue is would be most appreciated..

    Quote Originally Posted by Ajeh View Post
    Maybe I am not reading the code right in the file:
    YOUR_ADMIN\includes\init_includes\init_xsell_config.php

    but if there wasn't an old version or a previous version to clean up, wouldn't this end up deleting the configuration_keys for:
    PRODUCTS_OPTIONS_TYPE_SELECT
    UPLOAD_PREFIX
    TEXT_PREFIX

    I have not tried to install this, but I was peeking at the code and it made me start to wonder about doom and gloom ...
    I'm not sure how this would happen since the delete statements target ONLY the Cross Sell configuration entries and groups.. But again, I'm not seeing the problem for no other reason except that I'm not really a true code monkey.. a hint as to where the issue lies would be appreciated..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Cross Sell Advanced [Support Thread]

    In that file, you check for the configuration_group_id in the configuration_group table then Delete for that value in the configuration table ...

    Code:
            /* Find configuation group ID of Previous Version of Cross Sell */
            $sql = "SELECT configuration_group_id FROM ".TABLE_CONFIGURATION_GROUP." WHERE configuration_group_title='".$xsell_old_menu_title."' LIMIT 1";
            $result = $db->Execute($sql);
            $xsell_old_configuration_id = $result->fields['configuration_group_id'];
    
            /* Remove Previous Version of Cross Sell from the configuration group table */
            $sql = "DELETE FROM ".TABLE_CONFIGURATION_GROUP." WHERE configuration_group_id ='".$xsell_old_configuration_id."'";
            $db->Execute($sql);
    
            /* Remove Previous Version of Cross Sell items from the configuration table */
            $sql = "DELETE FROM ".TABLE_CONFIGURATION." WHERE configuration_group_id ='".$xsell_old_configuration_id."'";
            $db->Execute($sql);
    But if nothing is found on the configuration_group, the value is probably going to be 0 for $xsell_old_configuration_id so you first delete from the configuration_group table where the configuration_group_id is 0 which should probably not cause any harm but is not a good idea ...

    The problem is you then delete in the configuration table for that configuration_group_id and the 0 is the configuration_group_id for these 3 values in the configuration table ...

    So, rather than deleting for what you mean to delete for, you delete important configuration_keys for Zen Cart ...

    This thread better explains the issue:
    http://www.zen-cart.com/showthread.p...ag-not-working

    and post #9 is a nice write up by swguy explaining the specifics of the issue with a possible better approach to this ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Cross Sell Advanced [Support Thread]

    NOTE: you really need to read through that file to find any other similar issues ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Cross Sell Advanced [Support Thread]

    Quote Originally Posted by Ajeh View Post
    NOTE: you really need to read through that file to find any other similar issues ...
    Well if I run the query
    Code:
    SELECT configuration_group_id FROM zen_configuration_group WHERE configuration_group_title = 'Deluxe Cross Sell' LIMIT 1;
    I get zero results. So wouldn't the delete statement be deleting nothing and NOT the 0 configuration group???
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  7. #7
    Join Date
    May 2012
    Posts
    36
    Plugin Contributions
    0

    Default Re: Cross Sell Advanced [Support Thread]

    Quote Originally Posted by DivaVocals View Post
    Well if I run the query
    Code:
    SELECT configuration_group_id FROM zen_configuration_group WHERE configuration_group_title = 'Deluxe Cross Sell' LIMIT 1;
    I get zero results. So wouldn't the delete statement be deleting nothing and NOT the 0 configuration group???
    I see that this is the same thing going on when I asked in the Testimonials manager about those inserts in the uninstall sql. And Ajeh responded that those are 3 stock configs for ZC. After research under certain circumstances it can remove the 3 stock configs. So the 3 inserts plus another for IH was there as a safety when the sql deletes the id for 0.

    After reading, there has to be a "and xxx != 0" as a fallback in case the mod id equates to 0.

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Cross Sell Advanced [Support Thread]

    I would suggest posting your full proposed fix, before contributing it so that it can be checked ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Cross Sell Advanced [Support Thread]

    Not the SAME thing at all.. The Testimonials Manager SQL is just plain old WRONG because it inadvertently sets a configuration group id variable to configuration group '0'. (read my response in that thread -- I DO state the issue and solution)

    The SQL in question for this module DOES NOT do this..
    Quote Originally Posted by grantopt View Post
    I see that this is the same thing going on when I asked in the Testimonials manager about those inserts in the uninstall sql. And Ajeh responded that those are 3 stock configs for ZC. After research under certain circumstances it can remove the 3 stock configs. So the 3 inserts plus another for IH was there as a safety when the sql deletes the id for 0.

    After reading, there has to be a "and xxx != 0" as a fallback in case the mod id equates to 0.
    No fall back required.. simply DO NOT set a variable for configuration group id '0'.. Just don't write SQL scripts which delete ANYTHING from configuration_group '0'
    Last edited by DivaVocals; 11 Apr 2014 at 09:22 PM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  10. #10
    Join Date
    Nov 2013
    Location
    Arizona
    Posts
    33
    Plugin Contributions
    0

    Default Re: Cross Sell Advanced [Support Thread]

    Cant login to my admin after uploading the files (yes I followed instructions and renamed admin folder correctly and renamed the your template folders correctly, etc, etc. Below is the error log file. I have omitted my domain from the path.

    white screen of death...

    WARNING: An Error occurred, please refresh the page and try again.

    error log...

    1062uplicate entry 'MIN_DISPLAY_XSELL' for key 2 :: INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Display Cross-Sell Products Minimum', 'MIN_DISPLAY_XSELL', '1', 'This is the minimum number of configured Cross-Sell products required in order to cause the Cross Sell information to be displayed.<br />Default: 1', '76', 20, NULL, now(), NULL, NULL) in /var/www/vhosts/1/124646/webspace/httpdocs/myprivatedomain/includes/classes/db/mysql/query_factory.php on line 120

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Multi Cross Sell mod [Support thread]
    By gilby in forum All Other Contributions/Addons
    Replies: 475
    Last Post: 11 Apr 2020, 10:44 PM
  2. Ultimate Cross Sell [Support Thread]
    By ultimate_zc in forum All Other Contributions/Addons
    Replies: 239
    Last Post: 17 May 2015, 03:25 AM
  3. Replies: 1
    Last Post: 18 Sep 2013, 11:24 PM
  4. Just another Cross-Sell mod (support thread)
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 702
    Last Post: 3 Nov 2012, 04:30 AM
  5. Cross Sell and Advanced Cross Sell Modules
    By fairway in forum Addon Templates
    Replies: 4
    Last Post: 8 Dec 2009, 08:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg