texts:
My install InstallSchema.php:

  app/code/Aty/TestTask/Setup/InstallSchema.php

<?php

namespace Aty\TestTask\Setup;

use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\DB\Ddl\Table;

class InstallSchema implements \Magento\Framework\Setup\InstallSchemaInterface{

    public function install(SchemaSetupInterface $setup,ModuleContextInterface $context){
        $setup->startSetup();
        $conn = $setup->getConnection();
        $tableName = $setup->getTable('added_sku');
        if ($conn->isTableExists($tableName) != true) {
            $table = $conn->newTable($tableName)
                ->addColumn(
                    'id',
                    Table::TYPE_INTEGER,
                    null,
                    ['identity'=>true,'unsigned'=>true,'nullable'=>false,'primary'=>true]
                )
                ->addColumn(
                    'sku',
                    Table::TYPE_TEXT,
                    255,
                    ['nullable'=>false,'default'=>'']
                )
                ->addColumn(
                    'count',
                    Table::TYPE_INTEGER,
                    255,
                    ['nullbale'=>false,'default'=>'']
                )
                ->setOption('charset','utf8');
            $conn->createTable($table);
        }
        $setup->endSetup();
    }
}

php bin/magento setup:upgrade and  php bin/magento setup:db-schema:upgrade created strange file. Like : .nfs0000000000d41f0f0000000b.

  module.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Aty_TestTask" setup_version="1.0.1" active="true">
    </module>
</config>


texts: Magento 2.3.3: I am using valet-linux and struggling to set up multi-store in Magento

texts:
As the title states I am using valet-linux and everything on single site/store works fine. The part I am struggling with is getting multi-store working with valet-linux.

I have tried adding different drivers in the driver folder for valet but not having much luck?

Anyone experienced with valet-linux?


texts: How To Add Pop Form For Submit Review In Magento2 Product Detail Page?

texts: How Can I Add Button For Submit Reviews On Click On This Button Submit Reviews Pop up form Open And User Can Easily Submit The Reviews .


texts:
My website sells a lot of products to people in Europe, and as is to be expected, some of the customer names feature diacritical marks. Unfortunately, the names with diacritical marks don't show on the delivery and invoice. It just removes the whole name, even the parts that don't feature diacritical marks.

Here's some example of names with diacritical marks:
Artūras Nalivaika,
Jurgita Dapkevičiūtė

What can I do?


texts: Difference between load() and get() methods

texts:
While going through the Magento code I have been seeing a lot of instances of:

$objectName->load($foo)

or

$objectName->get($foo)

and I was wondering, what is the difference between the 'load' and 'get' methods?


texts: Redirect Magento2 from subfolder to root folder

texts:
I am new to Magento. Successfully installed/implemented Magento 2.2.5. However, I installed Magento as subfolder in root. And my cart shows as mydomainname.com/Magento. I want to change it so public does not see 'Magento' in my URL. One user sent me this post. Installing Magento2 subfolder url. Based on this post, it appears that I only have to edit the .htaccess file. My .htaccess file has this code in the beginning:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ mydomainname.com/Magento/$1 [R=301,L]

And the automatic Redirect code at the end:

RewriteCond %{HTTP_HOST} ^mydomainname\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomainname\.com$
RewriteRule ^/?$ "https\:\/\/www\.mydomainname\.com\/Magento\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^mydomainname\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomainname\.com$
RewriteRule ^cgi\-bin\/commerce\.cgi$ "https\:\/\/www\.mydomainname\.com\/Magento\/" [R=301,L]

Should I change the code at the bottom too? Or simply change redirects, by removing word 'Magento' on Cpanel to auto generate it?

Do I have to copy index.php file too to root or leave it where it is?

How will Admin panel be accessed, after making above changes?

Additionally, I know I have to change the Web server configuration in Admin panel. Last time I did those changes, I lost my  Admin Panel access, and my website lost its images and formatting. I recall checking 'Use system Value' after making the changes in URL for both secure and unsecure.


texts: Replace default price template in product view

texts:
I'd change the default catalog/product/price.phtml

I've tried already:

<reference name="catalog_product_price_template">
     <action method="addPriceBlockType"><type>simple</type><block>catalog/product_price</block><template>catalog/product/custom-price.phtml</template></action>
</reference>

but using xdebug I've seen that the addPriceBlockType method is not used for the simple product, so it returns the default template.

where I'm wrong?
thank you


texts:
I have a problem I need help with, it's probably very simple but I just can't understand.
So, I am trying to make a product called "Silver Fork" that I sell for 10$. But I also want to offer the customer to buy 3 forks for 25$ and another option if he buys 5 forks, for 35$.

I´ve created a "Simple product", and under "Custom Options". I put in the values and everything works out fine, execept the inventory. If a customer buys the option with 3 forks the inventory doesnt go down with 3 pieces, it goes down with 1 piece, same problem if the customer chooses the option to buy 5 forks.

What am I doing wrong?
Thank you for your help!


texts:
In the module of adyen no magento, I wanted to block any notification that is made through a bank slip. The ProcessNotification.php file from the following path: app/code/community/Adyen/Payment/Model is responsible for processing any notification from the Adyen servers and from the following code, I can block all notification, whatever the method of payment.

Code:

$eventCode = trim($params->getData('eventCode'));
if ($eventCode == Adyen_Payment_Model_Event:: AUTHORISATION) {
    $this->_debugData['processResponse info'] = 'Skip notification REPORT_AVAILABLE';
    $this->_debug($storeId);
    return;
}

With the following code, from the event of payment confirmation, I block all notification, but it ends up that includes notifications that are shopping from credit card and I wanted to block only the notifications that are from bank slip.


texts: How to automatically change the status to In Stock if products are added to the product

texts:
if the number of products falls below 1, then it will become out of stock, but if you increase the products manually, then the status will remain out of stock. How can I automatically change the status to In Stock if the goods have been added manually?
I tried using the module from this answer, but it doesn't work.
My Magento v 2.3.2


texts:
I have a shop and all the time ALL indexes are invalid. I noticed, that I have no clue, when an index is invalidated.

Can you give me a list of "all" events, which make one or more of these indexes to get invalid?

Product Attributes
Product Prices
Catalog URL Rewrites
Product Flat Data
Category Products
Catalog Search Index
Tag Aggregation Data
Stock Status


texts: Adding jQuery plugin to Magento 2 does not work

texts:
I tried add jQuery Upload File Plugin to Magento 2 and used requirejs but it doesn't work smooth. At first time has error:

  Uncaught Error: Mismatched anonymous define() module: function ($) {
  "use strict";
  /*
      Usage Note:
      -----------
      Do not use both ajaxSubmit and ajaxForm on the same form.  These
      functions are mutually exclusive.  Use ajaxSubmit if you want
      to bind your own submit handler to the form.  For example,

 $(document).ready(function() {
     $('#myForm').on('submit', function(e) {
         e.preventDefault(); // <-- important
         $(this).ajaxSubmit({
             target: '#output'
         });
     });
 });

Use ajaxForm when you want the plugin to manage all the event binding
     for you.  For example,

 $(document).ready(function() {
     $('#myForm').ajaxForm({
         target: '#output'
     });
 });

You can also use ajaxForm with delegation (requires jQuery v1.7+), so the form does not have to exist when you invoke ajaxForm:

 $('#myForm').ajaxForm({
     delegation: true,
     target: '#output'
 });

When using ajaxForm, the ajaxSubmit function will be invoked for you at the appropriate time.

My requirejs-config.js

/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
/*eslint no-unused-vars: 0*/

var config = {
    paths: {
        'customuploadfile' : 'Magento_Sales/js/jqueryuploadfile'
    },
    "shim": {
        'customuploadfile': {
            deps: ['jquery']
        }
    }
};

My custom js:

require([
  'jquery',
  'customuploadfile'
  ], function ($,uploadFile) {
    'use strict';

    $(document).ready(function(){
      $.ajaxSetup({
        showLoader: true,
      });
      var url_anhang=$('#order_upload_anhang').val();
      var anhang_uploadObj;
      anhang_uploadObj = $("#anhanguploader").uploadFile({
        url:url_anhang,
        formData:{ form_key: FORM_KEY,order_id:$('#add_anhang_to_order').attr('value')},
        fileName:"file",
        cancelStr:"x",
        autoSubmit:false,
        dragDropStr : false,
        showProgress:true,
        showDone:false,
        showAbort:false,
        onSuccess:function(files,data,xhr)
        {
          var url=$('#order_anhang_save').val();
          var order_id=$('#add_anhang_to_order').attr('value');
          anhang_uploadObj.reset();
          var aj = new Ajax.Request(
            url, {
              method:'get',
              parameters:{
                "order_id" : order_id,
                "data" : data
              },
              onComplete: function (text)
              {
                $.get(window.location.pathname, function( data ) {
                  $('.anhang_show').html(jQuery(data).find('.anhang_show').html());
                });
              }
            }
          );
        },
      });
      $(document).on( 'click', '#add_anhang_to_order',function(){
        anhang_uploadObj.startUpload();
      });
    });

If reload page it work but sometime has error, please help me.


texts: Hide or remove category list in login page

texts: I tried to remove or hide the category list on header in login page only. How can i do it? I don't see anything in customer login layout that generate the catalog list.


texts: Hide tier price if special price is available

texts: my product have both special price for a period and tier price also. but i want to hide tier price if a special price is available in magento-1.9. now my product display both special price and tier price. please help me any one to solve this problem.


texts: Magento 2.1.9 - ReCaptcha Extension Error

texts:
I have added this extension to my project:

https://github.com/magespecialist/m2-MSP_ReCaptcha

The only code I modified is the system.xml in order to get a tab in the backend.

What happens now is that any time I enable the extension and I try to use the captcha, the webpage crashes after using it, as you can see:

Even though before it appears with a green tick:

Now, what they say where you get the keys from is this:

I got to paste two snippets somewhere in the code, but the thing is atleast as far as I saw, the guys at MageSpecialist, where I have taken the extension from, haven't coded any tags with:

<head></head>

or:

<form></form>

All this happens everywhere I place the reCaptcha.

So, the questions are:

Where do I have to add those snippets?
Has anyone faced that problem?
How can I fix it?


texts: How to unlock user (customer, not admin) from database after entering wrong passwords?

texts:
How can I unlock a user if he was locked after entering the wrong pasword too many times? I checked is_active in customer_entity, but its always 1, even for locked users. Whats the right place to to that in the database?

Thanks!


texts: SoapClient fails with - Failed to load external entity

texts:
I am trying to run a SOAP request from my client's Mangento website.

Its throwing below error

  'SOAP-ERROR: Parsing WSDL: Couldn\'t load from \'https://swsim.testing.stamps.com/swsim/swsimv50.asmx?wsdl\' : failed to load external entity "https://swsim.testing.stamps.com/swsim/swsimv50.asmx?wsdl"

Here is my code.

class Stamps extends \Magento\Shipping\Model\Carrier\AbstractCarrierOnline implements \Magento\Shipping\Model\Carrier\CarrierInterface{
    .....
    .....
    public function collectRates(RateRequest $request){
        $wsdl = 'https://swsim.stamps.com/swsim/swsimv50.asmx?wsdl';
        $client = new SoapClient( $wsdl, array( 'trace' =>  true ) );
    }
}

When I  try to use exact same code outside of Magento, It working fine.

In Magento, is any way to restrict to access an external entity for some directories.


texts: I am trying to write a module that converts the given Xls file to default Magento CSV format? Is there any better way to do this?


texts: Change magento default grid error message

texts: I am making a custom grid for my extension and I wish to change the default error message that is being displayed when we select any massaction but we donot select any checkbox.


texts: Set minimal interval between the order and delivery date;

texts:
I am Preparing magento for a confectionery shop that wants to sell cakes and cookies on-line.

the problem is:
                "Confectionery workers should be aware of orders at least 3 day sooner."

I should set 3 day delay time for delivery in the shop so customers can choice delivery time 3 day after the current date.
there is some descriptions in How to let user choose delivery date? that explains about adding delivery date to your shop but it doese not explains about forcing customers to chose delivery date at least 3 day after current date.
can any one help me with a comment or a solution in this condition?


texts: Sometimes getting cannot read property issue after page load due to which some functionality affected

texts:
On the entire website(homepage, category page etc) sometimes I'm getting "cannot read property timepicker" issue due to which some feature like "Add To Quote" functionality affected & instead of "Add to Quote" item via AJAX it's redirecting to 404 page.

Please visit the following screesnhot:-

When "Add To Quote" feature is working :-

When "Add To Quote" feature not working :-

Note:-1 I'm using some 3rd party extensions on the site also migrated from Magento1 to 2, using custom theme etc.

2-

I need to run only "Add to Quote" feature so please let me know how i can resolve  " cannot read property" issue.


texts: Magento 2. How to get All Parent Categories Ids from current category ID

texts:
I'm getting the current category Id using Registry like

$categoryId = $this->_registry->registry('current_category')->getId();

and to get the parent categories I tried this

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$categoryFactory=$objectManager>get('\Magento\Catalog\Model\CategoryFactory');
$category = $categoryFactory->create()->load($categoryId);
$parentCategories = $category->getParentCategories();

Now when Print_r() this category then it shows me memory limit but I just want to show all the Ids of the parent categories I also tried

$parentCategories = $category->getParentCategories()->getId();

but it shows me an error... how can I get only the Ids of the parent categories? Thanks in advance


texts:
I am building a clothing/toy based shop and i have come across a worry in regards to my category set up.

Basically i have many sub-sub categories that will be being used under multiple sub-categories.
For instance:

My category tree looks like so

-Default category
  - Womens underwear
    - knickers
    - bras
  - Nightwear
    - knickers
    - bras

And then under the sub-sub-categories I have my products.

My questions is, will the fact that I have many duplicated sub-sub categories affect my SEO? I am guessing i can just assign one product to multiple categories. But I'm just worried that the sub categories will trip me over in getting a good rank


texts: Add new customer address REST API : Magento 2

texts: Is there is an API to add new customer address without admin token?


texts:
I have followed Mage documentation from Magento official website on clicking it's jumping on top:
I am using 2.3.3, any way to stop jumping?

        Cars

Cars content

        Movies

Movies content

        Music

Music Content


texts: Assign configurable product images to its associated products in magento

texts:
My store have around 20000 products and now i want to generate google feed with simple products but associated products don't have images, only configurable products have images. Now what i want is to associated configurable product image to its all associated product so when i generate feed associated products takes the image of its main configurable product.

I have try this by create a module but

<?php
 class Ebiz_Assignimage_IndexController extends Mage_Core_Controller_Front_Action {

    public function indexAction()
    {

        $collectionConfigurable = Mage::getResourceModel('catalog/product_collection')
                                    ->addAttributeToFilter('type_id', array('eq' => 'configurable'));

        //  echo '<pre>'; print_r($collectionConfigurable->getData()); die;
            foreach ($collectionConfigurable as $_configurableproduct) {
                $product = Mage::getModel('catalog/product')->load($_configurableproduct->getId());
                if($product->isSaleable()) {

                    $childIds = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($product->getId());
                    foreach($childIds[0] as $key=>$val) {
                        $associatedProduct = Mage::getModel('catalog/product') ->load($val);

                        $associatedProduct->setImage($product->getImage())
                                        ->save();
                    //}
                }
            }
        die;
    }
?>

This script is working but its taking too much time as there are large number of products
is there any better to do this.

Please let me know any better solution or any modification required in my current approch


texts:
I'm experiencing a fatal error in the downloader of my Magento installation. When I login to the downloader I receive this error:

Fatal error: Undefined class constant 'DEFAULT_SCONFIG_FILENAME' in /downloader/Maged/Connect.php on line 167

I checked what's on this line, and this is what it says:

if(!$this->_sconfig || $reload) {
        $this->_sconfig = new Mage_Connect_Singleconfig(
            $this->getConfig()->magento_root . DIRECTORY_SEPARATOR
            . $this->getConfig()->downloader_path . DIRECTORY_SEPARATOR
            . Mage_Connect_Singleconfig::DEFAULT_SCONFIG_FILENAME
        );
    }

I'm not seeing another reference to DEFAULT_SCONFIG_FILENAME. How do I fix this?


texts: Magento 2:- "Forgot your password?" issue from admin side

texts: I try to change admin password by Forgot your password link but I did not get any email for Forgot password.


texts:
I am using the Magento 2.3.4-p2(CE).
In Admin Panel, System => Tools => Web Setup Wizard redirect to the following url

Url: BASE_URL/setup/index.php/session/unlogin

How to solve this issue?


texts: Exclude custommodule Js from minification of Js in Magento2

texts:
I am trying to minify JS in Magento 2.
There is an option in the Backend: Stores -> Configuration -> Advanced -> Developer to minify js. I did that and JS got minified but it also includes my custom module's JS.

It should not include my custom module JS because it contains already minified JS. i want to exclude those JS from minification.


texts: How render product wishlist link functionality in custom template (phtml) in magento 2

texts: How to display wishlist link (with functionality) in custom phtml file using template file in magento 2


texts: Why are there 3 cronjobs that needs to be added to crontab

texts:
Starting from the official documentation: https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-cron.html#create-the-magento-crontab

Somewhere in there is this... that gets added to crontab

#~ MAGENTO START
* * * * * /usr/bin/php /var/www/html/magento2/bin/magento cron:run | grep -v Ran jobs by schedule >> /var/www/html/magento2/var/log/magento.cron.log
* * * * * /usr/bin/php /var/www/html/magento2/update/cron.php >> /var/www/html/magento2/var/log/update.cron.log
* * * * * /usr/bin/php /var/www/html/magento2/bin/magento setup:cron:run >> /var/www/html/magento2/var/log/setup.cron.log
#~ MAGENTO END

There are 3 things that get executed every minute.
What's the difference between cron:run, cron.php and  setup:cron:run ?


texts: Remove part of breadcrumb from category and product page

texts:
I added an extra category but i don't want to show this in the breadcrumb.

I searched for a while how i can remove a part from it and found the following solution:

In app/code/local/Mage/Page/Block/Html/Breadcrumbs.php I added the following code:

function removeCrumb($crumbName) {
    if ((!isset($this->_crumbs[$crumbName])) || (!$this->_crumbs[$crumbName]['readonly'])) {
    unset($this->_crumbs[$crumbName]);
}
    return $this;
}

Then ,i added the following code in app/code/local/Mage/Catalog/Block/Product/View.php after

$this->getLayout()->createBlock(‘catalog/breadcrumbs’);

$this->getLayout()->getBlock('breadcrumbs')->removeCrumb('home');

Instead of 'home' I can use the word category + the id of the category to remove this part from the breadcrumbs.

This all works fine, but unfortunately only on the product page. When I try to do the same in app/code/local/Mage/Catalog/Block/Category/View.php something strange happens:

instead of 'home - cat1 - cat2' it becomes 'home - cat2 - cat1'.

No idea why.

Does someone knows how to solve this problem for the category page?

I'm using magento 1.7.0.2


texts: Magento2: Translate knockout variable with odd beahaivor

texts:
I want to translate a variable in Knockout

sales_unit has the value pair. The value should be translated to a different language

Actual Result:

pair

Target Result:

pár

It only will translate correctly, if i add the result string in knockout once

If I delete this line afterwards, the translation magicaly works from now on, until i clear the cache.

This is not really a pretty solution and is only a workaround. Does anybody know, how i can fix this?


texts:
I want to copy the images of a product to another product.
I wrote the following script:

$mediaGallery = $anotherProduct->getMediaGallery();
$p->setMediaGallery(null);

Mage::app()->getStore()->setId(Mage_Core_Model_App::ADMIN_STORE_ID);

foreach($mediaGallery["images"] as $image) {
    $filePath = $importDir.$image["file"];
    if(file_exists($filePath) && !file_exists(Mage::getBaseDir('media').DS.'import'.DS.'catalog'.DS.'product'.$image["file"])) {

        $p->setStoreId(Mage_Core_Model_App::ADMIN_STORE_ID)->addImageToMediaGallery($filePath, array('small_image','thumbnail','image'), false, false)->save();

        $attributes = $p->getTypeInstance(true)->getSetAttributes($p);
            $attributes['media_gallery']->getBackend()->updateImage($p, $image["file"], array('postion'=>$image['postion'],'postion_default'=>$image['postion_default'],'label'=>$image['label'],'label_default'=>$image['label_default'],'disabled'=>$image['disabled'],'disabled_default'=>$image['disabled_default']));
    }
}

There is exact one image in $mediaGallery.
The Script imports two entries (one is empty). The other entry is correct but the labels (for each store) are missing.

Any idea?


texts: Change table name for admin grid collections

texts:
I have created one module for banner. Its working well. In backend, I have an option to add banner image and set active or not.Initially, I have created a table with the name "banner" for save banner records.

Now I would like to change the table name like chilly_banner. I have created "chilly_banner" table manually in DB and inserted some records.

In admin banner grid, I want to show the collections from this table. I don't have any idea, how to do it. But i have tried like this in _prepareCollection() method,

$collection = Mage::getModel('banner/chilly_banner')->getCollection();

And in model file _init() method changed banner into chilly_banner as like above.

But I got an error like

 Fatal error: Call to a member function getCollection() on a non-object
 in ../app/code/local/Chilly/Banner/Block/Adminhtml/Banner/Grid.php on
 line 18

Have any idea how to change table name in grid collections and also want change the table name in saveAction() method too?

I'm eagarly awaiting for your response..


texts: Problem with the characters 'span' in URL (Magento 1.9.1.0)

texts:
I have encountered a strange but irritating problem in the webshop I am working on. In some URL's from the productpages the word spanband (lashing strap in English) and this causes a  great problem with the layout of the page.

In the source there is the body tag:

<body class=" catalog-product-view catalog-product-view product-spanband-5-ton categorypath-accessoires-9-html category-accessoires">

Somehow the word span is picked out by the browser as it would be a span tag instead of part of the word spanband. This causes the whole layout to be destroyed. In the inspector in Chrome I can see that the browser uses this bit of CSS from bootstrap-responsive.css

[class*="span"] {float: left;min-height: 1px;margin-left: 30px;}

Unfortunally I can not remove the word spanband from the URL's. Anybody who has a clue what can be the cause of this problem and how to solve it?

Regards,
Erik


texts: Magento-2.1x need to add color picker on system config in admin pannel

texts:
I need to add color picker on the admin panel of magento2.1. I have added the color picker for Magento-2.0x and it works well.

Could any one suggest me the idea for magento-2.1 ?


texts: Programmatically importing products are slow to save when adding images in Magento 2.1

texts:
I have a script which imports products from XML data POSTed to it from an external source into Magento 2.1.

Everything works and imports fine, however when images are added to a product, the $product->save(); command takes around 7 seconds per image uploaded.

As a whole, it can add around 50 products without images to the system in around 4 seconds.

When images are passed in the import (hosted externally), they are downloaded locally and associated with the product before saving it.

$product->addImageToMediaGallery(
    $imageFile,
    $locations,
    false,
    false
);

I have tried using both GD and ImageMagick as the processors, but I now do not believe this to be the cause of the slowdown.

Any suggestions on where to look next to find out the source of the delay?


texts:
I've been searching for a way to dynamically add more fields to a attribute on a product in backend.

I believe the closest thing I've come to, is to make a custom function with addAttributeOption - is that correct?

This is what I'm trying to achieve:


texts:
I have created a custom module for Megamenu. I have js file which needs to be added to this module.

Some of my queries are:

Can I add the js file directly on my module?. If yes, how to do it?
Do I need to add it on theme? If that's right, how to do it?

Any help will be appreciated!


texts: Notice: Undefined offset: 4 while opening website

texts:
Today When I run my store it says following error message..

  Notice: Undefined offset: 4  in /var/www/vhosts/myhost.com/Myproject/app/design/frontend/tapestore/default/template/catalog/product/featured_list.phtml on line 171

The following code is found in that place...

166 <?php if ($desct) { ?>
167

168

169        <?php
170             $i = 0;
171             while ($desctexpl[$i] && $i < 4) {
172                   echo "
" . Mage::helper('core/string')->truncate($desctexpl[$i], '40') . "
";
173                   $i++;
174             }
175         ?>
176

177

178 <?php } ?>

Could any one suggest what might be the problem ? and how to solve it ?


texts: How to identify extensions that "phone home"?

texts:
Is there a way to identify code that sends HTTP requests to a remote server in the background?

I noticed that when I have spotty reception on my development machine, many shops take a long time to load, even running on localhost.

I have a feeling that is because some remote servers take a long time to respond due to my spotty connection. I would like to identify these requests and remove them, because I fear they might also slow down the live installations, for example if the external server is down or slow...


texts: Why is this Magento 2 CMS Page Design update is not working?

texts:
I have a static block for a banner to go across the entire page however I cannot add it with the CMS Page -> Design content.

I am using:

<referenceContainer name="page.top">
    <block class="Magento\Cms\Block\Block" name="homeslider_1">
        <arguments>
            <argument name="block_id" xsi:type="string">homeslider_1</argument>
        </arguments>
    </block>
</referenceContainer>

The block I am trying to add is homeslider_1. It is not showing up.

If I add it in the cms content part with:

{{block class="Magento\Cms\Block\Block" block_id="homeslider_1"}}

it works but now has margin either side.

I am using Magento 2.1.0 with Nginx on Varnish Cache PHP 7.0.


texts: Magento 2: Custom module installed but not working

texts:
Have created a module and it works fine on staging and locally but not working on live. The module is installed correctly and enabled. The live config.php and the staging config.php are the same. I used the live db on staging and it is working fine which means is not a db problem.

Also cleared the cache. In my custom module I have a before plugin for Magento\Checkout\Controller\Onepage\Success execute() and overwritten Iways\PayPalPlus\Controller\Order\Create.php.

Looks like the code is never executed. Does anyone know what might be the problem?


texts:
I am playing around with the Magento 2 beta and in doing so attempting to create a custom extension. I have had a good read through the docs and think I understand most of the process, however I am having trouble getting Magento to register my extension.

I have created a new directory in app/code/My/Extension to contain the extension within this I have created an etc/module.xml file which if my understanding is correct should cause magento to register the extension. My module.xml code contains the following code:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="My_Extension" schema_version="2.0.0">
        <sequence>
            <module name="Magento_Eav"/>
        </sequence>
    </module>
</config>

I can tell Magento is getting as far as reading this file as if I break the xml it causes an error loading the config in developer mode. However if I go to Stores -> Configuration -> Advanced -> Advanced -> Disable Modules Output in admin I cannot see my new extension which is what I was expecting. Obviously there is a lot more to do after this step but I just want to get past this first hurdle. Am I missing something? Is there anything else that needs to be done to actually register the extension?


texts: How to use Siege to test Magento when logged in?

texts:
As be shown on the title, how can I use Siege to test my Magento site's performance when I logged in with email and password on Magento?
Thank you so much!


texts: shopping cart price rule condition based on final price rather than subtotal

texts:
In shopping cart price rule we have condition as subtotal but I want condition for final price ie. total cart price after coupon code applied.

How to do that?


texts: Image Thumbnail not showing in Magento 2.1 admin panel

texts:
Im working on a custom module in magento 2.1 which has category attribute to upload thumbnail image from Dashboard>Products>Categories . When i try to upload an image, the preview is shown and the image is uploaded to tmp folder without errors but after saving the image for a category , the thumbnail is not shown in the page. Here is the controller for uploading the image.

class Upload extends \Magento\Backend\App\Action
{
    protected $baseTmpPath;
    protected $imageUploader;
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Catalog\Model\ImageUploader $imageUploader
    ) {
        $this->imageUploader = $imageUploader;
        parent::__construct($context);

    }
    public function execute() {

        try {
            $result = $this->imageUploader->saveFileToTmpDir('thumbnail');
            $result['cookie'] = [
                'name' => $this->_getSession()->getName(),
                'value' => $this->_getSession()->getSessionId(),
                'lifetime' => $this->_getSession()->getCookieLifetime(),
                'path' => $this->_getSession()->getCookiePath(),
                'domain' => $this->_getSession()->getCookieDomain(),
            ];
        } catch (\Exception $e) {
            $result = ['error' => $e->getMessage(), 'errorcode' => $e->getCode()];
        }
        return $this->resultFactory->create(ResultFactory::TYPE_JSON)->setData($result);
    }
}

How can i bring preview of the images Ive uploaded in each category?


texts: How to have different Order ID's or Order Prefix/Suffix for Frontend and Backend Order

texts:
We have a unique requirement from one of our client. What is needed is a separate Order Id for Frontend orders and different for backend orders.

The basic necessity is to differentiate between the backend and frontend orders.

I am aware regarding how to change the prefix of the orders from the database, however I am not coming to conclusion regarding what approach can be taken to separate out these orders as whenever the order is placed order id will be an increment order id irrespective of frontend/backend order.

Can anyone please provide an insight on what approach should be taken.

Is there a way to have a different prefix/suffix for these orders? or is there any other way we can differentiate between them?


texts: get total number of customer in last 24 hrs who bought the products

texts:
I am on Product detail page. Suppose I am seeing X product. Now I want to show a total number of customers who bought this X product in last 24 hrs.

Last 24 hrs should be updated every day.


texts: Magento 1.7 : How to use sales_order_payment_capture event?

texts:
In Magento 1.7, I want to do like after credit memo create product quantity should be deduct.

How to do that?

Any help would be appreciated.

Thanks.


texts:
I'm trying to edit the text on my cart/checkout.

Things such as "GRAND TOTAL EXCL. TAX", I would rather have displayed as "Subtotal" etc.

I've tried editing Mage.Tax.csv with the below changes - but it doesn't seem to alter anything.

Grand Total (Excl. Tax),Subtotal
Grand Total (Excl.Tax),Subtotal
Grand Total (Incl. Tax),Total
Grand Total (Incl.Tax),Total
Grand Total Excl. Tax,Subtotal
Grand Total Incl. Tax,Subtotal

The location of the file was app/locale/en_US

Is there somewhere else to edit this text?


texts: Having problems working out how to move the recently viewed block. I want it to sit above the details/review tabs but can't work out how to move it in the xml?


texts:
Maybe its a simple question, but not for beginners :) . How can I add item to the admin menu? also with submenus in magento ?
I created a module, which have the following structure

the content of config.xml is :

<?xml version="1.0"?>
<config>
    <modules>
        <Netgroup_Attributegrouping>
             <version>0.1.0</version>
        </Netgroup_Attributegrouping>
    </modules>
</config>

and the content of adminhtml.xml is :

<?xml version="1.0"?>
<config>
<menu>
    <attributegrouping translate="title" module="attributegrouping">
        <title>AttributeGrouping</title>
        <sort_order>210</sort_order>
    </attributegrouping>
</menu>
</config>

and the content of Helper/Data.php is:

<?php

class Netgroup_Attributegrouping_Helper_Data extends Mage_Core_Helper_Abstract
{

}

the file from modules/Netgroup_AttributeGrouping.xml content is :

    <?xml version="1.0"?>
<config>
    <modules>
        <Netgroup_Attributegrouping>
            <active>true</active>
            <codePool>local</codePool>
        </Netgroup_Attributegrouping>
    </modules>
</config>

BUT the result is nothing. What should I do ? thx


texts:
I saw you helped someone out. I am just seeing if you could assist me as well. I am using Magento 2 now instead of Magento 1. I have created my attributes for each of my products but in Magento 1 it would separate these fields in excel and I was able to upload them rapidly. Magento 2 now it seems like it adds them all to one cell and it's under additional attributes, is there a way I could separate these cell for import and export?
Thank you so much.
Saied.


texts: Magento 2 - Why is Magento\Checkout\Model\Cart deprecated?

texts: Since Magento 2.1, Cart has a @deprecated tag. Nevertheless, it is still used by Magento itself to store products when shopping. Is the deprecation intended, and if so, and what should we use instead?


texts: Magento Magestore One step checkout GOOGLE API autocomplete auto suggest NOT working

texts:
tried everything...im pretty well versed...anyone who can confirm that this actually works?

Yes I have the key put in the box with the box marked "YES"


texts: Magento 1 backward compatibility with magento 2 module

texts:
Magento 2 modules are not compatible with magento 1

Now, since there still is a large number of deployments using magento 1:

Is there a  convenient way to generate magento 1 compatible modules from a magento 2 module ?

There is a magento 1->2 migration tool, so this would be the reverse process.


texts: Keep getting  for css file and not actual file - trying to use Gulp sourcemaps

texts:
So I have updated the default_head_blocks.xml file with my css file like so and the theme loads the CSS.

<css src="css/master.css" />

This is my gulpfile.

const gulp = require("gulp");
const plumber = require("gulp-plumber");
const livereload = require("gulp-livereload");
const less = require("gulp-less");
const wait = require("gulp-wait");
const sourcemaps = require("gulp-sourcemaps");

gulp.task("less", function() {
  return gulp
    .src([
      "./app/design/frontend/Sm/market/web/css/master.less",
      "./app/design/frontend/Sm/market/web/css/ytextend.less",
      "./app/design/frontend/Sm/market/web/css/yttheme.less"
    ])
    .pipe(plumber())
    .pipe(less())
    .pipe( sourcemaps.write() )
    .pipe(gulp.dest("./pub/static/frontend/Sm/market/en_GB/css"))
    .pipe(wait(2000))
    .pipe(livereload());
});
// Watch Files For Changes and livereload
gulp.task("watch", function() {
  livereload.listen();
  // gulp.watch("./app/design/frontend/Sm/market/web/css/*.less", ["less"]);
  gulp.watch("./app/design/frontend/Sm/market/web/css/**/*.less", ["less"]);
  // gulp.watch("./pub/static/frontend/Sm/market/en_GB/css/market.css", ["reload"]);
});

gulp.task("default", ["less", "watch"]);

However, I can't seem to get sourcemaps working correctly.

This is what shows on the dev tools for Chrome. When it should be showing the .less file or at least master.css - When I click that it does take me to the href for the stylesheet in pub/static folder.


texts: 403 Forbidden Error When I visit Admin after adding new Theme to Magento 2.2.3

texts:
I get this error when I visit http://domain/admin after I have added a new theme to magento 2.2.3.
I already run php bin/magento setup:upgrade but the error is still there.
 The error in /var/log/apache2/error.log is AH01630: client denied by server configuration: /var/www/html/magento2admin
How do I go about solving this error?


texts: Set a default config value on a ui-component form field

texts:
The ui-components format for forms and grids is changing in version 2.2 (dev). (maybe it already did). How can I set a default value for a field.
Before 2.2-dev you could add a field like this in the form.

    <field name="title">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">text</item>
                <item name="default" xsi:type="string">Some default value.</item>
                <item name="label" xsi:type="string" translate="true">Page Title</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="source" xsi:type="string">source_here</item>
                <item name="sortOrder" xsi:type="number">20</item>
                <item name="dataScope" xsi:type="string">title</item>
                <item name="validation" xsi:type="array">
                    <item name="required-entry" xsi:type="boolean">true</item>
                </item>
            </item>
        </argument>
    </field>

in 2.2-dev the column looks like this:

    <field name="title" sortOrder="20" formElement="input">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="source" xsi:type="string">source_here</item>
            </item>
        </argument>
        <settings>
            <validation>
                <rule name="required-entry" xsi:type="boolean">true</rule>
            </validation>
            <dataType>text</dataType>
            <label translate="true">Page Title</label>
            <dataScope>title</dataScope>
        </settings>
    </field>

Notice the default is missing from my second example.
I tried <default>Some default value</default> and the same syntax as for the previous version but the xml does not validate.

Is there a way to do it in the new version or someone overlooked it?


texts: How to modify 503 file in magento 2 cloud Enterprise edition?

texts:
How to modify 503 file in magento 2 cloud Enterprise edition ?

When a 503 error occurs it returns maintenance page.
I want to add some extra code for 503 Error/Maintenance page in
Magento 2 cloud Enterprise edition ?

  But my cloud use do not have permission to write that file.

Note : Fastly Configuration section is not available on server.


texts: How to change contact page url in Magento 2

texts:
When we entering contact form in footer from any page it redirect only - /contact/index/
Any options such that we can submit form in footer any page without redirect to another page


texts:
after updating magento 1.7 with security patches I have started to get following error when try to capture payment from QuickPay

Not able to capture your payment online, due to this error: Failure to capture:
{"message":"Validation error","errors":{"amount":["is too large"]},"error_code":null}

Anyone know how to this this error ?


texts: Is it possible to update the Configurable Product Base price once it has been set as the field is uneditable once it has been saved. Ie either Via Import or direct on the database.


texts: How to change all product inventory options to config settings?

texts:
how can i change all products's inventory setting to "config settings"

I want all my product to have same setting for Inventory section which is same as config settings.   After I made a database backup to my new magento, all of my products didn't have any "check" on the "config settings" in "inventory" section.

I wanted set my setting same as config settings which is for

Manage Stock:  Use Config Settings

Enable Qty Increments:  Use Config Settings
Qty Increments:  Use Config Settings


texts:
Run: composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- magento/product-enterprise-edition 2.4.0 requires pelago/emogrifier ^3.1.0 -> satisfiable by pelago/emogrifier[3.1.x-dev, v3.1.0] but these conflict with your requirements or minimum-stability.
- magento/product-enterprise-edition 2.4.0 requires pelago/emogrifier ^3.1.0 -> satisfiable by pelago/emogrifier[3.1.x-dev, v3.1.0] but these conflict with your requirements or minimum-stability.
- Installation request for magento/product-enterprise-edition 2.4.0 -> satisfiable by magento/product-enterprise-edition[2.4.0].

Help me to resolve this error.


texts: Can I have different domains for each store within one website

texts:
Using Magento's terminology of Website & Store, can I create 2 stores within a single website and use different top level domain names for each store?

Or must I use separate websites if I want to use different domains?


texts: Unable to import more csv files into Magento

texts:
We have been importing products into Magento using multiple CSV files. There are files for each category. To overcome errors, we have in the past repeatedly imported the same CSV files (using Replace Complex Data).
However, presently we can 'Check data' on a csv file but not able to import it. The loader continuously spins but never completes.

Is there any tuning? max imports? some logs to be cleared? that will help us to resume our imports again.


texts: Multiple users are using single coupon simultaneously

texts:
I have created one shopping cart rule with uses per coupon "1" and uses per customer "1". For example, if user A adds product in cart and apply "COUPON01" on cart page. Also user B adds product in cart and apply same coupon "COUPON01" on cart page. Both users click on the place order same time and redirect to PayUPayment gateway for payment. Now both users get discount with single coupon.

How can I fix this issue in magento.(It is the case of simultaneous request to avail single coupon)


texts: Use Zero Subtotal method use on order greater than 0

texts:
I'm trying to make quote system, so the customer can place order as quote without paying,
The checkout also have other payment options.
I used a little hack to show "Zero Subtotal Checkout" option on magento onepage checkout payment methods section. by editing below file

so it shows payment option when order greater than 3000

/app/code/local/Mage/Payment/Model/Method/Free.php

public function isAvailable($quote = null)
    {
        return parent::isAvailable($quote) && !empty($quote) && Mage::app()->getStore()->roundPrice($quote->getGrandTotal()) > 3000;
    }

But when i select that it automatically deselecting and hide itself.

can someone help me to fix this issue please


texts: How i can Add VAT option for each product. There are some with VAT and others with no VAT. And if VAT it should show on the order for the customer.


texts: What determines whether or not an attribute can be used as a configurable option in a configurable product?

texts: I've been doing a little digging in the database and noticed is_configurable is oftentimes set to 1 despite not being used to configure a configurable product (such as custom_design_from). I know this is column is responsible for this, however, because the option switches to its off state when I change the value for e.g. color. Is there something I'm missing? How does Magento determine this?


texts: Strange issue in table rate shipping price

texts:
I am using magento version 1.9.0.1. I have strange issue in shipping price which is set by table rate. Below is my shipping_tablerate table screenshot

I have set 7.36 for Andorra. but when i select on checkout page it display shipping price 6.08 EURO instead 7.36 EURO.


texts: Apply free shipping promotion when reordering from admin panel

texts:
I've made a promotion rule under Promotions > Shopping Cart Price Rules. It enables free shipping for shopping cart less than 2 KG.

Conditions:
Total Weight equals or less than 2.

Actions:
Free shipping -> For shipment with matching items

I enabled Flat Rate shipping method with price of 10$ as well.

Customers can see the free shipping option in checkout page, and admin user can create a new order with free shipping from admin panel. But when admin user tries to reorder, Flat Rate price is 10$ and the promotion did not apply. See screenshot below:

Is it possible to apply the promotion in this situation?


texts:
after installing magento 2.2.2  theme my front-end and admin panel is not loading properly! how can i solve this?
enter image description here


texts: How to add one file with classes third party library in to Magento 2?

texts:
I have a single PHP file with some classes as a library. For example:

<?php

class addShipment
{
    public $packages; // przesylkaType
    public $id; // int
}

class addShipmentResponse
{
    public $retval; // addShipmentResponseItemType
}

class packageType
{
    public $guid;
    public $packageGuid;
    public $desc;
}

I think it would be good to add it in lib/internal folder and also I was thinking to put it in composer.json file like this:

"classmap": [
    "lib/internal/PathToFile/ApiClasses.php"
]

But I don't know if I should do it in module composer.json file or root one?

Any help would be appreciated.


texts:
My website ( www.librariamaranatha.ro ) is overloading server. It is working for 5 minutes then it is down for another 5 minutes and so on... The admin page is blank.

I have installed SUPEE 1533, SUPEE 5344, SUPEE 5994 but the problem is not fixed.

Do you have any idea what the problem is?

Thank you!


texts: Magento 2 catalog search full text reindex problem

texts:
I'm facing strange issue in my website. The products are not getting appeared if I reindex only flat and product related reindex. It requires catalogsearch_fulltext reindex. If I dont do catalog search full text reindex products are not getting appeared in frontend.

I'm having 3 stores in my website. So it takes almost 8 hours per store to complete the full text reindex. So to bring one product in my website I have to wait for 24 hours.

How can I resolve this issue? How to bring the product without reindexing catalog search fulltext?

FYI: I'm using elastic search, Magento EE v2.1.7


texts: CatalogSearch Layered Navigation on custom category page

texts:
I extended Mage_CatalogSearch_Helper_Data into my own class and am using it to retrieve a collection of products that have specific manufacturer part numbers. I then display the matching products on a custom category page.

I want to now add the catalog search layered navigation to my custom category page, so I extended the Mage_CatalogSearch_Model_Layer and Mage_CatalogSearch_Block_Layerclasses. I overwrote Mage_CatalogSearch_Model_Layer's getProductCollection method to get the collection created by my helper file.

How do I now include this block in my custom category template?


texts: Magento 2 How to override vendor/magento/magento2-base/lib/web/css/source/lib/_navigation.less?

texts: How Can I override vendor/magento/magento2-base/lib/web/css/source/lib/_navigation.less file in my custom theme ?


texts: This page isn’t working hotandbold.com redirected you too many times

texts:
My Magento Backend URL is not working and fronted is working Properly.
Backend Url:- http://hotandbold.com/staging/admin_jewellery/
Fronted Url:- http://hotandbold.com/staging/

Can You suggest me, how can we resolve it


texts: How to override a controller using Plugin?

texts:
I want to override abstact class controller Magento\Sales\Controller\AbstractController\Reorder.php using Plugin.
How can I do that?
di.xml
<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Sales\Controller\AbstractController\Reorder">
        <plugin name="testing_reorder"
                type="testing\ReorderButton\Plugin\Magento\Sales\Controller\AbstractController\ReorderPlugin"/>
    </type>
</config>

but I am so new to Magento and looking at documents, I am still confused.
This is the reorder.php, I just want to remove a couple lines from this php file which I have marked/commented on below code.
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

namespace Magento\Sales\Controller\AbstractController;

use Magento\Framework\App\Action;
use Magento\Framework\Registry;
use Magento\Framework\App\Action\HttpPostActionInterface;

/**
 * Abstract class for controllers Reorder(Customer) and Reorder(Guest)
 *
 * @package Magento\Sales\Controller\AbstractController
 */
abstract class Reorder extends Action\Action implements HttpPostActionInterface
{
    /**
     * @var \Magento\Sales\Controller\AbstractController\OrderLoaderInterface
     */
    protected $orderLoader;

    /**
     * @var Registry
     */
    protected $_coreRegistry;

    /**
     * @param Action\Context $context
     * @param OrderLoaderInterface $orderLoader
     * @param Registry $registry
     */
    public function __construct(
        Action\Context $context,
        OrderLoaderInterface $orderLoader,
        Registry $registry
    ) {
        $this->orderLoader = $orderLoader;
        $this->_coreRegistry = $registry;
        parent::__construct($context);
    }

    /**
     * Action for reorder
     *
     * @return \Magento\Framework\Controller\ResultInterface
     */
    public function execute()
    {
        $result = $this->orderLoader->load($this->_request);
        if ($result instanceof \Magento\Framework\Controller\ResultInterface) {
            return $result;
        }
        $order = $this->_coreRegistry->registry('current_order');
        /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
        $resultRedirect = $this->resultRedirectFactory->create();

        /* @var $cart \Magento\Checkout\Model\Cart */
        $cart = $this->_objectManager->get(\Magento\Checkout\Model\Cart::class);
        $items = $order->getItemsCollection();

        foreach ($items as $item) {
            try {
                $cart->addOrderItem($item);
            } catch (\Magento\Framework\Exception\LocalizedException $e) {
                //TO REMOVEEEEE
                if ($this->_objectManager->get(\Magento\Checkout\Model\Session::class)->getUseNotice(true)) {
                    $this->messageManager->addNoticeMessage($e->getMessage());
                } else {
                    $this->messageManager->addErrorMessage($e->getMessage());
                }
                return $resultRedirect->setPath('*/*/history');
                //END REMOVEEEE
            } catch (\Exception $e) {
                $this->messageManager->addExceptionMessage(
                    $e,
                    __('We can\'t add this item to your shopping cart right now.')
                );
                return $resultRedirect->setPath('checkout/cart');
            }
        }

        $cart->save();
        return $resultRedirect->setPath('checkout/cart');
    }
}


texts: Magento 2.1.1 when editing catalog product it keeps loading

texts:
I'm having problem with the store. built with magento 2.1.1, When I edit catalog product in the site, It will not display the required data instead it keeps loading.

Below is the screenshots for your review.

also this is the error in the console.

Thank you,
MazeStricks


texts: how to make module recently view product on every user and located this module to admin page


texts:
How to enable middlename in registration form in magento 2.2.4?
Also when can i find customer attributes in Magento2.2.4 Admin. How to make customer attributes visible?


texts: How to get cart item id using product id in magento2

texts:
I want to get cart item id using product id. For example, my product id is 600 and item id is 250.

using product id , want to get cart item id.

How to get it ?

please help me..


texts: stop filter block from moving to state block on selecting any filter option

texts: i am not able to keep the filter on page as i select any one from them. On selecting any filter it moves to the state Block. So, what do i do to keep it from moving to the state block?


texts:
Got a php error, Allowed memory size of 536870912 bytes exhausted.
It is quite strange, because I created a php info file to check the settings.

The setting of the server is memory_limit 12288M (server got enough free RAM).

What am I missing? Is there a other setting that is set to the 512MB?

Error:

PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 53248 bytes) in /lib/Varien/Image/Adapter/Gd2.php on line 74


texts: Magento 2: How to get additional attribute in a separate column while Export products?

texts:
I want to get an additional attribute in a separate column while Export products.

Please help.


texts: How to auto update Subtotal, Total in cart when I update product qty?

texts: As when I change product qty in shopping cart,  total and subtotal value must change without clicking on Update Shoping item button


texts: How to update magento 2.0.2 to 2.1.0 with composer?

texts:
In magento 2.0.5 i tried update new version with.

composer require magento/product-community-edition 2.1.0 --no-update
composer update
rm -rf var/di var/generation
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento indexer:reindex

When i run line composer update get problem

this file composer.json

"name": "magento/magento2ce",
 "description": "Magento 2 (Community Edition)",
 "type": "project",
 "version": "2.0.2",
...
"require": { ...
"magento/product-community-edition": "2.1.0"
...


texts: Magento2.3 - How to set text column table value default is None using declarative schema?

texts:
I want to create a custom table using db_schema.xml like that contains column like this:

I tried to do it like this:

<column name="description" nullable="false" default="null" xsi:type="text"/>

but always got an error like this:

The XML in file "/var/www/M2/app/code/Vendor/Module/etc/db_schema.xml" is invalid:
Element 'column', attribute 'default': The attribute 'default' is not allowed.


texts: failed applying security patch SUPEE-11155 - Hunk #1 FAILED

texts:
patching file app/Mage.php
Hunk #1 FAILED at 813.
1 out of 1 hunk FAILED -- saving rejects to file app/Mage.php.rej

Can anyone point me in the right direction as to why I've a bunch of messages that say Hunk #1 FAILED
I run PHP 7.2 with Magento 1.9.3.1 and I'm applying the correct patch.


texts: Is It Possible To Create My Own Shortcode

texts:
I'm building a module. I want to be able to use a shortcode (template directive) in my CMS static blocks, such as the following:

{{store url=""}}

I want to call my own module's frontpage blocks using this method. Is this even possible? Google has turned up nothing about writing my own.


texts: Clicking on certain extension links in admin menu causes 302 redirect to dashboard

texts:
Whenever I click on certain extension links in Magento admin the page redirects to the Magento dashboard. Nothing is showing up in the system or exception logs.

I cannot access the extension pages or config. It's happening for M2E Pro and some other plugins.


texts: How to reload to payment step in Onepage checkout

texts: How can I reload Onepage Checkout to specific step specifically payment step when payment is not approved


texts: Magento2: set product names in same page

texts:
Two languages (Store View) were added in addition to English.
To speed up the process rather than the addition of any translation I enter each language separately..
I want to add product names in this way (see attached image).
If there Magento-Extensions it can solved?


texts: Custom Product Type product not display in category page?

texts:
Custom Product Type product not display in category page. any have idea for the same?
Thank you


texts: Hide virtual products on backend listing

texts:
I have a lot of configurable product in my backend listing, I'd like to know how can I hide all my virtual product ? (I want to show only configurable products on my backend).

Can I do this from the backoffice or should I hide them programmaticaly ? And how ?


texts:
I want to install patch SUPEE-11086 in the Magento 1.9.3.7. I am not sure it will work or not because it is available with the new version
PATCH_SUPEE-11086_CE_1.9.3.10_v1.sh (0.06 MB). Please suggest

Thanks


texts:
I am trying to change position of attributes.I have created an attribute named custom tab , I am trying to set this attribute in top of product name.But by default this attribute show under More information Tab.

<referenceBlock name="product.info.details">
    <block class="Magento\Catalog\Block\Product\View" name="custom.tab" as="custom" template="product/view/attributes.phtml" group="detailed_info"  before ="product.info.sku">
       <arguments>
          <argument translate="true" name="title" xsi:type="string">Custom Tab</argument>
       </arguments>
    </block>
</referenceBlock>


texts: Magento2 API Filtering Multiple categories

texts:
In Magento2 API, how would I filter by multiple categories?

  V1/products?searchCriteria[filterGroups][0][filters][0][field]=name&searchCriteria[filterGroups][0][filters][0][value]=%test%&searchCriteria[filterGroups][0][filters][0][conditionType]=like&searchCriteria[sortOrders][0][field]=created_at&searchCriteria[sortOrders][0][direction]=DESC&searchCriteria[filterGroups][1][filters][1][field]=category_id&searchCriteria[filterGroups][1][filters][1][value]=105,106,107&searchCriteria[filterGroups][1][filters][1][conditionType]=eq&searchCriteria[pageSize]=8&searchCriteria[currentPage]=1

When the category ids are 105,106,107 I am getting results, but if the category ids are 107,106,105 I am getting empty items.

How can I search for different categories in Magento2 API?


texts: Magmi blank page while importing products

texts:
I am using Magmi on a regular basis to mass import products.

Unfortunately, every 100-like products the application freezes as shown on the following image:

The "solution" I found so far is to cancel the importation and re-running it using the option "create new items only, skip existing ones" so that it skips the ones that have been added in the past.

Can someone explain me what is happening? Is there any way to make it run with no interruption?


texts: $item->isNominal() will check if an item is Nominal, how do we check if it is not

texts: If this function $item->isNominal() will check if an item is Nominal (recurring) when adding it to the quote(cart), how do we do the opposite and check if an item is Non Recurring (or Normal)?


texts: How to auto play YouTube videos for products?

texts:
I've uploaded a youtube video to a product in Magento 2.
It's displaying fine, but I want to autoplay that product video in front.


texts: How can I add payment_id and txn_id to Magento Grid?

texts:
I am trying to add payment_id and txn_id from the sales_payment_transaction table to a custom Grid.php module in Magento admin.

I have been able to add the columns which DOES display the data but if I try to search the filter I get an error...

"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_id' in 'where clause'";

Is there a way to make these columns filterable?

Here's my code:

$collection->getSelect()->joinLeft('sales_payment_transaction',
    'sales_payment_transaction.transaction_id = main_table.entity_id',array('payment_id', 'txn_id'));

And here are the columns

$this->addColumn('payment_id', array(
    'header'        => Mage::helper('sales')->__('Payment ID'),
    'align'         => 'right',
    'index'         => 'payment_id',
    'filter_index' => 'payment_id',
));

$this->addColumn('txn_id', array(
    'header'        => Mage::helper('sales')->__('Txn ID'),
    'align'         => 'right',
    'index'         => 'txn_id',
    'filter_index' => 'txn_id',
));

If anyone knows the solution I'd be grateful...


texts: Magento2: 500 Internal Server Error just in admin url when changed default language

texts: when I go to the admin url like (mydomain.com/admin) I get 500 Internal Server Error but it just happened when I switch default language to something other than  en_US when I change it to en_US everything is good and no error appended.


texts:
Is there a "cheat sheet" list of every single fields available in the magento 2 database with their specific definition?
I only found a list of the most common one for cutomers, order, and product.


texts: Magento2 Need to filter grid when value is entered in search box, the column of the data is from another table

texts:
I have added 4 columns in the grid as displayed in below screenshot.

For displaying for eg. Recipient Email column I added following code in XML & it's renderer PHP file. (Code is added below)

app/code/Company/Module/view/adminhtml/layout/adminhtml_giftcardaccount_block.xml

<block class="Magento\Backend\Block\Widget\Grid\Column">
                    <arguments>
                        <argument name="header" xsi:type="string" translate="true">Recipient Email</argument>
                        <argument name="index" xsi:type="string">recipient_email</argument>
                        <argument name="renderer" xsi:type="string">Company\Module\Block\Adminhtml\Widget\Grid\Column\Renderer\Recipientemail</argument>
                        <argument name="sortable" xsi:type="boolean">false</argument>
                    </arguments>
                </block>

app/code/Company/Module//Block/Adminhtml/Widget/Grid/Column/Renderer/Recipientemail.php

<?php
namespace Company\Module\Block\Adminhtml\Widget\Grid\Column\Renderer;
class Recipientemail extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
{
    protected $_storeManager;

    public function __construct(
        \Magento\Backend\Block\Context $context,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Sales\Model\Order\Item $orderItem,
        array $data = []
    ) {
        parent::__construct($context, $data);
        $this->_storeManager = $storeManager;
        $this->orderitem =  $orderItem;
    }

    public function render(\Magento\Framework\DataObject $row)
    {
        $code = $row->getCode();
        $result = array();
        $salesorderitem =  $this->orderitem->getCollection()
                          ->addFieldToFilter('product_options', array('like' => '%'.$code.'%'));

        if(!empty($salesorderitem))
        {
            foreach($salesorderitem as $orderdata){
                $productOptions = $orderdata->getProductOptions();
                $recipientemail = $productOptions['giftcard_recipient_email'];
                if(!empty($recipientemail)){
                return $recipientemail;
                }else{
                    return '-';
                }
            }
        }else{
               return '-';
        }

    }

Main table of grid is - magento_giftcardaccount

Recipientemail table is - product_options

{"info_buyRequest":{"uenc":"aHR0cDovLzE5Mi4xNjguMS4xODQvZGcvZHJ1bW1vbmQtZ29sZi1lLWdpZnQtY2FyZC5odG1s","product":"76450","selected_configurable_option":"","related_product":"","giftcard_amount":"5","giftcard_sender_name":"test","giftcard_sender_email":"testmscgoriteeps@gmail.com","giftcard_recipient_name":"test22","giftcard_recipient_email":"arjun.cmarix@gmail.com","giftcard_message":"test test gift","qty":"1"},"giftcard_sender_name":"test","giftcard_sender_email":"testmscgoriteeps@gmail.com","giftcard_recipient_name":"test22","giftcard_recipient_email":"arjun.cmarix@gmail.com","giftcard_message":"test test gift","giftcard_lifetime":null,"giftcard_is_redeemable":0,"giftcard_email_template":null,"giftcard_type":"0","email_sent":0,"giftcard_created_codes":["HQE9EMUNTA6N"]}

My issue is the filter is not working. When I enter email in the search text field of grid it keeps on spinning for some time & grid is loaded as it is without filter.

It would be really appreciable if someone can guide me on how to filter this search text.


texts: How to use dropbox img link in csv for product import magento 1.9

texts: I want to use Dropbox img link in csv for product import magento 1.9.


texts: Parse magento-type parameter value string

texts:
Magento url structure is

/controller/action/param1/param1value/param2/param2value/

Magento decodes this for you, so in the controller you can call

$this->getRequest()->getParam('param1')

to get the value of param1.

Now, I have string of type param1/param1value/param2/param2value
and I would need to get the parameter value pairs out of it.

Can I utilise Magento classes/functions to implement this? E.g. have the request class do the parsing for me. I tried to find this in Magento codebase (it has to be there somewhere, right), but was not able to locate it.

I have Magento 1.


texts: Magento page loading taking too much time

texts:
I have magento website. There are no any users (max 2-3 at time).

Our server is: CPU: 2000MHz RAM: 2048Mb HDD: 50000Mb.

I installed ZendServerCE (apc + memcached + Zend Optimizer + Zend Data Cache).
I turned memcached off, because website loaded much worst. I set flat type structure, reindexed and cached data in admin console.

So I have apc + Zend Optimizer + Zend Data Cache.

The first problem is I checked runtime how does dispatch work. start_session() calling takes about 500-700ms. Seems its not good result. Why so long, I don't know.
I've read this one: http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_key_buffer_size and figured out optimal options for my server.

Per hour:

Key_read_requests = 8887
Key_reads         = 252
Key_write_request = 187
Key_writes        = 146

You see that 252/8887 > 0.01, but not too much. It's optimal value I have ever get. Other results started from > 6.

Here is my.cnf:

key_buffer              = 48M
myisam_sort_buffer      = 2M
sort_buffer             = 2M
read_buffer_size        = 2M
join_buffer             = 2M
read_rnd_buffer         = 2M
max_allowed_packet      = 128M
thread_stack            = 192K
thread_cache_size       = 16
query_cache_type        = 1
myisam-recover         = BACKUP
max_connections        = 50
table_cache            = 256
#thread_concurrency     = 10
query_cache_limit       = 8M
query_cache_size        = 98M

3. Memcached for some reason wasn't good. I turned it off. But zend data cache and zend optimizer still work.

4 . APC seems correct. To load controller action takes 3-4seconds for the first time (I set die() there to check it) and for the first time it take 1 - 1.3 seconds.

5 . After several minutes I've restarted mysql I got good result. Pages were loading from 1.5 to 2.5 seconds. But now (after several hours) it takes 6-10 seconds. I cannot find the reason.

So do you see some incorrect configuration here? May be my server doesn't suitable for magento?

UPDATE 1:
about 600 categories and 1000 products today
and about 20000 categories (for different webstores) and 1500-3000 products in the future.

There are not many attributes.

UPDATE 2
I've nocied that ssh console works too slow. I rebooted server and now it works fast. it means  I have a problem with RAM. There are not enough space.

It's initial status whiout apache:

             total       used       free     shared    buffers     cached
Mem:          2048        600       1447

UPDATE 3
I got it. Now it is loaded for 0.5-1.5 sec

Here is configuration:
mysql

[mysqld]
key_buffer_size         = 256M
tmp_table_size      = 32M
max_heap_table_size     = 32M
myisam_sort_buffer      = 4M
sort_buffer             = 4M
read_buffer_size        = 4M
join_buffer     = 4M
read_rnd_buffer     = 4M
max_allowed_packet  = 64M
thread_stack        = 192K
thread_cache_size       = 16
query_cache_type        = 1
myisam-recover          = BACKUP
max_connections         = 20
table_cache             = 1024
innodb_buffer_pool_size = 128M
query_cache_limit   = 24M
query_cache_size        = 256M

php

[apc]
apc.stat=1
apc.enabled=1
apc.optimization=0
apc.cache_by_default=1
apc.shm_segments=10
apc.shm_size=256M
apc.ttl=0
apc.user_ttl=0
apc.num_files_hint=10000
;apc.mmap_file_mask="/tmp/apc"
apc.max_file_size=5M
apc.enable_cli=1
apc.mmap_file_mask="/tmp/apc.XXXXXX"
apc.slam_defense=0
apc.user_entries_hint=10000

All works perfect, but one question remains.
APC shows me this statisic:

Why hits so small? Any ideas?


texts: Magento 2.4.0 versus 2.3.5 regarding CentOS 6 vs CentOS 7 and the version of Elasticsearch

texts:
We currently run our Magento stores on 1.9.4. It is time for us to upgrade but our hosting company tells us we are not able to install Magento 2.4.0 due to the fact that it requires a CentOS 7 Upgrade (we currently only have CentOS 6 running) saying:

"...versions of Elasticsearch higher than 6.X cannot run on the same
due to the highest available version of glibc on CentOS 6. With the
above in mind, we recommend first upgrading your server to a CentOS 7
and then we can install Elasticsearch version 7.X on the same."

There are 2 big questions here:

If we upgrade to CentOS 7 - are we going to be able to run Magento 1.9.4 and 2.4.0 side by side given the different requirments?

and

Would we be able to install and run Magento 2.3.5 on CentOS 6? and is this preferable over Magento 2.4.0? We are not likely to upgrade Magento for a while so maybe it would be best to start with the highest version currently available? (2.4.0)


texts: Magento 2 - Use Redis in Full Page Cache

texts:
I check similar question but I am unable to find command to add Redis server for full page cache.

The command to add Redis for backend cache is following:

php bin/magento setup:config:set --cache-backend=redis --cache-backend-redis-server=xxxxxxxx --cache-backend-redis-db=0

I want to use Redis for Full Page Cache what would be the command to do this?


texts: Theme layout not showing on products page

texts:
i installed pixtron theme on magento 2, on frontend at products display page the layout of theme is not displaying up properly.

any guidance or help highly appreciated !  ( herewith images attached )


texts:
Can we add same observer instance with different events , like

<event name="catalog_product_save_after">
    <observer name="catalog_product_save_after_handler" instance="Vendor\Module\Observer\SyncObserver"/>
</event>
<event name="catalog_product_delete_after">
    <observer name="catalog_product_delete_after_handler" instance="Vendor\Module\Observer\SyncObserver"/>
</event>
<event name="sales_order_payment_place_end">
    <observer name="sales_order_payment_place_end_handler" instance="Vendor\Module\Observer\SyncObserver"/>
</event>

SyncObserver-> a single observer class with 3 different methods handled by different events?

Can this be done?


texts: How to validate a javascript calendar in magento 1.7

texts:
I am using javascript calender in my magento site.I am using this calendar for date of delivery.

First when user selects previous date from current date then it
should be disabled.
Is there any way to set the delivery date as +4 day, that means on
the calendar, if the client buy today it can only choose the
delivery date after 4 days from the calendar

Its an urgent requirement. Please suggest me some solution.


texts: Magento 1.8 can't login, no error displayed

texts:
I got problem for admin login for weeks, I tried all solution I found, none of them works. Could anybody help me out from the issue please?

The solution I tried :

add formkey
commment cookie setting in Varien.php
clear cookie

The solution works, but only works for the first login is:

delete content under /var/cache and /var/session

After that, I can login once. Once logout, can't login again.

Thanks a lot if anyone can help.


texts: Display products from specific category on CMS page

texts:
I'm trying to set up a category products list on my homepage following this tutorial.

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="27" template="catalog/product/list.phtml"}}

The above code doesn't output anything when I put it inside "Content" of my CMS home page. I'm using version 1.9.2. What could be the problem?


texts: Total Due is not the same as the Grand Total order magento 1 order

texts: I use Magento 1 and it rarely happens that an order has a total due different from the grand total. In my payment gateway the customer was charged the full amount.


texts: Enable / Disable Add to Cart button programmatically

texts:
I have added one text box for the zip codes on a products detail page.
I want to keep "Add to cart" button disabled in starting. After any zip code is entered in the text box then only "Add To cart" button should get enabled.
I want to know that how to make "Add to cart" button disabled in starting and how to make it enable via code.


texts:
Recently i was trying to extend the Out Of Stock product alert functionality.
For this i planned to use the cron Job, but i was un successful , i followed some links but nothing happens.

Is any one knows how magento performs its routine work. Like re-indexing, catalog price update, as i found that even no cron job is schedule at cpanel also.

-->Email (Transactional and any other email sent from the store.)
-->Catalog Price Rules
-->Newsletters
-->Customer Alerts and Notifications
-->Log Cleanup

Then how it works , for example , if i subscribe for out of stock feature( default) , it send me mail once product is back in stock.

Even in cron_schedule table last schedule is not up-to-date.


texts:
SUPEE-10975 has been released, it would be great to know if anyone runs into any issues while trying to apply this, will this conflict with the most recent patch that adds 7.2 support?

So far these are the changed files I can see

app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit.php
app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php
app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php
app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php
app/code/core/Mage/Adminhtml/controllers/SitemapController.php
app/code/core/Mage/Adminhtml/controllers/System/BackupController.php
app/code/core/Mage/Captcha/Model/Observer.php
app/code/core/Mage/Captcha/Model/Zend.php
app/code/core/Mage/Captcha/etc/config.xml
app/code/core/Mage/Catalog/Model/Api2/Product/Image/Rest/Admin/V1.php
app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php
app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php
app/code/core/Mage/Core/etc/config.xml
app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.7.1.1-1.6.0.7.1.2.php
app/code/core/Mage/Dataflow/Model/Convert/Container/Abstract.php
app/code/core/Mage/ImportExport/Model/Import/Entity/Customer.php
app/code/core/Mage/ImportExport/Model/Import/Entity/Customer/Address.php
app/code/core/Mage/Payment/etc/config.xml
app/code/core/Mage/Payment/etc/system.xml
app/code/core/Mage/Payment/sql/payment_setup/upgrade-1.6.0.0.1.1-1.6.0.0.1.2.php
app/code/core/Mage/Sendfriend/Block/Send.php
app/code/core/Mage/Wishlist/controllers/IndexController.php
app/code/core/Zend/Controller/Request/Http.php
app/design/adminhtml/default/default/template/cms/browser/content/files.phtml
app/design/frontend/base/default/layout/captcha.xml
app/design/frontend/base/default/template/wishlist/sharing.phtml
app/design/frontend/rwd/default/layout/page.xml
app/design/frontend/rwd/default/template/sendfriend/send.phtml
app/etc/modules/Mage_All.xml
app/etc/modules/Mage_Captcha.xml
app/locale/en_US/Mage_Wishlist.csv
js/lib/jquery/jquery-1.12.0.js
js/lib/jquery/jquery-1.12.0.min.js
js/lib/jquery/jquery-1.12.0.min.map
js/lib/jquery/jquery-1.12.1.js
js/lib/jquery/jquery-1.12.1.min.js
js/lib/jquery/jquery-1.12.1.min.map

Has anyone ran into any issues with these changes?


texts: Attempt to add bootstrap.min.js file results in "Unable to resolve the source file" error

texts:
I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank.

I added the latest version of Bootstrap 3 to my theme (v3.3.7). The path to bootstrap.min.js is:

  app/design/frontend/{Vendor}/{Theme}/Magento_Theme/web/js/bootstrap.min.js

In

  app/design/frontend/{Vendor}/{Theme}/Magento_Theme/layout/default_head_blocks.xml

I have added <script src="../Magento_Theme/web/js/bootstrap.min.js" />.

Yet I get the error: Unable to resolve the source file for 'frontend/{Vendor}/{Theme}/Magento_Theme/web/js/bootstrap.min.js' in the console.

Where is my mistake?


texts: Authorize.Net issue with Magento 2.3.1 Invalid Gateway Credentials

texts:
I'm running Magento 2.3.1 with both the old authorize.net hash method and the new signature key method.  I keep getting an error message stating "invalid gateway credentials" whenever I place a transaction.  It will work with old hash method but not with new method. Here is a screen shot of the error I'm receiving:

I also noticed the the POST message for my payment information is returning a 400: I blocked out my URL below with X's:

  VM16:1 POST
  https://www.XXXXXXXXXXXXXXXXX.com/rest/lbc_retail_en/V1/guest-carts/iWpMSWFKqJEakmAOAKFXreAPjfWNrT1O/payment-information
  400 (anonymous)   @   VM16:1 send @   jquery.min.js:652
  ajax  @   jquery.min.js:621 post  @   storage.min.js:1
  (anonymous)   @   place-order.min.js:1 (anonymous)    @   place-order.min.js:2
  _super    @   wrapper.min.js:2 (anonymous)    @   place-order-mixin.min.js:1 (anonymous)  @   wrapper.min.js:2
  _super    @   wrapper.min.js:2 (anonymous)    @   place-order-mixins.min.js:1 (anonymous) @   wrapper.min.js:2
  getPlaceOrderDeferredObject   @   default.min.js:5
  placeOrder    @   default.min.js:4
  (anonymous)   @   authorizenet-accept.min.js:3 fire   @   jquery.min.js:212
  fireWith  @   jquery.min.js:218 deferred.   @   jquery.min.js:220
  (anonymous)   @   acceptjs-client.min.js:2
  (anonymous)   @   validator-handler.min.js:2 fire @   jquery.min.js:212
  add   @   jquery.min.js:215 validate  @   validator-handler.min.js:2
  (anonymous)   @   acceptjs-client.min.js:2 u  @   AcceptCore.js:1
  s @   AcceptCore.js:1 (anonymous) @   AcceptCore.js:1 setTimeout (async)
  c.onload  @   AcceptCore.js:1 load (async)         t  @   AcceptCore.js:1
  a.dispatchData.a.dispatchData @   AcceptCore.js:1
  _createTokens @   acceptjs-client.min.js:2 (anonymous)    @   acceptjs-client.min.js:1 fire   @   jquery.min.js:212
  fireWith  @   jquery.min.js:218 deferred.   @   jquery.min.js:220
  (anonymous)   @   acceptjs-factory.min.js:2 dispatch  @   jquery.min.js:338
  elemData.handle   @   jquery.min.js:311 v @   AcceptCore.js:1
  w @   AcceptCore.js:1 (anonymous) @   AcceptCore.js:1
  (anonymous)   @   AcceptCore.js:1

Any ideas?

Thanks!


texts: update customer data with API no such entity customerID

texts:
I tried to update customer data with magento customer API like code below.

<?php
public function cek()
{
    $jsonObject = json_decode(file_get_contents("http://xxx.xxxxxx.com:50001/Services/Magento.asmx/getCustomerList"));
    $userData = array("username" => "xxxxxx", "password" => "xxxxxx");
    $ch = curl_init("http://xxx.xxxxxxx.com/index.php/rest/V1/integration/admin/token");
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($userData));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Content-Lenght: " . strlen(json_encode($userData))));

    $token = curl_exec($ch);
    $cek = [];
    $simpan = [];

    for ($i=0; $i< count($jsonObject); $i++) {
        if ($jsonObject[$i]->email) {
          $cek[] = $jsonObject[$i];
        }
    }

    $allCustomers = $this->getCollection();

    foreach ($allCustomers as $eachCustomer) {
        $custPrefix = $eachCustomer->getPrefix();
        $custId = $eachCustomer->getId();

        for ($i=0; $i < count($cek); $i++) {
            if ($custPrefix == $cek[$i]->customerId) {
                $customerData = [
                    'customer' => [
                        'id' => (int)$custId,
                        "firstname" => $cek[$i]->firstName,
                        "lastname" => "Update",
                        "storeId" => 1,
                        "websiteId" => 1
                    ]
                ];

                $ch = curl_init("http://xxx.xxxxxxxxx.com/index.php/rest/V1/customers/10");
                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($customerData));
                curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));

                $result = curl_exec($ch);
                $result = json_decode($result, 1);
            }
        }
    }

    return $result;
}

public function getCollection()
{
    //Get customer collection
    return $this->_customers->getCollection();
}

?>

But when i tried to var_dump the result is array(2) { ["message"]=> string(44) "No such entity with %fieldName = %fieldValue" ["parameters"]=> array(2) { ["fieldName"]=> string(10) "customerId" ["fieldValue"]=> int(10) } }

Is there something i do wrong?


texts: How to add my custom phtml to product page magento 2?

texts:
In magento 2,

I want to add my custom phtml to product view page how can i add that

i want to add that phtml as tab like review or Description.

i am trying this code:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="3columns"     xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="product.info.details">
        <block class="Example\Examples\Block\Question" name="example.tab" template="Example_Examples::success.phtml">
        </block>
    </referenceContainer>
</body>
</page>

its give 404 error


texts: I have followed the videos on setting up configurable items but the items do not appear on my site?

texts:
I am building an online wine shop and it is coming along very nicely. enter link description here

I want to be able to have one wine name example Penfolds Cab Sav and then be able to have different years and then different prices for those years. (like someone might have different sizes for a tv that was the same model and hence different prices)

I have searched and found various solutions for configurable products. I created an attribute year but each time I try and create a new product it does not seem to work for me. I have tried it several times and the products don't display on the site. Does anyone know a good tutorial as the ones i have followed have not resulted in me getting the right result.

Or does anyone know how to do it and can advise me. I have attached a screen shot of my products list that shows the products I have created but they are not appearing on the site.

I followed all 4 videos step by step. I also note the price in the configurable items is using the price from both items the main one and the new one. I also note that the main item does not allow me to put a quantity so would that be stopping it from showing up on the site?


texts: I need to edit Magento header by adding an icon and small image telling visitors that we offer Cash-on-Delivery. It should be somewhere around the search bar in the header.


texts:
Just downloaded the latest Magento Community Edition v1.9.1.1 and the first thing that popped up when I logged into the admin was that there were important security patches. I installed SUPEE-5994 as instructed because it was released after v1.9.1.1.

Is it safe to assume that the earlier patches are already incorporated with the latest release? If not, is there a way to identify which patches need to be applied on a local development server with no public URL?

I'm confused because several patches are marked as being for version 1.9.x.


texts: Magento 1.9.0.1 SOAP import products with additional_attributes

texts:
I'm busy to make an import script that can import over 11.000 products from one feed with SOAP V2

Now i already made the import for the category's and subcategory's working like a charm with SOAP

After that i had made a part to add simple products into the shop what's working fine. The products are getting imported, so thats ok, but...

After that i need to import 15 additional_attributes that i already have made in the backoffice as attrubute and putted them in a map Extra.

Now i'm trying to expand my script to add the additional_attributes, but everything what i'm trying is not working. Every tip on the internet i have tryed didn;t worked out.

For the rest is the information verry poor on the website of Magento self how to make the correct array for the additional_attributes.

I have tryed about 6 different arrays to make this work, all the arrays were standing in the internet, but nothing is working. I'm now working about 20 hours on this and its nerving me out!

Is there a genious person that can help me through this problem? Or someone whants to share the golden tip how to do this...

$result = $client->catalogProductCreate($session, 'simple', $attribute_set_id, $artnr, array(
        'categories' => array($aProdCatId['entity_id']),
        'websites' => array(1),
        'name' => $titel,
        'description' => $descr,
        'short_description' => $descr,
        'weight' => $weight,
        'status' => '1',
        'url_key' => $title,
        'url_path' => $title,
        'visibility' => '4',
        'price' => $adviceprice,
        'tax_class_id' => 1,
        'meta_title' => $title,
        'meta_keyword' => $title,
        'meta_description' => $title,
        'additional_attributes' => array(array('power' => $power))
    ));


texts: How to create a Child Theme in Magento 2

texts:
I want to modify certain aspects of the out-of-the-box Luma theme but I would like to do it by preserving the original file(s) and also ensuring that whenever I update Magento I preserve my changes as well.

I want to do this by way of a Child Theme.

Does Magento 2 support child themes and, if so, how do I structure my directory path to make this happen?


texts: Freeshipping with cart rule (subtotal after discount)

texts:
I want to offer free shipping on subtotal but after discount is applied. I have added a new price rule called grand total and using this as the condition in price rules but this does not work for me. Here is my code. Wondering where is my mistake.

<?php

class MY_SalesRule_Model_Rule_Condition_Address extends Mage_SalesRule_Model_Rule_Condition_Address {

    public function loadAttributeOptions()
    {
        //added the base_grandtotal
        $attributes = array(
            'base_subtotal' => Mage::helper('salesrule')->__('Subtotal'),
            'base_grandtotal' => Mage::helper('salesrule')->__('Grandtotal'),
            'total_qty' => Mage::helper('salesrule')->__('Total Items Quantity'),
            'weight' => Mage::helper('salesrule')->__('Total Weight'),
            'payment_method' => Mage::helper('salesrule')->__('Payment Method'),
            'shipping_method' => Mage::helper('salesrule')->__('Shipping Method'),
            'postcode' => Mage::helper('salesrule')->__('Shipping Postcode'),
            'region' => Mage::helper('salesrule')->__('Shipping Region'),
            'region_id' => Mage::helper('salesrule')->__('Shipping State/Province'),
            'country_id' => Mage::helper('salesrule')->__('Shipping Country'),
        );

        $this->setAttributeOption($attributes);

        return $this;
    }

    public function getInputType()
    {
        switch ($this->getAttribute()) {
            case 'base_subtotal': case 'base_grandtotal': case 'weight': case 'total_qty':
            return 'numeric';

            case 'shipping_method': case 'payment_method': case 'country_id': case 'region_id':
            return 'select';
        }
        return 'string';
    }

    public function validate(Varien_Object $object)
    {
        $address = $object;
        if (!$address instanceof Mage_Sales_Model_Quote_Address) {
            if ($object->getQuote()->isVirtual()) {
                $address = $object->getQuote()->getBillingAddress();
            }
            else {
                $address = $object->getQuote()->getShippingAddress();
            }
        }

        if ('payment_method' == $this->getAttribute() && ! $address->hasPaymentMethod()) {
            $address->setPaymentMethod($object->getQuote()->getPayment()->getMethod());
        }

        //The below is added for caculating the grandtotal
        $quote = Mage::getModel('checkout/session')->getQuote();
        $quoteData= $quote->getData();
        if( $quote && $quote->getData('base_grandtotal') ){
            $basegrandTotal = $quote->getData('base_grandtotal');
            if ('base_grandtotal' == $this->getAttribute() && ! $address->hasBaseGrandtotal()) {
                $address->setBaseGrandtotal($basegrandTotal);
            }
        }

        return parent::validate($address);
    }

}


texts:
I have magento 1.9.2.3. I have an order for which grand total is 0 and its status is complete. When I am going to create its credit memo, system didn't give an option to create a credit memo.

I just edit the order and give custom price 0 and create the order.

Can some one let me know how can I create a credit memo?

Thanks


texts: Magento2 Zoom icon top right of hero image clicks to display a popup with larger zoomed image

texts:
Magento2 How can I add Zoom icon top right of hero image clicks to display a popup with a larger zoomed image.
Is this possible via Default Magento2?


texts:
I'm setting up a pretty complex site with a lot of API handling. Now that site needs to have 1 installation and 2 websites on 2 domains. I'm not sure how this works with Magento.

What i have now

So have i created my 2 websites within Magento and i have adjusted each website to have a different base and secure url. Lets say domain 1 is domain1.com and domain2 is domain2.com.

I also have the 2 domains forwarded over A records to the same IP from the installation. So lets say the IP for example is 55.55.55.55 then i have both domains (domain1.com and domain2.com) set up to navigate to 55.55.55.55.

Now when i surf to this domain1.com i get to see domain1.com. When i surf to domain2.com (that i added later in the installation) it seems to still redirect to domain1.com

My question , how would one set this up?


texts: No 'Access-Control-Allow-Origin' header in jquery ajax in magento site

texts:
I had used jquery ajax in my magento website.it is working fine on the localhost but on live i am getting error as follows.

XMLHttpRequest cannot load https://www.abc.com/customer/ajax/cartpreviewdelete/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.abc.com' is therefore not allowed access.

my code for the ajax call is as follows.

$(".btn-remove2").click(function(){
    prod_id = $(this).attr("id");
    $.ajax({
        url: "<?php echo Mage::getUrl('customer/ajax/cartpreviewdelete'); ?>",
        type: "POST",
        data: {prod_id : prod_id},
        success: function(data){
            location.reload();
        }
    });
})


texts: How to override Select.php block file in magento2

texts:
How to override vendor/magento/module-catalog/Block/Product/View/Options/Type/Select.php file

I have followed below steps, but not working
Step1: Created di.xml

 <preference for="Magento\Catalog\Block\Product\View\Options\Type\Select" type="Vendor\Catalog\Block\Product\View\Options\Type\Select" />

Step2: created

app/code/Vendor/Catalog/Block/Product/View/Options/Type/Select.php

<?php

namespace Vendor\Catalog\Block\Product\View\Options\Type;

class Select extends \Magento\Catalog\Block\Product\View\Options\Type\Select
{

    public function getValuesHtml()
    {

    }
}


texts:
I am using Webkul's extension for multiple vendors and I want to make an REST API endpoint where a vendor will be able to confirm the payment on a specific order. Everything works well until I try to save the order with $order->save() and I get the following error:
{
    "message": "No such entity with %fieldName = %fieldValue",
    "parameters": {
        "fieldName": "orderId",
        "fieldValue": "2"
    }
}

When saving an order with class  Magento\Sales\Model\Order\Interceptor I keep getting the same error no matter what.
I get the token using /V1/integration/customer/token endpoint.
P.S. If I get the token as admin /V1/integration/admin/token, everything seems to work fine.
Any thoughts?


texts: Magento 2 REST API returns JSON in Chrome, but XML in Firefox

texts:
Today I've discovered a strange thing. When I create an XHR request in Chrome to the REST API, it returns JSON data.

However, the same request in Firefox returns XML data. If I open the URL directly in Chrome, it's XML as well.

I couldn't find anything about this in the REST documentation of Magento 2. So how can I set my XHR request the return always JSON?


texts: I want to create two different Url in Magento in order to be able to show different prices for the same product. eg: http://example.com/uk and http://example.com/de.


texts: Magento 2 - Get Invoice data using observer

texts:
I am trying to know if create shipment option is selected from admin while creating invoice from admin by creating an observer.
I have tried

sales_order_invoice_register
sales_order_invoice_save_after

events .
My observer is :

<?php

namespace Nmaespace\Module\Observer;

class Invoice implements \Magento\Framework\Event\ObserverInterface
{

/**
 * Execute observer.
 * @param \Magento\Framework\Event\Observer $observer
 * @return $this
 */
public function execute(\Magento\Framework\Event\Observer $observer)
{

    $invoice = $observer->getEvent()->getInvoice();
    $do_shipment = $invoice->getData('do_shipment');
echo $do_shipment;exit;

}

}

After all di compile and everything when i try to create an invoice i am getting empty value here .
Can someone please help me how check this.


texts: how to choose product type in order to have this kind of store

texts:
I want to compose final product for my food store:
a product named sandwish (that can be grouped,im not sure) with simple products : tomato , tuna ... My customer can remove tomato and choose mushroom (another simple product) the goal is to have one product at the end on cart page.