Skip to content

Testing "back in stock notfication" uses "price grid" instead of "stock grid" in preview mode #18

@rutgerrademaker

Description

@rutgerrademaker

Issue seems to be this part uses the "template" to determine the block
But in the module, the template is actually containing the id of the template.

https://github.com/yireo/Yireo_EmailTester2/blob/master/Model/Mailer/Variable/AlertGrid.php#L161

    private function getBlockClass(): string
    {
        if (strstr($this->template, 'stock')) {
            return Stock::class;
        }

        return Price::class;
    }

Maybe we can look up the actual template based upon this id, and then use the orig_template_code ?
This would work for catalog_productalert_email_stock_template and amxnotif_customer_notifications_stock_template

I might find some time for this one day, mainly posting this to get some feedback on a potential solution

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions