| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Mouseover Minicart | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Mouseover Minicart
yo,
this isn't really a custom mod...i "liberated" the idea from another site - http://www.carolsdaughter.com/ and "stumbled" upon a freebie code from good ole dynamicdrive - http://www.dynamicdrive.com/dynamicindex5/overlapcontent.htm ... i'm so creative on the example site, when you hover over the shopping bag, it shows you the contents. of the cart. you can't remove items from your bag but given the existing x-cart minicart.tpl file, customers will have the option of removing an item without having to actually be on the shopping cart page. it's also a good option if you like the idea of a minicart but dont like the existing display. create a js file called dropdown.js then upload dropdown.js file to the skin1/customer directory. then add this before the head tag in /customer/home.tpl Code:
then i created a file called minicartdd.tpl, inserted the following code and uploaded it to the /customer/main directory. notice that i actually have the shopping bag link in a table. you will have to adjust this according to your site. i removed the other columns that i had in my original code for this initial table to make things a bit simpler. also, i did not change the original "id" for the dynamicdrive script so the id that's being referenced is id="searchlink". you of course can change this by replacing all instances of "searchlink" with "minicartdropdown" or whatever. Code:
then in head_customer.tpl or head.tpl depending on which file your site uses, i added this to where i wanted the minicart to appear. Code:
you can edit the display in the minicartdd.tpl file. that's pretty much it.
__________________
X-Cart Gold 4.4.3 -------------------------------------- |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: Mouseover Minicart
Looks pretty nifty. Exactly what did you put in your dropdown.js?
Thanks |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: Mouseover Minicart
hmm...i actually reference the wrong link from dynamic drive. i edited the original post to reflect this. the code for dropdown.js can be accessed here...
http://www.dynamicdrive.com/dynamicindex5/overlapcontent.htm or this is what i have in my file... Code:
oh and just so you know, this script only allows for a specific orientation of the cart. either -"left-bottom", "right-bottom", "left-top", and "right-top." so unlike the sample site, where the shopping cart displays in-line and directly under the shopping bag table, this either justifies it to the left or right but it's a minor ick-factor. also, i forgot to add that i reference a background image for my minicart which is noted as - /xcart/images/sunflower02.gif in the above code. you can either remove the background or add your own. OR remove the 2 instances of this code from minicartdd.tpl altogether.... Code:
__________________
X-Cart Gold 4.4.3 -------------------------------------- |
|||||||||
#4
|
|||||||||
|
|||||||||
Re: Mouseover Minicart
Ahh, that makes more sense. I am getting the following error on my local server.
"anchorobj has no properties" Any idea what may be causing this? Thanks |
|||||||||
#5
|
|||||||||
|
|||||||||
Re: Mouseover Minicart
yeah, my bad. i edited the original post...again.
the following code should have gone before the main DIV in minicartdd.tpl Code:
so in your case, just replace what you have in your minicartdd.tpl with what's now in the original post.
__________________
X-Cart Gold 4.4.3 -------------------------------------- |
|||||||||
#6
|
|||||||||
|
|||||||||
Re: Mouseover Minicart
Ah, finally got it to work! You forgot to add the id to the div in minicartdd.tpl
Code:
Now all have to do is tweek it to fit my layout! Great mod Thanks. |
|||||||||
#7
|
|||||||||
|
|||||||||
Re: Mouseover Minicart
kewl
__________________
X-Cart Gold 4.4.3 -------------------------------------- |
|||||||||
#8
|
|||||||||
|
|||||||||
Re: Mouseover Minicart
Pretty cool mod! I tried installing it yesterday but it breaks my cart completely (only the header is shown, body is just empty) whenever I add minicartdd.tpl to my head.tpl. Any idea what could be causing this?
__________________
____________________________ X-Cart Gold 4.1.10 EWD Hosting | CDSEO Pro | One Page Checkout | Smart Search | Telafirma Dynamic Images | X-AOM | Product Importer Pro and many custom mods and tweaks found here... |
|||||||||
#9
|
|||||||||
|
|||||||||
Re: Mouseover Minicart
not sure. could be a version thing. i'd start by replacing everything between the div tags in minicartdd.tpl with your the code in your minicart.tpl file OR, just delete all the stuff between the div tags and include the minicart.tpl file then see if that works.
__________________
X-Cart Gold 4.4.3 -------------------------------------- |
|||||||||
#10
|
|||||||
|
|||||||
Re: Mouseover Minicart
Great Mod!
Is it possible to add a product thumbnail to this? Quote:
__________________
4.1.7 |
|||||||
|
|||
X-Cart forums © 2001-2020
|