Home Conticreative Blogs The Joomla Blog Virtuemart Flypage fix - flypage not changing on product pages

Blogs - The Conticreative Joomla Blog

Virtuemart Flypage fix - flypage not changing on product pages

Attention: open in a new window. PDFPrintE-mail

Written by Marco Conti Wednesday, 16 September 2009 14:09

Share |
User Rating: / 16
PoorBest 

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):

Virtuemart Flypage Controls
(img:1) Virtuemart Flypage Controls

Flypages are kept in your Virtuemart template (usually default unless you created your own) which in turn is located in:

/components/com_virtuemart/themes/(your_template)

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.

Virtuemart Flypage Controls
(img:2) Virtuemart Flypage Controls

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:

administrator\components\com_virtuemart\html\

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.

Be well.
/cc/

Trackback(0)

TrackBack URI for this entry

Comments (16)

Subscribe to this comment's feed

Show/hide comments
 1 2 > 
Problem not fixed on 1.1.4
I have still have the problem after the change on virtuemart 1.1.4

Server configuration :
Joomla 1.5.20
PHP 5.2.13
MySQL 5.0.90

Best regards,
thierry , August 23, 2010
Templatemagician
What a great info you shared in this post! Thanks a lot for sharing this work.
Addison , August 03, 2010
Brilliant
Thank man, i have been looking so ridiculously long for this! i really appreciate this!
Jamie , July 31, 2010
A God-sent
I got very agitated with a new Virtue-mart installation. I didn't have to deal with one for a while and so this was a new problem. This needs to be fixed on the code before download. Your steps here were very straight forward and to the heart of the matter. Thanks a million, be blessed.
James , July 22, 2010
Bless You Man!!!
Thanks!!!
Michal , July 09, 2010
thanks for saving our time
thanks for saving our time and mood from frustration
Matt Janson , March 26, 2010 | url
...
thanks! this is so understandalbe for common users who are just starting to learn Joomla!
Eugene , February 23, 2010
...
thanks! this is so understandable for common users who are starting to learn Joomla!
Eugene , February 23, 2010
...
This fix doesn't work for me with the latest release of Virtuemart.

Joomla cache off, browser cache cleared every time, default flypage and individual category flypage changed. Code updated as above and original. None of these made any difference. It still doesn't work.

Answer from admin: My suggestion would be to start fresh and try to apply the fix again. In one instance, I had missed one of the instances and it didn't work for me either. I went back and did it again after loading a backup and this time it worked. Try it. It's better than having a broken shop.
AdamN , December 09, 2009
Muchio thanks mAn
god bless you for this nice article, now my headache gone smilies/smiley.gif
Sergejus , December 05, 2009
 1 2 > 

Write comment

You can add your comment here

busy

10 Minute Joomla! Tips Blog

Conticreative joomla book reviews

Independent joomla hosting reviews

Joomla Training

Conticreative offers Individual and Corporate training (in person or online) on Joomla, Wordpress, Zen Cart and other leading Open Source scripts.

[Read More...]

Books

Books we suggest...

 

Spreadfirefox Affiliate Button
switch the positions on