It seems that there are SO many errors according especially to the notifications to sellers.
As soon as I set the Rule for sending Email to the Seller these problems appeared:
Error in 62 of mp_orders_rules.inc
SELECT uid FROM {mp_seller_order_statuses} WHERE order_id = :order_id' => $params['order']->order_id))
Wrong. Must be: "$params->order_id" instead of "$params['order']->order_id"

Next: the Table "mp_seller_order_statuses" is empty, so the Query above doesn't get any Data. Why is that?

I changed the query to:
SELECT node.uid, uc.* FROM uc_order_products AS uc LEFT JOIN node ON node.nid = uc.nid WHERE uc.order_id =" . $params->order_id

...leading to the next error:
token_replace_multiple is an unknown function (mp_orders.module line 702 and 703)

another error:
Warning: Invalid argument supplied for foreach() in mp_orders_uc_order() (Zeile 157 von /var/www/vhosts/XXXXXXX.de/httpdocs/sites/all/modules/ubercart_marketplace/mp_orders/mp_orders.module).

Any ideas of fixing these points? I don't have enough knowledge about how all the mp code is built, and if possible: I don't want to spent the time to fix it all alone by myself. :-(
Please, help.

Comments

zeezhao’s picture

Assuming author of product is also seller, I was able to get emails to seller using loop and author:mail.

Rule enclosed - you can import and amend as required:

{ "rules_e_mail_seller_checkout_notification" : {
    "LABEL" : "E-mail seller checkout notification",
    "PLUGIN" : "reaction rule",
    "REQUIRES" : [ "rules", "uc_cart" ],
    "ON" : [ "uc_checkout_complete" ],
    "DO" : [
      { "LOOP" : {
          "USING" : { "list" : [ "order:products" ] },
          "ITEM" : { "list_item" : "Current list item" },
          "DO" : [
            { "mail" : {
                "to" : "[list-item:node:author:mail]\u000D\u000A",
                "subject" : "OrderID: [list-item:order-id] Product: [list-item:title]",
                "message" : "Order: [list-item:order-id]\u000D\u000ANid: [list-item:nid]\u000D\u000ATitle: [list-item:title]\u000D\u000AQty: [list-item:qty]\u000D\u000APrice: [list-item:cost]\u000D\u000ASeller: [list-item:node:author]",
                "language" : [ "" ]
              }
            }
          ]
        }
      }
    ]
  }
}
netVidual’s picture

Ah, very good. Thanks.
I allready fixed the issue my hacking the code inside the module... yes... I know, but I needed to get it fixed very quickly. But I'll try the rule instead then.

olisb’s picture

Thanks zeezhao, that worked superbly :)

mcdoolz’s picture

I tried this rule and while the email with the order is being sent appropriately, the orders recorded by the system are in fact empty.

Is this just me? Or is this everybody?

krazykellie’s picture

Is there a way to create this rule using the email templates within Ubercart? I'd really like the fancier version....right now I get a plain text email using this rule. Any updates to this or suggestions?

mcdoolz’s picture

How do I set up a rule that checks and compiles items from the same seller (author) into one email, and sends one for each author.

I make the list of authors using the same routine as above, then for each in the list I create a list of items, but how do I check for the author and filter the values per list?

Is there a way to specify usage of a template for an email in rules? I remember seeing something in my travels, but I can't say for sure..

krazykellie’s picture

Dooley,

Did you ever find a solution for this?

eboss’s picture

Issue summary: View changes

hi GevatterTod,
Could you tell me how to fix the issue by hacking the code inside the module. I Found same problem

vinta’s picture

Спасибо zeezhao, твоё правило то что надо, просто золотое правило. GevatterTod тоже спасибо, заменил "$params->order_id" instead of "$params['order']->order_id" избавился от Error in 62 of mp_orders_rules.inc, но так и не понял что надо делать с SELECT node.uid, uc.* FROM uc_order_products AS uc LEFT JOIN node ON node.nid = uc.nid WHERE uc.order_id =" . $params->order_id ? Куда это вставлять? Вместо чего?

OliveIT’s picture

Translation of vinta's post:

Thank zeezhao, your rule that is necessary, just the golden rule. GevatterTod too thanks, replaced "$ params-> order_id" instead of "$ params ['order'] -> order_id" got rid of Error in 62 of mp_orders_rules.inc, but did not understand what to do with SELECT node.uid, uc. * FROM uc_order_products AS uc LEFT JOIN node ON node.nid = uc.nid WHERE uc.order_id = ". $ params-> order_id? Where is paste? Instead of what?

Looks like we are still looking for an elegant solution to this? Can we include the rule in the module itself and push this into main branch?

If not, should we add this as a downloadable text file for use with the module and using rules import?

vinta’s picture

Да добавьте. Желательно чтобы и атрибуты товара тоже были указаны в письме. И хочется что бы этот модуль был и для Drupal8. Простите что не на английском.