Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Mini-cart (or other functionality) on a non-xcart page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 12-28-2006, 02:45 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Mini-cart (or other functionality) on a non-xcart page

Change <? to <?php, the cannot initiate program error indicates that the code is working correctly.

You need to change the necessary things in the code, beginning with:
require_once "/your/full/path/to/xcart/auth.php";
Reply With Quote
  #22  
Old 12-28-2006, 03:02 PM
 
pcarcare pcarcare is offline
 

eXpert
  
Join Date: Jun 2004
Location: Salt Lake City, Utah
Posts: 230
 

Default Re: Mini-cart (or other functionality) on a non-xcart page

The opening tag that I was using was <php? - still learning php. When I open the script with <? I get the error....

ERROR: Can not initiate application! Please check configuration.

Using <? for the opening tage and removing

"require_once "/home/myusername/public_html/store/auth.php";"

gives me this error....

Fatal error: Call to undefined function: x_session_register() in /home/myusername/public_html/ext_menu_cart.php on line 4

This makes me think that I am calling the auth.php file incorrectly. I am sure that I am using the proper path to the auth.php I verifed this path and confirmed it with xcart admin -> summary page.

I can't figure this out.........
__________________
X-cart gold 4.5.2 (live)
X-payments 1.0.5

http://www.professionalcarcare.com
Your online source for all your car care needs
Reply With Quote
  #23  
Old 12-28-2006, 03:42 PM
 
pcarcare pcarcare is offline
 

eXpert
  
Join Date: Jun 2004
Location: Salt Lake City, Utah
Posts: 230
 

Default Re: Mini-cart (or other functionality) on a non-xcart page

I added

@include_once $_SERVER['DOCUMENT_ROOT'] . "/store/top.inc.php";
@include_once "../top.inc.php";
@include_once "../../top.inc.php";

To auth.php and everything is working

Thanks for your help
__________________
X-cart gold 4.5.2 (live)
X-payments 1.0.5

http://www.professionalcarcare.com
Your online source for all your car care needs
Reply With Quote
  #24  
Old 12-28-2006, 04:42 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Mini-cart (or other functionality) on a non-xcart page

Excellent, glad I could help.
Reply With Quote
  #25  
Old 12-28-2006, 04:59 PM
 
pcarcare pcarcare is offline
 

eXpert
  
Join Date: Jun 2004
Location: Salt Lake City, Utah
Posts: 230
 

Default Re: Mini-cart (or other functionality) on a non-xcart page

Okay. I decided to work on the login form first. I got it working for the most part. I am using smarty on my pages outside xcart. I have setup a test index at http://www.professionalcarcare.com/index_test.php with my login form included in my home template I get this error....

Warning: Cannot modify header information - headers already sent by (output started at /home/myusername/public_html/Smarty-2.6.16/templates_c/%%63^631^6318A91D%% in /home/myusername/public_html/store/referer.php on line 61

Warning: Cannot modify header information - headers already sent by (output started at /home/myusername/public_html/Smarty-2.6.16/templates_c/%%63^631^6318A91D%% in /home/myusername/public_html/store/include/get_language.php on line 148

Warning: Cannot modify header information - headers already sent by (output started at /home/myusername/public_html/Smarty-2.6.16/templates_c/%%63^631^6318A91D%% in /home/myusername/public_html/store/include/get_language.php on line 149

Secondly when I call the login form directly at http://www.professionalcarcare.com/include/auth.php I can't login. It goes to the xcart error message "incorrect username or password" However, If I login from xcart and then go the external login form (/include/auth.php) it does show that I am logged in.

Any ideas what I can do to fix this problem?
__________________
X-cart gold 4.5.2 (live)
X-payments 1.0.5

http://www.professionalcarcare.com
Your online source for all your car care needs
Reply With Quote
  #26  
Old 12-28-2006, 05:52 PM
 
pcarcare pcarcare is offline
 

eXpert
  
Join Date: Jun 2004
Location: Salt Lake City, Utah
Posts: 230
 

Default Re: Mini-cart (or other functionality) on a non-xcart page

Just an update. I went ahead and created login.tpl and logout.tpl from the auth.php I earilier created. This corrects the "Warning: Cannot modify header information......"

However I still have the login problem.
__________________
X-cart gold 4.5.2 (live)
X-payments 1.0.5

http://www.professionalcarcare.com
Your online source for all your car care needs
Reply With Quote
  #27  
Old 11-07-2007, 04:06 PM
 
sjrconsulting sjrconsulting is offline
 

Newbie
  
Join Date: Nov 2007
Posts: 9
 

Default Re: Mini-cart (or other functionality) on a non-xcart page

Anybody use this on a 4.1.9 Cart?

Also, is there a reason why this would not work on a different domain? The cart is installed on the same server, just a different domain.

Thanks
Steve
__________________
X-Cart Gold: 4.1.9
PHP: 5.2.4
MySQL: 4.1.20
Apache/2.0.52
Reply With Quote
  #28  
Old 12-11-2007, 02:19 PM
 
polren polren is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 35
 

Default Re: Mini-cart (or other functionality) on a non-xcart page

Jon,

Have you (or someone else) tried this code on 4.1.x?
__________________
Polren
x-cart 4.1.7,
On Sale from alteredcart.com
One Page Checkout from alteredcart.com
XC-SEO
Reply With Quote
  #29  
Old 12-25-2007, 11:36 AM
 
typologist typologist is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 51
 

Default Re: Mini-cart (or other functionality) on a non-xcart page

Excellent, thanks for this. I tested in 4.1.8 and worked smoooothly
__________________
4.1.8 Gold (Unix)
Reply With Quote
  #30  
Old 03-19-2008, 12:43 PM
 
Deal-z Deal-z is offline
 

Newbie
  
Join Date: Apr 2007
Posts: 8
 

Default Re: Mini-cart (or other functionality) on a non-xcart page

I get this error:

Quote:
Could not connect to SQL db
Fatal error: Call to undefined function: x_session_register() in /*path*/carttest.php on line 31

Any ideas? Does the minicart have to be on the same domain, and IP?
__________________
V4.0.19gold

deal-z.com
moonsandkits.com
instasnow.com
handystitch.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:14 AM.

   

 
X-Cart forums © 2001-2020