Page 12 of 19 FirstFirst ... 21011121314 ... LastLast
Results 111 to 120 of 188
  1. #111
    Join Date
    Feb 2008
    Location
    Philadelphia
    Posts
    290
    Plugin Contributions
    3

    Default Re: Category Specific Access Restriction (CSAR) - [Support Thread]

    Does this work with group pricing?

    For example group a may access different categories than group b and so on.

    I read thread but the only query in this regard was as u released v2.

  2. #112
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Category Specific Access Restriction (CSAR) - [Support Thread]

    Quote Originally Posted by JimmyV View Post
    Does this work with group pricing?

    For example group a may access different categories than group b and so on.

    I read thread but the only query in this regard was as u released v2.
    CSAR was not designed for this. That said, there should be no reason why it can't be merged and made compatible with that feature.

    You could test this on a local development site.

    Cheers / Frank

  3. #113
    Join Date
    Apr 2014
    Posts
    154
    Plugin Contributions
    0

    Default Re: Category Specific Access Restriction (CSAR) - [Support Thread]

    If you are using SitemapXML along with this mod CSAR you will recognize that the categories and products are uploaded to the sitemap. I figured this would be the best place to post it instead of the SitemapXML support thread.

    In includes/modules/pages/sitemapxml/ folder this is where the instructions to make the urls. So you will have to modify 2 of those files.

    In sitemapxml_categories, find this line:

    PHP Code:
    // EOF hideCategories 
    below it, add these lines:

    PHP Code:
    // bof exlude CSAR from sitemap
    $category_login_block_query explode(',',CATEGORY_RESTRICTION_LOGIN_CATEGORY); // block restricted categories - don't show in sitemap
        
    foreach($category_login_block_query as $category_login_block) { 
            
    $from '';
            
    $where .= " and c.categories_id != '$category_login_block' ";
        }
    // bof exlude CSAR from sitemap 
    In sitemapxml_products, find this line:
    PHP Code:
    // EOF hideCategories 
    below it, add these lines:

    PHP Code:
    // bof exlude CSAR from sitemap
    $category_login_block_query explode(',',CATEGORY_RESTRICTION_LOGIN_CATEGORY); // block restricted products - don't show in sitemap
        
    foreach($category_login_block_query as $category_login_block) { 
            
    $from '';
            
    $where .= " and p.master_categories_id != '$category_login_block' ";
        }
    // bof exlude CSAR from sitemap 
    This is basically the same logic that the CSAR uses on the index filter php file. So now when uploading sitemaps it will exclude those categories and the products within from being posted.

  4. #114
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Category Specific Access Restriction (CSAR) - [Support Thread]

    Thanks for pointing this out yaritai. Didn't think about sitemaps when I wrote CSAR.

    However, search engines would try to access the restricted products or categories and read the contents for indexing purposes. So, they would need to be 'logged in' which they can't do. If they run into blocks and are being redirected to the login page (as CSAR is designed to do) then those pages are not being indexed.

    But - to prevent SE's getting 'annoyed' by redirections, your piece of code appears to be very useful.

    I might consider including your suggestion in the next version of CSAR (have not tested it though...)

    Thanks again

    Cheers / Frank

  5. #115
    Join Date
    Apr 2014
    Posts
    154
    Plugin Contributions
    0

    Default Re: Category Specific Access Restriction (CSAR) - [Support Thread]

    Frank, also I do want to point out that in the tpl_product_info_display.php file you have a query to check for the master cat id. I will share a short version of it as zen has a function built in.

    The current code:

    PHP Code:
    $products_id_to_block $_GET['products_id'];
    global 
    $db;
    $sql "select master_categories_id from " TABLE_PRODUCTS " where products_id = :productID:";
    $sql $db->bindVars($sql':productID:'$products_id_to_block'integer');
    $result $db->Execute($sql); 
    can be swapped to just using:

    PHP Code:
    $products_id_to_block zen_get_products_category_id($_GET['products_id']) 
    This will give you the master id of the product being accessed. You can also get the category path instead of the master cat id with another stock function built in.

  6. #116

    Default Re: Category Specific Access Restriction (CSAR) - [Support Thread]

    I have just installed csar v2.0 in 1.5.3. When I go to my site, it is redirecting "Home" to the login page so that whoever visits the site is forced to login. Is there a way to change this? I have Configuration > Customer Details > Customer Shop Status - View Shop and Prices set to 0.

  7. #117

    Default Re: Category Specific Access Restriction (CSAR) - [Support Thread]

    Quote Originally Posted by joleady View Post
    I have just installed csar v2.0 in 1.5.3. When I go to my site, it is redirecting "Home" to the login page so that whoever visits the site is forced to login. Is there a way to change this? I have Configuration > Customer Details > Customer Shop Status - View Shop and Prices set to 0.
    Fixed - I didn't have any categories selected for restriction.

  8. #118
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Category Specific Access Restriction (CSAR) - [Support Thread]

    Quote Originally Posted by joleady View Post
    Fixed - I didn't have any categories selected for restriction.
    Good to hear that you have got this working.

    Yes, that is one flaw with v2.0, at least one category needs to be defined as being restricted. That category can be a non-existing category (such as 20000).

    I am working on an upgrade to eliminate this bug but time is rare atm to submit a tested and proven update.

    Cheers / Frank

  9. #119
    Join Date
    Oct 2014
    Location
    Miami
    Posts
    7
    Plugin Contributions
    0

    Default Re: Category Specific Access Restriction (CSAR) - [Support Thread]

    Hello Frank,

    I'm migrating over from osCommerce - since Zen has included several addons I would have to manually add. I do very much like your CSAR, but I can't get it to work on the downloadable Documents in the stock install on zen 1.5.3. It works like a champ on categories, but Ducuments are all accessible either by category, ie 63 or product 171 or 63_171. Hopefully you can save me some time here.

    Best,

    Martin

  10. #120
    Join Date
    Oct 2014
    Location
    Miami
    Posts
    7
    Plugin Contributions
    0

    Default Re: Category Specific Access Restriction (CSAR) - [Support Thread]

    OK, got it. These were linked products, so you have to include all their respective linked products, categories.. Neat stuff, Frank!

 

 
Page 12 of 19 FirstFirst ... 21011121314 ... LastLast

Similar Threads

  1. Category Specific Restriction of Product Price Display (OLD v1 mod)
    By frank18 in forum All Other Contributions/Addons
    Replies: 40
    Last Post: 26 May 2013, 11:38 PM
  2. v150 [Not a bug] Category Specific Access Restriction‏
    By raf696 in forum Bug Reports
    Replies: 3
    Last Post: 17 Mar 2012, 03:26 AM
  3. v150 Category Specific Access Restriction‏
    By raf696 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 16 Mar 2012, 10:25 PM
  4. v150 Category Specific Access Restriction
    By raf696 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 13 Mar 2012, 07:36 PM
  5. Gallery Category support thread
    By gjh42 in forum All Other Contributions/Addons
    Replies: 26
    Last Post: 26 Sep 2008, 09:38 AM

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