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

Shopping Cart and Counter

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 03-12-2014, 01:35 PM
 
mworsnop mworsnop is offline
 

Senior Member
  
Join Date: Mar 2014
Posts: 140
 

Default Shopping Cart and Counter

Where can I find the Java code that shows the shopping basket icon with the # of items in the bag?

I would like to put that code on my home page if possible.
__________________
Mark Worsnop

vers 5.3.3
Reply With Quote
  #2  
Old 03-19-2014, 04:28 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Shopping Cart and Counter

There is no JavaScript code that defines the number of items in the bag. This HTML code is generated by PHP and then can be updated by JS.

Do I understand you correctly that you want to display cart widget on home page that is not a part of to X-Cart 5?
Reply With Quote
  #3  
Old 03-19-2014, 08:19 AM
 
mworsnop mworsnop is offline
 

Senior Member
  
Join Date: Mar 2014
Posts: 140
 

Default Re: Shopping Cart and Counter

I wanted to as I really dont have a way to design a home page in something like dreamweaver. What I have now was made in dreamweaver and the buy button goes to xcart. I will have to repeat the entries for every book both in dreamweaver and also in xcart as they are separate entities. But thats my problem. I am told there will be less than 20 items they are selling so not really a big problem. Its a little kludgy but I think it will be ok. Thank you Tony!
__________________
Mark Worsnop

vers 5.3.3
Reply With Quote
  #4  
Old 03-20-2014, 04:15 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Shopping Cart and Counter

OK, I see. In your case, you can write a mod that will create a piece of JS code that sends a request to X-Cart 5 core (via AJAX), pull customer's cart and then generate the cart widget that can be placed anywhere.

It will require some knowledge of JS and PHP as it will be quite complex task, but if you want to create it yourself, I will try to help you. Otherwise, you can order a paid modification from our techs:
http://www.x-cart.com/contact-us.html
Reply With Quote
  #5  
Old 03-20-2014, 07:30 AM
 
mworsnop mworsnop is offline
 

Senior Member
  
Join Date: Mar 2014
Posts: 140
 

Default Re: Shopping Cart and Counter

Actually I think figured it out about midnight last night. I just used PHP to make a SQL call and get the count.
__________________
Mark Worsnop

vers 5.3.3
Reply With Quote
  #6  
Old 07-01-2017, 12:26 AM
 
nuvar nuvar is offline
    
Join Date: Jul 2017
Posts: 1
 

Default Re: Shopping Cart and Counter

Hi, I am also looking for same from Australia but for Magneto, Help needed!
__________________
Protection!
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may 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 01:19 AM.

   

 
X-Cart forums © 2001-2020