texts: Magento 2.2.2 custom observer attribute name not valid atomic type

texts:
I have a custom observer for admin admin_system_config_changed_section_{{$section_name}} the following are:

events.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="admin_system_config_changed_section_section_name">
    <observer name="custom_admin_system_config_change_section_name" instance="Vendor\Module\Observer\ConfigObserver"/>
</event>
</config>

Where section_name  in system.xml:

...<section id="section_name ...  and when loaded in the backend url:

.../admin/system_config/edit/section/section_name/...

Observer class:

namespace Vendor\Module\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Event\Observer as EventObserver;
use Psr\Log\LoggerInterface as Logger;

class ConfigObserver implements ObserverInterface
{
    /**
     * @var Logger
     */
    protected $logger;

    /**
     * @param Logger $logger
     */
    public function __construct(
        Logger $logger
    ) {
        $this->logger = $logger;
    }

    public function execute(EventObserver $observer)
    {

        //$this->logger->info($observer->getWebsite());
        //$this->logger->info($observer->getStore());
    }
}

When go load the backend url I get error:

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file .../htdocs/app/code/Vendor/Module/etc/adminhtml/events.xml:
Element 'event', attribute 'name': [facet 'pattern'] The value 'admin_system_config_changed_section_section_name' is not accepted by the pattern '[a-zA-Z_]+'.
Line: 3

Element 'event', attribute 'name': 'admin_system_config_changed_section_section_name' is not a valid value of the atomic type 'eventName'.
Line: 3

Element 'event', attribute 'name': Warning: No precomputed value available, the value was either invalid or something strange happend.
Line: 3

What seems to be the problem here? as far as I can see it's within naming convention [a-zA-Z_]+


texts: Add google analytics in admin order create magento 1.9

texts: I have used an extension for google analytics it works fine when the order is placed via frontend but i am not sure how to do it when admin creates an order because there is no success page in admin.


texts: Magento1.9.1 Spam newsletter subscriptions

texts:
How to block spam newsletter subscription?

I have added captcha and form key for newsletter subscription but still get spam subscription.

These subscriptions have unsubscribed status.

Please help.


texts:
I am working on the downloadable products site.i had uploaded sample file for the product.now i need to play this sample file in the video player.

I know their is one setting in the backend under System > Config > Catalog > Dowloaded Information Tab.

Their Use Content-Disposition if i use inline i can play this video.but if i do this then my customers from myaccount under Downloadble Products not able to download. they can download if the setting is attachment.then in this case on the frontend the sample file also gets dowladed.

in General I need frontend file to play and customer myaccount file to download.

I tried giving src to the video player like in the following format.

http://www.mywebsite.com/downloadable/files/samples/v/i/video.mp4

but video player says this file or src not found.

Please Help me.

Thanks


texts: Why isn't the payment method showing on the frontend in Magento 2?

texts:
The issue is that I have enabled cash on delivery and some other payment methods from the backend. But it is not showing on the frontend.

I recently created a new theme and removed some CSS and JS from checkout pages by adding code lines in /app/design/frontend/vendorname/themename/Magento_Checkout/layout/*.xml files. Does that effect on it.

I have updated head section.Here is the code which changed.

<head>
    <!-- Remove local resources -->
    <remove src="css/bootstrap.min.css" />
    <remove src="css/style_new.css"/>
    <remove src="css/animate.min.css"/>
    <remove src="js/bootstrap.min.js"/>
    <remove src="js/jquery.easing.min.js"/>
    <remove src="js/wow.min.js"/>

</head>

Can any one suggest me solution to fix this?


texts: Magento 2 REST API to generate coupon code

texts: I want to create coupon code in magento 2 using rest api. Any custom module available for create coupon code.


texts: Show tier price on product page only by adding amount

texts:
A product has regular tier prices like

1 = 10€ (regular price)
10 = 5€
20 = 4.5€ etc.

Is there a way to show the tier price directly as price on product level?

The same like if user choose a custom options and the price per piece updates.
I mean not as table(!).

It should be shown directly if user adds the amount.

User adds => 15 => price updates to "4,5€"


texts: How can I prevent a product to be added to cart without show any messages?

texts:
I'm trying to prevent a product to be added to cart without showing any messages. In order to do that I'm using a beforeAddProduct plugin and it works well but it shows an exception message in order to prevent the product to be added. How can I do that without showing any messages?
public function beforeAddProduct(Cart $subject, $productInfo, $requestInfo=null)
    {
      ...
      $product = $productInfo;
      ...

            if ($product)
            {
                // check for existence of product in cart...
                if($this->cartSession->getQuote()->hasProductId($product->getId())){

                    throw new \Magento\Framework\Exception\LocalizedException(
                        __("I'd like this error should not appear and simply prevent adding the product to the cart!" )
                     );

                }

            }

        return [$productInfo, $requestInfo];

    }


texts: Magento 1.9 - Payment Gateway Success page empty or error

texts:
Error : PHP Fatal error:  Call to a member function getMethodInstance() on boolean in /home/error/public_html/app/code/core/Mage/Payment/Helper/Data.php on line 119
I am using Paytm & Payubiz payment gateway for my Magento 1.9 website, from the day before to still now most of the customer said amount debited but success page is empty
One of the customers share the error screenshot:

Note : I spoke to Payment Gateway developer regarding this issue they told, our end everything ok, pls check your code. Log error also not related to this error
How to solve success page return error?


texts: Magento 2.4.2 stock wrong on productpage

texts:
I have installed magento 2.4.2 community edition as multistore. The configurable products are uploaded with a csv from the supplier.
On the page with all products I get the right message that the products are in stock or not, but on the productpage every items is 0 stock. I can put it in the shoppingcart with backorders disabled.
Something messed up in my sources and stocks.
Now I use only the default stock, I have tried to move the stock to another source and back. Installed magento 2.4.2 and mageplaza advanced again. I checked all the settings from magento and mageplaza business advanced.
When I change the stock in default, it only changes the salable stock.
https://prntscr.com/11qkn0e
What do I have to change to show the stock with the right numbers?


texts:
Fairly new to Magento 2. I recently built one site using a Luma child theme and all went (fairly) well, now on my second site - different host - which is basically a copy of the first one, same exact template, just a few cosmetic changes to CSS and block positioning, so I wouldn't expect a very different behaviour.

However, on this site I seem to be having some cache related problems. For example if I leave the site for a day or two, when I go back to it (no one has touched it in the meantime) the product images on the homepage won't load up. On one occasion, the whole homepage content (between the header and footer) suddenly wasn't loading up.

In all cases, clearing the cache in the backend fixes the problem, but I know this shouldn't be happening. There isn't even any notification in the backend that the cache needs clearing. I can't go live with the site until this problem is fixed, but I'm not sure how to diagnose where the cache is compromised.

Given that basically the same site behaves properly on another host, I have to assume that it's to do with server settings.
Any suggestions?


texts: Is security patch SUPEE-10570 compatible for Magento Enterprise Edition 1.14.2.1?

texts: I have Magento Enterprise Edition 1.14.2.1 installed. So do i need to apply security patch SUPEE-10570? Is it compatible with Magento Enterprise Edition 1.14.2.1?


texts: I want to remove the add to cart button and the quantity widget, im using magento 1.9.1.0


texts: when ever i change single line of css should i have to deploy static content all time

texts:
I was working with magento 2 and trying to change some css whenever i change single line of css forexample i was trying to change the _module.less file in Magento_Theme/web/css/source
whenever i change sinle line of it didnt show any change but when i remove content from pub/static folder and var/cache and var/view_preprocessed then i am able to see the change what could be the better solution for it to save time ?
I am in a developer mode .


texts: Magento 2 Composer Error While Installing Tawk.to extension

texts:
I'm trying to install Tawk.to chat in my Magento 2.1.9 shopping site hosted on a cPanel shared server environment. And I downloaded the extension files following the guidelines are given here:

  https://www.tawk.to/knowledgebase/plugins-and-modules/magento-2-integration/

After extracting and copying the files to the root directory of my website, I requested my web host to run the needed command lines. After that my site went blank, and I when I inquired from the hosting provider, I was informed that the process was halted, because of an error message that displayed:

===========================================

[root@sixteen public_html]# php composer.phar require tawk/widget

Authentication required (repo.magento.com):
  Username:  my_magento_public_key
  Password: my_magento_private_key

Do you want to store credentials for repo.magento.com in /root/.composer/auth.json ? [Yn] y

[InvalidArgumentException]
Could not find package tawk/widget at any version for your minimum-stability (alpha). Check the package spelling or your minimum-stability

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

==========================================

I learned from online resources that the issue might be in composer.json file. Some tutorials suggest setting minimum stability to -dev. But my composer.json file doesn't even have minimum stability setting, as shown in the code below:

{
  "name": "tawk/widget",
  "description": "Tawk live chat widget",
  "type": "magento2-module",
  "version": "1.0.0",
  "license": [
    "OSL-3.0"
  ],
  "require": {
    "php": "~5.6.0|7.0.2|7.0.4|~7.0.12"
  },
  "autoload": {
    "files": [ "registration.php" ],
    "psr-4": {
      "Tawk\\Widget\\": ""
    }
  }
}

This article suggests setting minimum stability and using stability flags:

  http://webtips.krajee.com/setting-composer-minimum-stability-application/

and this article too:

  https://igor.io/2013/02/07/composer-stability-flags.html

Does anyone know how to put it all together in my composer.json, to fix this minimum stability error?

Thanks for your time and insight in advance.


texts: Echo SKU Option to front-end Magento Syntax

texts:
I'm Hannah a jeweller from Kent, United Kingdom. I am developing my website and I have hit a roadblock, I was wondering if anyone could point me in the right direction please?

I am using the latest version of Magento. I created a custom css class using amazing instructions here -

http://www.ashrafulabedein.com/magento-adding-extra-feild-css-class-in-custom-options/

I adapted it to my theme and it is working amazingly. The css class is stored in an SQL database, and this is then called and echo'd to the front end code, so I can use it with css to style individual options.

I would like to do this with each individual sub-option but with the already existing SKU field. (Not the main product SKU, the individual option SKU , screenshot attached)

With the css class to add it to the front-end, the webpage said to use - <div class="input-box <?php echo $option->getCssClass() ?>">

I am trying to add SKU to this with either:

<?php echo $option->getSku() ?>

OR
<?php echo $value->getSku() ?>

but I cant get either to work, any ideas? I'm not trying to do anything fancy, but just to echo the individual options SKU to the individual options div class.

P.s I had to remove the underscore in $_option to get it to work with cssclass, which is why it is slightly different to the instruction page. As you can see by the screenshot I am using a custom options extension, although this SKU on the options is in a standard magento install with no options.

This is the page I am trying to do it on - http://alexafay.com/design-your-own-necklace.html

Thanks,
Hannah


texts: Where is the data related to PHP version stored in Magento?

texts:
I am new to Magento & learning it. I have installed Magento 2.1.7 in different folder twice both are showing different errors for the same configuration in the same system.

First, I installed Magento in my system with folder name "magento2.1" & then changed the php.ini file memory_limit=1024M.

Secondly, I installed Magento with the name "magento_test" than when I am running both Magento installations & installing an extension named Instant search.

In magento 2.1 it is showing error like

In magento_test it is showing the below error

Can anyone tell me why this is happening? My system has the Php 7.0.2 & I am using xampp in windows,& I was also getting the error of cron job in both the cases first for that I have skipped the cronjob checking By making.

$setupCheck = ['success'=>1];
$updaterCheck = ['success'=>1];

So the cron job is not there but I am facing the above-given errors can anyone tell me what to do?


texts:
I want to overwrite Mage_Paypal_Model_Api_Nvp in my custom_module.
For this, I have follow following steps but after that also core file is calling.

config.xml

 <models>
     <paypal>
       <rewrite>
          <api_nvp>Mycompany_Modulename_Model_Api_Nvp</api_nvp>
      </rewrite>
    </paypal>
</models>

Nvp.php

class Mycompany_Modulename_Model_Api_Nvp extends Mage_Paypal_Model_Api_Nvp
{
    <!-- Code -->
}

I have cleared cache, session, logs. But after that also my file is not called.


texts: Cannot Delete file of Downloadable Product after it has been uploaded. Delete Button does not function under Samples or Links

texts:
Noticed after Patch Supee-8788 is applied, the delete button for the Downloadable Products does not work after the file has been uploaded, there is no way to delete files after they have been uploaded.

I am sure this is a bug in Magento, I think the developer who changed the Downloadable products upload from flash to js, forgot to test the delete button.


texts: Magento 2: Paypal Express not returning Billing Address back to Magento 2

texts:
I'd been having issues with Paypal, where the Billing Address is not returned back to Magento 2 after making a transaction through Paypal. Instead in the Order details from the admin and the Order Confirmation email, the Shipping Address is returned as the Billing Address.

I have debugged, enabled "Require Customer's Billing Address" and even updated to Magento 2.1.7 with no solution.

I have been facing the issue since Magento 2.1.2.


texts: Magento 2 Remove Subtotal from order email

texts: How can i remove Subtotal from order email in Magento 2.3.4?


texts: Magento 2: addAttributeToFilter not working when filtering by ID

texts:
Exception #0 (Magento\Framework\Exception\LocalizedException): The "id" attribute name is invalid. Reset the name and try again.
Here is my code
...
\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
...

$collection = $this->_productCollectionFactory->create();
$collection->addAttributeToSelect('*')->addAttributeToFilter('id',array("in"=>$productIds));

Can everybody helps me ?
Thanks


texts: Filter Magento2 customer grid before it's loaded


texts: Current password field cannot be empty in Magento

texts:
I have upgraded my Magento application form v1.7 to v1.9. Its running and I can login form admin.
But when I am trying to add/edit user from System->permssions->user then It returns an error saying Current password field cannot be empty.  See the attached screen.

Please help me.


texts:
I currently have requirements to create following Magento promo using code. I have taken care of coding part, however unable to calculate the discount.

Rule 3 For 4.00

Condition: When customers adds any 3 of any given Sku, apply the rule
There is no limit on rule. So if customer adds 6 of 9401704, then discount should apply 2 times and so on.

Fixed Discount:4

sku: 9401704    price:   4, sku: 4299345  price: 1.75, sku: 3456775  price: 3

As far as my understanding goes, there is no default rule which meet this requirements. Tier pricing only covers same product,There is extension from webshopapps but this only works if all products are of same price. http://www.webshopapps.com/eu/tiered-pricing-across-multiple-products.html

So I created custom rule action and calling my own discount logic in observer when rule event fires.

I am unable to calculate the discount and adjust the subtotal based on promo.I am ending up with either extra or less value in discount.

This seems common rule to me. Someone with with this promo, plz share your experience?


texts: Magento 2 : How to make all address fields required in customer address edit form

texts:
I know there are questions here that are about how to make the address required during checkout. This is not that question.

My question is how I can make all address fields required in the customer account page. When the customer is logged in and want to add a new address or edit an existing one. I thought it would be simple: just add the required-entry-class. But it turns out that this doesn't work:

<?php for ($_i = 1, $_n = $this->helper(\Magento\Customer\Helper\Address::class)->getStreetLines(); $_i < $_n; $_i++): ?>

        <label class="label" for="street_<?php /* @escapeNotVerified */ echo $_i+1 ?>">
            <?php echo $block->escapeHtml(__('Street ' . $_i)) ?>

            <input placeholder="<?php echo $block->escapeHtml(__('Street ' . $_i)) ?>"
                   type="text"
                   name="street[]"
                   value="<?php echo $this->helper(\Magento\Framework\EscapeHelper::class)->escapeHtmlAttr($block->getStreetLine($_i+1)) ?>"
                   title="<?php  echo $this->helper(\Magento\Framework\EscapeHelper::class)->escapeHtmlAttr(__('Street Address %1', $_i + 1)) ?>"
                   id="street_<?php /* @escapeNotVerified */ echo $_i+1 ?>"
                   class="input-text required-entry">

<?php endfor; ?>

So why doesn't this work? And how can I get it to work?


texts: Magemonkey subscribers not sync with mailchim

texts:
Is it possible to create subscribers when the customer is creating an order? I have installed the Magemonkey extension and connect it to my MailChimp account. However, nothing happens. On my MailChimp account, I have 8 subscribers, on my Magento site 89.

Am I missing some step? Do I need to set Customer Fields Mapping? I don't understand how to know what fields should I map.

I also run the cron job, but still, nothing happens. How to sync my subscribers with my MailChimp account. API key is ok, and magemonkey can see my list group in MailChimp.
I know that I am missing something but I can't figure out what.


texts: M2.4.1 Unable to resolve source file jquery\fileUploader\fileupload-fp.js

texts:
I'm getting issue with the file uploader in the backend admin of M2.4.1 It is missing file below and can see a 404 for the file in the browser console. I have cleared static content, generated folder and var\view_preprocessed folders. Run setup:upgrade, compile commands and forced rebuild of static content. Not sure what else to try ... Any suggestions.?? Everything else seems to be working fine...  just this..
adminhtmlMagento\backend\en_GB\jquery\fileUploader\fileupload-fp.js


texts:
I want to change the text of My account top links.

When user is not logged in, I need to display the top link My Account as Register.

Once a user is logged in, I want to change that text to from Register to 'Your account'.

How can I achieve this ?

Please Help.

Thanks.


texts:
After installing SUPEE-11219, we can no longer save updates in System > Configuration > General > Design.
Whenever we click Save Config (even if not adding or changing and values) we receive the error "Wrong field specified".
We've tested commenting out Mage::throwException(Mage::helper('adminhtml')->__('Wrong field specified.')); on line 413 of file app/code/core/Mage/Adminhtml/Model/Config/Data.php on a local testing site and this allows us to save changes.
We can't see any reason why Wrong field specified should be firing.
This is the actual logic triggering the error, maybe ther should be an if/else or else clause
if (($groupConfig ? !$groupConfig->dynamic_group : true) && !$this->_isValidField($fieldConfig)) {
    Mage::throwException(Mage::helper('adminhtml')->__('Wrong field specified.'));
}


texts: URL key regenerating from tilte in magento 1.8 CE

texts:
I have a magento 1.8  with 5 storeviews (IT -EN - DE- FR -ES)
I set the Italian (IT) as Default Store View.

Then I  figured out that, if i select "Default values" or "IT" store view  from the left dropdown "Choose Store View" menu in the Product page, the URL key are WRONG (some are from other products, some from other languages).

This happends just in these two store views. The others store view have the URL same to Title.

Is there a way to change in a massive way all the key urls in each store view so that they match the Title?

I tried reindexing a few time without success.


texts: Magento 2 - How to get the simple product Sku from the option selected of a configurable product

texts:
As I asked in the question I want to get the SKU of a simple product selected by the option in configurable product details page.

How can I capture the SKU?

Tried in this way, but not possible to capture the selected options SKU

$product_id =  $block->getProduct()->getId();//Configurable product ID

$configProduct = $objectManager->create('Magento\Catalog\Model\Product')->load($product_id);

$_children = $configProduct->getTypeInstance()->getUsedProducts($configProduct);

foreach ($_children as $child){
    echo "Here are your child Product Ids ".$child->getID()."-:-".$child->getSku()."</br>";
}
echo "count: ".count($_children);


texts: Magento 2: is there any way to assign product image from remote image url programmatically?

texts:
I just want to assign product image from remote image url.

One more thing is i can't able to download image in my server because total size of image is : over 1TB

my code is below :

$imageUrl = 'Product image remote url';

$product->addImageToMediaGallery($imageUrl, array('image','small_image','thumbnail','swatch_image'), false, false);
$product->save();

using this code i getting "The image does not exist." error.


texts: Magento 2: Display Image in exported excel file from custom grid

texts:
I am creating a custom admin grid (using Bock not UI Component) with custom collection.
In that grid, I have a column of product image.

Please see below screenshot:

There are two way to export grid data(Excel and CSV), When I export the grid data into excel format(file.xlsx), It's showing whole image tag(like: <img src="http://127.0.0.1/poserp/pub/media/catalog/product/1/2/124.png" width="67" height = "67" />) in product image column.

Please see below screenshot:

Here, I want to display real image in exported Excel file only as it's shown below screenshot:

Here I am using default magento excel functionality for exporting the grid data into excel format in my controller file(exportExcel.php).

public function execute() {
    $fileName = 'file.xlsx';

    $content = $this->_view->getLayout()->createBlock(
                    \Vendorname\Modulename\Block\Adminhtml\Report\Grid::class
            )->getExcelFile();

    return $this->fileFactory->create($fileName, $content, DirectoryList::VAR_DIR);
 }

Please give me an idea that how can I achieve it.
Any help will be appreciated.


texts: How to get order details on Order success page in Magento 2

texts:
I need order details on file

app\design\frontend\Yard\yardfreak\Magento_Checkout\templates\success.phtml

In older versions , it works fine with these lines of code

$orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
$order = Mage::getModel('sales/order')->loadByIncrementId($orderId);

