-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Make Mage_GiftMessage
optional in templates
#4266
Conversation
c1a9aca
to
92439f8
Compare
app/design/adminhtml/default/default/template/sales/order/create/giftmessage.phtml
Outdated
Show resolved
Hide resolved
ae84c75
to
d823857
Compare
Nice! For the template you edit, can you please check that this is at top ...
|
Yeah, that annoyed me when i was looking at the templates Does it need |
No. var is more importan. |
d823857
to
26ad492
Compare
Great. :) Can you please add return types to newly added methods? |
app/code/core/Mage/GiftMessage/Block/Adminhtml/Sales/Order/View/Items.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/GiftMessage/Block/Adminhtml/Sales/Order/Create/Items.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php
Outdated
Show resolved
Hide resolved
|
To not break anything i'd not change existing methods. |
imo, if |
6a59fc4
to
ebeed07
Compare
Very nice. Thanks for fixing phpstan issues too. First i thought it would be small change ... but no. :) Lets wait for #4323. It could replace all |
<?php echo $this->escapeHtml($_item->getDescription()) ?> | ||
<?php echo $this->escapeHtml($parentItem->getDescription()) ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this correct? changing from item to parentitem?
<?php echo $this->escapeHtml($_item->getDescription()) ?> | ||
<?php echo $this->escapeHtml($parentItem->getDescription()) ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was also changed from item to parentitem, and some other times in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the change makes sense. See
magento-lts/app/design/frontend/rwd/default/template/bundle/email/order/items/shipment/default.phtml
Lines 28 to 32 in 3a2a11c
<?php if($this->getItemOptions() || $parentItem->getDescription() || $this->canDisplayGiftmessage()): ?> | |
<?php $_showlastRow = true ?> | |
<?php else: ?> | |
<?php $_showlastRow = false ?> | |
<?php endif ?> |
$_showlastRow = true
when there is something in $parentItem->getDescription()
$_item
is from <?php foreach ($items as $_item): ?>
. So, based on these, the change should be correct.
Description (*)
This makes all templates use functions in their blocks to check
isModuleEnabled('Mage_GiftMessage')
firstRelated Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)