Files
2026-09-15 10:35:56 +08:00

27 lines
801 B
PHP

<?php
declare(strict_types=1);
namespace Esun\LingxingErp\Block\Adminhtml\Store;
use Magento\Backend\Block\Widget\Button;
class ErpSkuSyncButton extends Button
{
protected function _construct(): void
{
parent::_construct();
$url = $this->getUrl('esun_lingxing/sku/sync');
$message = (string)__('Fetch ERP SKUs for products in all configured Websites now?');
$this->setData([
'label' => __('Sync Product ERP SKUs'),
'class' => 'secondary',
'style' => 'margin-left: 12px;',
'onclick' => sprintf(
'confirmSetLocation(%s, %s)',
json_encode($message, JSON_HEX_APOS | JSON_HEX_QUOT),
json_encode($url, JSON_HEX_APOS | JSON_HEX_QUOT)
),
]);
}
}