Sublime directory Surf the web anonymous Pagerank Monitor


db_cart document root

zephyr
Tue 26 June 2007, 02:32 pm GMT +0200
Hi,
I noticed another post detailing how much of the document root is required in pages...cart_example.php etc? If I addd the whole path, it still says it can't locate the related files. In db_config.php I have specified...

define("CART_CLASS_PATH", "/classes/db_cart/");

should it follow that the code below is OK?

require($_SERVER['DOCUMENT_ROOT']."/classes/db_cart/db_config.php");

many thanks

olaf
Tue 26 June 2007, 02:39 pm GMT +0200
what is the value for "CART_CLASS_PATH"?

zephyr
Wed 27 June 2007, 08:09 am GMT +0200
Hi, sorry for the delay, the value is set in db_config.php as

define("CART_CLASS_PATH", "/classes/db_cart/");

olaf
Wed 27 June 2007, 08:26 am GMT +0200
and your map "classes" is in the root of your hosting account? (the place where you main page is placed)

zephyr
Wed 27 June 2007, 12:13 pm GMT +0200
Hi, again, sorry for a delay here, your help is much appreciated, I'm online for a while now,

classes is a folder within htdocs and my index (main) page resides there as a single file (i.e. not within a folder)

olaf
Wed 27 June 2007, 04:39 pm GMT +0200
if you use the same folder structure like me (root/classes/db_cart?

it should work, the pathes in the cofig file are used inside the email and on several pages for navigation

zephyr
Wed 27 June 2007, 04:56 pm GMT +0200
the trouble is I'm not sure what is 'root' on the server. The full path (I'm given) is \\nas33ent\domains\w\woodcymru.e-concepts.co.uk\user\htdocs\classes\db_cart\db_cart_example.php
how much do I use?

olaf
Thu 28 June 2007, 07:52 am GMT +0200
this is your document root:

\\nas33ent\domains\w\woodcymru.e-concepts.co.uk\user\htdocs\

or just echo $_SERVER['DOCUMENT_ROOT']

zephyr
Thu 28 June 2007, 10:23 am GMT +0200
Yes, I thought so, but when I enter it I get the following error message

Warning: main(/classes/db_cart/db_config.php): failed to open stream: No such file or directory in //nas33ent\domains\w\woodcymru.e-concepts.co.uk\user\htdocs\classes\db_cart\db_cart_class.php on line 22

Fatal error: main(): Failed opening required '/classes/db_cart/db_config.php' (include_path='.;c:\php4\pear') in //nas33ent\domains\w\woodcymru.e-concepts.co.uk\user\htdocs\classes\db_cart\db_cart_class.php on line 22

zephyr
Thu 28 June 2007, 10:25 am GMT +0200
apologies, tried again and it worked, I think perhaps my changes hadn't uploaded correctly before.

Many thanks to all

zephyr
Thu 28 June 2007, 10:38 am GMT +0200
Sorry, one last question....I'm hoping to integrate paypal with db_cart and I know that Dreamweaver can generate my paypal button code, but I wondered if I should use paypal's IPN to inform my client of orders made or whether or not db_cart can be employed to track orders and stock alongside paypal?

Thanks in advance

olaf
Thu 28 June 2007, 10:59 am GMT +0200
the question is if you want to use paypal for the amount or all order rows (shopping cart)

it depends on your situation

zephyr
Thu 28 June 2007, 12:48 pm GMT +0200
I don't know..its the first e-commerce site I've built, my client has a paypal business account, so I began by trying to integrate this into my design, soon discovered that although I could easily take payments without a database, I was going to have to use one for products etc and to track orders. I looked around for a free cart and found db_cart and am now looking for the next step...as I said, for a solution that will inform both customer and client of purchase. If I have to start from scratch and hand-code, I will, just thought there must be some existing solution, but am confused as to the flow of the whole process and integrating the 2 systems.

olaf
Thu 28 June 2007, 01:12 pm GMT +0200
I guess it depends on the number of products and if your products are dynamic.

using the IPN is important if after the payment you need to change somthing in your application

zephyr
Thu 28 June 2007, 01:54 pm GMT +0200
they have 3 categories and a total of about 30 products, not extensive

zephyr
Thu 28 June 2007, 01:56 pm GMT +0200
is there any tutorial you know of and would be good enough to point me to that outlines the work flow here?

olaf
Thu 28 June 2007, 03:03 pm GMT +0200
is there any tutorial you know of and would be good enough to point me to that outlines the work flow here?

never saw one, I think it's just experience to know which is the right solution ;)

zephyr
Thu 28 June 2007, 03:11 pm GMT +0200
OK, thanks all the same for your help!

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional