Skip to content

Commit

Permalink
Merge pull request #14 from mageplaza/2.3-develop
Browse files Browse the repository at this point in the history
2.3 develop
  • Loading branch information
haitv282 authored Oct 1, 2020
2 parents 58fb4c4 + b66ce1b commit 2d21252
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Helper/PrintProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function getFileName()
{
$name = $this->getConfigGeneral('file_name') ?: 'cart';
if ($this->getConfigGeneral('timestamp')) {
$name .= ' ' . $this->dateTime->date('Y-m-d H.i');
$name .= ' ' . $this->formatDate($this->dateTime->date('Y-m-d H.i'));
}

return $name . '.pdf';
Expand Down
3 changes: 2 additions & 1 deletion Setup/UpgradeData.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

namespace Mageplaza\ShareCart\Setup;

use Magento\Framework\DB\Ddl\Table;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\UpgradeDataInterface;
Expand Down Expand Up @@ -69,7 +70,7 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
'mp_share_cart_token',
'mp_share_cart_token',
[
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
'type' => Table::TYPE_TEXT,
'length' => 255
]
);
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"mageplaza/module-core": "^1.4.5",
"mpdf/mpdf": "^7.1.0 | ^8.0.0"
},
"version": "1.1.1",
"version": "1.1.2",
"license": "proprietary",
"authors": [
{
Expand Down
10 changes: 5 additions & 5 deletions view/frontend/templates/cart/button.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

?>

<?php if ($block->isEnable() && $block->getItemsCount()) : ?>
<?php if ($block->isEnable() && $block->getItemsCount()): ?>
<script data-role="mp_show_download_share-tmpl" type="text/x-magento-template">
<button data-bind="click:function(){}"
name="action_show_cart"
Expand All @@ -49,17 +49,17 @@
</script>
<script data-role="mp_show_popup-tmpl" type="text/x-magento-template">
<div id="popup-cart" class="mp-popup-cart">
<?php foreach ($block->getItems() as $item) : ?>
<?php if ($item->getProductType() === 'configurable') : ?>
<?php foreach ($block->getItems() as $item): ?>
<?php if ($item->getProductType() === 'configurable'): ?>
<?= /** @noEscape */ ($item->getQty() . ' x ' .
$block->getNameConfigurable($item) . ' - ' .
$block->formatPrice($item->getBasePriceInclTax()))
?>
<?php endif; ?>
<?php if ($item->getParentItemId() && $block->checkConfigurableProduct($item)) : ?>
<?php if ($item->getParentItemId() && $block->checkConfigurableProduct($item)): ?>
<?php continue ?>
<?php endif; ?>
<?php if ($item->getProductType() !== 'configurable') : ?>
<?php if ($item->getProductType() !== 'configurable'): ?>
<?= /** @noEscape */ ($item->getQty() . ' x ' .
$item->getName() . ' - ' .
$block->formatPrice($item->getBasePriceInclTax())) ?>
Expand Down
8 changes: 4 additions & 4 deletions view/frontend/templates/cart/items.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ $quote = $block->getData('quote');
<th><?= /** @noEscape */ __('Price') ?></th>
<th class="th5"><?= /** @noEscape */ __('Total') ?></th>
</tr>
<?php foreach ($block->getItems($quote) as $item) : ?>
<?php if ($item->getProductType() === 'configurable') : ?>
<?php foreach ($block->getItems($quote) as $item): ?>
<?php if ($item->getProductType() === 'configurable'): ?>
<tr>
<td><?= /** @noEscape */ $item->getQty() ?></td>
<td><?= /** @noEscape */ $item->getSku() ?></td>
Expand All @@ -42,10 +42,10 @@ $quote = $block->getData('quote');
<td class="td5 mark"><?= /** @noEscape */ $block->formatPrice($item->getBaseRowTotalInclTax()) ?></td>
</tr>
<?php endif; ?>
<?php if ($item->getParentItemId() && $block->checkConfigurableProduct($item)) : ?>
<?php if ($item->getParentItemId() && $block->checkConfigurableProduct($item)): ?>
<?php continue ?>
<?php endif; ?>
<?php if ($item->getProductType() !== 'configurable') : ?>
<?php if ($item->getProductType() !== 'configurable'): ?>
<tr>
<td><?= /** @noEscape */ $item->getQty() ?></td>
<td><?= /** @noEscape */ $item->getSku() ?></td>
Expand Down

0 comments on commit 2d21252

Please sign in to comment.