Page 50 of 224 FirstFirst ... 40484950515260100150 ... LastLast
Results 491 to 500 of 2240
  1. #491
    Join Date
    Oct 2004
    Location
    Surrey, BC, Canada
    Posts
    1,881
    Plugin Contributions
    2

    bug Re: MultiSite Module Support Thread

    Hello there,
    I would advise that no one take the changes that I posted in consideration yet. There are still some problems with them. There are quite a few queries that return double products because it takes them from the products_to_categories db table as well. It is quite frustrating but I'm trusting in Him who is all wise to guide me and show me how to fix this.
    If anyone has some tips or wants to join me in debugging this, you're most than welcome.

    God bless you,
    Iasmin

  2. #492
    Join Date
    Oct 2004
    Location
    Surrey, BC, Canada
    Posts
    1,881
    Plugin Contributions
    2

    Default Re: MultiSite Module Support Thread

    Quote Originally Posted by HiPCTech View Post
    There are quite a few queries that return double products because it takes them from the products_to_categories db table as well.
    The query returns double products when it finds more then 1 of the same product_id in the products_to_categories db table. I'll have to leave this until Sunday but I'd greatly appreciate any help. I know that God will help us solve this.

    God bless you all and thank you.
    Iasmin

  3. #493
    Join Date
    Mar 2006
    Posts
    283
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Anyone running an upsell or cross sell mod with multisite?

    Thanks

  4. #494
    Join Date
    Oct 2004
    Location
    Surrey, BC, Canada
    Posts
    1,881
    Plugin Contributions
    2

    Idea or Suggestion Re: MultiSite Module Support Thread

    Quote Originally Posted by HiPCTech View Post
    The query returns double products when it finds more then 1 of the same product_id in the products_to_categories db table. I'll have to leave this until Sunday but I'd greatly appreciate any help. I know that God will help us solve this.
    Hello everyone!
    I've been working on this and the good Lord has guided me to the solution. I've tested it on a few pages and it works but it might still need some testing.
    Here is the code that replaced lines 90-95.
    PHP Code:
    /* Change added by Iasmin Balaj on July 21, 2008. iasminb###################### */
                    
    if($str_pos_p2c===false && $str_pos_desc===false)
                    {
                        
    $sql substr($sql,0,$add_pos).
                                
    " INNER JOIN (".TABLE_CATEGORIES_DESCRIPTION." cd, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c)
                                  ON (p2c.categories_id = cd.categories_id
                                AND p.products_id = p2c.products_id
                                  AND cd.language_id="
    .$_SESSION['languages_id']."
                                  AND cd.categories_description LIKE '%-"
    .SITE_NAME."-%') ".
                                
    substr($sql,$add_pos);
                        
                    }
                    
    // put the new query in the WHERE statement. Find the categories description for this site, match it to p2c and then to the p_id.
                    
    elseif($str_pos_p2c!==false && $str_pos_desc!==false) {
                        
    $str_pos_where strpos($sql,'where') + 5;
                        
    $sql substr($sql,0,$str_pos_where).
                                
    " \n(cd.language_id=".$_SESSION['languages_id']."
                                  AND cd.categories_description LIKE '%-"
    .SITE_NAME."-%'
                                  AND p2c.categories_id = cd.categories_id
                                AND p.products_id = p2c.products_id)\n "
    .
                                
    substr($sql,$str_pos_where);
                    }
                    
    // put the new query in the WHERE statement IF p2c is declared but CAT_DESC is not.
                    
    elseif($str_pos_p2c!==false) {
                        
    $str_pos_where strpos($sql,'where');
                        
    $sql substr($sql,0,$str_pos_where).
                                
    ', '.TABLE_CATEGORIES_DESCRIPTION.' cd '.
                                
    substr($sql,$str_pos_where);
                        
    $str_pos_where strpos($sql,'where') + 5;
                        
    $sql substr($sql,0,$str_pos_where).
                                
    ' (p2c.categories_id = cd.categories_id AND p.products_id = p2c.products_id AND cd.language_id=1 AND cd.categories_description LIKE \'%'.SITE_NAME.'%\') AND '.
                                
    substr($sql,$str_pos_where);
                    } 
                    
    // 
                    
    else {
                        
    $sql substr($sql,0,$add_pos).
                                
    " INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
                                  ON (p.master_categories_id = cd.categories_id
                                  AND cd.language_id="
    .$_SESSION['languages_id']."
                                  AND cd.categories_description LIKE '%-"
    .SITE_NAME."-%') ".
                                
    substr($sql,$add_pos);
                        
    $str_pos_where strpos($sql,'where') + 5;
                        
    $sql substr($sql,0,$str_pos_where).
                                
    " \n(p.products_id = p2c.products_id
                                    AND p.master_categories_id = p2c.categories_id)\n "
    .
                                
    substr($sql,$str_pos_where);
                    } 
    I hope that this helps and please let me know if there are any errors.
    God bless you,
    Iasmin

  5. #495
    Join Date
    Jul 2008
    Posts
    27
    Plugin Contributions
    0

    red flag Re: MultiSite Module Support Thread

    Hi there, I'm having a problem with installing this mod to a site. The problem appears in includes/modules/sideboxes/featured.php. According to the instructions, I am supposed to find Line 25 and replace this:
    PHP Code:
    $random_featured_product zen_random_select($random_featured_products_query); 
    with this:

    PHP Code:
     $random_featured_product zen_random_select(cat_filter($random_featured_products_query)); 
    However, this is how my file looks for lines 27-29:

    PHP Code:
        // randomly select ONE featured product from the list retrieved:
        //$random_featured_product = zen_random_select($random_featured_products_query);
        
    $random_featured_product $db->ExecuteRandomMulti($random_featured_products_queryMAX_RANDOM_SELECT_FEATURED_PRODUCTS); 
    As you can see, the line I am supposed to edit is commented out. I do not believe I have installed any mods that would have edited this file but I do need assistance in what I should do next. Got any ideas? I am using Zen Cart 1.3.8a.

    Thanks,
    PAE2008
    Last edited by PAE2008; 29 Jul 2008 at 01:31 PM.

  6. #496
    Join Date
    Jul 2008
    Posts
    27
    Plugin Contributions
    0

    red flag Re: MultiSite Module Support Thread

    It appear to also happen at includes/modules/sideboxes/specials.php

    PHP Code:
    Line 34:
        
    $random_specials_sidebox_product zen_random_select($random_specials_sidebox_product_query);
    Replace by:
        
    $random_specials_sidebox_product zen_random_select(cat_filter($random_specials_sidebox_product_query)); 
    And this is what I have:

    PHP Code:
    //    $random_specials_sidebox_product = zen_random_select($random_specials_sidebox_product_query);
        
    $random_specials_sidebox_product $db->ExecuteRandomMulti($random_specials_sidebox_product_queryMAX_RANDOM_SELECT_SPECIALS); 
    I'm beginning to think that there has been some changes in the Zen Cart code that have not been changed here yet... I would really like to use this mod so any suggestions would be helpful.

  7. #497
    Join Date
    Jul 2008
    Posts
    27
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Quote Originally Posted by PAE2008 View Post
    It appear to also happen at includes/modules/sideboxes/specials.php

    PHP Code:
    Line 34:
        
    $random_specials_sidebox_product zen_random_select($random_specials_sidebox_product_query);
    Replace by:
        
    $random_specials_sidebox_product zen_random_select(cat_filter($random_specials_sidebox_product_query)); 
    And this is what I have:

    PHP Code:
    //    $random_specials_sidebox_product = zen_random_select($random_specials_sidebox_product_query);
        
    $random_specials_sidebox_product $db->ExecuteRandomMulti($random_specials_sidebox_product_queryMAX_RANDOM_SELECT_SPECIALS); 
    I'm beginning to think that there has been some changes in the Zen Cart code that have not been changed here yet... I would really like to use this mod so any suggestions would be helpful.
    Ha! I might be on to something... To properly update these files, would I just add cat_filter after ExecuteRandomMulti(?

    For example (includes/modules/sideboxes/specials.php):
    PHP Code:
    $random_specials_sidebox_product $db->ExecuteRandomMulti(cat_filter($random_specials_sidebox_product_query), MAX_RANDOM_SELECT_SPECIALS); 
    If someone could confirm this, it would be very helpful. Sorry for all of the messages... I did not mean to spam the thread if I did so. I could not find any reference anywhere else in here and my edit time kept expiring as I continued to edit files.

    PAE2008

  8. #498
    Join Date
    Jul 2006
    Location
    Toronto, ON
    Posts
    87
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Quote Originally Posted by PAE2008 View Post
    Ha! I might be on to something... To properly update these files, would I just add cat_filter after ExecuteRandomMulti(?

    For example (includes/modules/sideboxes/specials.php):
    PHP Code:
    $random_specials_sidebox_product $db->ExecuteRandomMulti(cat_filter($random_specials_sidebox_product_query), MAX_RANDOM_SELECT_SPECIALS); 
    If someone could confirm this, it would be very helpful. Sorry for all of the messages... I did not mean to spam the thread if I did so. I could not find any reference anywhere else in here and my edit time kept expiring as I continued to edit files.

    PAE2008
    I haven't looked into these specific files since you've posted, but I've found the adding the (cat_filter......) has worked great for additional features that weren't included in the original mod. It definately doesn't hurt to try. It probably will work. Just remember what files you changed though, just in case it doesn't work.

    Blessings,

    Jaret

  9. #499
    Join Date
    Jul 2006
    Location
    Toronto, ON
    Posts
    87
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Quote Originally Posted by PAE2008 View Post
    Ha! I might be on to something... To properly update these files, would I just add cat_filter after ExecuteRandomMulti(?

    For example (includes/modules/sideboxes/specials.php):
    PHP Code:
    $random_specials_sidebox_product $db->ExecuteRandomMulti(cat_filter($random_specials_sidebox_product_query), MAX_RANDOM_SELECT_SPECIALS); 
    PAE2008
    I didn't notice this at first, but I wouldn't close the bracket after $random_specials_sidebox_product_query, but rather following MAX_RANDOM_SELECT_SPECIALS)

    PHP Code:
    $random_specials_sidebox_product $db->ExecuteRandomMulti(cat_filter($random_specials_sidebox_product_queryMAX_RANDOM_SELECT_SPECIALS)); 

  10. #500
    Join Date
    Mar 2006
    Posts
    283
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Just want to thank those who helped me in this thread. I now have 12 stores running on one DB. All different domains, IPs. Its great. Thanks again..

 

 

Similar Threads

  1. v154 WorldPay Module version 3.0 - Support thread
    By countrycharm in forum Addon Payment Modules
    Replies: 115
    Last Post: 20 Jul 2021, 04:00 PM
  2. Bambora/Beanstream Payment Module Support Thread
    By swguy in forum Addon Payment Modules
    Replies: 127
    Last Post: 26 Mar 2021, 04:13 PM
  3. WorldPay Module version 2.0 - Support thread
    By philip_clarke in forum Addon Payment Modules
    Replies: 729
    Last Post: 4 Nov 2017, 08:23 AM
  4. PC Configurator Module [Support Thread]
    By lebrand2006 in forum All Other Contributions/Addons
    Replies: 254
    Last Post: 22 Aug 2012, 03:52 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR