Ejemplo n.º 1
0
 private function isProcessRequired(\Ess\M2ePro\Model\Amazon\Listing\Product\Repricing $listingProductRepricing)
 {
     $isDisabled = $listingProductRepricing->isDisabled();
     $isOnlineDisabled = $listingProductRepricing->isOnlineDisabled();
     if ($isDisabled && $isOnlineDisabled) {
         return false;
     }
     if ($listingProductRepricing->getRegularPrice() == $listingProductRepricing->getOnlineRegularPrice() && $listingProductRepricing->getMinPrice() == $listingProductRepricing->getOnlineMinPrice() && $listingProductRepricing->getMaxPrice() == $listingProductRepricing->getOnlineMaxPrice() && $isDisabled == $isOnlineDisabled) {
         return false;
     }
     return true;
 }
Ejemplo n.º 2
0
 private function getChangeData(\Ess\M2ePro\Model\Amazon\Listing\Product\Repricing $listingProductRepricing)
 {
     $isDisabled = $listingProductRepricing->isDisabled();
     if ($isDisabled && $listingProductRepricing->isOnlineDisabled()) {
         return false;
     }
     $regularPrice = $listingProductRepricing->getRegularPrice();
     $minPrice = $listingProductRepricing->getMinPrice();
     $maxPrice = $listingProductRepricing->getMaxPrice();
     if ($regularPrice == $listingProductRepricing->getOnlineRegularPrice() && $minPrice == $listingProductRepricing->getOnlineMinPrice() && $maxPrice == $listingProductRepricing->getOnlineMaxPrice() && $isDisabled == $listingProductRepricing->isOnlineDisabled()) {
         return false;
     }
     return array('sku' => $listingProductRepricing->getAmazonListingProduct()->getSku(), 'regular_product_price' => $regularPrice, 'minimal_product_price' => $minPrice, 'maximal_product_price' => $maxPrice, 'is_calculation_disabled' => $isDisabled);
 }