web design, England, Britain, UK, belgium
 
Ulti Clocks content

Using the VitueMart 1.1 Popup (vmPopupLink function)

sand The VirtueMart vmPopupLink function can come in handy when you need a simple information popup in your shop. An example could be a link to your data protection policy at registration time or on your checkout pages.
pre, vmpopuplink, data, link, policy, xml, title, html, lang, virtuemart, joomla, site, text, mosconfig, images, php, com, live, src, blank, png, popupwidth, popupheight, img, content, location, div, code, index, itemid, option, padlock, article, screeny, parameters, yes, language, screenx, view, target

Home Joomla - VirtueMart Using the VitueMart 1.1 Popup (vmPopupLink function)

Fri

10

Apr

Using the VitueMart 1.1 Popup (vmPopupLink function)
  • Joomla 1.5
  • VirtueMart 1.1

The VirtueMart vmPopupLink function can come in handy when you need a simple information popup in your shop.
An example could be a link to your data protection policy at registration time or on your product pages.


VirtueMart vmPopupLink VirtueMart vmPopupLink is a built-in native function which is used to call simple page popups with the minimum of coding

It is is found in
joomla_root/administrator/components/com_virtuemart/classes/htmlTools.class.php
 
and can be called in your pages or templates by
vmPopupLink( $link, $text, $popupWidth=xxx, $popupHeight=xxx, $target='_blank', $title='', $windowAttributes='' )
 

The parameters are as follows -
  • $link is the url you wish to link to. This can be on your local website or external.
    If you want to call just the content of a page (without your headers, navigation and footers) then use the "index2" form in your url. e.g.
     
    $link=$mosConfig_live_site .'/index2.php?option=com_content&Itemid=74&id=49&lang=de&view=article'; 
     
  • $text is the link text that you will see on your page. This can also include images.
    Also in a multi language site you can take the text from your language files e.g. $VM_LANG->_('DATA_POLICY') A code example could be so -
     
    $text = '<img src="'.$mosConfig_live_site .'/images/padlock2.png"><b>('.$VM_LANG->_('DATA_POLICY').')</b>'; 
     
  • $popupWidth & $popupHeight are the size of the desired popup in pixels (px not needed).
     
    $popupWidth=400;
     
    $popupHeight=250; 
     
  • $target would normally be _blank, so $target='_blank';
  • $title is the link title attribute and can also be taken from the language files. e.g.
     
    $title=$VM_LANG->_('DATA_POLICY');
     
  • $windowAttributes can also be included such as -
    $location='location=yes,screenX=600,screenY=600';


So putting it all together we could insert the following code in our flypage template.
 
<td colspan="3"><?php
  $link = $mosConfig_live_site .'/index2.php?option=com_content&Itemid=50&id=50&view=article ';
            $text = '<img src="'.$mosConfig_live_site .'/images/joomla/padlock2.png"><b>('.$VM_LANG->_('DATA_POLICY').')</b>';
            $title = $VM_LANG->_('DATA_POLICY');
            $popupWidth=400;
            $popupHeight=250;
            echo vmPopupLink( $link, $text,$popupWidth,$popupHeight,'_blank', $title, 'location=yes,screenX=600,screenY=600' );
?></td>
 

There is also a short format for writing the code where the parameters are fixed.
N.B. The parameters must be entered in the order shown.
 
<td colspan="3"><?php
  echo vmPopupLink( $mosConfig_live_site .'/index2.php?option=com_content&Itemid=50&id=50&view=article ', '<img src="'.$mosConfig_live_site .'/images/joomla/padlock2.png"><b>('.$VM_LANG->_('DATA_POLICY').')</b>',400,250,'_blank', $VM_LANG->_('DATA_POLICY'), 'location=yes,screenX=600,screenY=600' );
              ?></td>
 

Which produces this on our product pages -
VirtueMart vmpopuplink data protection


Add this page to your favorite Social Bookmarking websites
Digg! Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! Slashdot! Technorati! StumbleUpon! Spurl! Newsvine! Furl! Fark! Yahoo! Netvouz! Mister-Wong! RawSugar! Ma.gnolia! Squidoo! DZone! Swik!
Last Updated on Wednesday, 22 April 2009 11:42
 

Add your comment

BoldItalicUnderlineStrikethroughSubscriptSuperscriptEmailImageHyperlinkOrdered listUnordered listQuoteCodeHyperlink to the Article by its id
Very HappySmileWinkSadSurprisedShockedConfusedCoolLaughingMadRazzEmbarrassedCrying or Very SadEvil or Very MadTwisted EvilRolling EyesExclamationQuestionIdeaArrowNeutralMr. GreenGeekUber Geek
Your name:
  The word for verification.
Lowercase letters only with no spaces.

The word for verification.<br/>Lowercase letters only with no spaces.
Word verification:

Subject:
Comment:

Our Recommended Reading

For those interested in extending their knowledge of Joomla! & VirtueMart, Packt Publishing has an excellent range of help & how to books.
Listed below are some I can recommend.
Simply click on the images to be taken directly to their web shop.


Joomla! Social Networking with JomSocial
Joomla! Social Networking
with JomSocial

by Kwasi Boateng & Beatrice A. Boateng.
Joomla! 1.5 Multimedia
Joomla! 1.5 Multimedia
by Allan Walker.


Building job sites with Joomla!
Building job sites with Joomla!
by Santonu Kumar Dhar.

Joomla! Template Design: Create your own professional-quality templates with this fast, friendly guide
Joomla! Template Design: 2nd Edition
Create your own professional-quality
templates with this fast, friendly guide
by Tessa Blakeley Silver.
Magento: Beginner's Guide
Magento: Beginner's Guide by William Rice
is a must for anyone trying the
open-source e-Commerce solution.

Read the review

object-oriented-javascript-applications-libraries
Object-Oriented JavaScript by
Stoyan Stefanov gives you a very
comprehensive grounding in
the latest Javascript techniques.

Read the review
Joomla! Web Security
Joomla! Web Security
by Tom Canavan.

Joomla 1.5 Top Extensions Cookbook
Joomla 1.5 Top Extensions Cookbook by
Suhreed Sarkar is an ideal and concise round up of the extensions available for the Joomla! system.

Read the review

Showcase

  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow

Paypal Donation

If you use this module on your site please donate a small amount.
Any donation amount appreciated.

VM Live Product Search

Latest Joomla & VirtueMart Tips

See all tips & examples

Alexshop.de

News image

Private club based shopping site. 3 languages with full shop including "Back-end", order control, newsletter subscriptions and member invitations. Fully integrated "community" setup to include membership, newsletters, logins and...

Readmore

Midrangeint.com

News image

Midrangeint.com Multi-page site with Content Management System for an International IT Consulting company. Achieves top ranking search results for IBM Software Integration terms. e.g. Google results for "IBM system i"...

Readmore

Vandegaar.be

News image

Multimedia site for a Belgian stairways, doors and floors workshop. 4 languages with extensive photo galleries, flash animation and Quicktime 3D embedded views.

Readmore



Using the VitueMart 1.1 Popup (vmPopupLink function)



The VirtueMart vmPopupLink function can come in handy when you need a simple information popup in your shop. An example could be a link to your data protection policy at registration time or on your checkout pages.


pre, vmpopuplink, data, link, policy, xml, title, html, lang, virtuemart, joomla, site, text, mosconfig, images, php, com, live, src, blank, png, popupwidth, popupheight, img, content, location, div, code, index, itemid, option, padlock, article, screeny, parameters, yes, language, screenx, view, target