Please suggest me the alternative of the above give two lines in Magento 2.0.


texts: Magento extension, make config available for email templates

texts:
we have an extension with only a system.xml giving us some config parameters per store that we can access. Now I would like to access these in an email template and use them in a depend or if statement as follows

{{depend my_custom_var}}

Or by using something like

{{depend var path/to/config}}

The problem is that Magento wont't accept

{{depend {{config path='some/value/here'}}}} text here

Please find more information here: Magento {{depend}} combined with {{config path='some/value/here'}}

Question: Now how would I add something to my new extension where I make the variable config path='some/value/here' available in a manner that I can use it in the depend statement?

many thanks


texts:
I've made a change to App.php in /app/local/Mage/Core/Model to test something, but now when removing the file the, the site gives a fatal error! - I've cleard the cache files but didn't help?

Warning: include(/var/www/site.com/public_html/app/code/local/Mage/Core/Model/App.php): failed to open stream: No such file or directory in /var/www/site.com/public_html/lib/Varien/Autoload.php on line 93
Warning: include(): Failed opening 'Mage/Core/Model/App.php' for inclusion (include_path='/var/www/site.com/public_html/app/code/local:/var/www/site.com/public_html/app/code/community:/var/www/site.com/public_html/app/code/core:/var/www/site.com/public_html/lib:.:/usr/share/php:/usr/share/pear') in /var/www/site.com/public_html/lib/Varien/Autoload.php on line 93
Fatal error: Class 'Mage_Core_Model_App' not found in /var/www/site.com/public_html/app/Mage.php on line 633


texts: How to remove countries from Magento 2 drop down list?

texts:
Basically I would like to show selected countries in the shipping and billing forms. Is there a correct way to achieve this?

I intend to use following JS:

jQuery('select[name=country_id]')
    .find('option')
    .remove()
    .end()
    .append('<option value=""> </option><option data-title="United Kingdom" value="GB">United Kingdom</option>');

It works fine, but I'm curious is there any other correct method available to do this?


texts: htaccess Rewriterule to remove trailing slash

texts:
I ran a page seo and it said I needed to remove the trailing slash because it could cause duplicate content. So I found this rule:

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

and added it to the htaccess but now I can't pass the Billing Information step in the onepage checkout.

Is this rule correct? Why can't I pass the Billing step?


texts: Edit default tooltips for template Checkout/onepage/Billing.phtml (Magento 1.9)

texts:
I want to edit tooltip for "City" field,

in

base/default/template/checkout/onepage/billing.phtml

How can I edit the tooltip for the field ?


texts: user define quantity checkbox in bundel product for magento2

texts:
On admin side Bundle configuration for checkbox item, I need to add "User Defined Qty"  YES/No.
We had used "Kabel/BundlePlus" for Magento 1. I need the same functionality for Magento 2. Is anyone customized or have an extension for this.


texts: Problems with saving new product (stock, price)

texts:
I'm creating a new product like this:

$item = array(...);    // associative array has attribute values
$product = Mage::getModel('catalog/product');
$product->setTypeId('simple');
$product->setSku($item['sku']);
$product->setName($item['name']);
$product->setPrice($item['price']);
$product->setStatus($item['status']);
etc...
$this->updateStock(product->getId(), $item['quantity']);
$product->save();

....

public function updateStock($id, $qty)
{
    $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($id);

    $stockItem->setData('is_in_stock', 1);
    $stockItem->setData('manage_stock', 1);   // tried a couple of variants like 'inventory_manage_stock'
    $stockItem->setData('qty', $qty);
    $stockItem->save();
}

I'm having some problems:

[SOLVED] Price doesn't get inserted the first time save() is called. If I run this code again (with $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $item['sku'])), price get set around the second time. (SOLVED: I didn't set the product type. Code updated)
[SOLVED]Regarding stock.. I can't get the Use Config Settings checkboxes to be checked (by default it is when item is created in admin) in the Inventory tab in the admin when a new product is created.

Upon investigating the database, when I save the product initially, the corresponding row in cataloginventory_stock_item is not created. So, it looked like I needed to initialize it somehow before the initial product save. I have solves this issue, and I will update the answer later.

[SOLVED]I tried to remedy problem 2 by setting the manage_stock to true, but I can't even set "Manage Stock" to "Yes". updateStock() works for products that are already existing.

How can I solve these issues?


texts:
I want to create a popup message when the customers click on one of menu item and also when they click on OK in popup message I want to display the message on the clicked menu category page.
Thanks in advance.


texts:
I need to be able to treat zip files programmatically.

In magento 1.9 I was doing :

$zip = new ZipArchive();

        if ($zip->open($Zippath) === TRUE)
        {
            $zip->addFile($Filepath, $Filename);
            $zip->addFile($FilepathL, "toto.txt");
            $zip->close();
            return TRUE;    }

How can I do the same in magento 2?


texts: magento 2.2.0 reindex through command is not working

texts:
I have setup magento 2.2.0 version and set index to update on scheduel. When I remove category from product and run php bin/magento indexer:reindex command it's reindex successfully but when I check in front end it's not take any effect.

Anyone know how to solve it? Thanks in advance.


texts: How to restore the default checkout template?

texts:
I never use Magento but, a friend uses it and a dev. broke their checkout page, how I can restore the TEMPLATE of the checkout to default? I don't see a backup of any of the files, and I no have clue where I need to start searching in the directory tree.

Thanks


texts: My custom class always return 500 internal errror on Magento 2.1.2 ,but on 2.1.5 is work fine

texts:
I create custom status action class to change specific order to my custom status, I created "Packing" class, that change order status to 'packing'. it's working fine on Magento 2.1.5, but if I using it on Magento 2.1.2( I have some legacy product.) it always return 500 internal error.

This is Packing class which I overrode.

class Packing extends \Magento\Sales\Controller\Adminhtml\Order {

const ADMIN_RESOURCE = 'Magento_OrderStatus::packing';

/**
 * Packing order
 *
 * @return \Magento\Backend\Model\View\Result\Redirect
 */
public function execute()
{
    $resultRedirect = $this->resultRedirectFactory->create();
    $orderId = $this->getRequest()->getParam('order_id');
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $order = $objectManager->create('\Magento\Sales\Model\Order')->load($orderId);
    if ($order) {
        try {
            $order->setStatus('packing');
            $order->save();
            $this->messageManager->addSuccess(__('You put the order on packing.'));
        } catch (\Magento\Framework\Exception\LocalizedException $e) {
            $this->messageManager->addError($e->getMessage());
        } catch (\Exception $e) {
            $this->messageManager->addError(__('You have not put the order on packing.'));
        }
        $resultRedirect->setPath('sales/order/view', ['order_id' => $order->getId()]);
        return $resultRedirect;
    }
    $resultRedirect->setPath('sales/*/');
    return $resultRedirect;

}
}

please tell me if you need more code. Thank you for answering my question.

edited

debugger mode showed me Magento\Sales\Controller\Adminhtml\Order::__construct() must be an instance of Magento\Backend\App\Action\Context

error function resides on Order.php from Sales Module.

/**
 * @param Action\Context $context
 * @param \Magento\Framework\Registry $coreRegistry
 * @param \Magento\Framework\App\Response\Http\FileFactory $fileFactory
 * @param \Magento\Framework\Translate\InlineInterface $translateInline
 * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
 * @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
 * @param \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory
 * @param \Magento\Framework\Controller\Result\RawFactory $resultRawFactory
 * @param OrderManagementInterface $orderManagement
 * @param OrderRepositoryInterface $orderRepository
 * @param LoggerInterface $logger
 *
 * @SuppressWarnings(PHPMD.ExcessiveParameterList)
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 */
public function __construct(
    Action\Context $context,
    \Magento\Framework\Registry $coreRegistry,
    \Magento\Framework\App\Response\Http\FileFactory $fileFactory,
    \Magento\Framework\Translate\InlineInterface $translateInline,
    \Magento\Framework\View\Result\PageFactory $resultPageFactory,
    \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory,
    \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory,
    \Magento\Framework\Controller\Result\RawFactory $resultRawFactory,
    OrderManagementInterface $orderManagement,
    OrderRepositoryInterface $orderRepository,
    LoggerInterface $logger
) {
    $this->_coreRegistry = $coreRegistry;
    $this->_fileFactory = $fileFactory;
    $this->_translateInline = $translateInline;
    $this->resultPageFactory = $resultPageFactory;
    $this->resultJsonFactory = $resultJsonFactory;
    $this->resultLayoutFactory = $resultLayoutFactory;
    $this->resultRawFactory = $resultRawFactory;
    $this->orderManagement = $orderManagement;
    $this->orderRepository = $orderRepository;
    $this->logger = $logger;
    parent::__construct($context);
}


texts:
I would like to add the product SKU above the product name in the minicart.

How can I add it?  Do I need to create a copy of one of these files in my theme?
app/code/Magento/Checkout/view/frontend/web/template/minicart/item/default.html
app/code/Magento/Checkout/view/frontend/layout/checkout_cart_sidebar_item_renderers.xml


texts: Implementing mapping in firebear module during migration

texts:
I need to set up store id mapping during order migration. The firebear website has an example of how to set up mapping, but I don't understand how this method will understand that I want to change the store id.
https://firebearstudio.com/blog/manual-for-free-magento-1-to-magento-2-migration-add-on-for-improved-import-and-export-extension.html


texts:
I have different stores under same website in my magento admin. I would like to add products specific to some stores. But I'm unable to do it. Under the website option in add new product if I select main website, then it is avaibable for all stores. How to add products to specific stores alone?

Since I knew my store ids I tried setting them using observer event catalog_product_save_after. But it dint work.

Can anyone help?

Following is my observer function. If I try the below one, the page keeps on loading without stopping.

public function catalogProductSave(Varien_Event_Observer $observer){

    $product = $observer->getEvent()->getProduct();

    $product->setStoreId('3')->save();

}


texts: Magento2 - Extend Element\Template - Interceptor problem

texts:
I'm creating an extension that adds the function to switch tax view for customers. Because I need the same functions in multiple views I created a preference for Template:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Framework\View\Element\Template" type="Silvan\TaxSwitcher\Template" />
</config>

And my Template class:

class Template extends \Magento\Framework\View\Element\Template
{
    /** @var \Silvan\TaxSwitcher\Model\Session */
    protected $session;

    public function __construct(\Magento\Framework\View\Element\Template\Context $context, Session $session, array $data)
    {
        $this->session = $session;
        \Magento\Framework\View\Element\Template::__construct($context, $data);
    }
    /**
     * showInclTax method
     *
     * @return bool
     */
    public function showInclTax()
    {
        return $this->session->getTaxState() === 'incl-tax';
    }

