safePath error in myStore on VM upgrade

Change your online store into modern look with myStore eCommerce VirtueMart Joomla template - discussion forum.
GK User
Thu Nov 15, 2012 1:50 am
Fatal error: Class 'shopFunctions' not found in /home/soundrng/public_html/administrator/components/com_virtuemart/helpers/mediahandler.php on line 226

PHP Built On Linux 2.6.18-408.el5.lve0.8.58 #1 SMP Wed Mar 14 14:10:01 EDT 2012 x86_64
Database Version 5.1.65-cll
Database Collation utf8_general_ci
PHP Version 5.3.13
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 2.5.7 Stable [ Ember ] 13-September-2012 14:00 GMT
Joomla! Platform Version Joomla Platform 11.4.0 Stable [ Brian Kernighan ] 03-Jan-2012 00:00 GMT
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:16.0) Gecko/20100101 Firefox/16.0

Template is 9th May 2012 (not 15th May) version of myStore (Gavick), however there is no difference in the code relating to this as far as I can see.

Could it be a template issue when I have three of exactly the same type of sub-category links and yet only one of them works now?
for instance these two work correctly (included the menu type used, but same issue when clicking directly from the auto generated sub-categories display when viewing the Categories layout): (Virtuemart Categories layout) ... ker-stands (Virtuemart Category layout)
and yet these two don't ... i-fi-racks (Virtuemart Category layout) ... l-supports (Virtuemart Category layout)

When queired via Virtuemart this is what I git:

[quote author=jenkinhill link=topic=109808.msg367843#msg367843 date=1352457789]
Looks like this is failing::

$safePath = shopFunctions::checkSafePath();
return FALSE;

Is safepath properly set in VM configuration? Have you tried without SEF?

Gavick templates have regularly been found to cause issues with VM, but mainly .js problems.

the safePath issue seems to have only surfaced after upgrading VM 2.0.6 to 2.0.12f AND it does relate to the highlighted code. I have put in a dodgy fix by setting this site's safePath manually in mediahandler.php

But what I think is happening in that code is that the safePath variable either isn't being properly set by shopfunctions.php or isn't being referenced by this code in the mediahandler.php.

So I can't see how that would have anything to do with the template code... but then... I'm not smart enough to be able to figure it out.
User avatar
Senior Boarder

GK User
Thu Nov 15, 2012 8:34 am
This issue is not related with template but with VirtueMart core, I see that VM support gives you proper directions to resolve problem.

Is safepath properly set in VM configuration?

Did you set the safe path ? Please try to disable SEF URL's and check results. You can also test it on default template to make sure that it is not our product problem.
User avatar
Platinum Boarder

GK User
Tue Feb 18, 2014 4:23 am


Code: Select all
function sendRatingEmailToVendor ($data) {

after this line, insert:
Code: Select all
if(!class_exists('ShopFunctions')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'shopfunctions.php');

User avatar
Fresh Boarder

GK User
Tue Feb 18, 2014 9:03 pm
If this is related with core VM files (at it is) you should also provide this solution on official VM support forum.
User avatar
Platinum Boarder

Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.