File "amazon_listing.php"

Full path: /home/cakedeco/retaildirectonline.co.uk/catalog/model/extension/openbay/amazon_listing.php
File size: 706 B (706 B bytes)
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Editor &nnbsp; Back

<?php
class ModelExtensionOpenBayAmazonListing extends Model {
	public function listingSuccessful($product_id, $marketplace) {
		$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
		");
	}

	public function listingFailed($product_id, $marketplace, $messages) {
		$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");
	}
}