texts: How to make the swatch images change on above option select?

texts:
Using the default configurable swatches in a Rwd based theme, and I would Like below option swatches to change depending on the above options selected.

For example, if I select Design 1 for the attribute/option design and then blue for attribute/option colour, the size should change to another image.

Would anyone know how to achieve this ?


texts: Performance implication for persistent shopping

texts:
I'm contemplating enabling Persistent Shopping to reduce cart abandonment, though am slightly concerned about the performance implication thereof.

How much more taxing is this going to be on the database, if at all? Looking at the Mage_Persistent module, I can already see quite a few things:

There is an installer script for the persistent/session table which has 6 columns, 3 indexes and 2 foreign keys. This script also adds the is_persistent column to the sales/quote table.
The introduction of two models, <persistent> and <persistent_resource>
A large number of event-observers, listed below:

customer_login
customer_logout,
controller_front_send_response_after,
controller_action_layout_load_before,
controller_action_predispatch_customer_account_loginPost,
controller_action_predispatch_customer_account_createpost,
controller_action_layout_generate_blocks_after,
controller_action_predispatch,
checkout_allow_guest,
customer_customer_authenticated,
controller_action_predispatch_persistent_index_unsetCookie,
sales_quote_save_before,
custom_quote_process,
controller_action_postdispatch_checkout_onepage_saveBilling,
customer_register_success,
controller_action_predispatch_paypal_express_start,
controller_action_predispatch_paypaluk_express_start,
controller_action_predispatch_googlecheckout_redirect_checkout,
controller_action_predispatch_checkout_multishipping_index,
render_block,
update_customer_cookies

Has anybody noticed a performance impact as a result of enabling persistent shopping?


texts: Component dependency failure on 2.2 upgrade

texts:
Please view the attached image for details:

When I want to install update from my Magento marketplace, it gives me the attached error.


texts: Not able to set Magento 2.2.2 to production mode

texts:
I am done with all the work of my website but now when I try to set it to production mode, it abruptly terminates in shell without giving any error details in log file. At least I was not able to identify if it has some useful info that can guide me to troubleshoot.

Here is what I did to achieve it after the command to set in production mode failed:

I deleted the content inside the folders "generated", "var/cache", "var/page_cache", "var/tmp" and "var/view_preprocessed".
The folder permissions are set as follows:
generated: 0777

var/cache:0755

var/page_cache: 0755

var/tmp: 0755

var/view_preprocessed: 0755
After deletion of folders, I ran following commands in sequence:

  php bin/magento setup:upgrade

  php -d memory_limit=-1 bin/magento setup:static-content:deploy -s standard -f

  php bin/magento cache:flush

The above three commands run successfully.
Now, to set production mode, I ran following command:

  php -d memory_limit=-1 bin/magento deploy:mode:set production

This is what I got on shell screen:

  Enabled maintenance mode
  Starting compilation
  Something went wrong while compiling generated code. See the error log for details.
  Command returned non-zero exit code:
  /opt/alt/php70/usr/bin/php -f /home/admin/pl.com/bin/magento setup:di:compile

I checked the log file "system.log" and found following entry after I ran above command:

[2018-02-06 07:54:30] main.ERROR: /opt/alt/php70/usr/bin/php -f /home/admin/pl.com/bin/magento setup:di:compile 2>&1
Compilation was started.
%message% 0/7 [>---------------------------]   0% < 1 sec 52.0 MiB%message% 0/7 [>---------------------------]   0% < 1 sec 52.0 MiBProxies code generation... 0/7 [>---------------------------]   0% < 1 sec 52.0 MiB
Proxies code generation... 1/7 [====>-----------------------]  14% 1 sec 56.0 MiB
Repositories code generation... 1/7 [====>-----------------------]  14% 1 sec 56.0 MiB<html>
    <style type="text/css">
        .required {color: red;}
    </style>
</html><html>
    <style type="text/css">
        .required {color: red;}
    </style>
</html> [] []

Can someone help me on this. Am I missing something in my steps to set it in production mode.


texts: magento 2 I want to write the dynamic {{var shipping_company}} into the xml file

texts:
Helllo,
    i want to set the the dynamic value of variable into xml file

try {
        $om = \Magento\Framework\App\ObjectManager::getInstance();

    $filesystem = $om->get('Magento\Framework\Filesystem');
    $directoryList = $om->get('Magento\Framework\App\Filesystem\DirectoryList');
    $media = $filesystem->getDirectoryWrite($directoryList::MEDIA);

    $contents = '<?xml version="1.0" encoding="utf-8"?>
<TESTORDER>
  <TESTINFO>
    <SHIPADDRESS>
      <NAME>{{var shipping_firstname}} {{var shipping_lastname}}</NAME>
      <ADDRESS1>{{var shipping_company}}</ADDRESS1>
      <ADDRESS2>{{var order.getShippingAddress().getStreet(1)}}</ADDRESS2>
      <ADDRESS3>{{var order.getShippingAddress().getStreet(2)}}</ADDRESS3>
      <ADDRESS4></ADDRESS4>
      <CITY>{{var shipping_city}}</CITY>
      <STATE>{{var order.getShippingAddress().getRegion()}}</STATE>
      <ZIP>{{var shipping_postcode}}</ZIP>
      <COUNTRY>{{var shipping_country_id}}</COUNTRY>
      </SHIPADDRESS>
  </TESTINFO>
</TESTORDER>';
            $media->writeFile("test/test.xml",$contents);
        }
        catch(Exception $e){
        echo $e->getMessage();
    }


texts: Magento 2 - Setting "Continue Shopping Url" programmatically

texts:
I have a custom module that will do some processing on a product when it receives a POST and then it will add that product to the cart and redirect the user to the checkout/cart page.

When on the Cart page, the "Continue Shopping" button simply redirects the user to the home page.  As part of the original POST product processing, I have the fully qualified domain URL the user came from (same domain).

Is there a way to set the "Continue Shopping" url before I redirect the user to the Cart?

class Add extends Cart
{
    $resultRedirect = $this->resultRedirectFactory->create(); // DI from Cart.php

    $returnUrl = $post['returnUrl'];

    // ... some data processing ...

    $this->cart->addProduct($product, $params);
    $this->cart->save();

    // Set the "Continue Shopping" button URL
    // ??

    // Redirect to Shopping Cart page
    return $resultRedirect->setPath('checkout/cart');
}

I noticed in the Cart block vendor\magento\module-checkout\Block\Cart.php there is a getContinueShoppingUrl() method...

// vendor\magento\module-checkout\Block\Cart.php
public function getContinueShoppingUrl()
{
    $url = $this->getData('continue_shopping_url');
    if ($url === null) {
        $url = $this->_checkoutSession->getContinueShoppingUrl(true);
        if (!$url) {
            $url = $this->_urlBuilder->getUrl();
        }
        $this->setData('continue_shopping_url', $url);
    }
    return $url;
}

And it looks like it's pulling some data from either a view bag or session with a key of continue_shopping_url.  I'm wondering how I can set this value from my custom Controller such that when I redirect the page, it can pick up the URL I'd like it to use?

I tried setting the registry but that didn't seem to work:

$this->registry->register('continue_shopping_url', $returnUrl);

Thanks!


texts: Magento 1.9 get product status (1 or 2) programatically

texts:
What is the way to get a product status programatically?

I've tried

  $_status = Mage::getModel('catalog/product_status')->getProductStatus($productID);

and

  $_product = Mage::getModel('catalog/product')->load($productId);
  $_status = $_product->getData('status');

but none of the above is working.
what did I miss?


texts:
This method works for Magento 1 but not for Magento 2 (version 0.42.0-beta10):
http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/admin/using_custom_admin_theme_templates


texts: Magento 2 - change the form fields sort order in checkout

texts:
How can i change the sort order of the field in the shipping form at checkout. In the checkout_index_index.xml there is only option to sort the region, city, company, etc. But not:

Name, Surname, Suffix, Prefix

thx for help


texts: Recently I have seen over 4000, 404 pages in my webmaster. My site is https://kindergoed.com/ can anyone help me to solve this issue ?


texts:
I've used sales_order_place_after to get order id after order placed from backend but it doesnt return order id. Not sure what's missing here.

Here's my observer

public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $order = $observer->getOrder();
        echo $orderId = $order->getId();  exit;
    }

Above code executed but if it doesnt print order id.

Any suggestions for this ? For all those who are curious I need to store order data after order plaed into custom table.


texts: Splitting an order item into multiple orders items

texts:
Is it possible to do the above and what is the best method for doing so?

Whether the order item is split in to multiple order items depends on whether the user has selected a radio button within the order process. I have been suggested to use a cart observer and listen for cart changes and make required changes that way.

Do you suggest the above or is there a better way of doing this?

Stephen,


texts: layout.xml update ignored after magento update to 2.0.3/2.0.4

texts:
After my update to magento version 2.0.3 and 2.0.4 my layout-updates in ../htdocs/app/design/frontend/[]/[]/Magento_Theme/layout/default.xml won't work anymore.

I checked xml structure and checked against .xsd files and have no error there.

Any idea what this could cause?


texts: How can I hide the text "invoice #........" in the invoice PDF document?


texts: M2E-Pro The product with the same Merchant SKU is being listed now. SKU must be unique for each Amazon item

texts:
I'm retriving the above error , while listing products on M2E-Pro. The error seems to appear only on some products. But interesting that on Amazon I've no products at all. I deleted them all. So it's still saying that the SKU should be unique. All the products have unique SKU on Magento.
So what the error stands for. And how could I fix it ?


texts: How to get images of products in cart using rest API

texts:
Doing a request to "V1/guest-carts/666ef786077b70c95016727cfaf21830/items" will give:

[
  {
    "item_id": 129,
    "sku": "24-UG05",
    "qty": 1,
    "name": "Go-Get'r Pushup Grips",
    "price": 19,
    "product_type": "simple",
    "quote_id": "75fc406b9aadbad6fe1b9a2df9881acd"
  },
  {
    "item_id": 131,
    "sku": "24-WG03",
    "qty": 1,
    "name": "Clamber Watch",
    "price": 54,
    "product_type": "simple",
    "quote_id": "75fc406b9aadbad6fe1b9a2df9881acd"
  }
]

But I also need the thumbnails for the products.. how can I get them without making extra requests for each product?


texts: How to setup Pingdom on your Magemto 2 sites

texts:
I want to set up Pingdom for our Magento 2 sites.
I have seen they need a script just above  of the site. but we have multiple stores so how would that work and where do i put the script (what file?)
Any suggestion are appreciated.


texts:
I am currently running my magento site with the responsive
Ultimo Theme, which has been great so far. However, i am wanting to make some custom css changes to hide some elements on my site which are not compatible with my mobile view. How do i go about implementing a custom css file which is only active when my site is being read on a mobile device?


texts: how to override private function in model in Magento-2

texts: How to override private function in model. If anyone knows please explain me


texts: How can I create a plugin class for product save method when it is called from API?

texts:
How can I create a plugin class to intercept the save product method, with an around method, but only when this is a request from API, is it possible? Thanks in advance.

[Edit]

My current structure:
app/code/Vendor/Module/etc/webapi_rest/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Api\ProductRepositoryInterface">
        <plugin name="name-integrations" type="Vendor\Module\Plugin\ProductPlugin" sortOrder="10"/>
    </type>
</config>

And My ProductPlugin class:

<?php

namespace Vendor\Module\Plugin;

class ProductPlugin
{
    public function aroundSave
    (
        \Magento\Catalog\Api\Data\ProductInterface $product,
        $saveOptions = false,
        \Closure $proceed
    ){
        // logging to test override
        $logger = \Magento\Framework\App\ObjectManager::getInstance()->get('\Psr\Log\LoggerInterface');
        $logger->debug('Here: '.__METHOD__ . ' - ' . __LINE__);

        // call the core observed function
        $returnValue = $proceed();

        // logging to test override
        $logger->debug(__METHOD__ . ' - ' . __LINE__);

        return $returnValue;
    }
}
?>

But When I execute this via API, I get this error: "message": "Internal Error. Details are available in Magento log file. Report ID: webapi-5aabfd61c4d51"

And in log I get:

  [2018-03-16 17:22:41] main.CRITICAL: Report ID: webapi-5aabfd61c4d51; Message: Plugin class Gluk\Integracoes\Plugin\ProductPlugin doesn't exist {"exception":"[object] (Exception(code: 0): Report ID: webapi-5aabfd61c4d51; Message: Plugin class Gluk\Integracoes\Plugin\ProductPlugin doesn't exist at /opt/lampp/htdocs/marketplace/vendor/magento/framework/Webapi/ErrorProcessor.php:205, InvalidArgumentException(code: 0): Plugin class Gluk\Integracoes\Plugin\ProductPlugin doesn't exist at /opt/lampp/htdocs/marketplace/vendor/magento/framework/Interception/PluginList/PluginList.php:182)"} []

It is sayng that this plugin doesn't exists, and I cant see where is my mistake, I've already runned bin/magento setup:di:compile successful.


texts: How to import a configurable product multiple attributes?

texts:
I have been using Magento EE 2.1.7 and trying to import a configurable product with 2 attributes: shoe size and shoe width.

I manually created 1 configurable with several simple and exported those for a template to create more.

When importing from a csv it's only adding one of the configurable options.

I have tried several variations in the column configurable_variations.

If I try to add both attributes I get an error on import. If I leave this like export it only adds one option.

So how to import a configurable product with 2 or more attributes.

Thanks


texts: Amazon Sales Channel Extension - Existing Seller Central Acct - Magento 2.3.5, Orders not Converting

texts:
Background: I connected Amazon Sales Channel to an existing Amazon Seller Central account (mainly for the order import function). I have "import orders" set to enabled under Order Settings. I haven't listed any products through the Magento Amazon Sales Channel interface (I used my existing listings), but it does show the account as active and shows all the orders from the Seller Central account in the Magento Amazon interface.
PROBLEM: None of the orders are converting to Magento orders. Since I've never seen this program work properly, how can I troubleshoot? There is a log tab but it shows empty. Are there any other logs on the server showing whats happing with the program? Are there any other steps that can be taken to figure out why its not converting orders to Magento Order management?
Ive tested on all 4.x versions of the Amazon Sales channel Extension with the same results so it could be configuration on my end.


texts: Description of Magento2 different existing types of .xml files and parsing

texts:
I know now that xml files in M2 are being red/parsed by

\Magento\Framework\Config\Reader\Filesystem.php

PART 1 : Can someone explain briefly the different existing .xml types (by types i mean config.xml is one type, system.xml is another type) in M2 modules and what purpose do they server. Like :

1) module.xml - used for declaring the module and the module dependencies on other modules...
2) config.xml - used for....
3) system.xml - used for....
4) layout.xml - used for....
5) ....xml - used for .....

PART 2 : Are all .xml file types that we see in the core modules  sort of "predifined" by the System, to make it more clear - the system receives files like I mentioned in PART 1 and knows that it has to read them, but if it receives a file that I talk of in PART 3 or like it was given in the example that I pointed out (table.xml) you have to extend and change the child class of   \Magento\Framework\Config\Reader\Filesystem.php class.

PART 3 : Also, if I need a file that is not predefined to get parsed by the system how should one proceed with parsing and including this file.

I know this is an extensive question, but I think it will help a lot of developers who are having first time experience in Magento2 as the system looks very complex. Thank you.

EDIT:

I think this explains the custom PART 3 if no one can suggest another option. How can I have a custom XML file in modules merged as one in Magento 2? (MageStackDay mystery question 2)


texts: How to remove white background from product image in Magento 2.3.3?

texts:
i want to remove white background for product image but it's not working all... i have apply How to remove white background from product images in Magento 2.2.6? this solution but still same..

Please check SS for slider https://nimb.ws/RpcNFm

<image id="category_page_list" type="small_image">
                <width>240</width>
                <height>300</height>
                <transparency>false</transparency>
                <aspect_ratio>false</aspect_ratio>
                <frame>false</frame>
            </image>

Thanks in advance for help !!


texts:
I'm learning about Store Views and I'd like to know if I can set a list of specific carriers to each of the views I have.
I know I can set languages, manage inventories, configure different categories, but what I haven't been able to find is if I can set a specific list of carrier for each view. Say store A only deals with USPS and FedEx, but store B only with UPS and DHL. Is there a benefit in doing that? Is there a better way to limit store A to USPS and FedEx?
I using v2.3.3
Thanks.


texts: Uncaught Error: Call to undefined method - Magento 2.3.3

texts:
I tried find a solution to this magento 2 theme problem. How should be edit the theme file?

PHP Fatal error:  Uncaught Error: Call to undefined method Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection\Interceptor::getCollectionClone() in app/code/custom_theme/LayeredAjax/view/frontend/templates/layer/filter.phtml:15
Stack trace:
#0 vendor/magento/framework/View/TemplateEngine/Php.php(59): include()
#1 vendor/magento/framework/View/Element/Template.php(271): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor), '/home/npartsco/...', Array)
#2 vendor/magento/framework/View/Element/Template.php(301): Magento\Framework\View\Element\Template->fetchView('/home/npartsco/...')
#3 vendor/magento/module-layered-navigation/Block/Navigation/FilterRenderer.php(29): Magento\Framework\View\Element\Template->_toHtml()
#4 vendor/magento/framework/Interception/Interceptor.php(58): Mage in app/code/custom_theme/LayeredAjax/view/frontend/templates/layer/filter.phtml on line 15

line 12-23

<?php
    $productCollection = $filter->getLayer()->getProductCollection();
    $productCollectionClone = $productCollection->getCollectionClone();
    $collection = $productCollectionClone
        ->removeAttributeSearch(['price.from', 'price.to']);

    $min = $collection->getMinPrice();
    $max = $collection->getMaxPrice();

    list($from, $to) = $requestValue ? explode('-', $requestValue) : [$min, $max];
?>


texts:
we have an AWS hosting, suddenly we got this below issue.
Error 503 Backend fetch failed
Backend fetch failed
Guru Meditation:
XID: 65561
Varnish cache server
we cant understand what's causing this issue. it is from AWS hosting or from project config.
please help with this.


texts: Magento 2: Invalid response line returned from server: HTTP/2 200

texts:
Invalid response line returned from server: HTTP/2 200

I get the above error message when I want to log in to the extension manager.

Does anyone know how I can solve this?

Love to hear if someone has a solution for this.


texts: How to add comments on order after checkout

texts:
How I can allow the customer to add a comment after they place the order and checkout, from "My Orders" => "Order View Page" on the frontend?

because I need the customer to send the receipt after they transfer the money to my banking account.

Please note that I am using Magento 2.1.1


texts: Different results - collection data and mysql core query

texts:
While trying to sort product collection by custom attribute, I am facing weird issue.
That is, some products are repeated in back pages.

If I print collection query like

$_productCollection->getSelect()->__toString();

and run it directly on mysql, then no product gets repeated.

Debugging indicates -
either my custom attribute sorting has problem - because sorting products by name seems fine on listing page.

or magento collection is prematurely executed/modified.

Appreciate your help.


texts: Not able to add contact us to navigation menu

texts:
I am trying to put the link of contact us that is at the bottom of magento website on the navigation menu. The form contains email textbox and a textbox where user could write and submit it. I want this link to open from navigation bar at the top. I tried doing it but nothing works.  Please let me know how can I do it.
Thanks


texts:
I got a cron job which creates products. There are many products, so the cron runs more than every 4 hours.

I create my products in batches of 250 and with paging. If I create every batch/page single wise, there is no error.

If I run the cron job as it should be (all product batches in row), then I get a timeout.

[27-Sep-2018 13:09:26 UTC] PHP Fatal error:  Maximum execution time of 240 seconds exceeded in /../magento/app/Mage.php on line 0

This is the file and line, where this error comes from, varies from time to time...

on top of my importer file I call this, because I hoped it would help...

ini_set('MAX_EXECUTION_TIME', -1);

php_ini max_execution_time is set to 18000... where does this 240 come from and how can I change it?


texts: Get frontName of admin from app/etc/local.xml

texts:
<admin>
        <routers>
            <adminhtml>
                <args>
                    <frontName><![CDATA[admin]]></frontName>
                </args>
            </adminhtml>
        </routers>
    </admin>

How can I get the front Name of my admin, to use it in code like this ->

$wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('add_variables' => false, 'add_widgets' => false, 'files_browser_window_url' => $this->getBaseUrl() . '(there must be frontname)/cms_wysiwyg_images/index/'));


texts: DynamicRows - underscore's function last() is not defined

texts:
After A LOT of struggling with Dynamic Rows, I finally have something.

1) I created DataProvider Modifier to add my data into form initial data.

2) I have the "legendary code" in my XML file that finally works:

<dynamicRows name="slides">
            <settings>
                <identificationProperty>slide_id</identificationProperty>
                <addButtonLabel translate="true">Add Swatch</addButtonLabel>
                <additionalClasses>
                    <class name="admin__field-wide">true</class>
                </additionalClasses>
                <componentType>dynamicRows</componentType>
                <columnsHeader>false</columnsHeader>
                <addButton>false</addButton>
            </settings>
            <container name="record" component="Magento_Ui/js/dynamic-rows/record">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="isTemplate" xsi:type="boolean">true</item>
                        <item name="is_collection" xsi:type="boolean">true</item>
                        <item name="componentType" xsi:type="string">container</item>
                        <item name="positionProvider" xsi:type="string">position</item>
                    </item>
                </argument>
                <field name="slide_id">
                    <argument name="data" xsi:type="array">
                        <item name="config" xsi:type="array">
                            <item name="visible" xsi:type="boolean">true</item>
                            <item name="dataType" xsi:type="string">text</item>
                            <item name="label" xsi:type="string" translate="true">Slider ID</item>
                            <item name="formElement" xsi:type="string">input</item>
                            <item name="source" xsi:type="string">slide_id</item>
                            <item name="dataScope" xsi:type="string">slide_id</item>
                        </item>
                    </argument>
                </field>
                <field name="position" component="Magento_Catalog/js/form/element/input" formElement="input">
                    <argument name="data" xsi:type="array">
                        <item name="config" xsi:type="array">
                            <item name="prefixName" xsi:type="string">slide.position</item>
                            <item name="prefixElementName" xsi:type="string">slide_</item>
                        </item>
                    </argument>
                    <settings>
                        <additionalClasses>
                            <class name="_hidden">true</class>
                        </additionalClasses>
                        <dataType>text</dataType>
                        <visible>false</visible>
                        <dataScope>position</dataScope>
                    </settings>
                </field>
            </container>
        </dynamicRows>

But there's a problem:

Uncaught TypeError: this.parentName.split(...).last is not a function in (...)/adminhtml/Magento/backend/en_US/Magento_Catalog/js/form/element/input.js:40

function last() seems to be from underscore and I can see it defined in top of the file:

    define([
        'underscore',
        'Magento_Ui/js/form/element/abstract'
    ], function (_, Acstract) {
        'use strict';
(...)

That part of code:

this.parentName.split('.')

Is returning nice array.

I know that I'm super-close to achieve my goal:


texts: Magento 2: developer mode breaks magento command line

texts:
Right after installing magento, (2.3.2),
I run

bin/magento deploy:mode:set developer

to enable developer mode. I remember when I had done before without setting this flag, the instance worked fine.

This command succeeded, but right after that, I am not even able to run any of the Magento commands.

Even the command to know the current status fails

>bin/magento deploy:mode:show
Class Magento\Framework\App\ResourceConnection\Proxy does not exist

(since magento command itself is broken, di:compile or even turning off the developer mode will fail).

I could salvage the situation by copying the generated files from my another instance.  But I am not sure why this happens and how to force it to regenerate the generated files.


texts: Show product name on Configurable product option popup in admin while creating order

texts:
the requirement is to show the product name on the configurable option popup while adding product to order in admin area.The block and phtml file is
<block class="Magento\Catalog\Block\Adminhtml\Product\Composite\Configure" name="after.body.start.product_composite_configure" template="Magento_Catalog::catalog/product/composite/configure.phtml"/>
have getProdut() function but it give null as output.


texts:
I'm trying to display the (quick) search in the navigation menu.
Here is what I have so far:

catalogsearch.xml

<reference name="header">
    <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
</reference>

top_nav.phtml

<?php echo $this->getChildHtml('topSearch') ?>

But the search bar isn't showing.

I've refreshed the caches
It isn't hidden by CSS, it isn't even showing in the inspector
I'm working from the right template

What am I doing wrong?


texts:
I'm trying to install Magento 2 with sample data on my linux desktop and web based installation always hangs on the 65 to 67% range.

My /var/www/html/magento folder has 777 permissions for all files and directories and on .htaccess, on the root magento folder, I have defined:

php_value memory_limit 2048M
php_value max_execution_time 18000

Both apache and php were installed via apt-get. And the php modules were installed to comply with pre installation check.

For php install test purposes, I created the standard phpinfo.php file with <?php phpinfo(); ?>. But I installed php 7.0 from apt's repository. Would this be an issue?

Also, when I try CLI installation, I use this command:

bin/magento setup:install --base-url=http://localhost --backend-frontname=backend --admin-user=master --admin-firstname=Admin --admin-lastname=Admin --admin-email=an.email@server.com --admin-password=7-digitStrongPassword --db-host=localhost --db-user=magento --db-name=magento --db-password=magentoUser

The CLI installation finishes successfully but I still can't access the local application.

Being a Java developer, I'm not php-wise savvy. What am I missing here?


texts: I have Changed custom admin URL from admin panel,not working and getting admin url 404 error.


texts:
What I would like to achieve is to show Account Name + Lastname in sales order grid (like it happens in customer grid).

These are files I created:

Cpu/CustomGrid/etc/config.xml

<config>
    <modules>
        <Cpu_CustomGrid>
            <version>0.4.0</version>
        </Cpu_CustomGrid>
    </modules>
    <global>
        <blocks>
            <getname>
                <class>Cpu_CustomGrid_Block</class>
            </getname>
        </blocks>
        <models>
            <getname>
                <class>Cpu_CustomGrid_Model</class>
            </getname>
            <cpu_customgrid>
                <class>Cpu_CustomGrid_Model</class>
            </cpu_customgrid>
        </models>
    </global>
<adminhtml>
    <events>
      <adminhtml_block_html_before>
            <observers>
                <addColumnsToSalesOrderGrid>
                    <class>Cpu_CustomGrid_Model_Observer</class>
                    <method>addColumnsToSalesOrderGrid</method>
                </addColumnsToSalesOrderGrid>
            </observers>
        </adminhtml_block_html_before>
    </events>
</adminhtml>
</config>

Cpu/CustomGrid/Model/Observer.php

class Cpu_CustomGrid_Model_Observer extends Varien_Event_Observer
{
public function addColumnsToSalesOrderGrid(Varien_Event_Observer $observer)
    {
    $event = $observer->getEvent();
    $this->_grid = $event->getBlock();
    if ($this->_grid instanceof Mage_Adminhtml_Block_Sales_Order_Grid) {
        $this->_collection = $this->_grid->getCollection();

        $select = $this->_collection->getSelect();
        $resource = Mage::getSingleton('core/resource');

        $columnData = array(
                'header' => 'Name',
                'index'  => 'name', // Account Name/Surname
                'type' => 'text',
                'renderer' => 'Cpu_CustomGrid_Block_Getname'
            );

        $this->_grid->addColumnAfter('name', $columnData, 'company');
        $this->_grid->sortColumnsByOrder();

        // rebuild the filters
        $filter = $this->_grid->getParam($this->_grid->getVarNameFilter(), null);
        if (is_null($filter)) {
            $this->_collection->load();
        }
        $this->_collection->clear();
        if (is_string($filter)) {
            $data = $this->_grid->helper('adminhtml')->prepareFilterString($filter);
            $this->_setFilterValues($data);
        } else {
            if ($filter && is_array($filter)) {
                $this->_setFilterValues($filter);
            }
        }
        // force a reload of the collection
        $this->_collection->load();
        }
    }

}

Cpu/CustomGrid/Block/Getname.php

class Cpu_CustomGrid_Block_Getname extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
    public function render(Varien_Object $row)
    {
         return $row->getFirstname().' '.$row->getLastname();
    }
}

Unfortunately I cannot get the Name + Lastname to show. What could be the problem?


texts: how to Load the custom attribute with the product listing in magento 2?


texts: Magento 2 refund button unable to click while using other payment method

texts:
I've been finding a solution to this problem for a long time.

I developed a payment method for Magento 2.2.9 and testing for the execution.

The problem comes when I try to refund the order by clicking the order button. Unfortunately, the button doesn't work. I tried to use the inspector console by the browser and it shows the missing legacy-build.min.js while the default payment method should define this js. This is the main reason why the button doesn't trigger any much. I've been looking for while why the legacy-build.min.js doesn't define and I didn't find anything.

Please share the answer if you have some clues here
Note : The Legacy script will execute button to disable while i clicking it


texts: Set products back to use default store values

texts: I've imported multiple products with dataflow-profiles. By mistake the products are added to store X. I want my products to use the default values instead of store X's. How do I mass set my products to use default values and images, and not the store specific ones.


texts: Change Position of Recently Viewed Products

texts:
I have added a widget of recently viewed products in Magento 2.3.5
On the product view page, recently viewed products display before related products.
How to change the layout and show recently viewed products after related and upsell products?


texts:
I'm getting following issue when I'm click associated products.

main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_321f776dd692abd332ec2bb61e502b692 and handles default, attachments_attachments_attachment_products: Please correct the XML data and try again. complex type 'handleType', attribute 'base': The QName value 'layoutType' does not resolve to a(n) simple type definition.
Line: 47
 [] []
[2016-07-15 13:35:01] main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_3cf9ab1b1723bedc1dcd665a812b00335 and handles admin-1column: Please correct the XML data and try again. complex type 'handleType', attribute 'base': The QName value 'layoutType' does not resolve to a(n) simple type definition.
Line: 47
 [] []

<?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>
    <block class="Magento\Framework\View\Element\Text\ListText" name="root">
      <block class="Web4pro\Attachments\Block\Adminhtml\Attachment\Edit\Tab\Product" name="attachment.edit.tab.product"/>
      <block class="Magento\Backend\Block\Widget\Grid\Serializer" name="product_grid_serializer">
        <reference name="product_grid_serializer">
          <action method="initSerializerBlock">
            <arguments>
              <argument xsi:type="string" name="grid_block_name">attachment.edit.tab.product</argument>
              <argument xsi:type="string" name="data_callback">getSelectedProducts</argument>
              <argument xsi:type="string" name="hidden_input_name">products</argument>
              <argument xsi:type="string" name="reload_param_name">attachment_products</argument>
            </arguments>
          </action>
          <action method="addColumnInputName">
            <arguments>
              <argument xsi:type="string" name="input_name">position</argument>
            </arguments>
          </action>
        </reference>
      </block>
    </block>
  </body>
</page>

Please find code below url.
https://github.com/sivajik34/Magento2-Product-Attachments


texts:
I would like to secure my magento 2 site, and to be sure to lose nothing.
If there is a problem, I can restore a backup but I will lose datas between now and the date of the backup.

Do you know how I can secure my site to have all datas if unexpected problem occur?

Thanks,


texts: Magento 2 modal-popup not opening second time

texts: I am calling my modal widget from an external .js file on link click which is working fine for the first time but when I cancel the modal and click the same link again it is not opening. Also when I include the js code in my file it works fine. Any help?


texts: How to add anchor tag in Magento 2 Email templates?

texts:
I am using the below line to add Anchor tag in Email template of magento 2. But it's printing as a text.

{{trans 'www.powermax.com'}}


texts: Magento2.3.0 In checkout page getting this error on console

texts:
I have getting this error on checkout page in console. Also in chrome browser loader non stop loading but if i refresh the page two three time than loader stop loading.But if i'm going back to cart page then after again go to checkout page loader issue comes again. If anyone have idea then please reply. Thanks in advance.

Failed to load resource: the server responded with a status of 500 (Internal Server Error)
0a570bb380c548387637090f9034e701.min.js:13 Uncaught Error: https://XXXX.co.uk/pub/static/version1560436487/frontend/XXX/XXXX/en_GB/js-translation.json HTTP status: 500
    at XMLHttpRequest.xhr.onreadystatechange (text.min.js:8)


texts: magento2 layoutMessage for catalog session?

texts:
how to get the equivalent layout for catalog session in magento2

$this->_initLayoutMessages('catalog/session');
$this->renderLayout();


texts: Magento 2.3 - After adding product to cart - But Cart Page, Mini Cart and Chekout showing Empty

texts:
I'm facing this issue on my live server, when I'm adding product to cart the ajax requests from (1) to (0). I'm getting this message (Product added successfully) But mini cart, cart page, and checkout are empty. I'm using Magento 2.3.0

anyone can help me regarding this issue?

Thanks


texts:
I'm trying to test checkout with Sagepay but always get error:

  " CheckPassword: Request failed. Number of failed logins:0"

I'm using Saferpay Business module, version 1.0.12.

I think it is because of my VISA card information but I don't know how to test checkout with Sagepay. Can someone know about that please ?


texts: How can I use the Grid Serializer for custom input column

texts:
I have created a custom magento extension that lists the products in the same way as 'Manage Products' but with an extra input column where people can enter a quantity for each row which is then used to generate a CSV file.

I have got this to work but I have seen an issue where you can select some products and change page and the products are still selected but the quantity that the user has entered is lost. How can I save the quantity added to the new custom input fields with the selected products.

I am assuming that something is used in grid.js to save the details but I haven't been able to find the correct function.

Anyone have any ideas?


texts: Google Analytics - put their code in manually or is it already included?

texts:
I have 1.9.0 and the SEO lady wants me to put the following code into every page of the website in order so that she can work with Google Analytics. Is this already included in the Magento shopping cart? I activated this in SYSTEM - CONFIGURATION - SALES - GOOGLE API - GOOGLE ANALYTICS - it's asking for Type - Google Analytics or Universal Analytics and I put in the Account number. I read somewhere that 1.9.0 only has Universal Analytics working and 1.9.1 only has Google Analytics working - is that correct?

  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new
  Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
      ga('create', 'UA-52215891-1', 'auto');   ga('send', 'pageview');


texts: Database log_* tables are all empty in production, but not when I export the database for testing in an identical setup

texts:
Magento Version: EE 1.12.02

I'm having an issue with all of my log_* tables being empty on my production site. Mage_Log is turned on, there are no errors in any of the Magento logs or system logs that would point to anything being wrong.

However the really odd part is when I follow these steps for bringing up my test environment so that I can troubleshoot the issue, the problem disappears. I'll list the instructions in case there's anything anyone can gleam from them.

1) I export my production database so that I can import it into development for troubleshooting.

mysqldump --add-drop-database -u prod -p prod_db > prod_db.sql

2) I sed the database with my development URL and turn off https.

sed s^prod.url^dev.url^g < prod_db.sql > dev_db_1.sql
sed s^https://dev.url^http://dev.url < dev_db.sql > dev_db_final.sql

3) I import this database over my development database for testing.

mysql -u dev -p dev_db < dev_db_final.sql

4) I log into my development setup, flush the cache, re-index and browse the site and all of my log_* tables start working.

There are no other changes during that process. The server is the same, the permissions are the exact same, the code is the exact same code as production.


texts: Get arbitrary user attribute in Magento 2

texts:
I am trying to get certain user data by ID, and read that it's better not to use the object manager. So let's say I want to get a defined attribute, with this:

$user = $this->customerRepository->getById($user_id);
$attribute = $user->getCustomAttribute($attr);
if (!empty($attribute))
    return $attribute->getValue();

It doesn't work for anything I put in the $attr ($attribute is null), even things like email which are obviously defined. I'm probably completely misunderstanding how this works, but what is the "attribute code" if not the attribute name itself?

If this is not the correct way to retrieve arbitrary user data, please point me in the right direction.

EDIT: The class being injected for customerRepository is \Magento\Customer\Api\CustomerRepositoryInterface.


texts: Applying SUPEE-6788, it removes static block

texts:
Today I applied patch SUPEE-6788, and I noticed that the static block on my home page disappeared.

I have checked in admin side, i have used {{block type="catalog/product_list" category_id="10".. and {{block type="responsivebannerslider/index" name="responsivebannerslider_index" ..

Similarly i have used so many block in my Magento sites.

I have read on google and find the solution to manually add these blocks in System -> Permissions -> Blocks.

Ok, I have manually added two "catalog/product_list" and "responsivebannerslider/index", and it is working fine.

But my problem is, i don't know how many block i have added in my magento sites. It is not possible for me to manually add these block in System -> Permissions -> Blocks.

How to solve this issue?


texts: Magento2 people on same network logged into each others account with form keys disabled

texts:
With  magento config:set admin/security/use_form_key 0

People say that sometimes they are logged into each others accounts.  I'm not sure how this is possible since they never log into each others computers and thus wouldn't even have the session cookie.  We go through cloudflare, but that should make no difference at all.  We use redis but that too should make no difference at all.  It does have us a bit worried though.

Having form keys on is a huge pain as we can't copy an admin url and give it to someone else.  It's really upsetting it does this with form keys off.


texts: Stock status of grouped and bundle products

texts: How can I get the final stock status of grouped product or bundle product?


texts: After change server from another , Admin Login Page Error : 404 error

texts:
I upload my magento store on server from other server.but when try to login in admin panel I get 404 error .
what is the solution ?

I go into the phpmyadmin and also check for below code

SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;

so what is the problem, i can not debug...


texts: Auto reorder loop - Second order errors out

texts:
I'm querying for specific memberships that were previously ordered and reordering them via the admin reorder functions. However, when the foreach goes through a first full cycle  and successfully places a reorder, the second cycle starts and tries to reorder the second order and fails because some of the original order data exists even though the next order data has been set already.

This is what I am trying to do:

foreach($memberpackageCollection as $mpcKey => $memberpackage) {
    try {
        $orderId = $memberpackage->getOrderIds();
        $personsOrder = Mage::getModel('sales/order')->load($orderId);

        /* Set different payment method */
        $personsOrder->getPayment()->setMethod('checkmo');
        $personsOrder->getPayment()->setMethodInstance(
            Mage::getModel('payment/method_checkmo')->setInfoInstance(
            $personsOrder->getPayment()->getMethodInstance()->getInfoInstance()));

        Mage::unregister('rule_data');
        $orderModel = Mage::getSingleton('adminhtml/sales_order_create');
        $orderModel->initFromOrder($personsOrder->setReordered(true));
        $orderModel->createOrder();
    }
    catch (Exception $e) {
        Mage::logException($e);
    }
}

Error occurs after second time it loops.

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '100006914-1' for key 'UNQ_XYYXSALES_FLAT_ORDER_INCREMENT_ID''

I understand that the error is produced because there is a duplicate increment ID. This is because it tries to reorder on the original order and not on the next one. As you can see from the code I show, I am loading a new order and trying to create a reorder on that order. Somehow I need to clear the session data that appears to be set in the model adminhtml/sales_order_create that seems to remaining in there for each order.


texts: Free shipping by excluding coupon discount

texts:
I want to give free shipping, when subtotal is greater or equal to 75 and country is United state.

But when the subtotal is 100 and after applying the coupon discount subtotal become less then 75, then user still able to get free shipping.

How I can create a shipping rule, so that user only receive free shipping when sub total greater then or equal to 75 after applying the discount ?

Please suggest me, thanks


texts: Magento 1.9.x - How to speed up adding to cart

texts:
I am trying to speed up my add-to-cart buttons. Right now, it takes about 5 seconds from when you press the button until it goes into the cart. Seems a little excessive to me...
This is being tested by the add-to-cart button on the catalog page (not product page) and using the mini cart.

Using the network tab of the inspector on Chrome, I can see it's taking 4.8 seconds to load this:

http://storeapp.themightycompany.com/checkout/cart/add/uenc/aHR0cDovL3N0b3JlYXBwLnRoZW1pZ2h0eWNvbXBhbnkuY29tL2NhdGFsb2cvY2F0ZWdvcnkvdmlldy9pZC82/product/71/form_key/pGlDf5Xj0JU5dEwT/

I don't really know what that is, or if that is a clue to how I can speed this up?

Thanks for any help!


texts: what do cache.xml in etc folder of any module?

texts:
I have seen cache.xml in etc folder in some modules.What exactly does cache.xml and what exactly purpose of cache.xml and its xml code ?

I have seen some code in cache.xml like this

<config>
    <placeholders>
        <my_placeholder_identifier>
            <block>mycompany_mymodule/blockname</block>
            <placeholder>MY_PLACEHOLDER_NAME</placeholder>
            <container>Mycompany_Mymodule_Model_Container_Blockname</container>
             <cache_life>0</cache_life>
             <cache_lifetime>0</cache_lifetime>
        </my_placeholder_identifier>
    </placeholders>
</config>

What this above code in etc/cache.xml ?

Above code works for only magento enterprise edition ?

This code works for only full page cache ?

Why we write block path and model path ? and What I have to write in block and model path ?


texts: Magento 2.0.x - Insert block in to the product page

texts:
After about a week reading through the Magento 2 Docs - layout instructions, and some other stack exchange Q's and A's, I still having a hard time to figure out how to insert a custom block in to the specific location of the product page.
What I have so far,
in to the top of this page: /app/design/frontend/<Vendor>/<theme>/Magento_Catalog/templates/product/view/details.phtml

I have inserted this line of code:

echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('block_identifier')->toHtml();

In the product "Custom Lyout Update", i have inserted this XML

<referenceContainer name="block_identifier" >
    <block class="Magento\Framework\View\Element\Template" name="test_file" template="Magento_Theme::html/test.phtml"   />
</referenceContainer>

The only time I can see contents of my test.php file is when I change referenceContainer name to predefined blocks as "content" or "product.info".

Links that I found useful:
Magento2- Display Static Block in Phtml file & CMS page
Magento 2 - How to call a custom phtml file in another phtml file, xml layout, static block and cms page?
How to show the static blocks in Magento 2?
Magento 2 tutorial – How to use the new front-end templating system

My current temp fix
I insert test.phtml file to a specific product this way.

<referenceContainer name="main" >
    <container name="product.info.desc" htmlTag="div" htmlId="product-info-desc-id" htmlClass="product-info-class" >
        <block class="Magento\Framework\View\Element\Template" name="test_file" template="Magento_Theme::html/test.phtml"   />
    </container>
</referenceContainer>
<move element="product.info.desc" destination="content" after="product.info.media" />

Any help is greatly appreciated. Thank you.


texts:
just made upgrade to 2.3.0 and while compilation get this error:

server@server:~/web/server.dev.company.com/public_html$ /usr/bin/php7.1 bin/magento setup:di:compile
    Compilation was started.
    Repositories code generation... 1/7 [====>-----------------------]  14% 1 sec 68.0 MiBPHP Fatal error:  Class 'PHPUnit_Framework_TestCase' not found in /home/server/web/server.dev.company.com/public_html/app/code/WebShopApps/MatrixRate/test/Unit/Block/Adminhtml/Form/Field/ImportTest.php on line 36

I try to remove this module, but it not solve this trouble.


texts: When I have install Magento from localhost to Live environment. Front End of Website working fine But Admin Panel Shows error "This page isn’t working mysite.com redirected you too many times."


texts: Element 'argument': The type definition is abstract

texts:
I flow How to add a tab in product details page using Magento 2 admin panel step to add a custom tab

and I got this error

my file struct

catalog_product_view.xml

<?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">

    <update handle="catalog_product_opengraph" />
    <update handle="page_calendar"/>

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

</page>

view.phtml

<?php
$product=$block->getProduct();
?>

<?php echo $product->getData('custom_tab');?>

How Can I solve this error


texts: Include multiple Mage.php into an external script

texts:
Is it possible to include multiple Magento (Mage.php) instances into the same external script and run them simultaneously?

My idea is to develop an external migration tool between two Magento systems, where entities from one instance will be directly transferred into the other one.

Normally I can load Mage via:

require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();

But can I do something like:

require_once('../old/app/Mage.php'); //Path to Magento (1st instance)
require_once('../new/app/Mage.php'); //Path to Magento (2st instance)
umask(0);
Mage::app();  //This would probably not work anymore, if I include more than one Mage.php?..

Does anyone have an idea?


texts:
I am using magento 2 + react (frontend).
I have setup grapql to interconnect with frontend-backend functionality
I have Customer Logout event in module which is not triggering,
i do not see any error in logs.
Any thoughts, if it need any correction ?
Thanks
app/code/Vendor/Module/etc/events.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="customer_logout">
        <observer instance="Vendor\Module\Observer\CustomerLogout" name="customer_logout_observer"/>
    </event>
</config>

app/code/Vendor/Module/Observer/CustomerLogout.php
<?php

namespace Vendor\Module\Observer;

use Vendor\Module\Helper\Tracking;
use Magento\Framework\Event\ObserverInterface;
use Psr\Log\LoggerInterface;

class CustomerLogout implements ObserverInterface
{
    /**
     * @var \Psr\Log\LoggerInterface
     */
    protected $logger;

    /**
     * @var Tracking
     */
    protected $helper;

    public function __construct(LoggerInterface $logger, Tracking $helper)
    {
        $this->logger = $logger;
        $this->helper = $helper;
    }

    /**
     * @param Observer $observer
     * Call helper & pass customer object
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        try {
            $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/customerlogout.log');
            $logger = new \Zend\Log\Logger();
            $logger->addWriter($writer);
            $logger->info('CustomerLogout event');
            $customer = $observer->getEvent()->getCustomer();
            $this->helper->trackLogOut($customer);
        } catch (\Exception $e) {
            $this->logger->info($e->getMessage());
        }
    }
}


texts: Is it possible to add a Magento partial payment invoice state

texts:
In Magento invoices can have 3 states,
Paid,
Pending
Canceled.

Is it possible to add a 4th one, so I can set an invoice "partial paid".
This should be visible in the admin grid in Magento.

I already found this module, but this doesnt work like I want in the admin.
https://www.indiesinc.com/magento-extensions/partial-payment.html


texts: How to get product from custom attribute in Magneto 2?

texts: I have a Custom attribute on Product in which i have save a string i want to get count of those products which have same attribute value in Magento 2 using an Controller or Model.


texts: How to restrict specific Region from shipping?

texts:
I want to restrict some specific regions from the shipping list due to some requirements, so anyone can help here?

Thanks


texts: Magento 2.1.9: How to remove sale price in multi store?

texts:
Is there any way to removing sale prices in different stores? using any script ? or using any other way except admin?

I'm using five different stores, default store is easy but other multi stores take ages as you can only change simple products manually and it looks like you can’t change the configurable products.

Basically, it takes about 20 minutes to take a shoe off sale which can’t be right.


texts: Disable module and it's output programmatically in Magento 2

texts:
In magento 1 disable module and it's output programmatically

protected function _disableModule($moduleName) {
    // Disable the module itself
    $nodePath = "modules/$moduleName/active";
    if (Mage::helper('core/data')->isModuleEnabled($moduleName)) {
        Mage::getConfig()->setNode($nodePath, 'false', true);
    }

    // Disable its output as well (which was already loaded)
    $outputPath = "advanced/modules_disable_output/$moduleName";
    if (!Mage::getStoreConfig($outputPath)) {
        Mage::app()->getStore()->setConfig($outputPath, true);
    }
}

How can I do same in magento 2?


texts: Magento 2, new admin page redirects to admin index page

texts:
I need to make  new admin page with a grid, in M2, and along with it, a menu link that will link to it. I have made a menu item successfully, and it looks like it is linked to correct URL, but when I click on it, I am just redirected to admin index page. What am I missing here?
My Namespace/Modulename/etc/acl.xml is:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
     <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="Namespace_Modulename::griglia" title="Modulename Griglia" sortOrder="51">
                    <resource id="Namespace_Modulename::griglia_child_resource" title="Grigla Child Resource" sortOrder="10"/>
                </resource>
            </resource>
        </resources>
    </acl>
</config>

My etc/adminhtml/menu.xml is:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="Namespace_Modulename::index" title="Modulename" module="Namespace_Modulename" sortOrder="51" resource="Namespace_Modulename::index"/>
        <add id="Namespace_Modulename::griglia" title="Griglia" module="Namespace_Modulename" sortOrder="10" action="modulename/griglia" resource="Namespace_Modulename::griglia" parent="Namespace_Modulename::index"/>
    </menu>
</config>

My etc/adminhtml/routes.xml is:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
    <router id="admin"> <!-- This part is different from frontend -->
        <route id="modulename" frontName="modulename">
            <module name="Namespace_Modulename" />
        </route>
    </router>
</config>


texts: Can't edit value of WYSIWYG Editor after first save

texts:
I have added a WYSIWYG Editor to the dropdown field in the individual options of a configurable product.

But there is a bug. If I first create a new option of type dropdown and add a new row and fill in the values and click on "save" then the page is getting reloaded and all values are successfully saved as expected.

But If I now try to edit the value in the WYSIWYG Form (WYS 1) and click on save. Then the same value is still there.

All other attributes are changing as expected on save, even the attribute "action" which I created on my own.

Why is the WYSIWYG Editor not saving?


texts: how to get guest email address in CollectTotalsObserver page in magento 2

texts:
how to get a guest email address in CollectTotalsObserver page in Magento 2.

public function execute(\Magento\Framework\Event\Observer $observer)
{
    /** @var \Magento\Quote\Api\Data\ShippingAssignmentInterface $shippingAssignment */
    $shippingAssignment = $observer->getShippingAssignment();
    /** @var \Magento\Quote\Model\Quote $quote */
    $quote = $observer->getQuote();
    /** @var \Magento\Quote\Model\Quote\Address $address */
    $address = $shippingAssignment->getShipping()->getAddress();

    $customer = $quote->getCustomer();
    $storeId = $customer->getStoreId();

    $writer = new \Zend\Log\Writer\Stream(BP. '/var/log/nitesh.log');
    $logger = new \Zend\Log\Logger();
    $logger->addWriter($writer);

    $logger->info($address->getTelephone());
    $logger->info($address->getFirstname());
    $logger->info($address->getLastname());
    $logger->info($address->getEmail());

print in log file
2019-08-03T13:00:09+00:00 INFO (6): 782700000
2019-08-03T13:00:09+00:00 INFO (6): nitesh
2019-08-03T13:00:09+00:00 INFO (6): singh
2019-08-03T13:00:09+00:00 INFO (6):

I want to get email address here.


texts: Magento 2: Admin Attention Something went wrong

texts:
I'm using Magento 2 CE Version 2.1.0

I already referred Magento SO post with the same error.

When I'm going to Edit Any of the Product then while loading it's giving this error. Below are the details of log files

var\log\debug.log

  [2016-09-30 02:15:53] main.DEBUG: cache_invalidate:
  {"method":"GET","url":"http:/","invalidateInfo":{"tags":["FPC"],"mode":"matchingTag"},"is_exception":false}
  []
      [2016-09-30 02:15:59] main.DEBUG: cache_invalidate: {"method":"GET","url":"http://localhost/magento2/admin/catalog/product/edit/id/2048/set/16/type/simple/store/0/key/83d52c6cd14f1a381e2ceadbc0485a387f7e57f44c790eeff40a79e21f5dbd0a/back/edit/","invalidateInfo":{"tags":["interception","CONFIG"],"mode":"matchingTag"},"is_exception":false}
  []

var\log\system.log

  [2016-09-30 02:16:07] main.INFO: Cache file with merged layout:
  LAYOUT_adminhtml_STORE0_3a828e091252a8ca686703b2c072394bd and handles
  default, catalog_product_edit, catalog_product_simple: Please correct
  the XML data and try again. [] [] [2016-09-30 02:16:07] main.INFO:
  Cache file with merged layout:
  LAYOUT_adminhtml_STORE0_3cf9ab1b1723bedc1dcd665a812b00335 and handles
  admin-1column: Please correct the XML data and try again. [] []
  [2016-09-30 02:16:07] main.CRITICAL: Broken reference: the 'header'
  tries to reorder itself towards 'global.notices', but their parents
  are different: 'page.wrapper' and 'notices.wrapper' respectively. []
  [] [2016-09-30 02:16:07] main.CRITICAL: Broken reference: the
  'page.breadcrumbs' tries to reorder itself towards 'notifications',
  but their parents are different: 'page.wrapper' and 'notices.wrapper'
  respectively. [] [] [2016-09-30 02:16:07] main.CRITICAL: Broken
  reference: the 'notification.messages' tries to reorder itself towards
  'user', but their parents are different: 'header.inner.right' and
  'header' respectively. [] [] [2016-09-30 02:16:07] main.INFO: Cache
  file with merged layout:
  LAYOUT_adminhtml_STORE0_36f1b068ec7ccf4878f9284dd1137afd1 and handles
  catalog_product_prices: Please correct the XML data and try again. []
  [] [2016-09-30 02:16:09] main.INFO: Item
  Magento_Backend::system_currency was removed [] []


texts: Upgrading data.. SQLSTATE[HY093]: Invalid parameter number: parameter was not defined, query was: INSERT INTO

texts:
when I execute an insert sql command  inside 'UpgradeData.php' it gives me this error, can anyone tell me where is the problem here ?

 if(version_compare($context->getVersion(), '1.0.2', '<')) {
            $query = "INSERT INTO authorization_rule(role_id,resource_id,permission) VALUES (:role_id,:ressource_id,:permission)";

            $setup->getConnection()->query(
                $query,
                [

                    ':role_id' => 5,
                    ':resource_id' => 'Magento_Sales::unhold',
                    //':priviliges' => null,
                    ':permission' => 'deny'
                ]
            );
            $setup->getConnection()->query(
                $query,
                [
                    ':role_id' => 3,
                    ':resource_id' => 'Magento_Sales::unhold',
                    //':priviliges' => null,
                    ':permission' => 'deny'

                ]
            );
        }

the error is :

  SQLSTATE[HY093]: Invalid parameter number: parameter was not defined, query was: INSERT INTO authorization_rule(role_id,resource_id,permission) VALUES (:role_id,:ressource_id,:permission)


texts: How Magento calculate configurable product price in the cart?

texts:
I need to do some customization to the configurable products behavior in particular to the way Magento calculate the price on the base of the attribute selection.

How is Magento calculating the final price ?
- I know how it works on the product page (js) but the cart/server side behavior is different.

I need to understand where the calculation is processed (method/class) so I can change this behavior.

Bounty target

I would consider proper answers, only the ones that cover at least one of the following 2 points:

class/method related to the question with explanations
example of customization of price calculation behaviour


texts: Product image border colour dependent on product category

texts:
I have a site where each product image has a 1px solid border. The colour of the border is currently black. However, I would like the colour of the border to be definied by the category; for example all products with the parent category 'blue' should have a blue border, and all products with the parent category 'red' should have a red border and so on.

Is this achievable in Magento? I know the body tag of the page is given a unique CSS reference but I want the product image border colour to be defined by the top level category, not the child of that category.

Any ideas welcome!


texts: Magento 2 don't generate custom CSS file

texts:
I got very strange issue with Magento 2 and custom css files. I'm trying to add custom css to the head

<head>
    <link src="js/bundle.js"/>
    <css src="css/main.css" />
</head>

After I flush cache, do deploy and than I see all css files in

  pub\static\frontend\Sleepz\md\en_US\css

except of main.css

I tried to deploy in developer/default mode, did Di compile, guess everything.
What I do wrong?


texts:
I have created a clone of my original site in a subdomain.  Now this is the error I keep getting.

  Fatal error: Call to a member function extend() on a non-object in
  /home/stevenst/public_html/upgrade/lib/Varien/Simplexml/Config.php on
  line 600

This is from the system log:

  2015-05-13T13:52:57+00:00 ERR (3): Warning: simplexml_load_string()
  [function.simplexml-load-string]: Entity: line 135: parser error : Premature end of data in tag config
  line 28  in
  /home/stevenst/public_html/upgrade/lib/Varien/Simplexml/Config.php on
  line 510 2015-05-13T13:52:57+00:00 ERR (3): Warning:
  simplexml_load_string() [function.simplexml-load-string]:   in /home/stevenst/public_html/upgrade/lib/Varien/Simplexml/Config.php
  on line 510 2015-05-13T13:52:57+00:00 ERR (3): Warning:
  simplexml_load_string() [function.simplexml-load-string]: ^  in
  /home/stevenst/public_html/upgrade/lib/Varien/Simplexml/Config.php on
  line 510


texts: Magento 2 - The directory "xy" cannot be deleted error, after calling setup:di:compile

texts:
I get this after executing php bin/magento setup:di:compile:

  The directory "/home/x/y/generated/code/Magento" cannot be deleted
  Warning!rmdir(/home/x/y/generated/code/Magento): Directory not empty


texts: How to add product with custom option type file to cart programmatically

texts:
I am creating a functionality to add product to cart programmatically with Custom Option type File.

I am using the below code to add product :

$cart = Mage::helper ( 'checkout/cart' )->getCart ();
$product = Mage::getModel ( 'catalog/product' )->load(949);
$params['product'] = 949;
$options['options_32_file_action'] = 'save_new';
$params['options_32_file_action'] = 'save_new';
$params['options'] = $options;
$params['qty'] = 1;
$cart->addProduct ( $product, $params);

Uploaded file :

$_FILES['options_25_file'] = array
            (
                "name" => "1.png",
                "type" => "application/octet-stream",
                "tmp_name" => Mage::getBaseDir()."/1.png",
            );

I am getting this below error :

  The product has required options

I tried most of the solution provided on this site but can't fix this.

Kindly let me know is this the right approach or if there any other way to do this please refer me.


texts: I want to over ride Style-l.less file in Magento blank theme?

texts: I have created Custom theme which is inheriting Magento Blank theme... Now I want over ride CSS in style-l.less file of Blank theme How can I do that???


texts: What is the difference between htmlEscape and escapeHtml functions in Magento?

texts:
I've just been updating a Magento site, and I see one change in the base template files is that htmlEscape has become escapeHtml throughout.   Is there any difference between these two functions?

Is it, as I suspect, that Magento are gradually getting rid of htmlEscape and we should no longer use it?


texts: Magento 2: Round up foreign currency. How to do it?

texts:
In Magento 2, how do we show prices in other currencies than the base currency rounded up?

For example, when foreign currencies are calculated using today's exchange rate, the price may be shown as $14.40. I want that to show as $15. How do I do that?

Thanks! :_)


texts: Setting stock in PHP doesn't do anything

texts:
I am trying to set products stock values from an external script with this code:

$product->setStockData(array(
        'manage_stock' => 1, //'Use config settings' checkbox
        'use_config_manage_stock' => 1, //'Use config settings' checkbox
        'min_sale_qty'=>1, //Minimum Qty Allowed in Shopping Cart
        'max_sale_qty'=>2, //Maximum Qty Allowed in Shopping Cart
        'is_in_stock' => 1, //Stock Availability
        'qty' => 999 //qty
    )
);

After saving the product, whatever value I set, on the admin page I always see those values:

Other product data is saved correctly.

Magento version is 1.9.3.8.

What am I doing wrong?


texts: Translating attribute on different store views

texts:
In the backend I have given my attribute label different names, but on the frontend both store views use the admin label.
The code that gets the label;

echo $_attribute->getLabel()

How do I make this store view specific?


texts:
I configured a store with multiple websites on Magento 2.
Each website is a different country or region and each website must manage it's own product quantity

I set quantity_and_stock_status attribute scope to website in Stores/Attributes/Product, but when I edit quantity in product detail under specific store view the value is saved for all views.

An example
Two website: Italy and UK,
Two stores: Milan under Italy with Milan StoreView, Manchester under UK with Manchester StoreView.

I select a product and select Manchester StoreView, edit quantity to a value (i.e 10) and save, the same quantity is reported in Milan StoreView.
Near Quantity and Stock value is reported [STORE VIEW] scope and Use Default Value is unchecked.


texts: Product sizes showing up in wrong order magento 2

texts:
my products are showing up in wrong order. I did a migration 1.7 to 2.2.

Hope anyone can tell what i can do.


texts:
I want to remove the Gift Wrapping from order total section on the create new order screen.

For the same I need to override this layout file:

vendor/magento/module-gift-wrapping/view/adminhtml/layout/sales_order_create_load_block_totals.xml

I tried overriding the file in this way:

app/design/adminhtml/Magento/backend/Magento_Giftwrapping/layout/sales_order_create_load_block_totals.xml

However it did not help me.

I can disable the module as well by running below command:

php bin/magento module:disable Magento_Giftwrapping

However the module is dependent on other module.

Unable to change status of modules because of the following constraints:
Cannot disable Magento_GiftWrapping because modules depend on it:
Magento_Enterprise: Magento_Enterprise->Magento_GiftWrapping

What is the best possible way I can remove Gift Wrapping from order total section?


texts: How to Activate Magento Social in Magento 2.2

texts:
How to Integrate Magento Social in Magento 2.2

I refer to link above.

I followed a guide and failed to Activate Magento Social integration. Tried integrate manually but it failed to Activate too. Copied the Consumer Key code line and pasted it into a form and click Send. Got a message: ¨The customer key you've entered cannot be found, please check code.¨


texts: How to Get all allow attributes of a product in magento2 and show allow attributes in single product page?

texts:
I want to get all allow attributes of a product in single page.

In magento 1.7 i was using below code :

<?php $_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes()); ?>

But how can i achieve same thing in magento 2 ?

Also I have to display all these attributes in single product page. So how to render configurable.phtml file inside single product page file?


texts: How to show image on category page for a specific theme?

texts:
I am creating a new theme for mobile by copying the "iphone" theme of the "default". There in the category Page I want to show the image for the category with description and the list of subcategories.
The Problem is that the uploaded image for the categories is reflected to all the themes. But I want to show it in the "iphone" theme only.
1.How can I do that ?

2.How can I show the subcategories list with their thumbnail image ?

Thanks.


texts:
I did migration for site and when I am going to upload logo in backend,

  error: "Backend model is not specified for ", errorcode: 0

Is coming, folder have sufficient permission and user:group, Anyone have suggestion to come out from this issue.


texts: Magento 2.2.2 - Display Customer Account header dropdown and remove Sign Out link post login

texts:
After successful login, Luma theme shows customer account details in dropdown on header as seen in below image

I need to replicate the same in our custom theme which has Blank as its parent.

Vendor/Theme/Magento_Theme/layout/default.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">

       <referenceContainer name="header.panel">
       <block class="Magento\Framework\View\Element\Html\Links" name="header.links">
                <arguments>
                    <argument name="css_class" xsi:type="string">header links</argument>
                </arguments>
        </block>
       </referenceContainer>

</page>

Vendor/Theme/Magento_Customer/layout/default.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">

        <referenceBlock name="header.links">
            <block class="Magento\Customer\Block\Account\Customer" name="customer" template="Magento_Customer::account/customer.phtml" before="-"/>
            <block class="Magento\Customer\Block\Account\AuthorizationLink" name="authorization-link-login" template="Magento_Customer::account/link/authorization.phtml">
            </block>
        </referenceBlock>

        <move element="top.links" destination="customer"/>

</page>

Vendor/Theme/Magento_Customer/templates/account/customer.phtml

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

// @codingStandardsIgnoreFile
/** @var Magento\Customer\Block\Account\Customer $block */
?>
<?php if($block->customerLoggedIn()): ?>

            <button type="button"
                    class="action switch"
                    tabindex="-1"
                    data-action="customer-menu-toggle">
                <?= $block->escapeHtml(__('Change')) ?>
            </button>

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

            <?= $block->getChildHtml() ?>

        <?php endif; ?>

<?php endif; ?>

Here, when user is not logged in, I can see Sign In link but after user logs in I can see sign-out in user account dropdown on header as well as besides it. How do I resolve this?


texts: Magento 1.8 Shopping Cart Price Rule Actions Reloading Back to Admin Mainscreen

texts:
Magento 1.8.1.0 site, I can setup a coupon code in Shopping Cart Price Rule, however if I click on Actions and try to add a rule under,
Apply the rule only to cart items matching the following conditions (leave blank for all items)

No matter what I choose, it says please wait, loading and then it redirects back to the admin dashboard

There is nothing in the apache error log, nothing in /var/logs or /var/reports

Looking at the headers, the post seems to be returning a 403 forbidden causing the redirect back to the admin dashboard.

POST /shop/index.php/admin/promo_quote/newActionHtml/form/rule_actions_fieldset/key/1cae7594b03c160b9bca92d514c7942b/?isAjax=true HTTP/1.1

Response 403 Forbidden

Looking for a way to debug this.


texts:
I need to upgrade Magento to the latest 2.1.4 version. But when I go to the "Web setup Wizard" and select "System Upgrade" I am getting following message:
You're already using the latest version, there's nothing for us to do.
See attached image for version info.
Can you tell me how I can upgrade magento version without using command line.
I upgraded magento to 2.1.3 from back-end.. maybe here are some old files (flag?) from previous update which tells that magento is up to date?
Please advise,
Sandra


texts: How to get solution on magento2x Authorize.net CIM Checkout not process?

texts:
magento2x @Credit Cards (Authorize.net CIM)  Checkout not process
M2.2.8:
https://apitest.authorize.net/xml/v1/request.api

Error: 400: The payment disallows storing objects.

M2.3.4:
After submitted my order nothing happen Disabled Place order button/
https://apitest.authorize.net/xml/v1/request.api Response is
{"opaqueData":{"dataDescriptor":"COMMON.ACCEPT.INAPP.PAYMENT","dataValue":"eyJjb2RlIjoiNTBfMl8wNjAwMDUzQThDRDlEMjZDRDYxOTE5NERDQ0Q4MUI5MkQ5RUVBRTBFNTkzQTY1OTZGMkRBMDUwRTkxOEI3RDQ5NDcxNjZEQTM4MTUyMjk0NTkxMDlCNzg0MUNDMDlEQUZBNzAyNUM5IiwidG9rZW4iOiI5NTgyNDUzMTA0MTAzMTUxNTA0NjAxIiwidiI6IjEuMSJ9"},"messages":{"resultCode":"Ok","message":[{"code":"I00001","text":"Successful."}]}}

Anything wrong? No error/debuglog/exception  I use [TNW_AuthorizeCim][1]

I try this  but no luck
Module: https://github.com/PowerSync/TNW_AuthorizeCim
Note:This site migrated from m1


texts: Multi Domain: Is it possible to get all the products in main website(search and product listing)?

texts:
how to list all the products from all my store websites into the main website in

category pages
Ajax auto-suggest search


texts: How can I delete all the orders and products, with their relative data, in order to have a clean Magento's environment?


texts: Extension disappeared from backend without error

texts:
I developed a extension where you can also set settings in the backend. It randomly disappeared somehow and I don't know why.

There are no errors, the extension in enabled and the output is alos enabled.
The extension still works and makes changes to the frontend, but it does not show in the backend.

What is going on?


texts: Assign Configurable Product Image to Its Associated Product

texts:
As you know, in current magento version, image of associated products could not be derived from the configurable product, thus we had to manually upload the product image again. Imagine that we are going to create hundreds or thousands simple products. This is very time consuming.

My question, is there any extension or good solution for this issue? Like say, while creating associate product, there an option for us to tick if we want to use configurable product image for the new associate product. Then if choosing yes follow by clicking on save button, system would store the same image path (record) into database for the new associated product.

Thank you for your kind attention.

Kind Regards.


texts: While creating custom grid in magento 2 error showing 404 Error Page not found.Actually i following mageplaza tutorial here

texts:
Here I am using mageplaza link ie  https://www.mageplaza.com/magento-2-module-development/create-admin-grid-magento-2.html

Actually i copied whole content as it is including model as well.but its showing error only 404 Error Page not found.


texts: How to reinstall magento 2, including the plugins and the theme?

texts:
I have 43 extensions installed and a paid theme. The extensions' seller installed the extensions and configured them.

I want to update Magento to 2.3.2 from 2.3.1, I have a complete server backup in case things went wrong, an AWS snapshot.

I have to move to another server too, so I have to do a fresh installation of Magento 2.3.2, once that's done, is there any way to import everything without reinstalling one by one?

Is there any way to import the database and plugins and themes from there to the other server?


texts: Magento 2 update final price when radio option change with bundle product

texts:
Bundle product display proper price , I wants to display and update price as final price when radio option change. Is It possible ?, if yes than how?

If select test simple option
Expected Result : "As low as" display $99.00
Actual Result : Display $24.50 not updating


texts: I wanted to place logo infront of navigation bar in magento 2, that to inside the div


texts:
Is it possible to show the custom field for guest users instead for all users.
I gave created a custom field using layoutprocessor


texts: Error with own module to show frontend views

texts:
My aim is to generate a few frontend views with an phtml for each view. I developed a module for that.

File: Routes.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
    <router id="standard">
        <route id="micuenta" frontName="micuenta">
            <module name="MyVendor_Intranet"/>
        </route>
    </router>
</config>

File: Controller/Index/index.php

/**
 * Constructor
 *
 * @param \Magento\Framework\App\Action\Context  $context
 * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
 */
public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Framework\View\Result\PageFactory $resultPageFactory
) {
    $this->resultPageFactory = $resultPageFactory;
    parent::__construct($context);
}

/**
* Mi Cuenta.
*
* @return \Magento\Framework\View\Result\PageFactory
*/
public function execute()
{
    $resultPage = $this->resultPageFactory->create();
    $resultPage->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0', true);
    return $resultPage;
}}

But I get an apache error:

  [Mon Mar 16 17:54:22.638389 2020] [:error] [pid 4074] [client
  46.27.23.194:62372] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to MyVendor\Intranet\Controller\Index\Index::__construct()
  must be an instance of Magento\Framework\App\Action\Context,
  instance of Magento\Framework\ObjectManager\ObjectManager given,
  called in
  /var/vhosts/algsa.es/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
  on line 93 and defined in
  /var/vhosts/algsa.es/app/code/Auren/Intranet/Controller/Index/index.php:15\nStack
  trace:\n#0
  /var/vhosts/algsa.es/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93):
  Auren\Intranet\Controller\Index\Index->__construct(Object(Magento\Framework\ObjectManager\ObjectManager))\n#1
  /var/vhosts/algsa.es/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88):
  Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Auren\\Intranet\\...',
  Array)\n#2
  /var/vhosts/algsa.es/vendor/magento/framework/ObjectManager/ObjectManager.php(57):
  Magento\Framework\ObjectManager\Factory\Compiled->create('Auren\\Intranet\\...',
  Array)\n#3 /var/vhosts/algsa.es/ve in
  /var/vhosts/algsa.es/app/code/Auren/Intranet/Controller/Index/index.php
  on line 15

My page gets a blank view and apache log registers the error.

PD: Very similar approach from How call Magento 2 module by url (or add route in module)?


texts:
I created a new module to create a section in admin panel. This module section has a sub-section "Associated products" where I can add one or more products to each item in that module.

I am able to get the field values using functions like

$combo->getName()
$combo->getComments()

But I am not able to get the associated products to that item using

$combo->getAssociatedProducts()

What I tried is as follows:

<?php $comboCollection = Mage::getResourceSingleton('combo/combo_collection'); ?>
<?php
    foreach ($comboCollection as $combo) {
        zend_debug::dump($combo->getAssociatedProducts($combo));  //giving error
    }
?>

PS: here $combo is not a product, it is just an item in the created module.

Explanation:


texts:
Is there a method to add group prices (for one or more customer groups) to product collections?

Actually I have this ...

/** @var Mage_Catalog_Model_Resource_Product_Collection $products */
$products = Mage::getResourceModel('catalog/product_collection')
    ->addAttributeTo ...

if ($groupId) {
    $products->joinTable(
        array('group_price_'.$groupId => 'catalog/product_attribute_group_price'),
        'entity_id = entity_id',
        array('group_price_'.$groupId => 'group_price_'.$groupId.'.value'),
        array('customer_group_id' => $groupId)
    );
}

It works and I can get group price with $product->getData('group_price_X'), but is there something built-in?


texts: Address update get street problem magento 2

texts:
I am using "customer_address_save_after" event.

This is my observer code.

public function execute(\Magento\Framework\Event\Observer $observer)
{
    $address = $observer->getEvent()->getCustomerAddress();
    echo $address->getCity();
    echo $address->getStreet(0);
    die;
}

I am getting city value, but street is throwing me error.

How to get street line 1 and line 2, The above code throwing me fatal error when i am trying to update shipping address from customer account page.

I am getting error after using below code also

 echo $address->getStreet();

Below is my form post data

    Array
 (
[entity_id] => 381939
[increment_id] =>
[parent_id] => 46195
[created_at] => 2018-08-07 08:44:12
[updated_at] => 2018-09-03 10:35:33
[is_active] => 1
[city] => Hampton
[company] => Test
[country_id] => GB
[fax] =>
[firstname] => Test
[lastname] => test
[middlename] =>
[postcode] => UG 1JY
[prefix] =>
[region] => Surrey
[region_id] => 0
[street] => London
 street
[suffix] =>
[telephone] => 9898989898
[vat_id] =>
[vat_is_valid] =>
[vat_request_date] =>
[vat_request_id] =>
[vat_request_success] =>
[region_code] => Surrey
[id] => 381939
[customer_id] => 46195
[default_shipping] =>
[default_billing] =>
[is_default_billing] =>
[is_default_shipping] =>
)