    /**
     * showExclTax method
     *
     * @return bool
     */
    public function showExclTax()
    {
        return $this->session->getTaxState() === 'incl-tax' ? false : true;
    }

This class is called correctly. But when I try to use my function in minicart.phtml in my theme I get this error:

Invalid method Magento\Checkout\Block\Cart\Sidebar\Interceptor::showInclTax(Array
(
)
)

The function showInclTax is not created in the Interceptor. How does this work? Why is it not created?


texts:
I have created split button i.e. button with options as below.

Created block file

namespace Yournamespace\Modulename\Block\Adminhtml\Product;

class CustomActionList extends \Magento\Backend\Block\Widget\Container
{

    /**
     * @param \Magento\Backend\Block\Widget\Context $context
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Widget\Context $context,
        array $data = []
    ) {
        parent::__construct($context, $data);
    }

    protected function _prepareLayout()
    {
        $addButtonProps = [
            'id' => 'custom_action_list',
            'label' => __('Custom Action List'),
            'class' => 'add',
            'button_class' => '',
            'class_name' => 'Magento\Backend\Block\Widget\Button\SplitButton',
            'options' => $this->_getCustomActionListOptions(),
        ];
        $this->buttonList->add('add_new', $addButtonProps);

        return parent::_prepareLayout();
    }

    /**
     * Retrieve options for 'CustomActionList' split button
     *
     * @return array
     */
    protected function _getCustomActionListOptions()
    {
        /*list of button which you want to add*/
        $splitButtonOptions=[
        'action_1'=>['label'=>__('Action 1'),'onclick'=>'setLocation("ACTION CONTROLLER")'],
        'action_2'=>['label'=>__('Action 2'),'onclick'=>'setLocation("ACTION CONTROLLER")'],
        'action_3'=>['label'=>__('Action 3'),'onclick'=>'setLocation("ACTION CONTROLLER")']
        ];
        /* in above list you can also pass others attribute of buttons*/
        return $splitButtonOptions;
    }
}

Created block file

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <!-- here we call our split button block   -->
            <block class="Yournamespace\Modulename\Block\Adminhtml\Product\CustomActionList" name="admin.product.customsplitbutton"/>
        </referenceContainer>
    </body>
</page>

I am using this button in grid, beside Add New button .

But when I select items from grid and I click on button action, I am not getting selected row's data.


texts: How can I include a phtml file in Magento2 using block type="core/template"?

texts:
I have done the following:

Magento 2 EE Admin > Content > Pages > Add New

Page is called Hello World

The content is:

{{block type="core/template" template="/Modules/About.phtml"}}

I have gone to and created.

App/design/frontend/Magento/Blank/Modules/About.phtml

When I visit localhost/m2/hello

The page loads expected but does not load the about.phtml which has a plain text call saying

Hello this file is correct


texts: Display Price for Product Instead of Price for Sample

texts:
I've built a site on Magento 1.9.2.4 that sells carpet. However, the client has decided not to sale the products directly, but sale samples of the product instead. But, there are two types of samples that may or may not be sold for various products. Product A might have available Sample 1 and Sample 2, while Product B might only sell Sample 2 and Product C might only sale Sample 1.

I added a custom option for the two sample types and added the fixed price for each sample type. But, if those options are checked, the product price gets increased, which is incorrect. So, my thought was to create a separate attribute called "Product Price" and set the real product price there. Then, I changed the Magento "Price" to $0 so the options are the only price value for the sample.

I need to show the "Product Price" on the page, but show the "Sample Price" in the cart once the product is added. However, I am having trouble getting the template to show the "Product Price" instead of the $0 "Price" that Magento uses as the default. Does anyone have a way of doing this well? I'll be happy to supply code snippets I've tested, if necessary.


texts: I Want to override final_price.phtml file to hide the price of product

texts:
I have use events and observers to check the whther the user is logged in or not. And the logout user will not see the price of the product. Here's my code:

Created events.xml file in app/code/Demo/Mymodule/etc/frontend:

<?xml version="1.0" encoding="UTF-8"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd">
        <event name="layout_load_before">
            <observer name="add_layout_handles" instance="Demo\Mymodule\Observer\AddHandles" />
        </event>
    </config>

Created Addhandles.php in app/code/Demo/Mymdoule/Observer:

<?php

namespace Demo\Mymodule\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Customer\Model\Session as CustomerSession;

class AddHandles implements ObserverInterface
{
    /**
    * @var CustomerSession
    */
    protected $customerSession;
    /**
    * Add constructor.
    * @param CustomerSession $customerSession
    */
    public function __construct(CustomerSession $customerSession)
    {
        $this->customerSession = $customerSession;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $layout = $observer->getEvent()->getLayout();

        if (!$this->customerSession->isLoggedIn())
        {
            $layout->getUpdate()->addHandle('customer_log_out');
        }
    }
}

Created customer_log_out.xml in app/code/Demo/Mymodule/view/frontend/layout:

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
    <referenceBlock name="render.product.prices">
        <arguments>
            <argument name="default" xsi:type="array">
                <item name="prices" xsi:type="array">
                    <item name="final_price" xsi:type="array">
                        <item name="render_template" xsi:type="string">Demo_Mymodule::product/price/final_price.phtml</item>
                    </item>
                </item>
            </argument>
        </arguments>
    </referenceBlock>
</layout>

Created final_price.phtml in app/code/Demo/Mymodule/view/frontend/templates/product/price which have my custom message.

But it's not working. Can please someone help me.


texts: Getting 500 error when access product page magento 2

texts: When I add a product to muy category this what I found as results


texts: Magento 1.6: This webpage has a redirect loop

texts:
I have a dev site on magento 1.6 . Now I am trying to create a local installation with this dev site files and DB.

I have changed the

web/unsecure/base_url
web/secure/base_url
and web/url/redirect_to_base to 0.

I have also cleared

var/cache
and var/session.

But I am still getting:

This webpage has a redirect loop issue.

Tell me please how to resolve this error?


texts: There are lots of functions in magento 2  which are deprecated like Registry. Can anyone give me list of such functions or classes.


texts:
When I run in my terminal: php bin/magento setup:static-content:deploy

which is supposed to be the fix for css and js not loading, I get this:

  PHP Parse error:  parse error in
  /Magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
  on line 93

I'm on a Mac using the main local web server. Not MAMP. Please someone tell me how to fix this before I give up on Magento.

PHP version 5.5.30, and I've changed root links in db to 127.0.0.1, Magento version 2.1.4 with data.

Thanks


texts:
I would like to achieve the below URL setup in magento 2 with nginx

domain.com/us/          ->  us english store view   (us_en)
domain.com/us/de/       ->  us german store view    (us_de)

domain.com/uk/          ->  uk english store view   (uk_en)
domain.com/uk/de/       ->  uk german store view    (uk_de)

I've created 2 websites and one store for each website and 2 store views for each store. Done the base url setup per Store View.

Tried enabling and disabling "Add Store Code to Urls". Still no luck

Note: I dont want a subdomain approach

The below nginx config doesnt work. results 404 error on magento2.

domain vhost.conf

map $request_uri $MAGE_RUN_CODE {
    default   us_en;
    ~^/us/de  us_de;
    ~^/us     us_en;
    ~^/uk/de  uk_de;
    ~^/uk     uk_en;
}

map $request_uri $MAGE_RUN_TYPE {
    default   store;
}

<magento_root>/nginx.conf.sample

location ~ (index|get|static|report|404|503)\.php$ {
    ....
    fastcgi_param  MAGE_RUN_CODE $MAGE_RUN_CODE;
    fastcgi_param  MAGE_RUN_TYPE $MAGE_RUN_TYPE;
    ...
}

Achieved the above structure with apache, by creating the old softlink approach.
But have to get the config done in nginx.

Thanks in Advance.

Srini


texts:
I am trying to create a custom section with private content to not cached. I follow this article:

https://webkul.com/blog/sections-magento-2/

I did the first two steps:

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\Customer\CustomerData\SectionPoolInterface">
        <arguments>
            <argument name="sectionSourceMap" xsi:type="array">
                <item name="custom_price_region" xsi:type="string">Morwi\PrecioRegional\CustomerData\CustomPriceRegion</item>
            </argument>
        </arguments>
    </type>
</config>

CustomPriceRegion.php

<?php
namespace Morwi\PrecioRegional\CustomerData;

use Magento\Customer\CustomerData\SectionSourceInterface;

class CustomPriceRegion implements SectionSourceInterface
{
   /**
    * {@inheritdoc}
    */
    public function getSectionData(){
        return [
            'msg' =>'Data from section',
        ];
    }
}
?>

After that, the article said I should see the new section of the local storage of the browser, but I don´t see it. How is it set? Is something additional to do?

Thanks.


texts: Magento 225 :Notice: Array to string conversion

texts:
When I try to create a new record in my custom module I get the below mentioned error

  Something went wrong while saving the item.Notice: Array to string
  conversion in
  /opt/lampp/htdocs/Magento225/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php
  on line 3028

Admin field in Ui Component form

  <field name="customer_group_ids">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string">Customer Groups</item>
            <item name="dataType" xsi:type="string">number</item>
            <item name="formElement" xsi:type="string">multiselect</item>
            <item name="validation" xsi:type="array">
                <item name="required-entry" xsi:type="boolean">true</item>
            </item>
            <item name="source" xsi:type="string">catalog_rule</item>
            <item name="dataScope" xsi:type="string">customer_group_ids</item>
        </item>
        <item name="options" xsi:type="object">Magento\CatalogRule\Model\Rule\CustomerGroupsOptionsProvider</item>
    </argument>
</field>

Error is coming form the piece of code below , when I comment out this code it works fine.

      if (!empty($data['customer_group_ids'])) {

            $data['customer_group_ids'] = implode(',', $data['customer_group_ids']);
        } else {
            $data['customer_group_ids'] = '';
        }

Below code is similar to the one mention above(customer_group_ids) and working fine and saves the records in database correctly .

        if (!empty($data['cmspage_ids'])) {
            $data['cmspage_ids'] = implode(',', $data['cmspage_ids']);
        }else {
            $data['cmspage_ids'] = '';
        }

I have both the above pieces of code in my save.php one is working fine and the other is not! What causes this issue to happen?

Output of the Array:

Array
(
[0] => 0
[1] => 1
[2] => 2
[3] => 3
)


texts: magento 2 Syntax error or access violation: 1103 Incorrect table name '', query was: INSERT INTO `` () VALUES ()

texts:
Magento 2 when place order from newly created store,
after click on place order button below error is dispaly,

