texts: Magento 2 : How to disable/enable payment method based on customer?

texts:
I created custom payment method (off-line).

http://webhintsexplorer.com/custom-payment-method-magento-2/

And i created customer attribute(On Account Payment Method Applicable) with yes/no.

this field visible in admin side. by default this field will be selected as yes.

Admin user can select no for some of customers.

So based on the customer this payment should be available for front end checkout.
Any one have some idea how to do this?


texts: How to print only certain parts of the order? (just the order infomation)

texts:
Apparently we waste 2 pages of paper every time we print an order.
What we need to print is just the order information (not the 1-5 text and intro).

What is the best way to do that? (we print from the Order Confirmation Emails now)

Here is the info we need to print:

The order, what was sold, the card message, the sender and the recipient, and what date needs to be delivered.


texts: Error Elasticsearch on reindexing - No handler for type [text] declared on field [search]

texts:
When I launch a full reindex (php bin/magento indexer:reindex), I have two errors for these indexes : "Catalog Search" , "ElasticSuite Category"

I have the Smile/Elasticsuite module installed on my M2, these are my versions of elasticsearch installed with composer :

elasticsearch/elasticsearch                       v2.3.2
smile/elasticsuite                                2.6.2

I already find an answer here : https://github.com/elastic/elasticsearch-dsl-py/issues/804#issuecomment-354806052

The guy say "string is deprecated and you should be using text or keyword instead."

But I don't understand where I can apply these changes, if anyone know something about this problem, please let me know, thanks !


texts: Name of Websites / Stores (Groups) / Store Views

texts:
Is the Name field for the websites, stores, store views displayed anywhere that is customer facing? We have a site that has historically always been a single Website store. We are in the process of adding an additional store, and would like to change the 'Name' of the originals so that they make more sense / are more consistent with the names which feel appropriate for the new Website. This will hopefully help make things easier to understand for the admins.

Presumably one of the Names is used in the default store switcher (which we don't actually have in our design), but before going ahead and changing this, is anybody aware of anywhere else this might be echo'd out, or possibly included in the subject / body of a transactional e-mail.


texts: How to configure magento2 cron with mamp

texts:
I followed the tutorial here:
http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html
and tried configuring the crons with mamp but in readiness check for upgrade it still shows as not working.

In crontab (sudo crontab -u user -e) I have:

*/1 * * * * php -c /Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini /User/magento-2/bin/magento cron:run >> /User/magento-2/var/log/setup.cron.log&
*/1 * * * * php -c /Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini /User/magento-2/update/cron.php >> /User/magento-2/var/log/setup.cron.log&
*/1 * * * * php -c /Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini /User/magento-2/bin/magento setup:cron:run >> /User/magento-2/var/log/setup.cron.log&

I tried with /usr/bin/php instead of php but still not working. The path to the php.ini file is the one that the webserver loads with phpinfo(). Could it be that the cron is trying to use another php.ini? There are no errors in the logs.


texts: Get Custom Category Attribute Value On Checkout Page

texts: How can i get the custom category attribute value and that value should be count in product total price at the time of place order ?


texts: How to sort a grouped product category by number of associates

texts:
I have a category with about 2500 products and all of them are grouped products with some associates. In the category I have a lot of them with only one associated but I need to sort the category, showing first, those with more than one associated product.

For example: I have three grouped products with: 5, 4 and 3 associated products respectively and I want to sort the category like this:

GroupedProduct1(5 associated)

GroupedProduct2(4 associated)

GroupedProduct3(3 associated)

Anybody knows any reference or method to do that? Thanks very much for advance.


texts:
I would like to migrate from Magento V-1.x to Magento V-2.x using an index.php instead of the composer.json.

Is there any helpful links, pages, or tips on how to do such a migration.

I was reading and reviewing online that there is but I can't get my index.php file to work I get a 500 error.


texts:
I have created add to cart before the event it's working fine. But I want to the observer after add to cart please tell me how to do it.

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="controller_action_predispatch_checkout_cart_add">
        <observer name="cart_eventbefore_observer_cartbefore" instance="Cart\Eventbefore\Observer\Cartbefore" />
    </event>
</config>


texts: How to hide the products base on the category in magento 2.3

texts:
I need to hide the products based on the category.

To Do :
If i need to hide the products which are assigned on the particular category called Shirts, all products of this category need to hide. How can i find the solution are is there any option in magento to do this.

Thanks in Advance :)


texts: Undefined offset: 150 in /vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 813

texts:
Preconditions

  source: magento 1.9.3.10

  destination: Magento 2.2.6

  3rd party extensions installed

Steps to reproduce

php bin/magento migrate:data -r -a vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.10/config.xml

Expected result

data migration

Actual result

Error message

[2018-12-03 23:50:41][INFO][mode: data][stage: data migration][step:        EAV Step]: started
71% [====================>-------] Remaining Time: < 1 sec

[Exception]
Notice: Undefined offset: 150 in /shop/magento/vendor/magento/data-  migration-tool/src/Migration/Step/Eav/Data.php on line 813

Exception trace:
() at /shop/magento/vendor/magento/framework/App/ErrorHandler.php:61
Magento\Framework\App\ErrorHandler->handler() at /shop/magento/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php:813
Migration\Step\Eav\Data->migrateAttributesExtended() at /shop/magento/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php:192
Migration\Step\Eav\Data->perform() at /shop/magento/vendor/magento/data-migration-tool/src/Migration/Mode/AbstractMode.php:79
Migration\Mode\AbstractMode->runStage() at /shop/magento/vendor/magento/data-migration-tool/src/Migration/Mode/Data.php:119
Migration\Mode\Data->runData() at /shop/magento/vendor/magento/data-migration-tool/src/Migration/Mode/Data.php:69
Migration\Mode\Data->run() at /shop/magento/vendor/magento/data-migration-tool/src/Migration/Console/MigrateDataCommand.php:51
Migration\Console\MigrateDataCommand->execute() at /shop/magento/vendor/symfony/console/Command/Command.php:241
Symfony\Component\Console\Command\Command->run() at /shop/magento/vendor/symfony/console/Application.php:843
Symfony\Component\Console\Application->doRunCommand() at /shop/magento/vendor/symfony/console/Application.php:193
Symfony\Component\Console\Application->doRun() at /shop/magento/vendor/magento/framework/Console/Cli.php:104
Magento\Framework\Console\Cli->doRun() at /shop/magento/vendor/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at /shop/magento/bin/magento:23

I deleted attribute_id 150 from catalog_eav_attibutes as mentioned in issue
https://github.com/magento/data-migration-tool/issues/599

but still the same message.

Does anyone have an idea what goes wrong?
https://github.com/magento/data-migration-tool/issues/621


texts: Magento 2 - Import .CSV "503 - Unavailable"

texts:
I've just recently installed Magento 2.0.7 using Ubuntu 14.04.1.

I'm trying to import a .CSV file, provided from my wholesaler who also uses Magento.

When I try and import the .CSV, I see in my Firebug console "NetworkError: 503 Service Unavailable"

My Magento install is located at /var/www/html/magento/ and I'm trying to import the products into /var/www/html/magento/media/import which is a directory I've created myself, with 755 permissions.

There are no errors shown in Magento debug or system, apache2.log or mysql.log.

I have no idea why this isn't working - being new to Magento I don't know what other logs to look in to. This is using a Digital Ocean image, Ubuntu 14.04.1 using Magento 2.0.7

Thanks for your time

Edit:

Here is my directory structure - /var/www/html/magento is as follows:

drwxr-xr-x  4 root root   4096 Jul 18 20:49 app
drwxr-xr-x  2 root root   4096 Jul 18 20:49 bin
-rw-r--r--  1 root root 440415 Jul 18 20:49 CHANGELOG.md
-rw-r--r--  1 root root   1849 Jul 18 20:47 composer.json
-rw-r--r--  1 root root 320677 Jul 18 20:49 composer.lock
-rw-r--r--  1 root root   3425 Jul 18 20:49 CONTRIBUTING.md
-rw-r--r--  1 root root  10011 Jul 18 20:49 CONTRIBUTOR_LICENSE_AGREEMENT.html
-rw-r--r--  1 root root    631 Jul 18 20:49 COPYING.txt
drwxr-xr-x  4 root root   4096 Jul 18 20:49 dev
-rw-r--r--  1 root root   2926 Jul 18 20:49 Gruntfile.js
-rw-r--r--  1 root root   1358 Jul 18 20:49 index.php
drwxr-xr-x  4 root root   4096 Jul 18 20:49 lib
-rw-r--r--  1 root root  10376 Jul 18 20:49 LICENSE_AFL.txt
-rw-r--r--  1 root root  10364 Jul 18 20:49 LICENSE.txt
-rw-r--r--  1 root root   4108 Jul 18 20:49 nginx.conf.sample
-rw-r--r--  1 root root   1427 Jul 18 20:49 package.json
-rw-r--r--  1 root root    804 Jul 18 20:49 php.ini.sample
drwxr-xr-x  2 root root   4096 Jul 18 20:49 phpserver
drwxrwxrwx  6 root root   4096 Jul 18 20:49 pub
drwxr-xr-x  7 root root   4096 Jul 18 20:49 setup
drwxr-xr-x  7 root root   4096 Jul 18 20:47 update
drwxrwsrwx 10 root root   4096 Sep 28 18:47 var
drwxrwsr-x 28 root root   4096 Jul 18 20:50 vendor

I am also using the same .csv Magento makes available to download, to clarify there are no issues with my document.


texts: Upgrade from 1.12 to 1.13.1 and 404 pages

texts:
we have successfully upgraded Magento from 1.12 to 1.13.1 .

All Modules and everything is working fine except the Category and product pages.
All category and Product pages shows 404 page.

All other links and default pages like login, my account etc etc are working fine.

Any idea what could be the problem?

Thanks


texts: 500 ERROR! Magento 2.1.3 Enable Multistore after fresh migration from 1.8

texts:
Can someone shed some light on Magento 2.1.3 enabling multistore?

things I have tried;

enabling index.php
code is dev
website url is dev.example.com

<?php
$params = $_SERVER;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'dev.dev.example.com';
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);
$app = $bootstrap->createApplication('Magento\Framework\App\Http');
$bootstrap->run($app);
?>

enabling .htaccess with index.php
code is dev
website url is dev.example.com

RewriteCond %{HTTP_HOST} ^(.*)dev\.example\.com
RewriteRule .* – [E=MAGE_RUN_CODE:dev.dev.example_com]
RewriteCond %{HTTP_HOST} ^(.*)dev\.example\.com
RewriteRule .* – [E=MAGE_RUN_TYPE:website

enabling vhost.conf with index.php
code is dev
website url is dev.example.com

SetEnv MAGE_RUN_CODE "dev.dev.example.com"
SetEnv MAGE_RUN_TYPE "website"

enabling index.php and old .htaccess

SetEnvIf Host dev\.example\.com MAGE_RUN_CODE=dev_example_com
SetEnvIf Host dev\.example\.com MAGE_RUN_TYPE=website
SetEnvIf Host ^example\.com MAGE_RUN_CODE=dev_example_com
SetEnvIf Host ^example\.com MAGE_RUN_TYPE=website

have tried enabling vhost with .htaccess and index.php
and vhost with .htaccess the old .htaccess and index.php

all of which have produced a Magento 500 error or the servers internal server error page

Also, have tried uncommenting this section of the index.php page. Although didn't give me any errors it isn't working correctly either. For example, I have removed a category from displaying in the header for this site and it still shows up like in default site. Also tried with .htaccess and as well.

require __DIR__ . '/app/bootstrap.php';
 $params = $_SERVER;
 $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'example.com';
 $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'dev.example.com';
 $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);


texts: Magento 1.9 rwd submenu dropdown a little lower

texts:
I want to have the submenu <ul class="level0"> ... Submenu items ... </ul> a little bit lower. But when i hover the Main menu item, the submenu disappear? Try the link 'SPIRITUELE MUZIEK'

I tried:

.nav-primary li.level0 ul {top: 40px;}

How do i get the submenu 10px lower?

Thanks!


texts:
Three months before I migrated Magento 1.9.3.3CE to Magento 2.1.7EE
I added/update CMS content.
Install 20+ extensions and configured all.
For testing, I altered some of the products, orders, customers of the current M2 database. [Major stuck point]
For testing I added products, customers, orders..etc

I'm planning for delta migration but I have some doubts

is delta migration overwrite whatever products we altered?
If M1 admin altered product, those details got reflected in M2 while delta Migration?

I'm looking for proper/best planning about delta migration. Also, I would like to know Do's and Don't Do's while delta migration.


texts:
I need to implement a link which redirects to the url of the last order of the current user

How do I do that ?

I have a code that load the last order, but I need to get the URL

        $orders = $this->_orderCollectionFactory->create();
        $orders->addFieldToFilter('customer_id', $customerId);
        $orders->addOrder('customer_id');
        $orderId = $orders->getLastItem()->getData('entity_id');
        $objectManager =  \Magento\Framework\App\ObjectManager::getInstance();
        $order = $objectManager->create('\Magento\Sales\Model\Order')->load($orderId);


texts: Magento 2 : Image is not showing on product detail page after few seconds

texts:
Product image is not showing after few seconds on product detail page. When page loads it showing the image but after few seconds it's vanishing.
Please provide any solution you have.
Thanks in advance.


texts:
How to set selected value in multiselect attribute progmatically. I tried this one but it doesn't work for me.

How to Programmatically set a Product's Multi-Select Attribute by Labels

the code on the link above doesn't stop from loading

$productObj = Mage::getModel('catalog/product')->load($product->getId());
$productObj->setData('filter_category','51,52');
$productObj->save();

the code above is invoke after catalog_product_save_after


texts: Magento2: Cant access customers grid on backend

texts:
I'm trying to access the customers grid (Customers->All Customers) on the backend and always get an error.

I've already uninstalled all the extensions that I've installed, cleared the cache and reindex the DB, but everything remains the same.

Below is the error

  Class
  Magento\Customer\Controller\Adminhtml\Index\Index\Interceptor
  does not exist

Regards


texts:
How to get a simple product id from configurable in checkout order summary in magento 2

image is https://prnt.sc/nsnh7y

code:

    <?php
namespace Cm\Preorder\Plugin\Checkout\Model;

use Magento\Checkout\Model\Session as CheckoutSession;
use Magento\Catalog\Model\ProductRepository as ProductRepository;
use Magento\CatalogInventory\Model\Stock\StockItemRepository;

class DefaultConfigProvider extends \Magento\Framework\Model\AbstractModel
{
    protected $checkoutSession;

    protected $stockItem;

    protected $_productRepository;

    private $_objectManager;

    public function __construct(
        CheckoutSession $checkoutSession,
        ProductRepository $productRepository,
        \Magento\CatalogInventory\Model\Stock\StockItemRepository $stockItem,
          \Magento\Framework\ObjectManagerInterface $objectmanager
    ) {
        $this->checkoutSession = $checkoutSession;
        $this->_productRepository = $productRepository;
        $this->stockItem = $stockItem;
        $this->_objectManager = $objectmanager;

    }

    public function afterGetConfig(
        \Magento\Checkout\Model\DefaultConfigProvider $subject,
        array $result
    ) {
        $items = $result['totalsData']['items'];
        foreach ($items as $index => $item) {
            $quoteItem = $this->checkoutSession->getQuote()->getItemById($item['item_id']);
            $product = $this->_productRepository->getById($quoteItem->getProduct()->getId());

            $productId = $product->getId();
            $stock = $this->stockItem->get($productId);
        /*    $preorder_note = $stock->getData('preorder_note'); */
            $result['quoteItemData'][$index]['preorder_note'] =$productId;
        }
        return $result;
    }

}


texts: Magento | How can we make the login to be by username not email ID

texts: How can we make the login to be by username not the email?


texts: Invalid template file - Upgrade issue from 2.2.6 to 2.2.7 or 2.3

texts:
I have upgraded 2.2.6 version to 2.2.7 version but its showing below error in my website.

1 exception(s):
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'C:/xampp2/htdocs/magento2/demo1/vendor/magento/module-theme/view/frontend/templates/page/js/require_js.phtml' in module: '' block's name: 'require.js'

Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'C:/xampp2/htdocs/magento2/demo1/vendor/magento/module-theme/view/frontend/templates/page/js/require_js.phtml' in module: '' block's name: 'require.js'
#0 C:\xampp2\htdocs\magento2\demo1\vendor\magento\framework\View\Element\Template.php(300): Magento\Framework\View\Element\Template->fetchView('C:/xampp2/htdoc...')
#1 C:\xampp2\htdocs\magento2\demo1\vendor\magento\framework\View\Element\AbstractBlock.php(667): Magento\Framework\View\Element\Template->_toHtml()
#2 C:\xampp2\htdocs\magento2\demo1\vendor\magento\framework\View\Result\Page.php(248): Magento\Framework\View\Element\AbstractBlock->toHtml()
#3 C:\xampp2\htdocs\magento2\demo1\vendor\magento\framework\View\Result\Layout.php(170): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#4 C:\xampp2\htdocs\magento2\demo1\vendor\magento\framework\Interception\Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#5 C:\xampp2\htdocs\magento2\demo1\vendor\magento\framework\Interception\Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#6 C:\xampp2\htdocs\magento2\demo1\vendor\magento\framework\Interception\Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#7 C:\xampp2\htdocs\magento2\demo1\generated\code\Magento\Framework\View\Result\Page\Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#8 C:\xampp2\htdocs\magento2\demo1\vendor\magento\framework\App\Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#9 C:\xampp2\htdocs\magento2\demo1\generated\code\Magento\Framework\App\Http\Interceptor.php(24): Magento\Framework\App\Http->launch()
#10 C:\xampp2\htdocs\magento2\demo1\vendor\magento\framework\App\Bootstrap.php(257): Magento\Framework\App\Http\Interceptor->launch()
#11 C:\xampp2\htdocs\magento2\demo1\index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#12 {main}

Same issue i am facing if i upgrade website from 2.6 to 2.3.

Is there any solution?


texts: How to skip onepage checkout shipping information?

texts:
I have created a new option as pickup @ office in onepage billing section instead of the other two options Ship to this address
Ship to different address. If customer selects this pickup @ office option he can use any address for the billing address. But the shipping address will be set progametically. I have done up to this step. What I want to do next is to directly move to the shipping methods section by skipping shipping address. For this is there a better way except overriding OnepageController.php.

Any suggestions will be appreciated.
Thanks in advanced.


texts: How to create custom grid in admin using js

texts: I want to create custom admin grid using jquery, I have search a lot but felt to get proper way. Can anyone suggest me the correct way.


texts: Extending cart controller works for one action but not the index action

texts:
I am trying to extend /checkout/cart/. I added "dumbAction" to test ensure the extension worked and /checkout/cart/dumb does work. However, when I access /checkout/cart I do not see any changes.

    <?php

    /*
     * To change this license header, choose License Headers in Project Properties.
     * To change this template file, choose Tools | Templates
     * and open the template in the editor.
     */

    require_once 'Mage/Checkout/controllers/CartController.php';

    class AimlessMedia_CheckoutActions_CartController extends Mage_Checkout_CartController
    /* the only reason this is extending the cart controller
     * is because I copied AimlessMedia_CheckoutDiscountOption and it
     * easier to just ride out the already programmed code
     */ {
        /**
         * Initialize coupon
         */
        public function dumbAction() {
            echo 'test indexAction';
        }
        public function indexAction() {
            echo ('test indexAction');
            parent::addAction();
        }
    }

Config.xml

            0.1.0

<frontend>
    <layout>
        <updates>
            <AimlessMedia_CheckoutActions>
                <file>AimlessMedia_CheckoutActions.xml</file>
            </AimlessMedia_CheckoutActions>
        </updates>
    </layout>
    <routers>
        <checkout>
            <use>standard</use>
            <args>
                <module>AimlessMedia_CheckoutActions</module>
                <frontName>checkout</frontName>
            </args>
        </checkout>
    </routers>
</frontend>

<!-- the following allows our admin tab to link to a page and not return a 404 error -->
<adminhtml>
    <acl>
        <resources>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <CheckoutActions_options>
                                        <title>Shows Upsell Popup at Checkout</title>
                                    </CheckoutActions_options>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
</adminhtml>

Resolution

Modified Config.xml to:

                <modules>
                    <CheckoutActions before="Mage_Checkout">AimlessMedia_CheckoutActions</CheckoutActions>
                </modules>


texts: Magento 1.9.3.1 Unable to upload products after upgrade

texts:
I recently upgraded from 1.9.2.4 to 1.9.3.1 and now we are unable to upload images. I had already applied the SUPEE-8788 patch before and had already switched from the Adobe Flash to the new HTML5 uploader and that was working before.

I have looked in PHP and nginx error logs, but there is no error. I've also verified that the image is uploaded to the directory mage_root/media/tmp/catalog/product but it does not get moved out of the tmp folder. As far as I am aware all permissions are correct.

I've already tried the solutions listed at: Upgrade from 1.9.2.3 to 1.9.3.1 Can not Upload Product Images in Admin but did not have any luck.

Any help would be greatly appreciated.


texts: How can I get the value of the selected filter in Magento 1.9 Grid and use it in another filter?

texts:
I need to get the filter value for a column and use it to further filter the results of another column, for example, country and states. How can I do this?

_prepareCollection:

        $collection->getSelect()->join(
        // Table
        'sales_flat_order_address',
        // Where Claus
        'main_table.order_id=sales_flat_order_address.parent_id',
        // Field
        array( 'company', 'country_id' , 'region')
    );

 protected function _prepareColumns():

$this->addColumn('region', array(
            'header' => Mage::helper('sales')->__('Region'),
            'index' => 'region',
            'filter_index' => 'sales_flat_order_address.region',
            'type'      => 'options',
            'options'      => $this->getAllRegions('country_id'),
             //'filter_condition_callback' => array($this, '_regionAddressFilter("country_id")')

        ));

and this is where I want to use the country code to filter regions in the region dropdown:

   protected function getAllRegions($column){
        $regions = array();
        $countryCode =  $this->getColumn($column)->getFilter()->getValue();
        $collection = Mage::getResourceModel('directory/region_collection')->load()->toOptionArray();
        foreach ($collection as $region) {
            $regions[$region['value']] = $region['label'];
        }
        return $regions;
    }


texts: I have to disable the MSI and enable the usual qty field only in the magento 2.3.5 version

texts:
I have to disable the MSI and enable the usual qty field only in the Magento 2.3.5 version

https://www.rakeshjesadiya.com/disable-sources-in-multi-source-inventory-magento-2/

I tried to use the modules listed on this blog, via the composer. It removes the modules but I am still not getting the usual qty and advance inventory fields in the product form.

I also tried some limited modules which were installed during the magento installation, and not required.
but it still didn't worked.
the list of those modules is below, in the post.
so I just wanted to know, what is that which I am missing here, and if there is any solution which someone has tried ??

Magento_CatalogInventoryGraphQl

Magento_InventoryAdminUi

Magento_InventoryAdvancedCheckout

Magento_InventoryBundleProduct

Magento_InventoryBundleProductAdminUi

Magento_InventoryCache

Magento_InventoryCatalog

Magento_InventoryCatalogAdminUi

Magento_InventoryCatalogSearch

Magento_InventoryConfigurableProduct

Magento_InventoryConfigurableProductAdminUi

Magento_InventoryConfigurableProductIndexer

Magento_InventoryConfiguration

Magento_InventoryDistanceBasedSourceSelection

Magento_InventoryDistanceBasedSourceSelectionAdminUi

Magento_InventoryDistanceBasedSourceSelectionApi

Magento_InventoryElasticsearch

Magento_InventoryExportStock

Magento_InventoryExportStockApi

Magento_InventoryGraphQl

Magento_InventoryGroupedProduct

Magento_InventoryGroupedProductAdminUi

Magento_InventoryGroupedProductIndexer

Magento_InventoryImportExport

Magento_InventoryLowQuantityNotification

Magento_InventoryLowQuantityNotificationAdminUi

Magento_InventoryProductAlert

Magento_InventoryRequisitionList

Magento_InventoryReservationCli

Magento_InventoryReservations

Magento_InventorySalesAdminUi

Magento_InventorySalesFrontendUi

Magento_InventorySetupFixtureGenerator

Magento_InventoryShipping

Magento_InventoryShippingAdminUi

Magento_InventorySourceSelection


texts: Magento 2 Rest Api V1/products missing extension attributes

texts:
I am calling the Rest API V1/products to get the product list from Magento 2 store

Request:

 http://{myMagentohost}/Magento/index.php/rest/V1/products?searchCriteria[currentPage]=1&searchCriteria[pageSize]=1

Response:

 {"items": [ { "id": 1,"sku": "24-MB01","name": "Joust Duffle Bag","attribute_set_id": 15,"price": 34,"status": 1,"visibility": 4,"type_id": "simple","created_at": "2017-06-13 09:36:11","updated_at": "2017-06-13 09:36:11","product_links": [{"sku": "24-MB01", "link_type": "upsell","linked_product_sku": "24-MB03","linked_product_type": "simple","position": null,"extension_attributes": []},{"sku": "24-B01","link_type": "upsell","linked_product_sku": "24-WB04","linked_product_type": "simple","position": null,"extension_attributes": []}],"options": [],"tier_prices": [],"custom_attributes": [{"attribute_code": "description","value": "
The sporty Joust Duffle Bag can't be beat - ot in the gym, not on the luggage carousel, not anywhere. Big enough to haul a basketball or soccer ball and some sneakers with plenty of room to spare, it's ideal for athletes with places to go.
\n
\n
Dual top handles.
\n
Adjustable shoulder strap.
\n
Full-length zipper.
\n
L 29\" x W 13\" x H 11\".
\n
"},{"attribute_code": "image","value": "/m/b/mb01-blue-0.jpg"},{"attribute_code": "small_image","value": "/m/b/mb01-blue-0.jpg"},{"attribute_code": "thumbnail","value": "/m/b/mb01-blue-0.jpg"},{"attribute_code": "url_key","value": "joust-duffle-bag"}]}],"search_criteria": {"filter_groups": [],"page_size": 1,"current_page": 1},"total_count": 2046}

Now according to the Magento 2 Rest API swagger documentation,
catalogProductRepositoryV1, GET /V1/products in response it shows the extension_attributes but when I actually call this api from postman extension_attributes is missing.

I  search for it but no appropriate solution is available.

Can anyone help in this matter?

Thanks!


texts:
I am trying to override customer/account/editpost controller.

I am getting error

  Recoverable Error: Argument 1 passed to
  Magento\Customer\Controller\Account\EditPost::__construct() must be an
  instance of Magento\Framework\App\Action\Context

I created di.xml file at location module/etc/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\Customer\Controller\Account\EditPost"
     type="Namespace\Modulename\Controller\Index\Editpost" />
</config>

and controller Controller\Index\Editpost.php

namespace Namespace\Modulename\Controller\Index;

class Editpost extends \Magento\Customer\Controller\Account\EditPost
{

    public function execute()
    {

        echo "asdasdsda"; die;
        return parent::execute();
    }

}


texts: How is the array $data parameter set in Magento 2 (dataObject constructor)

texts:
In https://github.com/SnowdogApps/magento2-menu/blob/master/Block/Menu.php, a plugin that makes it possible to replace the default menu, the constructor of the block looks like below.

For all arguments / parameters in the constructor except array $data, my understanding is that those are somehow managed through the object manager and created if not existing. However, I'm stuck at figuring out how the array $data is set. In https://github.com/SnowdogApps/magento2-menu/blob/master/etc/di.xml, there is no argument named data.

Menu.php constructor:

public function __construct(
    Template\Context $context,
    EventManager $eventManager,
    MenuRepositoryInterface $menuRepository,
    NodeRepositoryInterface $nodeRepository,
    NodeTypeProvider $nodeTypeProvider,
    SearchCriteriaFactory $searchCriteriaFactory,
    FilterGroupBuilder $filterGroupBuilder,
    array $data = []
) {
    parent::__construct($context, $data);
    $this->menuRepository = $menuRepository;
    $this->nodeRepository = $nodeRepository;
    $this->nodeTypeProvider = $nodeTypeProvider;
    $this->searchCriteriaFactory = $searchCriteriaFactory;
    $this->filterGroupBuilder = $filterGroupBuilder;
    $this->eventManager = $eventManager;
}

I've looked on this related question (Magento 2: what is the $data array constructor parameter?) and went to myMagentoRootFolder/vendor/magento/framework/DataObject.php, to have a look on the class which is inherited and uses the $data-parameter, this didn't make me understand it. Furthermore, I don't that the default empty array would work, because the getData()-method is used by the module and an empty response would be of no use.

DataObject.php constructor:

/**
 * Constructor
 *
 * By default is looking for first argument as array and assigns it as object attributes
 * This behavior may change in child classes
 *
 * @param array $data
 */
public function __construct(array $data = [])
{
    $this->_data = $data;
}

*Menu.php extends Template, and Template extends AbstractBlock, and AbstractBlock extends DataObject

So, I don't understand how and where array $data is set. Any help is appreciated, as I've been struggling to understand this for some days.


texts: Magento 2 Swiss Currency Decimal digit Issue on Staging server only

texts:
We have multi-stores on our server in Magento 2.3.1
There is a currency format issue on the server only on cart success page and checkout page. We have Swiss currency setup and Decimal digit is showing only one number like - CHF 123.0 (On cart summary and checkout page only)

Expected currency format CHF 123.00

Does anyone know how to solve it? Thanks in advance.


texts: How can i show this picture on Small Image

texts:
How can i show this picture as Small Image

and I have done this but it does not work.


texts: Apply special price to a list of products

texts: I want to apply a percentage special price to a group of products(list of SKUs) without manually going through each of one of them. Is there a way to this in backend or programmatically in magento ?


texts: Magento Live Stock excluding session stock

texts:
I am having a right ball game with a issue. I have written a AJAX cart system for a wholesale website we are developing. There is one long list of products and you can just enter your quantity in each of the boxes, click add to cart and it will run through adding these all to your cart. HOWEVER, I am having major issues. If a product has 10 in stock and I add 10 to my cart I want it to display 0 to the rest of the world because otherwise I get an error as the "live" stock level is not 10, it is 0 because the user has technically reserved the item according to Magento.

Does anyone have any idea how I can pull more of a live stock level rather than this which shows the inventory:

(int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_item)->getQty()

Thank you in advance.


texts: How to display the content on product pages without using tabs?

texts:
What's the more elegant way to remove the tabs on the Magento (2.4.2) product page? I'd like to simply show the content without using the tabs.
I was thinking to use some Javascript code in order to "disarm" the tabs widget.


texts: How to run migration command (bin/magento setup:upgrade) in testing environment?

texts:
I have created a new patch to add a custom product attribute. I have run bin/magento setup:upgrade command, and I can see the new attribute in Magento back-office.
I have a separate database for testing, and it does not have the last attribute in eav_attributes table. How can I run the database migration script to update the testing database?
Has anyone known how to do that?
Edit 1:
My sandbox is living under this directory: /var/www/dev/tests/integration/tmp/sandbox-0-49eadc3389172364f82b3221952422378a45a9ae20b05256a5a12adbcce837da.
When I run n98 db:info here, I see my development database connections.
+------------------------+-------------------------------------------------+
| Name                   | Value                                           |
+------------------------+-------------------------------------------------+
| host                   | db                                              |
| dbname                 | db                                              |
| username               | db                                              |
| password               | db                                              |
| model                  | mysql4                                          |
| engine                 | innodb                                          |
| initStatements         | SET NAMES utf8;                                 |
| active                 | 1                                               |
| prefix                 |                                                 |
| PDO-Connection-String  | mysql:host=db;port=3306;dbname=db               |
| JDBC-Connection-String | jdbc:mysql://db:3306/db?username=db&password=db |
| MySQL-Cli-String       | mysql -h'db' -u'db' --password='db' 'db'        |
+------------------------+-------------------------------------------------+

I was expecting to see my testing database here, but I did not.
Cheers,


texts:
How to get the customer name from the observer - magento 2.
From the event customer_register_success.

I tried like this but i got an error.

$customer = $observer->getEvent()->getCustomer();
$customer_id = $customer->getId();
$customer_email = $customer->getEmail();
$customer_name = $customer->getName();

I know i can get the name from customer session. what i want here is i want to get the name from getEvent


texts: IS_REQUIRED error on Migration from Magento 1.9.2.2 to 2.2.6

texts:
I'm trying some dry run to migrate data from Magento 1.9.2.2 to 2.2.6.
After some adjustment, I'm stuck on the following error

[2018-10-28 14:57:56][INFO][mode: data][stage: data migration][step: Map Step]: started
26% [=======>--------------------] Remaining Time: 2 mins
[2018-10-28 14:58:59][ERROR]: Record structure does not contain field is_required

  [Migration\Exception]
  Data Migration failed

In map-eav xml there is a rule to transform it

    <transform>
        <field>eav_attribute.is_required</field>
        <handler class="\Migration\Handler\GetDestinationValue" />
    </transform>

but I don't know where to check and how to go on.


texts: Magento 2 How to added languages packs to git repo?

texts:
I needed to add languages packs to own bitbucket repo. Installed this packs successfully but when I try to add thems to git , git give me message

  "modified content". Spend some time to figured where is issue and found [next] https://stackoverflow.com/questions/7726131/git-add-a-is-not-adding-all-modified-files-in-directories

"This error occurs because you have added a folder which is already linked with some another github repository . The parent folder you are working with is linked with some other repository. "

I decide to delete .git folders , clean cache and tryed to add again needed folders, use git add ..... , then git status say me: "no changes added to commit".

So is there any way to add files to own git repo , or in this case I need to install languages packs only by comands inside project?

composer require mageplaza/magento-2-some-language-pack:dev-master
php bin/magento setup:static-content:deploy sm_SM


texts:
I'm trying to create variation in sizes for a single product of different color. So I want to give the customer the option to choose the size ONLY. Color of the product will be defined by me. For example, suppose I'm selling a jacket which is available in Blue, Grey and Black color. Sizes are usual, viz: M, L, XL, XXL.

So I will list the product like this:

Men's ABC Jacket- Blue

Sizes: M, L, XL, XXL

Men's ABC Jacket- Black

Sizes: M, L, XL, XXL

And so on...

Now, if I do this using the attribute sets generator feature then I will end up creating single listing for each variation in Size. Therefore, the total number of listings would be: 3x4=12

12 listing for a single product? Does that really sound fair enough? Since I'm an amateur in the world of Programing and Magento, I dunno if there's any alternative of incorporating different sizes in One single listing. (Prestashop offers this features and it works seamlessly)

Lemme make it more clear. I want the sizes to be combined in a listing for a specific color. Like, If the listing is for BLACK color jacket, then the most a customer has to do is to just choose the Size. Nothing else! I don't want my customers to surf across my website just to find the listing for their size. Right now after following the instructions on this blog: http://www.sitepoint.com/adding-configurable-products-magento-ecommerce-site/

I ended up creating 4 different listing for same color but different sizes.

So as you can see in the screenshot of the products page of my website, there are 4 different listing for 4 different sizes but same color. Can anyone please tell me how can I create a single listing for "Light Grey" color jacket and add variable sizes into so that customer can just choose the size.

Please help me. I'll buy you a beer!


texts: Auto select shipping method on paypal review page

texts: How can I auto select shipping method on page load for PayPal review page?


texts: Unfortunately/mistakenly a customer was deleted. but from this customer id purchased lots of item. So I want add new customer with previous id. Please help me.


texts: How to make stock quantity of a different product decrease, when a product is bought?

texts:
When an item is bought, the quantity for THAT item will decrease by 1, how could I make it so ANOTHER item also decreases by 1.

For example, on my website, I will be selling computer parts individually, but also, I will be selling assembled computers aswell, the assembled computer will use components of the computer parts, hence when someone purchases an assembled computer, the stock for that, and the used computer parts should all decrease, as to manage my stock quantities properly.


texts: Magento 2: Importing Virtual products URL key

texts:
I'm trying to upload a configurable product with product variations. This did work fine for a while, but now I get this error:

1. Specified URL key already exists in rows: 3

If I analyze the function that validates the row (vendor/magento/module-catalog-import-export/Model/Import/Product.php L:2242) I can see that Magento builds an array with URL keys that already imported. The first item keeps it's capitals, the second item is all lower case (that's why this line does pass the validator). The third line is also all lowercase because this is already in the array urlKeys the validator throws an error.

The product in row 3 is a virtual product. I thought virtual products did not need this URL-key option (this did work fine). Why do I get this error?


texts: Blank admin screen after upgrade from 1.7 to 1.9.2.4 via Magento Connect

texts:
I chose to upgrade via magento connect and am now getting a blank screen for admin with an error when printed of

  Fatal error: Class 'Unserialize_Parser' not found in
  /var/www/web/app/code/core/Mage/Core/Helper/UnserializeArray.php on
  line 43

I've cleared cache and session folders, is it related to certain patches? how can i troubleshoot/resolve please?


texts: magento2 disable user defined quantity on all frontend views for all products

texts: I am creating a store for a client by using the porto theme where the quantity box in frontend does not make any sense, so i need to remove it from all frontend view, including in mini cart, cart page, product detail page etc. So is there any setting in admin panel or something where i can easily hide the quantity box from all frontend views ?


texts: What's the function of `$editMode` and `$forceReload` parameter in ProductRepository?

texts:
What's the function of $editMode and $forceReload parameter in ProductRepository?

If I set $editMode=true or $forceReload=true, what will happen?

When should I set the parameter is true when using the ProductRepository?

Below is the codes in ProductRepository:

public function get($sku, $editMode = false, $storeId = null, $forceReload = false)
{
    $cacheKey = $this->getCacheKey([$editMode, $storeId]);
    if (!isset($this->instances[$sku][$cacheKey]) || $forceReload) {
        $product = $this->productFactory->create();

        $productId = $this->resourceModel->getIdBySku($sku);
        if (!$productId) {
            throw new NoSuchEntityException(__('Requested product doesn\'t exist'));
        }
        if ($editMode) {
            $product->setData('_edit_mode', true);
        }
        if ($storeId !== null) {
            $product->setData('store_id', $storeId);
        }
        $product->load($productId);
        $this->cacheProduct($cacheKey, $product);
    }
    if (!isset($this->instances[$sku])) {
        $sku = trim($sku);
    }
    return $this->instances[$sku][$cacheKey];
}


texts: Magento 2 admin panel is down after changing Base URL

texts:
I have changed Base URL secure and unsecure from the backend.
I had the following url= http://subdomain.domain.org/folder (also https) and I changed it in order to have http://subdomain.domain.org/.
The frontend is currently working fine as http://subdomain.domain.org, but the backend for some reason stopped working, and now it trows an error Not Found.

The way I access the backend is http://subdomain.domain.org/folder/admin I did not change the admin url and cannot access to that url.

I have changed all old URL in core_config_data table, but its not working yet.

Greetings!


texts:
ref:mages not displaying in cart or mini cart

I have created one custom attribute imageurl to import product image url. Product images are loading from external url. Images displaying in product list and product detailed page. But simple products are not displaying in cart and mini cart page.. What can be the issue?


texts:
By default Magento has three sort options - by position, by name and by price. I want to implement sorting by sold quantity.

This is what I've came up so far (I'm overriding core files the Magento way via config.xml)

This is Myname/Catalog/Block/Product/List/Toolbar.php:

class Myname_Catalog_Block_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar
{
    public function setCollection($collection)
    {
        parent::setCollection($collection);
        if ($this->getCurrentOrder()) {
            if($this->getCurrentOrder() == 'qty_ordered') {
                $this->getCollection()->getSelect()
                     ->joinLeft('sales_flat_order_item AS sfoi', 'e.entity_id = sfoi.product_id', 'SUM(sfoi.qty_ordered) AS qty_ordered')
                     ->group('e.entity_id')->order('qty_ordered ' . $this->getCurrentDirection());

            } else {
                $this->getCollection()
                     ->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
            }
        }
        return $this;
    }
}

And this is Myname/Catalog/Model/Config.php:

class Myname_Catalog_Model_Config extends Mage_Catalog_Model_Config
{
    public function getAttributeUsedForSortByArray()
    {
        return array_merge(
            parent::getAttributeUsedForSortByArray(),
            array('qty_ordered' => Mage::helper('catalog')->__('Sold quantity'))
        );
    }
}

This WILL make the sorting actually working, but the pager is then not working. I always get the wrong item count as seen below and thus I have no pagination as there is 1 item according to pager, even though it's showing 10 (as the default limit is).

What am I doing wrong?


texts: How to add criteria to all product search?

texts:
I associate all my products to at least 1 category (visible from menu) + 1 'special' category (not visible from menu).
There are many 'special' categories, they are special because not visible form menu, and because I associate 2 special categories to each my registered customer. (they're aware, no secrete).
When a registered customer visit any category page (frontend) or when he makes a search, I'd like to always filter products based on the 2 special categories this customer is associated to!
Basically a customer can visit any category, but shall only see products which belong to that category AND one of the 2 special categories assigned to him.
Let's say "customer 1" is linked to cat X and Y, I provide some pseudo code to better explain my need:

if customer visits 'category A' page, products shall be filtered like this: "CAT A AND (CAT X OR Y)"
=>i.e. all products attached to Cat A, but also to X OR Y
if customer visits 'category B' page, products shall be filtered like this: "CAT B AND (CAT X OR Y)"
=>i.e. all products attached to Cat B, but also to X OR Y
if customer makes a search for name=foo, then search shall be like "name=foo and (CAT X OR CAT Y)"
=>i.e. all products with a relevant score linked to "foo", but associated to Cat X OR Cat Y

Of course:

all layered navigation shall consider this additional filtering behind the scene to be consistent
if another customer is associated to Cat W and Cat Z, then same scenarios as above will apply but with W and Z instead of X and Y.

I'm on magento 2.4.1 with ES7.
I spent many (many) hours to search where to update core, but I'm failing. The learning curve is hard, so if anyone can help me to point out where I can add such restriction for search, catalog view and layered navigation that would be awesome. I don't need detail code. I know also how to store and retrieve the per customer categories.
thanks!


texts: how to find out where customer subscribed to newsletter from?

texts:
Is there  anyway to find out where the customer sign up to newsletter from.

i know the default way of subscribing is footer, but i am using the exact same way in different page also at checkout.

Is there any way to find out where they subscribed from.


texts:
In my site url display like www.abcd.com/one.html, How can i remove .html in my url.

  Note : Product Url Suffix & Category Url Suffix EMPTY

Still my url display .html, How can i remove


texts:
I bought an order attributes extension and as with all things Magento, I've been tweaking it to my tastes. They add in their fieldset of the new form elements into an existing checkout step. Their backend lets you pick what step and dynamically declare the extra attributes, too. I've already successfully changed three of the elements from simple text inputs to instead be <SELECT> dropdowns of attributes from our catalog.

Now I want to re-style the html so they go left to right and not in the generic order and layout of all Magento/Varien forms. I've done this dozens of times in various template .phtml files, but this case is defying my attempts.

My problem is that if I alter the template fields.phtml with my form (my usual practice), then the new order attributes show up on every checkout step, not just the one I want.

So I next think, ok, let's alter _toHtml() in fields.php. Now I have a chicken and egg problem in that this function starts off with calling $html = parent::_toHtml(); which goes through the entire HTML building process.

The template file adds a bunch of stuff above my form, so it's not "easy" to just change the text string $html.

Any ideas about getting hold of the <SELECT> html at some point in the chain?

Their code flow is like this:
Company/Extension/Block/Fields.php _toHtml() calls getFormElements(), which instantiates a new Varien_Data_Form() and then creates the fieldset adding their attributes to the form with
$fieldset->addField($attribute->getAttributeCode(), $fieldType, $elementOptions)
                                    ->setEntityAttribute($attribute);

At no point is there any raw HTML in their code for making these input fields.

_toHtml() then executes:
$html = parent::_toHtml();

which goes to: app/code/core/Mage/Core/Block/Template.php which executes this series of calls:

▄ _toHtml() calls renderView()
▄ renderView() calls $this->fetchView($this->getTemplateFile())
▄ fetchView() simply does an include() of the template file, fields.phtml
▄ The template file, fields.phtml then does foreach ($this->getFormElements() as $element) ... and then does echo $element->toHtml(); but, there's only one "element", which is the fieldset itself.
▄ Next stop I think is lib/Varien/Data/Form/Element/Abstract.php where its toHtml() calls getHtml()
▄ getHtml() then calls getDefaultHtml()
▄ getDefaultHtml() in file lib/Varien/Data/Form/Element/Fieldset.php actually generates the HTML itself, adding in the

 I'm seeing just above the fieldset itself in the page source.
▄ The fieldset is rendered via $this->getElementHtml() which in Fieldset.php, then does the  and  tags and for the actual elements in the fieldset, it runs $html.= $this->getChildrenHtml();


texts:
How to hide some option in condition  field  in admin?

I used this blog to create a condition action:

  https://www.mageworx.com/blog/2016/09/magento-2-module-with-conditions-model-fieldset/


texts: I created a few test profiles and I need to remove them because, if selected, they could cause a lot of problems with my system.  There isn't a built in feature to remove the profiles with Magmi and I cannot find any records of the profiles in the database.  How can I remove Magmi profiles?


texts: How to create a NOT LOGGED IN Customer from Magento frontend?

texts:
I want to create a customer from frontend with customer group should be "NOT LOGGED IN". I checked that it and no answer available for this.

Please help me in sort out this.


texts: Fresh magento 2.3 install on fresh install of centos 7 cant start install

texts:
I can't start installation from the browser. When i visit /kagneto/setup i get a 500 error.

Created permissions set per the docs. The filesystem user is someuser and has groups someuser apache.

someuser@localhost $ groups
someuser www-data

The following are the permissions of the directory getting the error:

[someuser@localhost kagento]# ls -al /var/www/html/kagento/var/
total 8
drwxrws---.  5 someuser apache   73 Jan 14 10:23 .
drwxrwx---. 14 someuser apache 4096 Jan 14 09:35 ..
drwxrws---.  3 someuser apache   36 Jan 14 10:21 composer_home
-rwxrwxrwx.  1 someuser apache  126 Jan 14 09:35 .htaccess
drwxrws---.  2 someuser apache   23 Jan 14 10:22 log
drwxrws---.  3 someuser apache   23 Jan 14 10:22 page_cache

I'm getting the following error:

PHP Fatal error:  Uncaught kagento\\Framework\\Exception\\FileSystemException: Directory "/var/www/html/kagento/var/cache/" cannot be created Warning!mkdir(): Permission denied in /var/www/html/kagento/vendor/kagento/framework/Filesystem/Driver/File.php:226\nStack trace:\n#0 /var/www/html/kagento/vendor/kagento/framework/Filesystem/Driver/File.php(200): kagento\\Framework\\Filesystem\\Driver\\File->mkdirRecursive('/var/www/html/m...', 511)\n#1 /var/www/html/kagento/vendor/kagento/framework/Filesystem/Directory/Write.php(93): kagento\\Framework\\Filesystem\\Driver\\File->createDirectory('/var/www/html/m...', 511)\n#2 /var/www/html/kagento/vendor/kagento/framework/App/Cache/Frontend/Factory.php(294): kagento\\Framework\\Filesystem\\Directory\\Write->create()\n#3 /var/www/html/kagento/vendor/kagento/framework/App/Cache/Frontend/Factory.php(132): kagento\\Framework\\App\\Cache\\Frontend\\Factory->_getBackendOptions(Array)\n#4 /var/www/html/kagento/vendor/kagento/framework/App/Cache/Frontend/Pool.php(67): kagento\\Framework\\App\\Cache\\Frontend\\Factory->create in /var/www/html/kagento/vendor/kagento/framework/Filesystem/Driver/File.php on line 226

While posting, i had the following stackexchange error:

  Body cannot contain "kagneto". This is a site for kagento, not an
  X-Men character. ;-)

Replace k with m for the above. Is this a joke? I had to rename the directories just to post the output.


texts: Push Notifications on any change in Magento Database

texts:
I am providing Web-services of magento for POS Application.

I am Using Magento Soap-API for web-services.

How can I get last Updation in magento database??

If any changes occurs in magento database Then I(magento API) have to tell to POS so that POS can synchronize their local database with changes occurs in magento database.


texts:
I found the answer to this for Magento 1.x, but I can't find a 2.0x solution.

On my category pages, before the products are shown, there is a huge image, "category-image".

Does anyone know where the phtml file is that loads this image?

Thanks so much!


texts: Save value of custom field in minicart to order Magento 2

texts:
I have added one field "Special instructions" (textarea) in mini cart which I want to get saved in order details when customer put the order.

In which observer can I get the value of this field? and how can I save it to order?


texts: Translate product's informations ( descriptions, short description, title,..)

texts:
How I can translate product's informations (descriptions, short description, title, ...) in a lot of languages (English, French, German, ...) without creating the product multiple times for each language?

Can I do that just with store view in Magento?


texts: In my home i added a widget for new products but i want to rename new products to something else`


texts: Magento : Same Product Adds to Different Line in Cart

texts: If user adds product to cart without logging in and then logs in, if same product is available in user's cart which was added to his cart in his earlier logged in session, product shows in same line instead of updating the quantity. I tried disabling local modules and switching to rwd theme. Still the issue exists. Magento version is 1.9.2.2


texts: Magento 2: Newsletter Sending Takes Time

texts:
I'm able to get Newsletter which is set from Newsletter Queue.

If I set immediate date time then also it takes 7 to 10 minutes to sent email to users.

Is there any way that it will send immediate once u start the queue?

Does it belongs to Admin -> Stores -> Configuration -> System -> Cron (Scheduled Tasks) Settings?


texts:
I created default.xml for my module.
I want to inject block into header.
I tried different ways like:

<referenceContainer name="header.container" before="-">
<block class="Vendor\Name\Block\Block" name="myname" template="Vendor_Name::block.phtml" />
</referenceContainer>

<referenceContainer name="header.container" before="-">
<block class="Vendor\Name\Block\Block" name="myname" template="Vendor_Name::block.phtml" />
</referenceContainer>

<referenceContainer name="header.wrapper">
<block class="Vendor\Name\Block\Block" name="myname" template="Vendor_Name::block.phtml" />
</referenceContainer>

....

But it still not working.
Injection my block into body (if i use name="after.body.start" working ok.

I make sure that my Module will load after Theme

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

But my block is still not visible or in some cases (when i use orher names) magento do not add my block to cointeriner but emptyfied this cointerner - display empty cointeriner.

What are the the best methods to debug what exactly is going on under the hood - if i want to trace whole process of creating HTML of HTML?


texts: How to install the magento patch and steps to steps

texts:
Important: New Magento Security Patch - Install it Now
Urgent: Immediately install Magento critical security patches
Second Reminder: Download and install Magento critical security patches now.
Critical Reminder: Download and install Magento security patches. Download now.

After the installation in patches, its affect a site or not ? please share
then this patches are mandatory or not ? please help me ,am helpless


texts:
Maybe it's just me, but I can't for the life of me find where category permissions exist on 2.0 EE
Even in the new user guide- the only time category permissions is mentioned is in the private sales/events section. Am I missing something here?

1.x documentation:
http://merch.docs.magento.com/ee/user_guide/catalog/category-permissions-configure.html


texts: Copyright notice on modified base/default template in own design package

texts:
When creating a custom design package for a client I often find myself copying a template from either base/default or rwd/default and modifying this template to the client's needs.

The license used is the Academic Free License (AFL 3.0) (http://opensource.org/licenses/afl-3.0.php)

This states the following:

  6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.

Does this mean the full copyright notice must be kept in every file you copy and change to your own design package?

see full notice below:

**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     rwd_default
 * @copyright   Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

============== Follow up Question ==============

@benmarks based on your official answer, would the following fulfil all legal requirements:

**
 * Derivative work based on template in base/default theme created by:
 * Magento
 *
 * @copyright   Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *
 * Changes by: My Name
 * @copyright   Copyright (c) 2015 MyCompany Ltd
**


texts: Magento 2- Added widget in static block is not visible in front end

texts:
I have created a static block and within the block, I have added an embedded code for new_products widget.
All content is visible in the front end except the widget.

Embedded Code:

  {{widget type="Magento\Catalog\Block\Product\Widget\NewWidget"
  display_type="new_products" products_count="10"
  template="product/widget/new/content/new_grid.phtml"}}

Current Theme:-

https://themeforest.net/item/starbella-responsive-magento-2-theme/23641097

Please suggest.


texts: How to use Union query in a Magento 2 collection

texts:
I am working on Magento 2 grid UI component. For that I am generating grid using multiple table which does not have any relation( so I cant join). I am using union to combine the tables. But while trying to use it giving following error.

This is my code:

protected function _initSelect()
{
    parent::_initSelect();
    $this->getSelect()->reset(\Zend_Db_Select::COLUMNS)->columns(['created_at'=>'created_at']);

    $sqlq=clone $this->getSelect();
    $sqlT=$this->getSelect()->reset()->from('procurement_owned', ['created_at'=>'created_at']);
    $sql2= clone $sqlT;
    $this->getSelect()->reset()->union([$sqlq,$sql2], \Zend_Db_Select::SQL_UNION_ALL);

    return $this;
}

Then I printed the sql query run that directly into phpmyadmin its giving expected output by combining two tables.

I debugged little and found following line form Zend_Db_Select  class throwing the error

public function columns($cols = '*', $correlationName = null)
{
    if ($correlationName === null && count($this->_parts[self::FROM]))  {
        $correlationNameKeys = array_keys($this->_parts[self::FROM]);
        $correlationName = current($correlationNameKeys);
    }

    if (!array_key_exists($correlationName, $this->_parts[self::FROM]){
        /**
        * @see Zend_Db_Select_Exception
        */
        #require_once 'Zend/Db/Select/Exception.php';
        throw new Zend_Db_Select_Exception("No table has been specified for the FROM clause");
    }
    $this->_tableCols($correlationName, $cols);

    return $this;
}

i don't know what cause the error. please help me. Thanks


texts:
I have to override the following file
vendor/magento/module-payment/Model/Method/Adapter.php
but it's not working after writing the preference in etc/di.xml. If anyone knows please help.
Below is the code I am using:
Vendor/Module/etc/di.xml
<preference for="Magento\Payment\Model\Method\Adapter" type="Vendor\Module\Model\Adapter" />

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

namespace Vendor\Module\Model;

use Magento\Framework\App\ObjectManager;
use Magento\Framework\DataObject;
use Magento\Framework\Event\ManagerInterface;
use Magento\Framework\Exception\LocalizedException;
use Magento\Payment\Gateway\Command\CommandManagerInterface;
use Magento\Payment\Gateway\Command\CommandPoolInterface;
use Magento\Payment\Gateway\Config\ValueHandlerPoolInterface;
use Magento\Payment\Gateway\Data\PaymentDataObjectFactory;
use Magento\Payment\Gateway\Validator\ValidatorPoolInterface;
use Magento\Payment\Model\InfoInterface;
use Magento\Payment\Model\MethodInterface;
use Magento\Payment\Observer\AbstractDataAssignObserver;
use Magento\Quote\Api\Data\CartInterface;
use Psr\Log\LoggerInterface;

class Adapter extends \Magento\Payment\Model\Method\Adapter
{
    /**
     * @var ValueHandlerPoolInterface
     */
    private $valueHandlerPool;

    /**
     * @var ValidatorPoolInterface
     */
    private $validatorPool;

    /**
     * @var CommandPoolInterface
     */
    private $commandPool;

    /**
     * @var int
     */
    private $storeId;

    /**
     * @var string
     */
    private $formBlockType;

    /**
     * @var string
     */
    private $infoBlockType;

    /**
     * @var InfoInterface
     */
    private $infoInstance;

    /**
     * @var string
     */
    private $code;

    /**
     * @var ManagerInterface
     */
    private $eventManager;

    /**
     * @var PaymentDataObjectFactory
     */
    private $paymentDataObjectFactory;

    /**
     * @var \Magento\Payment\Gateway\Command\CommandManagerInterface
     */
    private $commandExecutor;

    /**
     * Logger for exception details
     *
     * @var LoggerInterface
     */
    private $logger;

    public function __construct(ManagerInterface $eventManager, ValueHandlerPoolInterface $valueHandlerPool, PaymentDataObjectFactory $paymentDataObjectFactory, $code, $formBlockType, $infoBlockType, CommandPoolInterface $commandPool = null, ValidatorPoolInterface $validatorPool = null, CommandManagerInterface $commandExecutor = null, LoggerInterface $logger = null)
    {
        parent::__construct($eventManager, $valueHandlerPool, $paymentDataObjectFactory, $code, $formBlockType, $infoBlockType, $commandPool, $validatorPool, $commandExecutor, $logger);
    }

    public function isAvailable(CartInterface $quote = null){
        parent::isAvailable();
        die("fsdfsdfsdf");
        }

    /**
     * @inheritdoc
     */
    public function cancel(InfoInterface $payment)
    {
        die("core test");
        //$this->executeCommand('cancel', ['payment' => $payment]);
        return $this;
    }

}


texts: How does one add arbitrary text to a grid view?

texts:
I'd like to be able to add arbitrary text to grid view such as instructions or reminders above the grid and pagination controls or a footnote below the table. What is the best method for doing this? One way might be to create a custom template (e.g., in app/design/adminhtml/default/default/template/mymodule/customgrid.phtml) and then add an entry in the layout XML (e.g., app/design/adminhtml/default/default/layout/mymodule.xml).

Am I barking up the right tree? Or is there an easier way?


texts: Magento 2: How to fix error `[Zend_Db_Adapter_Exception] SQLSTATE[HY000] [2002] No such file or directory` when run setup:upgrade?

texts: I install lampp on lixnux. Then install Magento 2. However, i get some errors when run setup:upgrade and setup:static-content:deploy. Please see image:


texts: Redirect disabled product to product category

texts: I would like to know if it's possible to redirect disabled product to the URL of its category.


texts: I am getting an issue on Magento 2.2 when trying to create promotion rule. This error occurs sometimes and the error disappears if run Magento upgrade command. But it comes again sometime.


texts: Magento connect to verrified reveiews module (avis-verifies ) from different server

texts:
i want to test "avis verifies" module on a development server.

the problem i facing that the module's already connected to a production server and i can't syncronize the account with the dev server.

thank you for your reply.


texts: Tier price is not display on product view page and not apply into cart page also

texts:
I had applied tier price on products it save data in
    mage_catalog_product_entity_tier_price database table but it does not show any effect of tier price on view and list page of Website.

<?php echo $this->getTierPriceHtml()  ?>

Does not print and label


texts:
We are getting the following error on updating products via the Magento API.

Error message
Uncaught Exception: Uncaught exception 'Exception' with message 'Serialization of 'Mage_Core_Model_Config_Element' is not allowed' in app/code/core/Mage/Core/Model/Resource/Session.php:97

I have cleared all session data and even turned off cron, but the issue still happens. I have profiled the normal product save and have not found any issues.

EDIT: Problem is happening only on update and appears to be related to an attribute. We are trying to debug this


texts: Overriding Mage_Catalog_Model_Product_Type_Price Not Work for Configurable and Downloadable Product

texts:
I have successfully override Mage_Catalog_Model_Product_Type_Price to edit the getPrice function with this code.

class Myc_Mymodule_Model_Product_Type_Price extends Mage_Catalog_Model_Product_Type_Price
{

    public function getPrice($product)
    {
        return 10;
    }

This works for simple and grouped product, but it's not work for Configurable and Downloadable Product.

But if I edit getPrice function directly in the core file app/code/core/Mage/Catalog/Model/Product/Type/Price.php with the above code, it works for all product.

How this can happen? And how to make it works for all product by overiding Mage_Catalog_Model_Product_Type_Price?


texts: Magento 1.9: JS File in browser does not change

texts:
I'm using extension Cm_RedisSession to enable Redis, when i change a js file in media/js folder, and when I reload the browser it still didn't change, i already did these:

Delete var/cache , var/session
Flush Magento Cache
Delete Browser Cache
Using other browser and pc
Flush Redis Cache redis-cli flushall


texts: Magento 2.3 fresh installation issue : tinymce.js not load

texts: Loading failed for the  with source “/pub/static/adminhtml/Magento/backend/en_GB/tinymce.js”.


texts: Shopping Cart Price Rules For a grouped items - Magento 1.9

texts:
I want to create a price rule for a shopping cart that only to be activated when there are certain SKU placed in the cart.

For example. only if these 4 products sku1, sku2, sku3, sku4 existed in the shopping cart at the same time, then a customer could have a fix amount discount for 100 USD for the whole cart.

Is this possible in Magento?


texts: Is it possible to share the cart contents between multi-store websites?

texts:
I have a client who needs a multi-store setup. They require the contents of the cart to be shared between websites. Also when the customer switches between websites, the cart item(s) price may be different and in different currencies.

Is this possible to do? As far as I am aware its possible between store views.
Any information would be much appreciated.

Thanks.


texts: Customer grid new column display when sorting

texts:
I'm trying to add a "Company" column in the Customer Grid.
The Company is a Customer Attribute I've added programatically and stored in the DB in the customer_entity_varchar table.

I've rewritten the Grid like this :

class MyCompany_MyModule_Block_Adminhtml_Customer_Grid extends Mage_Adminhtml_Block_Customer_Grid
{
protected function _prepareColumns()
{
    $this->addColumnAfter('company_name', array(
        'header' => 'Company Name',
        'type' => 'text',
        'index' => 'company_name',
    ), 'email');

    parent::_prepareColumns();
}

protected function _prepareCollection()
{
    $collection = Mage::getResourceModel('customer/customer_collection')
        ->addNameToSelect()
        ->addAttributeToSelect('email')
        ->addAttributeToSelect('created_at')
        ->addAttributeToSelect('group_id')
        ->addAttributeToSelect('company_name')
        ->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left')
        ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left')
        ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
        ->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
        ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');

    $this->setCollection($collection);

    return parent::_prepareCollection();
}
}

There is nothing displayed except when I sort or filter with this new company column. For example if I sort with ID, no companies displayed, if I sort with Company, everything is perfect.

I've tried to replace the "return parent::_prepareCollection();" by "return $this;" : everything is displayed as expected but there is not any filter or sort available.

Where is my problem ?

Thanks.


texts: Magento admin showing multiple icons on buttons

texts:
I see multiple icons on all admin buttons, please have a look at the screenshot below

And I see that Magento is spitting two extra span tags while it should wrap the button text in single span tag but for some reason, it wraps two more span tags. I have flushed Magento cache, cleared out contents of cache directory but all in vain. It's a weird behavior and I never encountered such issue before while working with Magento before.

Can anybody give me a clue?

Note: No JS error is there in the console. And, no relevant error found in Magento logs. Magento version is 1.9.3.9


texts: Magento 2 resize image product details page

texts:
How to resize image of product details page in Magento 2?

http://solivr.mobilegiz.com/tunique-noire-brodee-396.html


texts: Updating via SSH: Magento CE 2.1.2 to 2.1.3

texts:
I would like to update my Magento 2.1.2 version to the new Magento 2.1.3 via SSH.
I have established a connection with my server, but am not sure how to continue.

The internet provides me commands on how to update from 2.0.x to 2.1.x, but I do not know how to change these such that they perform the desired 2.1.2 to 2.1.3 update.

Also, it seems that the commands needed differ depending wether or not my Magento was originally installed with sample data. I cannot remember if my version was installed with sample data.

Commands found

without sample data

1 composer require magento/product-community-edition 2.1.0 --no-update
2 Composer update
3 php bin/magento setup:upgrade

with sample data

1 composer require magento/product-community-edition 2.1.0 --no-update
2 composer require magento/module-bundle-sample-data:100.1.0 magento/module-widget-sample-data:100.1.0 magento/module-theme-sample-data:100.1.0 magento/module-catalog-sample-data:100.1.0 magento/module-customer-sample-data:100.1.0 magento/module-cms-sample-data:100.1.0 magento/module-catalog-rule-sample-data:100.1.0 magento/module-sales-rule-sample-data:100.1.0 magento/module-review-sample-data:100.1.0 magento/module-tax-sample-data:100.1.0 magento/module-sales-sample-data:100.1.0 magento/module-grouped-product-sample-data:100.1.0 magento/module-downloadable-sample-data:100.1.0 magento/module-msrp-sample-data:100.1.0 magento/module-configurable-sample-data:100.1.0 magento/module-product-links-sample-data:100.1.0 magento/module-wishlist-sample-data:100.1.0 magento/module-swatches-sample-data:100.1.0 magento/sample-data-media:100.1.0 magento/module-offline-shipping-sample-data:100.1.0 --no-update
3 Composer update
4 php bin/magento setup:upgrade

In concrete, my questions are,

How do I figure out wether or not I initially installed with sample data?
How do I change the above commands such that I obtain the desired result?


texts: USPS Patch SUPEE-10336 - Possible issues?

texts:
A new USPS patch has been released for Magento 1:

https://magento.com/tech-resources/download#download2070

What common issues do you have to watch out for when applying this patch?

  -This patch addresses USPS method name changes starting Sep 1, 2017 - Added Sep 11, 2017

A topic like this exists for SUPEE-10266, which is newer but has a lower patch number.
We discovered two problems and one fix for this less known official patch. That is why we created this topic. To help the community with what we found, and to hope to get answers for problems with certain older Magento versions.


texts: Add Layout To Custom Module's Admin Area

texts:
I have created a custom module in Magento.
The idea of the module is to provide the ability to report a product.

I have configured the front end and that is all working fine.
The basic idea is that you click on a link on a product page which then reports the product (it adds a row to a report table, containing the following columns: report_id, product_id & status).

I'm now onto creating the back end for the module.
For this, I have added a menu item under "Catalog > Reported Products".

When I click on the link, it goes to a blank page (it has the admin header and footer, so my controller is set up correctly).

What I'm stuck on is adding a block to manage the admin side of things.
For the front end, I have a block "Tbe/Report/Block/Report.php" and, it works perfectly. I just can't seem to do the same for the admin side of things.

I would then like to be able to actually add some kind of list to the admin area to display the products that have been reported.

Tutorials on this subject seem to be very hard to come by and I really have no idea of the best practices when it comes to creating a layout for the admin section.

Here's what I have so far:

**app/code/core/local/Tbe/Report/Block/Adminhtml/Report.php

class Tbe_Report_Block_Adminhtml_Report extends Mage_Adminhtml_Block_Template {

    public function __construct(){
        echo "BLOCK HAS BEEN INCLUDED!";
        die();
        parent::_construct();
    }

}

app/code/core/local/Tbe/Report/controllers/Adminhtml/ReportedController.php

class Tbe_Report_Adminhtml_ReportedController extends Mage_Adminhtml_Controller_Action {

    public function indexAction() {
        $this->loadLayout();
        $this->renderLayout();
    }

}

app/code/core/local/Tbe/Report/etc/config.xml

<config>

    ...

    <global>

        ...

        <blocks>
            <report>
                <class>Tbe_Report_Block</class>
            </report>
        </blocks>

        ...

    </global>

    ...

    <admin>

        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <Tbe_Report after="Mage_Adminhtml">Tbe_Report_Adminhtml</Tbe_Report>
                    </modules>
                </args>
            </adminhtml>
        </routers>

    </admin>

</config>

Like I said, tutorials on this appear to be in short, so if you know of any tutorials which could help, please let me know.

Cheers

UPDATE

I have changed config.xml to look like this:

<config>

    ...

    <adminhtml>
        <layout>
            <updates>
                <report>
                    <file>tbe_report.xml</file>
                </report>
            </updates>
        </layout>
    </adminhtml>

    <admin>

        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <Tbe_Report after="Mage_Adminhtml">Tbe_Report_Adminhtml</Tbe_Report>
                    </modules>
                </args>
            </adminhtml>
        </routers>

    </admin>

</config>

I have also add the file "app/design/adminhtml/default/default/layout/tbe_report.xml"

<layout>
    <tbe_report_adminhtml> <!-- I have also tried "tbe_report_adminhtml_index" and "tbe_report_index" -->
        <reference name="head">
            <action method="addCss"><stylesheet>report/css/report1.css</stylesheet></action>
        </reference>
    </tbe_report_adminhtml>
</layout>

Am I right in thinking I should have an error in the console "File not found" for the stylesheet report/css/report1.css. I do not have any sort of error and neither is it in resources.


texts:
By 1st of February 2014 Magento stores selling in the EU have to adjust their debit payment method acoording to SEPA (Single Euro Payments Area).

There are a few resources telling you what to consider (for German-speaking folks: SEPA and the adjustment for online shops, SEPA - changes in Magento) and an example on how it may be solved in a general store (German again: Demo-Shop PAYONE) but I'm looking for actual experience with implementing these changes. Do you have tips for / did you have problems with existing extensions or custom solutions?


texts: show all product from a specific category in email template

texts:
Want to create a transaction email in Magento with the following criteria:

Shows all product from a specific category where a custom attribute is "True"
Shows product name, custom price field and two other custom attribute fields in grid format in the email.

I looked over the transaction email documentation as well as extensions from Magento and only found information on selecting specific product ID's to display rather than a statement for all products that fit a certain criteria.

Any help to lead me in the right direction would be much appreciated.

On Magento CE 1.9


texts: Need to double the price as per Qty in cart

texts:
Using Mageworx Shipping suite Magento2 extension i need to achieve this functionality. Can anyone guide me on this?

I have created a custom shipping rate here i want to double the rate lets say for e.g. if i purchase a product of weight 1 then if the price is 1 & qty of product in cart is 1 then if i increase product qty in cart to 2 then the price should be 2. In short as qty increse price also should double.


texts:
so let's say i have a laptop in the shop, but after some time it's discontinued, but people still search for it. I've seen in couple custom made e-shops showing discontinued products after all the other products with an icon like the NEW tag on top of the picture. Is there a way to do this in magento, any scripting or an extension?
Thank you!


texts: Learning Magento CE 2.4 without spending money on courses?

texts:
I'm a former frontend developer (JS, CSS3, Bootstrap etc.) with some OOP PHP experience. I've built a fully functional Magento 1.9 site with 80K products and built a smaller site with Magento 2.1 although the theme was not mine.
It's been a couple years break from web development and I've noticed a lot has changed with M2. Adobe acquired it, no more installation wizard, ElasticSearch is required etc.
I read a lot of people mentioning the Magento U courses for learning but those are incredibly expensive. Are there folks who are learning for free just by exploring the code base and asking questions when stuck?
How should one go about brushing up on PHP 7, Magento 2.4 and everything in between if you're poor?


texts:
I want to prettify every manufacturer url from default structure:

  mysite.com/store.html?manufacturer=107

To:

  mysite.com/nameofmanufacturer.html

I'm trying to do this by "Catalog" > "URL Rewrite Management"

But, It doesn't work (I get 404 error)

Is the right way?


texts: Possibility to keep media folder in sync for products

texts:
We are migrating our store to Magento, in the old system, we keep in sync with rsync the images and other binary files, so that whenever there is a new media file or binary file, we don't need to upload via web.

I have added products via SOAP API to Magento, images are added to database thanks to Magento internals, but is it possible to have Magento be notified whenever there is an update in media files for this product? Of course i understand that a module is required to add this behaviour.


texts: getting customer group using Grid control

texts:
I would like to get the customer group in Sales > Order grid. I'm using the gridcontrol module for this.

I used below XML tag to get customer group but after that I do not see any order. I think my join query is wrong:

<join table="customer/customer_group" condition="main_table.customer_id ={{table}}.customer_group_id" field="customer_group_code"/>


texts: Magento 2 - Why has difference between machine when run di:compile?

texts:
In magento2, Why has  difference between machine when run setup:di:compile ?

In machine A:

In machine B:

How to config: when we compile it does not do "interception cache generation..." ? (I would like it run is the same machine B).


texts: Admin Product page won't load due to excess attributes

texts:
Magento 2.1.5

I have an attribute set with 750 different attributes and each one is a drop down with 5-20 different options.

This causing an issue when trying to edit a product on the magento back end.  When I click on a product, the page never loads.  Despite many tries in different browsers and waiting hours, it never loads.

The obvious thing to say is "You have too many attributes.  Split them up."  That would be ideal, but I was given a database structured for ecommerce and it did not contain attribute sets.  It contains 85,000 products, so manually going through and creating attribute sets and then assigning all 85,000 products is not an option.

So what can I do?  Is there any way to increase the performance of the back end product pages?  Maybe delay the loading of the attribute options section unless clicked on?

Thanks for the help in advance.


texts: Translate Inline not working properly in Magento 2. I disabled all caches and then i choose Yes for Inline Translate on Storefront but My Magento not save changes who i made.


texts: Does Magento 1.9.x cron script, scans whole `shell` directory and executes all files inside of that folder?

texts:
This is kind of confusion instead of Question that I have.

If I have added a new php script called new.php inside shell directory, then if I have already setup cron.php to run at specific intervals, then would that already execute shell/new.php or do I have to specify it somewhere else in the custom module to which new.php belongs ?

Glad if somebody could guide me here.


texts: API Call getting error on home page slick product slider

texts:
I am using api for free delivery available or not for the products, producty listing page my api helper class working, path-> my app\design\frontend\Zero\my_theme\Magento_Catalog\templates\list.phtml if i try that helper class into my slisk slider app\design\frontend\Zero\my_theme\Magento_PageBuilder\templates\catalog\product\widget\content\carousel.phtml   i am getting error,
Error: Error: Call to a member function getData() on string in C:\xampp\htdocs\m2\app\code\Zero\my_module\Helper\ProductLabelHelper.php:156 Stack trace: #0
any help thanks.


texts: How can I display a configurable product's associated simple products on the product view page, even if they are out of stock?

texts:
I have made sure in the back end have the option for "Display Out of Stock Products" is set to "Yes".

I have already used the suggestion from this page:

http://www.tripleginteractive.com/blog/magento/magento-configurable-products-simple-product-data/

That worked for me on the category page that lists products (template 'catalog/product/list.phtml'). However, when I use that same code on the product view page (template 'catalog/product/view.phtml') it will not show products that are out of stock.


texts: Magento 2 - How to show related products in a thumbnail slider?

texts:
I want to show related products and/or products to upsell in a thumbnail slider on product page. I am using a child theme derived from Luma.
How should I achieve this? Is there anyway to integrate Flex slider in my theme?


texts: Magento 2 How to show success message after product add to cart on home page?

texts:
How to show success message after product add to cart on home page like this "You added product-name to your shopping cart."
I am using that code on template file -

    <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">
                                                <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">
                                                <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
                                                <?php if(isset($_category_config['qty_field']) && $_category_config['qty_field']):?>

                                                        <input type="text" name="qty" id="qty" maxlength="12" value="<?php /* @escapeNotVerified */ echo $block->getProductDefaultQty() * 1 ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/>

                                                <?php endif;?>
                                                <?php echo $block->getBlockHtml('formkey')?>
                                                <button type="submit"
                                                        title="<?php echo $block->escapeHtml(__('Add to Cart154')); ?>"
                                                        class="action tocart primary">
                                                    <?php echo __('Add to Cart154') ?>
                                                </button>
                                            </form>
 <?php if (!$block->isRedirectToCartEnabled()) : ?>

    <?php endif; ?>

example(like this on home page,this image is from category page) -
Product is added successfully in cart but add to cart success message is not showing


texts: Set a value for DATA_CONVERTER_BATCH_SIZE -- not a valid id

texts:
I am trying to update my Magento 2.3 instance to 2.3.1.

So I'm trying to finish the update and upgrade checklist,

but when I get to the step:

Set a value for DATA_CONVERTER_BATCH_SIZE, I copied the command on the page export DATA_CONVERTER_BATCH_SIZE 100000

And I get the error

  bash: export: '100000': not a valid identifier

What should I do to fix this so I can update my installation?


texts: Best practices/methods for adding 100k products in Magento 2?

texts:
I have to add 100k products by the end of this week. Most of them are simple products but 30% are configurable products which each have 8 simple products, total 100,000 SKUs.

I used Magmi (in Mage 1) which worked quite well for importing CSV files, but with no updated version for Mage 2 it seems most people use default Import functionality in admin. But is there a better extension which store owners are using? I've done some searches with no luck, hoping to find some direction.

Lastly is it ever recommended to add products programmatically? I would rather go this route as I'm well versed in PHP but am still somewhat new to Magento. Can experienced store owners/developers give me advice on the best way to add 100k products with best practices in mind? Thank you


texts: Magento1.9 - How to include customer id in export customer csv

texts:
I'm using Magento1.9.3.8 and I want to include customer id/entity_id of a customer in CSV from exporting customer data (System > Import/Export > Export > Customers). right now I'm only getting this:

Attached the screen shot :


texts: magento 2 Infortis ultimo theme display category tree menu on the left of the search result page

texts:
I am using the Infortis ultimo theme, in the included feature, i was able to add the category tree menu on the left bar of each category page, but how can i add it to the search result page?

is this something i can find using template hint & add to the layout file in Magento_CatalogSearch/layout/catalogsearch_result_index.xml ?

the shortcode to add it to the CMS Page or Static Block is this, how do I use it to add to the search result page?

{{block class="Infortis\UltraMegamenu\Block\Navigation" template="categories.phtml" parent="X"
depth="X" block_name="X"}}


texts: Link to configurable product with specific values selected

texts:
Similar to this, but with Magento 2

I want to load a configurable product page, with pre-selected attribute value.

My final purpose is to replace the simple product's url in the catalog with the "parent" configurable's url, with the selected attribute values from the simple product.

I have retrieved the "parent" configurable's url for every product, and i have replaced it with the simple product's url in the catalog. I am missing a way to load the configurable's product page, with different selected values each time.


texts: What files/folder do not belong on production?

texts: Some community members suggest that folders like downloader and dev don't belong on a production environment.  Is there an official list somewhere?  What else has no place on the production server?


texts: Does "Flush Magento Cache" refresh all caches?

texts: On the Cache Management page in Magento admin, does clicking the "Flush Magento Cache" button do the same thing as selecting all the check-boxes in the grid, choosing the Refresh action and clicking Submit?


texts: How can I get the "color" and "size" attributes value of items in the cart

texts:
I want to display the color and size of the configurable product in the cart. I got all the details other than the color and size values. My code is

 `$itemsVisible = Mage::getSingleton('checkout/session')->getQuote()->getAllVisibleItems();

 foreach($itemsVisible as $item) {
    $id = $item->getProductId();
    $name = $item->getName();
    $sku = $item->getSku();
    $qty = $item->getQty();
    $price = $item->getPrice();
    $size = $item->getSize();
    $color =  $item->getColor();`
  }

color and size return blank. How can I get these values?


texts:
I asked a similar question a few days ago but maybe it wasn't very clear, so I will try and simplify it to make it easier to follow.

I am using a Magento theme named 'Ultimo' and I have a product slider on my home page:

{{block type="ultimo/product_list_featured" template="catalog/product/list_featured_slider_shopbybase.phtml" category_id="45" product_count="16" breakpoints="[0, 1], [320, 2], [480, 3], [768, 4], [960, 5], [1280, 6]" pagination="1" centered="1" hide_button="1" block_name="Shop by Base"}}

The Ultimo developers have used the popular Owl carousel for the product sliders, which basically pulls in groups of products through their ID tag(s). The product images are assigned a URL automatically, so for example 'image1' will have the URL image1.html, so when you click on an image, it then takes you directly to that URL, which is always single product page.

<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true); ?>" class="product-image">

Ideally I would prefer to enter the URLs manually to each product in the slider, so then I can direct the users to pages containing lists of more products (I hope that makes sense).

Does anybody here have any experience of the Ultimo/Magento product sliders?


texts: Magento2.3.2: Undefined quantity on product saving

texts:
I just tried to save the product, Then I am seeing one error at product section.

  Notice: Undefined index: quantity in /home/my_username/public_html/vendor/magento/module-inventory-sales/Model/GetProductSalableQty.php
  on line 83

I ran indexer command also. But same error.

php bin/magento indexer:reindex


texts: Overriding LayeredNavigation Block not working

texts:
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\LayeredNavigation\Block\Navigation"
        type="OSE\ProductVisibility\Rewrite\Magento\LayeredNavigation\Block\Navigation" />
</config>

Navigation.php
<?php
namespace OSE\ProductVisibility\Rewrite\Magento\LayeredNavigation\Block;

class Navigation extends \Magento\LayeredNavigation\Block\Navigation
{
    public function __construct()
    {
        parent::_construct();
    }
    public function getText()
    {
        echo 'hello';
    }
}

view.phtml
<?php
/**
 * Category layered navigation
 *
 * @var $block \Magento\LayeredNavigation\Block\Navigation
 */
echo get_class($block);
$block->getText();

exit();
?>

I have this configuration, But when I echo out get_class($block) it is pointing to a different block. DO i did it wrong? DO i need to do anything else? Help would be really appreciated


texts: Checkout button not working after I upgraded from 1.6 to 1.7. - Am I missing something?

texts: The store works when I add an item, but when I click to checkout the link re-directs to the home page store. It's the same when I click on Proceed to checkout. Before, I had the cache management disabled and now is enabled. Is this related or what could be causing this problem?


texts:
As the title states, I seem to have a single product (simple product, visiblity "catalog/search", In Stock) that I am unable to access. I have more than 1,000 other products with no issues.

I changed the URL path of the product, reindexed all data, flushed/refreshed the cache, and got the same Fatal Error.

This is all the product page displays:

Fatal error: Call to a member function xpath() on a non-object in
/var/www/sites/storename/app/code/core/Mage/Core/Model/Layout.php on line 154

Layout.php line 154:

public function generateXml()
    {
        $xml = $this->getUpdate()->asSimplexml();
        $removeInstructions = $xml->xpath("//remove");
        ...

This leads me to believe there is an issue in one of my .xml files' remove block statements, but I have no idea where to begin looking.


texts: How to load shipping methods on country and postcode change?

texts: I have written a custom shipping module, then I want to change custom shipping methods when country and post code changes. I heard there is a method call js mixin. any one have idea about it, need help to do it, thanks