Beispiel #1
0
    public function getGridHtml()
    {
        if ($this->getRequest()->isXmlHttpRequest()) {
            return parent::getGridHtml();
        }
        $this->jsPhp->addConstants($this->getHelper('Data')->getClassConstants('\\Ess\\M2ePro\\Model\\Listing'));
        $showAutoAction = json_encode((bool) $this->getRequest()->getParam('auto_actions'));
        // ---------------------------------------
        $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\AutoAction', array('id' => $this->getRequest()->getParam('id'))));
        $path = 'amazon_listing_product_log/index';
        $this->jsUrl->add($this->getUrl('*/' . $path, array('back' => $this->getHelper('Data')->makeBackUrlParam('*/amazon_listing/view', array('id' => $this->listing['id'])))), $path);
        $path = 'amazon_listing/duplicateProducts';
        $this->jsUrl->add($this->getUrl('*/' . $path), $path);
        $this->jsUrl->add($this->getUrl('*/amazon_listing_log/index', array('id' => $this->listing['id'], 'back' => $this->getHelper('Data')->makeBackUrlParam('*/amazon_listing/view', ['id' => $this->listing['id']]))), 'logViewUrl');
        $this->jsUrl->add($this->getUrl('*/listing/getErrorsSummary'), 'getErrorsSummary');
        $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing'));
        $this->jsUrl->addUrls(['runListProducts' => $this->getUrl('*/amazon_listing/runListProducts'), 'runRelistProducts' => $this->getUrl('*/amazon_listing/runRelistProducts'), 'runReviseProducts' => $this->getUrl('*/amazon_listing/runReviseProducts'), 'runStopProducts' => $this->getUrl('*/amazon_listing/runStopProducts'), 'runStopAndRemoveProducts' => $this->getUrl('*/amazon_listing/runStopAndRemoveProducts'), 'runDeleteAndRemoveProducts' => $this->getUrl('*/amazon_listing/runDeleteAndRemoveProducts'), 'runRemoveProducts' => $this->getUrl('*/amazon_listing/runRemoveProducts')]);
        $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\Product'));
        $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\Product\\Fulfillment'));
        $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\Product\\Search'));
        $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\Product\\Template\\Description'));
        $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\Product\\Variation'));
        $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\Product\\Variation\\Manage'));
        $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\Product\\Variation\\Individual'));
        $this->jsUrl->add($this->getUrl('*/amazon_listing_view_settings_moving/moveToListingGrid', ['listing_view' => true]), 'moveToListingGridHtml');
        $this->jsUrl->add($this->getUrl('*/listing_moving/prepareMoveToListing'), 'prepareData');
        $this->jsUrl->add($this->getUrl('*/listing_moving/getFailedProductsGrid'), 'getFailedProductsGridHtml');
        $this->jsUrl->add($this->getUrl('*/listing_moving/tryToMoveToListing'), 'tryToMoveToListing');
        $this->jsUrl->add($this->getUrl('*/listing_moving/moveToListing'), 'moveToListing');
        $this->jsUrl->add($this->getUrl('*/amazon_marketplace/index'), 'marketplaceSynchUrl');
        $this->jsUrl->add($this->getUrl('*/listing/saveListingAdditionalData', ['id' => $this->listing['id']]), 'saveListingAdditionalData');
        //        TODO
        //        $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions(
        //            'amazon_listing_repricing',
        //            array(
        //                'id' => $this->listing['id'],
        //                'account_id' => $this->listing['account_id']
        //            )
        //        ));
        // ---------------------------------------
        $component = \Ess\M2ePro\Helper\Component\Amazon::NICK;
        $gridId = $this->getChildBlock('grid')->getId();
        $ignoreListings = json_encode(array($this->listing['id']));
        $marketplace = json_encode(array_merge($this->listing->getMarketplace()->getData(), $this->listing->getMarketplace()->getChildObject()->getData()));
        $isNewAsinAvailable = json_encode($this->listing->getMarketplace()->getChildObject()->isNewAsinAvailable());
        $temp = $this->getHelper('Data\\Session')->getValue('products_ids_for_list', true);
        $productsIdsForList = empty($temp) ? '' : $temp;
        //        TODO
        //        $getUpdatedRepricingPriceBySkus = $this->getUrl(
        //            '*/amazon_listing_repricing/getUpdatedPriceBySkus'
        //        );
        $templateDescriptionPopupTitle = $this->__('Assign Description Policy');
        $popupTitle = $this->__('Moving Amazon Items');
        $popupTitleSingle = $this->__('Moving Amazon Item');
        $failedProductsPopupTitle = $this->__('Products failed to move');
        $taskCompletedMessage = $this->__('Task completed. Please wait ...');
        $taskCompletedSuccessMessage = $this->__('"%task_title%" Task has successfully submitted to be processed.');
        $taskCompletedWarningMessage = $this->__('"%task_title%" Task has completed with warnings. <a target="_blank" href="%url%">View Log</a> for details.');
        $taskCompletedErrorMessage = $this->__('"%task_title%" Task has completed with errors. <a target="_blank" href="%url%">View Log</a> for details.');
        $lockedObjNoticeMessage = $this->__('Some Amazon request(s) are being processed now.');
        $sendingDataToAmazonMessage = $this->__('Sending %product_title% Product(s) data on Amazon.');
        $viewAllProductLogMessage = $this->__('View Full Product Log');
        $listingLockedMessage = $this->__('The Listing was locked by another process. Please try again later.');
        $listingEmptyMessage = $this->__('Listing is empty.');
        $listingAllItemsMessage = $this->__('Listing All Items On Amazon');
        $listingSelectedItemsMessage = $this->__('Listing Selected Items On Amazon');
        $revisingSelectedItemsMessage = $this->__('Revising Selected Items On Amazon');
        $relistingSelectedItemsMessage = $this->__('Relisting Selected Items On Amazon');
        $stoppingSelectedItemsMessage = $this->__('Stopping Selected Items On Amazon');
        $stoppingAndRemovingSelectedItemsMessage = $this->__('Stopping On Amazon And Removing From Listing Selected Items');
        $deletingAndRemovingSelectedItemsMessage = $this->__('Removing From Amazon And Listing Selected Items');
        $removingSelectedItemsMessage = $this->__('Removing From Listing Selected Items');
        $successfullyMovedMessage = $this->__('Product(s) was successfully Moved.');
        $productsWereNotMovedMessage = $this->__('Product(s) was not Moved. <a target="_blank" href="%url%">View Log</a> for details.');
        $someProductsWereNotMovedMessage = $this->__('Some Product(s) was not Moved. <a target="_blank" href="%url%">View Log</a> for details.');
        $selectItemsMessage = $this->__('Please select the Products you want to perform the Action on.');
        $selectActionMessage = $this->__('Please select Action.');
        $assignString = $this->__('Assign');
        $templateShippingOverridePopupTitle = $this->__('Assign Shipping Override Policy');
        $enterProductSearchQueryMessage = $this->__('Please enter Product Title or ASIN/ISBN/UPC/EAN.');
        $autoMapAsinSearchProducts = $this->__('Search %product_title% Product(s) on Amazon.');
        $autoMapAsinProgressTitle = $this->__('Automatic Assigning ASIN/ISBN to Item(s)');
        $autoMapAsinErrorMessage = $this->__('Server is currently unavailable. Please try again later.');
        $newAsinNotAvailable = $this->__('The new ASIN/ISBN creation functionality is not available in %code% Marketplace yet.');
        $notSynchronizedMarketplace = $this->__('In order to use New ASIN/ISBN functionality, please re-synchronize Marketplace data.') . ' ' . $this->__('Press "Save And Update" Button after redirect on Marketplace Page.');
        $noVariationsLeftText = $this->__('All variations are already added.');
        $notSet = $this->__('Not Set');
        $setAttributes = $this->__('Set Attributes');
        $variationManageMatchedAttributesError = $this->__('Please choose valid Attributes.');
        $variationManageMatchedAttributesErrorDuplicateSelection = $this->__('You can not choose the same Attribute twice.');
        $variationManageSkuPopUpTitle = $this->__('Enter Amazon Parent Product SKU');
        $switchToIndividualModePopUpTitle = $this->__('Change "Manage Variations" Mode');
        $switchToParentModePopUpTitle = $this->__('Change "Manage Variations" Mode');
        $emptySkuError = $this->__('Please enter Amazon Parent Product SKU.');
        $this->jsTranslator->addTranslations(['Remove Category' => $this->__('Remove Category'), 'Add New Group' => $this->__('Add New Group'), 'Add/Edit Categories Rule' => $this->__('Add/Edit Categories Rule'), 'Auto Add/Remove Rules' => $this->__('Auto Add/Remove Rules'), 'Based on Magento Categories' => $this->__('Based on Magento Categories'), 'You must select at least 1 Category.' => $this->__('You must select at least 1 Category.'), 'Rule with the same Title already exists.' => $this->__('Rule with the same Title already exists.'), 'Clear Search Results' => $this->__('Clear Search Results'), 'popup_title' => $popupTitle, 'popup_title_single' => $popupTitleSingle, 'failed_products_popup_title' => $failedProductsPopupTitle, 'task_completed_message' => $taskCompletedMessage, 'task_completed_success_message' => $taskCompletedSuccessMessage, 'task_completed_warning_message' => $taskCompletedWarningMessage, 'task_completed_error_message' => $taskCompletedErrorMessage, 'locked_obj_notice' => $lockedObjNoticeMessage, 'sending_data_message' => $sendingDataToAmazonMessage, 'view_all_product_log_message' => $viewAllProductLogMessage, 'listing_locked_message' => $listingLockedMessage, 'listing_empty_message' => $listingEmptyMessage, 'listing_all_items_message' => $listingAllItemsMessage, 'listing_selected_items_message' => $listingSelectedItemsMessage, 'revising_selected_items_message' => $revisingSelectedItemsMessage, 'relisting_selected_items_message' => $relistingSelectedItemsMessage, 'stopping_selected_items_message' => $stoppingSelectedItemsMessage, 'stopping_and_removing_selected_items_message' => $stoppingAndRemovingSelectedItemsMessage, 'deleting_and_removing_selected_items_message' => $deletingAndRemovingSelectedItemsMessage, 'removing_selected_items_message' => $removingSelectedItemsMessage, 'successfully_moved' => $successfullyMovedMessage, 'products_were_not_moved' => $productsWereNotMovedMessage, 'some_products_were_not_moved' => $someProductsWereNotMovedMessage, 'select_items_message' => $selectItemsMessage, 'select_action_message' => $selectActionMessage, 'templateDescriptionPopupTitle' => $templateDescriptionPopupTitle, 'templateShippingOverridePopupTitle' => $templateShippingOverridePopupTitle, 'assign' => $assignString, 'enter_productSearch_query' => $enterProductSearchQueryMessage, 'automap_asin_search_products' => $autoMapAsinSearchProducts, 'automap_asin_progress_title' => $autoMapAsinProgressTitle, 'automap_error_message' => $autoMapAsinErrorMessage, 'new_asin_not_available' => $newAsinNotAvailable, 'not_synchronized_marketplace' => $notSynchronizedMarketplace, 'no_variations_left' => $noVariationsLeftText, 'not_set' => $notSet, 'set_attributes' => $setAttributes, 'variation_manage_matched_attributes_error' => $variationManageMatchedAttributesError, 'variation_manage_matched_attributes_error_duplicate' => $variationManageMatchedAttributesErrorDuplicateSelection, 'error_changing_product_options' => $this->__('Please Select Product Options.'), 'variation_manage_matched_sku_popup_title' => $variationManageSkuPopUpTitle, 'empty_sku_error' => $emptySkuError, 'switch_to_individual_mode_popup_title' => $switchToIndividualModePopUpTitle, 'switch_to_parent_mode_popup_title' => $switchToParentModePopUpTitle, 'Add New Description Policy' => $this->__('Add New Description Policy'), 'Add New Child Product' => $this->__('Add New Child Product')]);
        $this->js->addOnReadyJs(<<<JS
    require([
        'M2ePro/Amazon/Listing/View/Grid',
        'M2ePro/Amazon/Listing/AfnQty',
        'M2ePro/Amazon/Listing/AutoAction',
        'M2ePro/Amazon/Listing/Product/Variation'
    ], function(){

        M2ePro.productsIdsForList = '{$productsIdsForList}';
    
        M2ePro.customData.componentMode = '{$component}';
        M2ePro.customData.gridId = '{$gridId}';
        M2ePro.customData.ignoreListings = '{$ignoreListings}';
    
        M2ePro.customData.marketplace = {$marketplace};
        M2ePro.customData.isNewAsinAvailable = {$isNewAsinAvailable};
        
        ListingGridHandlerObj = new AmazonListingViewGrid(
            '{$gridId}',
            {$this->listing['id']}
        );
        ListingGridHandlerObj.afterInitPage();
        
        ListingGridHandlerObj.movingHandler.setOptions(M2ePro);
           
        ListingGridHandlerObj.actionHandler.setProgressBar('listing_view_progress_bar');
        ListingGridHandlerObj.actionHandler.setGridWrapper('listing_view_content_container');
            
        AmazonListingProductVariationObj = new AmazonListingProductVariation(ListingGridHandlerObj);

        if (M2ePro.productsIdsForList) {
            ListingGridHandlerObj.getGridMassActionObj().checkedString = M2ePro.productsIdsForList;
            ListingGridHandlerObj.actionHandler.listAction();
        }
    
        window.ListingAutoActionObj = new AmazonListingAutoAction();
        if ({$showAutoAction}) {
            ListingAutoActionObj.loadAutoActionHtml();
        }
    
        AmazonListingAfnQtyObj = new AmazonListingAfnQty();
        // TODO
        // CommonAmazonListingRepricingPriceHandlerObj = new CommonAmazonListingRepricingPriceHandler();
    });
JS
);
        $productSearchBlock = $this->createBlock('Amazon\\Listing\\Product\\Search\\Main');
        // TODO NOT SUPPORTED FEATURES "Listing header selector"
        //        // ---------------------------------------
        //        $listingSwitcher = $this->getLayout()->createBlock(
        //            'M2ePro/adminhtml_common_amazon_listing_view_listingSwitcher'
        //        );
        //        // ---------------------------------------
        // ---------------------------------------
        $viewHeaderBlock = $this->createBlock('Listing\\View\\Header', '', ['data' => ['listing' => $this->listing]]);
        // ---------------------------------------
        //        // ---------------------------------------
        //        $switchToIndividualPopup = $this->getLayout()->createBlock(
        //            'M2ePro/adminhtml_common_amazon_listing_variation_product_switchToIndividualPopup');
        //        // ---------------------------------------
        //
        //        // ---------------------------------------
        //        $switchToParentPopup = $this->getLayout()->createBlock(
        //            'M2ePro/adminhtml_common_amazon_listing_variation_product_switchToParentPopup');
        //        // ---------------------------------------
        return $viewHeaderBlock->toHtml() . $productSearchBlock->toHtml() . parent::getGridHtml();
    }
