Error
  • Error loading feed data.
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: / 38
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 (31)

Subscribe to this comment's feed

Show/hide comments
 1 2 3 4 > 
...
thanks, much appreciated!
wz , April 12, 2011
Thanks!!!
You are great!
Sorry for my poor english, I'm trying to write the best I can smilies/grin.gif
I was looking for some fix and I found it here, thank you.
gara44mag , February 23, 2011
Gracias
Thanks for the fix....it was annoying the crap out of me.
Chris
fullflexoffroad.com
Chris , January 30, 2011
I found this problem in VM 1.1.6
Very frustrating. It should be fixed in the distribution.

I have a question though. Since most references are in lower case surely it must be that one place or file that has FLYPAGE in upper case when it should be lowercase?
Peter , January 11, 2011
...
Really appreciate your post. It works for me on 1.1.6smilies/grin.gif
Noah , December 16, 2010
Thank You!
Thank you very much for the clear and concise explanation. Worked perfectly!
Head Nut , September 29, 2010
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 22, 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 08, 2010
thanks for saving our time
thanks for saving our time and mood from frustration
Matt Janson , March 25, 2010 | url
...
thanks! this is so understandalbe for common users who are just starting to learn Joomla!
Eugene , February 22, 2010
...
thanks! this is so understandable for common users who are starting to learn Joomla!
Eugene , February 22, 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
Thanks
God bless you
Ivan , November 22, 2009 | url
Brilliant
Thank you so much. You saved me hours of frustration.
Didge , November 13, 2009
cool
wow.. what a great posting. Thank's a lot for knowledge sharing. Two thumbs up smilies/cool.gif
hanum , October 17, 2009 | url
The flypage problem is not widespread
Mike, you are right. This flypage problem does not happen on every installation of Virtuemart. Especially if you install the Joomla release with VM already installed it doesn't seem to happen (maybe I should check the code). However, when it happens it can be maddening.

By now I must have installed over a 100 virtuemart shops (not all live, many have been just staging or test shops) and I have seen this problem no more than 10 or 15 times over the years.

Like I always say to my clients and my students, it's not how well you know how to build web sites, but how well you handle the problems that separates a pro from the regular users. Anyone can learn to install and configure Joomla and VM, but knowing what to do when things don't work is even more important.

Thank you for reading.
Marco Conti , October 11, 2009 | url
...
Thanks so much! I'm just starting with joomla and virtuemart and have only very basic skills in html, but this was so easy! Finally it works!
ulla , October 11, 2009
 1 2 3 4 > 

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