texts: After updating only product price through Csv using Sku code, it changes quantity to 0 in magento 1.6.0

texts:
We have updated only the price using Magento CSV import functionality, but it automatically changes my product quantity as well.
Below is the CSV file format

Can anyone suggest why this is happening and recommend a solution?


texts: Magento 2 admin custom route results in 404 error

texts:
I'm beginning with Magento CE 2.1 and I'm stuck with an admin custom route issue that results in a 404 error.

I created a module named 'VM_import' and get it registered (checked).

Now i try to create a custom route :

file : app\code\ [company_name]\VM_import\etc\adminhtml\routes.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="admin">
        <route id="example" frontName="example">
            <module name="VM_import" before="Magento_Backend" />
        </route>
    </router>
</config>

and a dedicated Controller :

file : app\code\ [company_name]\VM_import\Controller\Adminhtml\Index\Index.php

<?php
namespace <company_name>\VM_import\Controller\Adminhtml\Index;
class Index extends \Magento\Backend\App\Action
{
    public function execute()
    {
        echo 'it works !';
        die();
    }
}

Then trying to access to http://[host]/[admin_path]/example results in a 404 error page.

I believe i did something wrong (paths, namespaces, ...) that makes the routing process fail but I cannot figure out what it is or how to efficiently debug it.

Any help would be really appreciated :)


texts: related product not displaying out of stock product in magento 1.9

texts: I have a problem in my single product view page the related product not displaying the out of stock product but in category list it display all products including out of stock product


texts: I have the following error what should I do?

texts: PHP Fatal error: Uncaught Error: Class Zend_Cache_Backend_File not found in /home/xxx/public_html/lib/Zend/Cache.php:153


texts: Translating custom strings into theme knockout templates

texts:
I know that this issue has been dealt with several times in this forum

Magento2 localisation Javascript

Magento 2 - translating problem in JS templates

Magento2 translating Javascript (KO) template text

I have installed the Italian language pack on my Magento 2.1.9 project and most strings are correctly translated.

I added a new translation dictionary in my theme.

vendor/<Vendor>/<Theme>/i18n/it_IT.csv

Here I've modified some translations and added the new strings of my theme to translate. For strings included in phtml files everything works fine.

I added a some custom strings in knokout templates of checkout. For example in

<My-theme>/Magento_Checkout/web/template/authentication.html

I added

Then in my theme it_IT.csv:

"Do you already have an account?","Hai già un account?"

Of course I emptied cache, pub/static/, var/view_preprocessed/, var/generation, etc.. and I runned all the commands.

The strings are still in English.

I really have to create a new language package to translate a few strings in the checkout? What's the reason?

EDIT Online translations work for all strings. It can be a way to fix it temporarily but not the definitive solution.


texts: magento 2 addtocart.phtml template file can not override

texts:
I need little help,I am trying to override vendor\magento\module-catalog\view\frontend\templates\product\view\addtocart.phtml but no luck

I am using Magento 2.1 version.

I tried below code in my module
file location: Myvendor1_Module1/view/frontend/templates/catalog/product/view/addtocart.phtml

Layout file: catalog_product_view

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <body>
       <referenceBlock name="product.info.addtocart">
           <action method="setTemplate">
            <argument name="template" xsi:type="string">Myvendor1_Module1::catalog/product/view/addtocart.phtml</argument>
           </action>
       </referenceBlock>
   </body>
</page>

I already cleared cache, generation folder and as well as flush cache but it cannot override addtocart.phtml template file.

Edit: My module is fine working and it is enabled.
Please help


texts: Mini cart content not rendering properly in Magento 2?

texts:
I am using Magento 2.3

I have custom header and I have added minicart in the header but the issue is that content is not rendering in minicart properly.

Please refer below screenshot:

As you can see in above image I have 2 quantity of same products in my cart but product is not displaying in minicart popup

I have added below code in my header file:

  <?php  echo $this->getLayout()->createBlock('Magento\Checkout\Block\Cart\Sidebar')->setTemplate('Magento_Checkout::cart/minicart.phtml')->toHtml(); ?>

  minicart.phtml

<?php /**  * Copyright © Magento, Inc. All rights reserved.  * See COPYING.txt for license details.  */

// @codingStandardsIgnoreFile

/** @var $block \Magento\Checkout\Block\Cart\Sidebar */ ?>

    <a class="action showcart" href="<?= /* @escapeNotVerified */ $block->getShoppingCartUrl() ?>"
       data-bind="scope: 'minicart_content'">
        <?= /* @escapeNotVerified */ __('My Cart') ?>

    <?php if ($block->getIsNeedToDisplaySideBar()): ?>

            <?= $block->getChildHtml('minicart.addons') ?>

    <?php endif ?>

also summary count is not displaying as well.

So how can I add minicart in header without any issues?


texts: Magento2: Override layered navigation template

texts:
I am trying to override layered navigation template in a Magento2 app. Here is my code:

Layout configuration:

<!-- app/code/MyVendor/MyModule/view/frontend/layout/default.xml -->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="catalog.leftnav">
        <arguments>
            <argument name="template" xsi:type="string">MyVendor_MyModule::view.phtml</argument>
        </arguments>
    </referenceBlock>
    <referenceBlock name="catalogsearch.leftnav">
        <arguments>
            <argument name="template" xsi:type="string">MyVendor_MyModule::view.phtml</argument>
        </arguments>
    </referenceBlock>
</body>

Module configuration:

<!-- // app/code/MyVendor/MyModule/etc/module.xml -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/framework/Module/etc/module.xsd">
<module name="MyVendor_MyModule" setup_version="2.0.0">
    <sequence>
        <module name="Magento_Catalog"/>
        <module name="Magento_CatalogSearch"/>
        <module name="Magento_Swatches"/>
        <module name="Magento_ConfigurableProduct"/>
        <module name="Magento_Eav"/>
        <module name="Magento_Customer"/>
        <module name="Magento_Store"/>
        <module name="Magento_Backend"/>
        <module name="Magento_MediaStorage"/>
        <module name="Magento_Config"/>
        <module name="Magento_LayeredNavigation"/>
        <module name="Magento_Theme"/>
    </sequence>
</module>

Template file:

// app/code/MyVendor/MyModule/view/frontend/templates/view.phtml
Some template code here

I have cleared the cache (including "generation" folder) and recompiled dependencies, still Magento loads the template from LayeredNavigation module. How do I make it render my custom template instead?

UPDATE:
I was able to override it in my custom theme:
app/design/frontend/MyVendor/MyTheme/Magento_LayeredNavigation/templates/layer/view.phtml

So now the question is, how to make a template in custom module override one set by a custom theme?


texts: Redirect to product's page and have attributes automatically selected

texts:
From a controller I redirect to a configurable product's page by

$productUrl = $this->_customSearch();
$url = Mage::getBaseUrl().$productUrl.'.html';
header('Location: '.$url);
die();

The children products can be searched by specific attribute (corresponding to their color group) and I want when the user is redirected to the product page - the attribute "Color" (a drop-down menu) to already have the certain color selected, depending on the searched value.

Now, what I cannot wrap my mind around is how to make the attribute auto-selected when the page loads. In the controller I can get the color of the product from the product object, but what next? I guess I have to deal with Ajax here, but the URL of the product's page has nothing that can give me a hint.

Any ideas?


texts:
I installed the extension and now I have this error :

  Fatal error: Class 'Freightquote_Shipping_Model_Resource_Eav_Mysql4_Setup' not found in includes/src/Mage_Core_Model_Resource_Setup.php on line 234.


texts: How to solve Post/Get Method use in postman with Magento controller?

texts:
I am using Magento controller URL with Postman.
When I select Get Method in postman then it runs perfectly with execute method.
But when I use the Post Method that time it breaks from the execute() method. It means for the Post method, the execute method, not works.

Any idea for this issue?
my code is

<?php
namespace Lucent\SocialLogin\Controller\Login;

class Test extends \Magento\Framework\App\Action\Action
{

    protected $_customer;
    protected $_customerSession;

    public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Customer\Model\Customer $customer,
    \Magento\Customer\Model\Session $customerSession
    )
    {

        $this->data = $_REQUEST;
        print_r($this->data);
        $this->_customer = $customer;
        $this->_customerSession = $customerSession;
        return parent::__construct($context);
    }

    public function execute()
    {
        //$postData = $this->getRequest()->getPost();
        //print_r($this->getRequest()->getParam('test'));
        //print_r($this->data);
        //print_r($postData);
        echo '1';
        die();

    }
}
?>


texts:
I'm using Magento 1.9.4 and after uninstalling a 3rd party module, I keep getting this error in exception.log:

  Mage_Core_Exception: Invalid block type: Mage_Dailydeals_Block_Widget
  in /var/www/html/app/Mage.php:598

Stack trace:
#0 /var/www/html/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block type...')
#1 /var/www/html/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('Mage_Dailydeals...', Array)
#2 /var/www/html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('dailydeals/widg...', 'bb7635818b4ed88...')
#3 /var/www/html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('dailydeals/widg...', 'bb7635818b4ed88...')
#4 /var/www/html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /var/www/html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /var/www/html/.modman/magento_corefixes/src/app/code/local/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /var/www/html/app/code/core/Mage/Cms/Helper/Page.php(113): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /var/www/html/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
#9 /var/www/html/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home')
#10 /var/www/html/.modman/magento_corefixes/src/app/code/local/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#11 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#12 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /var/www/html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#14 /var/www/html/app/Mage.php(686): Mage_Core_Model_App->run(Array)
#15 /var/www/html/index.php(83): Mage::run('base', 'website')
#16 {main}

Removed everything from DB and checked the code for any remaining PHP file but did not find anything.

Can someone please help me remove this bug?


texts:
I am using Magento 1922 with a custom theme. By default Magento comes with 4 Store Views: English, German, Spanish, Russian). I created a new store view named French/french, it has a language set up. When I switch in frontend the language to French the whole layout gets nuts. In backend all store views have the same options in Web section, all coming from Default Config. French has them too, but something makes it not working as expected. In order to fix this I had to fill in the Layout input box in Default Config.

Question: Why those 4 Store Views are displaying great and getting correctly the layout without being specified (only package, templates and skin are filled in as value) and this new store, which has the same values, is not working without having layout filled in.


texts: Query to get first time customers per week

texts:
how can I get the number of new/first time customers per week from my magento store with an SQL query?

Does somebody knows that?

Thanks.


texts:
Override below file in custom extension

Core module path: vendor/amasty/module-gift-card-account/view/adminhtml/ui_component/amgcard_account_formnew.xml
Custom extension path: app/code/Ghanda/GiftCardAccount/view/adminhtml/ui_component/amgcard_account_formnew.xml

I need to change balance field validation from 'validate-digits' to 'validate-number'. File properly overriding but validation calling from the core module not the overriden file.


texts:
I came across a magento 1 issue where a helper cannot be found and it breaks the website. It happened once I installed my custom extension. I have this helper which is defined in config.xml:

Mymodule_Extra_Helper_Data

The error i'm seeing is:

Array
(
    [type] => 1
    [message] => Class 'Mage_Connector_Helper_Data' not found
    [file] => /var/www/vhosts/mastrum.com/dev.mastrum.com/app/Mage.php
    [line] => 547
)

Instead of Mymodule_Extra_Helper_Data magento is looking for Mage_Connector_Helper_Data.

Why is that? Any help appreciated!


texts: Magento1.9 : How to get currency symbol data in custom module template file

texts:
I have created a template file in my custom module and I want to load all currency symbol data in my template file similar to Manage Currency -> Symbol block.

I tried :

$currencysymbol = $this->getLayout()->getBlock('currencysymbol/system_currencysymbol');
$currencysymbol->getCurrencySymbolsData();

But getting error Call to a member function getCurrencySymbolsData() on a non-object.

How to get all currency symbol in custom template file?


texts: Magento 2 REST API PayPal Payment method

texts: I am using REST API to create orders. I would like to know which is the right API call and payload if paypal express checkout is the payment method to process payment and generate invoice.


texts: Base URL getting appended to end or URL and causing 404's

texts:
I have a magento installation (migration) which has been working fine and then suddenly it is adding the base url to the end of urls.

I have checked the database base url entries - all fine
I have checked the .htaccess file - all fine

In fact changing these makes no difference whatever. I am unsure whether the host or the client has made changes, client says not.

Any ideas what this maybe? It's only a demo site at this moment so not uber critical but it's bugging me what it can be.

I've even tried remigrating the old database incase a setting had been changed.

Here's the url: http://baobab.getdoji.co.uk/baobab.getdoji.co.uk/


texts: Email when customer clicks Notify Me on out of stock product

texts:
Can someone point me in the right direction.

I need my website to send an email to myself when someone subscribes to the product stock notification of an out of stock product. I.e. they click Notify Me, which subscribes them to that products stock status.

I want to know that this action has occurred, with the product details in the email sent to me.


texts: Varnish / Magento, Monitoring & Partial Cache Clears

texts:
As a admin user, I'm interested in monitoring the status of my site's cache.  Specifically, what's 'hot' in the cache and what's not.

The background is... I have a feeling that some of my admin activities are partially clearing the cache.

To specifically state the question:

How do you monitor your website's cache? What tools and workflow?
Does this method take note of partial and full cache clears?
Feel free to add any insight into surprising things that clear the cache.


texts: Warning: include(Abraham\TwitterOAuth\Config.php): failed to open stream: No such file or directory in Varien\Autoload.php on line 94

texts:
Can somebody help me, pardon me i'm new to magento.. i want to use https://github.com/abraham/twitteroauth as external lib i put it in magento 1.9 lib directory

the folder tree like:lib\TwitterOAuth\src

then i use it in a .phtml page and its controller in \design\frontend\base\default\template

then i include the class:

require Mage::getBaseDir('lib') . '/TwitterOauth/autoload.php';
use Abraham\TwitterOAuth\TwitterOAuth;

Like 2 weeks ago it was running smoothly i could use the class until the user logged in and calledback, and i didn't face error like this. i don't how now its throwing error. why varien autoload take part on this..


texts: What is the meaning of the "mage_catalog_compare_item" Database-Table in Magento 1.5?

texts:
In my Magento Database I have a table named mage_catalog_compare_item. For what is this table good? It has some entries and the columns are:

+-------------------------+----------------------+------+-----+---------+----------------+
| Field                   | Type                 | Null | Key | Default | Extra          |
+-------------------------+----------------------+------+-----+---------+----------------+
| catalog_compare_item_id | int(11) unsigned     | NO   | PRI | NULL    | auto_increment |
| visitor_id              | int(11) unsigned     | NO   | MUL | 0       |                |
| customer_id             | int(11) unsigned     | YES  | MUL | NULL    |                |
| product_id              | int(11) unsigned     | NO   | MUL | 0       |                |
| store_id                | smallint(5) unsigned | YES  | MUL | NULL    |                |
+-------------------------+----------------------+------+-----+---------+----------------+

Is this related to a store-customer related comparison feature? It seems so to me, but as I'm new to Magento I don't know and I have problems to find out more, as the table name does not seem to be documented specifically.


texts: Ajax error when using minified version of prototype.js

texts:
When using minified version of the PrototypeJS. (official version from Google CDN)
ajax stops working. Console shows error:

"TypeError: e is not a function"

Is there a way to fix this? We really would prefer to use minified version for a production site.

Related to:
https://stackoverflow.com/questions/34887126/magento-cant-run-dataflow-profiles-ajax-error-uncaught-typeerror-e-is-not-a


texts: Edit action is missing in every back-end grid of magento 2.3.2

texts:
I upgrade my Magento store from Magento 2.1.16 to Magento 2.3.2
Magento backend does not show any edit action see screenshots

I got knockout js error also in console

  Uncaught TypeError: Unable to process binding "if: function(){return
  $col.isSingle($row()._rowIndex) }" Message: Unable to process binding
  "repeat: function(){return
  {foreach:$col.getVisibleActions($row()._rowIndex),item:'$action'} }"
  Message: Unable to process binding "attr: function(){return
  {target:$col.getTarget($action()),href:$action().href} }" Message:
  $col.getTarget is not a function
      at attr (eval at createBindingsStringEvaluator (knockout.js:1), :3:77)
      at update (knockout.js:353)
      at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:314)
      at Function.evaluateImmediate_CallReadThenEndDependencyDetection (knockout.js:208)
      at Function.evaluateImmediate_CallReadWithDependencyDetection (knockout.js:204)
      at Function.evaluateImmediate (knockout.js:202)
      at Object.ko.computed.ko.dependentObservable (knockout.js:193)
      at knockout.js:314
      at Object.arrayForEach (knockout.js:16)
      at applyBindingsToNodeInternal (knockout.js:311)

  what will be the cause of the issue?


texts: Magento 2: capture and modify payment data

texts:
I am developing a payment module, which works with a webservice. After submit order, there is a session var with webservice response status. If this returns OK, the order must be set as paid and processing, else it must be canceled.

I am using capture() in my Payment model:

public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount)
    {
        /** @var \Magento\Sales\Model\Order $order */
        $order = $payment->getOrder();

        /** @var \Magento\Sales\Model\Order\Address $billing */
        $billing = $order->getBillingAddress();

        try {
             if($someCondition)
            {
              //Process invoice and get

            }
            else
            {
                $order->cancel();
                $order->save();
            }

//Also tried:
/*
            $payment->setState(\Magento\Sales\Model\Order::STATE_CANCELED);
            $order->setState(\Magento\Sales\Model\Order::STATE_CANCELED)
                ->setStatus($order->getConfig()->getStateDefaultStatus(\Magento\Sales\Model\Order::STATE_CANCELED));
*/
            $payment
                ->setTransactionId(rand(11112222,132222222))
                ->setIsTransactionClosed(1);

            $payment->save();
            $order->save();

        }

How can I do that?

Thanks


texts: Magento2 : How to show country and state dropdown field in customer account information section in admin?

texts:
I want to add country and state dropdown field in account information in Magento2 admin?
Googled a lot, but not able to find right solution.

Any help would be appreciated.


texts: Unit Test with PHPstorm permission denied

texts:
I want to make unit tests in PHPStorm for Magento. I First tried to run all the existing unittests but it gives me this warning and exits with code 2:

Warning: unlink(var/allure-results/0000f2f0-fc2a-4207-b37f-55ebb81db76b-testsuite.xml): Permission denied in /var/www/osp.example.com/magento-headless/Magento2/vendor/allure-framework/allure-phpunit/src/Yandex/Allure/Adapter/AllureAdapter.php:77.

I tried to follow these steps: https://devdocs.magento.com/guides/v2.4/test/unit/unit_test_execution_phpstorm.html
This is my run/debug configuration.

Did I miss something?


texts: Pages won't load when article is in shopping list

texts:
After adding an article to my shopping list, pages won't load anymore. Look for an example on: http://bit.ly/1cvXGKa

E.g.: Add an article from this page (http://bit.ly/HlmNAZ) by hovering it and clicking on 'In winkelwagen'.

Could someone help me out with this?


texts: Override Order Shipment View Info phtml in Adminhtml

texts:
I tried to override phtml template for order_info block in Magento order shipment view layout like this:

app/code/Namespace/Module/view/adminhtml/layout/adminhtml_order_shipment_view.xml

<?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>
        <referenceBlock name="order_info">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Namespace_Module::order/view/info.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>

app/code/Namespace/Module/view/adminhtml/templates/order/view/info.phtml

<h1> Success </h1>

after i cleared cache and setup:upgrade, nothing changed, it still loads the magento core phtml


texts: Remove add and edit functionality in magento 1 grid

texts: I want to remove the Add New button and edit functionality when row is clicked. I've followed this tutorial. I've got all the features as guided in the tutorial. But in my case this grid table must be viewable only. Instead of edit I would like to have a detail viewing page. The grid is as below:


texts:
I am new to Magento and setuped a shop on my local appache with the Magento_de install package. Everything worked fine for me excepting a few translation issues. I choosed the RWD package. Some I could fix by myself but I got a problem on the checkout page. Under the items in the cartlist there is a td with cart-footer-actions class. Inside this td you can find a link to clear the cart, a link to update the cart and a further one to shop on. In which template file I can find this markup?

Thanks for any responses

MOE


texts: I want to add delivery date in order email template in Magento-2.1?

texts: I want to show delivery date in order-email template.I want to show in delivery date (today date + 10 day). How can I achieve that?


texts: How to use Composer to update just the Magento 2 core packages?

texts:
I would like to use the composer update feature to update all the core packages, not the third-party packages together.

Do you have some idea?


texts: other website/store/store front does not load; .htaccess file is missing

texts:
Magento 1.9.1
Porto theme

My hosting company created a new account for me and moved my existing account there. That replaced the broken cPanel account and I am now able to access the database via the phpMyAdmin in Cpanel.

The emails and website were cloned now in the new account.

Then they transferred the Domain and Aliases from the old account to the new.

Now the other websites/stores/storefronts do not load. There is a website suspended Error.

I've noticed the .htaccess file is missing. Could that be the reason for this?

UPDATED on November 9th:

The .htaccess file is actually there and it has all the addional domains/websites/stores/store fronts listed in it as it was before the migration.

Everything apears to be setup as before like this:

https://www.properhost.com/support/kb/30/How-To-Setup-Magento-With-Multiple-Stores-And-Domains

but I now get a generic Magento Error when trying to access the additional website/store/store front by using that domain:

Error 503:
Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Magento is a trademark of Magento Inc. Copyright © 2014 Magento Inc.

UPDATED later on November 9th:

My hosting company resolved the issue but they did not tell me what was wrong. They claimed that I un-suspended the old account (the one we were using before the migration) and that created this issue. I don't think I did. But everything works now except for our images which are still not loading on the back-end (in the Magento Admin panel)


texts: Static files not available in developer mode

texts:
I'm running Magento 2.2.2 in developer mode.
When I try to display a page, the static files are not available unless I remove all the pub folder content with rm -R pub/static/*
Once it's done, the static files are available only one time. If I refresh the page, they're gone :

Loading failed for the <script> with source “pub/static/adminhtml/Magento/backend/en_US/requirejs/require.js”.

(same error for several other js and css files)

I tried setup:static-content:deploy but it doesn't fix the issue.
After working on it for several hours, my guess is that something is wrong with the symlink but I don't get where, when I use readlink the path is correct : lib/web/requirejs/require.js.

Any help would be greatly appreciated.


texts: Magento 2 get the minimum order quantity on single product page?

texts:
I am trying to get minimum order quantity in single product page. If someone want to purchase the product and put the quantity of the product which he/she want to buy.

But if the quantity is less than the minimum order quantity then there will generate a warning, in which the minimum amount of quantity is mentioned. For single product page i am using view.phtml file which is a custom created file and i want to get minimum order quantity of particular product in this file.

Please help me.

Thanks


texts: How the "Customizable Options" works while adding the product in magento 2

texts: I need to know the where the below section is loads in magento 2, Especially in dropdown. While clicking "Drop down " in Option Type, It loads the below section,Actually what are the responsible files to load dropdown


texts: How to override product search result block

texts:
I need a quick help, need to override

app\code\core\Mage\CatalogSearch\Block\Result.php

How do I do that in my module?


texts:
I have added a custom reference in 1 column xml (app\design\frontend\Companyname\theme\Magento_Theme\page_layout) by following manner to display custom section.

<container name="home.slider" as="slider" after="global.notices" htmlTag="section" htmlId="slider" />

But custom html section is not displaying. Although I have added a custom block with following code and that is working fine.

<container name="header.container" as="header_container" label="Page Header Container"  htmlTag="header" before="main.content" htmlId="header">
        <block name="header.top" as="header.top" class="Magento\Framework\View\Element\Template"  template="Magento_Theme::html/header/top.phtml"  before="-" />
</container>

Can anyone suggest what I am doing wrong here or is there any other method by which we can display custom reference.

Following is the complete code of 1column.xml

<referenceContainer name="page.wrapper">
    <container name="header.container" as="header_container" label="Page Header Container"  htmlTag="header" before="main.content" htmlId="header">
        <block name="header.top" as="header.top" class="Magento\Framework\View\Element\Template"  template="Magento_Theme::html/header/top.phtml"  before="-" />
    </container>
    <container name="page.top" as="page_top" label="After Page Header" after="header.container"/>
    <container name="home.slider" as="slider" after="global.notices" htmlTag="section" htmlId="slider" />
   <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" htmlId="footer" />
</referenceContainer>


texts: How to call observer on stock update in Magento2?

texts:
I have tried to call my observer when stock is updated. Here is my etc/adminhtml/events.xml code

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="cataloginventory_stock_item_save_after">
        <observer name="tct_stock_item_save_observer" instance="Namespace\Module\Observer\Notifier" />
    </event>
</config>

And here is my observer's code

<?php

namespace Namespace\Module\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use \Psr\Log\LoggerInterface;

class Notifier implements ObserverInterface {

  public function __construct(
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    LoggerInterface $logger
  ) {
    $this->_storeManager = $storeManager;
    $this->logger = $logger;
  }

  public function execute(Observer $observer) {
    $this->logger->warn('Observer Works');
    die('test');
  }

}

I have tried magento 2 event cataloginventory_stock_item_save_after but that didn't work.

But its not working. Please help.


texts: How to add custom column to grid of customers in admin?

texts:
How to add custom column to grid of customers in admin ?

Can anyone help me?

I need to add a checkbox for each customer so that the administrator can suspend the customer account by clicking on the checkbox and back


texts: Security Patch SUPEE-7405, issue with api/v2_soap/?wsdl

texts:
I get the following error when going to api/v2_soap/?wsdl:

Argument 2 passed to Mage_Core_Model_Config::_makeEventsLowerCase() must be an instance of Mage_Core_Model_Config_Base, instance of Mage_Api_Model_Wsdl_Config_Base given, called in app/code/core/Mage/Core/Model/Config.php on line 960 and defined  in app/code/core/Mage/Core/Model/Config.php on line 1647

This happened after I applied the 7405 patch. Any ideas how to solve it?

I know about Security Patch SUPEE-7405 - possible problems? but this question and answers are about listing issues or testing after the patch, not about solving them.


texts: what is the maximum concurrent user/sec does magento support?

texts:
how can i know what is the maximum concurrent user/sec does my site support? I tried finding answer of this question but unable to get

Any suggestions?


texts: Magento 1.9 - How to display Shipping Address at the bottom of the invoice PDF?

texts:
Following this tutorial added following code to
app/code/core/mage/sales/model/order/pdf/invoice.php
  protected function _drawFooter(Zend_Pdf_Page $page, $store = null)
    {
        $this->_setFontRegular($page, 10);
        $page->setFillColor(new Zend_Pdf_Color_RGB(0, 0, 0));
        $this->y -= 10;
        $page->drawLine(25, $this->y-200, 570, $this->y-200);

        $shippingAddress = $this->_formatAddress($order->getShippingAddress()->format('pdf'));

        $page->drawText($shippingAddress , 35, $this->y-230, 'UTF-8');
    }

Getting error.
Expected result Scrrenshot : https://snipboard.io/dCTYWi.jpg


texts:
I'm trying to do default product export to CSV, but I'm just getting the following message all the time:

"Message is added to queue, wait to get your file soon. Make sure your
cron job is running to export the file"

I already start cron and consumer exportProcessor.
When I try to export products with some filters - all are ok, but when I want to export all products without any filters it creates the files like importexport_5a45atzf42eb2(look at the picture below), and they always 0M and sometimes less than or equal to 3.3M(it should be about 35+M).
The issue reproduces only in live, local and dev are fill the data in the files like above, then it goes to the var/export/catalog_product_some_numbers.csv file and the grid of exports.

Maybe, it should be some server configs?


texts:
I am learning magento 2.1 request flow.

I am stuck here:

$frontController = $this->_objectManager->get('Magento\Framework\App\FrontControllerInterface');
$result = $frontController->dispatch($this->_request);

I can't find dispatch function.

if I go to vendor/magento/framework/App/FrontController.php dispatch function and add die('ok') it doesn't get executed:

public function dispatch(RequestInterface $request)
{
    die("ok"); /* doesn't get executed */
    \Magento\Framework\Profiler::start('routers_match');

if I add:

die(get_class($frontController));

to vendor/magento/framework/App/Http.php launch:

$frontController = $this->_objectManager->get('Magento\Framework\App\FrontControllerInterface');
die(get_class($frontController));
$result = $frontController->dispatch($this->_request);

I get Magento\Framework\App\FrontController\Interceptor

but where is Magento\Framework\App\FrontController\Interceptor ?

there is no vendor/magento/framework/App/FrontController/Interceptor.php

obviously I am missing something - would appreciate an insight from an expert.


texts: How to Update Products Status Directly from Database

texts:
I am using Magento version 1.9.2.
I have 6000 disabled products with 0 quantity and stock status Out of stock that's why products are not displaying on front end.

I want to update the products directly from database i made changes

cataloginventory_stock_item
qty=12
is_in_stock=1
manage_stock=1

cataloginventory_stock_status
stock_status=1
qty=12

catalog_product_entity_int
value=1 where attribute_id=96

after doing these changes flush the cache but still no product is displaying on front end but at back end all products have 12 qty in stock and status is enabled.

here i am confuse that if i select a product and just click save button without making any change then product displayed on front end. that means something is missing that should need to be update in database. what is that? i request you all kindly help me in it.


texts: Magento 2.3.5 we found conflicting component dependencies

texts:
I have tried every possible solution I could find on the internet.

From increasing the MEMLIMIT in the php.ini to 2G to removing the required tags in composer.json and so on.

This is a Vanilla install of CE 2.3.4 for the life of me I can not figure out what could be causing this.

I was actually trying to install the connector for Magento Store Manager and I figured it was an issue with the module but it does it with any extension.


texts: Is any sql query possible to get all products of a category using category id magento 2

texts:
Actually i want to know sql query possible to get all products of a
  category using category id.


texts: How can I get an attribute property in the filter template (or any other template)?

texts:
How can I get the is_filterable attribute property in the filter template (template/catalog/layer/filter.phtml). Preferably without loading the attribute again.

$this->getisFilterable() is not working.

    mysql> select * from catalog_eav_attribute where attribute_id=92\G
*************************** 1. row ***************************
                 attribute_id: 92
      frontend_input_renderer: NULL
                    is_global: 1
                   is_visible: 1
                is_searchable: 1
                is_filterable: 2
                is_comparable: 1
          is_visible_on_front: 0
     is_html_allowed_on_front: 0
      is_used_for_price_rules: 0
      is_filterable_in_search: 0
      used_in_product_listing: 0
             used_for_sort_by: 0
              is_configurable: 1
                     apply_to: simple
is_visible_in_advanced_search: 1
                     position: 0
           is_wysiwyg_enabled: 0
      is_used_for_promo_rules: 0
1 row in set (0.00 sec)


texts: How can a role user see only own products not other users in Magento 2?

texts: I am troubling with user roles in Magento 2. When I am trying to assign product permission to a user who can see only own products but all products displaying to him. How can I set a role in which user can see only own products and create reports of own product? Is it possible?


texts: Adding CSS to child themes _extend.less has no effect

texts:
I have set up a child theme of Luma and can see it is being loaded by looking at the page source in the browser. I now want to customise the styling of the theme.

I followed the instructions here: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-guide/css_quick_guide_approach.html "Simplest way to extend parent styles" by adding an _extend.less file in:

public_html/app/design/frontend/Magento/luma_child/web/css/source/_extend.less

However, any changes made here are not having any impact. For example, the default page background is white: #ffffff.

As a test I added:

body { background-color: red; }

to my _extend.less file and nothing changed. I tried running php bin/magento cache:clean but this doesn't fix the problem.

I know this question has been asked a lot but nothing is working for me.

I am in development mode and using server-side .less compilation.

Have I missed out a step, where am I going wrong?

I guess .less files are compiled by the server when the page loads and I don't need to run any commands.

Thanks


texts: Loading product in Magento 2 issue with PhpUnit tests

texts:
This is my method, for which I want to write a unit test:

private $productRepository;

public function __construct(
    ProductRepositoryInterface $productRepository
)
{
    $this->productRepository = $productRepository;
}

public function getProductName(int $productEntityId) : string
{
    $myProduct = $this->productRepository->getById($productEntityId);
    return (string) $myProduct->getName();
}

and my test:

/**
 * @dataProvider productEntityIds
 * @param $productEntityId
 */
public function testGetProductName($productEntityId)
{
    $this->assertInternalType('string', $this->myCustomClass->getProductName($productEntityId));
    //assertIsString().
}

public function productEntityIds()
{
    return [
        [1]
        [2],
        [3],
        [5],
        ['myString']
    ];
}

When I run my test, I am receiving the following error message:
Error: Call to a member function getName() on null

If I call the method( getProductName() ), in a cronjob or an observer I successfully received the product name. But If call it from the phpunit test , I am receiving that error. Does anyone know why ?

Thank you


texts: Sliding Cart extension for Magento 2 enhances mini cart to the next level with responsive design and conversion oriented features

texts:
There is already a full-fledged free extension available on Magento's marketplace and Github
Magento: https://marketplace.magento.com/ambab-module-slidingcart.html
Github: https://github.com/ambab-infotech/slidingcart
Blog: https://roshanyadav007.wordpress.com/2020/01/24/sliding-cart-extension-for-magento-2-magento-2-3-x/
This might help someone.


texts:
I installed a new onestep checkout module and it works fine but my charity donation module doesn't work now. When I get to the second step (actually its like a three step checkout). Anyway, it just keeps loading, the loader spinner just keeps spinning, but no javascript errors, no php errors --nothing. I have Mage::setIsDeveloperMode(true); and error_reporting(E_ALL & ~E_NOTICE);.

How can I can I find what is the trouble?

Thanks


texts: Are we forced to rewrite a template in Magento2 when rewritting a block?

texts:
This question is about following Magento2 best practices.

I had to rewrite \Magento\Theme\Block\Html\Topmenu::_addSubMenu() method in order to add some wrappers around  elements. Now, because it's a protected method, my understanding is that I have to use preference feature:

<preference for="Magento\Theme\Block\Html\Topmenu" type="MyCompany\Theme\Block\Html\Topmenu" />

and add a class with my rewrites:

<?php

namespace MyCompany\Theme\Block\Html;

class Topmenu extends \Magento\Theme\Block\Html\Topmenu
{
    protected function _addSubMenu($child, $childLevel, $childrenWrapClass, $limit)
    {
        // my stuff
    }
}

Although the default class got rewritten, on the next page reload I got the following error:

  main.CRITICAL: Invalid template file: 'html/topmenu.phtml' in module: 'MyCompany_Theme' block's name: 'catalog.topnav' [] []

Magento is trying to find html/topmenu.phtml under my extension and not under Magento_Theme. I do understand that this is correct behaviour, but I was thinking about practical aspects of this. Does this mean that whenever we rewrite a block, we need to rewrite its template too, even if we don't necessarily need to touch anything HTML related?

One way around this would be to rewrite _toHtml() method too, like this:

protected function _toHtml()
{
    $this->setModuleName($this->extractModuleName('Magento\Theme\Block\Html\Topmenu'));
    return parent::_toHtml();
}

Now, Magento is looking into Magento_Theme module for the template file again. But, this looks like a hack to me.

So, my question is: what is a recommendation in this situations? Should we always copy relevant template when rewritting block class, or the workaround is fine? Is there a better approach for this?


texts: Workaround to change template file for specific category

texts:
I'm trying to set a custom template file for block category.products.list for just a few marked categories.
Sounds simple enough, but it turns out it isn't, mostly because of some bugs in the version I'm using. (2.3.3) Updating Magento is usually a project in its own right so I'm not open to doing so right now.
Who knows another, more elegant way to do it?
Here's a list of the methods I already explored.
Method 1:
Creating a catalog_category_view_id_[id].xml should alter the layout for only that category with id [id].
Not usable: I can't use that one, because I can't hard code a database ID into a module. I want it to be usable for multiple categories in any database.
Why is it built like this anyway?
Method 2:
use custom layout XML in the admin panel. Enter <update handle="mymodule_category_view"/> for every category that needs changing.
Make a mymodule_category_view.xml with the changes.
Failed: This doesn't work because of a bug that's solved in 2.3.4. All <update> tags are simply ignored when they're in the layout update xml.
Method 3:
use custom layout XML in the admin panel to change the template file of block category.products.list and others.
<referenceContainer name="content">
  <referenceBlock name="category.products.list">
    <action method="setTemplate">
        <argument name="template" xsi:type="string">Vendor_Module::product/customlist.phtml</argument>
    </action>
  </referenceBlock>
</referenceContainer>

Failed: This doesn't work because of what looks like a bug.
There's a module in my shop that has a catalog_category_view.xml that also changes the template using Action + setTemplate. Apparently that overrides the custom layout XML.
When I disable that module or just comment out that part of that catalog_category_view.xml suddenly my custom XML becomes active so that proves my syntax is valid and the override order is handled wrong.
Method 4:
use a plugin to change the template in a beforeToHtml on the block class. This should override any XML changes. Relevant categories should be marked in some way, possibly using a new EAV attribute or something. Sometimes block classes are used for multiple blocks with different templates, so extra checks should be in place.
Undesired: It'd work but it's not very elegant. It sabotages the whole layout xml functionality for that block class. Adding an EAV attribute (alsoi to UI) to mark categories is also quite a lot for a simple workaround.
Method 5: Use an observer
Like mentioned here
This is better than the plugin but still requires adding an EAV attribute.


texts: Update attribute Option label with id magento2

texts:
I am trying to update attribute option label with attribute optionid.

Used below code.

class Attribute
 {
  protected $eavAttributeFactory;
  public function __construct(
   \Magento\Eav\Model\Entity\AttributeFactory $eavAttributeFactory
  ) {
    $this->eavAttributeFactory = $eavAttributeFactory;
 }

public function attributeUpdate() {
  $attribute_code = 'color';
  $optionid = 12345;
  $option_label = 'red';
  $attr = $this->productAttributeRepository->get($attribute_code );
             $options = $attr->getOptions();
             $values = 0;
             foreach ($options as $option) {
                if ($option->getValue() == $magento_id) {
                    $option->setLabel($option_label);
                    //$option->setStoreLabels([$option_label]);
                    $attr->setOptions([$option]);
                    $this->productAttributeRepository->save($attr);
                    break;
                }
                $values++;

            }

}

Option id 12345 is Green now. I need to Update to Red. What code i need to use to update label of option. Please anyone help on this.
Right now it is updating only in admin end. not for all stores, like in Default store view Label in empty.
Thanks


texts: Ubertheme Magento 2.1.2 Migration Tool - iframe loading issues / 403 in the admin area

texts:
I've contacted the support staff from uberthemes, but they've been very little help & I'm seeing this issue all over the place with the latest iteration of their product.

I've got some logging running & I'm getting an error that is showing a problem with this section of code.

The error from the stack trace is "Uninitialized string offset: 0"

could someone point me in the right direction for troubleshooting this issue? I'm getting nowhere fast.

     * Sets the relative URL for the application entry script.
     * This setter is provided in case the entry script URL cannot be determined
     * on certain Web servers.
     * @param string $value the relative URL for the application entry script.
     */
    public function setScriptUrl($value)
    {
        $this->_scriptUrl='/'.trim($value,'/');
    }

     * Returns the path info of the currently requested URL.
     * This refers to the part that is after the entry script and before the question mark.
     * The starting and ending slashes are stripped off.
     * @return string part of the request URL that is after the entry script and before the question mark.
     * Note, the returned pathinfo is decoded starting from 1.1.4.
     * Prior to 1.1.4, whether it is decoded or not depends on the server configuration
     * (in most cases it is not decoded).
     * @throws CException if the request URI cannot be determined due to improper server configuration
     */
    public function getPathInfo()
    {
        if($this->_pathInfo===null)
        {
            $pathInfo=$this->getRequestUri();

            if(($pos=strpos($pathInfo,'?'))!==false)
               $pathInfo=substr($pathInfo,0,$pos);

            $pathInfo=$this->decodePathInfo($pathInfo);

            $scriptUrl=$this->getScriptUrl();
            $baseUrl=$this->getBaseUrl();
            if(strpos($pathInfo,$scriptUrl)===0)
                $pathInfo=substr($pathInfo,strlen($scriptUrl));
            elseif($baseUrl==='' || strpos($pathInfo,$baseUrl)===0)
                $pathInfo=substr($pathInfo,strlen($baseUrl));
            elseif(strpos($_SERVER['PHP_SELF'],$scriptUrl)===0)
                $pathInfo=substr($_SERVER['PHP_SELF'],strlen($scriptUrl));
            else
                throw new CException(Yii::t('yii','CHttpRequest is unable to determine the path info of the request.'));

            if($pathInfo==='/')
                $pathInfo='';
            elseif($pathInfo[0]==='/')
                $pathInfo=substr($pathInfo,1);
            if(($posEnd=strlen($pathInfo)-1)>0 && $pathInfo[$posEnd]==='/')
                $pathInfo=substr($pathInfo,0,$posEnd);

            $this->_pathInfo=$pathInfo;
        }
        return $this->_pathInfo;

    }


texts: Invalid method with MPGS payment gateway

texts:
I am trying to implement our new MPGS payment gateway but have run into a problem on the live server that did not appear on the test server. All ran smoothly on the localhost.

When posting a call to api/rest/createsession/ I receive a 500 Internal Server Error.

The response is:

{"messages":{"error":[{"code":0,"message":"Invalid method Mastercard_Mpgs_Model_MpgsApi_Rest::_critical
(Array\n(\n    [0] => Resource internal error.\n)\n)"}]}}

Exception log stack trace:

2017-02-03T02:58:06+00:00 ERR (3):
exception 'Varien_Exception' with message 'Invalid method Mastercard_Mpgs_Model_MpgsApi_Rest::_critical(Array
(
[0] => Resource internal error.
)
)' in /home/safetyli/public_html/lib/Varien/Object.php:653
Stack trace:
#0     /home/safetyli/public_html/app/code/community/Mastercard/Mpgs/Model/MpgsApi/Rest.php(84): Varien_Object->__call('_critical', Array)
#1 /home/safetyli/public_html/app/code/community/Mastercard/Mpgs/Model/MpgsApi/Rest.php(84): Mastercard_Mpgs_Model_MpgsApi_Rest->_critical('Resource intern...')
#2 /home/safetyli/public_html/app/code/community/Mastercard/Mpgs/Model/MpgsApi/Rest.php(113): Mastercard_Mpgs_Model_MpgsApi_Rest->sender(1, 'session', Array)
#3 /home/safetyli/public_html/app/code/community/Mastercard/Mpgs/Model/Api2/Restapi/Rest/Guest/V1.php(63): Mastercard_Mpgs_Model_MpgsApi_Rest->create_checkout_session('100001721-5893f...', Object(Mage_Sales_Model_Quote))
#4 /home/safetyli/public_html/app/code/community/Mastercard/Mpgs/Model/Api2/Restapi/Rest/Guest/V1.php(106): Mastercard_Mpgs_Model_Api2_Restapi_Rest_Guest_V1->_create(Array)
#5 /home/safetyli/public_html/app/code/core/Mage/Api2/Model/Dispatcher.php(74): Mastercard_Mpgs_Model_Api2_Restapi_Rest_Guest_V1->dispatch()
#6 /home/safetyli/public_html/app/code/core/Mage/Api2/Model/Server.php(239): Mage_Api2_Model_Dispatcher->dispatch(Object(Mage_Api2_Model_Request), Object(Mage_Api2_Model_Response))
#7 /home/safetyli/public_html/app/code/core/Mage/Api2/Model/Server.php(107): Mage_Api2_Model_Server->_dispatch(Object(Mage_Api2_Model_Request), Object(Mage_Api2_Model_Response), Object(Mage_Api2_Model_Auth_User_Guest))
#8 /home/safetyli/public_html/api.php(73): Mage_Api2_Model_Server->run()
#9 {main}

Ive looked at Mastercard/Mpgs/Model/MpgsApi/Rest.php but not sure what to change.

Does anyone have any idea of where to start troubleshooting? I've tried a few things without much success. I am not a coder so go easy on me.

Cheers


texts:
I've been trying, without any success, to acquire a list of products via the API that meet a certain criteria.  Our catalog is made up of products which we stock in-house and some that we drop ship.  For those that we stock in house, 'manage stock' is set to 'yes' (1), and those are the ones I would like to get in my result set.  I've tried setting my complex filter a few different ways with no luck (one example below):

$filter = array (
    'complex_filter' => array (
        array (
            'key' => 'manage_stock',
            'value' => array ('key' => 'in', 'value' => 'Yes')
        )
    )
);

$result = $proxy->catalogProductList($sessionId, $filter);

All variations of the above that I have tried result in a fatal error:

Fatal error:  Uncaught SoapFault exception: [SOAP-ENV:Server] Call to a member function getBackend() on a non-object

And the stack trace doesn't give me any info as to what I might be doing wrong.  Does someone have some insight into this, or if it is even possible?  Thanks in advance.


texts: Error after applying patch to authorize.net module

texts:
I have applied patch from MD5 to SHA-512 to Magento 2 Authorize.net direct post module, when i tried to test purchasing with a credit card i got this error on exception.log file

main.CRITICAL: Warning: pack(): Type H: illegal hex digit : in /public_html/vendor/magento/module-authorizenet/Model/Directpost/Response.php on line 111

this is the code line 111

return strtoupper(hash_hmac('sha512', $message, pack('H*', $signatureKey)));

How can i fix this error?


texts: Notice: Array to string conversion in shipping delivery on magento 2

texts:
I upgraded from magento 2.2.2 to 2.2.11 since I have an error when selecting a shipping address.
I get the error: "Notice: Array to string conversion in mywebsite/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 3043".

But this error is present only when it is an address registered in the database, if I add an address it will work.
I've searched for the value that causes the problem.
In the logs I managed to get this :
INFO (6): array (
  'region_code' => NULL,
  'region' => NULL,
  'region_id' => 0,
)

I tried to find out where the region values were retrieved from. To not have them because they are useless to me and are all empty or equal to Null.


texts: How to unselect a multiselect field in my custom modul edit page?

texts:
I have added a multiselect field to a fieldset in my form.xml.

        <column name="ghs_pictogram_id">
        <argument name="data" xsi:type="array">
            <item name="options" xsi:type="object">Mcas\GhsPictogram\Source\Pictogram</item>
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">int</item>
                <item name="dataType" xsi:type="string">multiselect</item>
                <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
                <item name="label" xsi:type="string" translate="true">Pictogram</item>
            </item>
        </argument>
    </column>

It works fine, I can select values and they are stored. My Problem is, that I'm not able to unselect the field. Once it is selected it stores a value, a reset to empty is not possible anymore.


texts: After updating to Magento CE 1.9.1 main navigation sub menus don't show

texts:
I updated from 1.9 to 1.9.1.
Since then if I hover of any category menu, the sub-menus don't show any more.

Does Magento 1.9 main navigation works with jQuery or any other js library?
Could it be a jQuery conflict?


texts:
I just cloned a project from git, everyting ok, when i enter to a module name kardex i found this error, the thing is that this error only appears to me in my project, not happen in another cloned project from my team. I upgrade my project, compile and delete cache but not works, thanks for the help.

PHP Fatal error: Uncaught TypeError: Argument 1 passed to Arkix\kardex\Controller\Adminhtml\Inventory\Index::__construct() must be an
instance of Magento\Backend\App\Action\Context, instance of Magento\Framework\ObjectManager\ObjectManager given, called in  C:\laragon\www\babalu\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php on line 93 and defined in  C:\laragon\www\babalu\app\code\Arkix\Kardex\Controller\Adminhtml\Inventory\Index.php:23
Stack trace:
#0 C:\laragon\www\babalu\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(93): Arkix\kardex\Controller\Adminhtml\Inventory\Index->__construct(Object(Magento\Framework\ObjectManager\ObjectManager))
#1 C:\laragon\www\babalu\vendor\magento\framework\ObjectManager\Factory\Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Arkix\\Kardex\\Co...', Array)
#2 C:\laragon\www\babalu\vendor\magento\framework\ObjectManager\ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Compiled->create('Arkix\\Kardex\\Co in C:\laragon\www\babalu\app\code\Arkix\Kardex\Controller\Adminhtml\Inventory\Index.php on line 23

this is my controller, i´m using magento 2.1, the error appears in the line 23 but i don´t know.

<?php

namespace Arkix\kardex\Controller\Adminhtml\Inventory;

use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;

class Index extends Action
{
    /**
     * @var PageFactory
     */
    protected $resultPageFactory;

    /**
     * @param Context $context
     * @param PageFactory $resultPageFactory
     */
    public function __construct(
        Context $context,
        PageFactory $resultPageFactory
    ) {
        parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
    }

    /**
     * Index action
     *
     * @return \Magento\Backend\Model\View\Result\Page
     */
    public function execute()
    {
        /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
        $resultPage = $this->resultPageFactory->create();

        $resultPage->addBreadcrumb(__('Kardex'), __('Kardex'));
        $resultPage->addBreadcrumb(__('Kardex'), __('Kardex'));
        $resultPage->getConfig()->getTitle()->prepend(__('Kardex'));

        return $resultPage;
    }

     /**
     * @return bool
     */
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Arkix_Kardex::kardex_inventory');
    }
}


texts: Where to find tooltip text for Remember me? Magento 2

texts:
Im trying to change the following:

Check "Remember Me" to access your shopping cart on this computer even if you are not signed in.

It's part of the tooltip for "Remember me (Whats this?)" on register and login.

How can I change this?


texts:
I'm working on a localhost dev environment. For some reason, I decided to install PHP7 on the VM :-P. I also have WordPress and Magento 2 on the same VM, both of which have no issues with PHP7.

I've installed Magento 1.9 several times with no issues on other VMs (and ~PHP5.6), but this time the endpoint directs to "/magento1/index.php/install/" and returns a server 500 error. I see there is an extension that helps with PHP7 compatibility, but I assume that isn't helpful at the install phase. Is there a command-line install method for 1.9? I ended up going that route for Magento 2 and it was tops.

Any advice is appreciated!


texts:
In another thread, I had asked about custom reports where I wanted a report that listed all orders in a particular timeframe that included orders including the products purchased by customer name. Someone had pointed out the Land of Coder Advanced Report. Their website says that it's compatible with 2.3 (I run 2.3.6)
However, when I opened the zip file for the enhancement, it only has folders for 2.0, 2.1, and 2.2. I'd like to be able to use it as the report would save hours of work, but I'm very leery about using an upgrade with a folder that's only marked 2.2.
I tried LoC's support page, but I've gotten no response. Any thoughts or suggestions would be greatly appreciated.
If this report isn't compatible, are there suggestions for other reports?
Thanks
Jeff


texts: Magento2 deploy command not working and rest commands are working

texts:
I have tried to run this php bin/magento setup:static-contnet:deploy command on the magento root folder then it showing the below error

  "Notice: Undefined offset: 0 in
  /home/nuluv938/public_html/vendor/magento/module-deploy/Console/Command/DeployStaticContentCommand.php
  on line 403"

While rest commands are working fine.

Without running the deploy command I am unable to create the front-end folder inside the pub/static path directory.


texts: Rearrange simple associated products in configurable product options

texts:
I want to rearrange simple associated products in configurable products.
See attached screen-shot.

In frontend and here in admin-end also product with 15 oz is coming first then 8 oz.
But now what I want is to show Option 8 oz first then option 15 oz
Please let me know how can I achieve this and how Magento is arranging this options.


texts: Magento 2 : Sort by Doesn't Work on Catalogsearch Page

texts:
I have used ajax layered navigation plugin in which i am facing an issue like when I search for eg: samsung, it shows all the products of samsung on catalogSearch page.

i.e, catalogsearch/result/?q=samsung page.

When I change the view i.e, from grid to list view, it doesn't work.
When I change the sort by to price or relevance, it doesn't work.

Is there any solution for it?


texts: Checkout Page not loading and getting blank page

texts:
first, I apologize for not being a programmer and not being able to publicly post the URL in question.

The checkout process gets empty in the second process page.

I assume Initialization code laods in the wrong order.

It would be nice if I could send the URL as a PM and that someone finds out the cause of the problem with a debugger (or DevTools). Please write me a PM.

http://s18.directupload.net/images/190519/4cpt9rfc.jpg
http://s18.directupload.net/images/190519/hmp5tj4b.jpg

Thanks so much in advance.


texts:
I want to get a notify email after a customer added a review and installed an extension for this, but the email can't be send :(.

The exception log details:

exception 'Exception' with message 'This letter cannot be sent.' in /home/magento/www/app/code/core/Mage/Core/Model/Email/Template.php:375
Stack trace:
#0 /home/magento/www/app/code/core/Mage/Core/Model/Email/Template.php(509): Mage_Core_Model_Email_Template->send('test@gmx.de', 'tester', Array)
#1 /home/magento/www/app/code/local/Magegiant/Newreviewnotify/Model/Observer.php(71): Mage_Core_Model_Email_Template->sendTransactional('newreviewnotify...', 'support', 'test@gmx.de', 'tester', Array)
#2 /home/magento/www/app/code/core/Mage/Core/Model/App.php(1338): Magegiant_Newreviewnotify_Model_Observer->reviewReviewSaveAfter(Object(Varien_Event_Observer))
#3 /home/magento/www/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Magegiant_Newreviewnotify_Model_Observer), 'reviewReviewSav...', Object(Varien_Event_Observer))
#4 /home/magento/www/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('review_save_aft...', Array)
#5 /home/magento/www/app/code/core/Mage/Core/Model/Abstract.php(466): Mage::dispatchEvent('review_save_aft...', Array)
#6 /home/magento/www/app/code/core/Mage/Core/Model/Abstract.php(319): Mage_Core_Model_Abstract->_afterSave()
#7 /home/magento/www/app/code/core/Mage/Review/controllers/ProductController.php(189): Mage_Core_Model_Abstract->save()
#8 /home/magento/www/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Review_ProductController->postAction()
#9 /home/magento/www/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('post')
#10 /home/magento/www/app/code/community/Mdl/UnderConstruction/Controller/Router/Standard.php(72): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#11 /home/magento/www/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mdl_UnderConstruction_Controller_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /home/magento/www/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#13 /home/magento/www/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#14 /home/magento/www/index.php(87): Mage::run('', 'store')
#15 {main}

After this I have checked the Template.php and logged this:

public function isValidForSend()
{

Mage::Log(var_export(!Mage::getStoreConfigFlag('system/smtp/disable'),true).';'.var_export($this->getSenderName(),true).';'.var_export($this->getSenderEmail(),true).';'.var_export($this->getTemplateSubject(),true),null,'email.log');

    return !Mage::getStoreConfigFlag('system/smtp/disable')
        && $this->getSenderName()
        && $this->getSenderEmail()
        && $this->getTemplateSubject();
}

The result was:

2014-12-12T10:12:07+00:00 DEBUG (7): true;'Test Onlineshop';'test_support@gmx.de';'New Review'

So I don't know where the problem is, because the variables looks ok. Hope u can help me

UPDATE:

I get no errors anymore, after clearing cache, but I also get no email notification, the same problem exists with the magento contact form :/


texts:
I have started to get multiple errors after updating to latest Magento 1.9.1:

  Fatal error: Call to a member function setMessageBody() on a
  non-object in
  /home/tanviherbals/public_html/app/code/core/Mage/Core/Model/Email/Template.php
  on line 410

I get this error on sending data through contact us form, online consultation form, sending tracking order info, sending emails to customers from backend.

Please help on the same:

www.tanviherbals.com


texts: How to call a CMS page in another CMS page in magento 2

texts:
I have two CMS pages in magento 2 . I want to call one cms page to another cms page.

anyone can help me.


texts:
I have one grid on my page, but I want to make another grid on the same page.

Thanks

MagentoCommunityversion1.9


texts: Can't add more than 105 simple products to bundle product

texts:
A weird thing is happening: when I try to save my bundle product with 200 simple products, for example, it limits the simple products quantity to 105. The number 105 does not matter. The thing is why is this happening?

I made some research on Google and could not find anything except that this problem is due to server configuration. But I do not think so... can anyone help? Thanks!


texts: Access forbidden issue in cron execution magento 1.9

texts:
I am new in magento 1.9 . I want to run a cron job . I have added the required code in config.xml and make a php file in model folder .I want to run the cron on local host xampp windows.
When I run it on browser it gaves me access forbidden error.
In browser I write:

http://localhost/project_name/cron.php

it gave me that issue.

Is there some other way to run the cron on local host?
Thank you in advance.


texts: How to append array value in magento session?

texts:
Just I want to append array value in magento session data

    Mage::getSingleton( 'core/session' )->setData( 'createArrayDefault', array(3));
    Mage::getSingleton( 'core/session' )->setData( 'createArrayDefault', array(2));

print_r(Mage::getSingleton( 'core/session' )->getData('createArrayDefault'));

It  displays array(0=>2) and override 3value from array
    But I want this array(0=>2,0=>3);

When I print magento session data and print,it overrides array 3 value but I want both values in session data.How  to append values in session data.


texts: How to show product categories on a page

texts:
I got a list of categories that show on a product view page. The list is shown as a few top categories with their sub categories under them. This works, except it, now shows all the categories from my entire website, not only the categories, the current product belong too.

How can I fix that?

My code:

 $categoryCollection = Mage::getResourceModel('catalog/category_collection')
  ->addFieldToFilter('level',2)
  ->addAttributeToSelect('name')
  ->addAttributeToSelect('id')
  // ->addFieldToFilter('id', array('nin' => 128))
  ->addAttributeToSelect('url');
  $out = "
";
  foreach($categoryCollection as $cat){

      $out .= "
";
      $out .= "getUrl()."'>".$cat->getName()."";
      $out .="
";
      $children = Mage::getModel('catalog/category')->load($cat->getId())->getChildrenCategories();
          foreach($children as $child){
              $out .="
getUrl()."'>".$child->getName()."
";
          }
          $out .="
";
      $out .= "
";
  }
  $out .= "
";
  echo $out;

This shows ALL top categories from my website with ALL their subcategories.

I only want to show the categories that the product belong too.

I got it to work but this doesn't show them in the list style I want, it just shows them all in one big list, not sorted by their parent categories. (with this code:)

  // Haal alle categorieen op waar het product onder valt
    $currentCatIds = $_product->getCategoryIds();
    $categoryCollection = Mage::getResourceModel('catalog/category_collection')
     ->addAttributeToSelect('name')
     ->addAttributeToSelect('url')
     ->addAttributeToFilter('entity_id', $currentCatIds)
     ->addIsActiveFilter();

  //  echo '
';
  //  print_r($categoryCollection);
  //  echo '
';

         $sorted = sort($categoryCollection);

   $catlist .= '
';
         foreach($categoryCollection as $cat){
     if($cat->getName() != 'Root'){
       $catlist .= '

getUrl().'">'.$cat->getName().'
';
     }
            }
    $catlist .= '
';
    echo $catlist;


texts: Having issue with Magento 2 security scan. Magento Compromise Injection

texts:
I have checked with my all the sites with the bundle and merge js I am getting the same issue for all the sites i.e. Magento Compromise Injection.

When I remove bundle and merge js then security scan works fine.

It is default Magento having the problem or is there anything that I missed.

How can I resolve this issue Magento Compromise Injection?


texts: Why I can't access global variable in my observer?

texts:
I have a custom module. In its controller I set a global variable as shown below

public function someAction()
{
    if (<some_condition_met>) {
        $id = 12;
        $item =  Mage::getModel('mymodel/entity')->load($id);
        Mage::register('my_entity', $item); //registering global variable
        $this->_redirect('customer/account/login');
        return;
    }
}

Now I am observing on an event controller_action_postdispatch_customer_account_loginPost. I need to validate  my global variable there. So in my observer I tried this.

public function myObserver()
{
     if (<some_condition_met>) {
          $item =  Mage::registry('my_entity');
          var_dump($item);
          die();
     }
}

But it outputS

NULL

Why I can't get a global variable in this observer ?

I am 100% sure that, my controller successfully registers that value. I try to pass a static value. It also doesn't work.

Side note: when we try to get a global variable that set by a controller inside a block, it will surely return data. Here I assume i am not getting an output because, I am trying to get the global variable, during another controller action takes place. I am not sure about this point. However it seems like that.


texts: internal error after activating full_page cache

texts:
I have this problem that i get an 500 internal error and i cant find out the problem about it because there is no error report.
I have tried this: https://stackoverflow.com/questions/46233637/magento-2-after-enable-full-page-cache-getting-500-internal-server-error
Without luck, can somebody help me?


texts: Problem with block override in Magento 2

texts:
Note: Before marking the question as duplicate or off-topic, please read the question carefully.

Scenario:
I have to show custom column in the admin grid of a custom extension. So I used override feature of Magento 2 and extended the original Grid class to customize it.

Below is sample code block for overriding the Grid.php class:

namespace Stream\OverrideStockMovement\Block;

use Magento\Backend\Block\Widget\Grid\Column;

class Grid extends \BoostMyShop\AdvancedStock\Block\StockMovement\Grid
{

It is working fine now.

There is a similar grid, which is showing in the edit form which is extending the same \BoostMyShop\AdvancedStock\Block\StockMovement\Grid class to show the same data for particular product.

Below is the sample code block for above class:

<?php

namespace BoostMyShop\AdvancedStock\Block\ErpProduct\Edit\Tab;
use Magento\Backend\Block\Widget\Grid\Column;

class StockMovement extends \BoostMyShop\AdvancedStock\Block\StockMovement\Grid implements \Magento\Backend\Block\Widget\Tab\TabInterface
{

Now, the problem is that, since the StockMovement class extending from \BoostMyShop\AdvancedStock\Block\StockMovement\Grid class, my changes in the Stream\OverrideStockMovement\Block\Grid class are not being extended in this file.

If I use:

class StockMovement extends
\Stream\OverrideStockMovement\Block\Grid implements \Magento\Backend\Block\Widget\Tab\TabInterface

instead of

class StockMovement extends \BoostMyShop\AdvancedStock\Block\StockMovement\Grid implements \Magento\Backend\Block\Widget\Tab\TabInterface
    {

My custom column is displayed in the grid, but I don't want to make changes in the extension's file.

I want to override the class with my own module's class file, so that I can make sure future upgrades of the extension are working fine.

Edit: I can't create plugin to extend the functionality, because the function, which I want to modify is a protected function.

Please help me, how can I do this?

Any help will be appreciated.


texts: Check-out broken after theme installation

texts:
I've installed a theme and everything works as intended except the check-out page, it seems like a JS file is missing or something. Any ideas what's going wrong?

Magento v2.1.7
Nothing in logs or browser console


texts: Change search select parameters from OR to AND

texts:
First of all, I've tried to add the ajax search to my website but I didn't like it at all. So my intention is to modify the default search select in a way I like.

What I'd like to do is to change the select parameter which shows you different written words, one OR the other to one AND the other. So there won't be a black T-shirt shown when looking for black glasses, for example.

Do anyone know where is it where I can change the code?

Thanks in advance.


texts: How to get all of those products which are selected in two parent categories?

texts:
How to i can get products from 1 specific category because my products are checked in two parent category. for example
(I have product with the name of xyz and my categories name are A & B, Now i want get products from B which products also checked in A)
If products is selected in category A & category B then show all of those products. I hope you can understand what i mean. please help me, Thansk in advance. (Magento 1.9.2 - Configurable Products)

<?php
$products = Mage::getModel('catalog/product')->getCollection();
$products->joinField(
    'qty',
    'cataloginventory/stock_item',
    'qty',
    'product_id=entity_id',
    '{{table}}.stock_id=1',
    'left'
);
$products->addAttributeToFilter('qty', array('neq' => 0));
$products->addAttributeToFilter('type_id','configurable');
$products->addAttributeToFilter('status', 1);
$products->addAttributeToFilter('visibility', 4);
$products->addAttributeToSelect('sku');
$products->addAttributeToSelect('name');
$products->addAttributeToSelect('description');
$products->addAttributeToSelect('short_description');
$products->addAttributeToSelect('url');
$products->addAttributeToSelect('image');
$products->addAttributeToFilter('price', array('gt' => 250));
$products->addAttributeToSelect('special_price');
$products->addAttributeToSelect('manufacturer');
$products->joinField('category_id',
    'catalog/category_product',
    'category_id',
    'product_id=entity_id',
    null,
    'left'
);

$products->addAttributeToFilter('category_id', array('in' => array('149','224')));
foreach ($products as $product) {
   echo $product->getName();
   print_r($product);
}
?>


texts: Magento 2 - how to get customer entity_id when order is placed rest api

texts:
How to get entity_id after order is placed.

How can i get order details with entity id in Magento2 rest api ?


texts: Make a manual credit memo or refund without an order

texts:
Is there any way to manually create a credit order in the Magento backend, without an actual order being attached?

This is the situation: I am making a refund on an order which was done before I started to use Magento. So no corresponding order in my system.

The accountant needs an credit memo when I refund this. I could create one in the old system or just type one but this would create an inconsistent numbering and layout in my credit memo's (which actually is a small problem, but i was wondering)


texts:
I have one module working fine on one Magento Instance(installation), but If I am installing the same module on another Magento instance on the same server, the view in front-end is not showing.

I have checked almost everything, but couldn't trace the issue.

The process I followed for installation on the second instance of Mangento is like:

php bin/magento module:enable module_name
php bin/magento setup:upgrade
php bin/magento cache:clean
error_reporting(E_ALL);// in app/bootstrap.php
ini_set('display_errors', 1); //in app/bootstrap.ph

Other points

Cleaning static cache and all other cache in the back-end.
The admin config for the module to enable the module is showing fine and it is enabled.
The Magento Deploy mode is set to Developer

since the module is working on one instance and not working on another instance of Magento, I am scratching my head what else I may be missing.

Additional Info:

I have made some modification in the file
view/frontend/layout/catalog_product_view.xml

for example the original code was like:

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="content">
    <block class="Myweb\MWAskquestion\Block\Catalog\Product\View\MWAskquestion"
    name="askquestion" template="Myweb_MWAskquestion::mwaskquestion.phtml"></block>
    </referenceContainer>
</body>
</page>

and the modified code is like:

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<!-- /* <referenceContainer name="content"> */ -->

<referenceBlock name="product.info.options.wrapper.bottom">
    <block class="Myweb\MWAskquestion\Block\Catalog\Product\View\MWAskquestion"
    name="askquestion" template="Myweb_MWAskquestion::mwaskquestion.phtml"
    after="product.info.addtocart"></block>
</referenceBlock>
</body>
</page>

Both instances of Magento hold the modified code. however if replace the modified code with the original code it works in second instance as well. but the output location of the html is on top of the page, whereas I want that below addtocart block.

but If I use the modified code in second instance of Magento, it doesn't work.


texts: Existing or New Customer on Checkout Success

texts:
We have some affiliate tracking on our site.  On the success page we need to pass the tracking some information including whether it's a new or returning customer.
I've tried a few things but I can't seem to get it working.

My latest attempt is the following

if(Mage::getSingleton('customer/session')->isLoggedIn()) {
  # Existing Customer
  $ED = 11111;
}

else {
  # New customer
  $ED = 22222;
}

This script just returns everybody is a new customer.

Any thoughts?

Thanks


texts:
How to add iframe tag in CMS page in Magento 2.2

<iframe src="https://google.com" frameborder="0" width="500" height="900"></iframe>


texts: Magento 2: Observer add product to cart?

texts:
I've read some other post about adding products to cart, but nothing seems to fit.

I've an observer for checkout_cart_update_items_before that adds another product in same qty if specific product is added.

So quantity for product A and B should always be same.

Observer:

public function execute(Observer $observer): void
{
    /** @var \Magento\Framework\DataObject $info */
    $info = $observer->getInfo();
    /* @var \Magento\Quote\Model\Quote $quote */
    $quote = $observer->getCart()->getQuote();
    $cartItems = $quote->getAllItems();

    $update = false;
    $newQty = 0;

    foreach ($cartItems as $item) {
        if ($this->helper->isDepositProduct($item->getProduct())) {
            $newQty += $info[$item->getId()]['qty'];
            $item->setQty($info[$item->getId()]['qty']);
            $update = true;
        }
    }

    if ($update) {
        $addItem = $this->helper->getDepositProduct();
        if ($addItem && $addItem->getId()) {
            $addQuoteItem = $quote->getItemByProduct($addItem);
            if ($addQuoteItem) {
                if ($newQty <= 0) {
                    $quote->removeItem($addQuoteItem->getId());
                    $quote->save();
                } else {
                    $addQuoteItem->setQty($newQty);
                    $observer->getCart()->save();
                }
            }
        }
    }
}

Works:

Luma theme ... update from mini-cart popup works.

Doesn't Works:

update quantity in cart
update quantity in "product options" edit (pen icon in cart/popup)

It only updates qty count next to cart icon in header, but totals and qty input fields do not get changed on the cart page.

This code was ported from M1 and worked there w/o problems :(. So, what is the difference between updating via mini-cart-popup and in checkout cart?

Is there any problems with $observer->getCart()->save();?


texts: How do I insert data into the table in the module installation process?

texts:
I created a new extension where a table was set up in the database. I would like to offer this new module but with pre-existing data in this table.

What is the correct way to do this process?


texts:
Well I guess here's a rare situation, because I can't find any writings about it. I'm building an e-commerce store (Magento) for my client, who doesn't want to sell his products directly. The main reason for that is that he's never certain of the stock. There's, at this time, no possibility of linking the online shop to a POS and we wouldn't want to spend our time refunding people's money all the time, nor would that be ethic.
So actually, this should be the timeline:Client chooses product and ordersClient fills in name & e-mailThanks for your order, we will now check if it's availableAdmin receives mail, checks if in stock and confirms Client receives mail: article(s) in stock! You can now finalize your orderCheckout process with paymentShipment
I've considered:

Building a e-commerce platform myself: time consumingMagento Pre-Orders: payment has to be done immediatelyWishlist and get notified when back in stock: not really commercial

So, basically, my question is: what would be a proper solution for this scenario? Any thoughts are much appreciated. Thank you very much.


texts: Magento admin dashboard is not showing after login to admin panel

texts:
I have installed fresh Magento2.1 EE version.

After login to my admin panel, the dashboard shows the error

I have also attached the screenshot of the same

This site can’t be reached

There's the screenshot below that shows error in chrome.


texts: Magento 2.2.x How to remove MSRP decimals in Admin catalog product grid?

texts: I'm trying to find how to format prices in Magento 2 but stuck with MSRP. In Admin Product Grid, it has 4 decimals. When Editing product, msrp price is correctly currency formatted. Can you guys hint me where to look at to resolve this?


texts:
For some reason Google Analytics code isn't showing up in the frontend.
The module appears to be working, but all that appears is this:

<!-- BEGIN GOOGLE ANALYTICS CODE -->
<!-- END GOOGLE ANALYTICS CODE -->

I've checked the values:

isCookieRestrictionModeEnabled = 0
getCurrentWebsiteId = 1
IS_USER_ALLOWED_SAVE_COOKIE = user_allowed_save_cookie
getPageTrackingData = {"optPageUrl":"","isAnonymizedIpActive":false,"accountId":"UA-xxxx-1"}

Any ideas?


texts: "Archive mode" - Implementing a data freeze

texts:
I am planning on doing some awfully heavy-handed updates to an old 1.4 store that is in production. The site is not really used for selling anything, but mostly used as an information library for each "product" being sold at a brick and mortar. There are Gift Cards being sold, but these are uncommon and they only sell once every handful of days or so, if this stopped working for a few days, it's not a big deal.

I would like to implement a data freeze on the site so that the database gets frozen for (most likely) a day or two while I migrate content/entities/etc over to another server instance. Putting the store in maintenance mode is not desirable, as I still want customers to be able to browse the site/product pages/etc, but I don't want anyone changing records during migration.

While I suspect some hard-editing of index.php will be in order, I'd prefer to not have to edit any application files, and would rather freeze things at a server level.

With this in mind, what are some effective strategies for implementing a data freeze necessary for migrating entities?


texts: Paypal Express Checkout return URL customization

texts:
is it possible to customize the standard Paypal Eypress Checkout return URL https://www.yoursite.com/paypal/standard/success/ ?

If yes, then how?

We would love to use our own, standard success page. The store is running on Magento 1.7.0.2.


texts: Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory

texts:
I created module magento 2,but module can't run and errors exist Please upgrade your database: Run "bin/magento setup:upgrade from the Magento root directory. "

i tried to run command bin/magento setup:upgrade but not success,
appeared another error:

bin/magento setup:upgrade /usr/bin/env: ‘php’: No such file or directory

I am using window 10.


texts: One Page Checkout Stuck on Step 5 Payment

texts:
I can't get past Step 5 Payment in my one page checkout system. I have checked the ID "checkout-payment-method-load" exists, and it does. No JS error. What could be wrong? Using Magento 1.6.

https://www.internationalplayground.com/

I also tried replacing line 81 of info.phtml to

review = new Review(’getUrl('checkout/onepage/saveOrder', array('form_key' => Mage::getSingleton('core/session')->getFormKey())) ?>’, ‘getUrl('checkout/onepage/success') ?>’, $(’checkout-agreements’));

in exception.log

    exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_PaypalUk_Block_Link_Shortcut' in /home/internat/public_html/app/Mage.php:563
    Stack trace:
    #0 /home/internat/public_html/app/code/core/Mage/Core/Model/Layout.php(469): Mage::throwException('Invalid block t...')
    #1 /home/internat/public_html/app/code/core/Mage/Core/Model/Layout.php(411): Mage_Core_Model_Layout->_getBlockInstance('paypaluk/link_s...', Array)
    #2 /home/internat/public_html/app/code/core/Mage/Core/Model/Layout.php(446): Mage_Core_Model_Layout->createBlock('paypaluk/link_s...', 'checkout.cart.m...')
    #3 /home/internat/public_html/app/code/core/Mage/Core/Model/Layout.php(238): Mage_Core_Model_Layout->addBlock('paypaluk/link_s...', 'checkout.cart.m...')
    #4 /home/internat/public_html/app/code/core/Mage/Core/Model/Layout.php(204): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
    #5 /home/internat/public_html/app/code/core/Mage/Core/Model/Layout.php(209): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
    #6 /home/internat/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(345): Mage_Core_Model_Layout->generateBlocks()
    #7 /home/internat/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(270): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
    #8 /home/internat/public_html/app/code/core/Mage/Checkout/controllers/CartController.php(149): Mage_Core_Controller_Varien_Action->loadLayout()
    #9 /home/internat/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Checkout_CartController->indexAction()
    #10 /home/internat/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
    #11 /home/internat/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
    #12 /home/internat/public_html/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
    #13 /home/internat/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
    #14 /home/internat/public_html/index.php(82): Mage::run('', 'store')
    #15 {main}


texts: How to integrate the gmail smtp in magento2 site?

texts:
I am facing some issue with email functionality in magento2 site so need to resolve it, so anyone know solution, please let me know.

Thanks


texts: Email not sending from admin in magento2

texts:
If I can place an order from the frontend, then the order email was sent successfully.

But in the admin side, (Invoice, shipment, notify, send email) Email is not sending in live.

But both side email is sending in local.

How to solve this issue.

Thanks.


texts: Magento 2 - All CMS pages are with content blank

texts:
In my server with: elasticsearch7, apache 2.4.29, mariaDB 10.4 and php 7.4 I imported my Magento 2.4.2 site.
Everything works correctly except for the CMS pages that have empty content and in fact the #maincontent div is empty.
I am attaching a screenshot of the problem:

Content is empty but without errors of php
I've looked at the log files but they don't return any errors.
Why?
It's like Magento doesn't load the CMS page object ...


texts: I setted the Colors attribute in the filtered navigation. If a search a product, all the colors are shown but when I click on a single color, for example "blue", the "blue" products aren't shown and are shown all the configurable product that have an associated product in blue colore. To explain well, I attach some screenshots.


texts:
Magento2 How can I print quote data?
$quote = $this->quoteRepository->get($order->getQuoteId());
                $quote->setIsActive(1)->setReservedOrderId(null);
                $this->quoteRepository->save($quote);

I need to check(print) the quote data, that is being saved. How can I achieve that?
I tried print_r($quote->getData()); but it is throwing error of memory exhausted.


texts: Magento 1.9 set custom field/attribute when order is set to complete

texts:
When order change status from "x" to "complete" I need save when order was completed. I am trying to achieve this with sales_order_save_commit_after event. Problem is that I can't save order when the change is made. Order is completed when Invoice and Shipment were submitted in admin for particular order. I made custom attribute on order completed_at when date and time need to be store.

config.xml

<adminhtml>
    <events>
        <sales_order_save_commit_after>
            <observers>
                <mycompany_mymodul>
                    <class>MyCompany_MyModul_Model_Observer</class>
                    <method>orderUpdate</method>
                </mycompany_mymodul>
            </observers>
        </sales_order_save_commit_after>
    </events>
</adminhtml>

Observer.php

public function orderUpdate($observer)
{
    $order = $observer->getEvent()->getOrder();
    if ($order->getOrigData("status") !== "complete" && $order->getData("status") === "complete") {
        $order->setCompletedAt(date('Y-m-d H:i:s', time()));
        Mage::log(print_r($order->getData(), true));
        //$order->save();
    }
    return $this;
}


texts: how to add search product form in a custom admin module

texts:
I need to add the search product block in a custom admin module form.
I tried with

 <block type="adminhtml/sales_order_create_search" template="sales/order/create/abstract.phtml" name="search">
                        <block type="adminhtml/sales_order_create_search_grid" name="grid" />
                    </block>

The block shows but the add product functionality doesn't work. Basically I need to select products, retrieve the IDs and then save as serialised data.

Any suggestion?
thanks


texts:
this is my query now i want to get brand from this collection

$products = Mage::getModel('catalog/product')
                ->getCollection()
                ->addAttributeToSelect('name')
                ->addAttributeToSelect('brand')
                ->addFieldToFilter('attribute_set_id', $attributeSetId);


texts: Before Clearing cart I want to show Popup for confirmation

texts:
I have added popup it show but not clearing item from cart just reloaded on same page. Please someone look in this.

Below is the my script.

 <script type="text/javascript">
require([
    'jquery',
    'Magento_Ui/js/modal/alert',
    'Magento_Ui/js/modal/confirm'
], function ($, alertt, confirmation) {
    $(document).ready(function () {
        $('.cp-action-accept').parents('aside').addClass('confirm');
        // $('#cp-empty_cart_button').on('click', function (event) {
             $('#empty_cart_button').on('click', function (event) {

            event.preventDefault();
            confirmation({
                title: '',
                content: 'Are you sure to remove products from cart ?',
                actions: {
                    confirm: function () {
                        $('#empty_cart_button').click(function(){
                        $('#empty_cart_button').val($(this).val());
                        });
                         },
                    cancel: function () {
                    }
                },
                buttons: [{
                    text: $.mage.__('OK'),
                    class: 'action secondary cp-action-accept',
                    /**
                     * Click handler.
                     */
                    click: function (event) {

                       window.location.href = '<?php //echo $block->getUrl('checkout/cart/updatePost'); ?>';

                        this.closeModal(event, true);
                       // $('#empty_cart_button').trigger('click');
                        this.closeModal(event);
                    }

                },
                    {
                        text: $.mage.__('Cancel'),
                        class: 'action secondary action-dismiss',
                        /**
                         * Click handler.
                         */
                        click: function (event) {
                            this.closeModal(event);
                        }
                    }
                ]
            });
        });
    });
});
</script>


texts: Which branch should be cloned for a production site?

texts:
From the install guide:

  You can clone either a release branch or the develop branch: Release branches like 2.0 or .2.0.1 are more stable
  develop is more recent.
  Currently, the develop branch is the default but you can clone a release branch like 2.0.1 using the optional -b  argument.

However, the branches list on github shows only:

-Develop (green mark)

-merchant_beta (red mark)

-2.0 (red mark)

Which branch should I clone to get the latest version for a production site?


texts:
I am looking for a docker image that can run my already installed Magento 2 instance with php7.

So I have a working Magento 2 installation (previously created with MAMP) and I would like to be able to create a container that will use those already existing files.

Currently, the available images like mageinferno and alankent create a new Magento 2 application from scratch.

I tried to create my own but I'm running into all sort of permission issues in the var folder.


texts: Lazy load at the product reviews section in magento 2

texts:
I need to add lazy load feature on the product reviews tab instead of pagination if my product has more than 10 reviews.

Thanks in advance.


texts: Send email after x days if payement not send

texts:
After a purchase by bank transfer, i want to send an email 5 days later if the transfer has not been done yet.

How i can do this ?

Thank you for help


texts: Magento 2 : Form values save in db and grid

texts: Can anyone help me to save form values & submit to grid and database ?