  Syntax error or access violation: 1103 Incorrect table name '', query was: INSERT INTO `` () VALUES ()

And stop place order functionality.


texts: How can I configure my computer for checking My Magento Extension is Compatible with multiple Magento versions with php versions?

texts:
I have developed an extension for Magento Marketplace.

For this, I had installed code sniffer Magento coding standard.

But Marketplace checks All the Standards and Compatibility of Extension with Multiple Magento version like 2.0., 2.1., 2.2. and PHP versions also like 5.6., 7.0., 7.1., 7.2.*, etc.

So I want to configure my computer for checking my extension compatibility and First, I want to test in the local environment and after that submit to Marketplace.

For this what I need to do?


texts: Include external PHP library in Magento 2 module

texts:
I am trying to include an external PHP library inside my Magento 2 module, specifically the eKomi PHP library (https://github.com/ekomi-dev/ekomi-api).

I have added the PHP files into the module so the folder structure looks like:

MyName
  MyModule
    Ekomi
      Request
        ..
      Service
        ..
      Api.php
    etc
      ..
    Helper
      ..
    composer.json
    registration.php

My composer.json file looks like this:

{
  "name": "MyName/MyModule",
  "description": "N/A",
  "require": {
    "php": "~5.5.22|~5.6.0|~7.0.0"
  },
  "type": "magento2-module",
  "version": "1.0.0",
  "license": [
    "OSL-3.0",
    "AFL-3.0"
  ],
  "autoload": {
    "files": [
      "registration.php"
    ],
    "psr-4": {
      "Magento\\Catalog\\": "",
      "Ekomi\\": "Ekomi/"
    }
  }
}

When I run php bin/magento setup:di:compile I am getting PHP include errors inside my Ekomi directory, I do not think I am including the files correctly inside my composer.json file.

The error message:

Compilation was started.
Proxies code generation... 0/7 [>---------------------------]   0% 1 sec 46.0 Mi
Proxies code generation... 1/7 [====>-----------------------]  14% 1 sec 50.0 Mi
Repositories code generation... 1/7 [====>-----------------------]  14% 1 sec 500 MiB
PHP Fatal error:  Class 'Ekomi\Request\AbstractRequest' not found in /var/www/magento2/app/code/MyName/MyModule/Ekomi/Request/GetProduct.php on line 8


texts: Magento 2 product controller override issue

texts:
I am trying to override product controller. Here is the code...

app/code/Test/Local/etc/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">
    <preference for="Magento\Catalog\Controller\Product\View" type="Test\Local\Controller\Catalog\Product\View" />
</config>

app/code/Test/Local/Controller/Product/view.php

<?php

namespace Test\Local\Controller\Catalog\Product;

class View extends \Magento\Catalog\Controller\Product\View
{
    /**
     * Product view action
     *
     * @return \Magento\Framework\Controller\Result\Forward|\Magento\Framework\Controller\Result\Redirect
     */
    public function execute()
    {

        // logging to test override
        $logger = \Magento\Framework\App\ObjectManager::getInstance()->get('\Psr\Log\LoggerInterface');
        $logger->debug('Controller Override Test');

        echo "In"; exit;
    }
}
?>

I am not getting what is going wrong, but this is not working somehow.


texts: copy products from category to other category

texts:
Using magento 1.9.1

I want to copy products from different category to another category. I got the following:

    INSERT INTO multi_catalog_category_product
    SELECT <target_category_id> as multi_category_id, tablea.product_id,    tablea.position
    FROM `multi_catalog_category_product` tablea
    LEFT OUTER JOIN `multi_catalog_category_product` tableb
   ON tablea.product_id = tableb.product_id
   AND tableb.category_id = <target_category_id>
   WHERE tablea.`category_id` = <source_category_id> AND tableb.position is   NULL

It is working. But I was wondering if I did not forgot a table and if this is best practice.


texts: Magento 2 Get widget parameters as array

texts:
Is there a way to get all the widget parameters in an array instead of loading the data of a specific widget parameter like below?

$this->getData('widget_parameter_1');

So, something like:

$currentwidgetObject->getParameters();


texts: How to change host from localhost to my network ip in vue-storefront?

texts:
I have install Vue-storefront in my local machine(Ubuntu 18) by following these commands

git clone https://github.com/DivanteLtd/vue-storefront.git vue-storefront
cd vue-storefront
yarn
yarn installer

here I have used https://demo.vuestorefront.io as the backend
I have install vue-storefront successfully

in localhost:3000
but I want to change localhost to 192.168.0.172 and port 3000 to 8080
for this, I have made changes in vue-storefront/config/local.json

I have run

npm restart

But I can not access this http://192.168.0.172:8080/
How can I do this...


texts:
In app/code/User/Customdata/Block/Adminhtml/User/Edit/Tab I have create 3 more php file in this tab.

I want to call all file in Main.php file in edit form in Admin. but file is called and data also showing but when we submit form data then only one Main file data post. I want to 2 more files data post with that data.
Note: 3 file data coming from 3 different tables.

If i put all in single file then
how to setform data

$form->setValues($model->getData());
$form->setValues($models->getData());
$this->setForm($form);

here only last ($form->setValues($models->getData());) data set. but i want to set both these

 $form->setValues($model->getData());

$form->setValues($models->getData());


texts: magento admin not clickable except dashboard

texts:
I have installed Magento-CE-2.0.0+Samples-2015-11-17-06-11-18
but after installing in admin side all the sections except dashboard is disabled, it not clickable. can anyone guide me regarding this.


texts: Why does an order still come through on Magento if the customer uses an invalid debit/credit card?

texts:
When a customer uses an invalid debit/credit card on a Magento checkout, is there a reason as to why the order still comes through to the orders section?

The order says it is pending payment even though no credit/debit card information has come through.


texts: Uncaught TypeError: Cannot read property 'get' of undefined

texts:
Wherever I click, I am getting this loading image, and I am unable to add new categories and products in Magento 2.2.0

This is the error that I keep getting in the console

Cannot read property 'get' of undefined
at setRootListener (async.js:132)
at Object.<anonymous> (jquery.js:3411)
at fire (jquery.js:3232)
at Object.add [as done] (jquery.js:3291)
at Array.<anonymous> (jquery.js:3410)
at Function.each (jquery.js:370)
at Object.<anonymous> (jquery.js:3406)
at Function.Deferred (jquery.js:3472)
at Object.then (jquery.js:3405)
at Function.$.async (async.js:183)


texts: Magento Stack Trace - Feed failed to load, got response code 404

texts:
We have just moved our installation of Magento over to a new host. Everything has gone over ok that I can see. I can access and login to the back-end fine - no problems there at all, but whenever I access a front-end page - I'm getting a Trace stack like this:

Feed failed to load, got response code 404

Trace:
/httpdocs/app/design/frontend/default/rampco/template/page/3columns.phtml(62): Zend_Feed_Abstract->__construct
/httpdocs/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
httpdocs/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...')
/httpdocs/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
/httpdocs/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
/Layout.php(529): Mage_Core_Block_Abstract->toHtml()
/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(391): Mage_Core_Model_Layout->getOutput()
/httpdocs/app/code/core/Mage/Cms/Helper/Page.php(132): Mage_Core_Controller_Varien_Action->renderLayout()
/httpdocs/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
/httpdocs/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home')
/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Cms_IndexController->indexAction()
/httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
/httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
/httpdocs/app/code/core/Mage/Core/Model/App.php(347): Mage_Core_Controller_Varien_Front->dispatch()
/httpdocs/app/Mage.php(640): Mage_Core_Model_App->run(Array)
/httpdocs/index.php(80): Mage::run('', 'store')
#16 {main}

I've spent so long now looking for any clue as to what may be causing this, but the "Feed failed to load, got response code 404" seems to be the rarest error in the history of Magento!

Any light that anyone can shed on this would be very much appreciated.


texts:
How to check current page is Customer Account page or not?

I have used this but it's only for My Account Page

<?php $action = Mage::app()->getFrontController()->getAction();
echo $action->getFullActionName('_');
if($action->getFullActionName('_')=="customer_account_index")
{

}?>


texts: Magento 1.9 : TypeError: jQuery(...).owlCarousel is not a function

texts:
I get a problem with the owl-Carousel. I have tried many different answers from the same question however nothing helps. So I will show you all my code and hope someone knows the answer.The problem keep appears "TypeError: jQuery(...).owlCarousel is not a function".

This is my local.xml content where I've included the js & css files:

     <default>
<reference name="head">
    <action method="addJs"></action>
    <action method="addJs"></action>
    <action method="addJs"></action>
    <action method="addJs"></action>
    <action method="addItem"><type>js_css</type><name>assets/css/popup.css</name></action>
    <action method="addJs"></action>
    <action method="addItem"><type>js_css</type><name>owl/owl-carousel/owl.carousel.css</name></action>
    <action method="addItem"><type>js_css</type><name>owl/owl-carousel/owl.theme.css</name></action>
    <action method="addItem"><type>js_css</type><name>owl/owl-carousel/owl.transition.css</name></action>

This is my code for showing the products in the slider with the jQuery script underneath:

       jQuery.noConflict();
       jQuery(document).ready(function() {

  jQuery("#owl-demo").owlCarousel({
    items : 4,
    lazyLoad : true,
    navigation : true
  });

});
     </script>

   <?php

    $categoryId = 2; // this is the category holding your products
    $products =   Mage::getSingleton('catalog/category')->load($categoryId)   // load the category
           ->getProductCollection() // and the products
           ->addAttributeToSelect('image'); // tell Magento which attributes to get

     foreach ($products as $product) { // iterate through the entire collection
    echo '
getImageUrl().'>
'; // print the image url inside of the required Owl markup
    }

 ?>


texts: Magento 404 errors are showing the standard apache 404 error instead of custom Magento 404

texts:
I have a site with Magento installed. It is installed in a subdirectory (http://mysite.com/store) -- Everything works properly, except for when I go to a page that should 404 (ex: http://mysite.com/store/dfgsdfg). I would expect this to show the page defined in my Magento Default No-route URL, but instead it is showing the default apache 404 page (Not Found The requested URL /index.php was not found on this server. Apache/2.4.6 (Ubuntu) Server at www.vosslighting.com Port 80)

In my .htaccess file I have (just the pertinent parts):

DirectoryIndex index.php
Options +FollowSymLinks
RewriteEngine on
RewriteRule .* index.php [L]

I have the line '#RewriteBase /store/' commented out, but it doesn't seem to help anything when I uncomment it.

Can anyone point me in the right direction of where I might need to look to get my custom 404 pages?


texts: How to fetch values from 2 tables based on the first table's values

texts:
I have developed a custom module which includes three DB tables. I need to fetch values from one table and then based on that value fetch values from second table.

For ex below is the table description:

**deal_offers**  : entity_id | deal_name | deal_discount

**deal_products** : deal_id | product_id

In my observer, I am getting product_id value. Now for say product_id, what I want to achieve is

First, fetch deal_id value from table deal_products, using the value
of product_id
Next, fetch deal_discount value, using deal_id which is the
entity_id in table deal_offers

I have defined <entities> in my config.xml for these two tables, but not getting success
in achieving the desired result using Mage::getModel('module/model') method in my observer.

Please Help

Thanks
Thanks


texts: Magento 2 : How to add another column to an existing table in the Database?

texts:
I created and installed my database via the InstallSchema.php file.
I now need to add a new column to one of my tables.
In order to get the new column added to the table I deleted the module name entry from the setup_module table.
I made my changes to to the InstallSchema.php file to add the additional column.
Then I run the command "php bin/magento setup:upgrade" but the database is not being updated with the new column.
Below is the code for the new column I am trying to add.

 ->addColumn(
                'api_status',
                \Magento\Framework\DB\Ddl\Table::TYPE_BOOLEAN,
                null,
                ['nullable' => false, 'default' => 0],
                'API Status'
            )


texts: How could I get the attribute(manufacturer) Url Like example.com/brands/nike in magento

texts:
I have a site naijafeet.com.. In this i want the products listed by attribute(manufacturer) name..If I enter naijafeet.com/brands/nike or puma then the items come from those attribute..Please give me some Idea,I need some help.

I fetch the brands from those attribute..and get the ids from those attribute..ans can send those data on the URL like naijafeet.com/brands?manufacturer=81 but I don't want this..


texts: I want to create new order in magento admin shipping method and payment method is not working

texts:
When I try to create an order via the backend, under
payment method it showes "No Payment Information Required" and

Shipping Method showes "Sorry, no quotes are available for this order at this time."

But in the frontend it showes both of the method.

Did I miss some setting?


texts: How to add a collapsible div in magento CMS block

texts:
I added the new cms->staticblock to add charts in admin and I want to add collapsible div as if the titile is BMI+ if I click on + it has to show the image.Please anyone help me and solve my problem.

In chart.phtml

    <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('chart')->toHtml(); ?>


texts: Getting Parse error: syntax error, unexpected end of file, expecting case (T_CASE) or default (T_DEFAULT) or '}'

texts:
Im getting the following error after switching the site to production mode

Parse error: syntax error, unexpected end of file, expecting case (T_CASE) or default (T_DEFAULT) or '}'

Im getting the error on following file

<?php $helper = $this->helper('Ves\BaseWidget\Helper\Data'); $widget_heading = $this->getConfig('title'); $addition_cls = $this->getConfig('addition_cls'); $stylecls = $this->getConfig('stylecls'); $button_title = $this->getConfig('button_title'); $href = $this->getConfig('href'); $href = str_replace(" ", "+", $href); $href = base64_decode($href); if($href) { $href = $this->getDataFilterHelper()->filter($href); } $icon = $this->getConfig('icon'); $size = $this->getConfig('size'); $color_button = $this->getConfig('color_button'); $el_class = $this->getConfig('el_class'); $content_html = $this->getConfig('html'); $content_html = str_replace(" ", "+", $content_html); $content_html = base64_decode($content_html); $content_html = $this->getDataFilterHelper()->filter($content_html); $custom_size = ''; switch ($size) { case 'small': $custom_size = 'btn-xs'; break; case 'medium': $custom_size = 'btn-sm'; break; case 'larger': case 'tall': $custom_size = 'btn-lg'; break; default: # code... break; } ?> <?php if ($href): ?> <div class="ves-widget widget-button block <?php echo $addition_cls; ?> <?php if (isset($stylecls)&&$stylecls) echo 'block-'.$stylecls;?>"><?php if (isset($widget_heading)&&!empty($widget_heading)): ?>
<?php echo $widget_heading; ?>
<?php endif; ?>
<?php if ($button_title) { ?> <a href="<?php echo $href; ?>" class="btn <?php echo $color_button." ".$el_class." ".$size." ".$custom_size;?>" title="<?php echo $button_title;?>"<?php echo $content_html?(' '.$content_html):'';?>><i class="<?php echo $icon; ?>"> <?php echo $button_title; ?> <?php } ?>

<?php endif; ?>


texts: Indexer configured as update on save, get triggered after an update through web api?

texts:
Documentation says:

  Configure indexers

  Use this command to set the following indexer options:

  Update on save (realtime): Indexed data is updated as soon as a change is made in the Admin. (For example, the category products index is reindex after products are added to a category in the Admin.) This is the default.

But this behaviour fires after a product is updated via web API?


texts: Magento 2 : Page access by customer group

texts: We want create one page like info, and then the page just can access for staff only. The staff from customer group. How to do it, please help me. Thanks


texts: Get product, with 0 quantity, by attribute (sku)

texts:
I'm importing products and I want to get product by its sku. This is the code:

$product = $this->productFactory->create();
$record = $product->loadByAttribute('sku', '1234');

It works but only with products that have quantity > 0 and product is enabled. How can I find product even if quantity == 0 or status is disabled?


texts:
I want to stop my webshop from calculating shipping costs for entire categorie outlet: https://sportinngerritsen.nl/outlet.

I made a shopping cart price rule for this (see the pictures below), but it's not working. What am I doing wrong? I recently updated from 1.6.1 to 1.9.2.1 and it did work before the update.


texts:
I'm migrating magento 1.9.2 to magento2.0.2..
when I migrating data
(php bin/magento migrate:data --reset /vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.1/config.xml)...got the below output...help me if you can..

[2017-03-14 01:28:29][INFO][mode: data][stage: integrity check][step: EAV Step]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:28:29][INFO][mode: data][stage: integrity check][step: Customer Attributes Step]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:28:29][INFO][mode: data][stage: integrity check][step: Map Step]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:28:35][INFO][mode: data][stage: integrity check][step: Url Rewrite Step]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:28:35][INFO][mode: data][stage: integrity check][step: Log Step]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:28:35][INFO][mode: data][stage: integrity check][step: Ratings Step]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:28:35][INFO][mode: data][stage: integrity check][step: ConfigurablePrices step]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:28:35][INFO][mode: data][stage: integrity check][step: OrderGrids Step]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:28:36][INFO][mode: data][stage: integrity check][step: Tier Price Step]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:28:36][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:28:36][INFO][mode: data][stage: setup triggers][step: Stage]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:28:59][INFO][mode: data][stage: data migration][step: EAV Step]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:29:13][INFO][mode: data][stage: volume check][step: EAV Step]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:29:14][INFO][mode: data][stage: data migration][step: Customer Attributes Step]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:29:33][INFO][mode: data][stage: volume check][step: Customer Attributes Step]: started
100% [============================] Remaining Time: 1 sec
[2017-03-14 01:29:33][INFO][mode: data][stage: data migration][step: Map Step]: started
36% [==========>-----------------] Remaining Time: 14 mins

                                                                                [PDOException]
                                                                                SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '64-18' for key 'CAT_PRD_ENTT_MDA_GLR_VAL_TO_ENTT_VAL_ID_ENTT_ID'


