Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions code/Model/Catalog/Productbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@ public function isExcluded()
return isset($this->excludeReason);
}

/* Returns array of sizes data - and flexible to use in Product.php because of param */
public function getSizeArray($size_attribute)
{
$sizes = array();
if($this->isConfigurable()){
$all = $this->getTypeInstance(true)->getUsedProducts(null, $this);
foreach ($all as $child) {
if ($child->isSaleable()) { $sizes[] = $child->getAttributeText($size_attribute); }
}
} else {
$sizes[] = $this->getAttributeText($size_attribute);
}

return $sizes;
}

/* Return True if Specialprice is set and we are in the Specialprice period */
public function isSpecialPriceActive()
{
Expand Down