Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Zbox info in ps_emailalerts #284

Open
patrikv14 opened this issue Dec 17, 2023 · 1 comment
Open

Missing Zbox info in ps_emailalerts #284

patrikv14 opened this issue Dec 17, 2023 · 1 comment

Comments

@patrikv14
Copy link

Ahojte, neriesili ste niekto ako doplnit do order_conf v moduly ps_emailalerts nazvy presnych ZBOXov ?
V beznom order_conf sa to pekne dotiahne ale do ps_emailalerts to nezoberie.
Neriesil to niekto ?
Diky za odpoved.

public function hookSendMailAlterTemplateVars(&$params)
{
    if (
        !isset($params['template'], $params['template_vars']['{id_order}'], $params['template_vars']['{carrier}']) ||
        strpos((string)$params['template'], 'order') === false
    ) {
        return;
    }

    $orderData = Db::getInstance()->getRow(
        sprintf('SELECT `name_branch`, `id_branch`, `is_carrier`
        FROM `%spacketery_order` WHERE `id_order` = %d AND `is_ad` = 0', _DB_PREFIX_, (int)$params['template_vars']['{id_order}'])
    );
    if (!$orderData) {
        return;
    }

    $params['template_vars']['{carrier}'] .= ' - ' . $orderData['name_branch'];
    if ((bool)$orderData['is_carrier'] === false) {
        $params['template_vars']['{carrier}'] .= sprintf(' (%s)', $orderData['id_branch']);
    }
}
@patrikv14 patrikv14 changed the title Missing Zbox info in ps_mailalerts Missing Zbox info in ps_emailalerts Dec 17, 2023
@patrikv14
Copy link
Author

Provizorne vyriešené cez zasielanie BCC zo šablóny order_conf ale ak to niekto riešil budem vďačný.
Ď

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant