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

CouponAdmin not showing action to generate coupons #107

Open
wernerkrauss opened this issue Dec 3, 2020 · 0 comments
Open

CouponAdmin not showing action to generate coupons #107

wernerkrauss opened this issue Dec 3, 2020 · 0 comments

Comments

@wernerkrauss
Copy link
Contributor

In DiscountModelAdmin's getEditForm() I changed this:

        if ($grid = $form->Fields()->fieldByName($this->sanitiseClassName(OrderCoupon::class))) {
            $grid->getConfig()
                ->addComponent(
                    $link = new GridField_LinkComponent('Generate Multiple Coupons', $this->Link(). '/generatecoupons'),
                    GridFieldExportButton::class
                );
            $link->addExtraClass('ss-ui-action-constructive btn btn-primary');
        }

It fixes a lot, but I didn't go too much into detail. It's still not shown inside the GridfieldButtonRow above but underneath it.

@wernerkrauss wernerkrauss changed the title Coupon CouponAdmin not showing action to generate coupons Dec 3, 2020
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