Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Using Images as Navigation


PHP_Newb

Recommended Posts

Hi I would like to use images to navigate through some of my site.

I would like to have buttons like Checkout and Shopping Cart Contents rather than just use the Breadcrumb Trail.

 

Is there a tutorial on how to do this. I have managed to get a Home page button working by using the sript that is used in the Banner had a look at the source of the code but am having difficulty understanding how to set the buttons so they get written with the customer session ID.

 

Thanks in advance.

 

Chris

Link to comment
Share on other sites

All you have to do is to use simple html code in includes/header.php, and as for the session id osCommerce will add this.

 

Vger

 

 

Oh really. Thats strange because when I have something in my shopping cart and go to checkout using the button it shows nothing yet when I click on the breadcrum it showed correct. I'll check when I get home later after work I was getting tired I have missed something for sure :P

 

Thanks Vger I am new to PHP and am assuming its more complex than it appears to be. Im enjoying learning something new and OSCommerce is a great way to learn. In at the deep end :)

Link to comment
Share on other sites

<a href="shopping_cart.php"><img src="images/yourcartimage.gif" width="whatever" height="whatever" alt="whatever" border=0></a>

 

That will do it.

 

Problems with losing items after adding to cart are more often caused by incorrect settings in includes/configure.php - declaring ssl when you don't have it, using http:// as part of http_cookie_domain setting etc.

 

Vger

Link to comment
Share on other sites

Oops :rolleyes: ok I see now I must have been tired.

Thanks for pointing me in the right direction.

 

<a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation">

      <?php echo HEADER_TITLE_CHECKOUT; ?>

Link to comment
Share on other sites

<a href="shopping_cart.php"><img src="images/yourcartimage.gif" width="whatever" height="whatever" alt="whatever" border=0></a>

 

That will do it.

 

Problems with losing items after adding to cart are more often caused by incorrect settings in includes/configure.php - declaring ssl when you don't have it, using http:// as part of http_cookie_domain setting etc.

 

Vger

 

 

Oh ok that simple.

yeah I definately had things dissapear from my Cart and then re-appear when I went back to home page etc.

I will have to look into it. Thanks again.

Link to comment
Share on other sites

Oh ok that simple.

yeah I definately had things dissapear from my Cart and then re-appear when I went back to home page etc.

I will have to look into it. Thanks again.

 

 

Well I have checked and my config is but still things dissapear from my shopping cart when I have the simple buttons as suggested does anyone have any ideas.

If I click on Shopping Cart in the breadcrumb they are there if I click on mmy image menu the contents go then when I return to home page they are gone for good.

Thanks

 

 

Config settings as follows:

 

 define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'localhost');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/shop/');
 define('HTTPS_COOKIE_PATH', '');

Link to comment
Share on other sites

OK for those who might need to know I had to use the following for my image buttons to grab the Session ID. Something like the following

 

<?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING) . '">' . tep_image(DIR_WS_IMAGES . 'my_basket_image.gif', 'New Account') . '</a>'; ?>

Link to comment
Share on other sites

Great job figuring it out. :) Wish I had seen this post earlier I coulda saved you some time. Without tep links the id gets lost whether it is text or image links.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...