This commit is contained in:
2026-09-15 10:26:34 +08:00
commit ecf36afa56
10493 changed files with 1404888 additions and 0 deletions
@@ -0,0 +1,49 @@
<?php
/**
* Magezon
*
* This source file is subject to the Magezon Software License, which is available at https://magezon.com/license/.
* Do not edit or add to this file if you wish to upgrade the to newer versions in the future.
* If you wish to customize this module for your needs.
* Please refer to https://www.magezon.com for more information.
*
* @category Magezon
* @package Magezon_QuickOrder
* @copyright Copyright (C) 2018 Magezon (https://magezon.com)
*/
namespace Magezon\QuickOrder\Block\Adminhtml\Renderer\Config;
use Magento\Framework\Data\Form\Element\AbstractElement;
class Version extends \Magento\Config\Block\System\Config\Form\Field
{
/**
* @var \Magento\Framework\Module\ModuleResource
*/
protected $moduleResource;
/**
* @param \Magento\Framework\Module\ModuleResource $moduleResource
* @param \Magento\Backend\Block\Template\Context $context
* @param array $data
*/
public function __construct(
\Magento\Framework\Module\ModuleResource $moduleResource,
\Magento\Backend\Block\Template\Context $context,
array $data = []
) {
parent::__construct($context, $data);
$this->moduleResource = $moduleResource;
}
/**
* @param AbstractElement $element
* @return string
*/
protected function _getElementHtml(AbstractElement $element)
{
return $this->moduleResource->getDataVersion('Magezon_QuickOrder');
}
}
+77
View File
@@ -0,0 +1,77 @@
<?php
/**
* Magezon
*
* This source file is subject to the Magezon Software License, which is available at https://www.magezon.com/license/.
* Do not edit or add to this file if you wish to upgrade the to newer versions in the future.
* If you wish to customize this module for your needs.
* Please refer to https://www.magezon.com for more information.
*
* @category Magezon
* @package Magezon_QuickOrder
* @copyright Copyright (C) 2018 Magezon (https://www.magezon.com)
*/
namespace Magezon\QuickOrder\Block;
use Magento\Framework\Data\Form\FormKey;
use Magento\Framework\Exception\LocalizedException;
class Form extends \Magento\Framework\View\Element\Template implements \Magento\Widget\Block\BlockInterface
{
/**
* @var string
*/
protected $_template = 'Magezon_QuickOrder::form.phtml';
/**
* @var \Magento\Framework\Locale\FormatInterface
*/
protected $_localeFormat;
/**
* @var \Magezon\QuickOrder\Helper\Data
*/
protected $dataHelper;
/**
* @param \Magento\Framework\View\Element\Template\Context $context
* @param \Magento\Framework\Locale\FormatInterface $localeFormat
* @param \Magezon\QuickOrder\Helper\Data $dataHelper
* @param array $data
*/
public function __construct(
\Magento\Framework\View\Element\Template\Context $context,
\Magento\Framework\Locale\FormatInterface $localeFormat,
\Magezon\QuickOrder\Helper\Data $dataHelper,
protected FormKey $formKey,
array $data = []
) {
parent::__construct($context, $data);
$this->_localeFormat = $localeFormat;
$this->dataHelper = $dataHelper;
}
public function toHtml()
{
if (!$this->dataHelper->isEnabled() || !$this->dataHelper->isGroupValid()) return;
return parent::toHtml();
}
/**
* @return array
*/
public function getPriceFormat()
{
return $this->_localeFormat->getPriceFormat();
}
/**
* @throws LocalizedException
*/
public function getFormKey()
{
return $this->formKey->getFormKey();
}
}
+54
View File
@@ -0,0 +1,54 @@
<?php
/**
* Magezon
*
* This source file is subject to the Magezon Software License, which is available at https://www.magezon.com/license/.
* Do not edit or add to this file if you wish to upgrade the to newer versions in the future.
* If you wish to customize this module for your needs.
* Please refer to https://www.magezon.com for more information.
*
* @category Magezon
* @package Magezon_QuickOrder
* @copyright Copyright (C) 2018 Magezon (https://www.magezon.com)
*/
namespace Magezon\QuickOrder\Block;
class Link extends \Magento\Framework\View\Element\Html\Link
{
/**
* @var \Magezon\QuickOrder\Helper\Data
*/
protected $dataHelper;
/**
* @param \Magento\Framework\View\Element\Template\Context $context
* @param \Magezon\QuickOrder\Helper\Data $dataHelper
* @param array $data
*/
public function __construct(
\Magento\Framework\View\Element\Template\Context $context,
\Magezon\QuickOrder\Helper\Data $dataHelper,
array $data = []
) {
parent::__construct($context, $data);
$this->dataHelper = $dataHelper;
}
/**
* Render block HTML
*
* @return string
*/
protected function _toHtml()
{
if (!$this->dataHelper->getConfig('general/show_toplinks')) {
return;
}
$route = $this->dataHelper->getConfig('general/route');
$title = $this->dataHelper->getTitle();
if ($route && $title && $this->dataHelper->isGroupValid()) {
return '<li><a href="' . $this->getUrl($route) . '" >' . $title . '</a></li>';
}
}
}
+21
View File
@@ -0,0 +1,21 @@
<?php
/**
* Magezon
*
* This source file is subject to the Magezon Software License, which is available at https://www.magezon.com/license/.
* Do not edit or add to this file if you wish to upgrade the to newer versions in the future.
* If you wish to customize this module for your needs.
* Please refer to https://www.magezon.com for more information.
*
* @category Magezon
* @package Magezon_QuickOrder
* @copyright Copyright (C) 2018 Magezon (https://www.magezon.com)
*/
namespace Magezon\QuickOrder\Block;
use Magento\Framework\Pricing\PriceCurrencyInterface;
class Product extends \Magento\Catalog\Block\Product\AbstractProduct
{
}