Error in joomdlehikashop

  • Fabio Ballor
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
13 years 1 month ago #1 by Fabio Ballor
Error in joomdlehikashop was created by Fabio Ballor
Hi antonio

I updated hikashop and I get this error after I make an order (order status "created"):
Notice: Undefined property: stdClass::$order_status in /XXXX/XXXX/public_html/plugins/system/joomdlehikashop/joomdlehikashop.php on line 33

I wrote to the support of hikashop who answered a following way:

My latest modifications should not generate order objects without the order_status.
It is possible in HikaShop that some orders could not have an order_status during some updates (where the order_status does not change).
I don't know how the system plugin "joomdlehikashop" works, it is possible that some checks are missing in the plugin.



What could have happened?

How can I fix?

Thanks
Fabio

Joomla 2.5.9
Joomdle 0.9
hikashop 2.1.0

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #2 by Antonio Durán
Replied by Antonio Durán on topic Error in joomdlehikashop
I guess even with the warning, everything keeps working fine, right? I have not tested myself.

As hikahsop suppot says, it seems the object is not carryng the order_status property on order creation, so it gives the warning.
You could try adding some code to order_updated function in joomdlehikashop plugin :

Before:
Code:
if (($order->order_status != 'confirmed') && ($order_data->order_full_price != 0))
Add:
Code:
if (!property_exists ($order, 'order_status')) return;

Please Log in or Create an account to join the conversation.

  • Fabio Ballor
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
13 years 1 month ago #3 by Fabio Ballor
Replied by Fabio Ballor on topic Error in joomdlehikashop
Thanks Antonio

Actually the problem is for products not related to a moodle course.

With your trick is resolved.

But my file does not contain this line
Code:
if (($order->order_status != 'confirmed') && ($order_data->order_full_price != 0))

but this
Code:
if ($order->order_status != 'confirmed')

is also useful to integrate your code?

Regards Fabio

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #4 by Antonio Durán
Replied by Antonio Durán on topic Error in joomdlehikashop
Thanks for the feedback.

Yes, you can add the code the same.

Please Log in or Create an account to join the conversation.