| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Quick and dirty method to put another ajax-minicart in the header of each page | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I need to quickly put another cart status on the top of every page. I found a way to do it, but it has unintended consequences. Has anyone successfully done this?
If I cannot get the full ajax minicart, I at least need the basics. Cart items, cart dollar total I assume these are session variables, but am not quite sure how to best pull them.
__________________
X-Cart Pro 4.1.10, 4.3.1, 4.2.x, 4.3, 4.4.3, 4.5.5, Platinum 4.6 Add-on: X-Affiliate Fashion Mosaic Add-on: X-SpecialOffers Add-on: X-GiftRegistry Add-on: X-AOM (Advanced Order Management) Add-on: X-FancyCategories Add-on: Custom Multi-currency |
|||||||
#2
|
|||||||
|
|||||||
![]() There is no ajax in 4.1.10 - is this an add-on or are you using a version different than the one in your signature?
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() I have many installations of x-cart for various clientele. This case is for 4.3.1.
__________________
X-Cart Pro 4.1.10, 4.3.1, 4.2.x, 4.3, 4.4.3, 4.5.5, Platinum 4.6 Add-on: X-Affiliate Fashion Mosaic Add-on: X-SpecialOffers Add-on: X-GiftRegistry Add-on: X-AOM (Advanced Order Management) Add-on: X-FancyCategories Add-on: Custom Multi-currency |
|||||||
#4
|
|||||||
|
|||||||
![]() Ah, kind of need to know that info when posting
![]()
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
![]() Yes, but the way it is working is rather conditional. I need it to show up in the header always, but on the left bar on product catalog pages, front page, etc.
See the following: http://www2.devita.net/store/ Note the navbar is not working properly, so just use either categories or bestsellers list to navigate. Many thanks for the help! -jason
__________________
X-Cart Pro 4.1.10, 4.3.1, 4.2.x, 4.3, 4.4.3, 4.5.5, Platinum 4.6 Add-on: X-Affiliate Fashion Mosaic Add-on: X-SpecialOffers Add-on: X-GiftRegistry Add-on: X-AOM (Advanced Order Management) Add-on: X-FancyCategories Add-on: Custom Multi-currency |
|||||||
#6
|
|||||||||
|
|||||||||
![]() In Jason's defense he did post under 4.2 / 4.3 template editing.
|
|||||||||
#7
|
|||||||
|
|||||||
![]() Is something like at http://www.mommysown.com like what you are looking for?
__________________
Xcart 4.6.5 gold Apache 2.2.29 PHP 5.4.34 MySQL 5.6.17 |
|||||||
#8
|
|||||||
|
|||||||
![]() Similar, but in the top right, so I think the answer would be yes. Was it difficult?
__________________
X-Cart Pro 4.1.10, 4.3.1, 4.2.x, 4.3, 4.4.3, 4.5.5, Platinum 4.6 Add-on: X-Affiliate Fashion Mosaic Add-on: X-SpecialOffers Add-on: X-GiftRegistry Add-on: X-AOM (Advanced Order Management) Add-on: X-FancyCategories Add-on: Custom Multi-currency |
|||||||
#9
|
|||||||
|
|||||||
![]() Quote:
So, where's your server config in your signature?
__________________
X-Cart Pro 4.1.10, 4.3.1, 4.2.x, 4.3, 4.4.3, 4.5.5, Platinum 4.6 Add-on: X-Affiliate Fashion Mosaic Add-on: X-SpecialOffers Add-on: X-GiftRegistry Add-on: X-AOM (Advanced Order Management) Add-on: X-FancyCategories Add-on: Custom Multi-currency |
|||||||
#10
|
|||||||
|
|||||||
![]() Quote:
Sorry for the delay....in the end I guess it wasn't too difficult but man the css is crazy ![]() Since I have my "extra" minicart located in the auth div I pretty much just copied the existing attributes for the minicart and put them at the bottom of main.css like where I could individually tweak them without effecting the main minicart. .auth .minicart-block { height: 25px; background: #a3cbf9; position: relative; } .auth .minicart { padding-left: 30px; line-height: 25px; vertical-align: middle; white-space: nowrap; } .auth .minicart a { float: none; } .auth img.full { margin: 10px 4px auto auto; width: 23px; height: 12px; background: transparent url(images/fashion_mosaic/cart.gif) no-repeat left top; } .auth img.ajax-minicart-icon { position: relative; left: 0px; top: 0px; } .auth img.empty { margin: 5px 4px auto auto; width: 23px; height: 12px; background: transparent url(images/fashion_mosaic/cart.gif) no-repeat left top; } .auth .ajax-minicart img.minicart-button { background-image: url(images/fashion_mosaic/cart_button.gif); width: 38px; height: 21px; cursor: pointer; overflow: hidden; margin-top: 3px; margin-bottom: 2px; position: absolute; } .auth .ajax-minicart img.minicart-button-show { background-position: left -21px; } For the actual "link" to the minicart I created a custom menucart.tpl file(do something like menucart_custom.tpl or however you like your directory or naming scheme) and link to it from within the header where you want it. Mine probably won't help except for an idea but it is..and it's xcart v4.3.2 {* $Id: menu_cart.tpl,v 1.51 2009/06/24 07:45:22 max Exp $ vim: set ts=2 sw=2 sts=2 et: *} <script type="text/javascript"> <!-- var lbl_error = '{$lng.lbl_error|wm_remove|escape:javascript}'; var txt_minicart_total_note = '{$lng.txt_minicart_total_note|wm_remove|escape:ja vascript}'; --></script> {if $config.General.ajax_add2cart eq 'Y' && $config.General.redirect_to_cart ne 'Y' && $main ne 'cart' && $main ne 'anonymous_checkout' && $main ne 'checkout'} {include file="customer/ajax.minicart.tpl" _include_once=1} {/if} <script type="text/javascript" src="{$SkinDir}/jquery.tooltip.min.js"></script> {capture name=menu} <div class="minicart-block"> <img src="{$ImagesDir}/spacer.gif" class="ajax-minicart-icon {if $minicart_total_items gt 0}full{else}empty{/if}" alt="" /> {include file="customer/minicart_total.tpl"} </div> {/capture} {if $config.General.ajax_add2cart eq 'Y' && $config.General.redirect_to_cart ne 'Y' && $main ne 'cart' && $main ne 'anonymous_checkout' && $main ne 'checkout' && $minicart_total_items gt 0} {assign var=additional_class value="menu-minicart ajax-minicart"} {else} {assign var=additional_class value="menu-minicart"} {/if} {if $minicart_total_items gt 0} {assign var=additional_class value="`$additional_class` full-mini-cart"} {/if} {include file="customer/custom/menu_dialog.tpl" title=$lng.lbl_your_cart content=$smarty.capture.menu} you'll see that towards the end I had a link to a custom menu_dialog.tpl file which had a bunch of the extra stuff in that file I did not want displayed in the minicart in the auth div but wanted the main file left alone for it's full display in it's default xcart location. Hopefully this helps
__________________
Xcart 4.6.5 gold Apache 2.2.29 PHP 5.4.34 MySQL 5.6.17 |
|||||||
|
|||
X-Cart forums © 2001-2020
|