Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to put "shopping cart : 0 items" outside of oscommerce?


certify

Recommended Posts

Posted

I have a few .php pages which are on the root directory and oscommerce are installed on /shop folder.

 

My question is how do i make "Shopping Cart: 0 items" to appear on my other non-oscommerce pages?

Posted

You could use a contribution such as http://addons.oscommerce.com/info/6599 which will help with displaying the cart info. Add the parts from the image_in_cart.php file into your other php pages.

 

Then to make it all work add this above your head in the new pages, change the parts needed to suit your specific site.

 

chdir('/home/***/public_html/');
require('includes/application_top.php');

 

 

If the currencies on the pages mess up then in includes\boxes\currencies.php change

 

$info_box_contents[] = array('form' => tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'),

to

 

$info_box_contents[] = array('form' => tep_draw_form('currencies', tep_href_link($PHP_SELF, '', $request_type, false), 'get'),

 

 

This section is for people who HAVE tips to share, not for people who NEED tips.

Posted
My question is how do i make "Shopping Cart: 0 items" to appear on my other non-oscommerce pages?

via server side include or add some osc checkout function to non-oscommerce pages

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Posted

Thanks for the tip... However I got this error when i try to access oscommerce

 

Fatal error: Call to a member function add_current_page() on a non-object in /home/janlevin/public_html/shop/includes/application_top.php on line 312

Posted

I fixed the error.. found this in google.

 

Open /includes/application_top.php

 

if (tep_session_is_registered(’navigation’))
{
if (PHP_VERSION < 4)
{
$broken_navigation = $navigation;
$navigation = new navigationHistory;
$navigation->unserialize($broken_navigation);
}
}
else
{
tep_session_register(’navigation’);
$navigation = new navigationHistory;
}
$navigation->add_current_page();

 

Replace with

 

// navigation history
if (tep_session_is_registered(’navigation’)) {
if (PHP_VERSION < 4) {
$broken_navigation = $navigation;
$navigation = new navigationHistory;
$navigation->unserialize($broken_navigation);
} else {
$navigation = new navigationHistory;
}
} else {
tep_session_register(’navigation’);
$navigation = new navigationHistory;
}

$navigation->add_current_page();

Posted

I'm facing one issue is that I keep getting "Shopping Cart: 0 items" on my custom php pages while oscommerce shows there are items in the cart.

 

I set cookies = true

Posted

This is how i link my pages without losing the ssid.. I hope i'm right.. Can someone point me to the right direction.

<div id="navcontainer">

<ul id="navlist">
<li><img src="/images/logo.png" alt=""></li>
<li id="active"><a href="<?php echo tep_href_link('../index.php', '', 'NONSSL'); ?>" id="current">Home</a></li>
<li><a href="<?php echo tep_href_link('index.php', '', 'NONSSL'); ?>">Collections</a></li>
<li><a href="<?php echo tep_href_link('../payment.php', '', 'NONSSL'); ?>">Payment & Shipping</a></li>
<li><a href="<?php echo tep_href_link('../about.php', '', 'NONSSL'); ?>">About us</a></li>
<li><a href="<?php echo tep_href_link('contact_us.php', '', 'NONSSL'); ?>">Contact Us</a></li>
</ul>		 

</div>

  • 2 weeks later...

Archived

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

×
×
  • Create New...