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

Custom minicart in topnav

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-22-2012, 09:45 PM
 
aitek aitek is offline
 

Advanced Member
  
Join Date: Jul 2010
Posts: 77
 

Default Custom minicart in topnav

Hey guys Im creating a top nav that will be used throughout the site not just in the cart pages and I want to incorporate a mini-mini-cart in the header, just something that says "view cart" and "#" which shows how many items are in the cart, I got the number working using {$minicart_total_items} but when I click add to cart it doesnt automatically update the cart# like the minicart does, it does not show until I refresh the page.

Anyone know which part of the code I need to insert to make it update realtime? Thanks
__________________
X-Cart DB Version: 4.4.4 GOLD Addons:Feature Comparison (enabled);Magnifier (enabled); Product Configurator (enabled); Special Offers (enabled); Survey (enabled); XAffiliate (enabled);
Reply With Quote
  #2  
Old 02-22-2012, 10:31 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Custom minicart in topnav

All this works with the ajax, you need to get a lot from the minicart css as the ajax is looking for specific css id's and classes
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
aitek (02-22-2012)
  #3  
Old 02-22-2012, 10:39 PM
 
aitek aitek is offline
 

Advanced Member
  
Join Date: Jul 2010
Posts: 77
 

Default Re: Custom minicart in topnav

Ah, ok I wasnt grabbing those classes because I thought they were style only, Ill try that thanks.
__________________
X-Cart DB Version: 4.4.4 GOLD Addons:Feature Comparison (enabled);Magnifier (enabled); Product Configurator (enabled); Special Offers (enabled); Survey (enabled); XAffiliate (enabled);
Reply With Quote
  #4  
Old 02-23-2012, 10:27 AM
 
Cpt.Crashtastic Cpt.Crashtastic is offline
 

eXpert
  
Join Date: Jan 2006
Posts: 219
 

Default Re: Custom minicart in topnav

If you wrap the cart with an id instead of class it makes it easier to reuse the existing classes.
__________________
Xcart 4.4.?
Xcart Next
Litecommerce with Drupal
http://www.corbywebworx.com

Custom Mods, Hosting and Support for Xcart-Next and LiteCommerce
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 12:05 AM.

   

 
X-Cart forums © 2001-2020