private function addPriceProductChange(Ess_M2ePro_Model_ListingsProducts $listingProduct, $currentMethod, $ebayMethod, $sourceMethod) { $tempPrice = $listingProduct->{$currentMethod}(); if ($tempPrice != $listingProduct->{$ebayMethod}()) { $attribute = ''; $src = $listingProduct->getSellingFormatTemplate()->{$sourceMethod}(); if ($src['mode'] == Ess_M2ePro_Model_SellingFormatTemplates::PRICE_PRODUCT) { $attribute = 'price'; } if ($src['mode'] == Ess_M2ePro_Model_SellingFormatTemplates::PRICE_SPECIAL) { $attribute = 'special_price'; } if ($src['mode'] == Ess_M2ePro_Model_SellingFormatTemplates::PRICE_ATTRIBUTE) { $attribute = $src['attribute']; } $attribute != '' && $this->addProductChange($listingProduct->getProductId(), $attribute, $listingProduct->{$ebayMethod}(), $tempPrice); } }
protected function addBestOfferData(Ess_M2ePro_Model_ListingsProducts $listingProduct, array &$requestData) { if ($listingProduct->isListingTypeFixed()) { $requestData['bestoffer_mode'] = $listingProduct->getSellingFormatTemplate()->isBestOfferEnabled(); if ($requestData['bestoffer_mode']) { $requestData['bestoffer_accept_price'] = $listingProduct->getBestOfferAcceptPrice(); $requestData['bestoffer_reject_price'] = $listingProduct->getBestOfferRejectPrice(); } } }