Author Topic: Product update error!  (Read 276 times)

Joomdev1

  • Beginner
  • *
  • Posts: 8
  • A beginner
    • Joomdev
Product update error!
« on: March 17, 2017, 21:27:14 pm »
Hello, everyone, I got stuck with something that I have never experienced before. Okay, problem is that when I try to select multivariant for the products and hit save it works wonderfully well and the value I am trying to save is updated. But when I try to update the same product second time around I came up with the following errors below:

On the backend I see:
Fatal error: Cannot use object of type stdClass as array in /home/XXXXXXXXXX/XXXXXXXXX/administrator/components/com_virtuemart/models/customfields.php on line 312

Front end:
Fatal error: Cannot use object of type stdClass as array in /home/XXXXXX/XXXXXX/templates/fire/html/com_virtuemart/sublayouts/customfield.php on line 114


Thank You.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Hero Member
  • *
  • Posts: 7431
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Product update error!
« Reply #1 on: March 17, 2017, 22:15:54 pm »
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Joomdev1

  • Beginner
  • *
  • Posts: 8
  • A beginner
    • Joomdev
Re: Product update error!
« Reply #2 on: March 17, 2017, 23:24:59 pm »
My bad!

 I should have mentioned it in the first place.

VM 3.0.18
Joomla 3.6.5

Thanks

Joomdev1

  • Beginner
  • *
  • Posts: 8
  • A beginner
    • Joomdev
Re: Product update error!
« Reply #3 on: March 21, 2017, 17:28:23 pm »
Hello any update here?

In addition to my previous post "I am not able get the values of my own custom field created in cart." Error I get "com_virtuemart/sublayouts/customfield.php  ------------- line no --------736"

Here is code below if we comment this line of code it is working fine but not able to populate/show custom  field value in cart list.

Code: [Select]
/* if(!empty($productCustom->selectoptions[$k]->clabel) and in_array($productCustom->selectoptions[$k]->voption,VirtueMartModelCustomfields::$dimensions)){
                                    $value .= vmText::_('COM_VIRTUEMART_'.$productCustom->selectoptions[$k]->voption);
                                    $rd = $productCustom->selectoptions[$k]->clabel;
                                    if(is_numeric($rd) and is_numeric($option)){
                                        $value .= ' '.number_format(round((float)$option,(int)$rd),$rd);
                                    }
                                } else {
                                    if(!empty($productCustom->selectoptions[$k]->clabel)) $value .= vmText::_($productCustom->selectoptions[$k]->clabel);
                                    $value .= ' '.vmText::_($option).' ';
                                } */


Thanks

GJC Web Design

  • 3rd party VirtueMart Developer
  • Hero Member
  • *
  • Posts: 7431
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Product update error!
« Reply #4 on: March 21, 2017, 17:42:36 pm »
Try VM3.2 - downloads
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Joomdev1

  • Beginner
  • *
  • Posts: 8
  • A beginner
    • Joomdev
Re: Product update error!
« Reply #5 on: March 24, 2017, 18:04:38 pm »
Hello,

Thanks for the response.

But it didn't work.

Any suggestions please ?