texts:
There are two parts to this question.

1. How can we add data to the database using factory not through object manager?

2. How can we find exactly what is the error in the code (dev mode is active, var/logs all files are checked)?

I wrote some code i know there is an issue in the code but I am unable to see this in Magento logs . for the sake of adding data to the database, i am doing this. the module is complete and working, in template file code is.

        <?php foreach($block->getItemsResults() as $items) : ?>

<?php echo $items->getName() ?> : <?php echo $items->getDescription(); ?>

    <?php endforeach; ?>
    <form method="post" action="<?php echo $block->getFormData() ?>">
        Add Name Here
        <input type="text" name="name" >
        <input type="submit" name="submit" value="submit">
    </form>

and this is the block file.

<?php

    namespace Mastering\SampleModule\Block;
    use Magento\Framework\View\Element\Template;
    use Mastering\SampleModule\Model\ResourceModel\Item\Collection;
    use Mastering\SampleModule\Model\ResourceModel\Item\CollectionFactory;

    class Hello extends Template {
        private $cf;
        private $messageManager;
        public function __construct(Template\Context $context , CollectionFactory $collectionfactory , array $data = [] ){
            $this->cf = $collectionfactory ;
            parent::__construct($context,$data);
            //$this->messageManager=$messageManager;

        }
        public function getItemsResults(){
            return $this->cf->create()->getItems();
        }
        public function getFormData(){
            $post=$this->getRequest()->getPost();
            if(!empty($post)){
                $name=$post['name'];
                $this->messageManager->addSuccessManager("data saved");
            }
        }
    }

this is the code. what can I do to add data to the database and how can i find an exact errors list? right now the error is messageManager. but there is no way where i can see the error.


texts:
My store looks like the following;

1 Website, with 2 Stores, with each 1 Store view.

I use these 2 Stores, because we sell products in 2 different countries.
For these stores I want to share my product, but I want to define what products are availbile trough each store.

I try to disable products inside a store, but that does not work.
Then the product is also disabled inside the other store.

How can I disable products per store?


texts: How to run Magento 2 from a subdirectory

texts:
I'm trying to set up a Magento 2 site that will run with http://www.example.com/store/ as its home page, but Magento's router is treating that subdirectory path as a frontend module name, and trying to run a module called store that doesn't exist.

My base URLs are configured as such:

mysql> select * from core_config_data where path like '%url';
+-----------+---------+----------+-----------------------+-------------------------------+
| config_id | scope   | scope_id | path                  | value                         |
+-----------+---------+----------+-----------------------+-------------------------------+
|         2 | default |        0 | web/unsecure/base_url | http://www.example.com/store/ |
|         3 | default |        0 | web/secure/base_url   | http://www.example.com/store/ |
+-----------+---------+----------+-----------------------+---------- --------------------+

With this setup, I updated the Nginx config, altering the location declarations to include /store at the beginning. Once that was done I was able to access the site and static assets were loading properly, however any page I tried to access resulted in Magento's fancy 404 page.

Since I knew the request was making it into the Magento app, I had a hunch that Magento's routing was causing the issue. To test, I created a new module with a simple controller at /app/code/MyModules/Store/Controllers/Index/Index.php, and gave it a router with a frontName of store. Once I activated that module and reloaded the page, instead of a 404 I got the simple JSON output I had set up in my custom controller. So I know that Magento is getting the request and thinks the initial subdirectory that is part of its base URL is actually a frontName route.

So at this point I have two questions:

Is it even possible to run a Magento 2 store in a subdirectory like this, or do I have to resort to using a subdomain?
Assuming the answer to 1 is "yes, it is possible", what am I missing to make this work? I feel like there must be some setting somewhere that will resolve this, but I simply don't know where to look anymore.

Update with more details:

Since several people have made suggestions related to the actual location of the Magento application files on my server, I want to clarify that I'm running the Magento site on its own server, and using Nginx to proxy requests matching the /store path from my base server to this one. I don't think that this setup is causing any problems, but I suppose it's possible.

I also went through another diagnostic attempt, to make sure the problem is indeed where I think it is. I'll detail those steps and their results below.

I updated my proxy server to send all traffic on store.example.com to the server running Magento.
I updated the base URLs in core_config_data to http://store.example.com. Once this was done, I was able to access the Magento site and it behaved normally.
I logged in to the Magento admin area and updated the URLs via the UI, changing both the secure and unsecure URLs to http://store.example.com/store/.
Once I clicked "save" on the settings, the page reloaded and the URL changed from store.example.com/admin/admin/system_config/edit/... to store.example.com/purchase/admin/admin/system_config/edit/..., and 404ed.
The basic module that I'd created earlier (with a frontName of store) still worked, and was the only page I was able to load without a 404.
Further attempts to access the site on store.example.com/ were redirected to store.example.com/store/

What this tells me is Magento understands that it has a new base URL (thus the redirects to /store/), but that there is still some additional setup or configuration somewhere that must be missing, since the router is still trying to interpret that part of the URL path. Is there a separate setting for the router base path that's different from the website base URL maybe?

Update 2: The Second

I got this working in a way that feels much more like a "hack" than a solution. I've detailed that method in an answer below.


texts: Magento 2 - Will x-magento-init tag apply from a html template?

texts:
Update

x-magento-init with knockout does not work from a html template, but works perfectly when used identically inside a phtml file.

Status:

x-magento-init script being processed inside modal content as soon as it is loaded.
Component running initialize function.
Component matching scope / pulling properties into page html [Not yet]

I have a html template that is being pulled in like so:

define([
    'jquery',
    'Magento_Ui/js/modal/prompt',
    'text!elcocustomer/template/summary-edit/password.html',
    'text!elcocustomer/template/summary-edit/address.html',
    'text!elcocustomer/template/summary-edit/text.html',
    'text!elcocustomer/template/summary-edit/shipping-address.html'
], function(
    $,
    prompt,
    passwordTemplate,
    addressTemplate,
    textTemplate,
    deliveryAddress
) {

    var templates = {
        text: textTemplate,
        password: passwordTemplate,
        address: addressTemplate,
        delivery: deliveryAddress
    };

This is then being pulled into a Magento 2 modal prompt (    'Magento_Ui/js/modal/prompt') like so:

    promptContentTmpl: addressTemplate,

This works well so far, but now I want to pull data into the html template (addressTemplate) itself, so I have added this to the address template:

This was taken from another answer on here that appears to work for people - but with different usage. I believe I need to trigger the x-magento-init in the template file... I need to double check the initialise function ins't running on that component first.

Is what I'm trying to do possible?


texts: Magento cannot use cli related to database

texts:
I use MAMP to run magento locally. Whenever I use cli related to the database. For example:
bin/magento store:list
bin/magento setup:db:status

I got this error:
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

Other commands work just fine, for example
 bin/magento cache:clean

This is my env file:
'db' => [
        'table_prefix' => '',
        'connection' => [
            'default' => [
                'host' => 'localhost',
                'dbname' => 'projectdev',
                'username' => 'test',
                'password' => '123456',
                'active' => '1',
                'driver_options' => [

                ]
            ]
        ]
    ],

Note that I can install Magento successfully, so it apparently connects to my SQL. All the database credential is correct. However, it shows error when I use CLI.
I tried to change the host to 127.0.0.1 as well
PHP version: 7.3.9 SQL version: 5.7.26


texts: Magento 2 show normal price with special price on minicart

texts:
I can set Normal price along with Special price while put custom function in core file

vendor/magento/module-weee/Block/Item/Price/Renderer.php

public function getUnitItemPriceExclTax()
{
    $priceExclTax = $this->getItem()->getProduct()->getPrice();

    return $priceExclTax;
}

And calling this function into core file,
vendor/magento/module-weee/view/frontend/templates/checkout/cart/item/price/sidebar.phtml

So getting both price correctly, but i want to override that

vendor/magento/module-weee/Block/Item/Price/Renderer.php block on my custom module.

I have created di.xml with below code :

<preference for="Magento\Weee\Block\Item\Price\Renderer" type="<namespace\<module_name>\Block\Item\Price\Renderer"/>

And just put that getUnitItemPriceExclTax() function in that block.


texts: How to create colour and size select box for product Magento 1.9

texts:
In that product, I need a new color box "red" how can do it. here I got color and size  attribute

 [0] => Array
                        (
                            [product_super_attribute_id] => 57
                            [value_index] => 18
                            [label] => Purple
                            [default_label] => Purple
                            [store_label] => Purple
                            [is_percent] => 0
                            [pricing_value] =>
                            [use_default_value] => 1
                        )

                )

            [attribute_id] => 92
            [attribute_code] => color
            [frontend_label] => Color
            [store_label] => Color
        )

but unable to understand how can I use it and where to edit.
please let me know step by step I  am new in Magento.


texts: Observer throw Exception message without loading logic

texts:
Observer :

public function cartevent(Varien_Event_Observer $observer) {

        // Load product
        $product = $observer->getProduct();
        $prodID = $product->getId();
        $_product = Mage::getModel('catalog/product')->load($prodID);

        // get category id
        $categoryIds = $_product->getCategoryIds();

        // check cart
        $cart_qty = (int)Mage::getModel('checkout/cart')->getQuote()->getItemQty();

        // check conditiion cart has other products
        if(in_array(681, $categoryIds) && $cart_qty > 0) {
            Mage::throwException("You can not add This special Product, empty cart before add it");
        }

        // check if other products add to cart
        $quote = Mage::getModel('checkout/cart')->getQuote();
        foreach ($quote->getAllItems() as $item) {

            $_product1 = $item->getProduct();
            $categoryIds1 = $_product1->getCategoryIds();
            if(in_array(681, $categoryIds1)) {
                Mage::throwException("If you want Kolu Padi, Purchase alone not mixed with other Products");
                break;
            }
        }
    }

If try to add cart in website, gettin error,

