Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

Profile for Kenneth540

  • OFFLINE
  • Time Zone: GMT +0:00
  • Local Time: 00:35
  • Posts: 1
  • Profile Views: 34
  • Location: Unknown
  • Gender: Unknown
  • Birthdate: Unknown

Signature

Posts

Posts

emo
In my codebase I have a line of code, which is triggered through a cron

const SALE_ORDER_NR = '{{order}}';
$text = str_replace(self::SALE_ORDER_NR, $order, $text);
I am using Magento 1.9;

Here, $order is of type : Sales_Model_Order

$text is not having any substring as {{order}}, instead it is :

Refund of Rs.150.00 for your order 145004617 has been initiated. Refund may take upto 8-9 days to credit into your bank account.
So, the strange behavior is that when I try to run the above code in my local server it passes without any issue.

But when I am trying to run the lines of code via the cron in my Testing Server, I get the following errors :

Catchable fatal error: Object of class Dbaux_Sales_Model_Order could not be converted to string in /var/www/html/magento3/app/code/local/Artio/SMSNotifier/Model/Sms/Template.php on line 351
Since I am new to the world of magento, it would be really helpful if reason for above behavior can be cleared.

Why is the error being thrown when running the cron, and not when I directly call the observer method from another method.
str_replace strange ...
Category: General
More
Přihlášení uživatele Prázdný