“Empowering business and individuals to manage their own web presence effectively and affordably.”
Written by Marco Conti Wednesday, 16 September 2009 14:09
If you use Virtuemart with Joomla! and you have tried to assign a different "flypage" to each product category, you may have noticed that this feature doesn't always work. Fortunately, I have found a solution and made an easy to follow tutorial that anyone with server access or an FTP client should be able to execute fairly easily.
But first a bit of context: for starters, the obscure term "Flypage" in Virtuemart simply means "Template". No more no less. Why it is called "Flypage" is beyond me. My clients usually have all sort of reactions when I mention the technical name of Virtuemart Templates. Mostly they are baffled.
However, using "Flypages" In Virtuemart can allow you to change the appearance of certain pages in your shop; either the category list display (where all your products are displayed in a list), or the product description itself.
You cannot change the template (flypage) in an individual page (although it would certainly be nice) but you can change the product description flyppage at the category level.
If you go to Virtuemart > Products > List Categories and choose a category at the very bottom you'll see this box at right (img:1):
Flypages are kept in your Virtuemart template (usually default unless you created your own) which in turn is located in:
However, ever since I can remember, handling Flypages in Virtuemart can be tricky. For one thing, changing the Flypage in the virtuemart configuration [configuration > Site > Layout pane (img:2)] will only change any new categories to the Flypage. Old categories will need to be changed individually.
But the most infuriating issue is that even after one goes to the category page (img:1) and changes the category flypage, most likely nothing happens. The product description pages will continue sporting the same old Flypage they always did.
Recently, as it often happens, I became very aggravated at this behavior and I researched it in the Virtuemart Forum. There I discovered I was not alone, but I also found a fairly easy fix for the problem. One that it's not yet in the Virtuemart Core, as far as I know (I am using 1.1.3, the latest version).
Apparently, in the Virtuemart core code some instances of 'flypage" are in lower case when they should be in upper case. The fix is really easy and it's beyond me why it hasn't been rolled into the core, but here it is:
1) Navigate to this directory on your Joomla installation:
2) Once there, find these files and change (or paste directly for this code) the indicated instance of 'flypage' to 'FLYPAGE' in upper case. Make sure that in your copy 'flypage' is not already in uppercase (as in the example below) or your problem is most likely different):
shop.ask.php (line: 24): $flypage = vmGet($_REQUEST, "FLYPAGE", '' );
shop.basket_short.php (line:30): $flypage = vmGet($_REQUEST, "FLYPAGE", null);
shop.pdf_output.php (line:20): $flypage = vmGet( $_REQUEST, 'FLYPAGE');
shop.product_details.php (line:115): $flypage = vmGet($_REQUEST, "FLYPAGE" );
shop.product_details.php (line:422): $tpl->set( 'FLYPAGE', $flypage );
(line numbers may be slightly off)
3) Save and upload (of course)
I have done this on 4 different shops and each time it worked like a charm. Hopefully it'll work for you as well.
|< Prev||Next >|
Conticreative offers Individual and Corporate training (in person or online) on Joomla, Wordpress, Zen Cart and other leading Open Source scripts.