additional_plugins/alpha/serendipity_event_motm/amazon/AmazonProduct.class.php
Matthias Mees 24ee209520 Move deprecated plugins to alpha, a.k.a. Siberia
These plugins have been identified as deprecatable at #s9ycamp2017.
They use service that no longer exist or provide features that no
longer make sense or have been replaced.

We won't miss them.

References s9y/Serendipity#499
2017-04-13 20:53:16 +02:00

35 lines
No EOL
883 B
PHP

<?php
/* This class does not handle shopping basket details */
class AmazonProduct {
var $url;
var $Asin;
var $ProductName;
var $Catalog;
var $Authors = array();
var $Artists = array();
var $ErrorMsg;
var $Description;
var $ReleaseDate;
var $Manufacturer;
var $ImageUrlSmall;
var $ImageUrlMedium;
var $ImageUrlLarge;
var $ListPrice;
var $OurPrice;
var $UsedPrice;
function AmazonProduct() {
// Does nothing for the moment
return;
}
function getSaving() {
// Returns Amazon saving, if any
$difference = (float)substr($this->ListPrice, 1) - (float)substr($this->OurPrice, 1);
if ($difference > 0) {
$save = sprintf('%.2f', $difference);
} else {
$save = false;
}
return $save;
}
}
?>