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

User Rating: / 6
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 (10)

Subscribe to this comment's feed

Show/hide comments
www.thefactory.ro
thanks! this is so understandalbe for common users who are just starting to learn Joomla!
Eugene , February 23, 2010 | url
www.thefactory.ro
thanks! this is so understandable for common users who are starting to learn Joomla!
Eugene , February 23, 2010 | url
...
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 18, 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
Curious
I use multiple flypages and don't seem to have the problem described above. I have checked all the files mentioned and all references are in lower case. I am not a techie - am I missing something?
That aside I felt that the article is well written and easy to understand
Mike Dreaneen , September 17, 2009 | url

Write comment

smaller | bigger

busy

10 Minute Joomla! Tips Blog

Conticreative joomla book reviews

Podcast Feed

Independent joomla hosting reviews

Books

Books we suggest...

 

Spreadfirefox Affiliate Button
switch the positions on