Page 15 of 19 FirstFirst ... 51314151617 ... LastLast
Results 141 to 150 of 188
  1. #141
    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 resqjoc View Post
    This plug in is not installing properly. I have done all merging of the files, but when I login to my admin, I get a page error message. I have to disable the auto installer file to be able to login to my admin.

    When I able to login to my admin, the customers do not show up. I have to change my "customers.php" file from admin folder back to the original file. This is on a test site.

    I am running ZC Ver. 1.5.4 and CSAR 2.1.1

    Any ideas?

    Thanks
    Stan
    Stan, you are absolutely right - there is a bug in line 52 of the file

    CSAR_files/YOUR_ADMIN_NAME/includes/installers/csar/2_1_1.php

    Replace

    Code:
     if (!$sniffer->field_exists(TABLE_CUSTOMERS, 'customers_privileges'))  $db->Execute("ALTER TABLE " . TABLE_CUSTOMERS  . " ADD customers_privileges` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER customers_authorization;");
    with

    Code:
     if (!$sniffer->field_exists(TABLE_CUSTOMERS, 'customers_privileges'))  $db->Execute("ALTER TABLE " . TABLE_CUSTOMERS  . " ADD customers_privileges TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER customers_authorization;");
    For whatever reason the character ` snug into that file just after customers_privileges and before TINYINT( 1 )

    Thanks for pointing that out
    Last edited by frank18; 2 Nov 2015 at 01:30 PM.

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

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

    I have submitted an updated version (2.1.2) with bug fix as per post #141. It should be available in a few days.

  3. #143

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

    Quote Originally Posted by frank18 View Post
    Stan, you are absolutely right - there is a bug in line 52 of the file

    CSAR_files/YOUR_ADMIN_NAME/includes/installers/csar/2_1_1.php

    Replace

    Code:
     if (!$sniffer->field_exists(TABLE_CUSTOMERS, 'customers_privileges'))  $db->Execute("ALTER TABLE " . TABLE_CUSTOMERS  . " ADD customers_privileges` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER customers_authorization;");
    with

    Code:
     if (!$sniffer->field_exists(TABLE_CUSTOMERS, 'customers_privileges'))  $db->Execute("ALTER TABLE " . TABLE_CUSTOMERS  . " ADD customers_privileges TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER customers_authorization;");
    For whatever reason the character ` snug into that file just after customers_privileges and before TINYINT( 1 )

    Thanks for pointing that out
    Frank18,

    I made the change as you directed, it did allow me to login to my admin side of my site, but I can not get the "special Privilege Status" to save after I update the customer.

    One other problem, The Login page does not display completely. This is te page to sign up as a "new" customer.

    Thanks
    Stan

  4. #144
    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 resqjoc View Post
    .....
    I made the change as you directed, it did allow me to login to my admin side of my site, but I can not get the "special Privilege Status" to save after I update the customer.

    One other problem, The Login page does not display completely. This is te page to sign up as a "new" customer.
    I can only think of a merging error. I just installed this version on a local ZC 1.5.4 development site without a single glitch.

  5. #145
    Join Date
    Nov 2013
    Location
    Hong Kong
    Posts
    43
    Plugin Contributions
    0

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

    Hi Frank,

    Can I restrict part of the product information to login customers, but show the price, add to cart box?

    Actually I want to create a custom box/ tab or whatever that customers have to login to view.
    The box/ tab would list the seller's contact information (phone no. & email), so we don't want people to get through it easily.

    Is it possible with this mod?
    I've found some useful info, but they are not that related to my case.

    ----------------------------------------------------------------------------------------------------------
    **Here is my reference list**
    Plugin:
    Twitch Restrict Categories by Customer or Group

    Threads:
    Making a category only visible after login
    Log In to View one Page of Website
    Require Login for one EZ Page?
    ----------------------------------------------------------------------------------------------------------

    Hope you can give my some hints!

    Thanks,
    Eva

  6. #146
    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 Green Books View Post
    Hi Frank,

    Can I restrict part of the product information to login customers, but show the price, add to cart box?

    Actually I want to create a custom box/ tab or whatever that customers have to login to view.
    The box/ tab would list the seller's contact information (phone no. & email), so we don't want people to get through it easily.

    Is it possible with this mod?
    I've found some useful info, but they are not that related to my case.

    ----------------------------------------------------------------------------------------------------------
    **Here is my reference list**
    Plugin:
    Twitch Restrict Categories by Customer or Group

    Threads:
    Making a category only visible after login
    Log In to View one Page of Website
    Require Login for one EZ Page?
    ----------------------------------------------------------------------------------------------------------

    Hope you can give my some hints!

    Thanks,
    Eva
    Ok, what part of the page do you want to 'restrict/hide'? CSAR wasn't designed for this, it would need a 'hack'

  7. #147
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,732
    Plugin Contributions
    27

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

    Quote Originally Posted by Green Books View Post
    Hi Frank,

    Can I restrict part of the product information to login customers, but show the price, add to cart box?

    Actually I want to create a custom box/ tab or whatever that customers have to login to view.
    The box/ tab would list the seller's contact information (phone no. & email), so we don't want people to get through it easily.

    Is it possible with this mod?
    I've found some useful info, but they are not that related to my case.

    ----------------------------------------------------------------------------------------------------------
    **Here is my reference list**
    Plugin:
    Twitch Restrict Categories by Customer or Group

    Threads:
    Making a category only visible after login
    Log In to View one Page of Website
    Require Login for one EZ Page?
    ----------------------------------------------------------------------------------------------------------

    Hope you can give my some hints!

    Thanks,
    Eva
    Eva, this can be accomplished with Twitch Restrict using the filters within the package. You're welcome to contact me to work out the details :)
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

  8. #148
    Join Date
    Aug 2005
    Location
    Bondi, Australia
    Posts
    100
    Plugin Contributions
    0

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

    Frank
    I'm trying to install CSAR over (or rather in addition to ) COWOA on a relatively new v1.5.4

    There are some places where the two plugins want to modify the same code and where I can largely combine them e.g. in SQL queries, but in admin/includes/customers.php they seem to be fighting for a control which I'm not sure how to resolve.

    Here's the current section of customers.php that has COWOA in it
    Code:
    		<?php if ($customers->fields['customers_authorization'] == 4 ? zen_image(DIR_WS_IMAGES .		'icon_red_off.gif', IMAGE_ICON_STATUS_OFF) : ($customers->fields['customers_authorization'] == 0 ? 
    		'<a href="' . zen_href_link(FILENAME_CUSTOMERS, 'action=status&current=' . $customers->fields
    		['customers_authorization'] . '&cID=' . $customers->fields['customers_id'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_GET['search']) ? '&search=' . $_GET['search'] : ''), 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', 
    		IMAGE_ICON_STATUS_ON) . '</a>' : '<a href="' . zen_href_link(FILENAME_CUSTOMERS, 
    		'action=status&current=' . $customers->fields['customers_authorization'] . '&cID=' . $customers->
    		fields['customers_id'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_GET['search']) ? '&search=' . $_GET['search'] : ''), 'NONSSL') . '">' . 
    		zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_OFF) . '</a>')); ?>&nbsp;</td>
    <?php if ($customers->fields['COWOA_account'] == 1) { ?>               
                    <td class="dataTableContent" align="center"><?php echo 'COWOA'; ?>&nbsp;</td>
    <?php }else{ ?> 
                    <td class="dataTableContent" align="center"><?php echo 'STANDARD';} ?>&nbsp;</td>
    This is what CSAR wants to replace it with:
    Code:
                    <?php if ($customers->fields['customers_authorization'] == 4) { ?>                <?php echo zen_image(DIR_WS_IMAGES . 'icon_red_off.gif', IMAGE_ICON_STATUS_OFF); ?>
                    <?php } else { ?>
                      <?php if ($customers->fields['customers_authorization'] == 0) {
                        echo zen_draw_form('setstatus', FILENAME_CUSTOMERS, 'action=status&cID=' . $customers->fields['customers_id'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_GET['search']) ? '&search=' . $_GET['search'] : ''));?>
                        <input type="image" src="<?php echo DIR_WS_IMAGES ?>icon_green_on.gif" title="<?php echo IMAGE_ICON_STATUS_ON; ?>" />
                        <input type="hidden" name="current" value="<?php echo $customers->fields['customers_authorization']; ?>" />
                        </form>
                      <?php } else {
                        echo zen_draw_form('setstatus', FILENAME_CUSTOMERS, 'action=status&cID=' . $customers->fields['customers_id'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_GET['search']) ? '&search=' . $_GET['search'] : ''));?>
                        <input type="image" src="<?php echo DIR_WS_IMAGES ?>icon_red_on.gif" title="<?php echo IMAGE_ICON_STATUS_OFF; ?>" />
                        <input type="hidden" name="current" value="<?php echo $customers->fields['customers_authorization']; ?>" />
                        </form>
                      <?php } ?>
                    <?php } ?>
                    </td>
                    <td class="dataTableContent" align="center">
                    <?php if ($customers->fields['customers_privileges'] == 0) { ?>
                    <?php echo zen_image(DIR_WS_IMAGES . 'icon_red_off.gif', IMAGE_ICON_STATUS_OFF); ?>
                    <?php } else { ?>
                      <?php if ($customers->fields['customers_privileges'] > 0) {
                        echo zen_draw_form('setstatus', FILENAME_CUSTOMERS, 'action=status&cID=' . $customers->fields['customers_id'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_GET['search']) ? '&search=' . $_GET['search'] : ''));?>
                        <input type="image" src="<?php echo DIR_WS_IMAGES ?>icon_green_on.gif" title="<?php echo IMAGE_ICON_STATUS_ON; ?>" />
                        <input type="hidden" name="current" value="<?php echo $customers->fields['customers_privileges']; ?>" />
                        </form>
                      <?php } else {
                        echo zen_draw_form('setstatus', FILENAME_CUSTOMERS, 'action=status&cID=' . $customers->fields['customers_id'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_GET['search']) ? '&search=' . $_GET['search'] : ''));?>
                        <input type="image" src="<?php echo DIR_WS_IMAGES ?>icon_red_on.gif" title="<?php echo IMAGE_ICON_STATUS_OFF; ?>" />
                        <input type="hidden" name="current" value="<?php echo $customers->fields['customers_privileges']; ?>" />
                        </form>
                      <?php } ?>
                    <?php } ?>
                    </td>
    Can you advise what would be a safe resolution with both plugins functioning?

  9. #149
    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 lucidlee View Post
    Frank
    I'm trying to install CSAR over (or rather in addition to ) COWOA on a relatively new v1.5.4

    .......

    There are some places where the two plugins want to modify the same code and where I can largely combine them e.g. in SQL queries, but in admin/includes/customers.php they seem to be fighting for a control which I'm not sure how to resolve.

    Can you advise what would be a safe resolution with both plugins functioning?
    I will need to download the COWOA files and take a look at this tonight.

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

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

    Ok, downloaded COWOA Updated and Combined for ZC v1.5.x - Version: v2.4 (seems to be the latest)

    Hmmm...

    CSAR uses the latest customers.php file with this header

    * @copyright Copyright 2003-2014 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 GIT: $Id: Author: DrByte Jun 30 2014 Modified in v1.5.4 $
    with all the other standard ZC v1.5.4 code

    On the other hand the latest version of COWOA still uses an old file. According to the header it is from ZC v1.5.1 ..... but read on!:

    * @copyright Copyright 2003-2012 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 GIT: $Id: Author: Ian Wilson Tue Aug 7 15:17:58 2012 +0100 Modified in v1.5.1 $
    * @version $Id: Integrated COWOA v2.4 - 2007 - 2013

    After digging further I found that COWOA even uses most of the code which was prevalent in ZC v1.3.9!!!

    To get to that conclusion I had to unzip several old ZC install files and do comparisons.


    This part adds the additional column for CSAR (1.5.4) which makes it the second last column:

    PHP Code:
                    <td class="dataTableContent" align="center">
                    <?php if ($customers->fields['customers_privileges'] == 0) { ?>
                    <?php echo zen_image(DIR_WS_IMAGES 'icon_red_off.gif'IMAGE_ICON_STATUS_OFF); ?>
                    <?php } else { ?>
                      <?php if ($customers->fields['customers_privileges'] > 0) {
                        echo 
    zen_draw_form('setstatus'FILENAME_CUSTOMERS'action=status&cID=' $customers->fields['customers_id'] . (isset($_GET['page']) ? '&page=' $_GET['page'] : '') . (isset($_GET['search']) ? '&search=' $_GET['search'] : ''));?>
                        <input type="image" src="<?php echo DIR_WS_IMAGES ?>icon_green_on.gif" title="<?php echo IMAGE_ICON_STATUS_ON?>" />
                        <input type="hidden" name="current" value="<?php echo $customers->fields['customers_privileges']; ?>" />
                        </form>
                      <?php } else {
                        echo 
    zen_draw_form('setstatus'FILENAME_CUSTOMERS'action=status&cID=' $customers->fields['customers_id'] . (isset($_GET['page']) ? '&page=' $_GET['page'] : '') . (isset($_GET['search']) ? '&search=' $_GET['search'] : ''));?>
                        <input type="image" src="<?php echo DIR_WS_IMAGES ?>icon_red_on.gif" title="<?php echo IMAGE_ICON_STATUS_OFF?>" />
                        <input type="hidden" name="current" value="<?php echo $customers->fields['customers_privileges']; ?>" />
                        </form>
                      <?php ?>
                    <?php ?>
                    </td>

    As I see it the COWOA part replaces the standard 1.3.9 code which is


    PHP Code:
                    <td class="dataTableContent" align="center"><?php echo ($customers->fields['customers_authorization'] == zen_image(DIR_WS_IMAGES 'icon_red_off.gif'IMAGE_ICON_STATUS_OFF) : ($customers->fields['customers_authorization'] == '<a href="' zen_href_link(FILENAME_CUSTOMERS'action=status&current=' $customers->fields['customers_authorization'] . '&cID=' $customers->fields['customers_id'] . ($_GET['page'] > '&page=' $_GET['page'] : ''), 'NONSSL') . '">' zen_image(DIR_WS_IMAGES 'icon_green_on.gif'IMAGE_ICON_STATUS_ON) . '</a>' '<a href="' zen_href_link(FILENAME_CUSTOMERS'action=status&current=' $customers->fields['customers_authorization'] . '&cID=' $customers->fields['customers_id'] . ($_GET['page'] > '&page=' $_GET['page'] : ''), 'NONSSL') . '">' zen_image(DIR_WS_IMAGES 'icon_red_on.gif'IMAGE_ICON_STATUS_OFF) . '</a>')); ?></td>

    with

    PHP Code:
                   <td class="dataTableContent" align="center">
            <?php if ($customers->fields['customers_authorization'] == zen_image(DIR_WS_IMAGES .
            
    'icon_red_off.gif'IMAGE_ICON_STATUS_OFF) : ($customers->fields['customers_authorization'] == 
            
    '<a href="' zen_href_link(FILENAME_CUSTOMERS'action=status&current=' $customers->fields
            
    ['customers_authorization'] . '&cID=' $customers->fields['customers_id'] . (isset($_GET['page']) ? '&page=' $_GET['page'] : '') . (isset($_GET['search']) ? '&search=' $_GET['search'] : ''), 'NONSSL') . '">' zen_image(DIR_WS_IMAGES 'icon_green_on.gif'
            
    IMAGE_ICON_STATUS_ON) . '</a>' '<a href="' zen_href_link(FILENAME_CUSTOMERS
            
    'action=status&current=' $customers->fields['customers_authorization'] . '&cID=' $customers->
            
    fields['customers_id'] . (isset($_GET['page']) ? '&page=' $_GET['page'] : '') . (isset($_GET['search']) ? '&search=' $_GET['search'] : ''), 'NONSSL') . '">' 
            
    zen_image(DIR_WS_IMAGES 'icon_red_on.gif'IMAGE_ICON_STATUS_OFF) . '</a>')); ?>&nbsp;</td>
    <?php if ($customers->fields['COWOA_account'] == 1) { ?>               
                    <td class="dataTableContent" align="center"><?php echo 'COWOA'?>&nbsp;</td>
    <?php }else{ ?> 
                    <td class="dataTableContent" align="center"><?php echo 'STANDARD';} ?>&nbsp;</td>
    Considering COWOA still uses old code it would be up to developers to merge COWOA into a 1.5.4 customers.php file

    I am sorry that I can't be of further help but I think that old code is secondary to the latest code used.

    Frank

 

 
Page 15 of 19 FirstFirst ... 51314151617 ... 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