Skip to content

Commit

Permalink
1.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Nov 14, 2019
1 parent fab4aa4 commit 5f0b307
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 35 deletions.
2 changes: 1 addition & 1 deletion Block/Frontend/MagexSync.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Justuno\Jumagext\Block\Frontend;
namespace Justuno\M2\Block\Frontend;
use Magento\Checkout\Model\Cart;
use Magento\Framework\View\Element\Template;
class MagexSync extends Template {
Expand Down
2 changes: 1 addition & 1 deletion Block/Frontend/Success.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Justuno\Jumagext\Block\Frontend;
namespace Justuno\M2\Block\Frontend;
use Magento\Checkout\Model\Session;
use Magento\Framework\View\Element\Template;
use Magento\Sales\Api\OrderRepositoryInterface;
Expand Down
4 changes: 2 additions & 2 deletions Block/System/Config/Form/Button.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Justuno\Jumagext\Block\System\Config\Form;
namespace Justuno\M2\Block\System\Config\Form;
use Magento\Framework\App\Config\ScopeConfigInterface;
class Button extends \Magento\Config\Block\System\Config\Form\Field {
const BUTTON_TEMPLATE = 'system/config/button/button.phtml';
Expand Down Expand Up @@ -44,7 +44,7 @@ protected function _getElementHtml(\Magento\Framework\Data\Form\Element\Abstract
'id' => 'justuno_token_button',
/**
* 2019-10-245 Dmitry Fedyuk https://www.upwork.com/fl/mage2pro
* «Call to undefined function Justuno\Jumagext\Block\System\Config\Form\_()
* «Call to undefined function Justuno\M2\Block\System\Config\Form\_()
* in vendor/justuno.com/m2/Block/System/Config/Form/Button.php:48»:
* https://github.com/justuno-com/m2/issues/2
*/
Expand Down
2 changes: 1 addition & 1 deletion Controller/Response/Catalog.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Justuno\Jumagext\Controller\Response;
namespace Justuno\M2\Controller\Response;
use Magento\Catalog\Model\Category;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\App\RequestInterface;
Expand Down
2 changes: 1 addition & 1 deletion Controller/Response/Orders.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Justuno\Jumagext\Controller\Response;
namespace Justuno\M2\Controller\Response;
use Magento\Framework\App\RequestInterface;
use Magento\Sales\Model\Order;
use Magento\Store\Model\StoreManagerInterface;
Expand Down
2 changes: 1 addition & 1 deletion Model/Config/Mylist.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Justuno\Jumagext\Model\Config;
namespace Justuno\M2\Model\Config;
class Mylist implements \Magento\Framework\Option\ArrayInterface {
/**
* {@inheritdoc}
Expand Down
3 changes: 3 additions & 0 deletions Settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php


2 changes: 1 addition & 1 deletion Setup/InstallData.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Justuno\Jumagext\Setup;
namespace Justuno\M2\Setup;
use Magento\Authorization\Model\Acl\Role\Group as RoleGroup;
use Magento\Authorization\Model\ResourceModel\Role\Collection;
use Magento\Authorization\Model\Role;
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "justuno.com/m2"
,"version": "1.0.8"
,"version": "1.0.9"
,"description": "Justuno module for Magento 2"
,"type": "magento2-module"
,"homepage": "https://github.com/justuno-com/m2"
Expand All @@ -12,6 +12,6 @@
,"role": "Developer"
}]
,"require": {"mage2pro/core": ">=5.4.4"}
,"autoload": {"files": ["registration.php"], "psr-4": {"Justuno\\Jumagext\\": ""}}
,"autoload": {"files": ["registration.php"], "psr-4": {"Justuno\\M2\\": ""}}
,"keywords": ["Magento 2"]
}
4 changes: 2 additions & 2 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<field id='brand_attribute' translate='label' type='select' sortOrder='11' showInDefault='1' showInWebsite='0' showInStore='0'>
<label>Choose Brand Attribute</label>
<source_model>Justuno\Jumagext\Model\Config\Mylist</source_model>
<source_model>Justuno\M2\Model\Config\Mylist</source_model>
</field>

<field id='token_key' translate='label' type='text' sortOrder='12' showInDefault='1' showInWebsite='0' showInStore='0'>
Expand All @@ -36,7 +36,7 @@


<field id='listbutton' translate='label' sortOrder='20' showInDefault='1' showInWebsite='1' showInStore='1'>
<frontend_model>Justuno\Jumagext\Block\System\Config\Form\Button</frontend_model>
<frontend_model>Justuno\M2\Block\System\Config\Form\Button</frontend_model>
</field>

</group>
Expand Down
10 changes: 0 additions & 10 deletions etc/frontend/di.xml

This file was deleted.

2 changes: 1 addition & 1 deletion view/frontend/layout/checkout_onepage_success.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0'?>
<body>
<referenceBlock name='head.additional'>
<block class='Justuno\Jumagext\Block\Frontend\Success' name='justuno.order.success'
<block class='Justuno\M2\Block\Frontend\Success' name='justuno.order.success'
template='Justuno_Jumagext::order/success.phtml'>
</block>
</referenceBlock>
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/layout/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<body>
<referenceBlock name='head.additional'>
<block class='Magento\Framework\View\Element\Template' template='Justuno_Jumagext::embed.phtml'/>
<block class='Justuno\Jumagext\Block\Frontend\MagexSync' template='Justuno_Jumagext::magexsync.phtml'/>
<block class='Justuno\M2\Block\Frontend\MagexSync' template='Justuno_Jumagext::magexsync.phtml'/>
</referenceBlock>
</body>
</page>
16 changes: 9 additions & 7 deletions view/frontend/templates/embed.phtml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<?php
// 2019-11-13 {{block class="Magento\Framework\View\Element\Template" template="Justuno_Jumagext::embed.phtml"}}
/** @var \Magento\Framework\View\Element\Template $block */
$merchantId = df_cfg('justuno_settings/options_interface/accid'); /** @var string $merchantId */
if (preg_match("/^[{]?[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}[}]?$/", $merchantId)) { ?>
<script>window.ju_num='<?= $merchantId ?>';</script>
<?= df_widget('embed', '', ['message' => "ju_num loaded ({$block->escapeHtml(substr($merchantId, -6))})"]) ?>
<?php /** @var \Magento\Framework\View\Element\Template $block */
$id = df_cfg('justuno_settings/options_interface/accid'); /** @var string $merchantId */
// 2019-11-14 https://support.justuno.com/install-justuno-general-embed-instructions
if (!preg_match("/^[{]?[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}[}]?$/", $id)) { ?>
<script>window.ju_num='<?= $id ?>';</script>
<?= df_tag('div', df_widget('embed', '', ['message' => sprintf(
'ju_num loaded (%s)', substr($id, -6
))])) ?>
<?php } else { ?>
<script>console.log('JU_ERROR: Justuno Account ID (ACCID) Was Not Set Correctly...');</script>
<?php }
/** 2019-11-14 @used-by view/frontend/web/js/magexsync.js */
if (df_is_catalog_product_view()) { ?>
<script>
setTimeout(function(){
Expand Down
4 changes: 2 additions & 2 deletions view/frontend/templates/magexsync.phtml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* shortcode for cms pages / blocks
* {{block class="Justuno\Jumagext\Block\Frontend\MagexSync" template="Justuno\Jumagext::MagexSync.phtml"}}
* @var Justuno\Jumagext\Block\Frontend\MagexSync $block\
* {{block class="Justuno\M2\Block\Frontend\MagexSync" template="Justuno\M2::MagexSync.phtml"}}
* @var Justuno\M2\Block\Frontend\MagexSync $block\
*/
?>
<script type='text/x-magento-init'>{"*" : {"magexsync": {"message": "magexsync done."}}}</script
4 changes: 2 additions & 2 deletions view/frontend/templates/order/success.phtml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* shortcode for cms pages / blocks
* {{block class='Justuno\Jumagext\Block\Frontend\Success' template='Justuno_Jumagext::success.phtml' }}
* {{block class='Justuno\M2\Block\Frontend\Success' template='Justuno_Jumagext::success.phtml' }}
*
* @var Justuno\Jumagext\Block\Frontend\Success $block
* @var Justuno\M2\Block\Frontend\Success $block
*
*
*/
Expand Down

0 comments on commit 5f0b307

Please sign in to comment.