Page 21 of 224 FirstFirst ... 1119202122233171121 ... LastLast
Results 201 to 210 of 2237
  1. #201
    Join Date
    Aug 2006
    Posts
    37
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    I'd like to set a default for the customers_allowance field to access one or two of the sites. What would I need to add to the previously used SQL command?
    Unfortunately setting a default for the TEXT type isn't possible.

    Second question is what SQL Command would I need to enter when someone is given permission to access the more restricted site?
    Simply an update query with the correct parameters.

    For example (if you add another field in the "edit customer", admin) the field in the form is called "site".

    Just do this query then:

    Code:
    $field_customers_allowance = '--';
    $field_customers_allowance = $_POST['site'];
    $field_customers_allowance . '--';
    mysql_query("UPDATE customers SET customers_allowance = '".$field_customers_allowance."'" WHERE customers_id = '".$_GET['cID']."');
    That will be it.

  2. #202
    Join Date
    Jul 2006
    Location
    Toronto, ON
    Posts
    87
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Alright, after having spent a while working on this problem, I found a much easier solution. I actually gave it a try earlier, but I didn't quite have it all together.

    Problem:
    I have 2 sites. 1 site is open for the public to view, and the 2nd is only for authoirzed personnel to view, and purchase. All customers should be able to shop on the public site immediately without any hold up.

    Solution:
    1)Admin>Customer Details>Customer Approval Status - Authorization Pending Set to 1

    2)Config site switch for public store as such
    Code:
    define('CUSTOMERS_APPROVAL_AUTHORIZATION','0'); //Customer Approval Status - Authorization Pending
    3)Edit includes/modules/create_account.php
    Code:
        $sql_data_array = array('customers_firstname' => $firstname,
                                'customers_lastname' => $lastname,
                                'customers_email_address' => $email_address,
                                'customers_nick' => $nick,
                                'customers_telephone' => $telephone,
                                'customers_fax' => $fax,
                                'customers_newsletter' => (int)$newsletter,
                                'customers_email_format' => $email_format,
                                'customers_default_address_id' => 0,
                                'customers_password' => zen_encrypt_password($password),
                                'customers_authorization' => (int)CUSTOMERS_APPROVAL_AUTHORIZATION
        );
    Change to:
    Code:
        $sql_data_array = array('customers_firstname' => $firstname,
                                'customers_lastname' => $lastname,
                                'customers_email_address' => $email_address,
                                'customers_nick' => $nick,
                                'customers_telephone' => $telephone,
                                'customers_fax' => $fax,
                                'customers_newsletter' => (int)$newsletter,
                                'customers_email_format' => $email_format,
                                'customers_default_address_id' => 0,
                                'customers_password' => zen_encrypt_password($password),
                                'customers_authorization' => 1
        );

    Result:
    Customer will not be automatically approved by the main settings, but the public site doesn't care if a customer is authorized.

    Note:
    Now as always be careful when adjusting the code to Zen, but this was the best solution that was suited for our needs.

    Thank you streetglow for all your help!

  3. #203
    Join Date
    Aug 2006
    Posts
    37
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Your welcome.

    Please beware that this will only suit for having 1 site unauthorized and the other site authorized. If you would have 3 different sites, with all 3 different authorizations (this is our case) you can only do it by or creating for every site a new variable definition or by using the method I described earlier.

    Indeed, for your needs this was the easiest way to archieve it.

  4. #204
    Join Date
    Sep 2006
    Posts
    100
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Ok, we need something more structured to develop this module, its instructions, documentation and tips and advice before it becomes too complicate and confusing.

    I think that we should create a Multisite section in the zen-cart Wiki documentation

    http://www.zen-cart.com/wiki/

    Then everything will be clearer and make sense.

    The only problem is that I don't know how to create an account for it or how to login ...


    When you use something like:
    PHP Code:
    ... LIKE "-'.SITE_NAME.'-" .... 
    you only need one dash between the site names like that:
    PHP Code:
    -site1-site2-site3
    This is how it feets into the description of the categories
    PHP Code:
    <!--site1-site2-site3--> 
    however a double dash still works !

  5. #205
    Join Date
    Aug 2006
    Posts
    37
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    The first site will not work, are my experiences. I might have made a typo.
    But for preventing any issues I use double dash. Works fine.

    Also if you use double dash you will be able to perform a PHP-function like "explode();" while this isn't possible with single dash.

  6. #206
    Join Date
    Sep 2006
    Posts
    100
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Quote Originally Posted by streetglow View Post
    The first site will not work, are my experiences. I might have made a typo.
    But for preventing any issues I use double dash. Works fine.

    Also if you use double dash you will be able to perform a PHP-function like "explode();" while this isn't possible with single dash.
    for the first site, make sure you start by a dash.

    Explode for "-site1-site2-site3-":
    PHP Code:
    $site_array=explode('-',trim($site_string,'-')); 
    But of course you can do as you wish ...

  7. #207
    Join Date
    Jul 2006
    Location
    Toronto, ON
    Posts
    87
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Alright, I'm back with another problem, hopefully not every is sick of me yet.

    I'm wanting to set up the site_links feature so the session ID and everything is working as it should. My problem I'm picky and it's not quite all that I'm looking for.

    When someone who is authorized for the public site is signed in and clicks to visit the restricted site, they are automatically given full access to the restricted site. I'd like the people with customer_authorization of 1 to not be allowed full access but to the authorization pending page.

    Essentially I need the customers_authorization to transfer along with the session_id. I assume this is not only controlled by the site_links sidebox, but also by the who's online table in the database. I'm I correct in my assumptions?

    If so I guess I'll need to run
    Code:
    ALTER TABLE whos_online ADD customer_authorization int(1) default NULL;
    Then edit the side box to carry the authorization value with it, but I'm not entirely sure where to place that.

    I'm I on the right track?

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

    Default Re: MultiSite Module Support Thread

    Okay, it's turns out that the site links do work for filter customer authorization 90&#37; of the time, without any modification to the file or database.

    The only case when it does not pay attention to the authorization value is just after a new customer has signed up. I'm not sure why that is though.

  9. #209
    Join Date
    Mar 2006
    Posts
    23
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    1st: This Module is just what I was looking for. Thanks Gerome.

    2nd: Implementing the module looks simple, but it doesn't work for me yet:


    [QUOTE=Gerome;418983]Hi Jvoce,

    You still need to add that at the begining of your 'configure.php':
    PHP Code:
    include_once('includes/config_sites/sites_switch.php'); 
    QUOTE]



    After making (and solving) the same mistake as above, now I'm facing the following problem:

    The Admin still works fine, but opening the site gives the nddbc.html page (antiekbeslag.nl).

    The database seems to work/connect normal...



    It wasn't a fresh install, but I carefully merged the few files I changed.
    (super orders in includes/classes/order.php;
    includes/modules/product_listing.php:

    $listing_split = new splitPageResults($listing_sql, $max_results, 'p.products_id', 'page');

    Changed in:

    $listing_split = new splitPageResults(cat_filter($listing_sql), $max_results, 'p.products_id', 'page');

    Instead of:

    $listing_split = new splitPageResults(cat_filter($listing_sql), MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page');

    (But both ways don't work)
    )



    Is there a simple mistake I'm overlooking? Does anybody have a clue what's obvious I did wrong?

    Thanks in advance.

  10. #210
    Join Date
    Mar 2006
    Posts
    23
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    I changed an old Configure.php file and after uploading the databaseconnection on the front-end didn't work....

    Waste of some quality hours but now I'm ready to test the rest.

 

 

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