Magento2.2.5 – Amazon Seller channel Module error

We have a magento 2.2.5 based website and just tried installing the Amazon Sales Channel module (https://marketplace.magento.com/magento-module-amazon.html) however after installing it and running the Magento upgrade, compile and deploy command when we then go to login to our Magento admin and are presented with the below error.

I don’t understand why I would have to downgrade our other Amazon modules in order to use this nor do I want to downgrade because I am concerned it will cause issues with other stuff on the site if I do.

Has anyone had this issue and if so any work around to getting it to work?

1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Please  upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory. The following modules are outdated: Amazon_Core schema: current version - 2.2.10, required version - 2.2.7 Amazon_Core data: current version - 2.2.10, required version - 2.2.7 Amazon_Login schema: current version - 2.2.10, required version - 2.2.7 Amazon_Login data: current version - 2.2.10, required version - 2.2.7 Amazon_Payment schema: current version - 2.2.10, required version - 2.2.7 Amazon_Payment data: current version - 2.2.10, required version - 2.2.7 

Magento2.2.5 remove default product title and add custom phtml file on product detail page

in Magento2.2.5 I want to remove the product name and instead where it is load a custom phtml file that will call in a custom product attribute

However my phtml file is not being called in here is my catalog_product_view.xml which I have in my app/design/frontend///magento_Category/layout folder

<?xml version="1.0"?> <page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body>     <move element="page.main.title" destination="product.info.main" before="-"/>     <move element="prev_next_products" destination="product.info.main" before="-"/>     <move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>     <move element="product.info.review" destination="product.info.main" before="product.info.price"/>     <move element="product.special.price" destination="product.info.main" after="product.info.price"/>      <move element="product_view_try_on" destination="product.info.media" before="-"/>     <referenceBlock name="product.attributes" remove="true" />     <block class="Magento\Catalog\Block\Product\View" name="product_custom_name" template="Magento_Catalog::product/view/product_custom_name.phtml" before="product.info.price"/>  </body> 

Magento2.2.5 ass custom head.phtml to child theme

I am developing a custom “child” theme based off Luma and wondering how I might add a custom head.phtml file in my child theme so that I can have my magento load that to get the additional css and js i need loaded when my child theme loads.

I have edited the file located at app/design/frontend/Kiss/luma_kiss/Magento_Theme/layout/default.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body>     <referenceContainer name="head.additional">         <block class="Kiss/Headblock" name="porto_custom_head" template="html/head.phtml" before="-"/>     </referenceContainer>     <referenceBlock name="logo">        <arguments>           <argument name="logo_file" xsi:type="string">images/kiss_logo.png</argument>           <argument name="logo_img_width" xsi:type="number">200</argument>           <argument name="logo_img_height" xsi:type="number">200</argument>        </arguments>     </referenceBlock>   </body> 

Magento2.2.5 Luma child theme not using default_head_blocks.xml in child theme folder

I have a Magento 2.2.5 based multi-store view website. What we want to do is take the Luma theme and create a custom child theme from it. Each store view (we have 3) would use its own child theme of the Luma theme.

The main difference is each child theme needs to use its own CSS file and some js files. The issue is even though I did an upgrade, compiled, deploy and assigned my theme to the store views my default_head_blocks.xml file does not seem to be loading from the child theme folder.

My folder structure is below. app/design/frontend/Kiss/ Then in the “Kiss” folder, I have 4 child theme folders luma storea_luma storeb_luma storec_luma

there are some files in the “luma” folder that I will have all 3 store views reference while other files will be referenced from the individual child theme folders.

so, for example, the footer related files for all three store views would ideally be loaded from the luma folder because it should be the same for all 3 store views.

My default_head_blocks.xml located in app/design/frontend/Kiss/sotrec_luma/web/layout/default_head_blocks.xml

now when I go to storec_luma store view and view console I don’t see any of the files that are called in via the XML file??

I have read conflicting posts about the Luma theme can not be inherited. just wondering what the above issue might be that’s preventing my XML from loading in the store view.

Adding Owl Carousel to Magento2.2.5 Blank Theme

I am working on customizing the Magento 2 Blank theme and trying to add owl carousel however am getting this error

Uncaught TypeError: Cannot read property 'fn' of undefined at :8888/pub/static/frontend/blank/blank_child/en_US/owl.carousel/owl.carousel.min.js:1 at :8888/pub/static/frontend/blank/blank_child/en_US/owl.carousel/owl.carousel.min.js:1 (index):479 Uncaught TypeError: $  (...).owlCarousel is not a function at (index):479 at Object.execCb (require.js:1650) at Module.check (require.js:866) at Module.<anonymous> (require.js:1113) at require.js:132 at require.js:1156 at each (require.js:57) at Module.emit (require.js:1155) at Module.check (require.js:917) at Module.enable (require.js:1143) 

I have created a child theme of blank and placed the basic files in my app/design/frontend/blank/blank_child folder

I believe Jquery is already included in the blank theme in Magento 2.2.5? So I then created a require js file and put it in app/design/frontend/blank/web/requirejs-config.js

The contents of the file is:

/**  * Copyright © Magento, Inc. All rights reserved.  * See COPYING.txt for license details.  */   var config = { map: {     '*': {         'rowBuilder':             'Magento_Theme/js/row-builder',         'toggleAdvanced':         'mage/toggle',         'translateInline':        'mage/translate-inline',         'sticky':                 'mage/sticky',         'tabs':                   'mage/tabs',         'zoom':                   'mage/zoom',         'collapsible':            'mage/collapsible',         'dropdownDialog':         'mage/dropdown',         'dropdown':               'mage/dropdowns',         'accordion':              'mage/accordion',         'loader':                 'mage/loader',         'tooltip':                'mage/tooltip',         'deletableItem':          'mage/deletable-item',         'itemTable':              'mage/item-table',         'fieldsetControls':       'mage/fieldset-controls',         'fieldsetResetControl':   'mage/fieldset-controls',         'redirectUrl':            'mage/redirect-url',         'loaderAjax':             'mage/loader',         'menu':                   'mage/menu',         'popupWindow':            'mage/popup-window',         'validation':             'mage/validation/validation',         'welcome':                'Magento_Theme/js/view/welcome',         'breadcrumbs':            'Magento_Theme/js/view/breadcrumbs'     } }, paths: {     'jquery/ui': 'jquery/jquery-ui' }, deps: [     'jquery/jquery.mobile.custom',     'mage/common',     'mage/dataPost',     'mage/bootstrap' ], config: {     mixins: {         'Magento_Theme/js/view/breadcrumbs': {             'Magento_Theme/js/view/add-home-breadcrumb': true         }     } } };  var config = {               paths: {                     'owlcarousel': "web/owl.carousel"     },    shim: {     "owl.carousel/owl.carousel.min": ["jquery"]     }  }; 

I then have the owl.carousel js files in a path that is app/design/frontend/blank/web/owl.carousel/

I have the owl.carousel css file located in app/design/frontend/blank/web/owl.carousel/assets/

Autocomplete works on second refresh in Magento2.2.5?

Autocomplete is not working after first page load, works only on second refresh.

I don’t know what is the issue.

Here is my code.

<?php $  url = "http://code.jquery.com/ui/1.10.0/jquery-ui.js"; ?> <script>    require.config({        map: {            '*': {                'storemanage':  '<?php echo $  url ?>'            }        }    }); </script> <link href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel ="Stylesheet"> <script>     <?php      $  zipdata = array();     $  zipval = array();     $  zipdt = array();         foreach ($  storeCollection as $  key => $  value){               if ($  value['lat']==0 || $  value['lon']==0){                 continue;              }              $  lab = $  value['name'].', '.$  value['city'].', '.$  value['state'].', '.$  value['zip'];             $  zipdata[]  = $  lab;             $  val = $  value["store_id"];             $  zipval[] =  $  val;             //$  zipdt[] =  {"value":$  val ,"label": $  lab};         }          if(count($  zipdata) > 0){ ?>             require(['jquery', 'storemanage'], function(jQuery, storemanage){                  jQuery(document).ready(function(){                      var zipdata = <?php echo json_encode($  zipdata); ?> ;                     var zipval = <?php echo json_encode($  zipval); ?> ;                     var i;                     var zipdt = Array();                     for (i = 0; i < zipval.length; i++) {                        zipdt[i] = {"value": zipdata[i] ,"id": zipval[i]};                     }                     //console.log('zipdt',zipdt);                     //zipdt = data;                       jQuery( "#retailer" ).autocomplete({                         source: zipdt,                         //autoFocus: true,                         select: function (event, ui) {                             var value = ui.item.value;                             var label = ui.item.id;                             jQuery("#retailerid").val(label);                          },                         change: function(event, ui) {                                   if((ui.item === null)){                                     jQuery("#retailer").val("");                                   }                               },                      });                 });             });         <?php } ?> </script> 

Any help would be appreciated.

Magento2.2.5 I am getting Integrity constraint error while placing order?


{“0”:”SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (mm_29.order_custom_engravings, CONSTRAINT FK_ORDER_CUSTOM_ENGRAVINGS_PRD_ID_SALES_FLAT_ORDER_ITEM_ITEM_ID FOREIGN KEY (order_item_id) REFERENCES sales_flat_order_item (item_id) ON ), query was: UPDATE order_custom_engravings SET order_id = ?, order_item_id = ?, updated_at = ‘2019-06-02 06:18:35′ WHERE (engraving_id=’143576’)”,”1″:”#0 /var/www/html/mm/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(93): Zend_Db_Statement_Pdo->_execute(Array)\n#1 /var/www/html/mm/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303):

Any help would be appreciated

Sftp not able to connect in magento2.2.5?

I am not able to connect to Sftp in magento2.2.5

Here is my code:

public function execute()     {         $  connection = $  this->sftp->open(                     array(                         'host' => 'myhostname',                         'username' => 'myusername',                         'password' => 'mypassword',                         'port' =>22,                         'passive' => true                     )                 );         if($  connection){         echo "true";          }else{             echo "false";         }                 //print_r($  connection);         die; 

But it is returning false.

I don’t know what is the problem.

Any help would be appreciated.

How to bind product image to email in Magento2.2.5?

I have created custom module in which I need to bind product image to email template in Magento2.2.5?

My code:

$  requestData["imgUrl"] = $  data["shareProdImg"];               $  postObject = new \Magento\Framework\DataObject();             $  postObject->setData($  requestData);              $  transport = $  this->transportBuilder                 ->setTemplateIdentifier('custom_pdp_email_template')                 ->setTemplateOptions(['area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID])                 ->setTemplateVars(['data' => $  postObject])                 ->setFrom(['name' => $  data["userName"],'email' => $  data["userMail"]])                 ->addTo($  data["shareMail"])                 ->getTransport();             $  transport->sendMessage();  

My template file:

<li style="font-weight:300;color:black !important;font-family: lato;font-size:16px;margin-left:0;">                     {{depend data.imgUrl}}                     {{trans "%imgUrl" imgUrl=$  data.imgUrl}}<br/>                     {{/depend}}                 </li>                  <li style="font-weight:300;color:black !important;font-family: lato;font-size:16px;margin-left:0;">                      <img alt="" data-bind="attr: { src: getImagepaypal() }" alt="Custom image" width="60" height="60">                 </li> 

Any help would be appreciated.