VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: alexsai on October 10, 2011, 16:44:42 PM

Title: customize the ajax popup
Post by: alexsai on October 10, 2011, 16:44:42 PM
Hi all!
I tried to figure out it on my own but i didn't find the correct file.
Which file I have to edit for customize the ajax popup that appears after push the "add to cart" button?
( obviusly i don't talk about css styles )
thanks,
Alex
Title: Re: customize the ajax popup
Post by: PRO on October 11, 2011, 00:07:53 AM
com_virtuemart/controllers/cart.php

/* Load the cart helper


I think thats it
Title: Re: customize the ajax popup
Post by: alexsai on October 11, 2011, 15:26:19 PM
That's it. You are right :)
Thank you very much!
Title: Re: customize the ajax popup
Post by: tomshirvo on January 06, 2012, 01:00:03 AM
Can I get some more help with this I have found where it is but im not sure what I have to delete to make it stop coming up
Title: Re: customize the ajax popup
Post by: erik.demartiis on January 11, 2012, 11:01:35 AM
Quote from: alexsai on October 10, 2011, 16:44:42 PM
Hi all!
I tried to figure out it on my own but i didn't find the correct file.
Which file I have to edit for customize the ajax popup that appears after push the "add to cart" button?
( obviusly i don't talk about css styles )
thanks,
Alex

Oh this is very interesting.
And if I want to change the graphics, where i have to modify please?
I think you know where :) "( obviusly i don't talk about css styles )"
I want to change the dimension of the box and the position of overlay.
Please give me an hint.

thank you
Erik
Title: Re: customize the ajax popup
Post by: erik.demartiis on January 11, 2012, 12:06:02 PM
Autoresponse.
facebox.js and facebox.css are the file to modify.

Bye
Erik
Title: Re: customize the ajax popup
Post by: morktron on January 24, 2012, 05:56:13 AM
Quote from: BanquetTables.pro on October 11, 2011, 00:07:53 AM
com_virtuemart/controllers/cart.php

Thanks this is useful. It seems to be the only way to structure the html of the ajax popup. Shame it does not use the MVC / template override method meaning you have to hack the VM core to style the popup.

Would be great if things like this could fixed in future minor releases ;) thanks for the tip on cart.php
Title: Re: customize the ajax popup
Post by: yohio on January 29, 2012, 02:06:38 AM
does anyone know how to change the layout?
I want to place the continue shopping button and the show cart button below the messages.
css just won't cut it, and I'm struggling in placing the code just the right way inside the cart controller file...
anyone have a clue??
Title: Re: customize the ajax popup
Post by: alex-corp on January 29, 2012, 12:58:24 PM
Hello!
How can I change the link "continue shopping" in popup for remaining in the productdetail's page?
Is it possible?
And the related problem is here http://forum.virtuemart.net/index.php?topic=95666.0
tnks all
Title: Re: customize the ajax popup
Post by: lipes on February 17, 2012, 01:43:47 AM
Hi.

Where it's possible to edit the position in style of the popup? I saw that the popup is not well centered / align.

I do not like this layout and wanted to change it, if possible... I am thinking of putting an arrow pointing to the shop cart.

<div id="facebox" style="top: 170.9px; left: 442px; ">

thanks for any help!
Title: Re: customize the ajax popup
Post by: PRO on February 17, 2012, 19:16:24 PM
Quote from: prolipes on February 17, 2012, 01:43:47 AM
Hi.

Where it's possible to edit the position in style of the popup? I saw that the popup is not well centered / align.

I do not like this layout and wanted to change it, if possible... I am thinking of putting an arrow pointing to the shop cart.

<div id="facebox" style="top: 170.9px; left: 442px; ">

thanks for any help!

I thought the centered was fixed in the latest versioon
Title: Re: customize the ajax popup
Post by: lipes on February 17, 2012, 20:50:32 PM
nice! :)
i'll have to install the latest version..

But I also need to remove some text from the popup... (i think that this popup box it's to small to display so many information)...
I got 2 links (continue shopping and chekout) ... and 2 msgs saying +/- the same thing.. that "the product was added to the shopping cart.."

i think that will be if i could change the popup layout and insert something like this:
(http://hottubrentalstulsa.com/images/curved_arrow.gif)
pointing to the shopping cart website information...
Title: Re: customize the ajax popup
Post by: Zuske on March 17, 2012, 17:58:10 PM
So here a bug, in the JS popup box u get 2 of the same messages

The product was added to your cart.      AND
"here goes the productname" was added to your cart.

I want to remove : COM_VIRTUEMART_MINICART_ADDED_JS
where? its not in the cart.php
i want to remove it in the core not in the language file


Title: Re: customize the ajax popup
Post by: lipes on March 28, 2012, 21:01:37 PM
My popup hack has gone with the vm updates....
and now i cant find here is the place or which line to modify the code and remove the links / text:
"Show Cart" / "Continue Shopping" / "The product was added to your cart." / "test1 was added to your cart".

argh :/
Someone could help please?!

With will be better if in future this popup be more custumizable to us ..
Title: Re: customize the ajax popup
Post by: breturi7 on April 01, 2012, 23:12:58 PM
Quick fix on the repetitive "Added product to cart" / "____ Was Added To Cart."  I tried deleting various lines in the cart.php with no luck, so ended up just deleting the "Product added to cart" text (COM_VIRTUEMART_CART_PRODUCT_UPDATED=, line 75 or so) in the "en_GB.com_virtuemart.ini file and replaced it with a <br>. Did the same with COM_VIRTUEMART_CART_PRODUCT_UPDATED=, on line 78 or so.  A lot quicker than php trial and error for those of us who aren't well versed in it.
Title: Re: customize the ajax popup
Post by: graphos on May 21, 2012, 19:09:52 PM
Friends:

I need to edit the "X" or close button link in the popup. I need it to direct this to the homepage (or any other). I`ve tried changing the code in facebox.js, line 98 (VM2.0.6, J2.5.4)

$.extend($.facebox, {
    settings: {
      opacity      : 0.2,
      overlay      : true,
      loadingImage : 'loading.gif',
      closeImage   : 'closelabel.png',
      imageTypes   : [ 'png', 'jpg', 'jpeg', 'gif' ],
      faceboxHtml  : '\
    <div id="facebox" style="display:none;"> \
      <div class="popup"> \
        <div class="content"> \
        </div> \
        <a href="what I want" class="close"></a> \
      </div> \
    </div>'
    },

But nothing happens!!
What I`m doing wrong??
Help Please!!

Thanks in advance.

Alex
Title: Re: customize the ajax popup
Post by: FilipeRuivo on June 12, 2012, 15:19:31 PM
Quote from: lipes on March 28, 2012, 21:01:37 PM
My popup hack has gone with the vm updates....
and now i cant find here is the place or which line to modify the code and remove the links / text:
"Show Cart" / "Continue Shopping" / "The product was added to your cart." / "test1 was added to your cart".

argh :/
Someone could help please?!

With will be better if in future this popup be more custumizable to us ..

You can edit in this file administrator/components/com_virtuemart/helpers/config.php around line 879
$jsVars .= "vmCartText = '". addslashes( JText::_('COM_VIRTUEMART_MINICART_ADDED_JS') )."' ;\n" ;
Title: Re: customize the ajax popup
Post by: warningdang on September 16, 2012, 14:55:30 PM
Quote
You can edit in this file administrator/components/com_virtuemart/helpers/config.php around line 879
$jsVars .= "vmCartText = '". addslashes( JText::_('COM_VIRTUEMART_MINICART_ADDED_JS') )."' ;\n" ;

i changed to this
$jsVars .= "vmCartText = '". addslashes( JText::_(' ') )."' ;\n" ;
Title: Re: customize the ajax popup
Post by: exhost on November 29, 2012, 09:25:19 AM
So how do you customise the facebox.css which hacking the core?

Mod Edit: Double post removed
Title: Re: customize the ajax popup
Post by: bytelord on November 29, 2012, 12:03:13 PM
@exhost Use firebug to examine you site code and css styling: https://forum.virtuemart.net/index.php?topic=102850.0

The changes you want to apply create a facebox css override or if you have any general css file for overriding and paste your changes over there.

Simply.