Page 5 of 19 FirstFirst ... 3456715 ... LastLast
Results 41 to 50 of 188
  1. #41
    Join Date
    Oct 2012
    Posts
    13
    Plugin Contributions
    0

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

    Hi Frank,

    I have the mod fully installed on a v1.5 site. However, I am running Tabbed Product Pro which it seems the conflict is on the product_info php template. If I revert just that 1 file to my unmodified file, the product listing shows up. If I leave it with the CSAR modifications, then the product page will not load. The TPP mod has a beginning php and and ending php so I tried to swap them around to see if one has to load first, but having the same issue. Any help would be appreciated if you have run TPP in the past.

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

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

    Quote Originally Posted by Whot View Post
    Hi Frank,

    I have the mod fully installed on a v1.5 site. However, I am running Tabbed Product Pro which it seems the conflict is on the product_info php template. If I revert just that 1 file to my unmodified file, the product listing shows up. If I leave it with the CSAR modifications, then the product page will not load. The TPP mod has a beginning php and and ending php so I tried to swap them around to see if one has to load first, but having the same issue. Any help would be appreciated if you have run TPP in the past.
    Thanks Whot,

    I am not familiar with TPP but just downloaded a copy of TPP 1.09 and compared the 2 files tpl_product_info_display.php (CSAR and TPP).

    You may want to try this:

    After merging the top of the TPP file looks like

    Code:
    <?php
    //BOF :: Tabbed Products Pro ::
    require(DIR_WS_MODULES . 'tabbed_products_pro.php');
    //EOF :: Tabbed Products Pro ::
    /**
    * CATEGORY_RESTRICTION - find corresponding master category for the current product
     */
    $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);
    
    /**
    * CATEGORY_RESTRICTION - we are blocking direct access to a restricted product
     */
    if (!$_SESSION['customer_id'] && !$_SESSION['customers_privileges'] > 0 && in_array($result->fields['master_categories_id'],explode(',', CATEGORY_RESTRICTION_LOGIN_CATEGORY)) ) {
     // block access to this product
     echo TEXT_ILLEGAL_ACCESS ;
    } else { // bof CATEGORY_RESTRICTION - OPEN ACCESS
    
    /**
    * CATEGORY_RESTRICTION - we are hiding prices for specific categories only
     */
    if (!$_SESSION['customer_id'] && in_array($result->fields['master_categories_id'],explode(',', CATEGORY_RESTRICTION_HIDEPRICE_CATEGORY)) ) {
        $hideprice = 'true'; 
        } else {
        $hideprice = 'false';
      }
    ?>
    <div class="centerColumn" id="productGeneral">
    And the bottom of the TPP file would look like

    Code:
    <!--bof Form close-->
    <?php
        } // eof CATEGORY_RESTRICTION - OPEN ACCESS
    ?>
    </div>
    <?php 
    //BOF :: Tabbed Products Pro ::
    echo $tabjscript;
    //BOF :: Tabbed Products Pro ::
    ?>
    In the above 2 code blocks I have highlighted the corresponding opening { and closing } brackets for your reference.

    Of course you still need to merge the code between these 2 blocks...

    If this works as desired you may still have price display issues on the x-sell and reviews tabs - and may be on some others.

    See how you go and post your findings - including corresponding debug logs if any.

    Cheers / Frank
    Last edited by frank18; 30 Jun 2013 at 01:31 AM.

  3. #43
    Join Date
    Oct 2012
    Posts
    13
    Plugin Contributions
    0

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

    Quote Originally Posted by frank18 View Post

    And the bottom of the TPP file would look like

    Code:
    <!--bof Form close-->
    <?php
        } // eof CATEGORY_RESTRICTION - OPEN ACCESS
    ?>
    </div>
    <?php 
    //BOF :: Tabbed Products Pro ::
    echo $tabjscript;
    //BOF :: Tabbed Products Pro ::
    ?>
    In the above 2 code blocks I have highlighted the corresponding opening { and closing } brackets for your reference.

    Of course you still need to merge the code between these 2 blocks...

    If this works as desired you may still have price display issues on the x-sell and reviews tabs - and may be on some others.

    See how you go and post your findings - including corresponding debug logs if any.

    Cheers / Frank
    Thanks Frank for taking the time to look into the TPP module. But I have finally found what works. I don't know why the last "</div>" has to be moved to the end when using both TPP and CSAR, but this is what worked for me below. Hopefully it helps others who are running both modules.

    Code:
    <!--bof Form close-->
    <?php
        } // eof CATEGORY_RESTRICTION - OPEN ACCESS
    ?>
    
    <?php 
    //BOF :: Tabbed Products Pro ::
    echo $tabjscript;
    //BOF :: Tabbed Products Pro ::
    ?>
    </div>
    Also, I will post my modifications to get it to work with dynamic filter as it also affects the same 6 files as CSAR, but easily doable. It takes a bit more mods than the product_info file, but finally got that part to work as well. I will post my files with notations during the week.

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

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

    Quote Originally Posted by Whot View Post
    Thanks Frank for taking the time to look into the TPP module. But I have finally found what works. I don't know why the last "</div>" has to be moved to the end when using both TPP and CSAR, but this is what worked for me below. Hopefully it helps others who are running both modules.

    Code:
    <!--bof Form close-->
    <?php
        } // eof CATEGORY_RESTRICTION - OPEN ACCESS
    ?>
    
    <?php 
    //BOF :: Tabbed Products Pro ::
    echo $tabjscript;
    //BOF :: Tabbed Products Pro ::
    ?>
    </div>
    Thanks for your update Whot, your solution would have been my next suggestion. Not easy to help with your issue as I don't have TPP installed in any store, so can't make comparisons.

    Thanks again / Frank

  5. #45
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

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

    I have installed the latest version of this module in a 1.5.1 store. I merged all the changes, but am having the following issue:

    1. If I restrict access to a category, when a customer attempts to go to that category, they are sent to the conditions page, whether they are logged in or not, and whether they have special privileges or not.
    2. If no categories are restricted, the home page of the website is redirecting to the conditions page. As soon as I restrict a category, the home page works fine.

    I really appreciate any help!

    Thanks!
    Danielle

  6. #46
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,379
    Plugin Contributions
    9

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

    Quote Originally Posted by Danielle View Post
    I have installed the latest version of this module in a 1.5.1 store. I merged all the changes, but am having the following issue:

    1. If I restrict access to a category, when a customer attempts to go to that category, they are sent to the conditions page, whether they are logged in or not, and whether they have special privileges or not.
    Using Developers Tool Kit do a search for

    Code:
     zen_redirect(zen_href_link(FILENAME_CONDITIONS, '', 'SSL'));
    Open the file(s) resulting from your search and change that part of the code to

    Code:
     zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
    Quote Originally Posted by Danielle View Post
    2. If no categories are restricted, the home page of the website is redirecting to the conditions page. As soon as I restrict a category, the home page works fine.
    This is one issue with CSAR which I am in the process of resolving. As it stands, one category needs to be restricted for the mod to work as it should. If you don't want to restrict any categories then set this value to something stupid like 100000 - a category that does not exist.

    The idea of this plugin is to give store owners the option to restrict one or more categories - whatever but at least one. If you don't want to restrict any categories then the mod is obsolete and should not be installed in the first place.

    Hope this helps

    Cheers/Frank
    Last edited by frank18; 9 Nov 2013 at 12:13 PM.

  7. #47
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

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

    Thank you, that helped somewhat, except that customers that are registered AND given special privileges still can't view restricted categories. They were being directed to the conditions page, but now that I made these changes, they are being redirected to the account page (a redirect from the login page since they're already signed in) anytime they view a restricted category, even though they are approved to view it.

    Quote Originally Posted by frank18 View Post
    Using Developers Tool Kit do a search for

    Code:
     zen_redirect(zen_href_link(FILENAME_CONDITIONS, '', 'SSL'));
    Open the file(s) resulting from your search and change that part of the code to

    Code:
     zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));


    This is one issue with CSAR which I am in the process of resolving. As it stands, one category needs to be restricted for the mod to work as it should. If you don't want to restrict any categories then set this value to something stupid like 100000 - a category that does not exist.

    The idea of this plugin is to give store owners the option to restrict one or more categories - whatever but at least one. If you don't want to restrict any categories then the mod is obsolete and should not be installed in the first place.

    Hope this helps

    Cheers/Frank
    Danielle

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

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

    Quote Originally Posted by Danielle View Post
    Thank you, that helped somewhat, except that customers that are registered AND given special privileges still can't view restricted categories. They were being directed to the conditions page, but now that I made these changes, they are being redirected to the account page (a redirect from the login page since they're already signed in) anytime they view a restricted category, even though they are approved to view it.
    Two possibilities:

    1. If you are changing the special priviliges of a customer in admin whilst the same customer is still logged into the front end then the changes will not reflect until that customer logs out and then logs back in again. For testing purposes only you may need to reload the page or better even use another browser. See if that is your culprit.

    2. In case point 1. does not resolve your issue then I am almost certain that there is a merging error in your installation.

    If the site is live please create a dummy customer and assign special privileges to that customer. PM me the login details of that customer and I have a look.

    Cheers / Frank

  9. #49
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

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

    I was logging out and logging in again after the special privileges were assigned. I will send you a PM with the login info.

    Thank you!

    Quote Originally Posted by frank18 View Post
    Two possibilities:

    1. If you are changing the special priviliges of a customer in admin whilst the same customer is still logged into the front end then the changes will not reflect until that customer logs out and then logs back in again. For testing purposes only you may need to reload the page or better even use another browser. See if that is your culprit.

    2. In case point 1. does not resolve your issue then I am almost certain that there is a merging error in your installation.

    If the site is live please create a dummy customer and assign special privileges to that customer. PM me the login details of that customer and I have a look.

    Cheers / Frank
    Danielle

  10. #50
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,379
    Plugin Contributions
    9

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

    Quote Originally Posted by Danielle View Post
    I was logging out and logging in again after the special privileges were assigned. I will send you a PM with the login info.

    Thank you!
    Thanks Danielle,

    Clicked through all cats w/out problems. None of your categories seem to be access restricted but they are price restricted, I can't see prices. Logged in and clicked through all cats and can see prices and add products to cart.

    Only coming to blocks when clicking on the heading 'Wholesale'. Do you have 'Dual Pricing - Wholesale Pricing' installed?

    I don't think CSAR itself poses a problem. Are there any other mods installed that may clash with CSAR?

    Frank

 

 
Page 5 of 19 FirstFirst ... 3456715 ... 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

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