Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25
  1. #21
    Join Date
    Dec 2011
    Posts
    7
    Plugin Contributions
    0

    Default Re: Calling the current product page url with php

    I figured I messed up something so I created a fresh install and tested it. The screen captures were from a site that was 5 minutes old. It had one post.

    Can I PM you the link to the site?

  2. #22
    Join Date
    Sep 2006
    Posts
    542
    Plugin Contributions
    0

    Default Re: Calling the current product page url with php

    Yes, you can
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Play with it long enough and you will break it.

  3. #23
    Join Date
    Sep 2006
    Posts
    542
    Plugin Contributions
    0

    Default Re: Calling the current product page url with php

    OK, although this code works in the product description in admin under Preview it does not work on the live page. It defaults to the index and not up the page.

    I will have to think about why and get back to you.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Play with it long enough and you will break it.

  4. #24
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Calling the current product page url with php

    You'll see, as is discussed in the many other threads on setting up anchors, that you do indeed need to specify the complete URL.

    So, if this is something that you expect to do often and the actual anchor point is in the same spot on every page (ie: top of description is the most common place people think they need to put it) and your clickable link to take you back to that anchor is also always in the same spot (ie: bottom of description, usually for the same reason), then you can easily put that into your TEMPLATE instead of trying to be inserting custom HTML and PHP into your product descriptions needlessly.

    It would really help if you were to explain the business reason behind why you're even trying to do all this, instead of just bashing at a pre-determined end solution that's not working for you.
    .
    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. #25
    Join Date
    Dec 2011
    Posts
    7
    Plugin Contributions
    0

    Default Re: Calling the current product page url with php

    Quote Originally Posted by DrByte View Post
    You'll see, as is discussed in the many other threads on setting up anchors, that you do indeed need to specify the complete URL.

    ....
    It would really help if you were to explain the business reason behind why you're even trying to do all this, instead of just bashing at a pre-determined end solution that's not working for you.

    I'm trying to create product pages with lots of information on them. If you printed them they would be 3 to 5 pages long. I'd like to put a bullet list at the top with links to important sections of the document.

    I saw those other pages mentioning the problem with anchors. I kept seeing posts saying to use standard anchors and other people suggesting PHP code. I couldn't get either method to work. I was hoping there was a more elegant way than entering the entire URL.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. v151 with ultimate seo Url,how to change the ez-page url ?
    By whywell in forum General Questions
    Replies: 1
    Last Post: 17 Jan 2013, 09:12 AM
  2. v150 what is the php code to return the url of the current page?
    By WebKat in forum General Questions
    Replies: 7
    Last Post: 8 Mar 2012, 11:24 PM
  3. how to get the value of current category with PHP code?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 16 Feb 2011, 05:27 PM
  4. Highlight the Current Page with CSS
    By FoodDudes in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 28 Feb 2010, 01:13 AM
  5. Replies: 1
    Last Post: 22 Mar 2007, 05:37 PM

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