Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Dropdown Shopping Cart(SKU# FLEX-00001)

TOPIC: Error 500

Error 500 6 years 10 months ago #13891

Hello, I touch you because I have a 500 error by activating your module how to solve the problem?

Thx
The administrator has disabled public write access.

Error 500 6 years 10 months ago #13906

Hi,

That's weird. Did you manage to get the detail information about this 500 error? What your server logs says? What file and what lines caused that 500 error message?

TIP: You can get the PHP Error log file from your Hosting Control Panel (cPanel).

Regards.
The administrator has disabled public write access.

Error 500 6 years 7 months ago #14305

You get Error 500 if the product doesn't have any image.
If you check prepareAjaxData() function in plgSystemFlexibleVm3cart class there is a line like:
$data->products[$i]['flexible_image'] = $product->images[0]->displayMediaThumb('',false,'',true,false,false,0,0);
But if the product doesn't have image at all there won't be $product->images so there won't be displayMediaThumb() method neither.
I just put a simple if statement before this line but I'm sure there would be a better solution.
The administrator has disabled public write access.

Error 500 6 years 7 months ago #14319

Hmm. insteresting, because displayMediaThumb() is supposed to display "noimage.gif" if there is no available image.

Try changing that line with this:
$data->products[$i]['flexible_image'] = ($product->images) ? $product->images[0]->displayMediaThumb('',false,'',true,false,false,0,0) : '<img src="/components/com_virtuemart/assets/images/vmgeneral/noimage.gif" />';

this would be a better approach. It will display noimage.gif if the product doesn't have any image.

regards.
The administrator has disabled public write access.
Time to create page: 0.082 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo