texts: Magento 2 Fresh Install Showing 'Whoops, our bad...' 404 page not found

texts:
After install very fresh Magento 2, I am seeing Whoops, our bad... (404 Not Found) in all pages. Screenshot:

I am using Linux Mint OS.
Here is my steps:

Installed Apache version is apache2 -v:

Server version: Apache/2.4.41 (Ubuntu)
Server built:   2020-08-12T19:46:17

Checked PHP Version: PHP 7.4.18 (cli) (built: May  3 2021 11:27:06) ( NTS )
Did execute: sudo apt-get install curl wget gnupg
Checked MySQL Version: mysql  Ver 8.0.25-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
Checked composer version: Composer version 2.0.7 2020-11-13 17:31:06
Did execute the following commands:

sudo apt-get install php7.4-intl
sudo apt-get install php7.4-soap
sudo apt install php7.4-bcmath
sudo apt install php7.4-xsl

sudo apt install php7.4-ctype
sudo apt install php7.4-dom
sudo apt install php7.4-gd
sudo apt install php7.4-iconv
sudo apt install php7.4-mbstring
sudo apt install php7.4-simplexml
sudo apt install php7.4-zip
sudo apt install php7.4-libxml

sudo service apache2 restart

Installed and Start elasticsearch
Download Magento 2 using composer, Did execute the following commands:

cd www/
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento-practice
cd magento-practice/
sudo chmod -R 777 ./

Created Database and installed the Magento 2:
php bin/magento setup:install --base-url=http://localhost/magento-practice --db-host=localhost --db-name=magento_practice \
--db-user=dbadmin --db-password=Qwerty \
--admin-firstname=admin --admin-lastname=admin --admin-email=shahalom@mcqacademy.com --admin-user=admin --admin-password=786Admin \
--language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1 \
--backend-frontname=adminn

Then also esecute the following commands:
sudo php -dmemory_limit=-1 bin/magento setup:upgrade
sudo php -dmemory_limit=-1 bin/magento setup:static-content:deploy -f
sudo php -dmemory_limit=-1 bin/magento indexer:reindex
sudo php -dmemory_limit=-1 bin/magento cache:clean
sudo php -dmemory_limit=-1 bin/magento cache:flush

sudo chmod -R 777 ./

Now edited the .htaccess From:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/pub/
RewriteCond %{REQUEST_URI} !^/setup/
RewriteCond %{REQUEST_URI} !^/update/
RewriteCond %{REQUEST_URI} !^/dev/
RewriteRule .* /pub/$0 [L]
DirectoryIndex index.php

Into:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/magento-practice/pub/
RewriteCond %{REQUEST_URI} !^/magento-practice/setup/
RewriteCond %{REQUEST_URI} !^/magento-practice/update/
RewriteCond %{REQUEST_URI} !^/magento-practice/dev/
RewriteRule .* /magento-practice/pub/$0 [L]
DirectoryIndex index.php

What I am doing wrong?


texts: What are the steps to build native apps for website powered by magento 2.x?

texts: What are the technical requirements for building android and ios apps for website powered by magento 2.x . I don't have a website ready yet but initial setup with sample data is done i.e luma store. How can we use magento's web services to make apps synchronous with website. I want detailed steps or reference here from where to start. How the website or magento 2 should be configured to work with mobile apps? As of now I know magento provides web services in REST and SOAP criterion. I want to make own native apps. Thanks in advance.


texts: Transfer guest order to customer account

texts: If a guest places an order without registering for an account and they register for a customer account at a later date, can the original order be linked to their customer account? If so, how can this be done in CE v1.9.2.1?


texts: Invalid URI supplied error when trying to clone a site to localhost

texts:
I'm trying to clone a copy of a production site to run on MAMP. I've downloaded all the site's files (a whopping 4+GB) and took a copy of the database. I ran a searhc and replace on the production URL to use the localhost URL e.g 127.0.0.1/magento (no underscores in it).

I updated the local.xml to use the local copy of the database.

I'm nowhere near a Magento expert but offered to install a new theme with some small CSS updates for a friend so any help would be very much appreciated as I wasn't planning on spending hours getting a clone of the site to work.

One thing I did notice, and the link doens't work, is that the link to the error report has the port listed in it twice for some reason http://127.0.0.1:8888:8888/magento/errors/report.php?id=489737565032&skin=default


texts:
I just updated form magento 1.7 to 1.9 and everything on my front end is working perfect. The only problem i have encountered is when i came to re-indexing my catalogue search index and a extension called "Lucene Search Index" it isnt timing out all it is saying is that
"There was a problem with reindexing process." also it is unsuccessfully with the SSH reindexing.

Please help if you can, Thank you

**If you need me to put up the errors form the SSH just comment and ask as it is very long so didnt want the post to be to overwhelming **


texts: How can i add block to existing layout in catalog_category_view.xml?

texts:
I want change layout of catalaog_category_view.xml but i can't. I override block category.products and it's work but how can i add my own block to existing category.products block? Because i want add my own element above of category.products element. I was trying add block and move element, add to referenceContainer content and move before category.products and nothing happened. Still the same page exists. Can you help me how can i add block inside category.products or above category.products.

            <block class="Magento\Catalog\Block\Category\View" name="category.products" template="Magento_Catalog::category/products.phtml">
            <block class="Magento\Catalog\Block\Product\ListProduct" name="category.products.list" as="product_list" template="Magento_Catalog::product/list.phtml">
                <container name="category.product.list.additional" as="additional" />
                <block class="Magento\Framework\View\Element\RendererList" name="category.product.type.details.renderers" as="details.renderers">
                    <block class="Magento\Framework\View\Element\Template" name="category.product.type.details.renderers.default" as="default"/>
                </block>
                <block class="Magento\Catalog\Block\Product\ProductList\Item\Container" name="category.product.addto" as="addto">
                    <block class="Magento\Catalog\Block\Product\ProductList\Item\AddTo\Compare"
                           name="category.product.addto.compare" as="compare"
                           template="Magento_Catalog::product/list/addto/compare.phtml"/>
                </block>
                <block class="Magento\Catalog\Block\Product\ProductList\Toolbar" name="product_list_toolbar" template="Magento_Catalog::product/list/toolbar.phtml">
                    <block class="Magento\Theme\Block\Html\Pager" name="product_list_toolbar_pager"/>
                </block>
                <action method="setToolbarBlockName">
                    <argument name="name" xsi:type="string">product_list_toolbar</argument>
                </action>
            </block>
        </block>

This is block category.products from Magento_Catalog. I want add my block above this one:

 <block class="Magento\Catalog\Block\Category\View" name="category.products" template="Magento_Catalog::category/products.phtml">

Or:

            <block class="Magento\Catalog\Block\Category\View" name="category.products" template="Magento_Catalog::category/products.phtml"><!-- Before category.products.list -->
            <block class="Magento\Catalog\Block\Product\ListProduct" name="category.products.list" as="product_list" template="Magento_Catalog::product/list.phtml">

Anyone can help me? I will be really grateful!


texts: How to change the locale code for a theme in magento 2

texts:
I have a theme that will output all the static file to

pub\static\frontend\VendorName\thmemeName\fr_FR, but now i want to change it to pub\static\frontend\VendorName\thmemeName\en_US, What are the things i have to set ?


texts: to display text between horizontal line in magento

texts:
I want to display "text between horizontal line", so

i am  following this link :

https://stackoverflow.com/questions/16009654/horizontal-line-in-the-middle-of-text

but in our theme.css file, we already using ".span" & ".h2" classes.

if i use code in above link, it will apply for all the html codes which using these css classes : "span", "h2".

but i don't want that to be happen.

i am sure, this is magento topic as we are using lot of "h2" and "span" in magento, please close this question as "off topic"

give me some guidance.


texts: How can I upload SVG files as Magento product images?

texts:
I would like to add SVG files as product images.

How can I accomplish that?

I saw Magento 2 - upload SVG files but it changes core files and is for CMS.

edit

it's breaking in \Magento\Framework\File\Uploader::checkAllowedExtension -- question is how to influence the list of allowed types


texts: how to log actions used during an event in magento

texts:
Is there a way that we can log all those actions used during an event in magento.
Let say, while placing orders in onepage checkout, after placing order, there is one event fired at last 'sales_order_place_after', I wanted to trace all those actions being fired at and after this event.
I am trying this because I am trying to debug an issue- After an order is placed in my magento site, admin user is getting logged out. My idea is saying that somewhere after order is placed, there must be some action clearing session, so I wanted to trace that action and check if its really clearing any session of there is some other root cause for the issue.


texts: How to insert a line in the file left.phtml?

texts:
I have a code and a part of it. But I do not know how to combine.
I try to show the subcategory of the category ID 3.

<?php echo $this->__('Меню') ?>

            <?php foreach ($_categories as $_category): ?>
                <?php if($_category->getIsActive()): ?>

                    <a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="current"<?php endif; ?>>
                        <?php echo $this->escapeHtml($_category->getName()) ?>
                        (<?php echo $_category->getProductCount() ?>)

                <?php endif; ?>
            <?php endforeach ?>

And this line:$categoryId = 3;
$category = Mage::getModel('catalog/category')->load($categoryId);
$childrenCategories = $category->getChildrenCategories();


texts: How to fix Magento 2 2.0.0-RC Admin page not found after installation

texts:
It's a fresh new install with a clean database.
I checked the values from Magento 2 : Error 404 not found at magento 2 admin login page and it's fine too.

Also tried to access it via /index.php/admin as suggested by All of the buttons/links including admin login shows error 404 not found 1, how to fix this problem? but still not found.

During the setup process, I specified "admin" as url.

Front end is working.

Someone can help?


texts: How do I find the content of getChildHtml('example')?

texts:
In my theme's header.phtml, it makes a call to getChildHtml('header.links'). I am at a total loss as to where header.links exists. I need to modify that file.

Firstly, is it a phtml file, or a block in the backend?

Secondly, what method can I employ to consistently discover where the content of the call resides?

Finally, does the dot notation (e.g., 'one.two') affect which block is being called, and if so, how?


texts: Search Criteria not working with Soap API

texts:
Description:

I am working with Soap API on Magento 2, I am trying to get a filtered list of all products on my store using the following code.

P.S: I have tried to filter other fields like Sku,Id and Name

Problem:

No matter how I change the search criteria array, It keeps returning the complete list of  unfiltered products.