a:5:{i:0;s:67:"If you want Kolu Padi, Purchase alone not mixed with other Products";i:1;s:1835:"#0 /home/abc/public_html/app/code/local/Gta/KolupadiRestrict/Model/Observer.php(21): Mage::throwException('If you want Kol...')
#1 /home/abc/public_html/app/code/core/Mage/Core/Model/App.php(1358): Gta_KolupadiRestrict_Model_Observer->cartevent(Object(Varien_Event_Observer))
#2 /home/abc/public_html/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Gta_KolupadiRestrict_Model_Observer), 'cartevent', Object(Varien_Event_Observer))
#3 /home/abc/public_html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('checkout_cart_p...', Array)
#4 /home/abc/public_html/app/code/core/Mage/Checkout/Model/Cart.php(290): Mage::dispatchEvent('checkout_cart_p...', Array)
#5 /home/abc/public_html/app/code/local/Cmsmart/AjaxCart/controllers/IndexController.php(315): Mage_Checkout_Model_Cart->addProduct('5071', Array)
#6 /home/abc/public_html/app/code/local/Cmsmart/AjaxCart/controllers/IndexController.php(133): Cmsmart_AjaxCart_IndexController->tryaddAction(Object(Mage_Catalog_Model_Product), Array)
#7 /home/abc/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Cmsmart_AjaxCart_IndexController->indexAction()
#8 /home/abc/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#9 /home/abc/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#10 /home/abc/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#11 /home/abc/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#12 /home/abc/public_html/australia/index.php(93): Mage::run('australia', 'website')
#13 {main}";s:3:"url";s:100:"/ajaxcart/index/index/?form_key=MtlJbvKkqPQKCLJR&product=5071&related_product=&qty=1&_=1565155804563";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:9:"australia";}


texts: Export all product from dataflow- profile in magento

texts:
I want to export all product from with the help of dataflow profile in Magento.

In my site I have 3000+ products. When I export product data from dataflow profile, it opens the new window and after 1 or 2 seconds it is showing "500 Internal error".

So I can't export my products.

Please help me, how to export my all products from dataflow? And also, are there any alternative solutions?


texts: magento2.2 override topmenu.php: _addSubMenu()

texts:
I am trying to override the Topmenu Module Block but I can not understand why it fails.
I am trying to override the following method:

  magento/module-theme/Block/Html/Topmenu.php:_addSubMenu(...)

I have created the following folders/files:
app/code/Custom/Theme/Block/Html/Topmenu.php (If it works, "lala" should be appeared at the menu):

Topmenu.php
<?php

namespace Custom\Theme\Block\Html;

class Topmenu extends \Magento\Theme\Block\Html\Topmenu
{
protected function _addSubMenu($child, $childLevel, $childrenWrapClass, $limit)
{
    $html = '';
    if (!$child->hasChildren()) {
        return $html;
    }

    $colStops = null;
    if ($childLevel == 0 && $limit) {
        $colStops = $this->_columnBrake($child->getChildren(), $limit);
    }

    $html .= '
';
    $html .= $this->_getHtml($child, $childrenWrapClass, $limit, $colStops);
    $html .= '
lala

';

    return $html;
}

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

}

app/code/Custom/Theme/etc/ has two files:

di.xml
<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Theme\Block\Html\Topmenu" type="Custom\Theme\Block\Html\Topmenu" />
</config>

module.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Custom_Theme" setup_version="0.0.1" />
</config>

And the registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Custom_Theme',
__DIR__
);

Is this approach correct? What do I miss?


texts:
When running 1.7.x if we tried to open a link in to the admin section but we weren't logged in, we could login and it would automatically bring us to the page we had first tried to access.

After upgrading to 1.9.2.2, after login we are always brought to the default page (in our case that's the Orders page, but for most people it is probably the Dashboard).

For example, clicking a link to edit a product: http://example.com/index.php/customadmin/catalog_product/edit/id/481/

If we were not logged in in 1.7.x it would ask us to login, then bring us to that that. Now it brings us to the default Admin start page.

Update 3-22-2016 - More Details

Cache and compilation are disabled.

I have tried disabling all modules that have <use>admin</use> in their config.xml files. In fact I have tried disabling all non-core modules.

After doing so I log out, log back in, copy a URL to an order, log out, visit that URL, login, and I still get rerouted to the Dashboard/Orders page.

I have tested this on a new install, and a fresh install (new store) - both have the same result.


texts:
1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'item': Duplicate key-sequence ['children'] in key identity-constraint 'itemName'.
Line: 2093


texts: magento 2: Product Page gallery.js issue

texts:
On product page the below console error showing
i just set fullscreen=false gallery.phtml

  <script type="text/x-magento-init">
    {
        "[data-gallery-role=gallery-placeholder]": {
            "mage/gallery/gallery": {
                "mixins":["magnifier/magnify"],
                "magnifierOpts": <?= /* @escapeNotVerified */ $block->getMagnifier() ?>,
                "data": <?= /* @escapeNotVerified */ $block->getGalleryImagesJson() ?>,
                "options": {
                    "nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/nav") ?>",
                    <?php if (($block->getVar("gallery/loop"))): ?>
                        "loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/loop") ?>,
                    <?php endif; ?>
                    <?php if (($block->getVar("gallery/keyboard"))): ?>
                        "keyboard": <?= /* @escapeNotVerified */ $block->getVar("gallery/keyboard") ?>,
                    <?php endif; ?>

                        "arrows": true,
                        "swipe": true,

                        "allowfullscreen": false,

                        "showCaption": false,

                        "width": "<?= /* @escapeNotVerified */ $block->getImageAttribute('product_page_image_medium', 'width') ?>",
                        "maxwidth":"430px",
                        "thumbwidth": "<?= /* @escapeNotVerified */ $block->getImageAttribute('product_page_image_small', 'width') ?>",
                        <?php if ($block->getImageAttribute('product_page_image_small', 'height') || $block->getImageAttribute('product_page_image_small', 'width')): ?>
                        "thumbheight": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_small', 'height')
                            ?: $block->getImageAttribute('product_page_image_small', 'width'); ?>,
                        <?php endif; ?>
                        <?php if ($block->getImageAttribute('product_page_image_medium', 'height') || $block->getImageAttribute('product_page_image_medium', 'width')): ?>
                        "height": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_medium', 'height')
                            ?: $block->getImageAttribute('product_page_image_medium', 'width'); ?>,
                        <?php endif; ?>
                        <?php if ($block->getVar("gallery/transition/duration")): ?>
                        "transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/transition/duration") ?>,
                        <?php endif; ?>
                        "transition": "<?= /* @escapeNotVerified */ $block->getVar("gallery/transition/effect") ?>",
                        <?php if (($block->getVar("gallery/navarrows"))): ?>
                            "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/navarrows") ?>,
                        <?php endif; ?>
                        "navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/navtype") ?>",
                        "navdir": "<?= /* @escapeNotVerified */ $block->getVar("gallery/navdir") ?>"
                    },
                "fullscreen": false,
                "breakpoints": <?= /* @escapeNotVerified */ $block->getBreakpoints() ?>
            }
        }
    }
</script>


texts: Migrated to Magento 2 - reduced visitors in Google Analytics (but stable sales) from Organic search

texts:
I migrated about a month ago to Magento 2. Since then, I've experienced a sharp decline in page views and visitors. Although, sales are stable. Part of the decline was expected due to various issues related to transition (but expected it to be stabilized later on).

To recover, I started a project with targets on new visitor per traffic type. This made me realize that I, in principle,  got no new visitors from Organic search. Webmaster tools still shows many visitors coming from Google (but maybe, just maybe, and unlikely, they have visited the page before through direct visit).

Anyone that had similar experience? What was the cause? How did you resolve it?

My first guess was that this issue is related to this bug, Analytics not tracking when Cookie restriction notice is enabled. However, I used Google Tag Assistant, and recorded an interaction with the web page and with cookies disabled, it didn't track and then, with cookies enabled, it started to track (expected behavior). I also used the Google Analytics Debugger plugin to chrome and verified that the beacon was sent once I allowed cookies.

My second guess is that customers don't accept the cookies and manage to shop anyway. If so, any ideas on how I could measure this? I use Apache with full access to the logs and server.

Some analytics data

Overall:

sessions: -58.7 %
new sessions: -22.76 %
new users: -68.1 %
income: -2.54 %

Referral:

sessions: -62.92 %
new sessions: -90.62 %
new users: -96.52 %
income: -1.58 %

Organic search

sessions: -84.70 %
new sessions: -90.15 %
new users: -98.49 %
income: -42.28 %

Social

sessions: -95.69 %
new sessions: -87.17 %
new users: -99.45 %
income: -100 %

Direct

sessions: -10.35 %
new sessions: -1.43 %
new users: -11.63 %
income: 233.15 %

Some changes I did when upgrading to M2 that may impact number of visitors:

HTTPS / TSL
Cookie restriction notice
Fail2Ban
mod_pagespeed

After migrating, I spent some time reviewing the sites and my setup with Google Webmaster Tools, Google Analytics and Tag Assistant. I also later configured Analytics to exclude my own developer IP.

Using Tag Assistant, I was able to find out that GA PageView was triggered twice. I made some changes in the .js, which removed that issue.


texts:
I need to remove JS-type from my script tag(s) for optimization. I am using magento 1.9, and this is a response to the following error:

thank you


texts:
I create my first magento extension "Us address corrector" .

Please give a look on document of magento extension.

https://docs.google.com/document/d/1kae_iFds4uWEpC_TtXG2rZKDeyhnlkFVvSLR8BYy_n0/edit#

I have information about if document are not cleared then extension will be not approved.

Please give me some suggestion if any bugs contain my document.

How i improved my document before submission of my extension on magento.com

Note:-I used Magento Connect Manager ver. 1.8.1.0

I have another question is:-

I'm  not add extension in configuration menu it present in configuration/advanced
so,is there any problem in approval of magento extension.

Thanks in advanced.


texts: Why some attributes can't search in storefront?

texts:
I have two custom attributes, all with these options:

Products are imported programatically by cron, set in website and have these attributes.
When I search one attribute I see results but by the second I receive these notice:

  Your search returned no results.

Website is in production, I refreshed the cache and reindex indexers...
Can you help me to solve these issue? The two attributes should be searchable in storefront but one isn't.

Attribute thant isn't searchable only have numbers, but is stored in text and i save it in cron in a string.

EDIT
I see that attribute value what can search is visible in backend in all stores but other attribute value only is visible in one store, how can  put value visibility in all stores?


texts:
Currently working adding US State and City Tax for US Store.

Each state in America has different Tax amounts that must be added to sales, but within those States there can also be City tac which must also be added on top of.

For example, Washington has a State tax of 6.5% (for example), the city of Bellevue in Washington has a City tax of 3.5% (for example), meaning that anyone ordering to Bellevue Washington would need to pay 10% tax on sales.

I was wondering if there is a way to combine these two together somehow?

I have added the State Tax in Magento Admin using the Tax Zone and added to the Tax Rules, this works correctly for the state.

Now for the city tax, I have repeated to process in adding the Tax Zone, but have added the Postcode range. But it only takes a range of postcodes which doesn't work properly.

Example, if Bellevue has the following postcodes: 1,2,3,4,6
And i put a postcode range from 1 and to 6

Once in the checkout and add the correct shipping details BUT put a postcode of 5, it picks up the Bellevue city tax which is not what i want to happen, it should revert back to the state tax.

Hope this is understandable.


texts:
I created a user, and I can't add any role to him..

I want to add this roles to my user...
my code is below... and when I save the user and the role, I don't see this green "V" on my role.. I just see that my user and role was attached and the role is empty..

 $roleAuthModel = $objectManager->create('\Magento\Authorization\Model\Role');

            $roleAuthModel->setName($this->userName)
            ->setPid("0")
            ->setRoleType("G")
            ->setUserType(UserContextInterface::USER_TYPE_ADMIN);
            $roleAuthModel->save();

            $resource = [
                'Magento_Backend::admin',
                'Magento_Products::inventory',
                'Magento_Products::inventory_catalog',
                'Magento_Products::inventory_categories'
            ];

            $roleAuthModel->setRoleId($roleAuthModel->getId())->setResources($resource)->save();

            $userModel->setRoleId($roleAuthModel->getId());


texts:
Have tried installing AOE Profiler on a Magento CE 1.8 site, successfully installed with Composer but despite enabling it in index.php, local.xml and the Magento backend, the profiler doesn't appear in the footer. Have refreshed caches, restarted Apache to flush APC.
No IP address specified so it's not that that is stopping it.

All to no avail, can anyone suggest how I can work out why this isn't working?


texts: How to get order_increment_id using SOAP API in Magento 2

texts:
In Magento 1, we get the 'order_increment_id' when we use the 'order_creditmemo.info' parameter in SOAP API.

The same thing I want to fetch in Magento 2 SOAP API. But when I am trying to get order_increment_id by using 'salesCreditmemoRepositoryV1'. It does not return the 'order_increment_id'.

Can someone please help me to get 'order_increment_id' by using any other Repository?

$response = $request->salesCreditmemoRepositoryV1GetList(array('searchCriteria' => ''));

    $fullData = objectToArray($response);

    function objectToArray($d) {
    if (is_object($d)) {
        // Gets the properties of the given object
        // with get_object_vars function
        $d = get_object_vars($d);
    }

    if (is_array($d)) {
        /*
        * Return array converted to object
        * Using __FUNCTION__ (Magic constant)
        * for recursive call
        */
        return array_map(__FUNCTION__, $d);
    }
    else {
        // Return array
        return $d;
    }
}
$creditmemos = $fullData['result']['items']['item'];

      foreach ($creditmemos as $creditmemo) {
                $response1 = $request->salesCreditmemoRepositoryV1Get(array('id' => $creditmemo['incrementId']));
                 $fullMemoResult = $this->objectToArray($response1);
                echo "<pre>";print_r($fullMemoeResult);
            }

    ?>


texts: How can I change it so that I can make a partial inventory transfer between sources?

texts:
I'm setting up Magento 2.4 for a client and super excited about the new multiple source inventory management but it only allows for transferring all inventory between sources and not partial. Is there an extension that will do this for me or will have to create my own? Also is there an extension that will allow a scannable stock take?
Thanks!


texts: magento 1.7.0.0 security patch SUPEE-10415 installation issue - Hunk #1 FAILED

texts: Please help me to get rid of this problem and help me to install this SUPEE-10415 security patch on Magento 1.7.0.0.


texts:
Please help me. I don't know why it has 2 "Compare Products" and "My Orders" inside user dashboard. Can you help me to figure it out what template should I check?

I'm using Magento Enterprise 1.14 and RWD Theme

Thank you in advanced


texts: Cart Price Rules does not work on a Configurable Simple Products

texts:
I am trying to create a promotion code, 17% off selected products with minimum spending of $30.

the selected products eligible for this promotion code are

SKU1 (parent configurable product a)
SKU1-1, SKU1-2, SKU 1-3, SKU 1-4 (4 out of 4 child product of configurable parent product a)
SKU 2 (parent configurable product b)
SKU 2-1, SKU 2-2, SKU 2-3 (3 out of 5 child product of configurable parent product b)

under the "conditions", here is what i did:

Category 36 consist of the aforementioned SKUs.

Problem:

When the discount code was applied, the balance 2/5 child product
(of configurable parent product b) that are not included in Category
36 got discounted as well.

How do i get the promotion code to take effect without the two child products of configurable parent product b being included?

I have tried to exclude configurable parent product b in Category 36, but the code would then fail to apply in the checkout page.

I have also tried to include the product specific SKUs (in both Actions and Conditions) instead of the Category. But it doesnt seem to work as well.


texts: How to create product review as a popup modal in magento 2

texts: I need to create product review as a popup modal.While clicking add review in product page it should show an popup modal, Now Please help me which files do I need to override.


texts: Adding SOLR category refinement to cms page EE 1.9

texts:
Add SOLR category refinement to cms page (which already include a widget that displays new products).

Is it possible to do this? If so, how?  I know you can't use php code within cms pages.  any directional attack vector suggestions would be appreciated.


texts: Why default Magento2 .gitignore file ignores composer.json, Gruntfile.js?

texts:
It's a simple question: why does Magento ignore by default package.json, Gruntfile.js and grunt-config.js files?
https://devdocs.magento.com/guides/v2.3/config-guide/prod/config-reference-gitignore.html

I understand that for a production environment this should be the case, but when sharing my project with other developers, it's a problem not having these files. We could create a project config folder with these files and then copy them, but why does Magento prefer just ignoring them?

Thanks!


texts: New Cart and Quote default shipping method and collect shipping rates flag

texts:
I've set up a custom shipper, called companyname_customrate and would like every sales cart / quote created to automatically be assigned this shipping method, as well as have the collect_shipping_rates flag be set to true.

How can I make Magento automatically set these two fields for every cart / quote and make sure that nothing else can change them?


texts: Restricting the number of products allowed in a cart based on an attribute

texts:
I am creating for a client a magento site to sell health and beauty products.  Here is my issue.

Some of the products being sold by law are restricted on the amount you can sell in one purchase. for instance....

The maximum amount of restricted items allowed in the cart at one time is 2.

so you could have 2 packets of Parecetamol but no Asprin
or
1 packet of paracetamol and 1 packet of Aspirin.

This is now the new law across the European Community so will be a very sort after function.

I am looking for a solution to this.


texts:
Is there any way to use the simple products already in your product list with a configurable product?

Having problems with swatches too. does anyone know of a swatch extension that works well with the Infortis Ultimo theme?


texts:
We run a Magento 1.9 online store. It contains 110,000 products. We are running into issue around long page load times for category pages and product pages.

Dedicated WebApp server specs:
 - Apache 2.4
 - PHP 5.6
 - PHP.ini heavily tweaked, along with an 8GB Redis cache
 - 6 CPU Cores
 - 16GB Memory
 - SSD Storage

Dedicated Database Server:
- MySQL 5.6 (tuned with MySQL Tuner).
 - 6 CPU Cores
 - 16GB Memory
 - SSD Storage

The site hasn't launched yet as we are trying to fix these performance issues.

Seems to me the bottleneck is the database. I've read nearly every article I could find on improving performance but we are still at 6-11s load times.

[mysqld]

innodb_buffer_pool_instances = 11
innodb_log_file_size = 1024M
innodb_buffer_pool_size = 12000M
query_cache_size = 64M
query_cache_type = 0
query_cache_limit = 2M
key_buffer_size = 36M
max_heap_table_size = 16M
tmp_table_size = 256M
join_buffer_size = 8M
max_allowed_packet = 16M
innodb_lock_wait_timeout=300
innodb_read_io_threads = 8
innodb_write_io_threads = 8
innodb_thread_concurrency = 12
max_connections = 500
thread_cache_size = 32
thread_concurrency = 12
innodb_flush_log_at_trx_commit = 2
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Actual server resource usage is low. I'd love any recommendations on how we can improve the load speed and increase server resource usage of CPU and Memory.


texts:
I have installed a new magento store.

I upload the image but, when i rollover the image, the image missing.

I have see into directory:

/media/catalog/product/p/r/prodotto-prova-1_6.jpg

the image exists but from the browser missing.
http://my-domain.com/media/catalog/product/p/r/prodotto-prova-1_6.jpg
the image missing

Why?

Thanks
Ale


texts:
I'm working with a catalog in M2 that has been somehow migrated (don't know how). It has url_path migrated and has the form of url_key + html. This is causing the URL rewrites to create URLs that end with http://example.com/.../.html.html.

Looking a the DB and code, it looks like it's for bundle or configurable  products but still unclear what it is for. Removing them from simple and configurable products don't seem to have any affects.

Any ideas if url_path data is need for anything?


texts: Admin Grid - Assign CSS class to new orders

texts:
I'd like to simply add a new-order class to an order row (or field, which seems simpler) if an order was placed in the last day.

For testing, I haven't moved anything to an overridden class, I'm simply working directly in the app/code/core/Mage/Adminhtml/Widget/Block/Grid/Column/Renderer/Longtext.php class just to get it working.

I have it basically set up how I like, but my logic is applying the class to all rows instead of just those I specify. I feel like I'm missing something simple. Here's some code:

class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Longtext extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
    public function render(Varien_Object $row)
    {
        // ...native code
        if ($this->getColumn()->getId() == 'real_order_id') {
            // realized this is available already with $row->getData()
            // $order = Mage::getModel('sales/order')->loadByIncrementId($text);

            $yesterday = strtotime("-1 day", Mage::getModel('core/date')->gmtTimestamp());
            $yesterday = Mage::getModel('core/date')->date(null, $yesterday);

            if ($row->getCreatedAt() > $yesterday) {
                $this->getColumn()->setColumnCssClass('new-order');
            };
        }

        return $text;
    }
}

When I make the call to setColumnCssClass() from here, it sets the data properly in the getData() object, but it is adding it for all rows; however, it is not actually applying that CSS class to the column.


texts:
Im trying to load more than 1 jquery library into the Magento theme, but the 2nd trigger for flickity seems to error

  Uncaught TypeError: $(...).flickity is not a function
      at HTMLDocument. (requirejs-config.js:721)
      at fire (jquery.js:3232)
      at Object.add [as done] (jquery.js:3291)
      at jQuery.fn.init.jQuery.fn.ready (jquery.js:3542)
      at jQuery.fn.init (jquery.js:2967)
      at new jQuery.fn.init (jquery-migrate.js:225)
      at jQuery (jquery.js:75)
      at requirejs-config.js:719
      at Object.execCb (require.js:1650)
      at Module.check (require.js:866)

Code i'm using in requirejs-config.js

var config = {

deps: [
    "jquery",
    "js/foundation",
    "js/what-input",
    "js/flickity"
],

paths: {
    'foundation'    :   'js/foundation',
    'what-input'    :   'js/what-input',
    'flickity'      :   'js/flickity'
},

shim: {
    'slick': {
        deps: ['jquery'],
        exports: ['jQuery.fn.slick'],
    }
}

};

require(['jquery', 'foundation', 'what-input', 'flickity'],function($){

$(function() { // document.ready shorthand
    $(document).foundation();
    $('.main-carousel').flickity();
});

});


texts: Importing product listings from Amazon into Magento

texts: I am looking to import by book listings from Amazon into Magento


texts: Error Call to a member function get ProductName () Error in configurable products

texts:
I have a little big problem. After the migration of the catalog for a new store in a "clean" installation of Magento I started to have problems with configurable products. When you select an option and click buy, instead of adding the product to cart, returns the error message:

  Fatal error: Call to a member function setProductName () on a non-object in
  /home/alter648/public_html/compras/app/code/core/Mage/CatalogInventory/Model/Observer.php
  on line 387

Searching on the internet I found something similar in https://stackoverflow.com/questions/26414137/cannot-add-to-cart-configurable-product-after-migration-magento but that did not solve.

Already checked the records of the configurable product and simple products, and found no difference in relation to the registration in the previous store. I checked and saved and changed nothing.

Does anyone have any idea how to solve?


texts: Magento Products Ordered Report results in white screen

texts:
When I run Reports > Products > Products Ordered and set a timeframe for the past month with "Day" selected in the Show By drop-down, the report seems to start running, but then hangs for a long time and then just freezes on a blank white screen.

I checked the web server error log, and an error was showing that the PHP memory of 256mb had run out, so I decided to increase it up to 512mb, and then 900mb.  Despite the increases, the Reports still hung for a long time and eventually landed on the blank screen again, though I no longer saw the PHP memory error in the log.

Does anyone have an idea why this particular style of the report would cause problems?  I don't have issues generating other types of reports, and if I do the same report by "Year", or even still leave it at "Day" and only do a few days back, it works fine.  It just seems that once the time span is increased while setting to "Day", it hangs and freezes.  Any help on figuring out the issue is greatly appreciated, thanks!


texts:
I am just starting using developing a module,
to replace the order view history block and add some message on it.

I made my own block and it works, I refresh a fill time to make sure it wasn't
just a luck.

But then when I back from my little break, the page just turn 503 and not working again.

I tried upgrade/clean and flush cache but it doesn't help.

I do look up from the var/log but got nothing.

Do any one know what should I do to this? Because I ready spend a long time on this error.


texts: why pages taking more time to load magento 1.9?

texts:
actually we are using lazy loading custom extension even pages taking more time to load  magento 1.9.Mostly products list page only it is taking more time.

<?xml version="1.0"?>
<config>
  <modules>
    <Shop_Custommodule>
      <version>0.1.0</version>
    </Shop_Custommodule>
  </modules>
  <frontend>
    <routers>
      <shop>
        <use>standard</use>
          <args>
            <module>Shop_Custommodule</module>
            <frontName>shop</frontName>
          </args>
      </shop>
    </routers>
        <layout>
          <updates>
            <shop>
              <file>shop.xml</file>
            </shop>
          </updates>
        </layout>
  </frontend>
  <global>
    <helpers>
      <shop>
        <class>Shop_Custommodule_Helper</class>
      </shop>
    </helpers>
    <blocks>
      <shop>
        <class>Shop_Custommodule_Block</class>
      </shop>
    </blocks>

  </global>
  <adminhtml>
    <acl>
        <resources>
            <all>
                <title>Allow Everything</title>
            </all>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <shop>
                                        <title>shop - All</title>
                                    </shop>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
  </adminhtml>
</config>


texts: How to display custom category attribute in category form magento2?

texts:
I have created custom category attribute in Magento 2.1.X version. Attribute created successfully in the database.

I know display category attribute using UI-component 'category_form.xml' but that would be static we have to write each and everything in XML.

I want to display dynamic category attributes in category form could anyone suggest me how we can achieve this?

Also found this issue is reported in github also https://github.com/magento/magento2/issues/5942 .


texts: Which files & folders do I replace in order to upgrade Magento 2 manually?

texts:
Which files and folders need to be replaced in the Magneto root folder in order to upgrade Magento 2 Manually?
I am running a stock copy of Mangento 2.3.5 on a Ubuntu 18.04 test server.
I am trying to upgrade from Mangento 2.3.5 to Magento 2.4.1
So far I have installed php 7.4, the required php extensions and elasticsearch 7.6. I have downloaded a copy of Magneto 2.4.1
I know this could be achieved via composer and then using the Magento upgrade command. However, I would like to know how to go about doing this manually, so I could keep track of what is changed and learn the processes that take place during an upgrade.
I appreciate any help that you could provide.


texts: Create adminhtml url with key from frontend page magento

texts:
I want to create a link to a module of adminhtml in email sent from module of frontend of magento. I have taken reference from link:
https://stackoverflow.com/questions/11450146/magento-generating-url-for-a-backend-action-with-key
but this redirects to the dashboard of admin panel every time.

Please suggest me something.
I think the problem is in the key and storecode, creating url using above method gives value of storecode and also gives wrong value of Key in url.


texts:
Want to open a popup by clicking the button in homepage.
inside the popup form will be submitted using Ajax call


texts: Magento Logged Error:“ Warning: array_filter() expects parameter 1 to be array, null given in…”

texts:
I'm getting a logged error withing my magento backend for this about every 5 mins an its using up a lot of my site memory because of how frequently this error is logged. What should I do to fix this error?

I have been given a filename and line :

FrontendConfigurableProductMatrix/controllers/CartController.php on line 55

here is the code for lines 50-60:

unset($params['product_matrix']);

$product_matrix = $this->getRequest()->getParam('product_matrix');

