shop.balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

amazon_listing.php (706B)


      1 <?php
      2 class ModelExtensionOpenBayAmazonListing extends Model {
      3 	public function listingSuccessful($product_id, $marketplace) {
      4 		$this->db->query("UPDATE `" . DB_PREFIX . "amazon_product` SET `status` = 'ok' WHERE product_id = " . (int)$product_id . " AND `marketplaces` = '" . $this->db->escape($marketplace) . "' AND `version` = 3
      5 		");
      6 	}
      7 
      8 	public function listingFailed($product_id, $marketplace, $messages) {
      9 		$this->db->query("UPDATE `" . DB_PREFIX . "amazon_product` SET `status` = 'error', `messages` = '" . $this->db->escape(json_encode($messages)) . "' WHERE product_id = " . (int)$product_id . " AND `marketplaces` = '" . $this->db->escape($marketplace) . "' AND `version` = 3");
     10 	}
     11 }