Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2009
    Posts
    7
    Plugin Contributions
    0

    Default Show Customer Authorization Status

    What is the purpose of the: Authorization: Left/Right column in Admin Settings?
    I'm trying to be able to show my customers their authorization status on their account page when they login.
    Additionally: I would like only Approved (customer_authorization_0) customers to see a link, Example: For approved customers; here is a link to your file, elseif "You are not approved to view this file".
    This is what I've tried without the elseif statement but no luck;
    <?php
    if ($customers->fields['customers_authorization_0'] == 0) {
    ?>
    <li><?php echo ' <a href="/products/products.zip">Products Data Download</a>'; ?></li>
    <?php } //endif approved account ?>

    Zen-cart 1.5.1
    Thank you
    Last edited by elgobay; 21 Apr 2020 at 12:05 AM.

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,674
    Plugin Contributions
    123

    Default Re: Show Customer Authorization Status

    Quote Originally Posted by elgobay View Post
    What is the purpose of the: Authorization: Left/Right column in Admin Settings?
    I'm trying to be able to show my customers their authorization status on their account page when they login.
    Additionally: I would like only Approved (customer_authorization_0) customers to see a link, Example: For approved customers; here is a link to your file, elseif "You are not approved to view this file".
    This is what I've tried without the elseif statement but no luck;
    <?php
    if ($customers->fields['customers_authorization_0'] == 0) {
    ?>
    <li><?php echo ' <a href="/products/products.zip">Products Data Download</a>'; ?></li>
    <?php } //endif approved account ?>

    Zen-cart 1.5.1
    Thank you
    The field you are looking for is called "customers_authorization". so if your query is in $customers you can do something like

    if ($customers->fields['customers_authorization'] == 0) {
    ...
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Show Customer Authorization Status

    Additionally, in your link for customers, would recommend removing the opening slash from "/products/products.zip" unless the products folder is not located in the same directory as your store.

    Reason is, if the products directory is located in the store's directory, then the page will be given sufficient information that when attempting to then access the products directory, it will go there next... If the products directory (now or at some point in the future) is at the not at the root of your domain name then when attempting to click that link, the reference would be as if to try from the domain root. In the case of the products directory being in the same path as the store and the store is in a Web facing sub-directory, then the initial slash will point to the wrong location...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,674
    Plugin Contributions
    123

    Default Re: Show Customer Authorization Status

    LOL I didn't even read that far, I got stuck on "customer_authorization_0".

    @Elgobay, if you're offering a download, you may want to look at how Zen Cart provides a downloadable product - possibly free - securely through the cart.

    https://docs.zen-cart.com/user/products/downloadable/
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    Jan 2009
    Posts
    7
    Plugin Contributions
    0

    Default Re: Show Customer Authorization Status

    Ok, thanks for the replies.
    I have the link working / showing up and going to the download.
    The issue I'm having is: It shows for all account users and I want it to show to ONLY "Approved" (customer_authorization_0) accounts, not pending authorization accounts.
    I know this is my argument should be:
    <?php
    if ($customers->fields['customers_authorization_0'] == 0) {
    ?>
    What should be here; "== 0)" to only shoe the link to approved users?
    Plus I need "elseif" arguments included.
    I'm making the edits in tpl_account.
    If anyone can provide me the full code I need to use, which works, send me your price. I also have a bigger multisite job which I'll give you.
    Last edited by elgobay; 22 Apr 2020 at 09:35 PM.

 

 

Similar Threads

  1. Changing Customer Authorization Status
    By freefire in forum Customization from the Admin
    Replies: 7
    Last Post: 11 Apr 2010, 11:31 PM
  2. Customer Approval Status - Authorization Pending
    By teamzr1 in forum General Questions
    Replies: 2
    Last Post: 17 Feb 2010, 01:41 AM
  3. Customer Authorization Status - Not Working?
    By Beeunique in forum Managing Customers and Orders
    Replies: 12
    Last Post: 1 Apr 2009, 10:02 AM
  4. Customer Authorization Status Question??
    By dcfxking in forum General Questions
    Replies: 17
    Last Post: 18 Aug 2006, 10:02 PM
  5. Problem with Customer authorization/shop status
    By SoftCorpse in forum General Questions
    Replies: 3
    Last Post: 8 Jul 2006, 07:25 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