Skip to content

Commit

Permalink
https://github.com/cabinetsbay/site/issues/146
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed May 7, 2024
1 parent f6ffce3 commit 0d5a00a
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# 2024-05-06 Dmitrii Fediuk https://upwork.com/fl/mage2pro
# "Refactor `app/design/frontend/Cabinetsbay/cabinetsbay_default/Magento_Theme/templates/homepage.phtml`":
# https://github.com/cabinetsbay/site/issues/146
use Exception as E;
use Magento\Catalog\Model\Category as C;
use Sharapov\Cabinetsbay\Block\HomePage as B;
/** @var B $block */ $b = $block; /** @var B $b */
Expand All @@ -21,18 +22,16 @@ use Sharapov\Cabinetsbay\Block\HomePage as B;
foreach ($popularProductsCollection as $popularProduct) {
/** @var C $popularProduct */
print '<li>';
print '<a href="' . $categoryHelper_sub->getCategoryUrl($popularProduct) . '">';
print '<a href="' . $popularProduct->getUrl() . '">';
print '<div>' . $popularProduct->getName() . '</div>';
if($popularProduct->getData('cb_kitchen_set') != '') {
print '<div class="size-price"><b>' . $popularProduct->getData('cb_kitchen_set') . '</b>' . $popularProduct->getData('cb_kitchen_price') . '</div>';
}
try {
print '<img src="' . $popularProduct->getImageUrl() . '" border="0" />';
} catch (\Magento\Framework\Exception\LocalizedException $e) {

}
} catch (E $e) {}
print '</a>';
print '<div><a href="' . $categoryHelper_sub->getCategoryUrl($popularProduct)
print '<div><a href="' . $popularProduct->getUrl()
. '">Shop cabinets</a><a href="'.$popularProduct->getData('cb_door_sample_link').'">Order sample</a></div>';
print '</li>';
}
Expand Down

0 comments on commit 0d5a00a

Please sign in to comment.