if (count(array_filter($product_matrix['qty'])) == 0) {
    if(count($params['super_attribute']) != 0 && count($params['super_attribute']) == count(array_filter($params['super_attribute']))) {
        $product_matrix = array();
        $product_matrix['qty'] = array( $params['product'] => $params['qty']);
        $product_matrix[$params['product']] = $params;
    } else {


texts: Help please with correct saving multiselect field for Store view edit form

texts:
Please help with correct saving adding custom field for Store View edit form.

Default Magento Store view edit form:

  Stores->All Stores->Any Store

https://screencast.com/t/WPA3owq3
https://screencast.com/t/2t3Bg9vYizH0

Here is the way how I have added custom field:

using observer (subscribed on the adminhtml_store_edit_form_prepare_form event via adminhtml/events.xml) and

added field https://screencast.com/t/bUow3hzc73Aq  In the admin part new field has been added successfully, BUT I have trouble with multiple values sending (event if I select couple values, anyway magento SENDS ONLY ONE value - https://www.screencast.com/t/GOyaXm1m).

Please Help me on this  I fighting on this issue more than 2 days already.
Maybe anybody knows about any existing restriction for Store View edit form?


texts: Can't change tables to INNODB and indexer problem with Category Flat table

texts:
At the moment we have an issue with our Magento 1.7.0.2 database. It seems that some duplicated records were added to the database and now we can't reindex the Category Flat Data without making the website unresponsive. Every time we try to reindex the following error appears:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.catalog_category_flat_store_1' doesn't exist

Right now we have to restore the catalog_category_flat_store_1 table manually to keep the website online. But very soon we'll need to reindex this table again.

I restored the database on a development environment and did the same process with the same outcome. However, this time, after reindexing the catalog flat data, I ran this two commands:

ALTER TABLE catalog_category_entity ENGINE=INNODB;
ALTER TABLE core_store ENGINE=INNODB;

Then I ran the indexer and everything worked fine! So I think that's the solution.

I want to run those two commands on my production database, but every time I try to do that the following error appears:

#1025 - Error on rename of './db/#sql-7fbd_5895f0' to './db/catalog_category_entity' (errno: 121)

Is there anything I can do to alter those tables and restore the database to a better state?

Thanks


texts: Retrieving order detail on magento multiple address checkout

texts:
as i customizing my magento onepage checkout, i retrieve the data with

$order_details = Mage::getModel('sales/order')->loadByIncrementId($order_id); in my success.phtml file

and then disable the session by this code

// $session->clear(); in mage onepage controller page

now i am just wondering, how to retrieve it on multiple address checkout success,

actually i want to make my multiple address checkout confirmation looks like the overview page (previous page before place order)

Any suggestion will be appreciated, thanks


texts:
Magento 2.3.3
Installation of Clearpay payment plugin.
On completion of checkout, user is returned to an empty shopping cart rather than order confirmation page.  Order is recored in backend and order confirmation emails are sent.
Nothing in logs but following error in Console:
Uncaught TypeError: Cannot read property 'quoteData' of undefined
at quote.min.js:2
at Object.execCb (10b3c252f72fe3679fe8c8942cf02279.min.js:112)
at Module.check (10b3c252f72fe3679fe8c8942cf02279.min.js:56)
at Module.<anonymous> (10b3c252f72fe3679fe8c8942cf02279.min.js:72)
at 10b3c252f72fe3679fe8c8942cf02279.min.js:11
at 10b3c252f72fe3679fe8c8942cf02279.min.js:74
at each (10b3c252f72fe3679fe8c8942cf02279.min.js:3)
at Module.emit (10b3c252f72fe3679fe8c8942cf02279.min.js:74)
at Module.check (10b3c252f72fe3679fe8c8942cf02279.min.js:61)
at Module.enable (10b3c252f72fe3679fe8c8942cf02279.min.js:73)

Other payment options work fine.
Unbundled / unminified js, but issue still present; although doing so narrowed issue down to
Uncaught TypeError: Cannot read property 'quoteData' of undefined
    at quote.js:33

which is
var proceedTotalsData = function (data) {
            if (_.isObject(data) && _.isObject(data['extension_attributes'])) {
                _.each(data['extension_attributes'], function (element, index) {
                    data[index] = element;
                });
            }

            return data;
        },
        billingAddress = ko.observable(null),
        shippingAddress = ko.observable(null),
        shippingMethod = ko.observable(null),
        paymentMethod = ko.observable(null),
        **quoteData = window.checkoutConfig.quoteData,**
        basePriceFormat = window.checkoutConfig.basePriceFormat,
        priceFormat = window.checkoutConfig.priceFormat,
        storeCode = window.checkoutConfig.storeCode,
        totalsData = proceedTotalsData(window.checkoutConfig.totalsData),
        totals = ko.observable(totalsData),
        collectedTotals = ko.observable({});

What is causing the problem and what is the solution here?


texts:
Hello i have following problems. I have an page_layout and inside of it i have an layout called dynamic.xml
I tried to remove the form field where you can click "Add to cart" and the quantity:
First attempt i tried with product.info.addtocart and set it to remov=true didnt work.
I also tried product.info.options.bottom but still there.
Has anybody an idea how to remove the form?
Remove this form here with xml


texts:
I added a tab to customer edit in admin magento, it's a grid. I used

$this->setUseAjax(true);

but when i filter, it's just loading and not show results. I have getGridUrl() in Custom.php:

public function getGridUrl()
    {
        return $this->getUrl('*/*/grid', array('_current'=> true));
    }

And i have controller with grid action:

public function gridAction()
    {
        $this->loadLayout();
        $this->getResponse()->setBody(
            $this->getLayout()->createBlock('mymodule/adminhtml_customer_edit_tab_custom')->toHtml()
        );
    }

but still not filter


texts: Remove negative numbers in category URL in magento1

texts: I have created three categories name same in different categories.negative numbers add in category URL.How to find out? Can you please help me?


texts: Magento 2, cannot use all option attributes when creating new configuration product

texts:
Using Magento 2.2, Back-end, Catalog-Product. I cannot use all product attributes for a new configuration product. Why can't I use all attributes in Stores -> Configuration?

New Product

  Catalog-Product -> New Configuration Product

Attribute List

  Stores -> Product Attributes


texts: Integrity check failed [mode : settings] while data migration from 1.9.2.4 to 2.1.3 using data-migration-tool

texts:
Getting error in mode : settings.

Added following code to get in which step their is error :

if (!$result) {
        $this->logger->info(
            'failed',
            ['step' => $step, 'stage' => $stage, 'mode' => $this->mode]
        );
    }

So it showing in which step their is error in following screenshot.

Followed all steps before from
 http://devdocs.magento.com/guides/v2.0/migration/migration-tool-install.html
and
http://devdocs.magento.com/guides/v2.0/migration/migration-tool-configure.html


texts: Adding a stl file as a product in magento 1.9.0.0

texts:
My client wants me to add stl file for new product under 'Manage products' tab. But when I attempt to upload the the stl file in images tab, it shows disallowed file type. I configured my Cms/etc/config.xml file like this....

 <extensions>
                    <allowed>
                        <jpg>1</jpg>
                        <jpeg>1</jpeg>
                        <png>1</png>
                        <gif>1</gif>
                        <stl>1</stl>
                    </allowed>
                    <image_allowed>
                        <jpg>1</jpg>
                        <jpeg>1</jpeg>
                        <png>1</png>
                        <gif>1</gif>
                        <stl>1</stl>
                    </image_allowed>
                    <media_allowed>
                        <flv>1</flv>
                        <swf>1</swf>
                        <avi>1</avi>
                        <mov>1</mov>
                        <rm>1</rm>
                        <wmv>1</wmv>
                    </media_allowed>
                </extensions>

I even refreshed and flushed cache and logged out and logged in again to admin panel, but it isn't accepting stl files. Any leads?


texts: How to use Magento 2 product add/edit form category tree structure in custom form?

texts:
I am trying to use Magento 2 product add/edit form category tree structure in the custom form

I got some sol. from StackOverflow and some other websites

but it is not working properly

I have tried :

    $fieldset->addField(
        'category_ids',
        'Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Category',
        [
            'name' => 'category_ids',
            'title' => 'Category',
            'label' => 'Category'
        ]
    );

<head>
    <css src="Magento_Catalog::catalog/category-selector.css"/>
</head>

this code and added this CSS in my custom form

but it is showing like this

but I need as same as product add/edit form

how can I do that

please share some suggestions.....


texts: Magento image and js / css cache buttons not showing after restoring backup

texts:
We had to restore a backup (files & database) of our Magento-1.7 store. But after we restored the backup, in system > cache management, the cache buttons for image cache and js / css cache is not shown. This is a problem because some images are pointing to the wrong cache file which isn`t existing in our restored backup.

I have tried re-uploading magento 1.7 core files for app\code\core\Mage\Adminhtml\ but no luck yet. I also deleted cache from server, browser and logged out and in back again. The whole site and backend is working just fine, but these particular buttons are just not showing up.

Any tips on where I start looking for this issue, what adminhtml file is building up this page or what might be causing this issue?

Thanks!


texts: Include in Menu for all store views in Magento 2

texts:
In Magento 2 when you edit a category by products / categories you can choose the option "include in menu". We have a multishop with several shops that use the same root category, but it is not possible to disable the include in menu for all the store views, only when you disable them per store view.

Is there a way to disable them all in one time or can you only disable them per store view?


texts: How come the order number comes up wrong in ShipWorks?

texts:
I followed this QA's method to customize the order number on my recent Magento 2.3.1 migration. But when ShipWorks downloads the orders, they still start at 1.

ShipWorks' support team called back and they are keying the order_id field for order numbers and not increment_id, which as we all know, is the Order Number in human speak. Once I test the effectiveness of updating the sales_order  table's auto_increment primary key, I'll post an answer.


texts:
I have created a custom login page I have called it from cms page
CMS PAGE account_login

 {{block type="core/template" template="customer/form/cms_login.phtml"}}

cms_login.phtml

<form action="<?php echo Mage::getUrl('customer/account/loginPost'); ?>" method="post" id="login-form">

                <input type="text" name="login[username]" value="<?php echo $this->htmlEscape($this->getUsername()) ?>" id="email" class="form-control required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" placeholder="<?php echo $this->__('Email Address') ?>" />

                <input type="password" name="login[password]" class="form-control required-entry" id="pass" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Password')) ?>" placeholder="<?php echo $this->__('Password') ?>" />

          <button type="submit" class="login-btn" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><?php echo $this->__('Login') ?></button>

    </form>

I wanted to redirect to my cms page when there is wrong email or pass how I can I do can anyone help


texts: Magento 2: We were unable to validate your address

texts:
I am facing issues while adding an address to address book in magento2 user account area. When I try to add a new address to address book, it throws the following error.
How to disable address verification in Magento 2?
Or at least tell me what is this connection error?

Its going here when save address button is clicked.
http://***/rest/default/V1/carts/mine/validate-address


texts: Invoice error when print invoice action call admin panel

texts:
Hello i have created one website magento version 1.9. In admin panel order section when I select any order and select Print invoices from action dropdown and submit then got error like:

  "Call to a member function getParentItem() on a non-object in
  D:\xampp\htdocs\charcoal\app\code\core\Mage\Sales\Model\Order\Pdf\Invoice.php
  on line 141";

How can I solved this issues?


texts:
I'm getting setSaveParametersInSession() on a non-object

It is on an admin module the path is

Training/Distributor/Block/Adminhtml/ in this folder i have

Distributor/Grid.php and Distributor.php

class Training_Distributor_Block_Adminhtml_Distributor
extends Mage_Adminhtml_Block_Widget_Grid_Container
{

/**
* my understanding:
* $this->_blockGroup . '/' . $this->_controller . '_grid'
* i.e. training_distributor/adminhtml_distributor_grid
*/
public function _construct()
{
    $this->_blockGroup = 'training_distributor';
    $this->_controller = 'adminhtml_distributor';
    $this->_headerText = $this->__('List Distributors');
    $this->_addButtonLabel = $this->__('Add Distributor');

    parent::_construct();
}
}

Why do I get this error?

I can't see any typo's and I'm sure $this->_blockGroup and $this->_controller are right.

Are there any other things I need to look for? or have I missed something?

After a search on google and stack I have found people usually _blockGroup or _controller, but this doesn't seem to be the case for me

===

EDIT

===

<config>
<modules>
    <Training_Distributor>
        <version>0.0.2</version>
    </Training_Distributor>
</modules>
<global>
    <resources>
        <training_distributor_setup>
            <setup>
                <module>Training_Distributor</module>
            </setup>
        </training_distributor_setup>
    </resources>

    <models>
        <training_distributor>
            <class>Training_Distributor_Model</class>
            <resourceModel>training_distributor_resource</resourceModel>
        </training_distributor>

        <training_distributor_resource>
            <class>Training_Distributor_Model_Resource</class>
            <entities>
                <distributor>

training_distributor_entity

                </distributor>
            </entities>
        </training_distributor_resource>
    </models>
    <blocks>
        <training_distributor>
            <class>Training_Distributor_Block</class>
        </training_distributor>
    </blocks>
    <helpers>
        <training_distributor>
            <class>Training_Distributor_Helper</class>
        </training_distributor>
    </helpers>
</global>

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <training_distributor before="Mage_Adminhtml">Training_Distributor_Adminhtml</training_distributor>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

<adminhtml>
    <layout>
        <updates>
            <training_distributor>
                <file>training/distributor.xml</file>
            </training_distributor>
        </updates>
    </layout>
</adminhtml>

</config>


texts: Magento 2: Get Products in admin panel Using Plugin

texts:
i am using a plugin to filter products on admin panel by product attribute, but got no results.
here is my plugin code.

<?php

namespace Learning\HelloPage\Plugin;

class ProductDataProvider
{
      public function aftergetData(\Magento\Catalog\Ui\DataProvider\Product\ProductDataProvider $subject
)
        {
            if (!$subject->getCollection()->isLoaded()) {
                echo 'jhsdg';
                $subject->getCollection()->addFieldToFilter('admin_user_id', array('eq' => '2')); //replace with dynamic admin user from session
                $subject->getCollection()->load();
                echo 'sghd';
            }
        }
}

and my etc/di.xml file

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/
config.xsd">
    <type name="Magento\Catalog\Ui\DataProvider\Product\ProductDataProvider">
        <plugin name="productdata" type="Learning\HelloPage\Plugin\ProductDataProvider" />
    </type>

</config>

what am i doing wrong? please suggest any solution


texts: Fetch Single Record from Custom Module Table

texts:
I have a custom module with a custom DB. The DB consist of customer_id field and inserted customer_id into it.

How can I get a single record based on customer_id passed, whereby customer_id is the unique field value in my DB table.

For example:

Mage::getModel('module/model')->addFieldToFilter('customer_id', array('eq' => $customerId));

The above code should give me a single record instead of giving a collection.

If I use below code:

Mage::getModel('module/model')->getCollection()->addFieldToFilter('customer_id', array('eq' => $customerId));

it gives me a record in array, and I do not want to use a loop to fetch data.

Is it possible to load data by using my custom DB field name, like

$custommoduleobj= Mage::getModel(‘yourmodulename/modelname’)->loadByCustomerId($customerId);

Please Help.

Thanks.


texts:
I've set up an new theme in Magento 2 and everything was looking fine. I installed Grunt and changed all necessary files (I think) I then did the following: Grunt clean, grunt exec:myTheme, grunt less:myThem and grunt watch.

The grunt watch seems to be working but now when i reload the page It's blank. looked at page source an theres nothing there. Also the same has happened to the admin side as well.

Any ideas as to what it could be. If you need to see certain files I will post.


texts: magento extension dosent create navigation tab

texts:
i have magento 1.9.3.8 and i had installed 2 extensions using magento MCM keys.
as you can see in screenshot , the extensions is installed into area #1 System > configuration area but not added to the navigation area #2 (where i can use it)


texts: How to override a core function when a third party module isn't using it

texts:
I've created a module to rewrite the function addCommentAction in app/code/core/Mage/Sales/Model/Order.php but I want the default core addCommentAction function to be used when called from a different module that I'd rather not modify.

Essentially I am disabling the order status update functionality in the order comment history area, but I don't want it disabled when our third party extension(Aitoc) calls the same method to do bulk updates from the order grid.

I have achieved this with the below rewrite which checks which file called the method, but I'm sure there is a much better way to achieve this. My ugly solution at this point is:

public function addStatusHistoryComment($comment, $status = false)
{
    // store filename used to call method from order view
    $orderViewFilename = '/ebs1/html/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php';

    // store actual parent filename
    $actualParentFilename = debug_backtrace()[0]['file'];

    // check what the filename is
    switch($actualParentFilename) {
        case $orderViewFilename:
            // comment history update ignores status update
            $status = $this->getStatus();
            break;
        default:
            // other updates continue as normal
            if (false === $status) {
                $status = $this->getStatus();
            } elseif (true === $status) {
                $status = $this->getConfig()->getStateDefaultStatus($this->getState());
            } else {
                $this->setStatus($status);
            }
    }

    // update order status and save comment
    $history = Mage::getModel('sales/order_status_history')
        ->setStatus($status)
        ->setComment($comment)
        ->setEntityName($this->_historyEntityName);
    $this->addStatusHistory($history);
    return $history;
}


texts: Magento 2 catalog_product_upsell Observer

texts:
I created an observer for catalog_product_upsell to add products from the same category, but I'd like to show bundle products first, if there are.
So i check collection by a logger:
$upsell = $observer->getCollection();
$this->logger->debug(print_r($upsell->getAllIds(), true));

but bundle products ar not there.
My module.xml is:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Vendor_UpsellProducts" setup_version="1.0.0">
        <sequence>
            <module name="Magento_Catalog"/>
            <module name="Magento_Bundle"/>
        </sequence>
    </module>
</config>

How can I get my observer called after the bundle module observer?


texts: Create a new route in webapi.xml under file path vendor/magento/module-catalog/webapi.xml

texts: I wanted to fetch my products data from the V1/products API but it’s restricted to only admin credentials. To let customers get access, I copy pasted the entire route section and changed only the api end point from V1/products to V1/appproducts. When I fetch this request on postman I get a message saying the request does not match any route.


texts: Magento 2 - Disable product attribute if custom module is disabled

texts:
I have created few product attributes in custom module using UpgradeData.

Now if I disable my module then I how can I disable the product attributes as well.


texts:
I want to create a new subdomain cdn.domain.com and serve all media/js/css trough that subdomain, to speed up total page load.
But therefore I want to create a new cdn folder, outside my current root folder.

Is that possible and is it enough to change the system/configuration/general/web/unsecure and system/configuration/general/web/secure to cdn.domain.com?

I mean are all new images than saved to the right folder directly or do I need to change other things as well?


texts: output information from the database magento 2

texts:
/Block/Reviews.php

<?php
namespace Training\Reviews\Block;
use Training\Reviews\Model\ResourceModel\Reviews\Collection;

use Magento\Framework\View\Element\Template;

class Reviews extends \Magento\Framework\View\Element\Template
{

public function _prepareLayout()
{
    $this->pageConfig->getTitle()->set(__('Users Reviews'));

    return parent::_prepareLayout();
}

protected $_productCollectionFactory;
protected $_productVisibility;

public function __construct(
    \Magento\Framework\View\Element\Template\Context $context,
    \Training\Reviews\Model\ResourceModel\Reviews\CollectionFactory
$productCollectionFactory,
    array $data = []
) {
    $this->_productCollectionFactory = $productCollectionFactory;

    parent::__construct($context, $data);
}

public function getProductCollection()
{
    $collection = $this->_productCollectionFactory->create();
    $collection->addFieldToFilter('result', ['like' => '%likes%']);
    $collection->count();
    return $collection;
 }
}

  /view/frontend/templates/reviews.php

<?php
$productCollection = $this->getProductCollection();
foreach ($productCollection as $product) {
print_r($product->getData());
echo "<br>";
}
?>

This function outputs rows and information about them, I only need the number of rows.

I would appreciate your help!


texts:
I tryed to making a theme options for change font size and family from backend but in frontend i don't see changes. I see the option (font size and font family ) on adminpanel. I have done the file system.xml whit section, file font.php in Model ( with all options ). After this i added this code to header.phtml ( without dot ):

<?php echo   Mage::getStoreConfig(themeadmin/general/options,Mage::app()getStore()); ?>

If i make changes on admin, i don't see changes on frontend. I need to put this code into a div with text?


texts: How to call Observer method in controller in Magento?

texts: I need to call function in observer by controller function. How I do this. Please explain with example.


texts: Programatically add product to basket - Error: The product could not be found

texts:
Hi guys I have a small code snippet and am trying to add a product to basket in Magento via PHP.

Whatever I try (I've searched for a lot of snippets) I just get "The product could not be found." error. I have dialled my code back to a very short and simple snippet to try and get this working.

Can anyone spot what might be causing this?

require_once 'app/Mage.php';
umask(0);
Mage::init('default');
Mage::getSingleton('core/session', array('name' => 'frontend'));

    $cart = Mage::getSingleton('checkout/cart');
    $sku="prodsku";
    $qty=1;
    $product = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku);
    var_dump($product);
    $cart->addProduct($product, $qty);
    $cart->save();
    Mage::getSingleton('checkout/session')->setCartWasUpdated(true);

I am using a var_dump on the product to make sure it is finding it and if I remove the line:

$cart->addProduct($product, $qty);

It then dumps the product information and it all looks fine.

SOLVED: This single product was not physically ADDED to the website under Product > Websites, I also have to change to load by ID rather than SKU as it was throwing up stock errors.


texts:
Our /var/log/messages is flooded with these records:
Jan 25 13:17:04 885589-DB1 systemd: Starting Session 570175 of user apache.

Which causes high CPU process:
1858 root      20   0  345084 315516   1392 R  95.1  0.5   7696:47 systemd-logind

Caused by these in the crontab:
* * * * * /usr/bin/php /var/www/vhosts/html/site/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/vhosts/html/site/var/log/magento.cron.log
* * * * * /usr/bin/php /var/www/vhosts/html/site/update/cron.php >> /var/www/vhosts/html/site/var/log/update.cron.log
* * * * * /usr/bin/php /var/www/vhosts/html/site/bin/magento setup:cron:run >> /var/www/vhosts/html/site/var/log/setup.cron.log

If I comment out the jobs, it stops.
Any ideas why these cronjobs are launching a lot of apache sessions?

Server version: Apache/2.4.6 (CentOS)
PHP 7.0.27 (cli) (built: Jan  4 2018 13:39:07) ( NTS )
Magento 2.1.10 - 2.2.2

EDIT
I apologize, priorities took me away. The issue has disappeared for unknown reasons. Most likely a 3rd party module has been updated.


texts:
I use bundle js in magento2 now when i run command the error is comming

  Error: ENOENT: no such file or directory, open
  'E:/projecct/tts-core-au-deveopment/pub/static/frontend/Sm/custom/en_AU/jquery-ui-modules/resizable.js'


texts:
I have upgraded Magento 2.3.5-p1 to Magento 2.4.0, after upgrade when I am running compile command
php bin/magento setup:di:compile

then it's showing me below error
Compilation was started.
Area configuration aggregation... 5/8 [=================>----------]  62% 36 secs 440.0 MiB
In ClassReader.php line 43:

  Class Magento\InventoryCatalogAdminUi\Observer\SourceItemsProcessor does not exist

In ClassReader.php line 36:

  Class Magento\InventoryCatalogAdminUi\Observer\SourceItemsProcessor does not exist

In error log it's showing below error.
    [2020-08-07 05:17:25] main.CRITICAL: Can't create directory /var/www/html/generated/code/Magento/Framework/App/ResourceConnection/.
Class Magento\Framework\App\ResourceConnection\Proxy generation error: The requested class did not generate properly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only. [] []
[2020-08-07 05:17:25] main.DEBUG: Can't create directory /var/www/html/generated/code/Magento/Framework/App/ResourceConnection/.
Class Magento\Framework\App\ResourceConnection\Proxy generation error: The requested class did not generate properly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only. {"exception":"[object] (RuntimeException(code: 0): Can't create directory /var/www/html/generated/code/Magento/Framework/App/ResourceConnection/.
Class Magento\\Framework\\App\\ResourceConnection\\Proxy generation error: The requested class did not generate properly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only. at /var/www/html/vendor/magento/framework/Code/Generator.php:139)"} []

I give proper permission also to the generated folder before running compile command, but it's not working
chmod -R 777 var pub generated

I give below permissions also but it's not working
find . -type f -exec chmod 644 {} \;

find . -type d -exec chmod 755 {} \;

I never face this issue previously in the same installation. Please let me know where I am doing wrong here.


texts:
I want print a custom file in order transactional emails.  Here is my Setup file:

namespace xxx\xxxx\Setup;

    $quote = $setup->getTable('quote');
    $salesOrder = $setup->getTable('sales_order');

    $setup->getConnection()->addColumn(
        $quote,
        'gst',
        [
            'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
            'nullable' => true,
            'comment' =>'Gst'
        ]
    );

    $setup->getConnection()->addColumn(
        $salesOrder,
        'gst',
        [
            'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
            'nullable' => true,
            'comment' =>'Gst'
        ]
    );

    $setup->endSetup();

The function that saves data on order

    class SaveOrderObserver implements ObserverInterface
   {
public function execute(\Magento\Framework\Event\Observer $observer)
{
    $order = $observer->getEvent()->getOrder();
    $quote = $observer->getEvent()->getQuote();

    $order->setData('gst', $quote->getGst());

    return $this;
}
}

The event xml:

 <event name="sales_model_service_quote_submit_before">

How to print GST field on user and admin email after order?


texts: Disallow adding products if sku or shipping type exists in cart

texts:
As the title says. I need to be able to disable adding to cart if a product sku or shipping type already exists in the cart. Any way this can be done?

Created checkout_stop.xml in app/etc/modules with below code

<?xml version="1.0"?>
<config>
    <modules>
        <Checkout_Stop>
            <codePool>local</codePool>
            <active>true</active>
        </Checkout_Stop>
    </modules>
</config>

Created config.xml in app/code/local/Checkout/Stop/etc with below code

<?xml version="1.0"?>
<config>
<modules>
    <Checkout_Stop>
        <version>0.1.0</version>
    </Checkout_Stop>
</modules>
<global>
    <models>
        <checkout_stop>
            <class>checkout_stop_Model</class>
        </checkout_stop>
    </models>
    <events>
        <checkout_cart_product_add_after>
            <observers>
                <checkout_stop_Model_Observer>
                    <type>singleton</type>
                    <class>checkout_stop_Model_Observer</class>
                    <method>addtocartEvent</method>
                </checkout_stop_Model_Observer>
            </observers>
        </checkout_cart_product_add_after>

         <review_save_before>
            <observers>
                <checkout_stop_Model_Observer>
                    <type>singleton</type>
                    <class>checkout_stop_Model_Observer</class>
                    <method>autoApproveReview</method>
                </checkout_stop_Model_Observer>
            </observers>
        </review_save_before>
    </events>
</global>

</config>

Created Observer.php in app/code/local/Checkout/Stop/Model with below code

<?php

$items = Mage::getSingleton('checkout/session')->getQuote()->getAllItems();

foreach ($items as $item){
    if ($item->getSku() == 'shoes1001'){
        Mage::throwException(Mage::helper('checkout')->__('You cannot add that product to your cart');
    }
}
?>


texts: Checkout page keeps loading continously in magento 2.2.4

texts:
I am using magento 2.2.4.When I checkout from purchase or cart with any product, checkout page start loading details
but checkout keeps loading.
Below console error

please give me any solution? How to solve it?


texts: Change the name Attribute of product to not required magento 2

texts:
I want to generate the name of product based by sku.

For example : when i enter 10014000 for the sku, the name of product will be Bovin phenelop 16/18 blanc 100.
This information is coming from segmenting the sku and doing some request to some tables to recuperate this name, but i can't find any phtml file for adding product, so i used the event and observer.

But, the problem is, i still need to fill the product name input because it's required field, so how to make the product name to not required and is it safe to do that? Or instead, is there a best solution to use ajax? And when creating a product, if i enter sku, the name will be generated in same time before saving the product?

Please help me find a way to put some ajax and which file is a form to adding new product?


texts:
I am new to Magento. My theme supports 1.9.2.0 version.
Can somebody please provide me with the download link or documentation to install 1.9.2.0 version?


texts: Stock availability status on Configurable simple products

texts:
On a Configurable product, the following gets displayed if the Configurable product has stock /is saleable. However, when one of the items in the dropdown of Simple products is actually out of stock the following is not correct.

<?php if ($this->displayProductStockStatus()): ?>
    <?php if($_product->isSaleable()): ?>

Availability: <?php echo $this->__('In stock') ?>

    <?php else : ?>

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

What i'm trying to do is get that In stock text to change to out of stock when the out of stock product is selected. I wondered if anyone else has tried fixing this magento bug before?


texts: Magento 2. Grid Action column link open in new window

texts:
I've successfully created an admin grid using ui components.
I've successfully added an actions column with a link.
The link works but I want it to open in a new window or tab.

excerpt from ui_component

<actionsColumn name="actions" class="Vendor\Module\Ui\Component\Listing\Columns\Actions">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="indexField" xsi:type="string">id</item>
                <item name="sortOrder" xsi:type="number">1000</item>
            </item>
        </argument>
    </actionsColumn>

excerpt from Vendor\Module\Ui\Component\Listing\Columns\Actions

    /**
     * Prepare Data Source
     * The delete function will be added later
     *
     * @param array $dataSource
     * @return array
     */
    public function prepareDataSource(array $dataSource)
    {
        if (isset($dataSource['data']['items'])) {
            foreach ($dataSource['data']['items'] as &$item) {
                if (isset($item[AlertInterface::ID])) {
                    $item[$this->getData('name')] = [
                        'view' => [
                            'href' => $this->urlBuilder->getUrl(
                                $this->dataSourceSolver->getViewActionPath(),
                                [
                                    'id' => $item[AlertInterface::ID]
                                ]
                            ),
                            'popup' => true,
                            'target' => '_blank',
                            'label' => __('Preview')
                        ]
                    ];
                }
            }
        }
        return $dataSource;
    }
}

The link works but does not open in new tab or window. There is an example in Marketing >Email Templates > Preview section but that code uses widgets and I'm using ui_components.

Any help is appreciated.


texts: Show layered navigation without products

texts:
I'm trying to keep the layered navigation displayed, even if there are no products in the currently selected category.

I've removed <?php if($this->canShowBlock()): ?> line from view.phtml

And I removed ?php if ($_item->getCount() > 0): ?> from filter.phtml

But the layered navigation is still not showing up.

I'm using Magento's RWD theme


texts: Change minicart Qty to Dropdown in magento2

texts:
I want change qty text box into dropdown in minicart place

view/frontend/web/template/minicart/item/default.html file.

<select data-bind="attr: {
       id: 'cart-item-'+item_id+'-qty',
       'data-cart-item': item_id,
       'data-item-qty': qty,
       'data-cart-item-id': product_sku
       }, value: qty"
       class="item-qty cart-item-qty">
    <option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
    <option>5</option>
</select>
<button data-bind="attr: {
       id: 'update-cart-item-'+item_id,
       'data-cart-item': item_id,
       title: $t('Update')
       }"
        class="update-cart-item">

</button>

I'm getting dropdown for qty.But i want to this in below format

for(i=0;i<=4;i++)
{
<option >i</option>}

How to do this.If anyone knows please explain me.

I also refer this link ...
http://knockoutjs.com/documentation/options-binding.html
i don't know which file is suitable for adding script file


texts:
I have upgraded magento from 2.1.8 EE to 2.3.1 EE. After upgrade the product page urls have changed,
they should be in the format-  https://site-url/parent-category/sub-category/product-name.html  whereas they are rendering as - https://site-url/catalog/product/view/id/138/s/product-name/category/6/

Please provide a solution.


texts: Magento 2 Data Migration Tool issue: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry

texts:
i want migrate Magento 1.9.2.1 to Magento 2.3.5

Install Data Migration Tool : ok

Run Settings Data Migration Tool: Ok

Run DATA Migration Tool: Error

This is the message:

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

I find this solution https://support.magento.com/hc/en-us/articles/360025762211

To fix the problem, you need to remove outdated indexes from elasticsearch

How can i do?


texts: Increment id is not continuous in magento2

texts:
I have got a strange issue when I create a new product in backend my id is incremented +2 see the below image

if i place the order .my order id also incremented +2 see the below image

in my custom grid also my id becomes incremented by two. Did anyone face this issue?

Thanks in Advance


texts: How to remove color picker from frontend?

texts:
I'm building a theme based on the Blank theme, using the Magento UI library.
I notice that Magento comes with a color picker, which loads both spectrum.js (> 80 kB) and tinycolor.js (almost 40 kB). To be fair, these sizes are before minimizing the code, nevertheless this is still a massive amount of JavaScript, especially since my site doesn't have any use for a color picker in the first place.
Is there any way to remove / disable the color picker, such that I can avoid loading this unnecessary code?


texts:
We have a online shop with shoes.

For example i would like to have a configurable product "Shoes XXX" with following simple products:

"Shoes XXX Color Black Size 40"
"Shoes XXX Color Black Size 41"
"Shoes XXX Color Black Size 42"
"Shoes XXX Color Green Size 39"
"Shoes XXX Color Green Size 41"
"Shoes XXX Color Red Size 38"
"Shoes XXX Color Red Size 40"

I use the core functionality of magento 1.9 (and i found and this extension https://github.com/wigman/AjaxSwatches , but i haven't test yet)

I do not want to upload separate images for the products of the same color (but different sized). is there any way for that?

Also in color swatches (core functionality of magento 1.9) i would like displayed a small product image in selected color. how i do that?


texts: M 2.4.0 upgrading issue - Unable to apply patch Magento\Review\Setup\Patch\Schema\AddUniqueConstraintToReviewEntitySummary

texts:
We are upgrading from Magento 2.3.5 to 2.4.0
When I run php bin/magento setup:upgrade, I get the following error:
Unable to apply patch Magento\Review\Setup\Patch\Schema\AddUniqueConstraintToReviewEntitySummary for module Magento_Review. Original exception message: Warning: preg_match(): Compilation failed: invalid range in character class at offset 40 in /home/babygear/www/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 2779
How can I solve this error?
Best regards,
Jesper


texts: Set order for product Collection in magento2

texts:
I am filtering product collection like below.

    $productSkuString = 'O, C, D, A, F, S';
        $productSkus = explode(', ', $productSkuString);
        $collection = $this->collectionFactory->create()
        ->addAttributeToSelect('*')
        ->addAttributeToFilter(
                'sku', array('in' => $productSkus)
        )
        ->setStoreId(0)
        ->load();
        return $collection;

The above code filtering the product collection with mentioned skus. but not in the same order of the sku.

I need to load the product with same order where the sku is mentioned.

Currently its loading the product in random order.

Can anyone look into it and update me please


texts: Apply discount if 2 of the same item from a category are added

texts:
I searched SO for this but all I could find is apply discount on items from a category. But I want to apply discount only if the items are from a category say "15% discount category" and if the customer order the same product.

Ex. - Lets assume we have Product A, B & C in a category id 442.
Now if I add 2 of A & 1 of B in cart it applies discount like -

A(2) - 15% discount
B(1) - 15% discount

I want it to be like this -

A(2) - 15% discount
B(1) - no discount

Current Conditions are -

If ALL  of these conditions are TRUE :
   If total quantity  equals or greater than  2  for a subselection of
                      items in cart matching ALL  of these conditions:
   Category  is  442


texts: Can it handle products with up to 100,000 variations

texts:
We are building a site for a client in WooCommerce and have come stuck on the capability (not being there)

We have some products that have up to 100,000 different variations, also with a base price and click rate

Can Magento handle this amount of variations?


texts: How to: Export data from Magento 1.x and import in 2.0?

texts:
What is the default way to migrate data from a Magento 1.6.1 shop to a Magento 2.0 shop? I want to migrate the orders including all the invoices and shipments, the customers including their passwords and of course the products.

Can I use the dataflow export and then import that in Magento 2 or are there migration tools available? I know there is the official tool (https://github.com/magento/data-migration-tool), but maybe there is something else out there?

Thanks a lot!


texts:
I will like to know the Magento 2 extension that can provide me with the features of the GST Switcher as in https://www.nisbets.com.au/.
When it is switched to INC GST, all product prices are updated with the GST details but when it is switched to EXC GST, the original prices without the GST are provided.
this is exactly what I need. see image below


texts:
We have a site that has been in development and need to update the order information from the current live site.

Is it possible to just export a number of the tables from the current live site and import into the dev site? If so, can anyone tell me which tables I need to export?


texts: Logging for Outbound Transactional Email

texts: In earlier versions of Magento it was possible to see outbound email messages in the database queue. Currently in Magento 2.3.5 I have not found a way to see a log of the outbound transactional emails. Has anyone else run into this and found or built a solution?


texts: Magento2 Knockout js - translate variable text

texts:
I'm trying to translate text that comes from a variable in Knockout html file, but I can;t find the right way. Here's some things I tried:

option.label returns a string like 'width' or 'height'. There words are included in a .csv translation file.


texts:
In checkout page I need to change country list. I can achieve this from admin side. Store->Configuration->General->General->Conutry Options. I have chosen India only but the frontend show Inde. Where could I change Inde to India?

I need to change Inde to India


texts: Editing `My Account` sidebar in magento 2

texts:
How can I edit sidebar and delete few nav links

I turned on the debugger hint, which shows me the various path, but I am not able to figure out how can I edit those nav links

Closest I came to collapsible.phtml

<div class="block <?= /* @escapeNotVerified */ $block->getBlockCss() ?>">
<div class="title <?= /* @escapeNotVerified */ $block->getBlockCss() ?>-title" data-mage-init='{"toggleAdvanced": {"toggleContainers": "#<?= /* @escapeNotVerified */ $block->getBlockCss() ?>", "selectorsToggleClass": "active"}}'>
    <?= /* @escapeNotVerified */ $block->getBlockTitle() ?>

<div class="content <?= /* @escapeNotVerified */ $block->getBlockCss() ?>-content" id="<?= /* @escapeNotVerified */ $block->getBlockCss() ?>">
    <?= $block->getChildHtml() ?>

On further digging, $block->getChildHtml() gets all the side bar nav links,
so if i write something link this,  $block->getChildHtml(name)
so i explored layout xml files, but i am not able to figured which xml file it is and how to find name attribute in that xml file for which i can call $block->getChildHtml(name)


texts: Filters and results not working properly

texts:
Filters are not working properly, not all the attributes like 'size' are in the sidebar. Also, when selecting an option to filter on, there are no products found for this selection but in the backend, there are options for this 'size' and also have stock and are visible on just the category page without filters selected.

I've searched allot on the internet to find the right solution but any found solutions didn't fix the issue for me.

I did the following this to find out where the problem might be;
- Changed the theme to just the default Luma theme;
- Cloned the database and used a fresh install from Magento 2.1.* to test if the code was broken in 2.1.12;
- Checked the attributes in the backend to make sure they are configured right;

So my thought right now is that there something wrong in the database, but how to debug this issue further? Did anyone of you encounter this problem and got it fixed?


texts: Magento2.2.3 Customer custome attribute value not save

texts:
Custom customer attribute is created but values are not being saved from admin customer account information tab.

I did check into database tables for eav_attribute and customer_eav_attribute and attributes are created properly

=> InstallData.php file

use Magento\Customer\Api\CustomerMetadataInterface;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{
    /**
     * @var EavSetupFactory
     */
    private $eavSetupFactory;
    /**
     * @var \Magento\Eav\Model\Config
     */
    private $eavConfig;

    public function __construct(
        EavSetupFactory $eavSetupFactory,
        \Magento\Eav\Model\Config $eavConfig
    ) {
        $this->eavSetupFactory = $eavSetupFactory;
        $this->eavConfig = $eavConfig;
    }

    /**
     * Installs data for a module
     *
     * @param ModuleDataSetupInterface $setup
     * @param ModuleContextInterface $context
     * @return void
     */
    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        /** @var \Magento\Eav\Setup\EavSetup $eavSetup */
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);

        $setup->startSetup();

        $attributeCode = 'account_id';
        $eavSetup->addAttribute(CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER, 'account_id', [
            'label' => 'Account Id',
            'required' => false,
            'user_defined' => 1,
            'system' => 0,
            'position' => 100,
            'input' => 'text'
        ]);

        $eavSetup->addAttributeToSet(
            CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER,
            CustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER,
            null,
            $attributeCode);

        $amountId = $this->eavConfig->getAttribute(CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER, $attributeCode);
        $amountId->setData('used_in_forms', [
            'adminhtml_customer',
            'customer_account_create',
            'customer_account_edit'
        ]);
        $amountId->getResource()->save($amountId);

        $attributeCode = 'amount_spend';

        $eavSetup->addAttribute(CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER, $attributeCode, [
            'label' => 'Amount Spent',
            'required' => false,
            'user_defined' => 1,
            'system' => 0,
            'position' => 110
        ]);

        $eavSetup->addAttributeToSet(
            CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER,
            CustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER,
            null,
            $attributeCode);

        $amountSpend = $this->eavConfig->getAttribute(CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER, $attributeCode);
        $amountSpend->setData('used_in_forms', [
            'adminhtml_customer',
            'customer_account_create',
            'customer_account_edit'
        ]);
        $amountSpend->getResource()->save($amountSpend);
        $setup->endSetup();
    }
}


texts:
We are facing issues with Product Duplicate. When we are trying to duplicate the product it gives 500 errors.

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Here is server log:

[Wed Mar 18 05:46:06.257548 2020] [fcgid:warn] [pid 13816] [client 000.000.000.00:00000] mod_fcgid: read data timeout in 101 seconds, referer: https://magento224/admin/catalog/product/edit/id/168/key/8874a4dcfb2a19f3c01f7dbb711c44bc1533c3e980bd5d343709973781e7afc7/

[Wed Mar 18 05:46:06.257695 2020] [core:error] [pid 13816] [client 000.000.000.00:00000] End of script output before headers: index.php, referer: https://magento224/admin/catalog/product/edit/id/168/key/8874a4dcfb2a19f3c01f7dbb711c44bc1533c3e980bd5d343709973781e7afc7/


texts: Difference between Minicart and Cart in Magento 2

texts: I want to know the difference between Mini cart and Cart in details.


texts: Conflict in layer navigation and infinite scroll extension magento2

texts:
I have Installed above BSS_layeredNavigation & Lof_Ajaxscroll extensions.

Both of them are working fine if used individually.

If both extensions are enabled there is a conflict.

To avoid conflict i used sequence in etc/module.xml like below.

 <sequence>
    <module name="Lof_AjaxScroll"/>
  </sequence>

Still the problem exist. Infinite scroll are loading the items even after filter is applied on the left navigation.

Example:

I have Color = Red(2), Once filter is applied it is loading 2 items then Infinite scroll load all remaining items. This is not correct.

I have checked with the extension providers, Both of them are not coming forward to resolve this issue. Suggesting me to avoid other extension.

How to resolve this issue. Please, anyone, look into this and update me your ideas. Thanks