Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2005
    Location
    Germany
    Posts
    115
    Plugin Contributions
    0

    Default How tp Create Links using zencart code?

    Ok, it's been awhile since I posted, and at the same time, I am not sure where this question should have gone.

    I've looked around but couldn't find anything specific related to this issue, there are a few questions and answers, but nothing specific on the main how to do it.

    I am making an ezpage1. I wish to link to ezpage2 that won't be shown on the site except via the ezpage1.

    How to do this please?

    I don't want to do the specific <a href="http://www.domainname.com">Click here.</a>type link, instead I'm hoping to do something like:

    <a href="' . zen_href_link('index.php?main_page=page&id=14&chapter=0') .'">Click here</a>.

    I got this idea from someone on the forum, but I can't make this line work the way I need it to, when I put it in the html description area, it produces a link like:

    http://www.domainname.com/store/"'%20.%20zen_href_link(blah blah blah)' and gives a blank page.

    Would anyone know the proper way to do this?

    My reasoning for not using an absolute path is that every time I upgrade zen, and do test directories first, I end up having to change these links, if I don't have to change the links it will save me a ton of work down the road. There are other reasons as well, but this is the main one for me.

    Marian

  2. #2
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: How tp Create Links using zencart code?

    You could use an internal link in EZ-pages.

    it would look something like this:

    index.php?main_page=page&id=1&chapter=0

    To do this open the EZ-page editor in your admin

    Put in a title

    check yes for the sidebox and add a sort order

    scroll down until you find the section for the internal link and add the link as shown above.

    save and you should be good to go.

  3. #3
    Join Date
    Nov 2005
    Location
    Germany
    Posts
    115
    Plugin Contributions
    0

    Default Re: How tp Create Links using zencart code?

    Without trying to sound ungrateful or snide, I do know how to use the internal and external links. My question goes directly to the writing of a page, if I'm creating a "lesson" for instance on how to do something, I will have several links to various other pages or pictures and I'd like to be able to directly link to those. Using the "internal" link will not work in the same manner you mention.

    Being able to create the link with the zencode to do it would also be what I'm looking for in this respect. I am currently doing an upgrade on a site for instance where the info pages module was installed. I have over 300 pages in that addon. I now have to redo all of these links to work in ezpages. I would prefer not to ever have to do this again, so want to be able to have a link that will work for me the way I need it to when I upgrade the various carts I maintain.

    Thank you for your help and idea tho, I hope it will help someone else. :))))

    Marian

  4. #4
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: How tp Create Links using zencart code?

    Maybe this is what you are looking for:

    <a href="' . zen_ez_pages_link(2) . '">Your Link</a>

    The highlighted number is the EZ-page ID.

  5. #5
    Join Date
    Nov 2005
    Location
    Germany
    Posts
    115
    Plugin Contributions
    0

    Default Re: How tp Create Links using zencart code?

    Hi Clyde,

    Again, thank you for your help, I tried it, pasting in basically like the above:

    <a href="' . zen_ez_pages_link(13) . '">Your Link</a>

    which in the address bar produces:

    /store-test/'%20.%20zen_ez_pages_link(13)%20.%20'

    and a 404 error page with the words:

    Not Found
    The requested URL /store-test/' . zen_ez_pages_link(13) . ' was not found on this server.

    I tried various others, even checking on the proper sql table name which is zen_ezpages

    and then trying:

    <a href="' . zen_ezpages_link(13) . '">Your Link</a>

    which still has the same affect, producing the 404 error page.

    I checked the id 13 page, and when it is placed in the address bar with full url and such the page is working properly.

    Marian

  6. #6
    Join Date
    May 2006
    Location
    Texas
    Posts
    565
    Plugin Contributions
    4

    Default Re: How tp Create Links using zencart code?

    try this:

    <?php echo '<a href="' . zen_ezpages_link(13) . '">Your Link</a>'; ?>

  7. #7
    Join Date
    Nov 2005
    Location
    Germany
    Posts
    115
    Plugin Contributions
    0

    red flag Re: How tp Create Links using zencart code?

    I could not get that line to work either, however, quite by accident I did discover that Clyde was right on his first reply. It's really not needed when it concerns the descriptions.

    With linking to other pages or even images, you can simply use the

    <a href="index.php?main_page=page&id=1&chapter=0">

    or if an image:

    <img width="170" height="158" border="0" src="images/previews/filename.jpg">

    will do it just fine. Note: that in the ezpages, the image will show as broken, but on the customer side it shows up just fine.

    I'd still love to find out what the code would have been, but I can at least now work on these things and put the last part of the url in as needed.

    Clyde, my apologies, I should have tried your first idea, it just didn't for some reason occur to me to try it in the description area, I really thought you were talking about those text boxes underneath the description one.

    Marian

  8. #8
    Join Date
    May 2006
    Location
    Texas
    Posts
    565
    Plugin Contributions
    4

    Default Re: How tp Create Links using zencart code?

    oh you mean code like this?

    <?php zen_href_link(FILENAME_ADMIN); ?> (links to the admin page)

 

 

Similar Threads

  1. How to create a coupon/discount code during Checkout?
    By kevinmc3 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 30 Mar 2009, 03:55 AM
  2. How to write error trapping code on create account?
    By 0be1 in forum General Questions
    Replies: 0
    Last Post: 29 Oct 2007, 01:36 PM
  3. can't create URL links using HTMLarea on a mac
    By sobebabies in forum Bug Reports
    Replies: 9
    Last Post: 25 Oct 2006, 03:48 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