Any Idea on what I am doing wrong?

        $wsdlurl = 'http://example.com/index.php/soap/default?wsdl&services=catalogProductRepositoryV1';

        $token = 'livutybnnlu6b6bhuvtr86f93p5khgjb';

        $opts = ['http' => ['header' => "Authorization: Bearer ".$token]];
        $context = stream_context_create($opts);

        $soapClient = new \Zend\Soap\Client($wsdlurl);
        $soapClient->setSoapVersion(SOAP_1_2);
        $soapClient->setStreamContext($context);

        $serviceArgs = array('searchCriteria'=>
                                    array('filterGroups' =>
                                        array('filters' =>
                                            array('field' => 'typeId',
                                                   'value' => 'downloadable',

                                                   )
                                                 )
                                               )
                                             );

        $result = $soapClient->catalogProductRepositoryV1GetList($serviceArgs );
        echo var_dump( $result->result->items);


texts: What Are the Final Production File Permissions for Magento 2.0.6

texts:
pretty much what the title says

the link at the bottom of this page
http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-install.html

for file permissions doesnt work

there is something about file permissions in the update

I fish out what the link goes to and i guess it is supposed to go here

http://devdocs.magento.com/guides/v2.0/install-gde/prereq/file-system-perms.html

where this is documentation on shared hosting, and dual user hosting, but i run a private server, and the documentation has 0 to go on even though it says there is a spot on that page for it


texts: Javascript mixin issues - base is not a constructor

texts:
I ran into an interesting issue while trying to create a mixin for a 3rd party JS script. I created the mixin in the normal way with my requirejs-config.js like this:
let config = {
    config: {
        mixins: {
            'Amasty_Storelocator/js/location-view': {
                'Amasty_Storelocator/js/location-view-mixin': true
            }
        }
    }
};

And my mixin file like this:
define([
    'jquery',
    'domReady!'
], function($) {
    "use strict";
    return function (widget) {
        $.widget('mage.amLocationPage', widget, {
            initializeGallery: function () {
                $('[data-amlocator-js="locator-gallery"]').slick({
                    infinite: false,
                    slidesToShow: 1,
                    slidesToScroll: 1
                });
            }
        });
        return $.mage.amLocationPage;
    }
});

But when doing this i get the error:

Uncaught TypeError: base is not a constructor

This is pointing the jQuery Ui widget file that looks to define any widget with $.widget = function (name, base, prototype).
When i change the file like this:
$.widget('mage.amLocationPage', $.mage.amLocationPage, {}

The error goes away and my mixin works just fine. But i don't know why this is happening. I have used plenty of mixins without $.mage.amLocationPage before. Any ideas why this happening in this use case?


texts: is Magento2 Module structure case sensitive?

texts:
First of all, I am using the devbox and I've set the phpstorm as in the docu (remote php and phpunit). Then I have a project in magento2/app/code/Company inside I have a framework folder. And all the tests under Framework folder are running (also the composer.json and registration.php are set correctly).

Now my question:
when I try to rename the folder from Company to company and Framework to framework to look like the magento framework in magento2/vendor/magento/framework(all small written) the test don't run anymore. My namespaces are still: "Company\Framework" in composer.json file in all files.

Does that mean that I have to change the whole namespaces? Whereas magento still uses Magento\Framework in namespaces. What am I missing and why by Magento that works?


texts: Migrating from Magento-1 to Magento-2 (while keeping the layout)

texts:
I have developed a separate instance of a website on Magento 2 which uses a different layout. I would now like to move all of the information for the main website (Magento 1.9.1) to the new Magento 2.

Importing only the database doesn't work since there are differences in the modules and some of them cannot be removed from "Required".

Basically I need to move the whole installation, while somehow keeping the layout/modules on the secondary domain (the Magento 2).

Is this possible and if so, how can it be done?


texts: Magento 2.3 get row subtotal transactional email

texts:
I want to load row subtotal inside the invoice transactional email.

Therefore I changed the following file (/app/design/frontend/Theme/Theme/Magento_Sales/templates/email/items/invoice/default.phtml)

And added the following: <?php echo $_item->getRowTotal();?>

But this does not work and does not load the row subtotal.

How can I get the row subtotal inside the invoice e-mail?


texts:
I install Magento about 2-3 weeks ago. I've been using it for a few months in work and decided to start a new project store with it.

Then today i went to login and my username / password appeared to be wrong. I got no errors.. just refreshed to the same login screen.

I thought it might be my password so I did the forgot email thing and got the email to reset my password and I entered a new one and it still won't let me  login.

I'm using the same PC as I also do to work. What can be wrong ?

I'm using Magento 1.9.3.7

EDIT--
I just looked at the error logs and this is appearing over and over

    [26-Feb-2018 11:47:01 UTC] PHP Fatal error:  Uncaught exception 'Zend_Db_Adapter_Exception' with message 'The PDO extension is required for this adapter but the extension is not loaded' in /home/*****/**domain**.com/store/lib/Zend/Db/Adapter/Pdo/Abstract.php:344
Stack trace:
#0 /home/*****/**domain**.com/store/lib/Zend/Db/Adapter/Abstract.php(248): Zend_Db_Adapter_Pdo_Abstract->setFetchMode(2)
#1 /home/*****/**domain**.com/store/app/code/core/Mage/Core/Model/Resource.php(175): Zend_Db_Adapter_Abstract->__construct(Array)
#2 /home/*****/**domain**.com/store/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#3 /home/*****/**domain**.com/store/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
#4 /home/*****/**domain**.com/store/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
#5 /home/*****/**domain**.com/st in /home/*****/**domain**.com/store/lib/Zend/Db/Adapter/Pdo/Abstract.php on line 344


texts: Magento 2 - Allow custom shipping method only for onepage checkout customers

texts:
is it possible to display a custom shipping method option only to customers using the one page checkout method? In other words I do not want to display my shipping method if the "Ship to multiple addresses" option is selected. I have tried to look to the collectRates function to add logic there, but I am not sure how to determine whether one page checkout is being used or not?

Any help or advice would be appreciated.

Code I have for the collectRates method:

public function collectRates(RateRequest $request)
  {

    // Check if postcode is allowed
    if (!$this->isActive() || !$this->postcodeValidate($request->getDestPostcode()))
    {
        return false;
    }

    $result = $this->_rateResultFactory->create();
    $shippingPrice = $this->getConfigData('price');

    $method = $this->_rateMethodFactory->create();

    $method->setCarrier($this->getCarrierCode());
    $method->setCarrierTitle($this->getConfigData('title'));

    $method->setMethod($this->getCarrierCode());
    $method->setMethodTitle($this->getConfigData('name'));

    $method->setPrice($shippingPrice);
    $method->setCost($shippingPrice);

    $result->append($method);
    return $result;
  }


texts: Applying Magento 2 library tooltip to custom theme

texts:
There isn't really a lot of questions about tool tips in Magento. I'm hoping someone can help me from pulling my hair out over this one.

I'm looking to have a simple tool tip pop up with some content I have in a theme I'm creating.

I've created a custom template in my Magento theme that calls a config setting, I've implemented the necessary code into my default.xml to display the text that shows in that config field in the back end. For this examples, lets say it says "FREE shipping". There are no problems here.

  app/design/frontend/VENDOR/MY_THEME/Magento_Theme/templates/config_headergroup.phtml

    <?= $block->getConfig()->getValue('cpanelsection/headergroup/top_header_notification') ?>

I would like when they hover over the text they get a tooltip that pops up and gives them more info on that specific text box.

I've seen and played around with the tooltip library that comes with Magento 2, I assumed it would be easy to just have a tool tip but for some reason, I can't get it to show up.

I've removed the mobile class for this but this is the default tooltip.less file located in

  vendor/magento/theme-frontend-blank/web/css/source/_tooltips.less

.tooltip.wrapper {
    .lib-tooltip(
    @_tooltip-position: bottom,
    @_tooltip-selector-content: ~'.tooltip.content',
    @_tooltip-selector-toggle: ~'tooltip.toggle'
    );

    .tooltip.content {
        dl {
            margin-bottom: 0;
        }

        dd {
            white-space: normal;
        }

        .subtitle {
            display: inline-block;
            font-size: 16px;
            font-weight: 500;
            margin-bottom: 15px;
        }

        .label {
            margin-top: @indent__s;

            &:first-child {
                margin-top: 0;
            }
        }

        .values {
            margin: 0;
        }
    }
}

.ui-tooltip {
    position: absolute;
    z-index: 9999;
}

So my assumption is that if I format my template like this:

    <?= $block->getConfig()->getValue('cpanelsection/headergroup/top_header_notification') ?>

            Popup tool tip for more information about this text here

It does not work though.

Attempts to making it work:

1) I've tried also mimicking from another template from the Multishipping module, I've take from that template and re crested it with the same format with no luck.

2) I've even placed the less styling in my layout.less in my custom theme and tried that way but nothing I seem to do works.

3) I've even added in a plain HTML part in my theme in the template but that doesn't even work so I must be doing somethign wrong and not caling it completely?

TESTING

Read more about that here in the popup tooltip

I've been clearing my cache every time I make a change, so it can't be that.

Does anyone have some ideas a to what I'm doing wrong? Am I not understanding how tool tips work?

UPDATE:

Dava Gordon was able to help me out and it works no problem with the template I was adding but I can't seem to get it to work on the $welcomeMessage in the header.phtml

                <?= $block->escapeHtml($welcomeMessage) ?>
                This is a config setting that can be easily changed to anything you would like in your theme settings

Is there something additional I have to do for this script?


texts: How to fix "Direct use of $_SERVER Superglobal detected' in Magento 1

texts:
Using the $_SERVER super global in an extension causes the following guideline error

Direct use of $_SERVER Superglobal detected

I know the alternative for Magento 2 but how do you solve this for Magento 1?


texts: Magento 2 error in swatchRenderer.js at 'updateData' property

texts:
I have this error in category page. When i change color from swatch option it star loading in product image container and shows error in SwatchRenderer.js

here is the error:

Uncaught TypeError: Cannot read property 'updateData' of undefined
at $.(anonymous function).(anonymous function).processUpdateBaseImage (http://127.0.0.1/magentoblank/pub/static/version1515737320/frontend/jtuser/customtheme/en_US/Magento_Swatches/js/swatch-renderer.js:1168:25)
at $.(anonymous function).(anonymous function).processUpdateBaseImage (http://127.0.0.1/magentoblank/pub/static/version1515737320/frontend/jtuser/customtheme/en_US/jquery/jquery-ui.js:402:25)
at $.(anonymous function).(anonymous function).updateBaseImage (http://127.0.0.1/magentoblank/pub/static/version1515737320/frontend/jtuser/customtheme/en_US/Magento_Swatches/js/swatch-renderer.js:1137:22)
at $.(anonymous function).(anonymous function).updateBaseImage (http://127.0.0.1/magentoblank/pub/static/version1515737320/frontend/jtuser/customtheme/en_US/jquery/jquery-ui.js:402:25)
at $.(anonymous function).(anonymous function)._ProductMediaCallback (http://127.0.0.1/magentoblank/pub/static/version1515737320/frontend/jtuser/customtheme/en_US/Magento_Swatches/js/swatch-renderer.js:1103:18)
at $.(anonymous function).(anonymous function)._ProductMediaCallback (http://127.0.0.1/magentoblank/pub/static/version1515737320/frontend/jtuser/customtheme/en_US/jquery/jquery-ui.js:402:25)
at Object.mediaSuccessCallback [as success] (http://127.0.0.1/magentoblank/pub/static/version1515737320/frontend/jtuser/customtheme/en_US/Magento_Swatches/js/swatch-renderer.js:981:29)
at i (https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js:2:27449)
at Object.fireWith [as resolveWith] (https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js:2:28213)
at y (https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js:4:22721)

i am using custom jquery.min file and created one custom slider with sly.js hope it will help you to understand my issue well.

TIA


texts: Magento 1.9.1.0 Deadlock error when saving a product in backend

texts:
When we try to save the product via backend, we are getting the following error

  SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try
  restarting transaction, query was: INSERT INTO index_process_event
  (process_id,event_id,status) VALUES (?, ?, ? ) ON DUPLICATE KEY
  UPDATE status = VALUES(status)

We checked in database to see any sleeping queries (SHOW PROCESSLIST). But we couldn't find any.

Does anybody came through these types of issues?


texts: Get reviews by SKU and id using SQL query in Magento 2?

texts:
I want a SQL query to get product reviews by SKU using Magento2 for example,
It should contain,
SKU,id,title,discription,name

Please help me someone for the same.
since I am new to Magento 2.


texts: How to set widget on home page full width instead of full bleed?

texts: My page widget showing full width, if my screen size 25%, how to to make it center, so that makes my widget full width not feull bleed.


texts: Magento REST API: Invalid webservice adapter specified

texts:
I just started Magento integration.

I looked at some related questions around the cloud with regards to my concern but I don't find any fitted answer since Im using IIS 7.5.

My current config is:

<system.webServer>
    <defaultDocument>
        <files>
            <add value="index.php" />
        </files>
    </defaultDocument>
    <rewrite>
        <rules>
            <clear />
            <rule name="Rewrite to api.php" stopProcessing="true">
                <match url="^api/rest(.*)$" />
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                </conditions>
                <action type="Rewrite" url="api.php?type=rest/{R:1}" />
            </rule>
            <rule name="REMOVE INDEX.PHP" stopProcessing="true">
                <match url="/index.php/(.+)$" negate="true" />
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                </conditions>
                <action type="Rewrite" url="/index.php/{R:1}" />
            </rule>
        </rules>
    </rewrite>
</system.webServer>

Do you have any idea/answer why I'm getting "Invalid webservice adapter specified." every time I visit "http://magentohost/api/rest/customers" on my browser?


texts: REST API - Add same item with different custom options to cart in Magento 2.1

texts:
I'm adding products to cart via REST API. I NEED to add the same product but with different options, However, when I post the 2nd request, The 2nd product is not added as new order item, but only the quantity is increased. looks like Magento is not considering the different options product as a separate item, rather, it just compares the SKU and adds the quantity regardless of the options.

is there a way to make Magento add multiple instances of the same SKU item (with different options) as separate items?

below is how the items of the order differ

   {
        "name": "product 1",
        "sku": "ABC",
        "qty": 1,
        "product_option": {
          "extension_attributes": {
            "custom_options": [
              {
                "option_id": "color",
                "option_value": "blue"
              }
            ]
          }
        }

    }

   {
        "name": "product 2",
        "sku": "ABC",
        "qty": 3,
        "product_option": {
          "extension_attributes": {
            "custom_options": [
              {
                "option_id": "color",
                "option_value": "red"
              }
            ]
          }
        }

    }


texts: Magento 2 EE (2.3.3) Gift card balance: Gift card Balance should be retained when the user cancels the transaction, Currently, it shows 0

texts:
Actual bug:
Gift card balance: Gift card Balance should be retained when the user cancels the transaction, Currently, it shows 0. [Eg. The order amount is 100 KWD and applied GV has 20 KWD then after the transaction gets canceled by canceling or clicking the browser back, the Gift card amount shows as 0.
Anyone?
Thanks


texts:
I am using magento 2.3.5, But on my website Gmail emails are not working, if i am using gmail for placing order or anything on my website, but i cannot receive email. If i am using any other email that's working fine. Now i have installed this Mage Plaza SMTP Extension But now i am getting this error, can you please check why i am getting this error or how to i can fix gmail issue on my website.

Extension link: https://github.com/mageplaza/magento-2-smtp#user-guide
Thanks


texts: How do I use multiple currencies for payments?

texts:
I know that Magento uses Base Currency and Display Currency for different purposes. Display Currency is just for the front-end and it can use Magento Conversion Rates to convert the prices automatically. Base Currency is used to process payments and this is the information sent to PayPal or other payment gateways. More info here.

For example: You can have 2 websites, both using US Dollar as Base Currency. And one of them you change the Display Currency to Canadian Dollar and set a conversion rate for that. The Canadian website will convert product prices to show it in Canadian Dollar, but once the user go to checkout, the currency used will be the Base Currency (US Dollar).

The only solution I found is to have a Base Currency for each website, but then you need to set the product price for each website as well.

In our case, we have more than 1,000 products and 4 different currencies. So, I would need to set the US Dollar price, Canadian Dollar price and any other currency for each product and this is a huge work.

Is there a way to make this work of setting different currency prices for products easier? Or is there another solution to my problem? (Send the display currency to the payment gateway).


texts: Newsletter: Adding subscriber's firstname into template

texts:
I am trying to add my Newsletter Subscribers' First Name into the newsletter template in order to personalise it.
(By default Magento doesn't have space for a subscriber to insert his/her name, in the front end but I installed an extension that adds this functionality, so I have all the subscribers' firt and last names in the back-end at Newsletter->Newsletter Subscribers)

The newsletter's subscriber info definitely works separately from the registered users side of Magento and the keywords used for customer first name in transactional emails don't work for adding a subscriber's first name into the newsletter.

Does anyone know the keyword I need to use for this?


texts: I have tried to install Magento2 in my localhost and not able to success every time can you guys tell me if any proper tutorial available for installing Magento in Localhost ?


texts: Apply bindings and subscribe on change of discount amount totals.totals() in Magento 2

texts:
in my checkout page when promo code is applied, I am updating a text using some calculation using knockoutjs

In my checkout page, on applying and removing promo code, it changes the discount key in totals.totals().items.
How to apply bindings and subscribe in knockoutjs,
so that I can call my function which I am calling from my HTML.

  Magento_Checkout/web/template/summary/item/details.html

I have written above code in details.html

and my js is

  Magento_Checkout/web/js/view/summary/item/details.js

knockout js

  define([
   'uiComponent',
   'ko',
   'Magento_Checkout/js/model/totals'
    ], function (Component, ko, totals) {
   'use strict';
    var finalSaleData = window.checkoutConfig.items;

    return Component.extend({
     defaults: {
         template: 'Magento_Checkout/summary/item/details'
     },
    quoteItemData: quoteItemData,
    finalSaleData: finalSaleData,

    /**
     * @param {Object} quoteItem
     * @return {String}
     */

    getItems: function(item_id) {
        var itemElement = null;
        _.each(this.finalSaleData, function(element, index) {
            if (element.item_id == item_id) {
                itemElement = element;
            }
        });
        return itemElement;
    },
    getFinalSale : function (quoteItem) {
        var item = this.getItems(quoteItem.item_id);
        var temp_item = this.getTempItems(quoteItem.item_id);
        var tagText = '';

        if((((temp_item.price*temp_item.qty) - temp_item.discount_amount)/(item.base_old_price*temp_item.qty)) < 0.5){
            var tagText = 'Final Sale';
        }else{
            if(item.base_old_price && temp_item.price){
                // && item.price < item.price && item.base_old_price / item.price <= 0.5){
                if(((item.base_old_price - temp_item.price)/item.base_old_price)>0.5){
                    var tagText = 'Final Sale';
                }
            }
        }
        return tagText;
    },
  });
});

I am using var finalSaleData = window.checkoutConfig.items in my function getFinalSale.

How to make getFinalSale function run every time when window.checkoutConfig.items data is changed without refreshing the page.

1) How can i call getFinalSale on the change of totals.totals().items

2) The issue I am passing the $parent from my HTML and when the totals.totals().items the discount amount is changed for each item after applying promo code then how will I pass this $parent(quoteItem) from the very same js.

How to solve that.

The problem is, this runs only when the page reloads.

How to make getFinalSale function run every time the user applies promo code without refreshing the page so that my HTML gets updated too.

Basically Final Sale text needs to be shown on the basis of that logic in js code in getFinalSale function.

And also, data-bind="text: getFinalSale($parent) i am calling this from HTML and I am using subscribe also but then how i will pass $parent parameter from subscribing so that getFinalSale runs when this.totals changes everytime after applying coupon.

initialize: function(){
        this._super();
        this.totals.subscribe(function (data) {
          this.getFinalSale(data)
        }, this);
    } ,

The data parameter is not same as $parent which i passed it from html.
and it breaks the js.


texts: How to manage sub-category as main category as well?

texts:
I am running a furniture shop for a client and need to sort out the categories.

I want users to be able to search by room (Living room, Bedroom, Kitchen ect...) But also want them to be able to search via furniture type (Bed, Table, Chair ect...)

I need it to display the furniture type in layered navigation when viewing the rooms category and display the rooms category when viewing the furniture type category.

Can't think of a way of doing this other than having it as follows...

Living Room

Tables
Chairs

Bedroom

Tables
Chairs

However this means that users can't access all the chairs at one time...  How can I make this possible?


texts: sort order as newest product first option in products in category in category edit does not showing in magento 2.3.2

texts:
I want to sort category default sort as newly added SKU at top and oldest at last , this means new to old (SKU) default sorting in frontend of magento 2.

But i am not able to see option  => sorting as newest product first option in products in category in category edit
Please help me.


texts: Assign related products from categories (Magento 1)

texts: We have a magento store and we have over 1000 products listed. We want to assign random related products, but they should be within the category. For example, if a product is listed under Men >> T-shirts category, related products should also be from T-shirt category only. Is there a way to do this using code instead of manually assigning related products?


texts:
I'm trying to install new extensions but I'm getting the next errors;

I'm surprised because my cron job is working OK with the website.
What should I do?
Thank you


texts: How remove attribute fields when creating a new product?

texts: i want to remove attribute fields when creating a new product.kindly give me the steps to remove that things according to the https://prnt.sc/kp0ici .


texts: Only allow order for specific post codes in a specific country?

texts: I want to make orders possible for only a list of post codes in a specific country. Is is possible?


texts: Magento 2 nginx restricting admin are by IP address not working

texts:
I am trying to restrict access to the admin area by IP address, but it's not working. When I type in the admin url, it redirects me to the home page. If I change the IP address being whitelisted, it comes up with a 403 forbidden message. Here is my current whitelist configuration for Nginx:
   location ~* ^/(index\.php/admin|admin) {
     allow 67.166.183.12;
    try_files $uri $uri/ /index.php?$args;
location ~* \.php$ { try_files /dummy @proxy; }
deny all;

   }

Everything I have seen online says to use this configuration for whitelisting the admin page for Magento 2. If I don't have the whitelist active, I can access the admin page. My site uses Nginx and Varnish for caching.


texts: How do I get rid of the 'recently compared products' block on the the right column?

texts:
I have a 'Recently Compared Products' block on the right column on my categories pages. I cannot find a reference to this in the theme specific xml or phtml files, does this mean that it falls back to the default theme files? If so how do I remove this without altering the base files?

I'm running Magento 1.7 and the theme Foundation Framework.

Any assistance would be greatly appreciated.


texts: Error:Something went wrong with processing the default view and we have restored the filter to its original state

texts:
[![Something went wrong with processing the default view and we have restored the filter to its original state.][1]][1]
And in console it show "UI component could not be rendered because of system exception" error.
after change dropdown show it error occur
[1]: https://i.stack.imgur.com/RAyx9.png


texts:
I'm looking for a extension that helps me to achieve this type of function in to my configurable products. Anyone?

We need the product information changes (Name, SKU, Price, Description and Additional information). Pretty much the page to be redirected once an option is selected on a dropdown menu. Please see example

Example
http://shop.mdminc.com/c/sequence-pumps_sequence-750

Thanks in advance...


texts: m2e pro https:// issue for ebay listings

texts:
as you all know if you are running your full site on https:// and serving images from https:// as well, it will cause an issue when listing on ebay. as ebay will not show the image when seraching for product or thumbnail.

for us the issue was, our images were hosted on differente server (STIC) for which we can not control of change any thing. as it will effect our rest of site. but the images are available on both https:// and http://, but we receive them as https:// becuase of ssl on our server

the issue is with ebay. They dont seem to like any image sent from https://

there is one solution for you. edit all products one by one and remove "s" from https://, but it is very time consuming.

we have contacted ebay and m2e pro, but both were unable to help.


texts: How to get customer ID in Collection _initSelect method in magento2?

texts:
I want customerId in _initselect method. How can I achieve this ?

protected function _initSelect()
{
    parent::_initSelect();
    $this->getSelect()->joinLeft(
        ['cp1' => $this->getTable('2checkout_ins')],
        'cp1.id =main_table.two_checkout_message_id OR cp1.id = NULL',
        ['main_table.increment_id','main_table.from_date','main_table.subscription_period','main_table.to_date','main_table.renew_date','main_table.status_success','main_table.customer_id','main_table.paypal_id','main_table.two_checkout_message_id','final_amount'=>'cp1.invoice_usd_amount']
        )->joinLeft(
        ['cp2' => $this->getTable('paypal_result')],
        'main_table.paypal_id = cp2.id OR cp2.id = NULL',
        ['final_amount_paypal'=>'cp2.amount']
        );
        return $this;
    }

PLease check below Image:


texts: Calling $this->getChildHtml on a new block outside template file

texts:
I'd like to call $this->getChildHtml('product_type_data') to get product's price outside view.phtml template file.

Currently I have echo $this->getChildHtml('product_type_data') and that outputs contents of 'catalog/product/view/type/default.phtml'.

I need to move it to a file in a custom module(cache hole punch) so that it gets called separately. So in this file I've done:

$block = Mage::app()->getLayout()->createBlock('customerprices/catalog_product_view', $this->getId());
$block->setTemplate('catalog/product/view/type/default.phtml');
$block->setIsLoggedIn(Mage::getSingleton('customer/session')->isLoggedIn());
$out = $block->getChildHtml('product_type_data');

But in this case $out contains an empty string.
Do I need to set something on this block so that it will return price html? If so how? I have a current $_product object if that's needed.

I would appreciate any suggestions.

Using Mage::getBlockSingleton(...)

when I use this code:

$thatx = Mage::getBlockSingleton('catalog/product_view');
$cnamex = get_class($thatx);
echo 'cname: '.$cnamex;

$cnamex does not contain class name(empty string/variable). I consequence I can't run any methods on it.


texts: How to set parent order value into edit order in magento2?

texts:
I have set the custom value in quote and order table using "sales_model_service_quote_submit_before" event.

In edit order, I want to set the custom field value from parent order.

How to do that

Thanks.


texts: Optimize Mysql Configuration for deadlock error

texts:
When i am trying to add product in Magento using Magento API. I am getting the following error:

Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

I have read that this issue is because bad optimization of MySQL’s configuration for InnoDB.

My Mysql server configuration for InnoDB is as follows:

### INNODB_ #
innodb_thread_concurrency=8
innodb_lock_wait_timeout=100
innodb_flush_method=O_DIRECT
innodb_log_files_in_group=2
innodb_log_file_size=64M
innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=2
innodb_file_per_table=1
innodb_buffer_pool_size=512M
innodb_additional_mem_pool_size=8M

Is anyone face the same error before? Is these configuration values are correct ? Please help.


texts: implement automatic realated ,upsell, cross sell products

texts:
how to implement automatic Related , upsell, cross-sell products.
we uploaded lot of products. but there is no Related , upsell, cross sell products.

What we want is through programatically how we can assign the Related , upsell, cross sell for same category products.
Is there any free extension that give this result with atleast 4 + review.


texts:
We updated our Magento version a couple weeks ago to the 1.9.2.4 (CE) version. This week we tried to create some online refunds and it was not working. (I tried with multiple different orders, so I am pretty sure was not a specific situation).

I know that my payment gateway (Authorize.NET) accepts online refunds because we always worked with refunds using Magento. I contact them to see if anything has changed in their end but they said that there is no changes in the refund process.

I am not sure if this is related to the update that I made in the Magento version or if could be any other problem.

Any ideas on how to troubleshot this? Or any similar experiences? I have no clue on how to fix this...


texts: How to set field value of form field in Magento 2

texts:
I am trying to set the value of Field in form using below code:

         $fieldset->addField(
        'hideGoogle',
        'text',
        [
            'name' => 'hideGoogle',
            'label' => __('Hide Google'),
            'values' => '1',
        ]
    );

But its' not setting the value. I am also tried 'value' instead of 'values' but not working. Can anyone please tell me how can I set the field value in Magento 2 admin form?


texts: Does using the Flush Storage Cache help speed up thewebsite?

texts: I have products that are on QVC tomorrow, but the wbsite is running likea pig and the developer is not available at weekends, I was thinking of running the Flush Storage as I have re indexed the index's


texts:
My problem

I have spent some time now learning the basics of magento in order to create my first Module. This module has now being completed and I would like to improve upon it by adding some functionality for an administrator. for example add a link to my module in an existing menu option, let the administrator change text for fields, add/remove fields, add tabs to a page for different features of my module etc.

I have no idea how to start developing for the admin part of magento and there seems to be even less in the way of quality tutorials from which I can learn. I did find one series which I have mentioned in a previous question but I have found that not to be too helpful and has left me with more questions than it answered.

What I have done to try and solve it

Going through the Alan storm tutorial hello world revisited, has been a help in getting started and allowed me to add an option in the menu bar.

Checking the code of various files in the adminhtml folder has left me feeling lost as I could not work out what file completed what action and I cannot get the templates hint tool to work in the admin section.

Finally I have tried to review questions on this site, but I think my needs may be too basic as I cant find question which match any of what I am asking here.

My questions

1 - Is there some key concepts that differ significantly from developing for the front end? (my reason for asking this is the alan storm tutorial refers to the descrepency between <action>adminhtml/catalog_product/</action> and the actual url of admin/catalog_category also the other tutorial left me feeling that are a couple of other key differences too - i'm probably wrong)

1a - if there are some differences where do I find out more about these additional concepts I need to learn?

2 - Which files do I need to look at to learn how magento is creating the tabs and grids and appling data to the grids?

3 - I have only added a single table to store information for my module, is it a necessity to change this into magento's EAV structure in order to allow administrators to add and remove fields?

Please don't take this question as me asking for someone to tell me how to do my modules, I am simply looking for some guidence in getting started and a pointer in the right direction to help me on my way.

I don't want to blindly follow tutorials, but dont mind doing a couple if they help me understand as that is how I learnt how to do my module for the front end.


texts: Can not load admin url in magento 2 with sample data?

texts: I have installed magento 2 with sample data using command line instructions. I can load the frontend without any problem. But when i load admin url, its getting redirected. Actual admin url: local.magento_2.com/admin_1kzjqv/, redirected url: http://local.magento_2.com/admin_1kzjqv/http:/index/local.magento_2.com/admin_1kzjqv/admin/index/index/key/dc29e0deb12bceefaf5d6b01551063e15e66b94a638e3915bf190b9d5d79743f/. Please help me in solving this.


texts:
I have noticed that after a customer does a purchase which fails on the Authorize.net side, the next successful transaction is not added.

Any idea why this may happen or how I can fix it?


texts: custom attributes in separate coloumn while export? - Magento 2.0.8

texts:
short description what I done:

create product attribute set (Chennai)
create 21 new product attributes
assign to Chennai attribute set
set value to attribute while create product
export (System->Export->Continue) csv

problem is my new attributes comes under additional_attributes column but I am expecting each attribute occupy one column.

Anything need to mention while creating attribute for export related things?

can anyone pointing to me right direction?


texts: Different payment methods for each store

texts:
Is it possible to configure different payment methods for stores under the same website?
I need to set a specific payment method for a product category, so I thought that I could do this by creating a new store in my website only for this category, but as far as I searched until now, it seems like payment methods are set at website level and shared by all my stores. Any suggestions? Thanks!
I`m on Magento 1.8.


texts: Magento 2: How to add custom form on category page?

texts:
I am using Magento 2.1 and I am trying to add one custom form in catalog page.

I override the catalog_category_view to my custom module

and use this code

 <referenceContainer name="columns.top">
        <container name="category.view.container" htmlTag="div" htmlClass="category-view" after="-">
         <block class="Vendor\Module\Block\Search\Form" name="category.pr" template="Vendor_Module::category/form.phtml">
                       </container>
    </referenceContainer>

buts it's not working. is there any other way to do this???


texts:
im new one magento, in trying to change my footer, manly the background, basically im tring to add a block with a email, address and location info above my footer blocks links. I add this block inside a phtml of newsletter form. The only issie is that i have inside of a container with a specific width, but i need to make a wrapper out of footer-container, because i need to give another background color. I tryed wrapping the links block ("mypackage/page/template/links.phtml"), but i notice that the block "Account" and "CONNECT WITH US" is not from the links.phtml, how can i make what im trying to do?

I leave here how it is:

How i want to be


texts:
I need to ensure a link is added to all categories (except the current one) in my breadcrumbs. In my $crumbs variable provided by page > html > breadcrumbs is the following var_dump:

array (size=3)
  'home' =>
    array (size=6)
      'label' => string 'Home' (length=4)
      'title' => string 'Go to Home Page' (length=15)
      'link' => string 'http://dev.example.co.uk/' (length=32)
      'first' => boolean true
      'last' => null
      'readonly' => null
  'category270' =>
    array (size=6)
      'label' => string 'Batteries By Use' (length=16)
      'link' => null
      'title' => null
      'first' => null
      'last' => null
      'readonly' => null
  'category321' =>
    array (size=6)
      'label' => string 'Digital Camera Batteries' (length=24)
      'link' => string '' (length=0)
      'title' => null
      'first' => null
      'last' => boolean true
      'readonly' => null

As you can see, there should be a link variable on category270 but I have no idea how to get this to work. The core doesn't provide much guidance on adding these links to the breadcrumbs.

Obviously, I'll need to track down the area where this breadcrumb is added, but with regard to categories, I have no idea where to look.


texts: Email sending only once instead of multiple times

texts:
once Registered user upload custom image on product view page and click on  Custom button "save design"

for each click on "save design" , we are creating new row in table : "my_Designs" & we are sending email when each row created.

suppose customer clicked on "save design" button 3 times after uploading 3 images at each time, only one [first] email is delivering to customer with first image.

<?php echo Mage::getModel('catalog/product')->load($this->getProductId())->getName() ?>
<img src="<?php echo $this->getValue() ?>" alt="Mage::getModel('catalog/product')->load($this->getProductId())->getName()" />

Edit : full code :

hi <?php echo $this->getCustomerName() ?>,

<?php echo Mage::getModel('catalog/product')->load($this->getProductId())->getName() ?>
<img src="<?php echo $this->getValue() ?>" alt="Mage::getModel('catalog/product')->load($this->getProductId())->getName()" />

  <a href="<?php echo $this->getRestoreCartUrl() ?>" class="button">Finish Checkout


texts:
In Admin area, I can´t find the location language (code) of my country(Angola)

If I choose Portuguese→portuguese.

On html Lang=¨¨ will be like this pt_PT, but what I want is → pt_AO

Where can I add manually my country code language?

I am having only one store at the moment.


texts: My website is loading very slow, I am facing this issue since quite a long time. Suddenly all works properly and then suddenly website loading time goes to 30-40 seconds. quick fix is that if I Truncate core_url_rewrite db, the website starts opening in normal speed like 3-4 seconds, but some of the pages doesn't work so for them to work I need to reindex catalog url rewrite, then again it will start working slow. I hardly have 15 mb of core_url_rewrite db size. My total products on website is 5-6k. This issue suddenly started happening after we planned to upgrade to Magento 2 and the developer who was working on this had already finished the pre-migration process and left the project in half way. Due to his migrations there are some M2 tables created in our live database. We also upgraded our server to 8GB ram , 240 Gb HDD & 8 CPUS. Still this issue didnt resolve. Please if anyone can help me out on this.


texts: How to remove header or footer from modal popup in magento 2?

texts:
I have created popup on href click and on click popup is opening fine. But I want to remove Continue button from modal-footer which is just used to close the popup. Want to remove it. Any idea?

modal-form.js is as below.

define([
    'jquery',
    'Magento_Ui/js/modal/modal'
],
function($) {
    "use strict";
    //creating jquery widget
    $.widget('Vendor.modalForm', {
        options: {
            modalForm: '#personilized-modal-form',
            modalButton: '.open-modal-form'
        },
        _create: function() {
            this.options.modalOption = this._getModalOptions();
            this._bind();
        },
        _getModalOptions: function() {
            /**
             * Modal options
             */
            var options = {
                type: 'popup',
                responsive: true,
                title: 'Personilized Custom Jewelery',
                buttons: [{
                    text: $.mage.__('Continue'),
                    class: '',
                    click: function () {
                        this.closeModal();
                    }
                }]
            };

            return options;
        },
        _bind: function(){
            var modalOption = this.options.modalOption;
            var modalForm = this.options.modalForm;

            $(document).on('click', this.options.modalButton,  function(){
                //Initialize modal
                $(modalForm).modal(modalOption);
                //open modal
                $(modalForm).trigger('openModal');
            });
        }
    });

    return $.Vendor.modalForm;
});


texts: Error: Connection refused on HTTPS with Letsencrypt SSL, apache

texts:
I'm trying to enable Let's Encrypt ssl certificate on jammetti.lv (apache, raspbian buster) but when I force SSL connection and try to load the website connection to the website is refused.

I've also checked if my SSL certificates are valid.

I've made sure my SSL port is open on router.

My DNS server is mydomain.com and I didn't add any specific DNS record for SSL connection.
I've ran apachectl configtest

I've been trying to fix this problem for several days now.
Thanks,
Pavels


texts: Core configuration of Recently Viewed/Compared Products | Synchronize widget products with backend storage | Magento 2

texts:
Can someone explain what enabling this option do:

Store -> Settings -> Configuration -> Catalog -> Catalog -> Recently Viewed/Compared Products:

  Synchronize widget products with backend storage: Yes/No

I can't find any information about it... I found this: https://docs.magento.com/m2/ce/user_guide/marketing/products-viewed-compared.html

However, this option is not included in the documentation. I am using Magento ver. 2.2.4.

UPDATE:

In addition, there are two more option not included in the docs:

  Lifetime of products in Recently Viewed Widget:

  Lifetime of products in Recently Compared Widget:

Can someone explain?

UPDATE 2:

I have theme installed so I thought it might be "add-on" from theme, however I found this in vendor\magento\module-catalog\etc\adminhtml\system.xml so I'm guessing it's Magento 2.2.4 default feature:

<group id="recently_products" translate="label" type="text" sortOrder="350" showInDefault="1" showInWebsite="1" showInStore="0">
            Recently Viewed/Compared Products
            <field id="recently_viewed_lifetime" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
                Lifetime of products in Recently Viewed Widget
            </field>
            <field id="recently_compared_lifetime" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
                Lifetime of products in Recently Compared Widget
            </field>
            <field id="synchronize_with_backend" translate="label" type="select" showInDefault="1" canRestore="1">
                Synchronize widget products with backend storage
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
        </group>


texts: URL Rewrite Management problem with rewrites

texts:
Scenario Magento 1.9.1.0

We have3 stores for 3 languages
For URL SEO language

We go to URL Rewrite Management
We Locate Request Path with System Type selection.
We Modify the request path to language store with this, System, Store Language, ID Path original path, request path how to url on language desire, and target path original. Redirect No.

Well, we test the new URL such https://dulcissimus.fr/ayurveda-homme-tisane-organique-sprecial-pour-les-hommes-saveur-de-gingembre.html and it works well for somedays.

After some days (on latest day there're any upgrades of Magento core modules) on URL Rewrite Management there aren't a Type System URL Rewrite. Instead, Magento show a Custom url.

This custom URL it's create by???? we dont know what it is. For us it's a ghost or the sistem. We don't know how magento can change an URL rewrite system to custom rewrite.
We do apreciate help

Edited: 17h55 GMT+1
We add further information that can maybe help to better resolve or understand the problem:
we have made a series of tests so as to analyze the issue and we find out that the modified URL works fine till we make change in the url key (default Store View). At this time the modified url changed the to Custom and not system. but we are not sure if is the origen of the problem because we did not made changes allover the product and still all the product in the french view have changed the URl  status from system to custom.

Regards


texts: Porto - include Mageplaza LayeredNavigation in js file

texts:
I'm making a custom theme based on porto.
I'd like to include the Mageplaza_LayeredNavigation/js/view/layer in the toolbar.js file of the the Magento_Catalog module, in my custom theme.

I tried several ways to include the file, but each time, it breaks the mage.productListToolbarForm as events in the _create() function are not initialized anymore. But I have no error, which is something I don't understand.

Here is the require-config.js file of the mageplaza module :

var config = {
    paths: {
        mpLayer: 'Mageplaza_LayeredNavigation/js/view/layer'
    },
    shim: {
        mpLayer: ['touchPunch']
    }
};

Path to the file defined as mpLayer is app/design/frontend/Vendor/Theme/Mageplaza_LayeredNavigation/web/js/view/layer.js

Here is the definition of my toolbar, located in app/design/frontend/Vendor/Theme/Magento_Catalog/web/js/product/list/toolbar.js :

define([
    'jquery',
    'jquery/ui',
    'Mageplaza_LayeredNavigation/js/view/layer'
], function ($, ui, mpLayer) {
        _create: function () {
            this._bind($(this.options.modeControl), this.options.mode, this.options.modeDefault);
        },
        ...
}

Whenever I include the layer file of Mageplaza, events in the create function are not initialized.
But I don't have any error.

With this code in my toolbar, events are initialized fine :

define([
    'jquery',
    'jquery/ui'
], function ($, ui) {
        _create: function () {
            this._bind($(this.options.modeControl), this.options.mode, this.options.modeDefault);
        },
        ...
}

Can somebody tell me if I'm doing something wrong ? I can't see my error and I don't get why events are breaking without errors.

Thank you!


texts: Magento 2 - How to print array values in custom html email template by looping?

texts:
I want to print multiple coupon/gift codes in the custom email template. I am getting a single code as:

$templateVars = array(
    'store' => $this->storeManager->getStore(),
    'customer_name' => $name,
    'giftcods' => 'VFDFRVXSW43VF'
);

In HTML Template file:

    {{var giftcods|raw}}

And output as:

But this is a single code, I won't to print multiple codes in an email.
I have gone by some related links like:

Magento 2 : How to handle array values in custom email templates?

Pass Variable And Output In Custom Email Template

But there is no proper solution available specially about how to deal with array value in the HTML template.

Edit:

In vendor/magento/module-gift-card Module this is done as

In file: vendor/magento/module-gift-card/view/frontend/email/gift_information.html

{{if is_multiple_codes}}

{{trans "Gift Card Codes:"}}

{{else}}

{{trans "Gift Card Code:"}}

{{/if}}

{{var giftcards|raw}}

Variables are sending by Magento\GiftCard\Model\GiftCardItemEmail.php as:

$templateData = [
    'name' => $giftCardOrderItem->getProductOptionByCode('giftcard_recipient_name'),
    'sender_name' => $senderName,
    'giftcards' => $codeList->toHtml(),
    'balance' => $balance,
    'is_multiple_codes' => 1 < $generatedCodesCount,
    'store' => $giftCardOrderItem->getStore(),
    ..................
    ..................
];

Here $codeList is not array. But still looking to solve!


texts:
What is the 'true' argument in session->getBeforeAuthUrl(true)?

I see some cases where it is

$session->getBeforeAuthUrl(true)

and some

$session->getBeforeAuthUrl()

What's the difference?  Almost impossible to google for this question and I don't see any getters in the Customer/Model/Session.


texts: Magento 2.2.4 : Getting 500 Internal Server Error on setup/install

texts:
I am using Wamp. Am trying to install Magento 2.2.4(Latest Version) on my local machine. But Getting 500 Internal Server Error. I have downloaded as a .zip format with no sample data. Tried to see any logs, but there is no log folder created under /var folder.

Added lines in rootfolder/index.php to show error on frontend.


texts:
default magento search work using hit enter key or submit button.but now i need this search work only for pressing submit button and not work for hit enter key.For this am added the below js code in form.mini.phtml file

<script type="text/javascript">
    jQuery(document).ready(function() {
        jQuery("#search_mini_form").bind("keypress", function(e) {
            if (e.keyCode == 13) {
                return false;
            }
        });
    });
</script>

but this code is not working when there is the code for autocomplete

//<![CDATA[
        var searchForm = new Varien.searchForm('search_mini_form', 'search', '');
        searchForm.initAutocomplete('<?php echo $catalogSearchHelper->getSuggestUrl() ?>', 'search_autocomplete');
    //]]>

By removing this autocomplete code the above code works correctly.But i need both codes work correctly(i need autocomplete property also).I am using magento 1.9.2.0


texts: Magento 2 (2.1.4) - Product details is not opened in Admin Grid

texts:
I have updated magento version 2.1.3 to 2.1.4 via composer.

Its updated successfully without any error.Everything works perfectly ! except product catalog admin grid.

But after update 2.1.4 version i am unable to open product details from admin grid.

From Admin when i click on Products -> Catalog -> Its displays all the products in the grid -> but when i click on single product for edit details -> It shows blank.

Below is the screenshots :

On the console I have checked it shows below error :

  _wasOpened is not defined

Below is the screenshot for error :

I have already done below steps but still error remains same :

rm -rf var/di var/generation
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento setup:di:compile
php bin/magento indexer:reindex

Note : Its happened with all the grid ,unable to open detail view of cms pages as well..


texts:
I can't seem to be able to update my magento2 ce using composer. I doesn't find any updates, the only one it found was 'fabpot'.

I thought this was the whole point of a composer setup, so why would I want to use the backend as explained in the documentation: http://devdocs.magento.com/guides/v2.0/comp-mgr/upgrader/upgrade-start.html

Or am I missing something?

Thanks in advance for any help.

EDIT:

I followed the official documentation to install Magento2 via composer, as described here: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/integrator_install.html#integrator-first-composer-ce

The problem is that the composer.json file that is pulled using the command:
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <installation directory name> defined magento under the required section of the .json:

"require": {
    "magento/product-community-edition": "2.0.0",
    "composer/composer": "@alpha",
    "firegento/magesetup2": "dev-develop",
    "splendid/de_de": "^0.0.1"
},

As you can see, version 2.0.0 is specified.

For the update to work, I had to manually change that line in the .json file as follows:

 "magento/product-community-edition": "2.*",

Now running composer update updated all modules from version 100.0.2 to 100.0.3.

Please note that this still throws an error exception because of the following:

[ErrorException]
  Source /home/dev/git/mysite/vendor/magento/magento2-base/app/design/frontend/Magento does not exist

Now it seems quite a few essential are missing, for example the bin/magento file.

Anyone got any ideas how it is done correctly so it actually works?


texts: How to configure products for multiple attributes

texts:
I have a couple of products that have multiple attributes where the user can choose from, "Size" and "Color". But I can't seem to get them both working.

At first I created a product for every option like:

Size 1 & Color 1;
Size 1 & Color 2;
Etc

But that only displayed the size, and yes I chose both attributes for the creation of the product. It did only display the name of the second attribute.

After that I created separate products like:

Product A color 1;
Product B size 1;

But that didn't seem to work either.

How would I get this to work?


texts: How to enable Magento2's database profiler ?


texts:
When would you place a module in the app/code folder versus another
  location?

If I add new module in app/code folder with composer.json and another module in vendor folder using composer

  What will be the difference ?

I am aware about that if module is in vendor folder then It can be
updated  by composer.
Does that same thing apply with the module which is in app/code
folder ?
When you update module which is in app/code folder using composer
they install in vendor directory.

  So, What is the point of Composer.json in app/code folder Module ?


texts: Platform 1.8 login differences between localhost and 127.0.0.1

texts: Will there be any difference if I login to my Magento admin panel by localhost or 127.0.0.1?


texts: Magento 1.9 - Update product price using jQuery

texts:
I am using a jQuery script to add static price to the product's regular price on the product detail page.  On the product page, the price is updated, but the price is not updated in the cart when added

An example:

Regular price is $10.
Static price is $50.
Total price on product page: $60
Cart page product price: $10.

The code that I am using on the product detail page:

jQuery('#options_1_text').removeAttr('onchange').on('keyup', function (e){
    var price=50; //add var declaration
    optionsPrice.changePrice('opConfig',price);
    optionsPrice.reload();
});


texts: I want to store on an array all orders from the customer

texts:
How can I get all customers orders and store it on an array ?

I've got this query, is it possible to get all the products ?

$orders = Mage::getResourceModel('sales/order_collection')
->addFieldToSelect('*')
->addFieldToFilter('customer_id', $customer->getId())
->addAttributeToSelect('created_at')
->addAttributeToFilter('created_at', array('from' => $from, 'to' => $to))
->load();

I really need help please!


texts: How to create the homepage.phtml in Magento 2

texts:
How to create create the custom theme in Magento 2. i have create the custom, in my template i have write the some html code. But its not display default code only display here my codes

  app\design\frontend\accu\accu-theme\Magento_Theme\page_layout\custom_home.xml

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="empty"/>
    <referenceContainer name="page.wrapper">
        <container name="header.container" as="header_container" label="Page Header Container"  htmlTag="header" htmlClass="page-header" before="main.content"/>
        <container name="page.top" as="page_top" label="After Page Header" after="header.container"/>
        <container name="test" label="Main Content Container" htmlTag="div" htmlClass="MainContainerEnclose" htmlId="MainContainerEnclose" />
        <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" />
    </referenceContainer>
</layout>

  app\design\frontend\accu\accu-theme\Magento_Theme\template\homepage.phtml

My First Heading

My first paragraph.

Any one help me


texts: Sales Emails going via wrong email address magento 2.2.x

texts:
I have setup email address in sales representative but getting sales email from

  apache@domainname

So where I need to fix this issue? Can anyone let me know?

Other emails except sales are working fine.


texts:
I have a store with Italian Language with Magento 2.3.0. In that store, I have created a calendar and I am facing some issue while selecting the date from the calendar.

My Date Format is dd/MM/yy. My expected out is "12 March 2019". But I am always getting this 12/03/2019.

    $dateFormat = $this->_localeDate->getDateFormat(\IntlDateFormatter::SHORT);
    $escapedDateFormat = preg_replace('/[^MmDdYy\/\.\-]/', '', $this->getDateFormat());
    $this->dateElement->setData([
        'extra_params' => $this->isRequired() ? 'data-validate="{required:true}"' : '',
        'name' => 'expired_date',
        'id' => 'expired_date',
        'class' => $this->getHtmlClass().'required-entry',
        'value' => $this->getRequiredDate(),
        'date_format' => $this->getDateFormatVals(),
        'image' => $this->getViewFileUrl('Magento_Theme::calendar.png'),
        'change_month' => 'true',
        'change_year' => 'true',
        'show_on' => 'both'
    ]);

Now my issue is language(locale is working fine). But when I am selecting the date instead of 31/March/2019 Its showing 31/03/2019 . Could you please tell what is the exact issue .


texts: Magento 2 migration: apply configurable product's price to it's simple products

texts:
We did M1 -> M2 migration and now we need to set the price of each simple product associated with a configurable product to have the price of the configurable product. Is there a way to do this?

It seems that migration script indeed imported the price for configurable products even if it is shown blank in the product data page in admin. The product list page in admin shows the price for each configurable product.


texts: Magento tells me to apply modified catalog price rules but there are no rules at all

texts:
I noticed a message in Promotions -> Catalog Price Rules:

"There are rules that have been changed but were not applied. Please, click Apply Rules in order to see immediate effect in the catalog."

But I couldn't see any rule at all. Not in backend, not in database. All these tables were empty:

catalogrule
catalogrule_affected_product
catalogrule_customer_group
catalogrule_group_website
catalogrule_product
catalogrule_product_price
catalogrule_website

I cleared cache and ran a full reindex but the message still showed up. Only hitting the "Apply" button made the message disappear. Now I'm wondering where Magento pulls this information (that rules still need to get applied) if it does not pulling it from catalogrule* table. Do anyone know ?


texts: Magento 2: what is the $data array constructor parameter?

texts:
So I noticed that in most models and blocks, there's this array $data = [] given as the last parameter of the constructor.

For example \Magento\Catalog\Block\Product\ListProduct

public function __construct(
    \Magento\Catalog\Block\Product\Context $context,
    \Magento\Framework\Data\Helper\PostHelper $postDataHelper,
    \Magento\Catalog\Model\Layer\Resolver $layerResolver,
    CategoryRepositoryInterface $categoryRepository,
    \Magento\Framework\Url\Helper\Data $urlHelper,
    array $data = []
) {
    $this->_catalogLayer = $layerResolver->get();
    $this->_postDataHelper = $postDataHelper;
    $this->categoryRepository = $categoryRepository;
    $this->urlHelper = $urlHelper;
    parent::__construct(
        $context,
        $data
    );
}

I also know that, when dealing with preferences, you still have to keep that parameter in the end of your constructor parameters list when you add more parameters than the original constructor.

So I've got several questions regarding this array:

what is it ?
how to use it ?
why do we need to keep it at the end of the constructor parameters list when declaring preferences for a block that adds more parameters ?


texts:
I'm trying to send shipping info to a remote server. How I can post this JSON data when saving a tracking number on magento backend?

<?php
    $data = array(
        "apiKey" => "MYAPI",

        "pushTrack" => array(
            array(
                "trackingNumber" => "1Z0V5V416840696735",
                "courier" => "UPS",
                "shipDate" => "2014-08-01"
                ), //minimun required fields example

            array(
                "trackingNumber" => "1Z0V5V416840696736",
                "courier" => "UPS", "shipDate" => "2014-08-02",
                "reference" => "ord. # 1674",
                "orderDate" => "2014-07-30",
                "name" => "NAME",
                "street" => "STREET",
                "city" => "CITY",
                "ZIP" => "12345",
                "state" => "AA",
                "country" => "IT",
                "email" => "name@domain.ext",
                "telephone" => "02342522",
                "agent" => "007@company.ext",
                "amount" => "150,00",
                "pod" => "1",
                "shipping" => "8,00",
                "custom1" => "valore custom 1",
                "custom2" => "valore custom 2",
                "custom3" => "valore custom 3",
                "custom3" => "valore custom 3",
                "note" => "This is a note",
                "deliveryDate" => "2014-07-31",
                "tag" => "customer1"
            )
        )

    );

    $data_string = json_encode($data);

    $ch = curl_init('REMOTEURL');
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch,CURLOPT_POST,1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 60);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);

    $result = curl_exec($ch);

    curl_close($ch);

    echo $result;
    ?>


texts: Magento 1.9 : How to find the html path of a footer Block?

texts:
I want to edit the Footer paypal and other logo section.

Plz check the image with path hint.

and this is the site url https://goo.gl/7pQV7Y

Entire path hints:


texts: What are the allowed condition types in Magento 2?

texts:
What is the list of allowed condition types while adding filter to search criteria in Magento 2?

All of the examples about search criteria in the internet use eq condition type. Is there any other? Do you have a complete list somewhere?

EDIT 1:
Please look at the following code block. What are my options for condition_type?

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

/** @var \Magento\Catalog\Api\ProductRepositoryInterface $productRepository */
$productRepository = $objectManager->get(\Magento\Catalog\Api\ProductRepositoryInterface::class);

/** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder */
$searchCriteriaBuilder = $objectManager->get(\Magento\Framework\Api\SearchCriteriaBuilder::class);

/** @var \Magento\Framework\Api\FilterBuilder $filterBuilder */
$filterBuilder = $objectManager->get(\Magento\Framework\Api\FilterBuilder::class);
$filterSpecialPrice = $filterBuilder->setField('special_price')
    ->setValue('0')
    ->setConditionType('eq')
    ->create();

$searchCriteria = $searchCriteriaBuilder->addFilter($filterSpecialPrice)
    ->create();

$productCollection = $productRepository->getList($searchCriteria);


texts: Find the location an existing custom block

texts:
Please, forgive me for the probably dumb question but this the first time I use Magento.
I have been asked to make a simple change to an existing page (insert a few words of text).
I have been granted access to the system through a web interface.
After a couple of hours of "navigating" the Contents, I found that the page I need to access
is activated by the following block
{{block class="Magento\Framework\View\Element\Template"template="Magento_Theme::storelocator/XXXXXX.phtml"}}
XXXXXX is a specific name that I prefer to anonymize.
My questions are: How do I find the "real" code (the XXXXXX.phtml) file?
Is it available and possibly editable from the same web interface? Or do I need to have the original file, modify it and upload (where in this case)?
Thanks in advance for any help,
Mario


texts: Magento 2: AWS Elastic Search: Index product manually

texts:
I am using Magento 2. Using AWS Elastic Search Service.

I want to index only 5-10 products.

Is it possible to manually/progrmatically index only X products?


texts:
I am using Magento 2.2.2. In the past, I used to get the message below in every time I log in as an admin:

Failed to synchronize data to the Magento Business Intelligence service. Retry Synchronization

I have run a command line and disabled the above message, I disabled the Synchronization, I don't remember what was the command line. Now I am trying to enable the advanced reporting and I have applied all of what is written in the documentation: http://docs.magento.com/m2/ce/user_guide/reports/advanced-reporting.html

I still cannot get any report. I only get the image below. How can I enable the synchronize data to the Magento Business Intelligence service via a command line to reverse what I've done so that I can get the reports?


texts: Magento 2.3.5: system.xml file upload allow types not working

texts:
system.xml

<field id="upload_image_id" translate="label comment" type="image" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
   <label>Select Image</label>
   <backend_model>NameSpace\YourModule\Model\Config\Backend\Image</backend_model>
   <base_url type="media" scope_info="1">yourfolder</base_url>
</field>

Image.php

namespace NameSpace\YourModule\Model\Config\Backend;

class Image extends \Magento\Config\Model\Config\Backend\Image
{
/**
 * The tail part of directory path for uploading
 *
 */
const UPLOAD_DIR = 'yourfolder'; // Folder save image

/**
 * Return path to directory for upload file
 *
 * @return string
 * @throw \Magento\Framework\Exception\LocalizedException
 */
protected function _getUploadDir()
{
    return $this->_mediaDirectory->getAbsolutePath($this->_appendScopeInfo(self::UPLOAD_DIR));
}

/**
 * Makes a decision about whether to add info about the scope.
 *
 * @return boolean
 */
protected function _addWhetherScopeInfo()
{
    return true;
}

/**
 * Getter for allowed extensions of uploaded files.
 *
 * @return string[]
 */
protected function _getAllowedExtensions()
{
    return ['jpg', 'jpeg', 'gif', 'png', 'svg'];
}

Still not allowing it I get Disallowed file type. Anything else missing ?


texts: How to show history of products viewed by logged in customer and delete if current user wishes to?

texts:
What I have tried till now is

$objManager = \Magento\Framework\App\ObjectManager::getInstance();
$visitors = $objManager->get('Your\Store\Block\Customer\Login');
$currVisitorId = $visitors->getLoggedInUserId();
$currVisitorName = $visitors->getLoggedInUserName();

$prodMyViewedCol = $objManager->get('\Magento\Reports\Model\ResourceModel\Event\Collection');
$prodMyViewedCol->setOrder('logged_at','DESC');

$prodViewedThisEntirelyIdCol = array();  //used to store products viewed by currently logged in user.

foreach($prodMyViewedCol as $prod){
    //subject id is the column name in the event table
    if($prod->getSubjectId() != $currVisitorId){
        continue;
    }
    $product_id = $prod->getObjectId();
    $prodViewedThisEntirelyIdCol[] = $product_id;
}
echo "<pre>";
echo 'logged in user: ', $currVisitorName, '<br>';
var_dump(array_unique($prodViewedThisEntirelyIdCol));
die();

fetched the collection of events of product view and sort them in descending order.
Then after filtered them by the customer id. I'm getting the correct history which is shown below:

Ok, I got the history and can list the history of a customer, I could be happy if my requirements were limited to this. But I need to delete the history. I can do that as well but deleting the data in table will hamper the results of reports in backend.

  So what I want is: get the products viewed by currently logged in customer and delete that history safely without hampering the core behavior of reports, or store's database.


texts: Is API related code will be present in default magento pack?

texts:
in the default magento pack , means including app to var.

Is all the code related to APIs will be present ?

Means is there any web services/API related code will be there in default pack.

for example , for getting shipping methods as we are using this API : shoppingCartShippingList() , to support these API's is there any code will be present in default pack ?


texts: Hide base product Images when pick a different color in Configurable Products

texts:
what I need is to hide all pics that doesn't bellongs to the selected color in swatch of configurable product, is there any way to achieve this? Thanks.

I've seen this similar question, but without any answer.


texts: Mag2 - Adding links to categories navigation bar and moving them

texts:
In Mag 2, I'm developing a template which extends Luma. How do I add a link after Sale and move all the links so they're in between the logo and the search box?
Thanks!


texts:
Multiple users log in the system to edit product catalog, categories etc.
We need an effective system to log each users actions.


texts:
I'm trying to get list of ~40k customers through Magento SOAP Api v2, with customerCustomerList method. I don't have access to Magento instance, only WSDL and credentials.

When I'm calling for all customers, i'm getting either null or SoapFault exception due to "too many customers" being fetched (no error is specified, but I research them - that's the reason).

I'm trying to split the call with created_on range and fetching customers per day, starting from now and going backwards, the problem is - how do I know I should stop?

Do you know a way I can fetch any timestamp 100% sure that there won't be any customers before it, like "oldest customer", or anything similar?


texts: Error adding product to quote: This product is currently out of stock

texts:
Trying to add product to a Quote and getting message that it is Out of Stock event though I set it to In Stock.  I have tried several things but here is the current code:

 $product = Mage::getModel('catalog/product')->loadByAttribute('sku', ['eq' => $item->sku]);
 $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product->getId());
 $stockItem->setIsInStock(true);
 $stockItem->save();
 $quote->addProduct($product, new Varien_Object(array('qty' => 1)));

Exception message is "This product is currently out of stock".

Here is a print_r of $product->getData() immediately before the addProduct() call.

Array
(
[entity_id] => 11093
[entity_type_id] => 4
[attribute_set_id] => 4
[type_id] => simple
[sku] => 150502
[has_options] => 0
[required_options] => 0
[created_at] => 2015-07-18 10:14:18
[updated_at] => 2018-01-03 18:26:56
[status] => 1
[visibility] => 4
[special_order] =>
[non_product] =>
[tax_class_id] => 2
[weight] => 0.0000
[price] => 36.4700
[group_price] =>
[image] => /1/5/150502.jpg
[small_image] => /1/5/150502.jpg
[thumbnail] => /1/5/150502.jpg
[name] => ME101
[part_no] => ME101
[item_no] => 150502
[meta_title] => ME101
[meta_description] =>
[options_container] => container1
[url_key] => me101
[url_path] => me101
[image_label] => ME101
[small_image_label] => ME101
[thumbnail_label] => ME101
[product_code] => 68
[special_from_date] =>
[short_description] =>
[description] =>
[parts_acc] =>
[ilm_tab] =>
[video] =>
[product_fields] => [{"type":799,"value":"MEC Brass"},{"type":45,"value":"1 1\/4\""},{"type":517,"value":"1\/2\" MNPT"},{"type":46,"value":"2 1\/2\""}]
[meta_keyword] =>
[stock_item] => Varien_Object Object
    (
        [_data:protected] => Array
            (
                [is_in_stock] =>
            )

        [_hasDataChanges:protected] =>
        [_origData:protected] =>
        [_idFieldName:protected] =>
        [_isDeleted:protected] =>
        [_oldFieldsMap:protected] => Array
            (
            )

        [_syncFieldsMap:protected] => Array
            (
            )

    )

)


texts:
This is a really weird one so don't know if anyone else has seen this but any help gratefully received.

We are running on EE 1.10 and have just added a load of new products.  When we use the quick search for a product it shows up but if we try to add to the basket it sometimes fails to add then 404's and the product will not show up in the search results again.  The 404 only seems to be when there is a single search result and when there are multiple results the page refreshes to the search results but the product we have just added is removed from the search results.  Inventory is fine so the product is in stock etc.

We've had to remove the add to basket action from the list.phtml template for the time being but obviously want to be able to reinstate it but can't while this is continuing.

My local dev version of the site was doing this so I cleared out the search tables and rebuilt the full text index (this occurs with both like and combine searches)


texts: Magento Tries to Load from Old Development Directory after Changing Name

texts:
I had a working development instance (1.9.0.1) running on a subfolder "test" of my production instance. After I changed the name of the "test" folder to "development", Magento still attempts to load files from the test directory, which no longer exists. I updated both base urls in core_config_data. I cleared var/cache and var/session. I cleared the browser cache. I tested on another machine. I can't think of anything else to do. Here is the error when I go to mysite.com/development in the browser:

  Warning: include_once(Mage/Core/functions.php): failed to open stream: No such file or directory in /home/mysite/public_html/test/app/Mage.php on line 50

  Warning: include_once(): Failed opening 'Mage/Core/functions.php' for inclusion (include_path='/home/mysite/public_html/test/app/code/local:/home/mysite/public_html/test/app/code/community:/home/mysite/public_html/test/app/code/core:/home/mysite/public_html/test/lib:.:/usr/lib/php:/usr/local/lib/php') in /home/mysite/public_html/test/app/Mage.php on line 50

  Warning: include_once(Varien/Autoload.php): failed to open stream: No such file or directory in /home/mysite/public_html/test/app/Mage.php on line 51

  Warning: include_once(): Failed opening 'Varien/Autoload.php' for inclusion (include_path='/home/mysite/public_html/test/app/code/local:/home/mysite/public_html/test/app/code/community:/home/mysite/public_html/test/app/code/core:/home/mysite/public_html/test/lib:.:/usr/lib/php:/usr/local/lib/php') in /home/mysite/public_html/test/app/Mage.php on line 51

  Fatal error: Class 'Varien_Autoload' not found in /home/mysite/public_html/test/app/Mage.php on line 54


texts: How to set values to "Manage Swatch(Values of Your Attribute)" section of swatch text attribute programmatically?

texts: I have created a swatch text attribute. But the values are not getting saved properly. How to set values to the section "Manage Swatch(Values of Your Attribute)".


texts: Add custom data-attribute inside script tag of custom JS

texts:
I would like to add a custom data-attribute to a javascript injected in the frontend area using a custom module.
My custom javascript is inserted using

    var config = {
        map: {
            '*': {
                my_module: 'My_Module/js/my-script'
            }
        }
    };

My goal is to have this:

<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-foo = "bar" data-requiremodule="My_module/js/my_js" src="http://example.com/pub/static/version1559902439/frontend/Magento/luma/en_EN/My_module/js/my_js.js"></script>

where data-foo is my custom data-attribute.
I made some research in RequireJS documentation without success.
Any ideas?


texts:
I created an text field attribute and allowed HTML on frontend and also tried enabling WYSIWYG.

I load the attribute on productpage with this line:

<?php if($_product->getData('standaard_meegeleverd')) : ?>

Standaard meegeleverd

<?php echo $this->htmlEscape($_product->getData('standaard_meegeleverd')); ?>

<?php endif; ?>

But on frontend the data is loaded without HTML.
I see text on the product page like this:

AC-adapter

4 cell Li-ion-accu

How can I fix this?


texts: Why is quote address checked when applying a shopping cart rule?

texts:
In Mage_SalesRule_Model_Validator::process(), it checks whether or not the available shopping cart rules apply to items in the shopping cart via $this->_canProcessRule($rule, $address)).

_canProcessRule() in turn checks $rule->hasIsValidForAddress($address) (Mage_SalesRule_Model_Rule), which returns false for a particular item I have in my cart, and the shopping cart rule does not apply. The item I have is a simple product that is added from a grouped product page. The simple product is not visible. $rule->hasIsValidForAddress($address) returns true if this simple product is added to cart from an associated with a configurable product.

UPDATE:

The shopping cart price rule I have is simple. Take $1 off from the cart if any of the product in the cart is in category X. The grouped item is visible in Catalog,Search and the associated simple products are Not Visible.

I later realized that shopping cart rules do not apply to Not Visible products, which in my case as the simple products that don't need to be visible since they're associated with a grouped product (configurable-simple products behave differently when being purchased). I made a separate post regarding this HERE.

So, why is this checking $address (Mage_Sales_Model_Quote_Address)? I'm still not clear why this simple product does not have a validated address.


texts: I need to get product collection by filter multiple category ids and attributes in magento 2

texts:
I need to get product collection by filter multiple category ids and attributes
i tried below ways
$prodColl = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
                $collection = $prodColl->addAttributeToSelect('*')
                        ->addAttributeToFilter('store_brand', ['eq' => $params['store_brand']])
                        ->addAttributeToFilter('store_model', ['eq' => $params['store_model']])
                        ->addAttributeToFilter('store_year', ['eq' => $params['store_year']])
                        ->addCategoriesFilter(['eq' => 296]);

i tried separate collection
$prodColl = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
                    $collection = $prodColl->addAttributeToSelect('*')
                            ->addAttributeToFilter('store_brand', ['eq' => $params['store_brand']])
                            ->addAttributeToFilter('store_model', ['eq' => $params['store_model']])
                            ->addAttributeToFilter('store_year', ['eq' =>$params['store_year']]);
$collection->addCategoriesFilter(['eq' => 296]);

i have done some R&D  fallowed this link
Magento 2: Filter Product Collection by Multiple Categories (Magento 2.1)
but still no result


texts: How to sort product collection on stock status

texts:
I want to sort product collection on category page so that the in stock products shall appear before out of stock products. All the out of stock products will be displayed after the in stock products. I have already rewritten the Mage_Product_Block_List block. After rewriting I have tried the following:

protected function _getProductCollection()
{
    if (is_null($this->_productCollection)) {
        $layer = $this->getLayer();
        /* @var $layer Mage_Catalog_Model_Layer */
        if ($this->getShowRootCategory()) {
            $this->setCategoryId(Mage::app()->getStore()->getRootCategoryId());
        }

        // if this is a product view page
        if (Mage::registry('product')) {
            // get collection of categories this product is associated with
            $categories = Mage::registry('product')->getCategoryCollection()
                ->setPage(1, 1)
                ->load();
            // if the product is associated with any category
            if ($categories->count()) {
                // show products from this category
                $this->setCategoryId(current($categories->getIterator()));
            }
        }

        $origCategory = null;
        if ($this->getCategoryId()) {
            $category = Mage::getModel('catalog/category')->load($this->getCategoryId());
            if ($category->getId()) {
                $origCategory = $layer->getCurrentCategory();
                $layer->setCurrentCategory($category);
                $this->addModelTags($category);
            }
        }
        **$this->_productCollection = $layer->getProductCollection()->addAttributeToSort('stock_status', desc);**

        $this->prepareSortableFieldsByCategory($layer->getCurrentCategory());

        if ($origCategory) {
            $layer->setCurrentCategory($origCategory);
        }
    }

    return $this->_productCollection;
}


texts: Magento 2. Ui component increase input size

texts:
I have a ui-component generated form.
Inside the form a datetime input is generated.
The value shown is truncated because the value is bigger than the input.

This is my input definition

<field name="created_at">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string">Created At</item>
            <item name="visible" xsi:type="boolean">true</item>
            <item name="dataType" xsi:type="string">string</item>
            <item name="formElement" xsi:type="string">date</item>
            <item name="source" xsi:type="string">issue</item>
            <item name="validation" xsi:type="array">
                <item name="required-entry" xsi:type="boolean">true</item>
            </item>
            <item name="options" xsi:type="array">
                <item name="dateFormat" xsi:type="string">MMM dd, YYYY</item>
                <item name="timeFormat" xsi:type="string">HH:mm:ss</item>
                <item name="showsTime" xsi:type="boolean">true</item>
            </item>
        </item>
    </argument>
</field>

This is a ps of the view.

How can I modify the input size to display the whole value?