News:

Support the VirtueMart project and become a member

Main Menu

Error: Warning: Invalid argument supplied for foreach()

Started by micah411, May 30, 2014, 05:58:33 AM

Previous topic - Next topic

micah411

Just an introduction, I'm pretty much a novice. I'm pretty good with basic coding (html, css, javascript) but chose to use virtuamart because thats about where my experience ends.

I'm running into an error on my site http://rmartinplumbing.net/home/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=15&Itemid=444. The error is: Warning: Invalid argument supplied for foreach() in /home/content/52/12128552/html/home/templates/theme494/html/com_virtuemart/productdetails/default_addtocart2.php on line 44

Does anyone know how to fix this from the front end (joomla) without going directly into the code? If not, does anyone have specific instructions on how to correct this?

Thanks in advance!
Micah

GJC Web Design

It's not an error - it's a warning - in an ideal world it wouldn't be there but it does no harm
it is just your reporting set too high either in joomla or the server

but:
1. there is no such file as default_addtocart2.php in std VM so it is in your template - ask the template supplier

2. simple fix  - add

error_reporting(E_ERROR);

as the first php line in that file
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/