Tuesday, July 13, 2010

IE thickbox iframe background is white

If your thickbox iframe background is white you need to add allowtransparency='true' to the iframe.

open up the thickbox.js file and do a search for "<iframe" then just add the missing parameter.

jQuery("#TB_window").append("");

Or if your lazy just download my fixed version


Stumble Upon CodePyro

Wednesday, June 30, 2010

Virtuemart titles:change the category settings in SH404SEF

The SH404Sef plugin for sef urls in viretumart appends every category in the title. It does this even when you change the "Insert Categories" parameter in the sh404sef admin config.

(before modification titles look like this)
example title: Product Name | Category Name | Category Name | Category Name | Site Name

(after change)
example title: Product Name | Category Name

Download the Fix

The 2 changes made to the plugin.

  • Used the "Insert Categories" param to show all the categories or just the last one
  • Removed the Site name from the title

unzip and copy the com_virtuemart.php to
components\com_sh404sef\meta_ext\

note:
changed lines: 162 - 179
added lines: 340-343

Download the Fix


Stumble Upon CodePyro

Wednesday, June 23, 2010

CSVI virtuemart image export - remove HTTPS

When exporting products in virtuemart using csvi and using the picture_url field the export will have https for all the image urls.

open up
administrator\components\com_csvimproved\models\productexport.php

do a quick search for "picture_url". it should be around like 443 (interesting considering http is 443).

Anyway here is the line to swap out https

if (substr($picture_url, 0, 5) == 'https') $picture_url = 'http'.substr($picture_url, 5);

place it just after 448, likea so...

447:if (substr($record->product_full_image, 0, 4) == 'http') $picture_url = $record->product_full_image; 
        else $picture_url = 448:JURI::root().'components/com_virtuemart/shop_image/product/'.$record->product_full_image;
if (substr($picture_url, 0, 5) == 'https') $picture_url = 'http'.substr($picture_url, 5);


Stumble Upon CodePyro

Monday, May 03, 2010

Excel format cells with quotes

Here is how to format a text cell so it will have either double or single quotes. I needed to import a csv file with text fields formatted with double quotes. There are probably some more reasons why you might need to do this.

  • Edit the cell or column you need to format
  • choose format cell
  • Select Custom from the bottom
  • use the formula \"@\"

The @ symbol represents the text in the field. You can wrap any text field with any character but make sure to escape it.


Stumble Upon CodePyro

Tuesday, April 06, 2010

FedEx Handling fee as a percent in virtuemart

If your like me, and every client needs something special and different. One of my latest e-commerce stores used FedEx for shipping. Great, no problem its an easy setup in Virtuemart. Their FedEx account gives them special pricing for the online shipping calculator, which they need to add 40% too. Virtuemart doesn't allow you to add a percent only a set integer amount.

The handling fee variable in virtuemart is setup only to add a base amount to the shipping cost. We needed to add 40% to each shipping amount.

This is a change specifically for FedEx, but the other shippers should be similar.

Change the handling fee in the FedEx preferences to 0.40.

components/com_virtuemart/classes/shipping/fedex.php: around line 206
change & add the lines below.

//add the percent or set amount 
if(FEDEX_HANDLINGFEE < 1)
     $charge =$rate_Ret['1419-'.$i]+ $rate_Ret['1419-'.$i] * floatval( FEDEX_HANDLINGFEE );
    else
     $charge = $rate_Ret['1419-'.$i] + floatval( FEDEX_HANDLINGFEE );


Stumble Upon CodePyro

Tuesday, March 30, 2010

Joomla Administrator force SSL login loop FIX

It took me A LONG time to find a solution on how to fix this problem. All credit for this fix goes to member:jptkts from http://forum.joomla.org.

This fixes the login loop issue when trying to login to the admin after making the Force_SSL to 1 or Administrator.

His original forum post is
http://forum.joomla.org/viewtopic.php?p=1619969#p1619969

I just wanted to re-post it in an easy to find place!

In the file: Joomlaroot/libraries/joomla/environment/uri.php
starting on line 214 replace this if statement:
Code:
if(JPATH_BASE == JPATH_ADMINISTRATOR) {
   $base['path'] .= '/administrator';
}

with the following:
Code:
if(JPATH_BASE == JPATH_ADMINISTRATOR) {
   $force_ssl = $config->getValue('config.force_ssl');
   if($force_ssl > 0){
      $base['prefix'] = ereg_replace("http://","https://",$base['prefix']);
   }
   $base['path'] .= '/administrator';
}


Stumble Upon CodePyro

Thursday, March 25, 2010

virtuemart google analytics with ppc

Good morning today we needed to add google analytics to a virtuemart joomla store. Heres how we done it.

Over on joomlacode.org Matthieu Barbe did a great job of creating a google analytics plugin. His plugin will work on every page. It shows the generic google analytics code for normal pages and for the shopping cart finish/confirmation will track a users order, price, items etc.

Visit joomlacode.org to download the original mod_gavirtuemart.

I have requested to join the project, but until that goes through ill post my modifications to the module here.

The module had a bug in several queries with user_info_id using the default or wrong id when a different shipping address is used.

Our SEO consultant Scott Orth for this project recommended setting up google PPC conversion code. To make life easy I added some settings and template for ppc.php to show only on the order thank you/confirmation page.

This is one of my first actual joomla module posts so let me know if it works, or doesn't.
mod_gavirtuemart w ppc


Stumble Upon CodePyro