Page 49 of 224 FirstFirst ... 3947484950515999149 ... LastLast
Results 481 to 490 of 2240
  1. #481
    Join Date
    Jul 2006
    Location
    Toronto, ON
    Posts
    87
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    First thank you cablesimple for leading me in the right direction.

    I currently have
    /httpdocs/includes/modules/pages/customers_authorization/header_php.php

    Set up to send my regular customers back to the public site by using:
    HTML Code:
    if ($_SESSION['customers_authorization'] != '0') {
      zen_redirect('http://store1.salvationarmy.ca' ."?zenid=". zen_session_id());
    
    }
    I've also used similar variations to update various files. The two sites are really begenning to look like one.

    However, I want to follow this idea through more. In the file mentioned above I would like it to send a customer with products in their shopping cart to:
    HTML Code:
    http://store1.salvationarmy.ca/index.php?main_page=shopping_cart
    I'm not sure what sql inquiry I would have to add for this. I've been trying to take fields from the login header, but as of yet to no avail.

    Any ideas?

  2. #482
    Join Date
    May 2007
    Posts
    99
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Hey jvoce,
    If I'm following you, you just want to check and see if they have products in their cart, and if they do then send them to the shopping cart page instead of the homepage.

    this will get you that info:
    Code:
    if (count($_SESSION['cart']->contents) > 0)
    {
        // Products in cart
    }
    else 
    {
        // No products in cart
    }

  3. #483
    Join Date
    Jul 2006
    Location
    Toronto, ON
    Posts
    87
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    As it stands right now my file:
    /httpdocs/includes/modules/pages/customers_authorization/header_php.php

    Reads this:

    HTML Code:
    <?php
    /**
     * Customer Authorization 
     *
     * @package page
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: header_php.php 2974 2006-02-05 04:53:19Z birdbrain $
     */
    
    
    $sql = "SELECT customers_authorization 
            FROM " . TABLE_CUSTOMERS . " 
            WHERE customers_id = :customersID";
    
    $sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
    $check_customer = $db->Execute($sql);
    
    $_SESSION['customers_authorization'] = $check_customer->fields['customers_authorization'];
    
    if ($_SESSION['customers_authorization'] != '1') {
      zen_redirect('http://store1.salvationarmy.ca' ."?zenid=". zen_session_id());
    
    }
    
    if ($_SESSION['customers_authorization'] != '0') {
      zen_redirect('http://store1.salvationarmy.ca' ."?zenid=". zen_session_id());
    
    }
    
    require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE);
    
    if (CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true') $flag_disable_right = true;
    if (CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true') $flag_disable_left = true;
    if (CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true') $flag_disable_footer = true;
    if (CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true') $flag_disable_header = true;
    
    ?>
    I've changed it to the following:
    HTML Code:
    <?php
    /**
     * Customer Authorization 
     *
     * @package page
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: header_php.php 2974 2006-02-05 04:53:19Z birdbrain $
     */
    
    
    $sql = "SELECT customers_authorization 
            FROM " . TABLE_CUSTOMERS . " 
            WHERE customers_id = :customersID";
    
    $sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
    $check_customer = $db->Execute($sql);
    
    $_SESSION['customers_authorization'] = $check_customer->fields['customers_authorization'];
    
    if (count($_SESSION['cart']->contents) > 0) {
    	//Products in cart
    	zen_redirect('http://store1.salvationarmy.ca/index.php?main_page=shopping_cart' ."?zenid=". zen_session_id());
    } else {
    	//No Products in cart
    	zen_redirect('http://store1.salvationarmy.ca' ."?zenid=". zen_session_id());
    }
    
    require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE);
    
    if (CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true') $flag_disable_right = true;
    if (CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true') $flag_disable_left = true;
    if (CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true') $flag_disable_footer = true;
    if (CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true') $flag_disable_header = true;
    
    ?>
    I'm sorry , this is probably really simple, and I'm just not getting it.

  4. #484
    Join Date
    May 2007
    Posts
    99
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    jvoce,
    To be honest, I'm not quite sure what your doing with the customers_authorization code, however your redirection problem should be resolved by replacing your second "?" with a "&"

    from this:
    Code:
    zen_redirect('http://store1.salvationarmy.ca/index.php?main_page=shopping_cart' ."?zenid=". zen_session_id());
    to this:
    Code:
    zen_redirect('http://store1.salvationarmy.ca/index.php?main_page=shopping_cart' ."&zenid=". zen_session_id());

  5. #485
    Join Date
    Jul 2006
    Location
    Toronto, ON
    Posts
    87
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Thanks alot cablesimple!

    It was a long day, and I was really losing my focus. Thank fully I'm at home, and now with it working I can go off and BBQ without any worries.

    Again, much thanks, it is really appreciated.

  6. #486
    Join Date
    Jun 2008
    Posts
    18
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Hi

    I'm have installed this mod but am having a problem with the categories. I am using it on a test server and so my url currently is www.example.com with the main index page being www.example.com/store/index.php.

    I have installed the mod and can see the index page with my template but when I go into the multisite tools and try and assign categories to www.example.com, it tells me it has done it but this is not reflected on the site.

    Any ideas of any basic mistakes I may have made which causes this problem?

  7. #487
    Join Date
    Jun 2008
    Posts
    18
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Ignore me I was just being stupid

  8. #488
    Join Date
    Mar 2006
    Posts
    283
    Plugin Contributions
    0

    Default Multisite and authorizenet

    Anyone have Multisite and Authorizenet working together? I thought that I had it set up right but There does not seem to be any communication to Authorize net. no Errors, my transactions are not showing up in my authorizenet account. Tests dont show any errors. No errors when i deliberately set the API code and key wrong.

    I always just get the zen cart confirmation page and nothing else.

    Any help would be appreciated.

    makenoiz

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

    Idea or Suggestion Re: MultiSite Module Support Thread

    Hello there,
    I am thankful to Jesus Christ for this mod. We at www.amazingdiscoveries.org have just started to use it for many sites and it works quite well now.
    We did come over one problem, and that is with linked products. The cat_filter() function searches for products matching the SITE_NAME in the description where the id of that category is the products master_category_id. If I confused you, don't worry. It will be easy when you'll see the code. The thing is that if I had a category that only had linked products then those products would not be showed in the extra site.
    I had to make a few changes to the function so I'll just submit it and I hope that the author will make the changes for the next release. The changes occurred is where you see the RIGHT JOIN in the SQL.

    Starting on line 34 of the cat_filter.php file:
    PHP Code:
            } elseif($sql == "select products_id from " TABLE_FEATURED " where status= 1 limit 1") {
            
    // Special Query for the categories sideboxe/Featured Products
                
    $sql "SELECT f.products_id FROM " TABLE_FEATURED " f
                INNER JOIN "
    .TABLE_PRODUCTS." p ON (f.products_id=p.products_id)
                INNER JOIN "
    .TABLE_CATEGORIES_DESCRIPTION." cd
                ON (cd.language_id="
    .$_SESSION['languages_id']."
                AND cd.categories_description LIKE '%-"
    .SITE_NAME."-%')
                RIGHT JOIN zc_products_to_categories p2c ON (p2c.categories_id = cd.categories_id AND f.products_id = p2c.products_id)
                WHERE status=1 limit 1"
    ;
            } elseif(
    $sql == "select s.products_id from " TABLE_SPECIALS " s where s.status= 1 limit 1") {
            
    // Special Query for the categories sideboxe/Special Products
                
    $sql "SELECT s.products_id FROM " TABLE_SPECIALS " s
                INNER JOIN "
    .TABLE_PRODUCTS." p ON (s.products_id=p.products_id)
                INNER JOIN "
    .TABLE_CATEGORIES_DESCRIPTION." cd
                ON (cd.language_id="
    .$_SESSION['languages_id']."
                AND cd.categories_description LIKE '%-"
    .SITE_NAME."-%')
                RIGHT JOIN zc_products_to_categories p2c ON (p2c.categories_id = cd.categories_id AND s.products_id = p2c.products_id)
                WHERE status=1 limit 1"
    ;
            } else { 
    // Query with categories but not descriptions
                
    $str_pos_cats strpos($sql_lower,TABLE_CATEGORIES ' c');
                if(
    $str_pos_cats!==false&&$str_pos_cats<$str_pos_where) {
                    
    $add_pos $str_pos_products strlen(TABLE_CATEGORIES ' c');
                    
    $str_pos_coma strpos($sql_lower,',',$add_pos);
                    if(
    $str_pos_coma!==false) {
                        
    $add_pos $str_pos_coma;
                    } 
                    if((
    $str_pos_where!==false)&&(($str_pos_coma===false)||($str_pos_where<$str_pos_coma))) {
                        
    $add_pos $str_pos_where;
                    }
                    
    $sql substr($sql,0,$add_pos).
                        
    " INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
                          ON (c.categories_id = cd.categories_id
                          AND cd.language_id="
    .$_SESSION['languages_id']."
                          AND cd.categories_description LIKE '%-"
    .SITE_NAME."-%') ".
                        
    substr($sql,$add_pos);
                }
            }
            if(
    $fix==1) {
                if(
    preg_match("/^select p2c.categories_id from ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c ".
                       
    "where p.products_id = '[0-9]+' and p.products_status = '1' ".
                       
    "and p.products_id = p2c.products_id limit 1$/",$sql)) {
                    
    $sql str_replace(TABLE_PRODUCTS_TO_CATEGORIES." p2c ",TABLE_PRODUCTS_TO_CATEGORIES." p2c
                        INNER JOIN "
    .TABLE_CATEGORIES_DESCRIPTION." cd
                        ON (p2c.categories_id=cd.categories_id
                        AND cd.language_id="
    .$_SESSION['languages_id']."
                        AND cd.categories_description LIKE '%-"
    .SITE_NAME."-%')
                        INNER JOIN "
    .TABLE_CATEGORIES." as c ON (cd.categories_id=c.categories_id AND c.categories_status=1)",$sql);
                } else {
                    
    $add_pos $str_pos_products strlen(TABLE_PRODUCTS ' p');
                    
    $str_pos_coma strpos($sql_lower,',',$add_pos);
                    if(
    $str_pos_coma!==false) {
                        
    $add_pos $str_pos_coma;
                    } 
                    if((
    $str_pos_where!==false)&&(($str_pos_coma===false)||($str_pos_where<$str_pos_coma))) {
                        
    $add_pos $str_pos_where;
                    }
                    
    $sql substr($sql,0,$add_pos).
                            
    " INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
                            ON (cd.language_id="
    .$_SESSION['languages_id']."
                              AND cd.categories_description LIKE '%-"
    .SITE_NAME."-%')                        
                            RIGHT JOIN "
    .TABLE_PRODUCTS_TO_CATEGORIES." p2c
                              ON (p2c.categories_id = cd.categories_id
                            AND p.products_id = p2c.products_id) "
    .
                            
    substr($sql,$add_pos);
                 } 
    God bless you all,
    Iasmin from AmazingDiscoveries.org

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

    bug Re: MultiSite Module Support Thread

    Hello again,
    I actually found a problem with the last query in the PHP quoted above. It comes when there is an already set p2c category. Here is the changed code:
    PHP Code:
                    $sql substr($sql,0,$add_pos).
                            
    " INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
                            ON (cd.language_id="
    .$_SESSION['languages_id']."
                              AND cd.categories_description LIKE '%-"
    .SITE_NAME."-%')                        
                            RIGHT JOIN "
    .TABLE_PRODUCTS_TO_CATEGORIES." prod2cat
                              ON (prod2cat.categories_id = cd.categories_id
                            AND p.products_id = prod2cat.products_id) "
    .
                            
    substr($sql,$add_pos); 
    I hope this helps. God bless you,
    Iasmin for Amazing Discoveries

 

 

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