Beispiel #2
0
    public function callbackColumnPrice($value, $row, $column, $isExport)
    {
        $onlinePrice = $row->getData('online_price');
        $repricingHtml = '';
        //        TODO
        //        if (Mage::helper('M2ePro/Component_Amazon_Repricing')->isEnabled() &&
        //            (bool)(int)$row->getData('is_repricing')) {
        //
        //            $image = 'money';
        //            $text = $this->__(
        //                'This product is used by Amazon Repricing Tool.
        //                 The Price cannot be updated through the M2E Pro.'
        //            );
        //
        //            if ((int)$row->getData('is_repricing_disabled') == 1) {
        //                $image = 'money_disabled';
        //                $text = $this->__(
        //                    'This product is disabled on Amazon Repricing Tool.
        //                     The Price is updated through the M2E Pro.'
        //                );
        //            }
        //
        //            $repricingHtml = <<<HTML
        //<span style="float:right; text-align: left;">&nbsp;
        //    <img class="tool-tip-image"
        //         style="vertical-align: middle; width: 16px;"
        //        src="{$this->getSkinUrl('M2ePro/images/'.$image.'.png')}">
        //    <span class="tool-tip-message tool-tip-message tip-left" style="display:none;">
        //        <img src="{$this->getSkinUrl('M2ePro/images/i_icon.png')}">
        //        <span>{$text}</span>
        //    </span>
        //</span>
        //HTML;
        //        }
        if (is_null($onlinePrice) || $onlinePrice === '') {
            if ($row->getData('amazon_status') == \Ess\M2ePro\Model\Listing\Product::STATUS_NOT_LISTED) {
                return $this->__('N/A') . $repricingHtml;
            } else {
                return '<i style="color:gray;">receiving...</i>' . $repricingHtml;
            }
        }
        $currency = $this->listing->getMarketplace()->getChildObject()->getDefaultCurrency();
        if ((double) $onlinePrice <= 0) {
            $priceValue = '<span style="color: #f00;">0</span>';
        } else {
            $priceValue = $this->convertAndFormatPriceCurrency($onlinePrice, $currency);
        }
        //        TODO
        //        if ($row->getData('is_repricing') && !$row->getData('is_repricing_disabled')) {
        //            $this->listing = $this->getHelper('Data\GlobalData')->getValue('temp_data');
        //            $accountId = $this->listing['account_id'];
        //            $sku = $row->getData('amazon_sku');
        //
        //            $priceValue =<<<HTML
        //<a id="m2epro_repricing_price_value_{$sku}"
        //   class="m2epro-repricing-price-value"
        //   sku="{$sku}"
        //   account_id="{$accountId}"
        //   href="javascript:void(0)"
        //   onclick="CommonAmazonListingRepricingPriceHandlerObj.showRepricingPrice()">
        //    {$priceValue}
        //</a>
        //HTML;
        //        }
        $resultHtml = '';
        $salePrice = $row->getData('online_sale_price');
        if ((double) $salePrice > 0) {
            $currentTimestamp = strtotime($this->getHelper('Data')->getCurrentGmtDate(false, 'Y-m-d 00:00:00'));
            $startDateTimestamp = strtotime($row->getData('online_sale_price_start_date'));
            $endDateTimestamp = strtotime($row->getData('online_sale_price_end_date'));
            if ($currentTimestamp <= $endDateTimestamp) {
                $fromDate = $this->_localeDate->formatDate($row->getData('online_sale_price_start_date'), \IntlDateFormatter::MEDIUM);
                $toDate = $this->_localeDate->formatDate($row->getData('online_sale_price_end_date'), \IntlDateFormatter::MEDIUM);
                $intervalHtml = <<<HTML
<div class="m2epro-field-tooltip m2epro-field-tooltip-price-info admin__field-tooltip">
    <a class="admin__field-tooltip-action" href="javascript://"></a>
    <div class="admin__field-tooltip-content">
        <span style="color:gray;">
            <strong>From:</strong> {$fromDate}<br/>
            <strong>To:</strong> {$toDate}
        </span>    
    </div>
</div>
HTML;
                $salePriceValue = $this->convertAndFormatPriceCurrency($salePrice, $currency);
                if ($currentTimestamp >= $startDateTimestamp && $currentTimestamp <= $endDateTimestamp && $salePrice < (double) $onlinePrice) {
                    $resultHtml .= '<span style="color: grey; text-decoration: line-through;">' . $priceValue . '</span>' . $repricingHtml;
                    $resultHtml .= '<br/>' . $intervalHtml . '&nbsp;' . $salePriceValue;
                } else {
                    $resultHtml .= $priceValue . $repricingHtml;
                    $resultHtml .= '<br/>' . $intervalHtml . '<span style="color:gray;">' . '&nbsp;' . $salePriceValue . '</span>';
                }
            }
        }
        if (empty($resultHtml)) {
            $resultHtml = $priceValue . $repricingHtml;
        }
        return $resultHtml;
    }
