Skip to content

Commit

Permalink
Send empty description if no description is set, fix error in cms pag…
Browse files Browse the repository at this point in the history
…e sync
  • Loading branch information
RBech committed Jun 7, 2018
1 parent 35fdc24 commit 7827b29
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion code/Model/Catalog/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function getClerkExportData()

$data->setAge((int) $this->getAge());
$data->setCategories(array_map('intval', $this->getCategoryIds()));
$data->setDescription($this->getDescription());
$data->setDescription($this->getDescription() ? $this->getDescription() : '');
$data->setHasTierprice($this->hasTierPrice());
$data->setId((int) $this->getId());
$data->setImage($this->getClerkImageUrl());
Expand Down
4 changes: 2 additions & 2 deletions code/controllers/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ public function categoryAction()

if (Mage::getStoreConfigFlag('clerk/general/sync_cms_pages')) {
$pages = Mage::getModel('cms/page')
->getCollection()
->addFieldToFilter('is_active', '1')
->addStoreFilter(Mage::app()->getStore()->getId());
->addStoreFilter(Mage::app()->getStore()->getId())
->getCollection();

This comment has been minimized.

Copy link
@m-overlund

m-overlund Jun 7, 2018

Contributor

Have you tested this change?
getCollection() needs to be first as it was before.


foreach ($pages as $page) {
$data = array(
Expand Down
2 changes: 1 addition & 1 deletion code/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<config>
<modules>
<Clerk_Clerk>
<version>3.4.1</version>
<version>3.4.2</version>
</Clerk_Clerk>
</modules>
<global>
Expand Down

0 comments on commit 7827b29

Please sign in to comment.