Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Items dissappearing when added to cart, possibly to do with hard coded links?


tuna1

Recommended Posts

Hi there the site in question is

 

http://www.macro-solutions.co.uk/catalog2/catalog/index.php

 

And the problem as you'll see for yourselves is that when you add an item to the shopping cart it will appear clearly in the category/product pages. But when you go to the catalog homepage it simply dissapears?! The same happens with logging into 'my_account.php', you click it but it keeps asking you to log in. I have no idea how this is happening and hopefully there is a solution for it.

 

Many thanks, James

Link to comment
Share on other sites

Hi there the site in question is

 

http://www.macro-solutions.co.uk/catalog2/catalog/index.php

 

And the problem as you'll see for yourselves is that when you add an item to the shopping cart it will appear clearly in the category/product pages. But when you go to the catalog homepage it simply dissapears?! The same happens with logging into 'my_account.php', you click it but it keeps asking you to log in. I have no idea how this is happening and hopefully there is a solution for it.

 

Many thanks, James

Your page is coming up with a page could not be found error... Are there supposed to be 2 catalog directories that it's under? (/catalog2/catalog/)...

 

Richard.

Richard Lindsey

Link to comment
Share on other sites

Hi Richard yes that is the directory structure! it seems to be working fine for me that is

 

http://www.macro-solutions.co.uk/catalog2/catalog/index.php

 

You need to call all your links using the tep_ref_link fuinction :

function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true)

 

 

examples :

tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' . $best_sellers['products_name'] . '</a>

 

<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>

 

<?php echo '<b>' . HEADING_ORDER_COMMENTS . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?>

Link to comment
Share on other sites

Thanks for the info David but i'm afraid i'm not sure where i'd place this code, where do i call these links, i'm using the simple template system and therefore it's literally just a html file which i'v coded the h ref links into. I really appreciate your help!

Link to comment
Share on other sites

Thanks for the info David but i'm afraid i'm not sure where i'd place this code, where do i call these links, i'm using the simple template system and therefore it's literally just a html file which i'v coded the h ref links into. I really appreciate your help!

 

well - I can't see your php obviously, but instead of linking like this :

<a href="http://macro-solutions.co.uk/catalog2/catalog/index.php"><img src="images/menuhome.gif" border="0"></a>

 

you need to link somethjing like this :

<a href="' . tep_href_link(HTTP_SERVER. '" . tep_image(DIR_WS_IMAGES . 'menuhome.gif.'></a>';

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...