-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProduct.php
45 lines (33 loc) · 1.08 KB
/
Product.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* Created by PhpStorm.
* User: bwalleshauser
* Date: 4/28/2015
* Time: 2:40 PM
*/
class Mainstreethost_GatorTraxBoatBuilder_Model_Json_Product
extends Mainstreethost_GatorTraxBoatBuilder_Model_Json_Abstract
implements Mainstreethost_GatorTraxBoatBuilder_Model_Json_IAutojson
{
private $id;
private $name;
private $description;
private $imageFilePath;
private $profile;
public function __construct()
{
}
public function Hydrate($product)
{
$this->id = (int)$product->getEntityId();
$this->name = $product->getName();
$this->description = $product->getDescription();
$this->imageFilePath = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();
$this->profile = Mage::getModel('gator/Json_Profile')->Hydrate(Mage::getModel('pc/profile')->LoadByAttributeValueId($product->getMshBoatModel()));
return $this;
}
public function get($member)
{
return $this->$member;
}
}