texts: Magento CE 2 Need to get shipping quote with multiple packages on one order

texts:
Most of the products we sell only fit one item per package a few will fit more than one per package.  How can we setup Magento for multiple package shipments for one order?

On our last order the customer ordered three of the same product, each product is 18 lb the UPS quote was for one 54 lb package $58.06.  When we shipped, the shipment was three 18 lb packages with a total of $72.21.

Prefer a DIY or open source solution.

Thanks

Magento CE 2.1
OpenSuse 13.2
Apache 2.4.10
Varnish 4.1.3
Redis 3.2.3
nginx 1.11.2


texts: Free Shipping Calculation Problem, Possible Fraud Order, Exploit or Misconfiguration?

texts:
We have a rule setup to give free shipping on orders over $49.  We had a very suspicious order come through where the discount didn't make sense:

You can see in the screenshot the only coupon listed in savings is the "eligible for free shipping".  Yet they got $150 listed here.  If you look at the product rows they got a hefty discount for each item in the order.

This person paid with the standard magento paypal module.

Here's our Shopping Cart Price Rule config:

So it it a misconfig or exploit?


texts: Magento2 Filter shipping method based on Order Total and Country Selected

texts:
I want to filter shipping method in magento2 as below given manner.

Case1: If the Order total is less than $75 and the country is USA display Flat Rate Shipping $7

case2: If the Order total is greater than $75 and the country is USA display Free Shipping

case3: If the country is other than the USA no matter whatever is ordered total display Table Rate Shipping $30

But at a given time checkout page should display only one of the above shipping based on the conditions.

Any help should be appreciated.
Thanks in advance.


texts: Unavailable images on order email from private website

texts:
I have a Magento 1.9 installation that uses multiple stores and one of them is password protected, using .htaccess and .htpasswd. When an order is placed on the password protected website, the order email images don't show. Instead, they are replaced by links (as shown below)

The link points to my private website and I know that the problem is that my email provider (gmail in my case) can't access the files because accessing the url requires a password. I know what the problem is, but I am wondering what would be the cleanest solution to this problem.


texts: Magento increase CPU system usage after 1.7.0.2 update to 1.9.3.3

texts:
After I updated Magento, it starts to use more CPU than usual as you can see below. After 05-07, CPU system time increases, just at the day I updated Magento to 1.9.3.3.

In this second image you can see CPU usage closer. After clearing cache, CPU system usage drops (between 21:00 and 22:00):

Is there any explanation for this high CPU system usage after Magento update?

I guess cache is more used in this new Magento version, so that it uses more system to read the cache.

Is this ok? Should I care?


texts: Is there any Magmi alternate for Magento 2.3.5?

texts:
Is there any extension available for Magento 2.3.5  like Magmi which can create categories and products from csv file.

Regards.


texts: How to enable alt tag for the E commerce product page images in Magento?

texts:
I am using the Magento for my http://www.thelabellife.com/ website and I can not add the alt tag for all images on the product pages.
I have discussed with developer team as well, they are saying it is not possible that we can integrate backend code alt access in Magento.
Kindly help me on that, can I integrate alt images with the back end coding so that I can give the different names for the purpose of better search result in search engines?


