Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing link destination


fromthe5

Recommended Posts

If I add a product to the cart, and at some point remove it from the cart, and click on the "Continue" button in the window that comes up (/store/shopping_cart.php), it takes me to index.php. I need to change the link destination of that button to a different page. How and where do I do that?

Link to comment
Share on other sites

If I add a product to the cart, and at some point remove it from the cart, and click on the "Continue" button in the window that comes up (/store/shopping_cart.php), it takes me to index.php. I need to change the link destination of that button to a different page. How and where do I do that?

 

 

edit shopping_cart.php

 

find the code

 

<?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?>

 

 

you could change this to

 

<a href="yoururl.php"><img src="pathtocontinuebuttonimage.gif" border="0"></a>

 

 

this will just hard code the link to whatever page you want

Link to comment
Share on other sites

If you don't use the osC tep_href_link(...) PHP function to create links within osCommerce there's a good chance you'll lose the session ID and dump the cart...

:o

 

At least if it happens you'll know why.

;)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

If you don't use the osC tep_href_link(...) PHP function to create links within osCommerce there's a good chance you'll lose the session ID and dump the cart

Errr... That didn't happen, but I restored the original code. I'm still stuck with the wrong page coming up. Any other suggestions?

Link to comment
Share on other sites

It still takes me to index.php

Probably because that's what you told it to do...

:huh:

 

<a href="http://mydomain.com/store/index.php?cPath=22">

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

So you're saying that I should us both the absolute link AND keep the tep_href_link(...) PHP function?

No.

 

Just where do you want it to link to?

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Well seeing that I don't have any page except the home page of the site that has all the products on it, I guess I'll link back to that so they can continue or start to shop again from there.

 

 

but what it was doing in the first place ... I'm puzzled ... if you didn't want it to go back to index.php you must have an idea of where you wanted the Continue button to link to ?

Link to comment
Share on other sites

Not index.php.... but index.html

 

 

you quoted this code

 

Ok, I used this line: <a href="http://mydomain.com/store/index.php?cPath=22"><img src="/public_html/store/includes/languages/english/images/buttons/button_continue.gif" border="0"></a>

 

It still takes me to index.php

 

change it to

 

 

<a href="http://mydomain.com/store/yourpagename.html"><img src="/public_html/store/includes/languages/english/images/buttons/button_continue.gif" border="0"></a>
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...