Closed GoogleYY closed 5 years ago
Hi @GoogleYY. Thank you for your report. To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento-engcom-team give me $VERSION instance
where $VERSION
is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.
@GoogleYY do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Hi @GoogleYY. Thank you for your report. To help us process this issue please make sure that you provided the following information:
- [x] Summary of the issue
- [x] Information on your environment
- [x] Steps to reproduce
- [x] Expected and actual results
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento-engcom-team give me $VERSION instance
where
$VERSION
is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop). For more details, please, review the Magento Contributor Assistant documentation.@GoogleYY do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
- [x] yes
- [ ] no
Yes ,I confirm that I was able to reproduce the issue on vanilla Magento instance following steps to reproduce
Resolved by my self. I add the override codes to the required-js in my custom theme. Everything works well.
After a deep review to the core code of magento 2.2.6, I found that it was not a bug. Please neglect this issue. The reason why I didn't delete this post was that I found there were some threads alike also posted at stackoverflow , I hope this could help the people those needed.
Preconditions
1.Deploy vanilla instance
Steps to reproduce
Go to Admin backend->Content->Widgets->Add Widget. Select Catalog Product View(Any) under the Page label, select Main Content Area under the Container label, select Viewed Products Grid Template under the Template label. Click the Widget Options tab and complete the Widgets Options. After that click Save button.
Refresh all cache type
Add the following custom owlcarousel js scripts to htdocs\vendor\magento\module-catalog\view\base\web\template\product\list\listing.html
<script type="text/javascript" xml="space"> require(['jquery', 'owlcarousel'], function() { jQuery(document).ready(function() { jQuery(".product-items").owlCarousel({ items: 5, itemsDesktop: [1199, 4], itemsDesktopSmall: [991, 4], itemsTablet: [767, 3], itemsTabletSmall: [639, 3], itemsMobile: [479, 2], pagination: false, navigationText: ["<div class='left-arrow'><i class='fa fa-angle-left'></i></div>", "<div class='right-arrow'><i class='fa fa-angle-right'></div>"], navigation: true, }); }); }); </script>
4.Run php bin/magento setup:static-content:deploy -f and php bin/magento cache:flush
Expected result
Actual result
Vanilla production mode 1.Recently viewed products still showing by default. They were not being regulated into the owlcarousel slider that occupied too much rooms if there were 15 recently viewed products.
More information : owlcarousel js scripts works well in my custom company profile block.Even though I tried to add owl.carousel in requirejs-config.js it still didn't work