texts:
What would be the easiest way to copy all products (including images) and categories from one installation of Magento to another one (completely empty and vanilla) on the same server?
I don't need to keep orders, users, etc. but only the products. I don't mind, however, copying these too. I also don't need them to keep the same keys, as long as the association with the appropriate categories stays the same.

Exporting to CSV and importing seems particularly messy, while just duplicating the database simply won't work...


texts: Issue in saving the multiselect dropdown values

texts:
I had created the new field of multi select dropdown the values are getting selected but they are not saving in DB.

I had created the column in table.

SQL Query:

ALTER TABLE `mg_hospital` ADD `specilaities` VARCHAR(60) NOT NULL ;

Can you please suggest how to solve my problem?


texts: How to call CMS Block via its identifier in Product edit / add page?

texts:
I want to call a CMS Block via its identifier in a product attribute to display CMS block on product page.

Want to show different Static Block  on  different products

So how can I achieve this via attribute where I can enter identifier of CMS block?

Any help will be highly appreciated.

Update:

themeVendor/themeName/Magento_Catalog/templates/product/view/attributes.phtml

  Block ID: shipping_test

  attribute ID: size_map

<?php if ($_additional = $block->getAdditionalData()): ?>

<?php /* @escapeNotVerified */ echo __('More Information') ?>

<?php foreach ($_additional as $_data): ?>

<?php if ($_data['label'] == "size_map") { ?>

<?php echo $_data['label'] ?>
<?php echo $_data['label'] ?>:
<?php /* @escapeNotVerified */ echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId($_data['value'])->toHtml() ?>

<?php } else { ?>

<?php echo $block->escapeHtml(__($_data['label'])) ?>
<td class="col data" data-th="<?php echo $block->escapeHtml(__($_data['label'])) ?>"><?php /* @escapeNotVerified */ echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?>

<?php } ?>


texts: Manually override shipping rate in admin

texts: Here is an unusual problem that I'm struggling with. I looked at different extensions and could not find one that do what I need. I need to be able to manually override shipping price for selected method in admin. There is plenty extensions allowing to enter freehand shipping method and price, but in this case I need to be able to override just the price of one of the standard method. E.g. customer calls and we want to give UPS Ground shipping for $5, so I need to be able to manually enter $5 as rate but I need to have the ups_GND as shipping method in the db. Any pointers where to start coding something like this?


texts:
From this question and Sander Mangel answer:

Disabling modules - performance improvement?

  First of all, less modules means less code to (potentially) load and process. Next to that, a lot of modules, like for example the Mage_Rss module run a lot of code in the background like forcing reindexes on certain events.

Because the above question was not directly meant to share a module list I think is a good idea to collect info here.

Other useful Resources:

Magento Lite
Mock Module

Any other module suggestion ?
Which module has more impact in performance?

UPDATE

An update list with @Marius suggestions

Mage_WishList - looks it break customer details
Mage_Rss
Mage_PayPalUk
Mage_Tag (when not used in a project)
Mage_Poll (cause who uses polls anyway)
Phoenix_Moneybookers
Mage_Sendfriend
Mage_Rating ( if not required by client)
Mage_Bundle ( if not required by client)
Mage_Downloadable ( if not required by client)
Mage_GiftMessage - looks you need it in 1.8 or product details will break
Mage_XmlConnect - if you don't have / need a mobile app.
Mage_Authorizenet
Mage_Paypal (if not used as a payment method)
Mage_Paygate (Only if you disable Mage_Paypal, Mage_PaypalUk and Mage_Authorizenet)
Mage_Weee (only if you disable Mage_XmlConnect also)
Mage_Usa - only in ce-1.8.1.0. (see below why)
Mage_GoogleCheckout - can only be disabled in ce-1.8.1.0 and only if you disable Mage_Usa. It doesn't work for previous versions because of this http://www.magentocommerce.com/bug-tracking/issue/?issue=14359
Mage_Oauth - if you don't need the REST API
Mage_Api
Mage_Api2 - only if you disable the Mage_Oauth also.


texts:
I've been trying to create my own EAV entity CRUD module for Magento2.
As inspiration I took the product entity.
I'm at the add/edit form step and I'm looking at the product_form.xml ui component from the catalog module.
I don't want to blindly copy/paste/replace everything, so I'm curious to what this setting does:

<item name="childrenFromMeta" xsi:type="boolean">true</item>

I've also seen it in the category form  and product attribute add form, but I didn't find anything related to it in the code.


texts:
Validate Ui Component generated form fields inside dynamic rows
  container that are dependent of another field value

There is a possibility to add one or more addresses for a new/existing customer via Magento 2 backend|admin side.

There is a functionality called dynamic rows.

Basically every time you want to add a new address you click a button and a new form is generated.

This forms are generated via Ui Component with the help of knockout js.
Id's on this input form fields are random. And here comes the problem.
Let's say we want to validate the VAT number based of the value entered for the country.

  I know how to add validation on the VAT number field but how do I
  retrieve  information about the country?

Inside the validation function we only have access to the value entered. No information about the field id or name and given that there are more possible forms how do I know how which country field do I need to retrieve selected country information from?

I have found a pattern in the names of the field and I have a solution in which I basically check all forms one by one. This is really dirty and checks values already checked which makes it highly inefficient.

  Can't I pass information about the html node to the validation
  function? Is there a elegant way to solve this?

Any help is appreciated.


texts: Payment with PayPal but it redirect to cart page instead of PayPal, How can i solve this?

texts:
Redirects to cart page and it will not shows any error. While checking log it shows me below log

[url] => https://api-3t.sandbox.paypal.com/nvp

    [SetExpressCheckout] => Array
        (
            [PAYMENTACTION] => Authorization
            [AMT] => 557.48
            [CURRENCYCODE] => GBP
            [RETURNURL] =>
            [CANCELURL] =>
            [INVNUM] => 100000070
            [SOLUTIONTYPE] => Mark
            [GIROPAYCANCELURL] =>
            [GIROPAYSUCCESSURL] =>
            [BANKTXNPENDINGURL] =>
            [LOCALECODE] => en_GB
            [ITEMAMT] => 557.48
            [TAXAMT] => 0.00
            [SHIPPINGAMT] => 0.00
            [L_NUMBER0] => BC220[¬!~U
            [L_NAME0] => WEETABIX A PACK *
            [L_QTY0] => 1
            [L_AMT0] => 38.74
            [L_NUMBER1] => BC220[¬!~I
            [L_NAME1] => WEETABIX A PACK *
            [L_QTY1] => 1
            [L_AMT1] => 38.74
            [L_NUMBER2] => BA040   CR[¬!~U
            [L_NAME2] => BACON FARMHOUSE STREAKY
            [L_QTY2] => 15
            [L_AMT2] => 16.00
            [L_NUMBER3] => BA040   CR[¬!~I
            [L_NAME3] => BACON FARMHOUSE STREAKY
            [L_QTY3] => 15
            [L_AMT3] => 16.00
            [BUSINESS] => company
            [NOTETEXT] =>
            [EMAIL] => example.123@gmail.com
            [FIRSTNAME] => Andrew
            [LASTNAME] => Mcmillan
            [MIDDLENAME] => Vann
            [SALUTATION] =>
            [SUFFIX] =>
            [COUNTRYCODE] => US
            [STATE] => NY
            [CITY] => new York
            [STREET] => 90 Northwest Boulevard
            [ZIP] => 10001
            [PHONENUM] => 201-938-9322
            [SHIPTOCOUNTRYCODE] => US
            [SHIPTOSTATE] => NY
            [SHIPTOCITY] => new York
            [SHIPTOSTREET] => 90 Northwest Boulevard
            [SHIPTOZIP] => 10001
            [SHIPTOPHONENUM] => 201-938-9322
            [SHIPTOSTREET2] => Jersey City
            [STREET2] => Jersey City
            [SHIPTONAME] => Andrew  Vann Mcmillan
            [ADDROVERRIDE] => 1
            [METHOD] => SetExpressCheckout
            [VERSION] => 72.0
            [USER] => ****
            [PWD] => ****
            [SIGNATURE] => ****
            [BUTTONSOURCE] => Magento_Cart_Community
        )

    [response] => Array
        (
            [HTTP/1.1 200 OK
        Date: Wed, 20 Jan 2016 10:02:35 GMT
        Server: Apache
        X-PAYPAL-OPERATION-NAME: SetExpressCheckout
        X-PAYPAL-API-RC:
        Connection: close
        Content-Length: 137
        Paypal-Debug-Id: bae7e9057d95a
        Set-Cookie: X-PP-SILOVER] => name=SANDBOX3.API.1&silo_version=880&app=appdispatcher_apit&TIME=995860310; domain=.paypal.com; path=/; Secure; HttpOnly
        Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT
        Content-Type: text/plain; charset=utf-8

        TOKEN=EC-8PG38821N3655212U
                    [TIMESTAMP] => 2016-01-20T10:02:35Z
                    [CORRELATIONID] => bae7e9057d95a
                    [ACK] => Success
                    [VERSION] => 72.0
                    [BUILD] => 18308778
                )

            [__pid] => 28435

    )


texts: Magento 2 How to hide price of product and add to cart button and Show a custom Link if not logged in

texts: How to Hide the Price of the product and also add to cart button if the user is not logged in and want to give a link in place of Add to cart button to Login.


texts: How to remove particular mass action option from dropdown in Magento2

texts:
Sales -> Orders -> Mass Action
Here I want to remove the Print Invoice button from the drop-down.


texts:
what is the use of  Shipping Settings in magento. What & how it works? What happen with country and state selected from here? Does it make any restriction is yes then where it make?

System->configuration->sales->Shipping Settings


texts: Image is not loaded in product detailed page only magento 2.3

texts:
I have added the image in admin panel backend image show homepage,category page show but product detailed  page image is not shown certain url link.i have shared.
URL:https://sarikart.com/3003maroon-exclusive-handloom-saree-collection.html


texts: Magento 2.4.0 - Getting Error Could not validate a connection to Elasticsearch. No alive nodes found in your cluster

texts:
I am getting below error while installing Magento 2.4.0 using command line.
 Could not validate a connection to Elasticsearch. No alive nodes found in your cluster

I have run below two commands.
composer create-project --repository=https://repo.magento.com/ magento/project-community-edition magento240
php -dmemory_limit=-1 bin/magento setup:install --base-url="http://127.0.0.1/magento240" --db-host="localhost" --db-name="magento240" --db-user="root" --db-password="root123" --admin-firstname="admin" --admin-lastname="admin" --admin-email="admin@admin.com" --admin-user="admin" --admin-password="admin123" --language="en_US" --currency="USD" --timezone="America/Chicago" --use-rewrites="1" --backend-frontname="admin"
Also used below commands.
php -dmemory_limit=-1 bin/magento setup:install --base-url="http://127.0.0.1/magento240" --db-host="localhost" --db-name="magento240" --db-user="root" --db-password="root123" --admin-firstname="admin" --admin-lastname="admin" --admin-email="admin@admin.com" --admin-user="admin" --admin-password="admin123" --language="en_US" --currency="USD" --timezone="America/Chicago" --use-rewrites="1" --backend-frontname="admin" --search-engine=mysql
php -dmemory_limit=-1 bin/magento setup:install --base-url="http://127.0.0.1/magento240" --db-host="localhost" --db-name="magento240" --db-user="root" --db-password="root123" --admin-firstname="admin" --admin-lastname="admin" --admin-email="admin@admin.com" --admin-user="admin" --admin-password="admin123" --language="en_US" --currency="USD" --timezone="America/Chicago" --use-rewrites="1" --backend-frontname="admin" --elasticsearch-host=elasticsearch --elasticsearch-username=elastic --elasticsearch-password=changeme
Thank you.


texts:
What is the difference between map vs path when building a theme / module?

Which are the restrictions?

var config = {

 map: {
    '*': {
        'jqueryjs': 'India_Newtheme/js/jquery',
        'bootstrapmin': 'India_Newtheme/js/vendor/bootstrap.min'
    }
  },
  paths: {
      'jqueryjs': 'India_Newtheme/js/jquery',
      'bootstrapmin': 'India_Newtheme/js/vendor/bootstrap.min'
  }
};


texts: add filter before load data in custom admin grid in magento 2

texts:
Here i have to add filter in charity and fee column,if charity is filled then display in grid otherwise that data should not show in grid.

But all record's are displayed.
I have 2 order in one order charity is applied. I want to display only that order wich charity is applied.  please help..

Thank you..


texts: What is the difference between web/template and web/templates

texts:
I've noticed in the core both web/template and web/templates are used:

vendor/magento/module-ui/view/frontend/web/templates/group/group.html
vendor/magento/module-ui/view/frontend/web/template/messages.html

Is this a mistake or is there a reason why there are two different directories?


texts:
1 exception(s):
Exception #0 (Exception): Notice: Undefined index: id in /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63


texts: How to merge guest cart product into active customer cart using REST API

texts:
I need to merge the guest cart items into customer active cart using end point API but as per my code its throwing the following error.

Array
(
    [message] => Cannot assign customer to the given cart. Customer already has active cart.
)

I am explaining my code below.

$adminUrl1='http://example.com/index.php/rest/V1/integration/customer/token';
    $ch1 = curl_init();
    $data1 = array("username" => 'abc@gmail', "password" => 'Oditek123@');
    $data_string1 = json_encode($data1);
    $ch1 = curl_init($adminUrl1);
    curl_setopt($ch1, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch1, CURLOPT_POSTFIELDS, $data_string1);
    curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch1, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data_string1))
    );
    $token1 = curl_exec($ch1);

