Results 1 to 10 of 16

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default Getting variables from link clicked

    Hello,
    I don't know where to post for this question. Basically, I want to perform a certain action on tpl_login_default.php based on where the customer came from. So far they either come from
    Login: http://www.meaningfulaccents.com/ind...ain_page=login

    or

    Continue checkout on Shopping cart: http://www.meaningfulaccents.com/ind...ckout_shipping

    I was thinking of using main_page as an argument, but I don't know how to pass it all the way to tpl_login_default.php. So then I tried to grab the previous clicked link and just do my conditional statements from that but I don't know how to do that either. Anyone can help? Thanks.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,442
    Plugin Contributions
    279

    Default Re: Getting variables from link clicked

    Why ?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default Re: Getting variables from link clicked

    Hi Dr. Byte,
    The reason is because I want to display certain words/sentences and button when they are doing a proceed to checkout as oppose to when they want to login/create account. All this of course being for user friendly experience for customers. For example, I've decided to remove the paypal EC button from that page because I find it weird to present it twice once on shopping cart and then again after they click proceed to checkout. If you want me to go more into detail, let me know. Thank you for your help.
    Last edited by ebaobao; 16 Sep 2011 at 04:32 AM. Reason: typo

  4. #4
    Join Date
    Jan 2004
    Posts
    66,442
    Plugin Contributions
    279

    Default Re: Getting variables from link clicked

    Code:
    <?php if ($_SESSION['cart']->count_contents() > 0) { then there's something in their cart so it's likely they've arrived with intent to checkout }
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default Re: Getting variables from link clicked

    Hi Dr. Byte,

    Thank you. However, that would still not satify the condition where they are in their shopping cart and then click on the login link. I want login to be very distinct from proceed to checkout whenever they click the login link. Any other ideas? Thanks again.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,442
    Plugin Contributions
    279

    Default Re: Getting variables from link clicked

    If they're in their shopping cart and click the login link, then they'll have something IN their cart, and thus the code I posted will work.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v151 Modifying Products URL Link - Adding Client Variables Dynamically.
    By Matt Staines in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 26 Oct 2013, 10:44 AM
  2. navbar/mouseover make a link stay highlighted when its clicked
    By missanna in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 10 Jun 2010, 07:47 AM
  3. Google checkout not working getting Oops! page when button is clicked???
    By paddy_uk2007 in forum Addon Payment Modules
    Replies: 2
    Last Post: 11 Dec 2008, 01:27 PM
  4. How to Remove Categories from Center after clicked from Navigation menu?
    By stlnyc in forum Customization from the Admin
    Replies: 0
    Last Post: 30 Oct 2008, 09:10 PM
  5. Layout enlarges when any link is clicked.
    By punkprints in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 13 Jul 2008, 06:13 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