Jump to content

Edit History

overbags

overbags


solved

hello everyone
I have an old module decommissioned by the developer that sends the cart to the email indicated in the sending form

I would need to receive the same email to another email address

I've been trying to figure out how to do it all day but without success

I think I understood that the code that sends the email is this

 

		if (!count($this->errors)) {
                    if (@Mail::Send(
                        (int)$currentCart->id_lang,
                        'shopping_cart',
                        Mail::l('Carrello condiviso', (int)$currentCart->id_lang),
                        $templateVars,
                        $email,
                        $name,
                        $this->context->customer->email,
                        $this->context->shop->name,
                        $file_attachement, null, $this->module->getLocalPath() . 'mails/'
                    )) {
                        $ids = $this->getIdCartRules($currentCart);
                        // Add log when send mail to guest success!
                        if (!Db::getInstance()->insert('ets_savemycart',
                            [
                                'id_cart' => (int)$currentCart->id,
                                'token' => $token,
                                'cart_rules' => implode(',',$ids),
                            ]
                        )) {
                            $this->errors[] = $this->module->l('Adding log failed.', 'submit');
                        }
                        die(json_encode([
                            'ok' => 1,
                            'msg' => $this->module->l('Mail sent successfully.', 'submit')
                        ]));
                    } else
                        $this->errors[] = $this->module->l('Sending mail failed.', 'submit');
                }

I tried adding

$email = $email .', [email protected]';

but it doesn't work

overbags

overbags

hello everyone
I have an old module decommissioned by the developer that sends the cart to the email indicated in the sending form

I would need to receive the same email to another email address

I've been trying to figure out how to do it all day but without success

I think I understood that the code that sends the email is this

 

		if (!count($this->errors)) {
                    if (@Mail::Send(
                        (int)$currentCart->id_lang,
                        'shopping_cart',
                        Mail::l('Carrello condiviso', (int)$currentCart->id_lang),
                        $templateVars,
                        $email,
                        $name,
                        $this->context->customer->email,
                        $this->context->shop->name,
                        $file_attachement, null, $this->module->getLocalPath() . 'mails/'
                    )) {
                        $ids = $this->getIdCartRules($currentCart);
                        // Add log when send mail to guest success!
                        if (!Db::getInstance()->insert('ets_savemycart',
                            [
                                'id_cart' => (int)$currentCart->id,
                                'token' => $token,
                                'cart_rules' => implode(',',$ids),
                            ]
                        )) {
                            $this->errors[] = $this->module->l('Adding log failed.', 'submit');
                        }
                        die(json_encode([
                            'ok' => 1,
                            'msg' => $this->module->l('Mail sent successfully.', 'submit')
                        ]));
                    } else
                        $this->errors[] = $this->module->l('Sending mail failed.', 'submit');
                }

I tried adding

$email = $email .', [email protected]';

but it doesn't work

×
×
  • Create New...