texts: Magento 1.9 Google Analytics template not loading

texts:
Why isn't my ga.phtml file loading on the live site (but does load on my dev site)?

After upgrading from 1.6 to 1.9, my Magento site has stopped tracking in Google Analytics.

After doing some troubleshooting, I've gotten stuck.

I can prove that the ga.phtml template is not loading, but I cannot sort out why. To be complete, I will provide as much background as seems relevant:

The Analytics is configured properly in System => Configuration => Sales => Google API
The googleanalytics.xml file (located at app/design/frontend/[my_package]/[my_theme]/layout/googleanalytics.xml) is correct (from another answer here: https://magento.stackexchange.com/a/80566/3286)

<!--
Default layout, loads most of the pages
-->

<default>
    <!-- Mage_GoogleAnalytics -->
    <reference name="head" before="-">
        <block type="googleanalytics/ga" name="google_analytics" as="google_analytics" template="googleanalytics/ga.phtml" />
    </reference>
</default>

The ga.phtml template is in the correct location, and I have added an HTML comment that should get rendered any time the template gets loaded.  (The template is here: app/design/frontend/[my_package]/[my_theme]/template/ga.phtml)
I have confirmed that all of the theme templates include the relevant <?php echo $this->getChildHtml('after_body_start') ?> and <?php echo $this->getChildHtml('before_body_end') ?> calls.
The "Cookie Restriction Mode" is set to "No" (in System => Configuration => General => Web => Session Cookie Management)
Lastly - and this is the real twist - this is all working (and the ga.phtml is loading properly) on my local dev machine, but it does NOT load on the live site.

What am I missing? Is there a configuration or other setting that I need to check for?


texts: Trying to create an observer that notifies when an item goes out of stock returning null

texts:
***SOLVED ON MY OWN****
Hi guys,

I just solved it using a debugger. It seems that getStockItem() was trying to get an object that doesn't exist that's why it was returning "null". The correct call was getItem(). This got me all the information I needed to know. Thank you for your help guys.

I have created a module in magento that will send an email when an item goes out of stock. I used this as a template : Daily admin email for products that went out of stock that day

My issue, that  if($stockItem->getQty() === $stockItem->getNotifyStockQty())  is always to null... I am thinking that the event I am listening for in my config.xml file is the wrong event. The event in question: cataloginventory_stock_item_save_after.

I get an email, but there is no data, it just sends me the strings written in the observer file :: just Ran out of stock: Current Qty: Low Stock Date:

What would be the right event to listen for?

class MyCompany_MyModule_Model_Observer
{
    public function lowStockReport($observer)
    {
        $stockItem = $observer->getEvent();
        if($stockItem->getQty() === $stockItem->getNotifyStockQty()){
            //stock is lower than the notify amount, send email
            $product = Mage::getModel('catalog/product')->load($stockItem->getProductId());
            $body = "{$product->getName()} :: {$product->getSku()} just Ran out of stock:\n\n";
            $body .= "Current Qty: {$stockItem->getQty()}\n";
            $body .= "Low Stock Date: {$stockItem->getLowStockDate()}\n";
            $mail = new Zend_Mail();
            $mail->setType(Zend_Mime::MULTIPART_RELATED);
            $mail->setBodyHtml($body);
            $mail->setFrom('lowstock@yourwebsite.com', 'Low Stock Notifier');
            $mail->addTo('youremail@gmail.com', 'Your Name Here');
            $mail->setSubject('[Notice] An Item Has Gone Out of Stock');
            $mail->send();
        }
    }
}

Thank you in advanced.


texts: Usage of superfluous (and potentially dangerous) standard code in installer scripts

texts:
I always thought it's some kind of epidemic plague that users behave in a high risk manner introducing $installer->startSetup() and $installer->stopSetup() calls in installer scripts.

Many of the example code given (here and on other sites, you also find it in many of the extensions you can download) contains installer scripts starting with:

<?php

$installer = $this;

$installer->startSetup();

# some or many lines of code that do not
# need $installer->startSetup(); at all for sure
#
# ...
#

$installer->endSetup();

I always was under the impression that this is bad practice and specifically should not be used in example code because it introduces the risk to needlessly loose $installer->endSetup(); resulting in an inconsistent database configuration after setup which can endanger the whole installation.

So my question is, it is so? Is this a crystal clear case to give the  advice to not make use of these methods unless you're 100% sure you need them?

I have the feeling that those are always put in because the author does not know what they are for but she thinks it needs to be there, it's cool to use them, it can't hurt and because it works anyway, continues with this risky practice.

I also thought to perhaps ask on meta because when I suggested edits earlier today, from what I see in feedback in review many users seem to be unsure on this point. I would love to see some clarification and reference about it.


texts:
Every time I try to either create or edit a backend user (i.e. admin > system > permissions > users), I get a bunch of errors.

1. Error_Processor.php not found

  Unknown error type: [2] include(.../includes/src/Error_Processor.php):
  failed to open stream: No such file or directory Unknown error type:
  [2] include(): Failed opening '.../includes/src/Error_Processor.php'
  for inclusion
  (include_path='.../includes/src:.:/usr/lib/php:/usr/local/lib/php')
  Fatal error: Class 'Error_Processor' not found in
  .../errors/report.php on line 2

2. Fatal error: Class 'Error_Processor' not found in .../errors/report.php on line 29

I checked to make sure that my errors folder had both report.php and processor.php, and checked each file to make sure there weren't any issues. My processor.php, which is required once by report.php as it should, does contain the Error_Processor class.

I tried clearing and recompiling as well as reuploading those scripts from a fresh download of Magento, and nothing's helping. As of now, I can't create or edit any of my backend user accounts, which is really inconvenient.

Any help would be greatly appreciated.


texts: How to change customer group based on specific product that has been bought

texts:
This question has been asked before but I'm trying to do this with Magento 2.1.

Would the correct approach be to create an observer for the "sales_model_service_quote_submit_success" event? and then look up the ordered Item's SKU's/IDs and if one matches my special product then lookup and update the customer group?

And would this approach also work with orders created in the backend by an admin?

Here's a snippet from my observer code (be gentle, this is the first PHP I've ever written let alone the first Magento 2.1 module)

/**
     * @param Observer $observer
     *
     * @return void
     */
    public function execute( Observer $observer ) {

        $ThisDoesntEXIST->orthis();

        die("test");

        if ( $this->isCustomerLoggedIn() ) {

            $order = $observer->getEvent()->getOrder();

            $ledenProduct = $this->scopeConfiguration->getValue('marviq_checkout_config/product/product', ScopeInterface::SCOPE_STORE);
            $groupId = $this->scopeConfiguration->getValue('marviq_checkout_config/product/customer_group', ScopeInterface::SCOPE_STORE);

            $customerId    = $order->getCustomerId();
            $customer      = $this->customerRepository->getById( $customerId );

            $items = $order->getAllItems();
            foreach ($items as $item) {
                $itemId = $item->getItemId();
                if ($itemId == "Special") {
                    $customer->setGroupId($groupId);
                    $customer->save();
                    break;
                }
            }
        }

    }

    /**
     * Check if customer is logged in
     *
     * @return bool
     * @codeCoverageIgnore
     */
    private function isCustomerLoggedIn() {
        return (bool) $this->httpContext->getValue( CustomerContext::CONTEXT_AUTH );
    }


texts: Can we use Paypal Express Checkout with “Ship to multiple address” option

texts:
We are using Paypal express Checkout using onepage checkout option in Magento. Its working fine and now, I am trying to use the same inside "Ship to multiple address" option.

Based upon my research, I am not sure whether it is possible or not.

So, My question is - Can we use Paypal Express checkout in case of Multishipping option?

I tried to enable (by setting the below data member to True)

protected $_canUseForMultishipping      = false;

in Payment method model class which result in display of the payment method in the payment section but never redirected to Paypal window instead displayed error on clicking place order:

