Commit 5f6d8c99 by liumengfei

Merge branch 'developer' into production

parents 9961f9a5 e58b7758
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<notice_enable>1</notice_enable> <notice_enable>1</notice_enable>
<notice_type>announcement,new_update,marketing</notice_type> <notice_type>announcement,new_update,marketing</notice_type>
<menu>0</menu> <menu>0</menu>
<enabled>0</enabled>
</general> </general>
</joshine> </joshine>
</default> </default>
......
...@@ -108,12 +108,14 @@ $_helper = $block->getData('outputHelper'); ...@@ -108,12 +108,14 @@ $_helper = $block->getData('outputHelper');
break; break;
} }
if (in_array($img->getData('position'),[0,1,2])) { if (in_array($img->getData('position'),[0,1,2])) {
$arr[] = $img; $arr[$img->getData('position')] = $img;
} }
} }
if (isset($arr[1])) { if (key_exists("0",$arr)) {
$hoverImg = $imageHelper->init($_product, 'product_page_image_large')->setImageFile($arr[1]->getFile())->resize($productImage->getWidth(),$productImage->getHeight())->getUrl(); $hoverImg = $imageHelper->init($_product, 'product_page_image_large')->setImageFile($arr[1]->getFile())->resize($productImage->getWidth(),$productImage->getHeight())->getUrl();
}elseif (key_exists("2",$arr)){
$hoverImg = $imageHelper->init($_product, 'product_page_image_large')->setImageFile($arr[2]->getFile())->resize($productImage->getWidth(),$productImage->getHeight())->getUrl();
} }
if ($pos != null) { if ($pos != null) {
......
...@@ -9,5 +9,7 @@ ...@@ -9,5 +9,7 @@
<?php echo $block->getLayout()->createBlock('Joshine\Banner\Block\Index')->setTemplate('Joshine_Banner::index.phtml')->toHtml(); ?> <?php echo $block->getLayout()->createBlock('Joshine\Banner\Block\Index')->setTemplate('Joshine_Banner::index.phtml')->toHtml(); ?>
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('home_top_category_thumnail')->toHtml();?> <?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('home_top_category_thumnail')->toHtml();?>
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('home_new_arrivals')->toHtml();?> <?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('home_new_arrivals')->toHtml();?>
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('flashsaleproduct')->toHtml();?> <?php /*echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->toHtml();*/?>
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('home_category_thumnail')->toHtml();?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment