calebic Posted March 5, 2006 Posted March 5, 2006 Hi All, I currently have OSCommerce installed in a directory named "store". Many of my previous site pages are running at the root directory of the site, and I am wondering how I can access the cart boxes (i.e. the shopping cart and what's new boxes) from the root level. I can probably just reinstall OSCommerce at the root level, but I would like to keep the cart files separate from the rest of my site. Any thoughts are greatly appreciated! Caleb
Guest Posted March 5, 2006 Posted March 5, 2006 one way is to try the external sessions contribution. http://www.oscommerce.com/community/contributions,3257
calebic Posted March 5, 2006 Author Posted March 5, 2006 Thanks Enigma! I'm a bit new to php, and was wondering if you have been able to get this contribution to work. I have placed the sessions.class.php file in my store directory, but I'm not really sure where to go from here. I've also included the top include files (as in the example.php file) on my root level test page, which seem to be linked just fine. However when I try to include certain files from the cart, I am getting "call to undefined functions" errors. Thanks again! I really appreciate the knowledge exchange! ========= Below is my test file =========== <?php //// change the paths below to match your site!! include_once('store/includes/configure.php'); include_once('store/includes/database_tables.php'); include_once('store/sessions.class.php'); ?> <!-- this link will be autiomatically rewritten with osCsid if cookies are disabled --> <div><a href="index.php">Index</a></div> <!-- output the session data for verification --> <pre> <? print_r($_SESSION); ?> </pre> | <?php if (tep_session_is_registered('customer_id')) { ?> <a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> <br> | <?php } ?> <a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> <br> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> <br> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </span>
Guest Posted March 5, 2006 Posted March 5, 2006 there is a bunch of files and classes associated with the cart itself. This contribution will help for example to set few links to the main store from the root page. It's not to operate the entire shopping cart from the outside. If you need to include other functionality you have to port it from the application_top.php that's the main file that pulls everything in.
calebic Posted March 6, 2006 Author Posted March 6, 2006 Thanks again Enigma. That was my thinking exactly, using the application_top.php file to port the boxes, however when I try to link to the application_top.php file in my store/includes/ directory, all the links in that file are erroring out. I'm thinking it's because the file I'm calling application_top.php from is actually in the root directory. I've also tried to duplicate application_top.php in the root directory and update all the links to point down to store/includes/, but that seemed to break other functionality. Mainly what I would like to do is place the "shopping cart", "information", and "what's new" boxes to all my other site pages, in the root directory. Any advice is greatly appreciated! Thanks again!
calebic Posted March 8, 2006 Author Posted March 8, 2006 Has no one (except Enigma) ever tried to pull functionality up a level from the cart directory? Any thoughts are greatly appreciated!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.