Skip to content

Commit

Permalink
- Fix "loadOptions"
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrish committed Nov 16, 2017
1 parent e8d674f commit 6169f8e
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -38,12 +38,12 @@ public function save($cacheFlag = null)
public static function loadOptions(xPDO & $xpdo, $product)
{
$c = $xpdo->newQuery('msProductOption');
$c->rightJoin('msOption', 'msOption', 'msProductOption.key=msOption.key');
$c->leftJoin('msOption', 'msOption', 'msProductOption.key=msOption.key');
$c->leftJoin('modCategory', 'Category', 'Category.id=msOption.category');
$c->where(array('msProductOption.product_id' => $product));

$c->select($xpdo->getSelectColumns('msOption', 'msOption'));
$c->select($xpdo->getSelectColumns('msProductOption', 'msProductOption', '', array('key'), true));
$c->select($xpdo->getSelectColumns('msOption', 'msOption', '', array('key'), true));
$c->select($xpdo->getSelectColumns('msProductOption', 'msProductOption'));
$c->select('Category.category AS category_name');
$data = array();
if ($c->prepare() && $c->stmt->execute()) {
Expand Down

0 comments on commit 6169f8e

Please sign in to comment.