VirtueMart Integration

Gamebox for Joomla 1.5 support forum by GavickPro
GK User
Wed Aug 11, 2010 11:29 am
I've been trying to integrate gk-cart for a total of 6 hours it's sad I know but I don't know js for the life of me. Can some one help Ill pay, trade some time with someone or if you need hydroponic gear I'll get it for you at cost what ever it takes I got to get this thing done.

I think I almost got it but
the cart-icon.png doesn't show up and the item count does't work. The register, login and tools are also a little buggy when you are in the shop, not the home page.
I also have another thread with some bugs with VM and the PhotoSlide extention. Again I know this template was not built for VM but I think it goes well with what I am doing.
If you work for gavick I will send you a admin login just let me know.
Here is a test account you can try it on.
prohydrosupply.com
Login: demo
Password: demo

Questions for support if you can help.

Which files do I need to modify/copy in order to get gk-cart working.

Files I have modified or copied over so far, I'm using style 1:
css/style1.css
js/gk.script.js
blocks/toolbar.php
layouts/default.php
I copied: usertools/cart.php
I copied: ../images/style1/cart_icon.png PNG
I copied: ../images/cart_icon.png PNG
I copied: ../images/icons/cart.png PNG
Am I missing any files I should be modifying or copying?

Here is the source codes:

cart.php
Code: Select all
<?php
   // no direct access
   defined('_JEXEC') or die('Restricted access');
   $url = JURI::getInstance();   
   $user = JFactory::getUser();
   $userID = $user->get('id');
?>
<?php if($this->countModules('cart')) : ?>
<div id="popup_cart" class="gk_popup">
   <div class="gk_popup_wrap">
      <jdoc:include type="modules" name="cart" style="none" />
     </div>
</div>      
<?php endif; ?>   