Beispiel #3
0
    public function callbackColumnPrice($value, $row, $column, $isExport)
    {
        if ($row->getData('amazon_status') == \Ess\M2ePro\Model\Listing\Product::STATUS_NOT_LISTED) {
            return '<span style="color: gray;">' . $this->__('Not Listed') . '</span>';
        }
        $listingProductId = (int) $row->getData('id');
        $repricingHtml = '';
        //        TODO
        //        if (Mage::helper('M2ePro/Component_Amazon_Repricing')->isEnabled() &&
        //            ($row->getData('is_repricing') || $row->getData('is_variation_parent'))
        //        ) {
        //
        //            $enabledCount  = $row->getData('variation_repricing_enabled_count');
        //            $disabledCount = $row->getData('variation_repricing_disabled_count');
        //
        //            if ($row->getData('is_variation_parent') && ($enabledCount || $disabledCount)) {
        //
        //                if ($enabledCount && $disabledCount) {
        //                    $image = 'money_mixed';
        //                    $countHtml = '['.$enabledCount.'/'.$disabledCount.']';
        //                    $text = $this->__('Parent has enabled and disabled repricing products. TODO TEXT.');
        //                } elseif ($enabledCount) {
        //                    $image = 'money';
        //                    $countHtml = '['.$enabledCount.']';
        //                    $text = $this->__('Parent has enabled repricing products. TODO TEXT.');
        //                } else {
        //                    $image = 'money_disabled';
        //                    $countHtml = '['.$disabledCount.']';
        //                    $text = $this->__('Parent has disabled repricing products. TODO TEXT.');
        //                }
        //
        //                $filter = base64_encode('online_price[is_repricing]=1');
        //
        //                $productTitle = $this->getHelper('Data')->escapeHtml($row->getData('name'));
        //                $vpmt = $this->__('Manage Variations of &quot;%s%&quot; ', $productTitle);
        //                $vpmt = addslashes($vpmt);
        //
        //                $generalId = $row->getData('general_id');
        //                if (!empty($generalId)) {
        //                    $vpmt .= '('. $generalId .')';
        //                }
        //
        //                $linkTitle = $this->__('Show repricing child products. TODO TEXT');
        //
        //                $repricingHtml = <<<HTML
        //<br /><span style="float:right; text-align: left;">
        //    <img class="tool-tip-image"
        //         style="vertical-align: middle; width: 16px;"
        //         src="{$this->getViewFileUrl('Ess_M2ePro::images/'.$image.'.png')}">
        //    <span class="tool-tip-message tool-tip-message tip-left" style="display:none;">
        //        <img src="{$this->getViewFileUrl('Ess_M2ePro::images/i_icon.png')}">
        //        <span>{$text}</span>
        //    </span>&nbsp;<a href="javascript:void(0)"
        //       class="hover-underline"
        //       title="{$linkTitle}"
        //       onclick="ListingGridHandlerObj.variationProductManageHandler.openPopUp(
        //        {$listingProductId}, '{$vpmt}', '{$filter}'
        //    )">$countHtml</a>
        //</span>
        //HTML;
        //            } elseif (!$row->getData('is_variation_parent')) {
        //                $image = 'money';
        //                $text = $this->__(
        //                    'This product is used by Amazon Repricing Tool.
        //                 The Price cannot be updated through the M2E Pro.'
        //                );
        //
        //                if ((int)$row->getData('is_repricing_disabled') == 1) {
        //                    $image = 'money_disabled';
        //                    $text = $this->__(
        //                        'This product is disabled on Amazon Repricing Tool.
        //                     The Price is updated through the M2E Pro.'
        //                    );
        //                }
        //
        //                $repricingHtml = <<<HTML
        //<span style="float:right; text-align: left;">&nbsp;
        //    <img class="tool-tip-image"
        //         style="vertical-align: middle; width: 16px;"
        //         src="{$this->getViewFileUrl('Ess_M2ePro::images/'.$image.'.png')}">
        //    <span class="tool-tip-message tool-tip-message tip-left" style="display:none;">
        //        <img src="{$this->getViewFileUrl('Ess_M2ePro::images/i_icon.png')}">
        //        <span>{$text}</span>
        //    </span>
        //</span>
        //HTML;
        //            }
        //        }
        $onlineMinPrice = $row->getData('min_online_price');
        $onlineMaxPrice = $row->getData('max_online_price');
        if (is_null($onlineMinPrice) || $onlineMinPrice === '') {
            if ($row->getData('amazon_status') == \Ess\M2ePro\Model\Listing\Product::STATUS_NOT_LISTED || $row->getData('is_variation_parent')) {
                return $this->__('N/A') . $repricingHtml;
            } else {
                return '<i style="color:gray;">receiving...</i>' . $repricingHtml;
            }
        }
        $currency = $this->listing->getMarketplace()->getChildObject()->getDefaultCurrency();
        if ($row->getData('is_variation_parent')) {
            $onlineMinPriceStr = $this->convertAndFormatPriceCurrency($onlineMinPrice, $currency);
            $onlineMaxPriceStr = $this->convertAndFormatPriceCurrency($onlineMaxPrice, $currency);
            return $onlineMinPriceStr . ($onlineMinPrice != $onlineMaxPrice ? ' - ' . $onlineMaxPriceStr : '') . $repricingHtml;
        }
        $onlinePrice = $row->getData('online_price');
        if ((double) $onlinePrice <= 0) {
            $priceValue = '<span style="color: #f00;">0</span>';
        } else {
            $priceValue = $this->convertAndFormatPriceCurrency($onlinePrice, $currency);
        }
        if ($row->getData('is_repricing') && !$row->getData('is_repricing_disabled') && !$row->getData('is_variation_parent')) {
            $this->listing = $this->getHelper('Data\\GlobalData')->getValue('temp_data');
            $accountId = $this->listing['account_id'];
            $sku = $row->getData('amazon_sku');
            $priceValue = <<<HTML
<a id="m2epro_repricing_price_value_{$sku}"
   class="m2epro-repricing-price-value"
   sku="{$sku}"
   account_id="{$accountId}"
   href="javascript:void(0)"
   onclick="CommonAmazonListingRepricingPriceHandlerObj.showRepricingPrice()">
    {$priceValue}
</a>
HTML;
        }
        $resultHtml = '';
        $salePrice = $row->getData('online_sale_price');
        if (!$row->getData('is_variation_parent') && (double) $salePrice > 0) {
            $currentTimestamp = strtotime($this->getHelper('Data')->getCurrentGmtDate(false, 'Y-m-d 00:00:00'));
            $startDateTimestamp = strtotime($row->getData('online_sale_price_start_date'));
            $endDateTimestamp = strtotime($row->getData('online_sale_price_end_date'));
            if ($currentTimestamp <= $endDateTimestamp) {
                $fromDate = $this->_localeDate->formatDate($row->getData('online_sale_price_start_date'), \IntlDateFormatter::MEDIUM);
                $toDate = $this->_localeDate->formatDate($row->getData('online_sale_price_end_date'), \IntlDateFormatter::MEDIUM);
                $intervalHtml = <<<HTML
<div class="m2epro-field-tooltip m2epro-field-tooltip-price-info admin__field-tooltip">
    <a class="admin__field-tooltip-action" href="javascript://"></a>
    <div class="admin__field-tooltip-content">
        <span style="color:gray;">
            <strong>From:</strong> {$fromDate}<br/>
            <strong>To:</strong> {$toDate}
        </span>    
    </div>
</div>
HTML;
                $salePriceValue = $this->convertAndFormatPriceCurrency($salePrice, $currency);
                if ($currentTimestamp >= $startDateTimestamp && $currentTimestamp <= $endDateTimestamp && $salePrice < (double) $onlinePrice) {
                    $resultHtml .= '<span style="color: grey; text-decoration: line-through;">' . $priceValue . '</span>' . $repricingHtml;
                    $resultHtml .= '<br/>' . $intervalHtml . '&nbsp;' . $salePriceValue;
                } else {
                    $resultHtml .= $priceValue . $repricingHtml;
                    $resultHtml .= '<br/>' . $intervalHtml . '<span style="color:gray;">' . '&nbsp;' . $salePriceValue . '</span>';
                }
            }
        }
        if (empty($resultHtml)) {
            $resultHtml = $priceValue . $repricingHtml;
        }
        return $resultHtml;
    }