Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How do I open a product link in the same page, NOT a new one?

How do I open a product link in the same page, NOT a new one?

Locked

Views: 2,360

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
14 Jun 2008, 8:20 AM
#1
thesoundsmith avatar

thesoundsmith

New Zenner

Join Date:
Jun 2008
Location:
Monterey, CA
Posts:
36
Plugin Contributions:
0

How do I open a product link in the same page, NOT a new one?

I need to take more control over the hyperlinks in the cart. The general design of ZenCart treats the cart as the main app, with some external pages if desired - click here to access... opens in a new window. I absolutely must have these links open in the same window, so the user can hit back-arrow to return to the product pagoss...e.

I also need at least one home link that sends me back to my actual website, currently if I enter the cart,there is no way back except the back-arrow.

I cannot find any references to how this is done, either in the book, the basic docs, or this site.

Help please - I have spent a lot of time on my site,and this cart, and would hate to have to dump it because it insists on being boss...

The Soundsmith

14 Jun 2008, 8:57 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How do I open a product link in the same page, NOT a new one?

Help please - I have spent a lot of time on my site,and this cart, and would hate to have to dump it because it insists on being boss...
It is Open Source and as such can be re-coded to what ever you want - time and ability restricted.
click here to access... opens in a new window. I absolutely must have these links open in the same window,
Can you provide a direct link to a page where this is happening?
I also need at least one home link that sends me back to my actual website, currently if I enter the cart,there is no way back except the back-arrow.
Answered in your other thread - But one way would be to have the top "Home" link renamed (header.php) in the defines to "Main Site" or something else that you might prefer and have that link href'd to your main page -

But truly, looking at your site, I would begin porting all of it to Zen Cart - one to have a seamless look and feel and other to make management much simpler.

Zen Cart can be massaged so that it will look 90+% just like your current main page and your other paged can be createdusing the ezpage functionality. JMO

19 Jun 2008, 9:01 AM
#3
thesoundsmith avatar

thesoundsmith

New Zenner

Join Date:
Jun 2008
Location:
Monterey, CA
Posts:
36
Plugin Contributions:
0

Re: How do I open a product link in the same page, NOT a new one?

kobra:

It is Open Source and as such can be re-coded to what ever you want - time and ability restricted.
First off, thanks for the reply - as I said in my other reply, I've been out of contact, so pardon th delay. I am a professional musician who spent a bunch pof years programming, but I won't do it again any more than absolutely necessary, I simply don't have time, and hiring someone else is not cost-benefit rational.

Can you provide a direct link to a page where this is happening?http://www.thesoundsmith.com/private/zcart/index.php?main_page=product_info&cPath=66&products_id=181&zenid=0ea838ef2652a477ef007c3bea776f52

Click on the link: For more information, please visit this product's webpage. and it opens in a new window. I need these links to be seamless.

Answered in your other thread - But one way would be to have the top "Home" link renamed (header.php) in the defines to "Main Site" or something else that you might prefer and have that link href'd to your main page -That is what I wanted - I can't find the place to change that - unless you mean to change the name to "<a href="etc...">pagename</a>"

But truly, looking at your site, I would begin porting all of it to Zen Cart - one to have a seamless look and feel and other to make management much simpler.Except that would require yet another major block of time - I have run out of coding time, and MUST get back to full-time music with maintenance-light mode for the e=website.

Zen Cart can be massaged so that it will look 90+% just like your current main page and your other paged can be createdusing the ezpage functionality. JMO If I had started with ZenCart, this would have been a good option. This is a converted old-school html antique site, so CSS was enough of a challenge for one hiatus... Maybe in a year, when our gig cycle relaxes, but I'm just too busy preparing my music files to attempt another set of headaches.

If you can explain how to alter the href in the header.php define, that will resolve that issue and be very helpful, and if you can show me how to keep the web links also in the same screen, or eliminate the TAGRET reference, I'd be most grateful.

The Soundsmith.

19 Jun 2008, 8:43 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How do I open a product link in the same page, NOT a new one?

That is what I wanted - I can't find the place to change that - unless you mean to change the name to "<a href="etc...">pagename</a>"

To change the text that is displayed for the "Home" link at the top
find your template copy of header.php and change the red highlighted text

define('HEADER_TITLE_CATALOG', 'Home');

includes/languages/english/header.php and make a copy for your override directory

To change the link - Find this in your template override copy for tpl_header.php and change the red highlighted entry to your desired href

<!--bof-navigation display-->

<div id="navMainWrapper">

<div id="navMain">

    <ul class="back">

    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>

<?php if ($_SESSION['customer_id']) { ?>

includes/templates/template_default/common/tpl_header.php and make a copy for your override directory

It will end up resembling this

<li><a href=http://www.yoursite.com</a></li>

<?php if ($_SESSION['customer_id']) { ?>
19 Jun 2008, 8:59 PM
#5
thesoundsmith avatar

thesoundsmith

New Zenner

Join Date:
Jun 2008
Location:
Monterey, CA
Posts:
36
Plugin Contributions:
0

Re: How do I open a product link in the same page, NOT a new one?

Thanks again - this is getting confusing because of my double-posted question, but the first issue - resetting the Home link, is now fixed and your advice was very helpful.

My other question remains: how to make the Product Link remain in the same window, when I click it, it opens back to my main site in a new window. I assume there is a TARGET="_BLANK" reference somewhere that I'd like to eliminate, and hopefully not have to do so on each individual product page. You said you answered this, but I don't understand the answer (in either post...) Sorry, kind of slow-witted these days...:blink:

This is the link at the bottom of this page
Thanks again for any help you can give.

19 Jun 2008, 9:08 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How do I open a product link in the same page, NOT a new one?

this is getting confusing because of my double-posted question...

I assume there is a TARGET="_BLANK" reference somewhere that I'd like to eliminate, and hopefully not have to do so on each individual product page. You said you answered this, but I don't understand the answer (in either post...)
And why a question should only be posted in one thread

The already answered was in ref to the home page link

The href for the "webpage" link is designed for a link to a manufacturers page as a "product url" but it is in tpl_product_info_display.php and to remain dynamic will have to be some php

19 Jun 2008, 11:32 PM
#7
thesoundsmith avatar

thesoundsmith

New Zenner

Join Date:
Jun 2008
Location:
Monterey, CA
Posts:
36
Plugin Contributions:
0

Re: How do I open a product link in the same page, NOT a new one?

kobra:

And why a question should only be posted in one thread

The already answered was in ref to the home page link

The href for the "webpage" link is designed for a link to a manufacturers page as a "product url" but it is in tpl_product_info_display.php and to remain dynamic will have to be some php

Thanls. I'll look at it. If it works like the others, I can probably figure it out.

The Soundsmith