coupon code is not showing in order/payment email

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
VirtualSpy
Advanced
Posts: 122
Joined: 05 Jul 2022, 07:55

coupon code is not showing in order/payment email

Post by VirtualSpy » 04 May 2023, 08:01

laravel version 9.48.0 , Aimeos version 2022.10.4 and PHP version 8.1.3 (Win)

coupon code is not showing in order/payment email

src code

Code: Select all

$basket = $order->getBaseItem();
$view->summaryBasket = $basket;
template code

Code: Select all

<h3 class="p-m-item">
                                                    <?= $enc->html( $this->translate( 'controller/jobs', 'Coupon codes' ), $enc::TRUST ) ?>
                                                </h3>
                                                <div class="content">
                                                    <?php if( !( $coupons = $this->summaryBasket->getCoupons() )->isEmpty() ) : ?>
                                                    <ul class="attr-list">
                                                        <?php foreach( $coupons as $code => $products ) : ?>
                                                        <li class="attr-item">
                                                            <?= $enc->html( $code ) ?>
                                                        </li>
                                                        <?php endforeach ?>
                                                    </ul>
                                                    <?php endif ?>
                                                </div>
please tell me what is wrong there.
Attachments
e.PNG
e.PNG (20.79 KiB) Viewed 2239 times

User avatar
aimeos
Administrator
Posts: 7889
Joined: 01 Jan 1970, 00:00

Re: coupon code is not showing in order/payment email

Post by aimeos » 07 May 2023, 11:13

The template code seems to be correct:
https://github.com/aimeos/ai-controller ... #L176-L182

Is the coupon code shown in the checkout/confirm page after the payment?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
VirtualSpy
Advanced
Posts: 122
Joined: 05 Jul 2022, 07:55

Re: coupon code is not showing in order/payment email

Post by VirtualSpy » 08 May 2023, 14:13

aimeos wrote: 07 May 2023, 11:13 The template code seems to be correct:
https://github.com/aimeos/ai-controller ... #L176-L182

Is the coupon code shown in the checkout/confirm page after the payment?
'order/base/coupon' was missing in my version in payment and delivery both

Code: Select all

$domains = ['order/base', 'order/base/address', 'order/base/product', 'order/base/service', 'order/base/coupon'];
https://github.com/aimeos/ai-controller ... d.php#L224

Post Reply