$quoteUrl ='http://example.com/index.php/rest/V1/guest-carts/z5546670365f8d78882b03ea9b1f8e08';
    $data_string2=array("customerId"=>84,"storeId"=>1);
    $chQuote = curl_init($quoteUrl);
    curl_setopt($chQuote, CURLOPT_CUSTOMREQUEST, "PUT");
    curl_setopt($chQuote, CURLOPT_POSTFIELDS, json_encode($data_string2));
    curl_setopt($chQuote, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token1)));
    curl_setopt($chQuote, CURLOPT_RETURNTRANSFER, true);
    $array = json_decode(curl_exec($chQuote),TRUE);
    print_r($array);exit;

Here I need to transfer all guest cart items into customer active cart after customer login. Please help me to resolve this issue.


texts: Sorting and filtering not working with custom column in Customer Grid Magento

texts:
I have add a custom column in customer grid by copying core Grid.php file to local folder. I want to show last order date of customer in a column. So I have tried below code in collection.

protected function _prepareCollection()
    {
        $collection = Mage::getResourceModel('customer/customer_collection')
            ->addNameToSelect()
            ->addAttributeToSelect('email')
            ->addAttributeToSelect('created_at')
            ->addAttributeToSelect('group_id')
            ->addAttributeToSelect('track_device')
            ->addAttributeToSelect('inchoo_socialconnect_fid')
            ->addAttributeToSelect('inchoo_socialconnect_gid')
            ->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left')
            ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left')
            ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
            ->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
            ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');

       // add last_order_date column
            $sql ='SELECT MAX(o.created_at)'
                . ' FROM ' . Mage::getSingleton('core/resource')->getTableName('sales/order') . ' AS o'
                . ' WHERE o.customer_id = e.entity_id ';
            $expr = new Zend_Db_Expr('(' . $sql . ')');

            $collection->getSelect()->from(null, array('last_order_date'=>$expr));

        $this->setCollection($collection);

        return parent::_prepareCollection();
    }

here is the column code--

$this->addColumn('last_order_date', array(
            'header'    => Mage::helper('customer')->__('Last Order Date'),
            'type'      => 'datetime',
            'align'     => 'center',
            'index'     => 'last_order_date',
            'filter'    => true,
            'sortable'  => true ,
            'gmtoffset' => true,
        ));

column showing correct values but Sorting and Filtering not working for this column. What is wrong there.


texts:
Eliminate render-blocking JavaScript and CSS in above-the-fold content

Your page has 27 blocking script resources and 4 blocking CSS resources. This causes a delay in rendering your page.

 Remove render-blocking JavaScript:
    https://myweb/…js/smartwave/jquery/jquery-1.11.3.min.js
    https://myweb/…twave/jquery/jquery-migrate-1.2.1.min.js
    https://myweb/…js/smartwave/jquery/jquery-noconflict.js
    https://myweb/js/smartwave/jquery/jquery-ui.min.js
    https://myweb/…y/plugins/fancybox/js/jquery.fancybox.js
    https://myweb/js/smartwave/ajaxcart/ajaxaddto.js
    https://myweb/js/varien/product.js
    https://myweb/js/varien/configurable.js
    https://myweb/js/calendar/calendar.js
    https://myweb/js/calendar/calendar-setup.js
    https://myweb/…ry/plugins/etalage/jquery.etalage.min.js
    https://myweb/…query/plugins/etalage/jquery.zoom.min.js
    https://myweb/…cybox/js/jquery.mousewheel-3.0.6.pack.js
    https://myweb/…ry/plugins/selectbox/jquery.selectbox.js
    https://myweb/…y/plugins/parallax/jquery.stellar.min.js
    https://myweb/…uery/plugins/parallax/jquery.parallax.js
    https://myweb/js/smartwave/jquery/jquery.cookie.js
    https://myweb/…plugins/owl-carousel/owl.carousel.min.js
    https://myweb/…/smartwave/bootstrap/js/bootstrap.min.js
    https://myweb/…d/smartwave/porto/js/lib/imagesloaded.js
    https://myweb/…ave/porto/js/configurableswatches/app.js
    https://myweb/…/smartwave/porto/megamenu/js/megamenu.js
    https://myweb/skin/frontend/base/default/js/bundle.js
    https://myweb/…twave/porto/quickview/js/sw_quickview.js
    https://myweb/…default/socialfeeds/js/twitterfetcher.js
    https://myweb/…n/frontend/smartwave/porto/js/wow.min.js
    https://myweb/…kin/frontend/smartwave/porto/js/porto.js

How do I fix this issue?


texts:
There was an error parsing JSON data

Unexpected token < in JSON at position 0

{
  "request": {"AAGAG":"FDASFA"}

}

  /Vendor/CustomerApi/Api/CustomerApiInterface.php

namespace Vendor\CustomerApi\Api;

interface CustomerApiInterface
{
    /**
     *
     * @api
     *
     * @param mixed $request
     *
     * @return void
     */
    public function saveInformation($request);
}

  Vendor/CustomerApi/Model/CustomerApi.php

<?php

namespace Vendor\CustomerApi\Model;

class CustomerApi implements \Vendor\CustomerApi\Api\CustomerApiInterface
{
    /**
     * {@inheritDoc}
     */
    public function saveInformation($request)
    {
        return "HEELLO";
    }
}


texts: What are all the tools available for checking Magento 2 coding standard?

texts:
I am currently working on Magento 2 coding standard checking project.

Is any other tool available, other than PHP_CodeSniffer,  to check Magento 2 and PHP coding standing?


texts: Remove or overwrite style-l.css in custom theme

texts:
I have some issues because of the order that CSS is being loaded in. We have

<link  rel="stylesheet" type="text/css"  media="all" href="https://<site>/pub/static/_cache/merged/c53078aed3784c1f81c0316580b47a29.css" />
<link  rel="stylesheet" type="text/css"  media="screen and (min-width: 768px)" href="https://<site>/pub/static/frontend/Thespicery/standard/en_GB/css/styles-l.css" />

I really need the cached file to be loaded after the style-l.css.

I am relatively happy to remove the style-l.css altogether but as yet have failed.

I have tried:

Removing the parent them (current Magento Blank) from the XML but this doesn't actually remove the reference to the file - it only deletes the actual file and then gives a 404 error (which technically works but I don't want the <link> in the source code
In default_head_blocks.xml for Magento Theme overrides adding:

<action method="removeItem"><type>skin_css</type><name>css/style-l.css</name></action>

and

<action method="removeItem"><css src="css/styles-l.css" media="screen and (min-width: 768px)"/></action>

but to no avail.

What is the correct way of doing this? Should I just try to change the load order (is that even possible), or should I remove style-l.css (and if so, how?)?


texts: Magento 2.3: How I can create a text swatch attribute programatically?

texts:
In my InstallData class I have the following code, it perfectly creates the attribute for me but this creates it as Dropdown and I need it to be Swatch Text.

What option am I missing?

$productTypes = [
        \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE,
        \Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL,
        \Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE,
        \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE,
    ];
    $productTypes = join(',', $productTypes);

    $eavSetup->addAttribute(
        \Magento\Catalog\Model\Product::ENTITY,
        'web_volumen',
        [
            'type' => 'int',
            'group' => 'Module',
            'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend',
            'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Table',
            'label' => 'VOLUMEN',
            'input' => 'select',
            'class' => '',
            'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
            'visible' => true,
            'required' => false,
            'user_defined' => true,
            'default' => '',
            'searchable' => true,
            'filterable' => true,
            'comparable' => false,
            'visible_on_front' => true,
            'used_in_product_listing' => true,
            'apply_to' => $productTypes,
        ]
    );