css/style1.css
Code: Select all
/****************** MODIFIED for VirtueMart *****************************
#------------------------------------------------------------------------
# gamebox - July 2010 (for Joomla 1.5)
#
# Copyright (C) 2007-2010 Gavick.com. All Rights Reserved.
# License: Copyrighted Commercial Software
# Website: http://www.gavick.com
# Support: [email protected]   
#------------------------------------------------------------------------
# Based on T3 Framework
#------------------------------------------------------------------------
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
# @license - GNU/GPL, http://www.gnu.org/copyleft/gpl.html
# Author: J.O.O.M Solutions Co., Ltd
# Websites: http://www.joomlart.com - http://www.joomlancers.com
#------------------------------------------------------------------------
*/
/* Style 1 */
/* template.css */
a:hover,
a:active,
a:focus { color: #F6BF00; }
#bg-wrap1 { background:#060606 url('../images/style1/background.jpg') no-repeat 50% 0; }
#gk-wrapper { background:#000 url('../images/style1/background_page.jpg') no-repeat 100% 0; }
h1.logo p,
div.logo-text p { color:#f6bf00; }
/*----------------------------------- ADDED FOR GK-CART    -------------------------------------------*/
#gk-cart { background:transparent url('../images/style1/cart_icon.png') no-repeat left 0; }
#gk-cart a { color:#cf052b; }
#gk-cart a.popup span,
.gk_vm_minicart_product { border: 1px solid #c20025; }
.gk_vm_show_cart a:hover { background: #e3012d url('../images/style1/button.png') repeat-x 0 100%; }
/*----------------------------------------------------------------------------------------------------*/
h1.logo >a { background:transparent url('../images/style1/logo.png') no-repeat 6px 50px; }
.gk-menu ul.level0 >li:hover>a { color: #f6bf00!important; }
.gk-menu ul.level0 >li.active>a { color: #f6bf00 !important; }
#gk-subnav>div>ul>li a:hover { color: #f6bf00 }
.moduletable h3,
.moduletable_text h3,
.moduletable_menu h3,
.moduletable.dark h3 { color:#F6BF00; }
.moduletable.red h3,
.moduletable.green h3,
.moduletable.blue h3 { color: #fff }
.moduletable.pattern { background: #000 url('../images/style1/mod_wood.jpg') repeat 0 0; }
#gk-tools a.popup { color:#f6bf00 !important; }
/* joomla.css */
.adminform button,
#adminForm button,
.button,
a.readon,
input[type="submit"],
input[type="button"] { border:1px solid #f8d71e; border-bottom-color:#cc9b00; background:transparent url('../images/style1/btn.png') repeat-x 0 top; }
.adminform button:hover,
.adminform button:focus,
#adminForm button:hover,
#adminForm button:focus,
.button:hover,
.button:focus,
a.readon:hover,
a.readon:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
input[type="button"]:hover,
input[type="button"]:focus { border:1px solid #666666; border-left-color:#505050; border-right-color:#505050; border-bottom-color:#343334; }
ul.menu li.active>a { color:#f6bf00; }
/* k2.css */
.itemToolbar,
.itemCategory a,
.latestItemCategory a,
.genericItemCategory a,
.userItemCategory a,
.catItemCategory a,
.itemCategory a,
.latestItemVideoBlock h3,
.catItemVideoBlock h3,
.itemVideoBlock h3,
.itemComments ul.itemCommentsList li span.commentAuthorName strong,
.subCategory h2 a,
.k2LatestCommentsBlock ul li span.lcUsername,
.bottom_toolbar .itemAuthor a { color:#F6BF00; }
.k2TagCloudBlock a:hover,
.dark .k2TagCloudBlock a:hover { background:#F6BF00; }
/* gk_stuff.css */
ul.gk_tab_ul-style1 li.active { color:#F6BF00; }
#gk-container h4.gk_tab_news_header a { color:#cf052b; }
/* typo.css */
pre,
.gk_code1 { border-left:5px solid #f6bf00 !important; }
.gk_code2 { border-top:5px solid #f6bf00; border-bottom:5px solid #f6bf00; }
blockquote div.gk_blockquote1 { background:transparent url(../images/style1/typography/open1.png) no-repeat left bottom; }
blockquote div.gk_blockquote1 div { background:transparent url(../images/style1/typography/close1.png) no-repeat right top; }
blockquote div.gk_blockquote2 { background:transparent url(../images/style1/typography/open1.png) no-repeat left top; }
blockquote div.gk_blockquote2 div { background:transparent url(../images/style1/typography/close1.png) no-repeat right top; }
blockquote div.gk_blockquote3 { background:transparent url(../images/style1/typography/open2.png) no-repeat left bottom; }
blockquote div.gk_blockquote3 div { background:transparent url(../images/style1/typography/close2.png) no-repeat right top; }
blockquote div.gk_blockquote4 { background:transparent url(../images/style1/typography/open2.png) no-repeat left top; }
blockquote div.gk_blockquote4 div { background:transparent url(../images/style1/typography/close2.png) no-repeat right top; }
.gk_highlight-2 { background:#F6BF00; color:#000; }
.gk_highlight-3 { background:#cc9b00; color:#fff; }
span.gk_clear-2 { border-top:1px solid #f6bf00; border-bottom:1px solid #f6bf00; color:#f6bf00; }
span.gk_color-3 { color:#000000; border-color:#880000; background:#f6bf00; }
ul.gk_circle1 { list-style-image:url(../images/style1/typography/bullet3ul.png) !important; }
ul.gk_bullet1 { list-style-image:url(../images/style1/typography/bullet_ol_1_dark.png) !important; }
ul.gk_bullet2 { list-style-image:url(../images/style1/typography/bullet1ul.png) !important; }
ul.gk_bullet3 { list-style-image:url(../images/style1/typography/bullet2ul.png) !important; }
ul.gk_bullet4 { list-style-image:url(../images/style1/typography/bullet_ol_1_color.png) !important; }
ul.gk_square2 { list-style-image:url(../images/style1/typography/bullet_squ1_dark.png) !important; }
ul.gk_square3 { list-style-image:url(../images/style1/typography/bullet_squ1_color.png) !important; }
div.gk_number1 span { background:transparent url(../images/style1/typography/bullet_ol_2.png) no-repeat center center; }
div.gk_number2 span { background:transparent url(../images/style1/typography/bullet_ol_2_color.png) no-repeat center center; }
ul.gk_arrows li { background:transparent url('../images/style1/typography/bullet_arrow.png') no-repeat 0 center; }






blocks/toolbar.php
Code: Select all
<?php
/****************** MODIFIED for VirtueMart *****************************
#------------------------------------------------------------------------
# gamebox - July 2010 (for Joomla 1.5)
#
# Copyright (C) 2007-2010 Gavick.com. All Rights Reserved.
# License: Copyrighted Commercial Software
# Website: http://www.gavick.com
# Support: [email protected]   
#------------------------------------------------------------------------
# Based on T3 Framework
#------------------------------------------------------------------------
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
# @license - GNU/GPL, http://www.gnu.org/copyleft/gpl.html
# Author: J.O.O.M Solutions Co., Ltd
# Websites: http://www.joomlart.com - http://www.joomlancers.com
#------------------------------------------------------------------------
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
$user =& JFactory::getUser();
// getting User ID
$userID = $user->get('id');
?>
<?php if( GK_LOGIN || GK_REGISTER || GK_TOOLS || $this->countModules('search')) : ?>
<div id="gk-toolbar" class="main">   
   <?php if( $this->countModules('search') ): ?>
   <div class="gk_search">
      <jdoc:include type="modules" name="search" style="none" />
   </div>
   <?php endif; ?>
   <?php if( GK_LOGIN || GK_REGISTER || GK_TOOLS ) : ?>
   <div id="gk-tools">
      <?php if(GK_TOOLS) : ?>
      <a href="#" id="btn_tools"><span><?php echo JText::_('GK_TOOLS'); ?></span></a>
      <div class="gk_hide">
         <div class="gk_popup-hide" id="popup_tools">
            <?php $this->loadBlock('usertools/tools') ?>
         </div>
      </div>
      <?php endif; ?>
<!----------------------- Added for gk-cart ------------->
<?php if($this->countModules('cart')) : ?>
   <div id="gk-items" style="float:right;">
      ( <strong>...</strong> <?php echo JText::_('GK_ITEMS'); ?> )
   </div>
   <div id="gk-cart">
      <a href="#" id="btn_cart"><span><?php echo JText::_('GK_CART'); ?></span></a>
   </div>
   <?php endif; ?>
<!----------------------- Added for gk-cart ------------->
      <?php if(GK_REGISTER) : ?>
      <a href="<?php echo $this->baseurl(); ?>index.php?option=com_user&view=register" id="btn_register"><span><?php echo JText::_('GK_REGISTER'); ?></span></a>
      <?php endif; ?>
      <?php if(GK_LOGIN) : ?>
      <a href="<?php echo $this->baseurl(); ?>index.php?option=com_user&view=login" id="btn_login"><span><?php echo ($userID > 0) ? JText::_('GK_LOGOUT') : JText::_('GK_LOGIN'); ?></span></a>
      <?php endif; ?>
   </div>
   <?php endif; ?>
</div>
<?php endif; ?>






js/gk.script.js
Code: Select all
/****************** MODIFIED for VirtueMart *****************************
#------------------------------------------------------------------------
# gamebox - July 2010 (for Joomla 1.5)
#
# Copyright (C) 2007-2010 Gavick.com. All Rights Reserved.
# License: Copyrighted Commercial Software
# Website: http://www.gavick.com
# Support: [email protected]   
#------------------------------------------------------------------------
# Based on T3 Framework
#------------------------------------------------------------------------
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
# @license - GNU/GPL, http://www.gnu.org/copyleft/gpl.html
# Author: J.O.O.M Solutions Co., Ltd
# Websites: http://www.joomlart.com - http://www.joomlancers.com
#------------------------------------------------------------------------
*/
//Call noconflict if detect jquery
//Apply jquery.noConflict if jquery is enabled
if ($defined(window.jQuery) && $type(jQuery.noConflict)=='function') {
   jQuery.noConflict();
   jQuery.noConflict();
}
function switchFontSize (ckname,val){
   var bd = $E('body');
   switch (val) {
      case 'inc':
         if (CurrentFontSize+1 < 7) {
            bd.removeClass('fs'+CurrentFontSize);
            CurrentFontSize++;
            bd.addClass('fs'+CurrentFontSize);
         }      
      break;
      case 'dec':
         if (CurrentFontSize-1 > 0) {
            bd.removeClass('fs'+CurrentFontSize);
            CurrentFontSize--;
            bd.addClass('fs'+CurrentFontSize);
         }      
      break;
      default:
         bd.removeClass('fs'+CurrentFontSize);
         CurrentFontSize = val;
         bd.addClass('fs'+CurrentFontSize);      
   }
   Cookie.set(ckname, CurrentFontSize,{duration:365});
}
function switchTool (ckname, val) {
   createCookie(ckname, val, 365);
   window.location.reload();
}
function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}
//addEvent - attach a function to an event
function gkAddEvent(obj, evType, fn){
 if (obj.addEventListener){
   obj.addEventListener(evType, fn, false);
   return true;
 } else if (obj.attachEvent){
   var r = obj.attachEvent("on"+evType, fn);
   return r;
 } else {
   return false;
 }
}
Fx.Opacity = Fx.Style.extend({initialize: function(el, options){this.now = 1;this.parent(el, 'opacity', options);},toggle: function(){return (this.now > 0) ? this.start(1, 0) : this.start(0, 1);},show: function(){return this.set(1);}});
Fx.Width = Fx.Style.extend({initialize: function(el, options){this.element = $(el);this.element.setStyle('overflow', 'hidden');this.iniWidth = this.element.getStyle('width').toInt();this.parent(this.element, 'width', options);},toggle: function(){var style = this.element.getStyle('width').toInt();if (style > 0) return this.start(style, 0);else return this.start(0, this.iniWidth);},show: function(){return this.set(this.iniWidth);}});
Fx.Height = Fx.Style.extend({initialize: function(el, options){this.parent(el, 'height', options);this.element.setStyle('overflow', 'hidden');},toggle: function(){return (this.element.offsetHeight > 0) ? this.custom(this.element.offsetHeight, 0) : this.custom(0, this.element.scrollHeight);},show: function(){return this.set(this.element.scrollHeight);}});
window.addEvent('load', function() {
   new SmoothScroll();
   var login = false;
   var register = false;
   var cart = false;
   var tools = false;
   var search = false;
   var login_fx = null;
   var hlogin_fx = null;
   var register_fx = null;
   var hregister_fx = null;
   var cart_fx = null;
   var hcart_fx = null;
   var search_fx = null;
   var tools_fx = null;
   var link_login_fx = null;
   var link_reg_fx = null;
   var link_search_fx = null;
   var login_over = false;
   var register_over = false;
   var opened = false;
   var opened2 = false;
   var cart_over = false;
   if($('btn_login')){
      login_fx = new Fx.Opacity($('popup_login'),{duration:300}).set(0);
      hlogin_fx = new Fx.Height($('popup_login'),{duration:300}).set(0);
      $('popup_login').setStyle('display','block');
      $('btn_login').addEvent('click', function(e){
         new Event(e).stop();
         if(!login){
            login_fx.start(1);
            hlogin_fx.toggle();
            login = true;   
            $('btn_login').addClass('popup');
            $('popup_login').setStyles({
               "left" : ($('btn_login').getCoordinates().left + $('btn_login').getCoordinates().width - $('popup_login').getCoordinates().width) + "px",
               "top" : ($('btn_login').getCoordinates().top - 2) + "px"
            });
         }else{
            login_fx.start(0);
            hlogin_fx.start(0);
            login = false;
            $('btn_login').removeClass('popup');
         }
         if(register){
            register_fx.start(0);
            hregister_fx.start(0);
            register = false;
            $('btn_register').removeClass("popup");
         }
         if(cart){
            cart_fx.start(0);
            hcart_fx.start(0);
            cart = false;
            $('btn_cart').removeClass("popup");
         }
      });
      $('popup_login').addEvent('mouseenter',function(){login_over = true;});
      $('popup_login').addEvent('mouseleave',function(){login_over = false;});
   }
   if($('btn_register')){
      register_fx = new Fx.Opacity($('popup_register'),{duration:300}).set(0);
      hregister_fx = new Fx.Height($('popup_register'),{duration:300}).set(0);
      $('popup_register').setStyle('display','block');
      $('btn_register').addEvent('click', function(e){
         new Event(e).stop();
         if(!register){
            register_fx.start(1);
            hregister_fx.toggle();
            register = true;   
            $('btn_register').addClass("popup");         
            $('popup_register').setStyles({
               "left" : ($('btn_register').getCoordinates().left + $('btn_register').getCoordinates().width - $('popup_register').getCoordinates().width) + "px",
               "top" : ($('btn_register').getCoordinates().top - 2) + "px"
            });      
         }else{
            register_fx.start(0);
            hregister_fx.start(0);
            register = false;
            $('btn_register').removeClass("popup");
         }
         if(login){
            login_fx.start(0);
            hlogin_fx.start(0);
            login = false;
            $('btn_login').removeClass("popup");
         }
         if(cart){
            cart_fx.start(0);
            hcart_fx.start(0);
            cart = false;
            $('btn_cart').removeClass("popup");
         }
      });
      $('popup_register').addEvent('mouseenter',function(){register_over = true;});
      $('popup_register').addEvent('mouseleave',function(){register_over = false;});
   }
   if($('btn_cart')){
      cart_fx = new Fx.Opacity($('popup_cart'),{duration:300}).set(0);
      hcart_fx = new Fx.Height($('popup_cart'),{duration:300}).set(0);
      $('popup_cart').setStyle('display','block');
      $('btn_cart').addEvent('click', function(e){
         new Event(e).stop();
         if(!cart){
            cart_fx.start(1);
            hcart_fx.toggle();
            cart = true;   
            $('btn_cart').addClass('popup');
            $('popup_cart').setStyles({
               "left" : ($('btn_cart').getCoordinates().left - 238) + "px",
               "top" : ($('btn_cart').getCoordinates().top) + "px"
            });
         }else{
            cart_fx.start(0);
            hcart_fx.start(0);
            cart = false;
            $('btn_cart').removeClass('popup');
         }
         if(register){
            register_fx.start(0);
            hregister_fx.start(0);
            register = false;
            $('btn_register').removeClass("popup");
         }
         if(login){
            login_fx.start(0);
            hlogin_fx.start(0);
            login = false;
            $('btn_login').removeClass("popup");
         }
      });
      $('popup_cart').addEvent('mouseenter',function(){cart_over = true;});
      $('popup_cart').addEvent('mouseleave',function(){cart_over = false;});
   }
   if($('btn_tools')){
      opened = false;
      if($('btn_login')) link_login_fx = new Fx.Opacity($('btn_login'),{duration:300});
      if($('btn_register')) link_reg_fx = new Fx.Opacity($('btn_register'),{duration:300});
      if($('btn_search')) link_search_fx = new Fx.Opacity($('btn_search'),{duration:300});   
      $('popup_tools').getParent().setProperty('class','gk_hide').setStyles({
         'display' : 'block'
      });
      $('popup_tools').setStyle('display', 'block');
      tools_fx = new Fx.Width($('popup_tools').getParent(),{duration:300}).set(0);
      $('btn_tools').addEvent('click', function(e){
         new Event(e).stop();
         if(!window.ie) tools_fx.toggle();
         else tools_fx.start((opened) ? 0 : 135);
         if($('btn_login') && !opened2) link_login_fx.toggle();
         if($('btn_register') && !opened2) link_reg_fx.toggle();
         opened = !opened;
         if(login && !opened2){
            login_fx.start(0);
            hlogin_fx.start(0);
            login = false;
            $('btn_login').removeClass("popup");
         }
         if(register && !opened2){
            register_fx.start(0);
            hregister_fx.start(0);
            register = false;
            $('btn_register').removeClass("popup");
         }
         if(cart){
            cart_fx.start(0);
            hcart_fx.start(0);
            cart = false;
            $('btn_cart').removeClass("popup");
         }
      });   
   }
   //
   if($('gk-cart')) gk_vm_cart_count();
   //
   if($('gk_product_tabs')){
      $$('#gk_product_tabs li').each(function(el, i){
         el.addEvent("click", function(e){
            $$('.gk_product_tab').addClass('gk_unvisible');
            $$('.gk_product_tab')[i].removeClass('gk_unvisible');
            $$('#gk_product_tabs li').setProperty('class', '');
            $$('#gk_product_tabs li')[i].setProperty('class', 'gk_product_tab_active');
         });
      });
   }
   //
   if($('stylearea')){
      $A($$('.style_switcher')).each(function(element,index){
         element.addEvent('click',function(event){
            var event = new Event(event);
            event.preventDefault();
            changeStyle(index+1);
         });
      });
      new SmoothScroll();
   }
   // equal columns
   var bmax1 = 0;
   var bmax2 = 0;
   $$('#gk-botsl1 .column').each(function(el,i){ if(bmax1 < el.getSize().size.y) bmax1 = el.getSize().size.y; });
   $$('#gk-botsl2 .column').each(function(el,i){ if(bmax2 < el.getSize().size.y) bmax2 = el.getSize().size.y; });
   $$('#gk-botsl1 .column').each(function(el,i){ $E('div',el).setStyle('height',bmax1+"px"); });
   $$('#gk-botsl2 .column').each(function(el,i){ $E('div',el).setStyle('height',bmax2+"px"); });
   $(document.body).addEvent("click", function(e){
      if(login && !login_over){
         login_fx.start(0);
         hlogin_fx.start(0);
         login = false;
         $('btn_login').removeClass("popup");
      }
      if(register && !register_over){
         register_fx.start(0);
         hregister_fx.start(0);
         register = false;
         $('btn_register').removeClass("popup");
      }
      if(cart && !cart_over){
         cart_fx.start(0);
         hcart_fx.start(0);
         cart = false;
         $('btn_cart').removeClass("popup");
      }
   });
   if(window.ie){
      $$('.blog-columns').each(function(el){
         if($E('.article-tools',el).getCoordinates().height > $E('.article-wrap',el).getCoordinates().height){
            $E('.article-wrap',el).setStyle('height', $E('.article-tools',el).getCoordinates().height + 'px');
         }else{
            $E('.article-tools',el).setStyle('height', $E('.article-wrap',el).getCoordinates().height + 'px');
         }
      });
      if($E('.k2itemColumn')){
         if($E('.k2itemColumn').getCoordinates().height > $E('.k2ItemContent').getCoordinates().height){
            $E('.k2ItemContent').setStyle('height', $E('.k2itemColumn').getCoordinates().height + 'px');
         }else{
            $E('.k2itemColumn').setStyle('height', $E('.k2ItemContent').getCoordinates().height + 'px');
         }
      }
   }
});
// Function to change styles
function changeStyle(style){
   var file = tmplurl+'/css/style'+style+'.css';
   var file_css3 = tmplurl+'/css/css3_style'+style+'.css';
   new Asset.css(file);
   new Asset.css(file_css3);
   new Cookie.set('gk39_style',style,{duration: 200,path: "/"});
   (function(){if(CufonCheck()) Cufon.refresh();}).delay(500);
}
function CufonCheck(){ return (typeof(Cufon) == "undefined")?  false: true; }


//Added from myStore-----------------------------------------------
function gk_vm_cart_count(){
   var amount = 0;
   $$('.gk_vm_minicart_product div strong').each(function(el){ amount += el.innerHTML.toInt(); });
   if($E('#gk-items strong')) $E('#gk-items strong').innerHTML = amount;
}
// VM function override
function handleAddToCart( formId, parameters ) {
   formCartAdd = document.getElementById( formId );
   var callback = function(responseText) {
      updateMiniCarts();
      // close an existing mooPrompt box first, before attempting to create a new one (thanks wellsie!)
      if (document.boxB) {
         document.boxB.close();
         clearTimeout(timeoutID);
      }
      document.boxB = new MooPrompt(notice_lbl, responseText, {
            buttons: 2,
            width:400,
            height:150,
            overlay: false,
            button1: ok_lbl,
            button2: cart_title,
            onButton2:    handleGoToCart
         });
      setTimeout( 'document.boxB.close()', 3000 );
   }
   var opt = {
       // Use POST
       method: 'post',
       // Send this lovely data
       data: $(formId),
       // Handle successful response
       onComplete: callback,
       evalScripts: true
   }
   new Ajax(formCartAdd.action, opt).request();
   (function(){if($('gk-cart')) gk_vm_cart_count();}).delay(3000);
}
//END Added from myStore-----------------------------------------------

// JCaptionCheck
function JCaptionCheck(){ return (typeof(JCaption) == "undefined")?  false: true; }
if(!JCaptionCheck()) {
   var JCaption = new Class({
      initialize: function(selector)
      {
         this.selector = selector;
         var images = $$(selector);
         images.each(function(image){ this.createCaption(image); }, this);
      },
      createCaption: function(element)
      {
         var caption   = document.createTextNode(element.title);
         var container = document.createElement("div");
         var text      = document.createElement("p");
         var width     = element.getAttribute("width");
         var align     = element.getAttribute("align");
         var docMode = document.documentMode;
         //Windows fix
         if (!align)
            align = element.getStyle("float");  // Rest of the world fix
         if (!align) // IE DOM Fix
            align = element.style.styleFloat;
         text.appendChild(caption);
         text.className = this.selector.replace('.', '_');
         if (align=="none") {
            if (element.title != "") {
               element.parentNode.replaceChild(text, element);
               text.parentNode.insertBefore(element, text);
            }
         } else {
            element.parentNode.insertBefore(container, element);
            container.appendChild(element);
            if ( element.title != "" ) {
               container.appendChild(text);
            }
            container.className   = this.selector.replace('.', '_');
            container.className   = container.className + " " + align;
            container.setAttribute("style","float:"+align);

            //IE8 fix
            if (!docMode|| docMode < 8) {
               container.style.width = width + "px";
            }
         }
      }
   });
   document.caption = null;
   window.addEvent('load', function() {
      var caption = new JCaption('img.caption')
      document.caption = caption
   });
}






layouts/default.php
Code: Select all
<?php
/****************** MODIFIED for VirtueMart *****************************
#------------------------------------------------------------------------
# gamebox - July 2010 (for Joomla 1.5)
#
# Copyright (C) 2007-2010 Gavick.com. All Rights Reserved.
# License: Copyrighted Commercial Software
# Website: http://www.gavick.com
# Support: [email protected]   
#------------------------------------------------------------------------
# Based on T3 Framework
#------------------------------------------------------------------------
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
# @license - GNU/GPL, http://www.gnu.org/copyleft/gpl.html
# Author: J.O.O.M Solutions Co., Ltd
# Websites: http://www.joomlart.com - http://www.joomlancers.com
#------------------------------------------------------------------------
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
$this->_basewidth = 20;
$positions = array (
   'left1'               =>'left1',
   'left2'               =>'left2',
   'left-mass-top'         =>'left_top',
   'left-mass-bottom'      =>'left_bottom',
   'right1'            =>'right1',
   'right2'            =>'right2',
   'right-mass-top'      =>'right_top',
   'right-mass-bottom'      =>'right_bottom',
   'content-mass-top'      =>'top',
   'content-mass-bottom'   =>'bottom',
   'content-top'         =>'adv_top',
   'content-bottom'      =>'adv_bottom',
   'inset1'            =>'inset1',
   'inset2'            =>'inset2'
);
$this->customwidth('right', $this->_tpl->params->get("right_column"));
$this->customwidth('right2', $this->_tpl->params->get("right2_column"));
$this->customwidth('left', $this->_tpl->params->get("left_column"));
$this->customwidth('left2', $this->_tpl->params->get("left2_column"));
$this->customwidth('inset1', $this->_tpl->params->get("inset1_column"));
$this->customwidth('inset2', $this->_tpl->params->get("inset2_column"));
$this->definePosition ($positions);
$this->loadBlock('definitions');
?>
<?php if ($this->isIE()) : ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<?php else : ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php endif; ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>">
<head>
<?php
    $this->loadBlock('head');
    $this->useCache($this->getParam('css_compress'), $this->getParam('css_cache'));
?>
</head>
<body id="bd" class="fs<?php echo $this->getParam(GK_TOOL_FONT);?> <?php echo $this->browser();?>">
<?php if($this->isIE6() && $this->_tpl->params->get('ie6bar') == 1) : ?>
<div id="infobar"><a href="http://browsehappy.com"><?php echo JText::_('IE6_BAR'); ?></a></div>
<?php endif; ?>
<div id="bg-wrap1">
           <!-- TOOLBAR -->
          <?php $this->loadBlock('toolbar'); ?>
     <div id="gk-wrapper" class="main"> <a name="Top" id="Top"></a>
          <!-- MAIN NAVIGATION -->
          <?php $this->loadBlock('mainnav') ?>
          <!-- HEADER -->
          <?php $this->loadBlock('header'); ?>
          <!-- TOP MODULES -->
          <?php $this->loadBlock('topsl'); ?>
          <?php if($this->checkComponent() || $this->checkMainbody() || $this->countModules($this->getPositionName('left1').' + '.$this->getPositionName('left2').' + '.$this->getPositionName('left-mass-top').' + '.$this->getPositionName('left-mass-bottom').' + '.$this->getPositionName('right1').' + '.$this->getPositionName('right2').' + '.$this->getPositionName('right-mass-top').' + '.$this->getPositionName('right-mass-bottom').' + '.$this->getPositionName('content-mass-top').' + '.$this->getPositionName('content-mass-bottom').' + '.$this->getPositionName('content-top').' + '.$this->getPositionName('content-bottom').' + '.$this->getPositionName('inset1').' + '.$this->getPositionName('inset2'))) : ?>
          <!-- MAIN CONTAINER -->
          <div id="gk-container">
               <div class="static clearfix normal">
                    <div id="gk-mainbody" style="width:<?php echo $this->getColumnWidth('mw') ?>%">
                         <?php $this->loadBlock('main') ?>
                         <?php $this->loadBlock('left') ?>
                    </div>
                    <?php $this->loadBlock('right') ?>
               </div>
               <!-- USER MODULES -->
               <?php $this->loadBlock('usersl') ?>
               <!-- BOTTOM MODULES -->
               <?php $this->loadBlock('botsl') ?>
          </div>
          <?php endif; ?>
          <!-- FOOTER -->
          <?php $this->loadBlock('footer') ?>
          <?php if($this->_tpl->params->get('t3_logo')) : ?>
          <a href="http://wiki.joomlart.com/wiki/JA_Template_Framework/Overview" target="_blank" id="t3_logo">Powered by T3 Framework</a>
          <?php endif; ?>
     </div>
</div>
<!-- POPUPS CART ADDED-->
<?php $this->loadBlock('usertools/login'); ?>
<?php $this->loadBlock('usertools/register'); ?>
<?php $this->loadBlock('usertools/cart'); ?>
<jdoc:include type="modules" name="debug" />
</body>
</html>




Thanks in advance

Ron
ProHydroSupply
661-750-2GRO
User avatar
Junior Boarder

GK User
Wed Aug 11, 2010 12:41 pm
I did something and it doesn't work at all now :(
User avatar
Junior Boarder

GK User
Thu Aug 12, 2010 9:49 am
Ron you are going about it all wrong... And depending on the look you are going for all you have to do is apply a style or theme to Virtuemart.
User avatar
Fresh Boarder

GK User
Sat Aug 14, 2010 7:52 am
Please help and let me know what I am doing wrong that is why I am here asking. The theme is cool and works fine. I just want to integrate the js shopping cart feature like the mystore template.
User avatar
Junior Boarder


cron