9, July 2008

db_cart document root - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  DB_cart Class (Moderator: Olaf)
Topic: db_cart document root
« previous next »
Pages: [1] Print

Author Topic: db_cart document root  (Read 1165 times)
My name is Bong, James Bong
*
Posts: 11
70 credits
Members referred : 0


« on: Jun 26, 2007, 03:32:18 PM »

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
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Jun 26, 2007, 03:39:04 PM »

what is the value for "CART_CLASS_PATH"?


Last blog : 4th of July Lottery from TemplateMonster.com
My name is Bong, James Bong
*
Posts: 11
70 credits
Members referred : 0


« Reply #2 on: Jun 27, 2007, 09:09:22 AM »

Hi, sorry for the delay, the value is set in db_config.php as

define("CART_CLASS_PATH", "/classes/db_cart/");
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Jun 27, 2007, 09:26:55 AM »

and your map "classes" is in the root of your hosting account? (the place where you main page is placed)


Last blog : 4th of July Lottery from TemplateMonster.com
My name is Bong, James Bong
*
Posts: 11
70 credits
Members referred : 0


« Reply #4 on: Jun 27, 2007, 01:13:27 PM »

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)
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Jun 27, 2007, 05:39:52 PM »

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


Last blog : 4th of July Lottery from TemplateMonster.com
My name is Bong, James Bong
*
Posts: 11
70 credits
Members referred : 0


« Reply #6 on: Jun 27, 2007, 05:56:17 PM »

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?
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #7 on: Jun 28, 2007, 08:52:32 AM »

this is your document root:

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

or just echo $_SERVER['DOCUMENT_ROOT']


Last blog : 4th of July Lottery from TemplateMonster.com
My name is Bong, James Bong
*
Posts: 11
70 credits
Members referred : 0


« Reply #8 on: Jun 28, 2007, 11:23:07 AM »

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
My name is Bong, James Bong
*
Posts: 11
70 credits
Members referred : 0


« Reply #9 on: Jun 28, 2007, 11:25:17 AM »

apologies, tried again and it worked, I think perhaps my changes hadn't uploaded correctly before.

Many thanks to all
My name is Bong, James Bong
*
Posts: 11
70 credits
Members referred : 0


« Reply #10 on: Jun 28, 2007, 11:38:54 AM »

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
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #11 on: Jun 28, 2007, 11:59:03 AM »

the question is if you want to use paypal for the amount or all order rows (shopping cart)

it depends on your situation


Last blog : 4th of July Lottery from TemplateMonster.com
My name is Bong, James Bong
*
Posts: 11
70 credits
Members referred : 0


« Reply #12 on: Jun 28, 2007, 01:48:19 PM »

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.
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #13 on: Jun 28, 2007, 02:12:14 PM »

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


Last blog : 4th of July Lottery from TemplateMonster.com
My name is Bong, James Bong
*
Posts: 11
70 credits
Members referred : 0


« Reply #14 on: Jun 28, 2007, 02:54:52 PM »

they have 3 categories and a total of about 30 products, not extensive
My name is Bong, James Bong
*
Posts: 11
70 credits
Members referred : 0


« Reply #15 on: Jun 28, 2007, 02:56:01 PM »

is there any tutorial you know of and would be good enough to point me to that outlines the work flow here?
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #16 on: Jun 28, 2007, 04:03:01 PM »

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 Wink


Last blog : 4th of July Lottery from TemplateMonster.com
My name is Bong, James Bong
*
Posts: 11
70 credits
Members referred : 0


« Reply #17 on: Jun 28, 2007, 04:11:29 PM »

OK, thanks all the same for your help!
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6857
Tags : [php] Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  DB_cart Class (Moderator: Olaf)
Topic: db_cart document root
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Jul 09, 2008, 01:16:59 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 35.590
Total Topics: 7.356
Total Members: 3.661
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: komrad

22 Guests, 5 Users online :

17 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.