Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Using the cart in folders other than "shop"


hogiedada

Recommended Posts

How does one use all of the configuration files for the shop in another directory... I want to use the cart application in other folders and not just in the "shop" folder.

 

For example: I have a folder on my root called "eCards". A default.php file in this folder calls require('../shop/includes/application_top.php');

 

It works fine in the "shop" folder but when relative paths are corrected for the other folder I end up with this error:

 

Fatal error: Failed opening required 'includes/configure.php' (include_path='.:/usr/local/lib/php') in /home/shop/public_html/shop/includes/application_top.php on line 34

 

I'd like to keep my folder structure in tact as there are many files to administer.

 

Cheers

My Epitaph: "I use to have intestinal fortitude."

Link to comment
Share on other sites

I believe what he is really wanting to do is something akin to what I did on MY site. (This is a live site BTW, so please dont tinker)

 

http://www.dragonscalecounters.com

 

The root has a structure like that of the actual store, which is at

 

http://www.dragonscalecounters.com/catalog.

 

My solution was rather painful. Configure.php and the definitions in application_top.php step all over each other when you try to reference them from other directories. What I ended up doing is copying the pieces necessary to duplicate the look (all of which reside in the includes directory) down into the root of my site. Then I edited the hell out of them to recreate the look. One problem that remains for me is the definitions for the catalog. I had to turn off caching to keep the catalog menu working correctly. :( I'd love to see someone write a addon or SOMETHING that would allow the rest of the site to keep a consistent look.

 

Eric Price

Link to comment
Share on other sites

Eric hit the nail on the head.... it sounds like a lot of work to have different cart files in each directory other than the catalog directory.

For now I guess everything will have to remain in the catalog directory.

 

Arghhh.

 

I'll try and fool around with it a bit but I am quite new to OSCommerce.

 

Cheers

My Epitaph: "I use to have intestinal fortitude."

Link to comment
Share on other sites

It is a tremendous amount of coding. I had considered rewriting oscommerce to be an entire website software package instead of just the store, but since I already have a day job AND a business, I doubt I have the time. The multi-lingual capabilities make OSC a great template for creating an entire multi-lingual website, complete with online store. Getting it done would require significant work though... :(

 

Eric Price

Link to comment
Share on other sites

I think this may do what I need:

 

In the configure file change

define('DIR_WS_INCLUDES', 'includes/');

to

define('DIR_WS_INCLUDES', '../catalog/includes/');

 

In the application_top file change

 

require('includes/configure.php');

 

to

 

require('../catalog/includes/configure.php');

 

So far no errors.... Kick Ass

My Epitaph: "I use to have intestinal fortitude."

Link to comment
Share on other sites

This type of definition wouldnt work for me because I wanted to have multiple folders at varying levels. For example, I needed

 

www.dragonscalecounters.com

www.dragonscalecounters.com/catalog

www.dragonscalecounters.com/pressreleases (with folders underneath)

 

Im pretty sure when I started putting stuff in the root folder it balked, because it was trying to point to some nonexistent place to look for its files...

 

Oh well. Im working for the moment. :D

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...