Skip to content

Commit

Permalink
Couple of fixes to j2store
Browse files Browse the repository at this point in the history
  • Loading branch information
cheesegrits committed Jun 10, 2016
1 parent 42b0c41 commit 30fdc1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions plugins/fabrik_form/j2store/j2store.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ public function onAfterProcess()

$productModel->save($data);

if (empty($productId))
{
$productId = $productModel->getId();
}

$this->storeImages($data, $productTable->get('j2store_productimage_id'));
$this->storeVariant($data, $productId);
$this->storeFiles($formData, $productId);
Expand Down
4 changes: 2 additions & 2 deletions plugins/system/fabrikj2store/fabrikj2store.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function onJ2StoreAfterGetProduct(&$product)

if ($content->published == 1)
{
$product->exists = 0;
$product->exists = 1;
}
else
{
Expand Down Expand Up @@ -103,7 +103,7 @@ private function getFabrikItem(&$product)
$context->id = $objectRow->__pk_val;
$sets[$key] = $context;
}
echo "<pre>";print_r($sets);echo "</pre>";
//echo "<pre>";print_r($sets);echo "</pre>";
return $sets [$key];
}
}

0 comments on commit 30fdc1c

Please sign in to comment.