PayPal gateway has rejected request. Invalid token (#10410: Invalid token).

Any quick help would be highly appreciated, Thanks.


texts: How to use the critical.css in Magento 2.4?

texts:
I noticed that I have a critical.css file configuration in my new Magento 2.4 installation as you can see in this image below.

How can I create it in my theme and what's the purpose of this?


texts: Design configuration multistore magento 2.1

texts:
We set up a multistore site and it works. Now I wanted to change the logo and with 2.1. it moved to content -> design -> configuration,

but I can't switch website view and only one of the shops (own website and own store view) show up.

Like in the below picture. How can I change the settings (pagination, header, logo etc.) for the other stores?


texts: How do I create a "floating" widget/block?

texts: I'm trying to create a floating widget/block that can sit over on the left of my website like the attached picture. I want to advertise my catalogue for download.


texts: Unable to access to Magento Connect Manager

texts: When I tried to logged into the Magento Connect Manager with my Magento admin ID and password, I am unable to log in and come out with the message  "Access Denied". As I am the only administrator of the store, how should I grant the access right to myself? Thanks


texts: What are the side effects of disable a core module? (e.g. Mage_Rss / Mage_Log)

texts:
For example, I recommend disabling Mage_Rss to speed up checkout processes since Mage_Rss isn't widely used and forces cache cleaning multiple times per checkout request.

I'm evaluating disabling Mage_Log for similar reasons -- I already have Google Analytics in place as well as aggregating apache logs via PapertrailApp.com, but I realize I haven't formalized my process for checking on the ramifications, so feel free to answer specifically for Mage_Log or generically for disabling a core module.

I know I can determine the tables a module uses by looking at its installer script in /sql, and the events it registers by looking at \etc\config.xml, but what else is pertinent?
Is this module reasonably encapsulated in only affecting the tables with prefix log_?  There are several events defined by this core module, will their observers fail gracefully/silently or cause downstream issues?  How do I tell what reports, if any, are impacted?


texts: Magento 1.9.2.3 to 2.0.2 migration issue

texts:
I am trying to migrate magento 1.9.2.3 to 2.0.2. I successfully installed both magento 1.9.2.3 and 2.0.2.

I've installed composer using install composer:
php -r "readfile('https://getcomposer.org/installer');" | php
.

Then i am tried to install Data Migration Tool via git using php composer.phar config repositories.data-migration-tool git https://github.com/magento/data-migration-tool
.

It shows this error:

./composer.json has been updated
Loading composer repositories with package information
Installation failed, reverting ./composer.json to its original content
[RuntimeException]
Failed to clone https://github.com/magento/data-migration-tool, git was not found, check that is installed and in your PATH env.
'git' is not recognized as an internal or external command, operable program or batch file.
require [--dev][--prefer-source][--prefer-dist][--no-progress][--no-update][--update-no-dev][--update-with-dependencies][--ignore-platform-reqs][--sort-packages][-o|--optimize-autoloader][-a|--classmap-authoritative][--][<packages>]..

What was wrong and how to solve this.


texts: PayPal/Express/Review page Shipping auto selected

texts:
In Magento web site on the Review page of PayPal Express, the user needs to choose a shipping method.

We want from the list free shipping method should be selected. so place order should not be grayed out. so it should automatically selected freeshipping_freeshipping.


texts: How to set order increment id iterator in magento 1?

texts:
Is there possible for magento 1 to increase order id each time plus 4.

Ex.

My current order is 10001 and when we placed next time order from store next id would be 10005, after another next time it would be 10009.

Each time order increment id will be +4 from current order id.


texts: Backup got stuck (?) and now I can't reach the back end

texts:
I'm  very new to Magento so sincere apologies if this question has already been asked.

Around 1100 on Friday, May 27 I started a database and media backup. After I started it, there was a 'please wait' spinning wheel for a while, which later disappeared. After that, the website went down for maintenance, which I expected. However, I am now unable to access the backend either. It is now 1800 on 29 May. Both sides now show the following:

'Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.'

Help. I assume that the backup has been too large and has overwhelmed the server? I arrived to the website with it having not been backed up in years (I know this is a major problem, which is why I set the backup going asap).

How can I stop the backup, which I assume is still running, get back into the backend and get the site up again?

Thank you so much for your help.


texts: Magento 2: Update the CSS class name of #maincontent

texts: Is there a way for me to remove the class name 'page-main' from the 'maincontent' div and add a new class name?


texts: Magento 2 - duplicate pricing block to show in 2 places on the product page

texts:
I'm new to Magento 2 and would like to see if anybody could help me.

I need to show the product price in two different places on the product page. If a configurable product the price should render when an option is chosen to show the updated price based on the user's choice.

I have tried to duplicate the pricing block in catalog_product_view.xml

<block class="Magento\Catalog\Pricing\Render" name="custom.product.price.final" after="product.info.sku">
    <arguments>
          <argument name="price_render" xsi:type="string">product.price.render.default</argument>
          <argument name="price_type_code" xsi:type="string">final_price</argument>
          <argument name="zone" xsi:type="string">item_view</argument>
    </arguments>
</block>

This did not work does anybody know a way to do this?

Thanks


texts:
I've been trying to find the best way on how to develop a Magento 2 webshop locally. So far, I had no luck: lots of JS, CSS and 404 errors (on which I tried lots of fixes which only partly solved my problems).

My question is:

What is the best (step by step) way to develop a Magento 2 webshop locally (and if possible, 100% error free after installation)?

The Magento 2 dev docs don't really provide a comprehensive guide on how to do this.

I prefer using Laragon over XAMPP: it works way better and has lots of customization options including localhost URL's like webshop.dev instead of localhost/webshop.

FYI: I currently use Windows at home, but in the future I am planning to buy a Mac, but for now I'd like to know how I can do this the best way possible on a Windows machine (or a universal way).


texts: Magento1.9 : How to get customer email in success page

texts:
Am registering new customer and redirected to success page after registration.I want to show the guest customer email in success page.

Success.phtml

        $customerEmail = Mage::getSingleton('customer/session')->getCustomer()->getEmail();
        echo $customerEmail;

This is not working, because am not logged in. Can anyone help me


texts:
I have created Custom Button for "Order on WhatsApp" using the following Code at:

app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product/view/addtocart.phtml

Please tell me how to change WhatsApp no for 2nd Magento store. I can show 2 different Whatsapp no for different stores
    <?php if ($_product->isSaleable()): ?>
         <button type="button"  title="Order on Whatsapp" class="action primary"
         onclick=" window.open('https://wa.me/123456789 ?text=I want to order this product  <?php echo $_product->getProductUrl() ;?>/ ')">Order On Whatsapp</button>
    <?php endif;?>


texts: Magento2 - Display lowest price from other customer groups

texts:
So, right now. Magento 2 CE Tiered Pricing will show you that you are getting a discounted price if your group is configured for a discount on the product's advanced pricing configuration.

How would I show the group with the biggest discount price to customers that do not have a discount tier configured for their group?

I'd rather develop this myself but am unsure how to exactly do. If there's an extension that accomplishes this I'll take it but if there's info on how I can achieve this I'd rather take that route.


texts: Accept multiple currencies in multiple stores

texts:
I have an international Magento install that has 3 different websites, US, Uk/International, and Mexico. The reason for having 3 different websites is because we have a different payment gateway for each. We currently can accept either USD, Pounds, or Euros. Right now, the US and Mexico website's base currency is USD, and the UK/International website's base currency is Euros. However, I need to be able to accept all three forms of currency in each website. For example, if someone is purchasing a product from the UK/International store, I need them to be able to pay in either USD, Pounds, or Euros. I can get the frontend of the site to display prices in multiple currencies and the conversions look right. However when I actually place an order it only charges my card in USD.

For example, I have a product in the UK/International store that is 2.42 Euros (incl. tax). When I try to purchase it and pay with my American credit card, it charges my card the numerical value of the item in USD, in this case the value of the product is 2.42 Euros, but my card only gets charged $2.42, when it should be getting charged something like $2.86 (give or take current exchange rate).

So my question is how would I go about setting up the desired functionality?


texts: Magento 2.2 : Static block call to every CMS Page

texts: How to call a static block call every cms page in Magento 2.2


texts: How to display watermark only on fullscreen image Product Page Magento 2.3.4

texts:
Actually i set Watermark for base image from backend Content => Design
  => Configuration => Product Image Watermarks tab

  In my requirement: Only Watermark should display on product fullscreen
  image once we click on  product page images once it will be in
  fullscreen then it will display but not on product page normal images.

  If we set watermark base image from magento backend it is displaying
  on products normal images and fullscreen view also. Actually i want
  to remove the watermark on products base images on product page but it
  should have to display in fullscreen view.

  If anyone having an idea please guide me, Thanks in Advance !!!.


texts: In magento 2.4.* we found "{"error":{"root_cause":[{"type":"cluster_block_exception",..." error after setup: upgrade


texts: Store views having different URL structures

texts:
I have a webshop with different store views for different languages.
www.clothing.com and www.english.clothing.com for example.

My problem is that they have different link structures, so if I'm in a category and want to change language i get the 404 page. For example if i choose a category it will go to www.clothing.com/shirt. If I then change language it will look for www.english.clothing.com/shirt which doesn't exist.

If I choose the same category while I'm on the english page it will go to www.english.clothing.com/catalog/category/view/s/shirt/id/3/

How can i change this?

Note: if I choose a product in that category and change language it works as it should.


texts: About Collection Model and Resource Model

texts:
I am bit confused about using resource model and collection model. Sometimes when I see examples for loading products using specific attributes, in some examples, they use collection model and sometimes they use resource model.

Also when can I use specific method get... and set... along with table row name? Like getName, getId. I tried to use but unable get the values and it shows error: "calling undefined method in object"

$product = Mage::getModel('catalog/product')
    ->loadByAttribute('name', 'product_name');

echo $product->getName();
echo $product->getSku();

It shows "undefined method getSku()"

If I use var_dump($product), SKU shows in object, however unable to get the SKU using getSku()...


texts: Adding a grid/table inside grid in Magento Admin

texts:
I'm developing a custom extension for my client. There are two tables which hold the complete data.

primary_table

id_primary | name | age | image
===========|======|=====|===================
    1      | Kush | 18  | a/c/aclong.jpg
    2      | Lav  | 19  | b/o/bottle.png

and

secondary_table

id_seconday | id_primary | item_name | quantity
============|============|===========|=========
    1       |   1        |  pen      |   4
    2       |   1        |  pencil   |   2
    3       |   2        |  eraser   |   1
    4       |   2        | sharpner  |   1
    5       |   2        |  ruler    |   2

I am able to show custom form to user and save the data. But while showing the data in the admin, I have a problem. As the normal Grid in the admin is simply a 2-D table, how can I display the details all at once?

One approach I think is to display the secondary_table data as a table in one of the columns of the Grid. But how I can achieve that? How to make a table in a column of the grid? Or how to display this data simply?

Sample Display that I want.

Primary ID | Name | Age | Image |           Secondary Data
===========|======|=====|=======|=======================================
           |      |     |       |  Item Name | Quantity
    1      | Kush | 18  | ****  | -----------|---------
           |      |     |       |    Pen     |    4
           |      |     |       |    Pencil  |    2
-----------|------|-----|-------|---------------------------------------
           |      |     |       |  Item Name | Quantity
     2     | Lav  | 19  | ****  | -----------|----------
           |      |     |       |    Eraser  |    1
           |      |     |       |   Sharpner |    1
           |      |     |       |    Ruler   |    2

I have a working code to display everything except the last Secondary Data column. The code is same as the one created with moduleCreator. Please help me with that last column. Thank you.


texts: m.MYDOMAIN.com versus www.m.MYDOMAIN.com for a special Magento mobile website

texts:
Magento 1.9.1

I've setup a special mobile store/store front under a subdomain - www.m.myDOMAIN.com according to this tutorial:

http://www.wptaskforce.com/setting-magento-site-multiple-stores-subdomains/

I plan to put this code in the Miscellaneous scripts to make the system detect that a customer is connecting from a mobile device and forward the traffic to www.m.myDOMAIN.com:

I have a special responsive mobile store at m.MYdomain.com - how to make Magento detect mobile devices and forward the traffic to m.Mydomain.com?

Now I need to figure out which actual sub-domain to go with:

www.m.MYDOMAIN.com actually loads the mobile store/store front the way I've set that up
When I punch in just m.MYDOMAIN.com - it loads the desktop version (same as www.MYDOMAIN.COM)

What to do here? Is www.m.MYDOMAIN.com good enough or do I have to make the mobile site available on just m.MYDOMAIN.com and buy 2 SSL certificates one for each?


texts: Configurable product multi base currency setting is not taken over when creating simple products

texts:
I have three websites and Store A (base currency Japanese YEN) and B and C  (base currencies are EURO).

I create a configurable product, imput price in Yen (e.g. 30000yen), save, then switch to B and C and input each prices in EURO (e.g. 250eur).

After that, I create simple products related to it (= size variations) and save them.

Simple products are having only 30000yen as value and when I switch stores, store B and C are having 30000eur instead of 250eur. So I manually need to change them.

Is there any fixes for this issue?


texts:
I'm trying to read from a csv file a list of increment_ids and get order using them.

if (($file = fopen('increment_ids.csv','r')) != FALSE) {
    while($data = fgetcsv($file,0,"\t")) {
        $incremenet_id = $data[0];
        $order = Mage::getModel('sales/order')->loadByIncrementId($incremenet_id);
        print_r($order);
        break;
    ...

The issue is that when print_r($order) is empty but when use a number instead of the variable, the variable $order has the informations. I can echo $data[0] without a problem.
Thank you.


texts:
I`m facing following issue:

My stack is LEMP and Magento 2 is running without any problems, but-but-but...

While trying to switch into developer mode, using bin/magento file, the output informs me about successful switching, but still no exceptions are on the screen.

While I'm making typo in core files for a reason, I just see 500 error, and everything that I desire to make visible on the screen is just logged into the system.log file.

Please advice me.

Permissions are 777 for now, until I'll find the way to see the exceptions. I do not have declaration of the mode in .htaccess file and /etc/nginx/sites-enabled/magento.conf.

When I'm running bin/magento deploy:mode:show - it displays that I'm already in developer mode.

Here is output in system.log:

  [2016-12-18 17:22:54] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_106f1b068ec7ccf4878f9284dd1137afd1 and handles
  catalog_product_prices: Please correct the XML data and try again.  []
  []
      [2016-12-18 17:22:54] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_10c7461af04bb11fe209659d7147d2c579 and handles
  default, cms_index_index, cms_page_view, cms_index_index_id_home:
  Please correct the XML data and try again.  [] []
      [2016-12-18 17:22:54] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_100a98983867a1770682b48d9a0ad63441 and handles
  1column: Please correct the XML data and try again.  [] []
      [2016-12-18 17:22:54] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to
  'sidebar.additional', because the latter doesn't exist [] []
      [2016-12-18 17:22:54] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to
  'sidebar.additional', because the latter doesn't exist [] []
      [2016-12-18 17:22:54] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to
  'sidebar.additional', because the latter doesn't exist [] []
      [2016-12-18 17:22:54] main.CRITICAL: Broken reference: the 'paypal.partner.right.logo' element cannot be added as child to
  'sidebar.additional', because the latter doesn't exist [] []
      [2016-12-18 17:22:54] main.CRITICAL: Broken reference: the 'bml.right.logo' element cannot be added as child to
  'sidebar.additional', because the latter doesn't exist [] []
      [2016-12-18 17:22:54] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_106f1b068ec7ccf4878f9284dd1137afd1 and handles
  catalog_product_prices: Please correct the XML data and try again.  []
  []
      [2016-12-18 17:23:07] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_10d41d8cd98f00b204e9800998ecf8427e and handles
  : Please correct the XML data and try again.  [] []

But it is not the one I want. I want to reach seeing the following in the browser:

  2016/12/18 19:21:22 [error] 9905#9905: *372 FastCGI sent in stderr:
  "PHP message: PHP Parse error:  syntax error, unexpected '}' in
  /var/www/magento2/app/autoload.php on line 23 PHP message: PHP Stack
  trace: PHP message: PHP   1. {main}()
  /var/www/magento2/pub/index.php:0 PHP message: PHP   2. require()
  /var/www/magento2/pub/index.php:13" while reading response header from
  upstream, client: 127.0.0.1, server: www.newmagento.com, request: "GET
  /admin/admin/cache/index/key/eafa4895505340712c8f26a49e451a246334ffe5e50cd75ddc79352ecabc36ef/
  HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php5.6-fpm.sock:",
  host: "www.newmagento.com"

But I can find it only in error.log of my nginx.


texts: Magento CE 1.9.0.1 Array to string conversion Zend DB Adapter Pdo Abstract.php

texts:
I get this Error in Magento... /var/log/system.log since
a few weeks, - CE 1.9.0.1 with Firegento, german localisation Mage_Setup

  ERR (3): Notice: Array to string conversion  in
...\htdocs\magento\lib\Zend\Db\Adapter\Pdo\Abstract.php on line 74

I don´t know what does it mean. The code

protected function _dsn()
{   // baseline of DSN parts
    $dsn = $this->_config;

    // don't pass the username, password, charset,
            // persistent and driver_options in the DSN
    unset($dsn['username']);
    unset($dsn['password']);
    unset($dsn['options']);
    unset($dsn['charset']);
    unset($dsn['persistent']);
    unset($dsn['driver_options']);

    // use all remaining parts in the DSN
    foreach ($dsn as $key => $val)
            {
        $dsn[$key] = "$key=$val";  /* this is line 74 */
    }
    return $this->_pdoType . ':' . implode(';', $dsn);
}

What do I have to do.
Many Thanks for help, I didn´t find any help and answers in the web, in magento forums.

Petra Klapproth
(localhost for testing)


texts: New subcategory, adding products - how do I filter by configurable product only?

texts:
we set-up a new category

and after that we add products

but the problem is that we only need to select the configurable products

the problem is that the category products selector shows all product types

This is costing us so much time to go through rows and rows of data selecting the configurbale type

How can this be done faster?


texts: __construct() argument error when overriding 2 custom modules from same core module

texts:
I get the __construct() argument error while trying to override 2 custom modules from same core class as:

In etc/di - Module1

<preference for="Magento\CatalogSearch\Controller\Result\Index" type="Vendor\Module1\Controller\Result\Index" />

in Controller class

class Index extends \Magento\CatalogSearch\Controller\Result\Index
{
    public function __construct(
        Context $context,
        Session $catalogSession,
        StoreManagerInterface $storeManager,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory,
        Resolver $layerResolver,
        QueryFactory $queryFactory
    ) {
        parent::__construct($context,$catalogSession,$storeManager,$resultPageFactory,$queryFactory,$layerResolver);
        $this->resultPageFactory = $resultPageFactory;
        $this->layerResolver = $layerResolver;
        $this->_queryFactory = $queryFactory;
        $this->_storeManager = $storeManager;
    }

in etc/di--module2

<preference for="Vendor\Module1\Controller\Result\Index" type="Vendor\Module2\Controller\Result\Index" />

in controller module2

class Index extends \Vendor\Module1\Controller\Result\Index
{
    public function __construct(
        Context $context,
        Session $catalogSession,
        StoreManagerInterface $storeManager,
        Http $request,
        LayoutInterface $layout,
        ScopeConfigInterface $scopeConfig,
        Resolver $layerResolver,
        \Magento\Catalog\Model\CategoryFactory $catalogCategoryFactory,
        \Magento\Framework\Registry $registry,
        \Vendor\Module1\Model\Client\Connector $tglssearchClientConnector,
        QueryFactory $queryFactory,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    ) {
        parent::__construct($context,$catalogSession,$storeManager,$queryFactory,$layerResolver);
        $this->_storeManager = $storeManager;
        $this->catalogSession = $catalogSession;
        $this->storeManager = $storeManager;
        $this->request = $request;
        $this->layout = $layout;
        $this->scopeConfig = $scopeConfig;
        $this->catalogCategoryFactory = $catalogCategoryFactory;
        $this->registry = $registry;
        $this->tglssearchClientConnector = $tglssearchClientConnector;
        $this->layerResolver = $layerResolver;
        $this->_queryFactory = $queryFactory;
        $this->resultPageFactory = $resultPageFactory;

        /* parent::__construct(
            $context
        ); */
    }

I get:

  Argument 4 passed to
  Vendor\Module1\Controller\Result\Index::__construct() must be an
  instance of Magento\Framework\View\Result\PageFactory, instance of
  Magento\Search\Model\QueryFactory given, called in
  C:\xampp\htdocs\magento2x_5test\app\code\Vendor\Module2\Controller\Result\Index.php
  on line 36 and defined in
  C:\xampp\htdocs\magento2x_5test\app\code\Vendor\Module1\Controller\Result\Index.php
  on line 22


texts: Can't save value in custom field /admin/catalog/category

texts:
I have added a custom field in admin category. I need to save and get value of my field using observer.

My Xml file is "category_form.xml"

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
     <fieldset name="display">
         <argument name="data" xsi:type="array">
             <item name="config" xsi:type="array">
                 <item name="label" xsi:type="string" translate="true">Custom Field</item>
                 <item name="dataScope" xsi:type="string"/>
                 <item name="sortOrder" xsi:type="number">10</item>
                 <item name="collapsible" xsi:type="boolean">true</item>
                 <item name="opened" xsi:type="boolean">true</item>
             </item>
         </argument>
         <field name="display">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">Vendor\Module\Model\Config\Source\Display</item>
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">select</item>
                    <item name="label" translate="true" xsi:type="string">Custom</item>
                    <item name="formElement" xsi:type="string">select</item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>


texts: Magento sudden drop in site speed following no changes

texts:
My Magento site is running extremely slowly on category pages which has a lot of products. I am presuming this is because of an image issue, however i have optimised and lossy compressed all images making them optimum for our site, furthermore the images on our category page are cached at a correct scale. Is there a reason why our site is taking 9 seconds to retrieve the images? I have also checked with our hosts who ran a tracert, confirming that it is not a server issue. It seems to be down to the instillation but i have no clue where to begin looking as I can't pin down what is causing this issue.

Please see waterfall chart below:


texts: Magento 2: How to add custom css class in Checkout shipping address form

texts: Want two input fields in one Line on checkout page. Looks like it is binded by knockoutjs. Didn't figure out where to add custom classes. Looked into so many files (Magento_Ui and Magento_Checkout) but didn't found anything to change the classes. Please help me out in making the following shipping address template.


texts: where we can find Dataflow - Advanced Profiles option in magento2?

texts:
Dataflow - Advanced Profiles

Dataflow - Profiles

I want  to import product using profiler in magento2

Can anyone help?


texts:
How to override

  Magento_OfflinePayments/js/view/payment/method-renderer/cashondelivery-method.js


texts: Magento cart can only take one item (1 quantity per product)

texts: I'm working on a page with Magento! When I try to Add to my Card a product with quantity more than 1, it comes to my Card with quantity 1... How can this problem be solved???


texts: Magento Add new condition name (shipping table rate)

texts:
In table rate shipping there are three conditions:

Weight vs. Destination
Price vs. Destination
n°of Items vs. Destination

It's only possible select it once a time.
Example: if i selected price vs. destination, i can't use weight vs. destination.
I necessity to use Weight vs. Destination and Price vs. Destination together.
Any solution?

Please help me. Thank you


texts:
We are running Magento 2 in version 2.3.1, but the error occurred in version 2.3.0 also. The situation is the following:

we've created a custom theme which has Magento/luma theme as parent.
according to https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css_debug.html we've installed node and grunt for theme LESS development.
the grunt themes.js config of our custom child theme has files:['css/styles-m', 'css/styles-l', 'css/style'] entries. (where 'styles-m' and  'styles-l' are files from the parent, and 'css/style' is our custom LESS file)
our custom LESS file style.less is located in our custom VENDOR/THEME/web/css/ folder and is also registered as <css src="css/style.css" /> within default_head_blocks.xml of our theme.

Now the problem is, that executing commands grunt clean:THEME, grunt exec:THEME, grunt less:THEME and grunt watch will not create symlinked files within pub/static folder. Instead it copies the source stylesheets to the pub folder, and therefore grunt watch will not detect any changes.
Of course I researched and checked solutions like cleaning cache, rebuilding anything and deploying static content before running the grunt tasks. (e.g. Magento 2 grunt exec does not actually create symlinks or What are the Magento 2 Grunt commands? From deployment?)

I also verified that there are no external imports within my custom style.less file. (https://github.com/magento/magento2/issues/1619#issuecomment-377472378) We're running under FreeBSD.

Sadly the Symlink is not created and therefore grunt does not detect changes of my custom 'style.less' file:

Do you have any idea why this happens, or did someone experience the same with m2? Thanks in advance for all your help!

UPDATE 09.04.19:

I added source/_custom.less according to Chandras comment(Magento 2 Theme Development - grunt watch not detecting changes of custom LESS file)
I added the _custom.less to default_head_blocks and themes.js configuration.
The result is: the less file gets generated, but also not symlinked to the source file, therefore grunt watch still does not recognize any change.

Anyone any idea?


texts: How to make Shopping Cart Rule work with Configurable Product in Magento?

texts:
Shopping Cart Rule in Magento doesn't allow the condition custom attribute of product . I want to make rule with condition size 8 , men. I found some solutions on Internet but they don't work.
Thank you in advance.


texts: How to override Magento checkout shipping.html

texts:
myproject/vendor/magento/module-checkout/view/frontend/web/template/shipping.html

Overring using the fallback.

myproject/app/design/frontend/Solace/olsto_child/Magento_Checkout/web/template/shipping.html

I tried to modify the file : shipping.html , but it didn't get overriden
any solution let me know if I am doing the right way or wrong.


texts: Can't see the custom shipping method just added

texts:
I need to add a custom shipping method. I was fallowging this tutorial: https://www.mageplaza.com/devdocs/magento-2-create-shipping-method/
I was able to configure my custom shipping method. I set enable "Yes", but I can't see my option for shipping, when I place an order.
In the checkout window shipping methods appear empty. Thanks!


texts: Top link not moving to header - Element not moving to porto_header

texts:
I'm trying to move my customer account dropdown from the header.links to the header.
The element I'm trying to move is called customer. It's in the file app/design/frontend/Smartwave/porto/Magento_Customer/layout/default.xml
The code is
  <referenceBlock name="header.links">
            <block class="Magento\Customer\Block\Account\Customer" name="customer" template="account/customer.phtml" before="-"/>
            <block class="Magento\Customer\Block\Account\AuthorizationLink" name="authorization-link-login" template="account/link/authorization.phtml"/>
        </referenceBlock>

The header container is called porto_header in app/design/frontend/Smartwave/porto/Smartwave_Porto/layout/default.xml and I'm trying to move it to before="custom_block"
the code is
            <block class="Smartwave\Porto\Block\Template" name="porto_header" template="html/header.phtml" before="main.content">
                <block class="Magento\Framework\View\Element\Html\Links" name="header.links">
                    <arguments>
                        <argument name="css_class" xsi:type="string">header links</argument>
                    </arguments>
                </block>
                <block class="Smartwave\Porto\Block\Form\Login" name="header_customer_form_login" ifconfig="porto_settings/header/login_popup" template="Smartwave_Porto::html/login.phtml"/>
                <block class="Magento\Store\Block\Switcher" name="store_language" as="store_language" template="switch/languages.phtml"/>
                <block class="Magento\Framework\View\Element\Template" name="top.search" as="topSearch" template="Magento_Search::form.mini.phtml" />
                <block class="Smartwave\Porto\Block\Template" name="custom_block" template="html/header_custom_block.phtml" ifconfig="porto_settings/header/static_block" after="-"/>
            </block>
        </referenceContainer>

I'm moving it using app/design/frontend/Smartwave/porto_child/Magento_Customer/layout/default.xml
and the code is
    <body>
        <move element="customer" destination="porto_header" before="custom_block" />
    </body>

But while the element doesn't appear in its original spot anymore, it doesn't show up in the header, and when I look at the page source, I don't see the CSS classes that I expect to see for this element.
If I try to move this element to anywhere else on the page, it shows up, but when I try to move it to porto_header, it's nowhere to be found


texts: what has priority HTACCESS or Magento or?

texts: My question is if i setup security using the Magento admin panel and turn on the Secure settings, will the HTACCESS file override the Magento setting when using HTTPS ?


texts:
<?php
    namespace Essence\Slider\Setup;

    use Magento\Framework\Setup\UpgradeSchemaInterface;
    use Magento\Framework\Setup\SchemaSetupInterface;
    use Magento\Framework\Setup\ModuleContextInterface;

    class UpgradeSchema implements UpgradeSchemaInterface {
        public function upgrade(
            SchemaSetupInterface $setup,
            ModuleContextInterface $context
        ){

            $installer = $setup;
            $installer->startSetup();
            if(version_compare($context->getVersion(), '1.1.0', '<')){
                if(!$installer->tableExists('bt_essence_slider')) {
                    $table = $installer->getConnection()->newTable(
                        $installer->getTable('bt_essence_slider')
                    )
                    ->addColumn(
                        'id',
                        \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
                        null,
                        [
                            'identity' => true,
                            'nullable' => false,
                            'primary'  => true,
                            'unsigned' => true
                        ],
                        'Banner ID'
                    )
                    ->addColumn(
                        'banner_name',
                        \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                        255,
                        [
                            'nullable' => false
                        ],
                        'Banner Name'
                    )
                    ->addColumn(
                        'status',
                        \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
                        null,
                        [
                            'nullable' => false,
                            'default'    => '1'
                        ],
                        'Banner Status: Enabled is: 1, Disabled is: 2'
                    )
                    ->addColumn(
                        'created_at',
                        \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP,
                        null,
                        [
                            'nullable' => false,
                            'default'  => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT,
                        ],
                        'Created At'
                    )
                    ->addColumn(
                        'updated_at',
                        \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP,
                        null,
                        [
                            'nullable' => false,
                            'default'  => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT_UPDATE,
                        ],
                        'Updated At'
                    )
                    ->setComment('Slider Table');
                    $installer->getConnection->createTable($table);
                }
            }
            $installer->endSetup();
        }
    }

And when I try to run following command:

  php bin magento setup:upgrade

I am getting following error in command line:

  Undefined property: Magento\Setup\Module\Setup::$getConnection in UpgradeSchema.php on line 18

I cannot find out what is the problem here. Please help.


texts: Change meta title of customer login page

texts:
Trying to change the meta title of the customer login page in Magento2 at example.com/customer/account/login/. Added  tag to my xml file but no luck. Please advise.

Here's my xml layout:

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <title>Member Login</title>
    </head>
    <body>
        <referenceContainer name="content">
            <!-- customer.form.login.extra -->
            <referenceBlock name="page.main.title">
                <action method="setPageTitle">
                    <argument translate="true" name="title" xsi:type="string">Member Login</argument>
                </action>
            </referenceBlock>
            <container name="customer.login.container" label="Customer Login Container" htmlTag="div" htmlClass="login-container">
                <block class="Magento\Customer\Block\Form\Login" name="customer_form_login" template="form/login.phtml">
                    <container name="form.additional.info" as="form_additional_info"/>
                </block>
                <block class="Magento\Customer\Block\Form\Login\Info" name="customer.new" template="newcustomer.phtml"/>
            </container>
            <block class="Magento\Cookie\Block\RequireCookie" name="require-cookie" template="Magento_Cookie::require_cookie.phtml">
                <arguments>
                    <argument name="triggers" xsi:type="array">
                        <item name="loginButton" xsi:type="string">.action.login</item>
                    </argument>
                </arguments>
            </block>
        </referenceContainer>
        <referenceContainer name="form.additional.info">
            <block class="Magento\Framework\View\Element\Template" name="form_additional_info_customer" template="Magento_Customer::additionalinfocustomer.phtml"/>
        </referenceContainer>
    </body>
</page>


texts: how can I search catalog products in plural

texts:
I have a list of furniture items as my catalog products. When search with keyword 'table' it displays 112 records and displays 1 record for keyword 'tables'.
Here my question is does magento support plural search.
I need to display all the 112 records while searching with keywords 'tables'. For this which method should prefer.please advice me i am new to magento.


texts: Magento 2 Rest API: create / update order,customer information

texts:
I want to create and update customers, order in Magento-2. But I am facing problem in how to pass data to create customer. Can anyone give me an example for this?

I passed data like:

$cusData = "rest/V1/customers/{'customers': {'customer':{'email':'testmy@test.com','firstname':'Jhon','lastname':'test'}}}";

$cusMethod = 'PUT';

$cusJsonData = getData($token,$cusData,$cusMethod);

function getData($token,$data,$method)
{
    try{
        $requestUrl = BASEURL.$data;
        $ch = curl_init($requestUrl);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));
        return curl_exec($ch);
    }catch(Exception $e){
        echo $e->getMessage();
    }
}


texts: view.xml Fotorama gallery thumbnail sizes @2x?

texts:
I just want to increase the size of the gallery thumbnail images, but then set their display size smaller via css to achieve high resolution display. (The default display is 1x which is noticeably very blurry).
I have successfully increased the image size by updating my theme's 'etc/view.xml'. Easy peasy.
However the next steps are more tricky. Things seem to set several styles via js to use the new image width I set. The orange thumbnail outline for example. I can override '.fotorama__thumb-border' and '.fotorama__nav__frame' styles in css. But then there are still issues like the click events still using the big size. Weird. I checked '/lib/web/fotorama/fotorama.js' but this was rather complicated. I believe this might be the thing that needs overriding though. I thought there must be a way to set the value manually in js (half size of the the image size I set for @2x display). But I cannot find a way to do this using the default Fotorama gallery.
So for now I will have to set the product thumbnail image size smaller again and have it look like a blurry mess... (It is so blurry..!! Even Grandma noticed.)
Has anyone else come across this before? There must be a straightforward way to have a @2x image for thumbnails? (I think this issue happens elsewhere across magento, e.g. in the cart, but the Fotorama gallery seems to be the most confusing place to try and fix)
(Magento default view.xml settings are so bad.. 25 duplicate images per product image..! Very blurry images...)
Cheers!
Edit: this file looks promising? "/vendor/magento/module-catalog/Block/Product/View/GalleryOptions.php"


texts: How to get Product Submit Url on Category page?

texts: On product page the product form has given action = <?php echo $this->getSubmitUrl($_product) ?>. I want to get this submit url on category page for each product but on category page it returns different URL for Configurable Product. how to get the same Submit url  on category page for Configurable Product.


texts:
display percentage of discount on product list and product view page in magento1.9.1.1?

In the beside of product cost will display the percentage


texts: Magento2 : How to add custom layout in admin panel at catagories->Design tab?

texts:
I am new in Magento2. I create a new customized theme for eCommerce store.
Now ,i want to add the custom layout in admin panel at categories->design tab at layout dropdown.

How should I do it.

Or I want to display the custom category page at frontend which is in tabular form means when I click on any category  it display one page which is 1 column and in tabular format which contain different column.

First column for product name and I want when user click on product name or sku specified over their, it redirect to product view page. Please can anyone help me to resolve this query. for details of my question have look on attached screen shot.


texts: Magento 1 - Can't connect to local MySQL server through socket '/tmp/mysql.sock'

texts:
I've my magento 1 installed since 5 months and I never had a problem, all was working fine. Today with no reason I can't access to my installation, frontend and backend made the same error ad stop the execution.

This is the error:

a:4:{i:0;s:95:"SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)";i:1;s:2994:"
#0 /home/xp1qh8ju/public_html/lib/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /home/xp1qh8ju/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(396): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /home/xp1qh8ju/public_html/lib/Zend/Db/Adapter/Abstract.php(460): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 /home/xp1qh8ju/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 /home/xp1qh8ju/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 /home/xp1qh8ju/public_html/app/code/core/Mage/Core/Model/Resource.php(179): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 /home/xp1qh8ju/public_html/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#7 /home/xp1qh8ju/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
#8 /home/xp1qh8ju/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
#9 /home/xp1qh8ju/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getWriteAdapter()
#10 /home/xp1qh8ju/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(360): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter()
#11 /home/xp1qh8ju/public_html/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(134): Mage_Core_Model_Resource_Db_Abstract->getReadConnection()
#12 /home/xp1qh8ju/public_html/app/code/core/Mage/Core/Model/Config.php(1357): Mage_Core_Model_Resource_Db_Collection_Abstract->__construct(Object(Mage_Core_Model_Resource_Website))
#13 /home/xp1qh8ju/public_html/app/code/core/Mage/Core/Model/Config.php(1389): Mage_Core_Model_Config->getModelInstance('core_resource/w...', Object(Mage_Core_Model_Resource_Website))
#14 /home/xp1qh8ju/public_html/app/Mage.php(491): Mage_Core_Model_Config->getResourceModelInstance('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#15 /home/xp1qh8ju/public_html/app/code/core/Mage/Core/Model/Abstract.php(208): Mage::getResourceModel('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#16 /home/xp1qh8ju/public_html/app/code/core/Mage/Core/Model/Abstract.php(213): Mage_Core_Model_Abstract->getResourceCollection()
#17 /home/xp1qh8ju/public_html/app/code/core/Mage/Core/Model/App.php(619): Mage_Core_Model_Abstract->getCollection()
#18 /home/xp1qh8ju/public_html/app/code/core/Mage/Core/Model/App.php(477): Mage_Core_Model_App->_initStores()
#19 /home/xp1qh8ju/public_html/app/code/core/Mage/Core/Model/App.php(360): Mage_Core_Model_App->_initCurrentStore('', 'store')
#20 /home/xp1qh8ju/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#21 /home/xp1qh8ju/public_html/index.php(94): Mage::run('', 'store')
#22 {main}";s:3:"url";s:6:"/admin";s:11:"script_name";s:10:"/index.php";}

Anyone knows how to solve this problem?


texts: I imput alt tags on all my Images but it is only showing up on the first image?

texts: I have put in a number of Products with 3 Images on Magento. I have filled in the Label section ( Alt Text ) on all 3 images and uploaded the images. When I run a website check 2 of the images say they have no Alt Text. What am I doing wrong?


texts: First steps of creating API integration with Magento2.3

texts:
background: I'm new to Magento as I haven't used it before, but I've read through most of the API documentation now. I have an online dashboard application with various widgets that are different API integrations. We mostly read data from APIs to display to our users in a way that they find useful such as various charts. Many of our users have been requesting a new Magento widget.

question(s): I see the API has many different uses after reading through documentation and other posts in forums, but I'm still confused on a couple things. I see to develop and test an API integration we will need to download Magento with sample data. I have done this but haven't got the web server setup because I had a couple questions come to mind and I didn't want to waste time on something that wouldn't work as I had expected. Will the API allow each one our users to authenticate to their own Magento data? I want to make sure the API isn't just for developing within a users own company. Our company isn't interested in currently using Magento, but our users want to give us access to their data via API so we can read the data and end up displaying the data in charts so they can easily see trends and stuff like that. If the API doesn't support that just let me know and you don't need to answer my next question!

https://devdocs.magento.com/guides/v2.3/get-started/authentication/gs-authentication-oauth.html Here I see that the authentication flow is different that how most of our integrations work. Normally our users add a new widget to their dashboard and then configure the widget. If the integration uses oauth the user will click "Add Account" which sends a request to API endpoint and then user will sign into integration account via Oauth and data needed to make requests are returned. With your API it seems the authentication starts on your end after a user creates an integration within admin panel and then that's sent to given URLs. How would I know which of our users this information belongs to? Even if this isn't how we normally setup widgets I think we could find a way to make this work, but it seems that there's nothing unique being sent in the request to let us know which user this consumer key and secret would belong to. That is what brought up my first question I mentioned earlier.

Please let me know if you need any more information or clarification for what I said. Thank you for your time!


texts:
I'm running the static tests for one of my magento 2 modules php bin/magento dev:tests:run static and I get the following errors.

Data set: [ROOT]/app/code/Sample/News/Block/Adminhtml/Author/Edit/Buttons/Generic.php
Module Sample\News has undeclared dependencies: hard [Magento\Backend]
[ROOT]/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php:313
[ROOT]/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php:56
[ROOT]/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php:316

and others like that.
My module.xml file looks like this:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Sample_News" setup_version="2.0.0">
        <sequence>
            <module name="Magento_Backend"/>
            <module name="Magento_Ui" />
            <module name="Magento_Store" />
            <module name="Magento_Theme" />
            <module name="Magento_Cms" />
        </sequence>
    </module>
</config>

my composer.json file looks like this:

{
  "name": "tzyganu/magento2-sample-module",
  "description": "Magento 2 Sample crud module",
  "version": "2.0.0",
  "license": "MIT",
  "require": {
    "magento/module-backend": "~100.0.0",
    "magento/module-cms": "~100.0.0",
    "magento/module-ui": "~100.0.0",
    "magento/module-store": "100.0.*",
    "magento/framework": "100.0.*",
    "magento/module-media-storage": "100.0.*",
    "magento/module-directory": "100.0.*"
  },
  "type": "magento2-module",
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/tzyganu/Magento2SampleModule"
    }
  ],
  "autoload": {
    "files": [
      "registration.php"
    ],
    "psr-4": {
      "Sample\\News\\": ""
    }
  }
}

Is there an other place where I should declare these dependencies?

[EDIT]
While debigging I found out that the module name that is used here to check for dependencies is Sample\News but in the dependency $_mapDependencies static var in the same class the module appears as sample/sample-news. This means that even if I add all the dependencies correctly it will still say that there is no declared dependency because of this.


texts: Product grid is not loading in admin, - Error: Unresponsive script

texts:
The product grid is not loading properly in the backend when logged in as the Administrator. I get an error of unresponsive script.

But if I login to the backend with another user (personal user) the product grid loads successfully.

Can anyone suggest why this might be?


texts: I would like to export created Magento 2 categories to CSV file and create upgrade script that imports csv file to Magento 2 just like sample data csv file.


texts: Magento 2 composer install fails with at zendframework1

texts:
I'm running this command to install magento 2:

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition .

It downloads a few packages:

Installing magento/project-community-edition (2.0.0)
  - Installing magento/project-community-edition (2.0.0)
    Loading from cache

Created project in .
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing magento/magento-composer-installer (0.1.5)
    Downloading: 100%

  - Installing magento/framework (100.0.2)
    Downloading: 100%

  - Installing magento/language-zh_hans_cn (100.0.2)
    Downloading: 100%

  - Installing magento/language-pt_br (100.0.2)
    Downloading: 100%

  - Installing magento/language-nl_nl (100.0.2)
...

but then fails at zendframework1

Installing magento/zendframework1 (1.12.16)

    Downloading: 100%
    Invalid zip file, retrying...
  - Installing magento/zendframework1 (1.12.16)
    Downloading: 100%
    Invalid zip file, retrying...
  - Installing magento/zendframework1 (1.12.16)
    Downloading: 100%

Failed to download magento/zendframework1 from dist: '/Users/User/sites/magento2/vendor/magento/zendframework1/6d7139aa6e64ddb9093d21b217100f9d' is not a zip archive.
Failed to execute unzip '/Users/User/sites/magento2/vendor/magento/zendframework1/6d7139aa6e64ddb9093d21b217100f9d' -d '/Users/User/sites/magento2/vendor/composer/99e1ac00' && chmod -R u+w '/Users/User/sites/magento2/vendor/composer/99e1ac00'

  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /Users/User/sites/magento2/vendor/magento/zendframework1/6d7139aa6e64ddb9093d21b217100f9d or
        /Users/User/sites/magento2/vendor/magento/zendframework1/6d7139aa6e64ddb9093d21b217100f9d.zip, and cannot find /Users/User/sites/magento2/vendor/magento/zendframework1/6d7139aa6e64ddb9093d21b217100f9d.ZIP, period.
    Now trying to download from source
  - Installing magento/zendframework1 (1.12.16)
    Cloning c9d607bfd9454bc18b9deff737ccd5d044e2ab10

  [Symfony\Component\Process\Exception\ProcessTimedOutException]
  The process "git clone --no-checkout 'git://github.com/magento/zf1.git' '/Users/User/sites/magento2/vendor/magento/zendframework1' && cd '/Users/User/sites/magento2/vendor/magento/zendfram
  ework1' && git remote add composer 'git://github.com/magento/zf1.git' && git fetch composer" exceeded the timeout of 300 seconds.

Any ideas?

Thanks!


texts: After update to 2.4.0 view invoice in backend breaks page (layout will not load)

texts:
i have a problem since we have updated our Magento from 2.3.5 to 2.4.0.
Here is the problem:
We will open the invoice view in backend. So we go to:
->Sales->orders->select an order (my order: DE001014408) ->go to Invoices->view
The page loads everything without layout:

But if i view another invoice of another order, everything is working fine. In Example order DE001014405. Here is how it should looks like:

As i can see in inspektor-mode, there is an error:

Uncaught ReferenceError: require is not defined
-anonymous- https://-domain-/b4ckend/sales/order_invoice/view/invoice_id/21960/key/688e4aa0e262928d72e73f12a23c94bda39d68a1564ed3fadb0b3f96ee77b15c/:297

After that i checked the logs. The logs says:

main.CRITICAL: Cannot gather stats! Warning!stat(): stat failed for /home/dev/domains/-domain-/public_html/pub/static/frontend/-theme-/-theme-child-/en_US/mage/requirejs/mixins.js {"exception":"[object] (Magento\Framework\Exception\FileSystemException(code: 0): Cannot gather stats! Warning!stat(): stat failed for /home/dev/domains/-domain-/public_html/pub/static/frontend/-theme-/-theme-child-/en_US/mage/requirejs/mixins.js at /home/dev/domains/-domain-/public_html/vendor/magento/framework/Filesystem/Driver/File.php:77)"}

I also searched the forum and tried some solutions:

Checked .htaccess
checked file permissions
run content deploy and also set developer mode to deploy automatically
deleted .htaccess in pub/media
cleared and flushed cache

Nothing seems to be working. I think that it is not a permission or htaccess problem because some invoices can be viewed without issues.
It is a known Magento bug which will be fixed in a coming update like 2.4.1 or later?
Does someone has the same issue and were able to fix it? Any ideas how to fix it?
I am happy for any ideas!
Thanks for helping.


texts: The difference between luma theme and blank

texts: I often get asked which theme is the best to set as the parent, Blank or Luma, when it comes to creating a custom theme in Magento 2?


texts: Product detail page $block->getDisplayLabel() not translated

texts:
On the product detail page I am showing two prices without VAT and with VAT. This is the first price without VAT:

€247.40

As you can see the data-label is translated to German as should be, but the second price with VAT is not:

€294.41

Everything else is translated to German, correctly.

This is where $block->getDisplayLabel() is called

<span <?php if ($block->getPriceId()): ?> id="<?php /* @escapeNotVerified */ echo $block->getPriceId() ?>"<?php endif;?>
        <?php echo($block->getPriceDisplayLabel()) ? 'data-label="' . $block->getPriceDisplayLabel() . $block->getPriceDisplayInclExclTaxes() . '"' : '' ?>
        data-price-amount="<?php /* @escapeNotVerified */ echo $block->getDisplayValue(); ?>"
        data-price-type="<?php /* @escapeNotVerified */ echo $block->getPriceType(); ?>"
        class="price-wrapper <?php /* @escapeNotVerified */ echo $block->getPriceWrapperCss(); ?> price-tax-pdp-include-tax"
        <?php echo $block->getSchema() ? ' itemprop="price"' : '' ?>>

and if I dump it return:

object(Magento\Framework\Phrase)[3212] private 'text' => string 'Incl. Tax' (length=9) private 'arguments' => array (size=0) empty

Can you help me why this is happening and how can be fixed?


texts: remove decimal from price on cart summry page in mgento2


texts: Error filtering template: File Magento 2.1.6

texts:
I have upgraded website from 2.1.5 to 2.1.6.
I am facing Error filtering template: File pub/media/catalog/product/placeholder/default/image.jpg' does not exists.

Place holder image is already there at above path.

I have also tried to upload new place holder image from the admin catalog configuration but still error exists.


texts:
How to assign particular attribute set to newly created attribute?

My code is

    eavSetup->addAttribute(
        \Magento\Catalog\Model\Product::ENTITY,
        'test_demo221',
        [

     //   'group' => 'Bag',
        'attribute_set_id' => 16,
            'type' => 'int',
            'backend' => '',
            'frontend' => '',
            'label' => 'Test Attribute',
            'input' => '',
            'class' => '',
            'source' => '',
            'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL,
            'visible' => true,
            'required' => false,
            'user_defined' => false,
            'default' => 0,
            'searchable' => false,
            'filterable' => false,
            'comparable' => false,
            'visible_on_front' => false,
            'used_in_product_listing' => true,
            'unique' => false,
            'apply_to' => ''
        ]
    );

It creates the attribute but appear in all attribute set. What should I have to do if I want to add to particular attribute set only?


texts: Run PHP file from adminform when button is clicked

texts:
I have created one module. That module has a form, which has a button field. If that button is clicked then I want to run php file.

That file I have put in the root folder in magento with name test.php.

How to do this, if button is clicked, then call test.php to run?


texts:
I am stuck here.
My Magento site is just a blank white screen, and the admin panel log in has three fields and no log in button.

I have attached an image of the admin log in and also the error I saw

Can anyone help? I am really struggling!
Thanks


texts: visitor_id null in report_viewed_product_index magento2

texts:
when visitor_id  is null then recently viewed product not showing on frontend.
why visitor_id  saving 'null' in table?


texts: Copy Product data and Attributes to Another existing product

texts:
i know we can use duplicate option. but i don't want to create another new product.

Product 1 -> Product 2

Product 1 and Product 2 are two different products and now i need to copy Product 1 data and its attributes to Product 2 without chaining Product 2 id.


texts:
Recenlty, I upgraded my Magento from v.2.4.1 to 2.4.2.
The process went smoth with no issues.
As Magento v2.4.2 supports Elasticsearch v7.9.x I would like to upgrade my curently installed 7.6.x to 7.9.x.
Can I kindly ask you to give me a tip on how to upgrade it?
The shop is stil a project so don't mind taking it temporarily offline.
Could I just stop the elasticsearch with
sudo systemctl stop elasticsearch.service
and then then install the newer version with the following:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.3-amd64.deb
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.3-amd64.deb.sha512
shasum -a 512 -c elasticsearch-7.9.3-amd64.deb.sha512
sudo dpkg -i elasticsearch-7.9.3-amd64.deb
and finaly start the servise with
sudo systemctl start elasticsearch.service
Thank you in advance.
My enviroment: Magento 2.4.2, Apache, php7.4, elasticsearch7.6


texts: How to sell prepaid cards (Like Recharging cards) on Magento2?

texts:
I am searching for a way to sell prepaid Recharging cards on Magento2.

Customer purchase the product and pay on my store, if the payment is complete, he got the prepaid Recharging card Code (16 digits) by email or any other way.

I have searched a lot. I didn't find any result.

Any help is appreciated.


texts: Why there are cache and page_cache different folders in magento 2.x

texts:
I am new to magento 2.x and was wondering to see that Magento 2.x has 2 folders for cache:

/var/cache folder
/var/page_cache folder

My question is that why there are 2 different folders?

Also what are differences among /var/view_preprocessed, /var/generation and /pub/static folders?

Please can anyone explain the differences and use of above folders?

Thanks in advance


texts: is there any difference in authorization between Magento.RestAPI 1.8 and 1.6

texts:
I'm using magento.restAPI and i'm very new to magento and i havent used any previous version of magento.
Currently i'm having a magento rest Api
i want to know whether its the same authentication process being used in magento 1.8 and 1.6


texts: Save product image labels programmatically magento 2

texts:
I am saving the product programmatically using action class in magento 2 [Reference link].After saving the product i am saving the images.But while saving the labels of the images i am getting the following error...

Fatal error: Call to undefined method Magento\Eav\Model\Entity\Attribute\Backend\DefaultBackend\Interceptor::updateImage()

I have used the following code for saving the image label after product save...

$_product = $this->objectManager->get('Magento\Catalog\Model\Product')->load($_product->getId()); //$_product->getId() is 5 which is id of product saved
            $attributes = $_product->getTypeInstance(true)->getSetAttributes($_product);
            $gallery = $attributes['media_gallery'];
            //$gallery = $_product->getData('media_gallery');
            $images = $_product->getMediaGalleryImages();
            foreach ($images as $image) {
                $backend = $gallery->getBackend();
                $backend->updateImage($_product,$image->getFile(),array('label' => 'Blah'));
            }

Referred above code from this link and made changes...

Please suggest how to use updateImage function in magento 2 and save labels for images after saving the product...


texts:
I am trying to add an input text box in checkout payment part for customer input the sales id.

The payment option in the image is just one of the default Magento payment method.

do I need to rewrite the hold payment method or there is other way for this?
All the product in my DB are Virtual Product
so it won't have any shipping form.

I have tried using plugin but it just add into the billing address form which is not what I need.

Does anyone have the answer or some suggestion?


texts:
We have a weird problem. On a site at random times the sessions files on the site are empty, 0 kb.
After removing/clearing the cache the sessions get back to about 2.2kb.

I have no clue to figure out what is the trigger when this happens.

On the times the session are empty no one can login or add stuff to cart. The admin login also doesn't appear to work at those times.

Does anybody have an idea?

Session files are stored in /var/session/
It's Magento 1.7.0.0
The Google bot is also quite bussy indexing.
The server is in our controll and run 3 other shops without problems.
At launch we didn't have this problem. When it started there where no files edited in a few weeks prior. And the changes where mostly templating

How we solved it, sort of...
we moved to an other host, no problems there.


texts: Permissions for a magento developer user account

texts:
I am hiring a developer to install and configure Magento 2.0 on my Amazon EC2 Linux server.  I am new to Linux and Magento.  I have given them SSH access and created a magento file system owner user.  They can login to the server with SSH but they are saying they don't have sudo or sudo su privileges. I added them to the wheel group the following line is in the sudoers file

%wheel        ALL=(ALL)       NOPASSWD: ALL

I need some guidance on what to do.  I want them to  be able to do everything they need to install and configure magento.


texts: Can I change the taxes on a quote item in magento2 programmatically?

texts:
I need to change the tax rate on quote items in a magento2 checkout process that is entirely done programmatically.

What I've found from various resources here on stackoverflow is that is possible to change the quote item's product tax rate

$item->getProduct()->setTaxClassId(1);

In my quote, however, I have many quote items, but they are the all the same catalog-product, only with differrent options aplied to them. Now, when I set the products tax rate like shown above, the last tax-class-id I set is used for ALL items in the quote.

I need a way to set the tax on the quote item directly. But

$item->setTaxPercent(4)

(e.g.)
has no effect.


texts: Magento2 How To Add Visual Swatch in product option. as a Customizable Options Type

texts: Same as per Image i want to add option...So how can i add or devlope a Module ?


texts:
I'd like to create, on the product page, a button that leads to a specific tab with id = "exampleid"like "Be the first to review this product".
The phtml file is this:

 <?php
// @codingStandardsIgnoreFile

/**
 * @var $block \Magento\Catalog\Block\Product\View
 */
?>
<?php
    $_product = $block->getProduct();
?>
        <?php if($_product->getData('exampleattribute')==1){?>
            <div id="exampleid">
               <?php echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('exampleblock')->toHtml();?>
          </div>
        <?php } ?>

and the catalog_product_view.xml is this:

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product.info.details">
            <block class="Magento\Catalog\Block\Product\View" name="example.tab" template="Vendor_extension::exampletab.phtml" group="detailed_info">
                <arguments>
                    <argument name="title" translate="true" xsi:type="string">Example tab</argument>
                    <argument name="sort_order" xsi:type="string">25</argument>
                </arguments>
            </block>
   </referenceBlock>
   </body>
</page>

what is the correct and clean way to create a link that calls the id of the tab?
Thanks a lot to everyone ;)


texts: How can i give condition Shopping Cart Price Rules like if selected attribute products present in the cart, no other products allowed to add cart

texts:
If the customer selects my custom attribute products like "XYZ" to cart, after the customer not able to add other products to cart, the message showed "XYZ" attribute products present in the cart. and also other attributes products present in the cart, not able to add my "XYZ" attributes products to cart.

How can I do it by using Shopping Cart Price Rules?

Is any other options exits, let me know.


texts: Notice: Undefined offset 5584 in systom.log

texts:
I am facing "Notice: Undefined offset 5584" systom.log error for below code :

<?php $s_qty = 0; ?>

<tr id="item<?php echo $item->getId(); ?>">

<?php
$session_flag = 0;
if (isset($_SESSION['bluedartItemsQty'])) {
    $qtyArr = $_SESSION['bluedartItemsQty'];

    $s_qty = abs($qtyArr[$item->getId()]); // Error in this line
    $session_flag = 1;
    $sess_qty += $s_qty;
}
?>
<input type="hidden" value="<?php if($s_qty > 0) { echo $s_qty; } else { echo $_qty; }  ?>" />

I added below code in begining , but it did't worked for me.

if( !isset($s_qty)) $s_qty = '' ;


texts:
I have a headless Magento2 instance i.e magento serves as backend for an IOS app , So i want to disable access to frontend website and keep the access to REST APIs . I am using ngnix and magento 2.2.3 community .

I was going to implement a plugin to frontcontoller action to redirect to some external , is this the best way to do it ?


texts: Magento 2.3 CSS inlining error: DOMXPath::query() Invalid expression in selector >> .fotorama__wrap:not(.fotorama__wrap--toggle-arrows)

texts:
I am getting this error in Magento 2.3. Error occurs with every email sent.

CSS inlining error: DOMXPath::query(): Invalid expression in selector >> .fotorama__wrap:not(.fotorama__wrap--toggle-arrows) .fotorama__fullscreen-icon << in /var/www/html/magento2/vendor/pelago/emogrifier/src/Emogrifier.php on line 502

I have tried this method:

adding this file in app/design/frontend/VendorTheme/default/web/css/email.less

@import 'source/lib/email/stand/_lib.less'; // Global lib
@import 'source/lib/email/stand/variables/_email.less'; // Global email variables

I have also tried adding

"pelago/emogrifier": "1.0.0 as 0.1.1" in composer.json


texts: Magento profiler, manually output selected profiles

texts: How do we manually output profiler results? For example if we wanted to output just few keys/sections? Right now when we switch on the profiler it will output all sections.


texts: Magento 2 Equivalent for Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID)

texts:
I'm using following code:-
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID)
Same code I want to use for Magento2, how can I achieve?


texts: My magento site is 1.9 version. We upgraded the php version to 7.4. After upgrading php version most of the pages in the website coming as 404 error only for particular one store. Any idea on this why it is getting.


texts: Magento 2.2.2 site loading speed is very slow

texts:
I am using Magento 2.2.2 EE nginx + varnish + cdn still site is loading very slow for the very first time when I flush the cache from terminal using command 'php bin/magento cache:flush' or from backend under cache management.

If you guys have any Idea please share

Any help will be appreciated


texts: Magento 2: Can't select "categories" on cart pricerule

texts:
I have try to make a price rule in Magento 2. But I can't see the option "categories".

Someone know where I can activate it? Or did i do something wrong?


texts: Magento captcha not showing png file created

texts:
I've inherited this site from someone else. I had to install it into a sub-directory on a go daddy server.  Not sure where it came from. We have a customer registration form with a captcha that is not showing the .png file.  I have set the permissions to all folders that go to that file to 777.  When I view source code the path is correct and there is an image in that folder that was just created, but when I copy and paste the url path to the captcha image in the browser I receive a 500 internal server error.

Here's the form

http://wheybetterguard.com/wheybetterguard/shop/index.php/customer/account/create/

So I can see in the directory that the captcha image is created on page load example: http://wheybetterguard.com/wheybetterguard/shop/media/captcha/base/969f1d56057653feab9e8d392a11efd2.png

Everything seems to be working correctly except that the image is breaking for some reason.

Please help.


texts:
I've just started working on Magento 2. I created my first custom attribute for the customer entity and now i would like to create a test for it. As far as i understand it, this should be an integration test and not a unit test.

But anyway what i want do to is test if the attribute is actually created for the entity. Could someone please explain to me if this is even a good practise, if so can someone hook me up with an example?


texts: Magento2 Custom payment method not display in checkout page

texts:
test\demo\view\frontend\web\js\view\payment\method-renderer.js

define(
    [
        'uiComponent',
        'Magento_Checkout/js/model/payment/renderer-list'
    ],
    function (
        Component,
        rendererList
    ) {
        'use strict';
        rendererList.push(
            {
                type: 'webpay',
                component: 'test_demo/js/view/payment/method-renderer/webpay-method'
            }
        );
        /** Add view logic here if needed */
        return Component.extend({});
    }
);

also test\demo\view\frontend\web\js\view\payment\method-renderer\webpay-method.js

/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
/*browser:true*/
/*global define*/
define(
[
    'jquery',
    'Magento_Checkout/js/view/payment/default',
    'Magento_Checkout/js/action/place-order',
    'Magento_Checkout/js/action/select-payment-method',
    'Magento_Customer/js/model/customer',
    'Magento_Checkout/js/checkout-data',
    'Magento_Checkout/js/model/payment/additional-validators',
    'mage/url',
],
function (
    $,
    Component,
    placeOrderAction,
    selectPaymentMethodAction,
    customer,
    checkoutData,
    additionalValidators,
    url) {
        'use strict';

        return Component.extend({
            defaults: {
                template: 'test_demo/payment/webpay'
            },
            placeOrder: function (data, event) {
                if (event) {
                    event.preventDefault();
                }
                var self = this,
                    placeOrder,
                    emailValidationResult = customer.isLoggedIn(),
                    loginFormSelector = 'form[data-role=email-with-possible-login]';
                if (!customer.isLoggedIn()) {
                    $(loginFormSelector).validation();
                    emailValidationResult = Boolean($(loginFormSelector + ' input[name=username]').valid());
                }
                if (emailValidationResult && this.validate() && additionalValidators.validate()) {
                    this.isPlaceOrderActionAllowed(false);
                    placeOrder = placeOrderAction(this.getData(), false, this.messageContainer);

                    $.when(placeOrder).fail(function () {
                        self.isPlaceOrderActionAllowed(true);
                    }).done(this.afterPlaceOrder.bind(this));
                    return true;
                }
                return false;
            },

            selectPaymentMethod: function() {
                selectPaymentMethodAction(this.getData());
                checkoutData.setSelectedPaymentMethod(this.item.method);
                return true;
            },

            afterPlaceOrder: function () {
                window.location.replace(url.build('test/test/redirect/'));
            },
            /** Returns send check to info */
            getMailingAddress: function() {
                return window.checkoutConfig.payment.checkmo.mailingAddress;
            }
        });
    }
);


texts:
One client asked to internationalize a magento 2.2.3 store adding other two languages (English and Spanish).
The current website is on production since April with only the default language and store view (Italian).
I'm studying how to internationalize a magento store since it is the first time, but I have some doubts.
I found some articles on the web and it is clear that I need to create the store views, download the language packages and then translate the contents.

https://support.weltpixel.com/hc/en-us/articles/115006305808-How-to-create-a-Multi-Language-Store-in-Magento-Tutorial

https://inchoo.net/magento-2/magento-2-create-multilanguage-store/

https://inchoo.net/magento-2/magento-2-administration/create-multi-language-store-magento-2-part-2/

How to handle the current store view ?
It is necessary to add the it code to the italian view?
If yes, How to handle the old urls (without the store code).


texts: How to create a script to export all products images in csv programmatically in Magento 2

texts: Magento2 how to developed custom script export for list of all product images with associated sku, Alt-Text, Image path,Image size please if anyone creates the script to share with me as soon as possible


texts: Magento 2 Custom Product type is missing "Configurations" button

texts:
I'm creating a custom product type. I want it to function almost exactly like a Configurable Product. I am able to create a new product type, but it is missing the "Configurations" button in the admin panel which allows me to create variations.

Can anyone help me add the "Configurations" functionality to this product type?

Here's what's been done so far:

Vendor/Module/etc/product_types.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/product_types.xsd">
    <type name="custom_product_type_code" label="Custom Product Type Label" modelInstance="Vendor\Module\Model\Product\Type">
    </type>
    <composableTypes>
        <type name="custom_product_type_code" />
    </composableTypes>
</config>

Vendor/Module/Model/Product/Type.php

<?php

namespace Vendor\Module\Model\Product;

class Type extends \Magento\ConfigurableProduct\Model\Product\Type\Configurable
{
    const TYPE_ID = 'custom_product_type_code';

    /**
     * {@inheritdoc}
     */
    public function deleteTypeSpecificData(\Magento\Catalog\Model\Product $product)
    {
        // method intentionally empty
    }
}

Vendor/Module/Setup/InstallData.php

<?php

namespace Vendor\Module\Setup;

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{
    /**
     * EAV setup factory
     *
     * @var EavSetupFactory
     */
    protected $eavSetupFactory;

    /**
     * Init
     *
     * @param EavSetupFactory $eavSetupFactory
     */
    public function __construct(EavSetupFactory $eavSetupFactory)
    {
        $this->eavSetupFactory = $eavSetupFactory;
    }

    /**
     * {@inheritdoc}
     */
    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        /** @var EavSetup $eavSetup */
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);

        //associate these attributes with new product type
        $fieldList = [
            'price',
            'special_price',
            'special_from_date',
            'special_to_date',
            'minimal_price',
            'cost',
            'tier_price',
            'weight',
        ];

        // make these attributes applicable to new product type
        foreach ($fieldList as $field) {
            $applyTo = explode(
                ',',
                $eavSetup->getAttribute(\Magento\Catalog\Model\Product::ENTITY, $field, 'apply_to')
            );
            if (!in_array(\Vendor\Module\Model\Product\Type::TYPE_ID, $applyTo)) {
                $applyTo[] = \Vendor\Module\Model\Product\Type::TYPE_ID;
                $eavSetup->updateAttribute(
                    \Magento\Catalog\Model\Product::ENTITY,
                    $field,
                    'apply_to',
                    implode(',', $applyTo)
                );
            }
        }
    }
}


texts: Search child(associates) configurable product

texts:
now I created configurable product including many simple product, each simple has own SKU. but once user search on website, they only search configurable product SKU can't find associates SKU.

In case I want user can search all associates SKU and showing result as configurable product is it possible to do ?

because when I set simple visible to "search", it work but it show product as simple.

ex: I have 1 configuration SKU "test0" including 3 simple which are "test1, test2, test3"

now when user search weather "test1 or test2 or test3" it must show "test0" as result

Can I set this result by default magento system?
Thanks so much


texts: How to make nested select statements in Magento

texts:
I have two tables in the magento one is notification and once is notification_customer i have to take the items from the notification table if there is no entry for that user and notification item in the notification customer table.

Table structure of notification table

nid name ....

Table structure of notification_customer table

nrid nid cid


texts: How to access a variable declared in a phtml from another phtml?

texts:
I have inserted two blocks in the catalog_product_view.xml file:

<block class="Magento\Catalog\Block\Product\View" name="product.info.custom-product-attributes" template="product/view/custom-product-attributes.phtml" after="product.info.overview"/>
...
<block class="Magento\Catalog\Block\Product\View" name="product.info.custom-estimated-delivery" template="product/view/custom-estimated-delivery.phtml" after="product.price.final"/>

How can I access a variable declared in the first block from the second block?


texts:
I am using Magento 2.4.1 with PHP 7.4
I am unable to view paging inside the category view page.
By debugging the code I found that inside
vendor/magento/module-catalog/view/frontend/templates/product/list/toolbar.phtml
This method <?php if ($block->getCollection()->getSize()) :?> not working and returning Zero result.
So I replaced this with <?php if (count($block->getCollection())) :?>
Now toolbar is showing like below and showing 0 items

Also inside  vendor/magento/module-catalog/view/frontend/templates/product/list/toolbar/amount.phtml
this method  <?php if ($block->getLastPageNum() > 1) :?> returns Zero result.
The main issue is paging not showing.


texts: I'm trying to apply a discount if the payment method is an option, and it's not being applied, if I remove this payment rule the coupon works correctly, but if I select some form of payment, it will stop working


texts: latest changes not update immediatly in PWA studion theme

texts: while working with PWA studio venia theme, if we update anything in admin like add a new category or add new product those are not effecting in PWA studio theme instance is there any way that our changes direct reflect on PWA venia theme


texts:
I have installed Magento 1.9. It was working well for a week. Suddenly yesterday, when I tried to log in to the Magento admin panel and I typed username and password, clicked the Login button and nothing happened. The page refreshes and that’s all. No error or any other messages.
If I entered the wrong username or password, It shows an error.
After I googled about this issue, I was recommended to comment the following lines in:

app\code\core\Mage\Core\Model\Session\Abstract\Varien.php

/* to solve login issue */
  /*if (!$cookieParams['httponly']) {
  unset($cookieParams['httponly']);
  if (!$cookieParams['secure']) {
  unset($cookieParams['secure']);
  if (!$cookieParams['domain']) {
  unset($cookieParams['domain']);
  }
  }
  }

if (isset($cookieParams['domain'])) {
  $cookieParams['domain'] = $cookie->getDomain();*/ //I have commented these lines

And for some older versions below was recommended in the same file.
$cookieParams = array(
    'lifetime' => $cookie->getLifetime(),
    'path'     => $cookie->getPath(),
    //'domain'   => $cookie->getConfigDomain()
    //'secure'   => $cookie->isSecure(),
    //'httponly' => $cookie->getHttponly()
);
  }*/

Even after that, I could not log in to admin. It is as it was.
Did anyone face this issue? Is there any other solution to this issue?
(I tried clearing cache and session through FTP).


texts: Add filter to custom grid created as ui_component

texts:
I rephrased my question and got it working (adding filters to a custom grid, that was made with a custom data provider). See question and answer here:
Create filterable admin grid from external database table


texts: Assigning multiple sizes to one product SKU

texts:
We sell shoes online.  Some shoes come in European sizes (37, 38, 39 etc.) while others come in U.S sizes of 7, 8, 9 etc.

We have a search option whereby shoppers can select to view only shoes in their size.  We would like to ensure that if a woman selects for example a size 8 that all SKUs with a European size of 38 is also displayed in the results.

Any suggestion of how best to do this in Magento?  Can this be accomplished using tags or the custom options attribute or something else?


texts: Magento 2: Custom Module's Frontend Controller not calling layout

texts:
Below is URL to access

{site url}/magento2/module/mymodule/new

{folder path}\magento2\app\code\Custom\Module\Controller\MyModule\NewAction.php

namespace Custom\Module\Controller\MyModule;

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

/**
 * @var \Magento\Framework\App\Cache\TypeListInterface
 */
protected $_cacheTypeList;

/**
 * @var \Magento\Framework\App\Cache\StateInterface
 */
protected $_cacheState;

/**
 * @var \Magento\Framework\App\Cache\Frontend\Pool
 */
protected $_cacheFrontendPool;

/**
 * @var \Magento\Framework\View\Result\PageFactory
 */
protected $resultPageFactory;

/**
 * @param Action\Context $context
 * @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
 * @param \Magento\Framework\App\Cache\StateInterface $cacheState
 * @param \Magento\Framework\App\Cache\Frontend\Pool $cacheFrontendPool
 * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
 */
public function __construct(
\Magento\Framework\App\Action\Context $context, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList, \Magento\Framework\App\Cache\StateInterface $cacheState, \Magento\Framework\App\Cache\Frontend\Pool $cacheFrontendPool, \Magento\Framework\View\Result\PageFactory $resultPageFactory
) {
    parent::__construct($context);
    $this->_cacheTypeList = $cacheTypeList;
    $this->_cacheState = $cacheState;
    $this->_cacheFrontendPool = $cacheFrontendPool;
    $this->resultPageFactory = $resultPageFactory;
}

/**
 * Flush cache storage
 *
 */
public function execute() {

    $this->_view->loadLayout();
    $this->_view->getLayout()->initMessages();
    $this->_view->getPage()->getConfig()->getTitle()->set(__('Test Post'));
    /** @var \Magento\Framework\View\Result\Page $resultPage */
    $resultPage = $this->resultPageFactory->create();

    return $resultPage;
}

}

{folder path}\magento2\app\code\Custom\Module\view\frontend\layout\module_mymodule_new.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block class="Magento\Framework\View\Element\Template" name="custom_module_post_form"
                   template="Custom_Module::index.phtml" />
        </referenceContainer>
    </body>
</page>

When u run URL on my WAMP it shows blank page. It's not calling layout file from controller.


texts:
Even though we have some similar questions here, there is none that could help me.

How can I edit the entirety of the search results page?

I want to be able to change this image for another, change few texts, structures.

And why this isn't one of the pages you can edit through  the admin view? this doesn't make any sense

Appreciate the help