magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.56k stars 9.32k forks source link

Bug of adding image slider to recently viewed products #19519

Closed GoogleYY closed 5 years ago

GoogleYY commented 5 years ago

Preconditions

1.Deploy vanilla instance

  1. Win 7 / CentOS Linux release 7.4.1708
  2. PHP Version 7.0.28 4.Magento ver. 2.2.6 5.Luma blank theme without sample data

Steps to reproduce

  1. 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.

  2. Refresh all cache type

  3. 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

  1. the owlcarousel slider should work well that the recently viewed products should be displayed at the bottom of the product detail page with owlcarousel slider

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

magento-engcom-team commented 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?

GoogleYY commented 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:

  • [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

GoogleYY commented 5 years ago

Resolved by my self. I add the override codes to the required-js in my custom theme. Everything works well.

GoogleYY commented 5 years ago

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.