I am getting below error,

uncaught error: Array to string conversion street in file


texts: I want to know the path of file. Anyone please help

texts: I want to know, where the Submit invoice button is declared.


texts: I would like to know how to get all the values configured by the user in the custom tab in the admin backend, which we specify in the system.xml. Is there any way I can get all these values as a single object?


texts:
When I push my website in maintenance (with maintenance.flag), that send a 503.

When the website has a report, that send a 503 (/src/errors/processor.php, function processReport()).

I want to make a distinction between both.

In processReport(), can I change

  $this->_sendHeaders(503);

by

  $this->_sendHeaders(500);

or there is any contraindication ?

Maybe someone have a better idea ?


texts:
My magento version is  1.9 and I want to change some styles+html at  one page. So when I try to use TinyMCE for this it not allow me to put like below.

hyperlink or an anchor -div tag-image tag-close div tag- close hyperlink or an anchor

But it allow me to put anchor tags only  for img tags. I found the article how we can change the setting to allow this but  the setup  js file at the magento 1.9 dont have  those settings. So any one have solution for this?

below is the article I found. unfortunately I cant find those settings in my js file.

http://www.pixafy.com/blog/2013/06/overcoming-magentos-wysiwyg-part-2-customizing-tinymce-settings/


texts: Made a custom form module how do i submit data usging magento functions only?

texts:
I made a custom form module which has its own DB table that was supposed to get data from the form submission

this is my Form

<form method="post" action="<?php echo Mage::getUrl('merchant/index/save')?>" id="merchant-reg" >
    <fieldset>

            Name
            <input type="text" name="name" class="required-entry" />

            Email
            <input type="email" name="email" class="required-entry validate-email"/>

            Store Name
            <input type="text" name="store_name" class="required-entry"/>

        <input type="submit" value ="Procced to Checkout"/>
    </fieldset>
</form>

and this my controller

 public function saveAction()
 {
     $this->getRequest()->getPost();

     echo "
";
     print_r($this);
     echo "
";

     $fromdata = Mage::getSingleton('frontend/session')->getData('merchant-reg');

     print_r($fromdata);

     $data = Mage::getSingleton("frontend/session")->getFormData(true);

     echo "
";
     print_r($data);
 }

I have tried all three ways to get form data but no luck what am I doing wrong?

this is my model code

class Eshop_Merchant_Model_Merchnat extends Mage_Core_Model_Abstract
{
    protected function _construct(){

       $this->_init("merchant/merchant");

    }

}


texts: Deleted products showing when setting related products

texts: A while ago I deleted all complex and simple products from my store and to set up custom products for selections. This works ok, but a small number of simple products (not visible individualy) that have been deleted from the products page still show up when I set up related products. Their properties seem to be stored in catalog_product_entity_varchar. Is it safe to delete this, or is there another way to get rid of these phantom products?


texts: How to convert Magento 2.3 extensions to composer packages?

texts:
I have a Magento 2.3.5 installation with a number of extensions that were installed the "old-fashioned" way, i.e. through the Magento Marketplace and the Web Setup Wizard's Extension Manager.
I am planning on upgrading to Magento 2.3.6 which removes the Web Setup Wizard. Is there a concrete way to "convert" these extensions to composer packages without a loss of settings and data?


texts:
(cross-post from stackoverflow, sorry)

I'm exploring implementation options in Magento and am wondering if anyone has attempted or found a solution to this scenario...

I would like to be able to setup an order via the Magento backend (add products, set shipping price, etc) then have the customer be able to complete the order by logging into their account and proceeding through the checkout process.

Would be really great if the customer could get an email notification with a link directly to the payment step/checkout.

Is there a public extension that does this or something similar? Is the only option to push the products to a customer's cart then manually notify? Any other approaches on this?


texts: Detecting onChange in Magento Admin with out need to call jQuery

texts:
Below i code that i am using

var $j = jQuery.noConflict();

$j(document).ready(function(){
    $j( "#stone_theme" ).change(function() {
            new Ajax.Request("http://localhost/infoz/test.php", {
                method: 'Post',
                parameters: {"parameter_name":"value"},
                onComplete: function(transport) {
                    alert(transport.responseText);
                }
            });
    });
});

but i had to include jquery for it is there any way to do this with out calling jquery ??..


texts:
I'm working on a store with one store which has store id = 1. I want to write a db query that will update this id to something else (say 9 for example). Which table should I look for to edit this and will I need to update any other tables that may already have used the store id for cross referencing purposes such as with products and categories related tables?

Any hints on the tables I should look at and with the query would be greatly appreciated.


texts: Base URLs at Global Scope in Multi-Store Setup

texts:
I have a multi-store installation, and each store has its own domain set in System > Configuration > General > Web > [Un]Secure > Base URL:

[Global Scope]
  |-- http://separatenode.com/
  |
  |-- [Website Scope A]
  |     |-- http://domaina.com/
  |
  |-- [Website Scope B]
        |-- http://domainb.com/

What is the correct URL configuration on the global scope when:

You are running several different stores on one installation
Your backend is on a completely separate node

My understanding is that the default scope base URLs should point to the same domain as your backend, but in my case this value has been set to the "primary" store in the past.

Note that we also specify a custom admin URL in System > Configuration > Advanced > Admin > Admin Base URL > Custom admin URL which is the same as the base secure URL on the global scope.

And running on Apache, our VirtualHost directives are setting the store codes (so that's not an issue here).

I've seen weird issues in the past with URLs being generated on a store at the global scope level (ie: domainb.com generates a URL to separatenode.com). So I'm trying to reconcile these things in my mind, and I believe it has to do with the global scope base URL configuration.


texts: Indexer catalogrule_rule is set to invalid and causes the cache to be flushed a lot

texts:
I'm having a slowness issue on my client cloud instance.

Indexer catalogrule_rule is set to invalid and flush the caches a lot so the site is always slow even when we have the Miravit cache warmer extension installed.

Has anyone had any insight on what might cause it?

Any help is appreciated.

Thanks in advance!


texts: Cart page fatal error after creating a product collection plugin, Magento 2.3

texts:
We have a need to sometimes fetch product prices from an API for products loaded on the frontend. We figured it would be easiest to create a plugin for the collection:

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    ...
    <type name="Magento\Catalog\Model\ResourceModel\Product\Collection">
        <plugin name="afterProductCollectionPlugin" type="Vendor\Module\Plugin\Catalog\Model\ResourceModel\Product\CollectionPlugin" />
    </type>
</config>

<?php
namespace Vendor\Module\Plugin\Catalog\Model\ResourceModel\Product;

use Magento\Catalog\Model\ResourceModel\Product\Collection;

class CollectionPlugin
{

    /**
     * @param Collection $subject
     * @param bool $printQuery
     * @param bool $logQuery
     * @return array
     */
    public function afterLoad(Collection $subject, $printQuery = false, $logQuery = false)
    {
        return [$printQuery, $logQuery];
    }
}

However after flushing the caches the /checkout/cart page throws a fatal error:

Fatal error:  Uncaught Error: Call to undefined method Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection\Interceptor::isComposite() in C:\xampp\htdocs\vendor\magento\module-catalog\view\frontend\templates\product\list\items.phtml:180
Stack trace:
#0 C:\xampp\htdocs\vendor\magento\framework\View\TemplateEngine\Php.php(59): include()
#1 C:\xampp\htdocs\vendor\magento\framework\View\Element\Template.php(271): Magento\Framework\View\TemplateEngine\Php-&gt;render(Object(Magento\Checkout\Block\Cart\Crosssell), 'C:/xampp/htdocs...', Array)
#2 C:\xampp\htdocs\vendor\magento\framework\View\Element\Template.php(301): Magento\Framework\View\Element\Template-&gt;fetchView('C:/xampp/htdocs...')
#3 C:\xampp\htdocs\vendor\magento\framework\View\Element\AbstractBlock.php(1097): Magento\Framework\View\Element\Template-&gt;_toHtml()
#4 C:\xampp\htdocs\vendor\magento\framework\View\Element\AbstractBlock.php(1101): Magento\Framework\View\Element\AbstractBlock-&gt;Magento\Framework\View\Element\{closure}()
#5 C:\xampp\htdocs\vendor\magen in C:\xampp\htdocs\vendor\magento\module-catalog\view\frontend\templates\product\list\items.phtml on line 180

How to fix this?


texts: Magento 1.9.3 add custom validations for Product form in admin panel

texts:
I have added 2 custom attribute on product form.
1.Package type 2.Quantity

MY package type can be single /multiple.
When it is multiple , I want to show Quantity inputbox & also , want to apply required validations to it..
For Single ,it should be hidden.

How can I ado this ?
& where can  I add validations ?

I am new to magento ,so can anyone help me with this?


texts:
Good morning,

I have a problem with Multistores in Magento, I've created a multi-shop, watches, up there all right, but would like to apply the same template that the main store to modify it to my tasteso I have duplicate files in the folder app/design/frontend/mytheme/default and skin/frontend/mytheme/default thus leaving:

app/design/frontend/mytheme/watches/
app/design/frontend/mytheme/default

skin/frontend/mytheme/watches
skin/frontend/mytheme/default

Then select the corresponding store, in this case watches and Design > Themes add the folder name watches in template, appearance, design and default.

The problem is that that modify the css from the /mytheme/watches folder still appear the styles of the main store, so I can not customize the watch shop without modifying the original.

Does anyone know how I can fix it? Thanks for everything, a greeting.


texts: Googe business review api header authorization expired frequently

texts:
I am getting reviews from google business, i am using header Authorization Bearer, its frequently expired, again and again i am updating my Bearer token,  how to handle this situation.
May i know the best practice for handling this situation?


texts: Magento 2 How to Create a Custom Console Command

texts: Is it possible to create a new Magento command for example to delete the generation folder?