Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Link Error


gatorsdb22

Recommended Posts

Hello. I have a link issue where when you click on the image in the top right that says "Shopping Cart," it's pointing to http://lovebugsdiaperbags.com/'.tep_hr...ING_CART).' However, it needs to be pointing to the actual shopping cart, which is this link "http://lovebugsdiaperbags.com/shopping_cart.php." I've looked everywhere and cannot figure out where to go to change that part in the code. Oh, and here's the link to the actual site. Thanks for all your help!

Link to comment
Share on other sites

seems to be working just fine to me. I clicked shopping cart and it brought me to shopping_cart.php which had no items in the cart.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Since you have a template I'm not sure where its at. In stock osc it is in catalog/includes/boxes/shopping_cart.php. See if you have that and check for that link there.

Link to comment
Share on other sites

Since you have a template I'm not sure where its at. In stock osc it is in catalog/includes/boxes/shopping_cart.php. See if you have that and check for that link there.

 

I looked there and it was indeed there. But when I tried to change the link, it still brought up the old page...even after I cleared my cache and everything. I changed this: new infoBoxHeading($info_box_contents, false, true, tep_href_link(FILENAME_SHOPPING_CART); to this: new infoBoxHeading($info_box_contents, false, true, tep_href_link(http://lovebugsdiaperbags.com/shopping_cart.php);

 

But it didn't fix it....Any ideas why? Thanks for all your help!

Link to comment
Share on other sites

i figured out where you were talking about.. sorry about that.

 

When i click on the properties of your shopping cart link, yours shows 'tep_href_link(FILENAME_SHOPPING_CART); but when i compared it to the properties of my own, it shows catalog/shopping_cart.php but you said by changing the target to shopping_cart.php, nothing changed..

 

 

Try changing it to

 

new infoBoxHeading($info_box_contents, false, true, <a href="http://lovebugsdiaperbags.com/shopping_cart.php">class="your text classt">Shopping Cart</a>

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

The shopping cart Box you are using has been modified, and the link to it is wrong.

 

I don't know if the link is in the includes/header.php file or in the includes/column_right.php file - difficult to tell with templates.

 

But the link should be:

 

require(DIR_WS_BOXES . 'shopping_cart.php');

 

Vger

Link to comment
Share on other sites

The shopping cart Box you are using has been modified, and the link to it is wrong.

 

I don't know if the link is in the includes/header.php file or in the includes/column_right.php file - difficult to tell with templates.

 

But the link should be:

 

require(DIR_WS_BOXES . 'shopping_cart.php');

 

Vger

 

I looked in the includes/header.php and "require(DIR_WS_BOXES . 'shopping_cart.php');" was there correctly. So i went and looked at the includes/column_right.php file and I found the messed up part and changed it...or so I thought. But it ended up not working. Here's the code for the includes/column_right.php file. I bolded the part that keeps showing up in the URL when the box is clicked. I also tried changing the bolded part to "http://lovebugsdiaperbags.com/shopping_cart.php", but that didn't work either:

 

<?php

/*

$Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $

 

E-Commerce Solutions

 

Released under the GNU General Public License

*/

//require(DIR_WS_BOXES . 'shopping_cart.php');

 

?>

 

<tr>

<td width="100%" valign="top" align="left" style="padding-left:8px; padding-top:0px; font:11px Tahoma; color:#FFFFFF; background: url(images/shopping_cart_bg.gif) top no-repeat;"><div class="shopping_cart" align="left"><a href="'.tep_href_link(FILENAME_SHOPPING_CART).'">Shopping cart</a></div>now in your cart<br><font color="#DB0036" point-size="11px"><?php echo sizeof($products = $cart->get_products()); ?> items</font></td>

</tr>

 

<?php

require(DIR_WS_BOXES . 'search.php');

require(DIR_WS_BOXES . 'whats_new.php');

// if (isset($HTTP_GET_VARS['products_id'])) {

include(DIR_WS_BOXES . 'specials.php');

// }

 

?>

Link to comment
Share on other sites

hmm did you not try my solution?? it worked fine for me.. and i have a custom cart kinda like yours.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

hmm did you not try my solution?? it worked fine for me.. and i have a custom cart kinda like yours.

 

I did try it. Thanks for the suggestion! Sorry, I meant to post back and thank you. But unfortunately, it didn't work either. I copied and pasted exactly was you suggested I try. This is frustrating!

Link to comment
Share on other sites

Try changing it to

 

new infoBoxHeading($info_box_contents, false, true, <a href="http://lovebugsdiaperbags.com/shopping_cart.php">class="your text classt">Shopping Cart</a>

Never hard code your links in. Use the tep_href function. That is what carries the session through. Without it you can break your cart.

 

I looked in the includes/header.php and "require(DIR_WS_BOXES . 'shopping_cart.php');" was there correctly. So i went and looked at the includes/column_right.php file and I found the messed up part and changed it...or so I thought. But it ended up not working. Here's the code for the includes/column_right.php file. I bolded the part that keeps showing up in the URL when the box is clicked. I also tried changing the bolded part to "http://lovebugsdiaperbags.com/shopping_cart.php", but that didn't work either:

 

<?php

/*

$Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $

 

E-Commerce Solutions

 

Released under the GNU General Public License

*/

//require(DIR_WS_BOXES . 'shopping_cart.php');

 

?>

 

<tr>

<td width="100%" valign="top" align="left" style="padding-left:8px; padding-top:0px; font:11px Tahoma; color:#FFFFFF; background: url(images/shopping_cart_bg.gif) top no-repeat;"><div class="shopping_cart" align="left"><a href="'.tep_href_link(FILENAME_SHOPPING_CART).'">Shopping cart</a></div>now in your cart<br><font color="#DB0036" point-size="11px"><?php echo sizeof($products = $cart->get_products()); ?> items</font></td>

</tr>

 

<?php

require(DIR_WS_BOXES . 'search.php');

require(DIR_WS_BOXES . 'whats_new.php');

// if (isset($HTTP_GET_VARS['products_id'])) {

include(DIR_WS_BOXES . 'specials.php');

// }

 

?>

You kind of have a mess here. The column_right.php should be require(DIR_WS_BOXES . 'shopping_cart.php');

which brings in the shopping_cart.php from includes/boxes/shopping_cart.php. However if this is the way you want to do it then you need to use php with the tep_href link

Try changing

<a href="'.tep_href_link(FILENAME_SHOPPING_CART).'">

To

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>">

If you want to put a class in there then do so like

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="set_your_class_here">

Link to comment
Share on other sites

Never hard code your links in. Use the tep_href function. That is what carries the session through. Without it you can break your cart.

 

 

You kind of have a mess here. The column_right.php should be require(DIR_WS_BOXES . 'shopping_cart.php');

which brings in the shopping_cart.php from includes/boxes/shopping_cart.php. However if this is the way you want to do it then you need to use php with the tep_href link

Try changing

<a href="'.tep_href_link(FILENAME_SHOPPING_CART).'">

To

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>">

If you want to put a class in there then do so like

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="set_your_class_here">

 

Wow. That worked perfectly! Thanks so much!!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...