texts: Error with bannerslider module on magento 2.1

texts:
I've installed the Magestore Bannerslider v1.8 on my magento 2.1.0, I've enabled the module, cleared compiled reindexed and everything, and the module is enabled. I created a new slider from the backend, but when I try to go to manage banners, I get this error:

Fatal error: Class 'Magestore\BannerSlider\Ui\Component\Listing\Column\Image' not found in /home/likeeu77/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

Any ideea what it might be?


texts:
So this is an odd one. I am running Magento EE 1.14.2.1 with php 5.5.34 with Zend OPcache.

I installed AOE Profiler and fixed a few issues and now I wanted to uninstall. So I removed all files, however, I keep receiving this error about Varien profiler:

  Warning: include(/app/code/community/Varien/Profiler.php): failed to open stream: No such file or directory in /lib/Varien/Autoload.php on line 94
  Warning: include(/app/code/community/Varien/Profiler.php): failed to open stream: No such file or directory in /lib/Varien/Autoload.php on line 94
  Warning: include(): Failed opening 'Varien/Profiler.php' for inclusion (include_path='/app/code/local:/app/code/community:/app/code/core:/lib:.:/usr/share/pear:/usr/share/php') in /lib/Varien/Autoload.php on line 94
  Fatal error: Class 'Varien_Profiler' not found in /app/Mage.php on line 665

Magento is supposed to start looking in lib/Varien/Profiler.php which exists, but it doesn't.

I also ran the following to try and fix this:

Mage::app()->cleanCache();
Mage::app()->getCacheInstance()->flush();
opcache_reset();

Also download n98-magerun.phar and ran:

php n98-magerun.phar cache:clean
php n98-magerun.phar cache:flush
php n98-magerun.phar cache:dir:flush
rm -rf var/cache
rm -rf var/full_page_cache

With it still giving the above error. Now here is the odd thing. When i refresh the page, sometimes it works, and sometimes it doesn't work.


texts: load a phtml for homepage (include phtml, theme path)

texts:
i just installed magento 2.1 on localhost, in \app\design\frontend there is only a Magento folder. The logo is using luma.

i've read this post
How to load a phtml file only for homepage? (Magento 2)

But my problems is if i create this

/app/design/frontend/name/themename/Magento_Cms/layout/cms_index_index.xml

What is the name and themename (exact path) should be, anyone know? And if i use this code in above xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <referenceContainer name="page.top">
     <block class="Magento\Framework\View\Element\Template" name="startphoto" template="Magento_Theme::html/startphotos.phtml">
        <arguments>
            <argument name="section" xsi:type="string">homepage</argument>
            <argument name="position" xsi:type="number">0</argument>
        </arguments>
     </block>
  </referenceContainer>
</page>

What is the exact path of startphotos.phtml should be?

"UPDATE 1"

i have placed the cms_index_index.xml at

C:\xampp\htdocs\m2\app\design\frontend\randomname\theme-frontend-luma\Magento_Theme\layout

and startphotos.phtml at

C:\xampp\htdocs\m2\app\design\frontend\randomname\theme-frontend-luma\Magento_Theme\template\html

But nothing appear in homepage, any ideas? Should i need to use any command make it appear?

"UPDATE 2"

i have created a theme copy from vendor\magento\theme-frontend-luma to C:\xampp\htdocs\m2\app\design\frontend\randomname\luma_clone

layout location: app\design\frontend\randomname\luma_clone\Magento_Theme\layout
phtml location: app\design\frontend\randomname\luma_clone\Magento_Theme\template\html

nothing appear.

"UPDATE 3"
The problem was solved because of template**(s)**


texts: Right way to implement getExtensionAttributes()

texts:
I was wondering, what's the right way to implement an extensible EAV model.

I see that in Magento\Catalog\Model\Product, the method getExtensionAttributes() is implemented like this:

public function getExtensionAttributes()
{
    $extensionAttributes = $this->_getExtensionAttributes();
    if (!$extensionAttributes) {
        return $this->extensionAttributesFactory->create('Magento\Catalog\Api\Data\ProductInterface');
    }
    return $extensionAttributes;
}

But in others, like the customer or category models it's just

public function getExtensionAttributes()
{
    return $this->_getExtensionAttributes();
}

which can lead to a NULL result, if the extension_attributes key has not been set before.

Pragmatically, I would prefer the first one. This way I can always be sure to get an instance of Magento\Framework\Api\ExtensionAttributesInterface, even if the model has just been instantiated.

But why is it not used in other modules then? Is it against the new separation of data models that we see in the customer module? If so, how are we supposed to initialize the extension attributes?


texts:
how to convert mysql query to magento query

mysql query

SELECT  `p`.`product_id` ,  `p`.`name` ,  `o`.`increment_id`
FROM  `sales_flat_order_item` AS  `p`
LEFT JOIN  `sales_flat_order` AS  `o` ON  `p`.`order_id` =  `o`.`entity_id` where `o`.`increment_id` = 10000001

magento query

protected function _prepareCollection()
    {
        $collection = Mage::getResourceModel('sales/order_collection');
        $collection->getSelect()->joinLeft( array('p'
        =>  Mage::getSingleton('core/resource')->getTableName('sales_flat_order_item')),
            array('main_table.entity_id = p.order_id')->where('main_table.increment_id=',$order_id)););
        $this->setCollection($collection);
        parent::_prepareCollection();
        return $this;
    }

I tried below query but it's not getting any result.

how to map above mysql query to $collection;

Thanks.


texts: Getting all products without associated products

texts:
I'm gonna tell my problem with example.

In my store
I have 1 simple product: (aaaa)

And also I have a configurable products, with associated 4 products. (test)
Associated: 1 (test-small)
Associated: 2 (test-medium)
Associated: 3 (test-large)
Associated: 4 (test-xlarge)

These 4 associated products looking simple products on admin page, right?

I have a code base for getting all products below here:

$collection = Mage::getResourceModel('reports/product_collection')
        ->addAttributeToSelect('*')
        ->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id=entity_id', null, 'left')
        ->addAttributeToFilter('size', array('in'=>$size))
        ->addAttributeToFilter($roomfilter)
        ->addStoreFilter()
        ->setOrder('created_at', 'desc')
        ->setPage($pageNumber, $productPerPage)
        ->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds());

This code get all simple products. In this example getting: aaaa, test-small, test-medium, test-large, test-xlarge.

But I want to get aaaa and test products, not associated. How can I do that?


texts: Get full SKU for configurable products with custom options in transactional emails

texts:
I try to get the full SKU for configurable products with custom options in transactional emails. By default this works great in the shopping cart.

For example, I have a configurable product with SKU 'Test product' and one custom option with the SKU 'CUSTOMOPT1'. The associated simple product has SKU 'Test product - Color 1.

In the shopping cart the SKU is ok: 'Test product - Color 1-CUSTOMOPT1'. Unfortunately, in the transactional emails the SKU is 'Test product - Color 1' (without the SKU of the selected custom option).

How I can get the full SKU (just like in shopping cart) in the transactional emails?


texts: How to set order order approvel status to approved?

texts: Basically i am writing a custom script by which i want to set all the order approval status to approved.


texts:
I am having an issue with the mobile menu in Magento 2.3.3 as can be seen in the picture. When I clear browser cache it works fine but when I refresh the page then the issue comes up again. Does anyone have any ideas on how to fix this issue?

Any help would be appreciated.

Thanks in advance..!


texts: Magento 2 reviews and details show together

texts:
In my product page I have the details and reviews shown separated but I want them in the same part. I have this:

where "Detalhes" is the details part and "Avaliações" is the review part. I want it to look like this:

Could someone tell me how can I do that? I´m kind of lost

thank you!


texts: Getting TypeError: $.widget is not a function Magento 2

texts:
I am getting a JavaScript type error in Minicart, Product view page, and Checkout page.

TypeError: $.widget is not a function
           $.widget('mage.priceBox')
           $.widget('mage.dataPost')

How can I solve this?


texts: Issue on Gift card and cart prices rules

texts:
I've tried couple of hours, but I can't find the solution. I used Amasty Gift card, Also I created cart prices rule. when I enter the gift code only, the discount shows validation error. If I enter discount code the gift card shows this error. Check the screen shot. Please advice how to fix this

PHP configuration : 7.0
Magento            : 2.1.5 CM
Gift Card          : 1.0.3


texts: Magento 2 Admin Pointing to Wrong Locale

texts:
I have a Magento CE 2.0.7 install on Apache with PHP7 and MySQL 5.7. There are no plugins or modified/custom code. I set the locale to en_CA on installation through the web setup wizard.

I changed to production mode and the frontend directs to the proper pub/static/frontend/Magento/luma/en_CA/ directory but the backend/admin section points to pub/static/adminhtml/Magento/backend/en_US/ causing a 404 as that does not exist. The proper en_CA directory is in the file system with the proper permissions set but the admin side is requesting the en_US directory.

Has anyone else experienced this issue or have a resolution?


texts: Admin Grid Pull Data From Different Table

texts:
I have a grid in admin set up like so:

It's pulling data from MySQL table "party."

I'd like the column called "Real Party ID" to pull its value from another table, "foobar"

How can I achieve this result?

Let me know if you need more details or pieces of my code.


texts:
I changed this file
app/design/frontend/VENDOR/THEME/web/mage/validation.js

But changes are not reflected; I'm in production mode
I deployed static content with
bin/magento setup:static-content:deploy -f fr_FR

cleared the cache
php bin/magento cache:flush
php bin/magento cache:clear

But changes didn't get applied.
Should i change mode to developer?


texts:
I have input field in Header.phtml and user can enter store code.If the store code is valid it should redirect to Website/store/{storecode}/index.php.

Can you please tell shortest way to validate the store code and redirection.


texts: Magento : Extra Add to Cart Button for Installation Product

texts:
I have a website, sell a products with and without installation service.
I want two add to cart buttons, one with and one without installation on a product page. The price for installation is variable for each product.

How can I create a extra add to cart button for this products? Thanks


texts: Show Billing Address Form In Checkout First Step In magento 2

texts:
Stuck:On when select new address
I want to customize checkout page

Need to show billing with shipping i have done most of part but fields are not showing.

I try Like this.

Create a new region in Magento_Checkout/template/shipping.html

Add section in checkout_index_index.xml

<item name="shipping-step" xsi:type="array">
<item name="component" xsi:type="string">uiComponent</item>
<item name="children" xsi:type="array">
    <item name="shippingAddress" xsi:type="array">
        <item name="children" xsi:type="array">
            <item name="shipping-billing" xsi:type="array">
                <item name="component" xsi:type="string">Custom_Checkout/js/view/shipping-billing-address</item>
                <item name="displayArea" xsi:type="string">shipping-billing</item>
            </item>
        </item>
    </item>
</item>

And in Custom_Checkout/template/shipping-billing-address.html

        <input type="checkbox" name="billing-address-same-as-shipping"
               data-bind="checked: isAddressSameAsShipping, click: useShippingAddress, attr: {id: 'billing-address-same-as-shipping-billing'  }"/>

    <fieldset class="fieldset" data-bind="visible: !isAddressDetailsVisible()">

                <button class="action action-update" type="button" data-bind="click: updateAddress">

                </button>
                <button class="action action-cancel" type="button" data-bind="click: cancelAddressEdit">

                </button>

    </fieldset>

How can i load fields ?

Actually inside this file code Magento_Checkout/billing-address/form

<form data-hasrequired="* Required Fields">
    <fieldset id="billing-new-address-form" class="fieldset address">

            <input type="checkbox" class="checkbox" id="billing-save-in-address-book" data-bind="checked: saveInAddressBook" />

    </fieldset>
</form>

Not working code


texts: Add X number of product get Y number of product free

texts:
I tried many variants but could not find the correct combination in shopping cart rules.

Here is the condition:

In category pins I have some products where all have the same price.

What I want is when some one buy:

Any 4 products 2 products free
Any 8 products 4 products free
Any 12 products 6 products free

So basically we want to give away 2 pins for free for every 4 pins purchased.

Magento allows to buy X product and get Y product free for same cart item quantity only.

What if we have different products in cart of same category?


texts: Magento 2: Product images broken issue in mailchimp admin

texts:
I am getting the product images issue in MailChimp admin

Product images are broken, adding CDN link before image link.

Eg:

httpd2q0qd5iz04n9u.cloudfront.net/_ssl/proxy.php/httpabc.com/clients/abc/pub/media/catalog/product/m/u/bwc-37006cs-64_1000_1_.jpg

I don't know how it's adding this link
d2q0qd5iz04n9u.cloudfront.net/_ssl/proxy.php/

Does anyone have an idea?


texts: Search product work wrong in Magento 2.x

texts:
i have a problem with searching products in Magento 2.

Ex : My store have 2 products, ABC and XYZ. When I search for the keyword "ABC" or "XYZ", it show product ABC or XYZ. But if i search for keyword "123", it show many product, it not show message empty We can't find products matching the selection. in list.phtml

Why does it display those products while the keyword i entered doesn't have anything to do with it? Please help me, thanks all.


texts:
if (version_compare($context->getVersion(), '1.1.10', '<=')) {
            $installer = $setup;
            $installer->startSetup();

            // Get tutorial_simplenews table
            $tableName = $installer->getTable('blog_post');
            // Check if the table already exists
          if ($installer->getConnection()->isTableExists($tableName) != true) {
            // Create tutorial_simplenews table

            $table = $installer->getConnection()
                ->newTable($tableName)
                ->addColumn(
                    'id',
                    Table::TYPE_INTEGER,
                    [
                        'identity' => true,
                        'unsigned' => true,
                        'nullable' => false,
                        'primary' => true
                    ],
                    'ID'
                )
                ->addColumn(
                    'docid',
                    Table::TYPE_TEXT,
                    255,
                    ['nullable' => false, 'default' => ''],
                    'docid'
                )
                ->addColumn(
                    'order_status',
                    Table::TYPE_TEXT,
                    255,
                    ['nullable' => false, 'default' => ''],
                    'Order Status'
                )
                ->addColumn(
                    'order_code',
                    Table::TYPE_TEXT,
                    255,
                    ['nullable' => false, 'default' => ''],
                    'Order Code'
                )
                  ->addColumn(
                    'order_id',
                    Table::TYPE_TEXT,
                     255,
                    ['nullable' => false, 'default' => ''],
                    'Order Id'
                )
                ->addColumn(
                    'created_at',
                    Table::TYPE_DATETIME,
                    ['nullable' => false,'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT_UPDATE],
                    'Created At'
                )
                ->addColumn(
                    'update_at',
                    Table::TYPE_DATETIME,
                    ['nullable' => false, 'default' => ''],
                    'Updated At'
                )
                ->setComment('dfdfd')
                ->setOption('type', 'InnoDB')
                ->setOption('charset', 'utf8');
            $installer->getConnection()->createTable($table);
        }
            $installer->endSetup();

        }

Warning: array_key_exists() expects parameter 2 to be array, string given i
  n /var/www/html/readyresale_beta/vendor/magento/framework/DB/Ddl/Table.php
  on line 352


texts:
I am rewriting a product Url on save. For this Url I am making a redirect (add new row in enterprise_url_rewrite_redirect). With this I want that old Url  go to new Url.
It works just after reindex(on url_redirect). So i.m trying to do this in code and dosn.t work. Any idea why?

OBSERVER:

  public function generateUrl(Varien_Event_Observer $observer)

     {
            $url = Mage::getModel('catalog/product')->formatUrlKey($_productName);

            $_product->setData('save_rewrites_history', true);
            $_product->setUrlKey($url);
            $_product->setUrlPath($url);

            //redirect when changing url. need reindexing
            $redirect = Mage::getModel('enterprise_urlrewrite/redirect');
            $fromUrl = $_product->getOrigData('url_key');

            $redirect->loadByRequestPath($fromUrl.".html", 0);

            $redirect->setIdentifier($fromUrl.".html");
            $redirect->setTargetPath($url.".html");
            $redirect->setOptions('RP');
            $redirect->setStoreId(0);
            $redirect->setProductId($_product->getEntityId());
            $redirect->save();

        }

    }

SHELL:

     public function run()
    {
        $indexProcess = Mage::getSingleton('enterprise_index/indexer')->getProcessByCode('url_redirect');
        if ($indexProcess) {
            $indexProcess->reindexAll();
        }
        $indexProcess = Mage::getSingleton('enterprise_index/indexer')->getProcessByCode('catalog_url_product');
        if ($indexProcess) {
            $indexProcess->reindexAll();
        }
    }

CONFIG:

 <events>
        <catalog_product_save_before>
            <observers>
                <url_generate>
                    <type>singleton</type>
                    <class>catalog/observer</class>
                    <method>generateUrl</method>
                </url_generate>
            </observers>
        </catalog_product_save_before>
    </events>

--this is in <global>


texts:
I installing 7405 patch in magento 1.9.1.1.Iam getting error

     checking file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php
      Hunk #2 FAILED at 264.
      1 out of 2 hunks FAILED

I replaced that file with fresh magento but not working.please help


texts:
During the migration I encountered this problem.

What to do to correct these errors?


texts:
I need to upgrade 1.4.0.2 to 1.5.x.I'm following steps mentioned in the link

Everything is going fine. But after passing the command

./mage config-set preferred_state stable

version 1.7.* becomes the stable state.

UPDATE

Now upgrading from 1.5 to 1.6 version is not working.


texts: Magento 2: How to deploy an image file on production site?

texts:
We changed one image file at this location and now we want to deploy it on live:

app/design/frontend/theme/theme1/web/images/sample.jpg

We learned that the only way to deploy static files in production is:

php bin/magento setup:static-content:deploy en_AU -f

This command takes time to complete and we need to take the site down for around 30 minutes just to update production. This isn't useful for us.

Do you have any recommendation to optimize the process of updating small static files?


texts: Magento 2: how to get select "Sort by" value on category pages

texts: How get values of choosen "Sort by" options.


texts: How to A/B test two different onepage extensions on magento?

texts:
I'm successfully able to A/B test product pages/CMS pages. However, I'm having difficulty testing two different onepage extensions.

I want 50% of users to use one onepage extension and the other 50% to use another onepage extension.

How would I go about A/B testing two different onepage extensions? Is there a service which supports this type of test or would I need a custom build and require google analytics for results?


texts: API Create Category With "Use All Available Attributes" Selected

texts:
I'm trying to create my categories as follows

For Available Product Listing Sort By I want the Use All Available Attributes checkbox to be checked

For Default Product Listing Sort By I want the Use Config Settings to be checked.

So I want it to be like this. (It's in dutch my apologies)

I already tried to create it like this

"available_sort_by"=new string[] {"false"}
"default_sort_by"="false"

I read somewhere that that should fix it but it didn't
I also tried to leave it empty like this but that didn't work either
    "available_sort_by"=new string[] {""}
    "default_sort_by"=""

I hope someone can help me out on how to fix this.
Because it's really a pain in the ass when you import 70+ categories and you need to check those boxes for every single one...


texts:
Whenever we rebuild the catalog_product_flat index, Magento displays its standard error page along with a stack trace that reveals file structure to the outside world.

How do I stop this?

I've tried Googling "magento prevent display errors" but did not find anything relevant.

It doesn't seem to matter whether I comment the error_reporting(E_ALL | E_STRICT); line or these lines:

if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Mage::setIsDeveloperMode(true);
}

I also added this to the index.php file, to no avail:

ini_set('display_errors', 0);

I still want these errors logged in the var/reports folder, though.


texts: There is no price.phtml in rwd/default/catalog/template/product

texts:
I want to display the old price (regular price without discount) without taxes, but at the moment the configuration from the backend shows only the special price in the right way.

I checked the rwd/default/catalog/template/product/view.phtml and the content is rendered by $this->getPriceHtml($_product);. As I understood, the content should be found in the price.phtml, but there is no such file. Where can I find the HTML of the displayed price in the product page?


texts: magento: transactional email not sending This letter cannot be sent.

texts:
I created one transactional email and assigned it to my custom module.
But it throws the

     This letter cannot be sent.

Error. Debug it and found that email subject getting null in below function.

     app/code/core/Mage/Core/Model/Email/Template.php
     /**
      * Return true if this template can be used for sending queue as main template
      *
      * @return boolean
      */
      public function isValidForSend()
      {
           return !Mage::getStoreConfigFlag('system/smtp/disable')
                  && $this->getSenderName()
                  && $this->getSenderEmail()
                  && $this->getTemplateSubject();
      }

Is there any missing in creating template?

Also checked that

      Mail sending settings set to no

Please help me.


texts:
Im not sure why, but customers can login with firefox but not with chrome. If I try to login with chrome, then the site just reloads and nothing changed.

There is no error, what can I try?


texts: Product attributes not loading in home page. Maybe Permissions? I really don't know

texts:
I was trying to reboot the index with the shell/indexer.php script (because my new categories are not displaying on my megamenu) and after using this script my products are not showing some custom attributes (that I normally show on home, like unit_weight). But it's happening only for this 'bestsellers' block:

{{block type="filterproducts/bestsellers_home_list" category_id="16" name="offer_list" product_count="5" column_count="5" template="filterproducts/grid.phtml"}}

When I use the 'latest' it works fine:

{{block type="filterproducts/latest_home_list" name="home_list" product_count="100" column_count="6" template="filterproducts/grid.phtml"}}

The block's permission is activated. I really don't know what is wrong :(


texts: Magento 2 Custom Cli comand Area not set

texts:
I am geting this error comand "[Magento\Framework\Exception\LocalizedException]
  Area code is not set
"

this is my code which I want to add a product. Tip if a comment " $product->save();" I am not getinng erros and I can see my output.

My code:

<?php

namespace Bachus\BackgroundImport\Console\Command;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class Importpr extends Command
{

    const NAME_ARGUMENT = "name";
    const NAME_OPTION = "option";

    /**
     * {@inheritdoc}

    public function __construct(
    \Magento\Framework\App\State $state
) {
    $state->setAreaCode('frontend'); // or 'adminhtml', depending on your needs
}
     */
    protected function execute(
        InputInterface $input,
        OutputInterface $output
    ) {
        $name = $input->getArgument(self::NAME_ARGUMENT);
        $option = $input->getOption(self::NAME_OPTION);
       // parent::__construct();

   $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // instance of object manager
   $product = $objectManager->create('\Magento\Catalog\Model\Product');
 $product->setSku($name); // Set your sku here
  $product->setName('Sample Simple Product'); // Name of Product
  $product->setAttributeSetId(4); // Attribute set id
  $product->setStatus(1); // Status on product enabled/ disabled 1/0
  $product->setWeight(10); // weight of product
  $product->setVisibility(4); // visibilty of product (catalog / search / catalog, search / Not visible individually)
  $product->setTaxClassId(0); // Tax class id
  $product->setTypeId('simple'); // type of product (simple/virtual/downloadable/configurable)
  $product->setPrice(100); // price of product
  $product->setStockData(
                        array(
                            'use_config_manage_stock' => 0,
                            'manage_stock' => 1,
                            'is_in_stock' => 1,
                            'qty' => 999999999
                        )
                    );
$product->save();
/*  */

    $output->writeln("Product added sku " . $name);

    }
    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        $this->setName("bachus_cli:importpr");
        $this->setDescription("imports-produts");
        $this->setDefinition([
            new InputArgument(self::NAME_ARGUMENT, InputArgument::OPTIONAL, "Name"),
            new InputOption(self::NAME_OPTION, "-a", InputOption::VALUE_NONE, "Option functionality")
        ]);
        parent::configure();
    }
}


texts:
In Magento 2's checkout summary I managed to add price values to each "item in cart":

Unfortunately those are plain numbers and a debug shows that $parent does not contain pre-formatted price values:

{
  "item_id":134,
  "price":420.17,
  "base_price":420.17,
  "qty":1,
  "row_total":420.17,
  "base_row_total":420.17,
  "row_total_with_discount":0,
  "tax_amount":79.83,
  "base_tax_amount":79.83,
  "tax_percent":19,
  "discount_amount":0,
  "base_discount_amount":0,
  "discount_percent":0,
  "price_incl_tax":500,
  "base_price_incl_tax":500,
  "row_total_incl_tax":500,
  "base_row_total_incl_tax":500,
  "options":"[]",
  "weee_tax_applied_amount":null,
  "weee_tax_applied":null,
  "name":"My awesome product"
}

How could I format these as actual price values?


texts: How to add special price to category products grid?

texts:
How to add Special price column to

  category products grid

under

Catalog -> Manage Categories -> Category_to_be_edited


texts:
I have tried to install the extension via Composer and successfully installed. After installing, I can see the extension menu in the admin panel. However, I can't see any files in the app/code directory. I'm new to use composer in Magento.

I'm aware we can install the extension manually as well as the composer. Could anyone please suggest me which one is better to install the extension in Magento?.

Looking forward to hearing from you.


texts: How increase product view size on category page?

texts:
I am using magento 1.9 for learning purpose. On category page i want to increase product view dimension and make the changes in list.phtml file. Also change the column count 3 in place of 4, But on category page my product image height changed according to changes i have made in list.phtml file and width remains same.

my previous product image dimension is 270px, 414px and new dimension is 370px, 514px. In google inspect it is showing the new dimension but product width remains same. Please guide me how can i change the product width.


texts:
I'm trying to get my site to https, but I'm getting file mix error, I made the changes I found there but did not get results. Is there any additional configuration?

ERROR:

  Mixed Content: The page at 'https://www.mydomain.com.br/' was loaded over HTTPS, but requested an insecure stylesheet 'http://www.mydomain.com.br/skin/frontend/ultimo/default/css/styles.css'. This request has been blocked; the content must be served over HTTPS.

Magento config


texts: Auto-expand subcategories in product form

texts:
I have a category with subcategories, and I want to have the subcategory visible from the beginning, when the user opens the category selector.

Currently, the user has to click the arrow next to the parent category to expand it and have access to the subcategory when choosing categories. This needs to be auto-expanded, as soon as the user opens the category selection when creating a new product.


texts: Migrating Orders from magento1 to magento 2

texts: I migrated all my products and categories from magento 1 to 2. I need logic to migrate orders which are placed by the customers . Can someone help me please.


texts: How to setup magento 2.1 from existing project

texts:
I have an existing project from my personal project repository. What I would like to do is clone this repository and setup the environment, and this is what I have done :

Installing php 7.0 and all the require extension.
Install mysql
install apache2
Set the sites-available for magento 2. and restart the apache2

now I have the project in my dir /var/www/html/myproject/.
But I don't know where to go from this like, where is the setup for mysql credential ? and other setup to make the project up and running in my local environtment.

Right now when I got to my localhost I got HTTP ERROR 500 ? any help would be appreciated.


texts: Search by dropdown with category name, products,article

texts:
As i need to develop a search functionality with category names, Product, Article.
Is there any free extension or any custom development please help.


texts: how to set null value to email column in sales order address table

texts:
I want to set the email field in sales order address table to null.But if i give  $address->setEmail('')->save();
Its saying that the email is not in correct format.I am able to save the customer email to null in sales order table.$sales->setCustomerEmail('');
Its working for sales order but not working in sales order address table.Can any one help to resolve this issue.Thanks in advance.


texts: Magento 2 - By default Magento provides a way to import sales orders?

texts:
As the title says.

If I go to System > Import, it only shows import products, customers + its addresses, taxes, pricing but not orders.

Am I looking in the wrong place or Magento does not provide order import feature by default?


texts:
Please help me with issue. My main problem is that mysql are very slow. When i try create products in my CMS, it take mutch time. Example - create product take 4 min, delete product - 12 min.

I use CMS Magento 2.2 CE (community edition). Also there is 145 000 of products. Before we add products all was fine. Create product take about 5 sec, delete product about 5-10 sec.

Here is my system

Ubuntu 14 x64, Linux kernel 3.13, 16 cpu, SSD, 48 GB RAM
Magento 2.2 CE
Percona MySQL server 5.6 - here is config - https://pastebin.com/TVu1Ed7c
Varnish server 4.1
PHP 7.0.22
Nginx 1.12
Redis Server 4.0.2

I try run some profiling tests of magento and mysql

Here is slow log results - https://pastebin.com/kbFw0F28
Here is example of mysql request that are very slow - https://pastebin.com/mi656h2h

When i run mysqltuner.pl it show me that everything is OK. Also if there is 60 real users on my site i see mysql process takes very high load cpu. As example i have site on same CMS with 100 products and lower server< and it take about 500 users and feels ok.

So help me please with this issue. Thank you.


texts: Paypal Express Checkout returning page has not Shipping address and no shipping method

texts:
When a client use Paypal Express Checkout is redirected to Paypal page, he is able to chose the shipping method, after he click on Continue is redirected to Review page with blank shipping address and no shipping method (Sorry, no quotes are available for this order at this time.

Any idea?


texts: Magento 1.9 - Customers can't login to frontend [Page refreshes]

texts:
Customers can't log into the frontend of the site after development.

The two test customers we used to test the site before the migration can login to the site perfectly but every other customer can't login. each time they try login the page refreshes. We know this is a cookies/sessions related issue but haven't found a solution to it yet. :(

We’ve tried multiple solutions recommended on the interntent, the most common of which is adding <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" /> to the login.phtml and flushing the cache.


texts: Magento2: How to move category description to bottom

texts:
I want move category description from top to bottom page. But above footer in full width layout (not in under products list).
From:
https://prnt.sc/tbw9yk
To:
https://prnt.sc/tbwack
Any solution?


texts: Magento2: Config data save using Custom Module

texts:
I want to save encrypted value in core_config_data while setup upgrade without using config.xml. I am trying to use data patch file

Vendor\Credentials\Setup\Patch\Data\AddData.php

use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Framework\Setup\Patch\PatchVersionInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\App\Config\Storage\WriterInterface;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Config\Model\Config\Backend\Encrypted;
use Magento\Framework\Encryption\EncryptorInterface;

public function __construct(
        ModuleDataSetupInterface $moduleDataSetup,
        EncryptorInterface $_encryptor,
        WriterInterface $configWriter
    )
    {
        $this->moduleDataSetup=$moduleDataSetup;
        $this->_encryptor = $_encryptor;
        $this->configWriter = $configWriter;
    }

$this->moduleDataSetup->startSetup();
        $privateKey = $encrypted = $this->_encryptor->encrypt($value);
        $publicKey = $encrypted = $this->_encryptor->encrypt($value);
        $this->configWriter->save(self::XML_PATH_PRIVATE_API_KEY, $privateKey, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeId = 0);
        $this->configWriter->save(self::XML_PATH_ENABLED, 1, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeId = 0);
        $this->moduleDataSetup->endSetup();

But entry is not saving. I have checked patch table entry and here patch get register.


texts: How to schedule all the cron jobs to run after truncate the cron table?

texts:
I truncate my CRON job schedules using this command below:

TRUNCATE cron_schedule;

I wait some time but I'm not seeing the schedules populating the table again as you can see here.

How can I reschedule the cron jobs again in order to show on this table?


texts: How to solve broken magento 2 installation issue?

texts:
I have already changed symlink with copy and write commands on cmd
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento setup:clean

and also remove all files under pub/static except .htaccess

Can anyone suggest me how can I solve this issue.

Any help would be appreciated.

Thanks in advance..!


texts: Is it possible to hook into the image upload function on the wysiwyg editor?

texts:
I'm trying to trigger a function after an image has been uploaded using the wysiwyg editor but I don't think an events is fired after this operation. I know it's relatively easy to do so when you upload product images to the catalog but not so much when adding images to cms pages or static blocks.

I think the uploadFile function in the Mage_Cms_Model_Wysiwyg_Images_Storage class is responsible for this so I guess I could override it in my module but I was wondering if there was a cleaner way to do it.


texts: how we can show all categories in magento2 on home page

texts:
we have used this link and install module step by steps
http://www.ibnab.com/en/blog/magento-2/magento-2-frontend-how-to-call-category-collection-on-home-page

My module is installed and showing up in config.php but we able to get any thing on home page, Please let me know.


texts:
I am making a shipping extension. All the things works great but one thing no.

My collectRates function who is responsible to show all shipping methods on the frontend is checking all.

Code:

/**
 * @param RateRequest $request
 * @return bool|Result
 */
public function collectRates(RateRequest $request)
{
    if (!$this->getConfigFlag('active')) {
        return false;
    }

    // $method->setCarrierTitle($this->getConfigData('title'));
    // $method->setMethodTitle($this->getConfigData('name'));

    /** @var \Magento\Shipping\Model\Rate\Result $result */
    $result = $this->_rateResultFactory->create();

    /** @var \Magento\Quote\Model\Quote\Address\RateResult\Method $method */

    $listaObjetosFrete = array();
    $listaObjetosFrete = $this->obterListaObjetosFrete($request)->data;

    foreach($listaObjetosFrete as $objetoFrete){

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

        $method->setCarrier($this->_code);
        $method->setMethod($this->_code);

        $method->setMethodTitle($objetoFrete->descricao);
        $method->setCarrierTitle($objetoFrete->descricao);

        $this->getFinalPriceWithHandlingFee($objetoFrete->preco);

        $method->setPrice($objetoFrete->preco);
        $method->setCost($objetoFrete->preco);

        $result->append($method);
    }

    return $result;
}

Checkout page who shows all shipping methods:


texts:
I am using the Magento 2 REST API. How do I create a variable product? Here is my goal:

T Shirt (Parent Item)
 - Small, Red
 - Medium, Blue

I found this post, but I see no code to create product variants. I assume I must match to an existing attribute set.

How to add product in Magento to using REST API?


texts: Magento index problem while product save in backend

texts:
I'm getting the following error while saving products in backend:

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (chia.mage_index_process_event, CONSTRAINT FK_INDEX_PROCESS_EVENT FOREIGN KEY (process_id) REFERENCES index_process (process_id) ON DELETE CASCADE ON UPDATE CASCADE)

I'm using magento version 1.5.

I tried truncating these tables 'index_process', 'index_process_event' and 'index_event' and saved product but again the same error occurred. I'm not getting what is causing the problem.


texts:
I have a module. In config.xml i found this code:

 <frontend>
            <layout>
                <updates>
                    <subscription>
                        <file>MailChimp_Subscription.xml</file>
                    </subscription>
                </updates>
            </layout>
    </frontend>

Why we must write it? What I should do, if I want use this module in other layout?


texts:
We have a lot of different products with different attributes we want to show below the product in the grid view.

What is the best approach in order to show the specs below when you have a lot of different attributes and every category has different attributes to show.

<?php

    $attr_levensduur            = $_product->getAttributeText('levensduur');
    $attr_formaat_bodembedekker = $_product->getAttributeText('formaat_bodembedekker');
    $attr_kubischemeter         = $_product->getAttributeText('kubischemeter');
    $attr_aswaarde              = $_product->getAttributeText('aswaarde');
    $attr_warmtewaarde          = $_product->getAttributeText('warmtewaarde');
    $attr_houtsoort             = $_product->getAttributeText('houtsoort');

?>

<?php if ($attr_levensduur || $attr_formaat_bodembedekker || $attr_kubischemeter || $attr_aswaarde || $attr_warmtewaarde || $attr_houtsoort) : ?>

    <?php if (!empty ($attr_levensduur)) : ?>

<?php echo $attr_levensduur; ?>

    <?php endif; ?>
    <?php if (!empty ($attr_formaat_bodembedekker)) : ?>

<?php echo $attr_formaat_bodembedekker; ?>

    <?php endif; ?>
    <?php if (!empty ($attr_kubischemeter)) : ?>

<?php echo $attr_kubischemeter; ?>

    <?php endif; ?>
    <?php if (!empty ($attr_aswaarde)) : ?>

<?php echo $attr_aswaarde; ?>

    <?php endif; ?>
    <?php if (!empty ($attr_warmtewaarde)) : ?>

<?php echo $attr_warmtewaarde; ?>

    <?php endif; ?>
    <?php if (!empty ($attr_houtsoort)) : ?>

<?php echo $attr_houtsoort; ?>

    <?php endif; ?>

<?php endif; ?>

When we have for example 50 different attributes this approach is not the best one i guess.

See the image below for an example


texts: Magento remove tabs like invoices,credit memos,shipment in admin sales order view using observer

texts:
I want to remove tabs(invoice,credit memo,shipment) in sales order view using observer
My config.xml file

    <adminhtml_widget_container_html_before>
                        <observers>
                            <package_test_adminhtml_widget_container_html_before>
                                <class>test/observer</class>
                                <method>adminhtmlWidgetContainerHtmlBefore</method>
                            </package_test_adminhtml_widget_container_html_before>
                        </observers>
    </adminhtml_widget_container_html_before>

My observer.php

public function adminhtmlWidgetContainerHtmlBefore($event)
    {
        $block = $event->getBlock();
        if ($block instanceof Mage_Adminhtml_Block_Widget_Tabs) {
            $block->removeTab('order_tab_info'); // I am trying information tab from sales order view but it doesn't work
        }
    }


texts: Magento2 set tax percentage 7.75% to all items while creating an order programatically

texts:
We would like to set a tax percentage of 7.75% for all items & all customers while creating an order programmatically.
Could you please provide some ideas.


texts: Magento 2 set custom variable to use in email template on all emails

texts:
I want to be able to add a custom variable through an event observer of some sort which enables me to output this variable in any given email template.

I know I can make an event observer for example on email_order_set_template_vars_before, but then it would only be outputted on order emails. Is there a global event in which this is possible?

  So far I've seen it is only possible on a few events. Or is there
  another way without events to get this done? I want the variable to be
  accessible in the header or footer email template.


texts: Ho to set multistore configuration in Magento 2 to have domain.com and domain.com/storecode/

texts:
In Magento 2,

How to have the default store to be set on domain.com
and other stores to be in directory structure urls like:
domain.com/uk, domain.com/de, ..

First approach:
There is the admin configuration Admin > Stores > Configuration > GENERAL > Web > Url Options > Add Store Code to Urls = Yes.
But it's a global configuration and can't be set on website level or store level.

Now, what I can have is domain.com/[default_store_code]/*.
Actually if I visit domain.com it will render urls inside the page as domain.com/[default_store_code]/path_to_category, ..

Is it something that I miss here ?

In Nginx specifically I'm interested about.
I don't want to add declarations in Nginx conf to redirect domain.com/defaut_store_code/* to domain.com/*.
I don't like it and I don't believe there should be an additional redirect just to stay on domain.com/* URL.

Second approach:
Another approach that i'm looking at is to set Add Store Code to Urls = No and have in admin configuration Base Url set to domain.com in default store configuration level.
And on store uk configuration level to have Base Url set to domain.com/uk/
The last part it would be to write something in Nginx conf to set store codes and website code by url. Like if I'm on domain.com/uk/* than set MAGE_RUN_CODE to uk

Update:
I'm testing the second approach with Add Store Code to Urls = No.
I'm using in Nginx the conf bellow to make Magento 2 aware of the store codes.
The static resources like css, js and .html were not working. I set in global configuration Base URL for Static View Files = http://domain.com/static/
and Base URL for User Media Files http://domain.com/media/

Inspired from here: Magento 2 multi website url setup

# in http context of conf
map $request_uri $MAGE_RUN_CODE {
    default   default;
    ~^/uk  uk;
}

map $request_uri $MAGE_RUN_TYPE {
    default   store;
}

server {
    set $MAGE_MODE developer;
    fastcgi_param  MAGE_MODE $MAGE_MODE;

    listen 8080;
    server_name domain.com;
    set $MAGE_ROOT /[../path to magento 2];

    # I have tried several try_files and didn't do nothing

    include /[../path to magento 2]/nginx.conf.sample;

    #location ~ (index|get|static|report|404|503)\.php$ {
    #   fastcgi_param  MAGE_RUN_CODE $MAGE_RUN_CODE;
    #   fastcgi_param  MAGE_RUN_TYPE $MAGE_RUN_TYPE;
    #}
}

This works for me if I put it in the file /[../path to magento 2]/nginx.conf.sample

    # Search 'location' line bellow and add the 2 fastcgi_param lines from bellow
    location ~ (index|get|static|report|404|503)\.php$ {
       ......
       fastcgi_param  MAGE_RUN_CODE $MAGE_RUN_CODE;
       fastcgi_param  MAGE_RUN_TYPE $MAGE_RUN_TYPE;
    }

Further I'm looking in Magento 2 why it doesn't like to have a directory path before the controller part in URL. And I'll also explore those try_files in conf.

Update 2

I've added as an experiment in \Magento\Store\App\Request\PathInfoProcessor::process()

if ($store->isUseStoreInUrl()) {
    ..
} else {
    if ($store) {
       $this->storeManager->setCurrentStore($storeCode);
       $pathInfo = '/' . (isset($pathParts[1]) ? $pathParts[1] : '');
       return $pathInfo;
    }
}

Store switcher on the page doesn't work well but it rendered the pages ok:
homepage,category page, product page.
It still needs solid research until it's good.

Thank you


texts: How to create an upload field for the end user in Magento 2

texts: I'm new to Magento. I want to create an upload field on product view form just before the Add to Cart button for the end user to upload an image file before clicking Add to Cart button. How to show that field and how to upload the image in the file system. Please also mention what to add in which files to make it happen.


texts: One or more integrations have been reset because of a change to their xml configs. Magento 2.2

texts: I have installed Fresh Magento2.2 on PHP7.0.24.


texts: I need to add a cart to the header. I am creating my own custom theme which feeds of the RWD theme. I need a cart that shows total items and value.


texts: I've just applied SUPEE-9767 to a Magento 1.6.2.0 site and there is no formkey option to enable. How has this happened and how can I fix it please?

texts:
I have applied the SUPEE-9767 patch for the correct version (1.6.2.0) of Magento and in the admin area, I can see the warning at the top of the page, indicating that the patch was successful.

However, when I navigate to the settings menu to enable the form-key option, it is not there.

I've cleared cache etc. and nothing seems to make the option visible. I've just updated about a dozen sites on different versions of Magento with no issues but this site is causing a huge problem. Can anyone help me to fix this issue please?


texts: How can override shipping API interface in Magento2

texts:
I need to override below two core file of vendor folder :

vendor/magento/module-quote/Api/Data/ShippingMethodInterface.php

vendor/magento/module-quote/Model/Cart/ShippingMethod.php

file to my code folder.


texts: How can we redirect Admin Catalog Search to use Elasticsearch?

texts: We have over 2M products in our catalog and growing.  This has made the Admin Catalog Search completely non-functional (it spins until it times out).  How can we update this to also use elasticsearch?  OR is there another way to fix this performance issue?


texts: Magento 2 - How to remove products from Wishlist if click again same Wishlist icon?

texts:
How to remove the products from wishlist if again click the wishlist icon?
How to implement on my wishlist icon -> https://magento.stackexchange.com/a/166263/57334


texts:
Magento released a bunch of patches today for M1 compatibility with PHP7.
This is great news as PHP7 is so much faster.
Before we go ahead and apply them, I would like to know if anyone encountered any compatibility problems or bugs after applying the patch?

We had been using Inchoo's PHP 7 compatibility extension for Magento 1  but it's currently deprecated because of the new Magento Patches.


texts: Add Owl Carousel to Homepage in Magento CE 1.9

texts:
I was able to locally create the carousel but now sure how to implement this into Magento.

I have my CSS, Js and Images. Images are in Magento already but not sure where to put the CSS and Js files.

Also my index.html file. Do I need to add this to the Homepage CMS Page > Content?

Update

I tried:


texts: Issue removing a subscriber from the newsletter

texts:
There is a subscriber to my newsletter whose email address appears to be invalid. Based on the address, it's probably a spammer. I keep getting email notifications from the subscriber's domain that the address has been rejected. 550 5.1.1 <email address removed>: Recipient address rejected: aol.com

I've tried to remove the subscriber both using the Admin panel UI (Marketing->Newsletter Subscribers->Remove), and by removing the entry from the SQL table via phpmyadmin. With both methods, the subscriber is removed and the returns with a new number within an hour or so.

Is there a Magento process that is re-adding the recipient? How do I permanently remove this subscriber?


texts: How to customise the coupons in Magento 2?

texts:
I want to apply 50% coupon to lowest product only.
If the cart has 2 products means when the customer applies the coupon "COUPON50".
Product A = $20
Product B = $10
then the coupons must be apply to product B i.e., $5 discount only.
We did googled but no clue to get going.
Am pretty new to this concepts, any help would be appreciable.
thanks


texts: How to change product enable checkbox to keep disabled by default Magento 2

texts:
How do you change the Magento 2 product Enable button to Disabled by default? My code

 var inputs = document.getElementsByTagName('input');
for(var i = 0; i<inputs.length; i++){

  if(typeof inputs[i].getAttribute === 'function' && inputs[i].getAttribute('namw') === 'product[status]'){

    inputs[i].checked = false;

    break;

  }
}


texts: Right column of 3 column layout missing after upload

texts:
I have a local site running on XAMPP that I am happy with.
I've uploaded the site to our remote server, nearly everything is okay (couple of URL's needed changing) apart from the right column of the 3 column layout is missing.
Magento Version 1.9.2.4

Please see images below of the issue.
Local Version:

Remote Version:


texts: how to extend/inject this to customer address in magento 2

texts:
I'm trying to extend customer address page, but it's overriding. I want to inject in the middle of the address tab form.

My Code is:

Learning/CustomerAddress/composer.json

{
    "name": "learning/CustomerAddress",
    "description": "Customer Address",
    "require": {
        "php": "~5.5.0|~5.6.0|~7.0.0",
        "magento/framework": "100.0.*",
        "magento/module-ui": "100.0.*",
        "magento/module-config": "100.0.*",
        "magento/module-customer": "100.0.*"
    },
    "type": "magento2-module",
    "version": "100.0.0",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [ "registration.php" ],
        "psr-4": {
            "Learning\\CustomerAddress\\": ""
        }
    }
}

Learning/CustomerAddress/registration.php

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

Learning/CustomerAddress/etc/module.xml

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

Learning/CustomerAddress/view/adminhtml/ui_component/customer_form.xml

                    0
                    Learning_Custom/form/my-template

Learning/CustomerAddress/view/adminhtml/web/template/form/my-template.html

Magento 2 Customer Address

    <button type="button" onclick="test();">Click Me!</button>

Now it's showing my button, when I clicked on that it's not taken action.

Could you please suggest me how to do it?


texts: Disable di:compile PHP Comments check in Magento 2.2.2

texts:
I Upgraded to Magento 2.2.2 and now di:compile checks if @params comments for constructors are correct. I have many modules where the comments are incorrect but the params are correct, so I want to disable this feature or workaround somehow.

Is there a solution for this problem, or do I have to go through all the plugins and fix this?

Error messages look like:

Incompatible argument type: Required type: ... Actual type: ...

My PHP Version is 7.0.21 so that should not be the problem.


texts: How to add custom js in onepage checkout page

texts:
I have to override the onepage/review/item.phtml file but I want to add js file in that.

<checkout_onepage_review>
        <reference name="root">
            <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>cedapi/checkout/onepage/review/item.phtml</template></action>
        </reference>
</checkout_onepage_review>

Already I have tried below code but it is not working.

<reference name="head">
            <action method="addJs"><script>product_designer/checkout_image.js</script></action>
</reference>


texts: Get data from DB (load method) Magento 2

texts:
I have controller, template, view.
I need using load method, but i don`t know how i do that
        $post = $this->collectionFactory->create();
    $this->collectionFactory->load($post, 'id');
    return $this;

This code in controller don`t work. I have error
How i can get data from load() method ?(load method only)


texts: Magento 2 - Products not showing in front end

texts:
I have an issue with my development store (Magento 2.2.7), I have cleaned all data from the database with this tutorial (https://www.titechglobal.com/magento-2-x-how-to-clear-test-data-before-production/).

Now, in the backend, my products / categories appears correctly but from the frontend, my products are not showing in the category pages but I can access to the product page with the direct link and also nothing appears when I type my product name in the search bar.

I run this command on my server :

rm -rf var/di var/generation

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento indexer:reindex
php bin/magento setup:static-content:deploy -f

But nothing solved my issue. I found something strange, my table catalog_category_product_index is empty but I don't know why.

Can you help me??


texts: I cannot install Matrix Rates Package on my Magento website

texts:
I keep getting
Cannot find command package-prepare
when I click install
I am running 1.9.2


texts: Edit email template that is sent on creation of a manual order

texts:
If I create a manual order in the admin section the customer is notified by email. I need to edit certain text that goes into this email but I don't know from where I can do this?

The specific text seems to be in one of the language files

   app/locale/en_US/Mage_Payment.csv

But when I tried editing it from here there was no change in the email so maybe I'm looking in the wrong place.

All help appreciated. thank you!


texts:
Been searching all over, does anyone have any tips on debugging this warning found in system.log? They appear to come in pairs ...

2013-07-18T06:40:01+00:00 ERR (3): Warning: strpos() [function.strpos]: Empty needle  in /home/public_html/lib/Zend/Controller/Request/Http.php on line 504
2013-07-18T06:40:01+00:00 ERR (3): Warning: strpos() [function.strpos]: Empty needle  in /home/public_html/lib/Zend/Controller/Request/Http.php on line 510
2013-07-18T06:45:02+00:00 ERR (3): Warning: strpos() [function.strpos]: Empty needle  in /home/public_html/lib/Zend/Controller/Request/Http.php on line 504
2013-07-18T06:45:02+00:00 ERR (3): Warning: strpos() [function.strpos]: Empty needle  in /home/public_html/lib/Zend/Controller/Request/Http.php on line 510


texts: My Account custom link redirection issue when customer not logged in in magento2

texts:
I have added custom link in my account section

view/frontend/layout/customer_account.xml

    <?xml version="1.0"?>
    <!--
    /**
     * Copyright © Magento, Inc. All rights reserved.
     * See COPYING.txt for license details.
     */
    -->
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
            <referenceBlock name="customer_account_navigation">
                <block class="Magento\Customer\Block\Account\SortLinkInterface" name="customer-prescription" after="-">
                    <arguments>
                        <argument name="path" xsi:type="string">prescription</argument>
                        <argument name="label" xsi:type="string" translate="true">Prescriptions</argument>
                        <argument name="sortOrder" xsi:type="number">5</argument>
                    </arguments>
                </block>
            </referenceBlock>
        </body>
    </page>

CONTROLLER

    use Magento\Framework\App\Action\Context;
    use Magento\Framework\View\Result\PageFactory;
    use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;

    class Index extends \Magento\Framework\App\Action\Action implements HttpGetActionInterface
    {
        /**
         * @var PageFactory
         */
        protected $resultPageFactory;

        /**
         * @param Context $context
         * @param PageFactory $resultPageFactory
         */
        public function __construct(
            Context $context,
            PageFactory $resultPageFactory
        ) {
            $this->resultPageFactory = $resultPageFactory;
            parent::__construct($context);
        }

        public function execute()
        {
            /** @var \Magento\Framework\View\Result\Page $resultPage */
            $resultPage = $this->resultPageFactory->create();
            $resultPage->getConfig()->getTitle()->set(__('Prescriptions'));

            $block = $resultPage->getLayout()->getBlock('customer.account.link.back');
            if ($block) {
                $block->setRefererUrl($this->_redirect->getRefererUrl());
            }
            return $resultPage;
        }
    }

it's working fine for logged in  customer, but when session timtout means customer is not logged in is not redirecting to customer login page.
It's still redirecting on prescription page.
Can anyone help please


texts: How to use Dompdf for Magento2 step by step

texts:
I want to convert my html file to pdf using Dompdf in my custom module, right now i already  update my module composer.json like this:

"require" : {
    "dompdf/dompdf": "0.8.1"
},
"autoload": {
    "files": [
        "registration.php"
    ],
    "psr-4": {
        "Vendor\\Module\\": "",
        "Dompdf\\" : "Dompdf/src/"
    },
    "classmap" : ["Dompdf/lib/"]
}

and when i tried to use Dompdf like this:

use Dompdf\Dompdf;

class Index extends \Magento\Customer\Controller\AbstractAccount{
 public function execute(){
   $dompdf = new Dompdf();
 }
}

i got an error saying:

  PHP Fatal error:  Uncaught Error: Class 'Dompdf\Dompdf' not found


texts: How to import image from filesystem url instead of /media/import?

texts: I am new to magento, I have around 8000 Products have to import them through CSV.. but the images are in the filesystem and the other user who has access to magento magento with limited permission doesn't have /media/import.. how to import them to magento... I am using latest version of magento


texts: Magento 2 - Send data to jsTree with checkboxes on Back-office

texts:
I want to add jsTree to admin back-office with my data,

Example of jsTree with checkboxes :

I created the requirejs-config file and the js file on web/js, I want to send data from block to the tree, is there any method?

the code of js file on web/js :

$.widget('mage.rolesTree', {
    options: {
        treeInitData: {},
        treeInitSelectedData: {}
    },

    /** @inheritdoc */
    _create: function () {
        this.element.jstree({
            plugins: ['themes', 'json_data', 'ui', 'crrm', 'types', 'vcheckbox', 'hotkeys'],
            vcheckbox: {
                'two_state': true,
                'real_checkboxes': true,

                /**
                 * @param {*} n
                 * @return {Array}
                 */
                'real_checkboxes_names': function (n) {
                    return ['resource[]', $(n).data('id')];
                }
            },
            'json_data': {
                data: this.options.treeInitData
            },
            ui: {
                'select_limit': 0
            },
            hotkeys: {
                space: this._changeState,
                'return': this._changeState
            },
            types: {
                'types': {
                    'disabled': {
                        'check_node': false,
                        'uncheck_node': false
                    }
                }
            }
        });
        this._bind();
    },

    /**
     * @private
     */
    _destroy: function () {
        this.element.jstree('destroy');
    },

    /**
     * @private
     */
    _bind: function () {
        this.element.on('loaded.jstree', $.proxy(this._checkNodes, this));
        this.element.on('click.jstree', 'a', $.proxy(this._checkNode, this));
    },

    /**
     * @param {jQuery.Event} event
     * @private
     */
    _checkNode: function (event) {
        event.stopPropagation();
        this.element.jstree(
            'change_state',
            event.currentTarget,
            this.element.jstree('is_checked', event.currentTarget)
        );
    },

    /**
     * @private
     */
    _checkNodes: function () {
        var $items = $('[data-id="' + this.options.treeInitSelectedData.join('"],[data-id="') + '"]');

        $items.removeClass('jstree-unchecked').addClass('jstree-checked');
        $items.children(':checkbox').prop('checked', true);
    },

    /**
     * @return {Boolean}
     * @private
     */
    _changeState: function () {
        var element;

        if (this.data.ui.hovered) {
            element = this.data.ui.hovered;
            this['change_state'](element, this['is_checked'](element));
        }

        return false;
    }
});

return $.mage.rolesTree;


texts:
I am getting this error for a while and I am clueless to what is wrong with it.
Whenever I click the view order page, I get a blank page. Now I installed some code on my index.php that displays the errors.

This is the error that I get:

Array
(
   [type] => 1
   [message] => Class 'Mage_Sales_Block_Order_Info' not found
   [file] => /app/code/core/Mage/Core/Model/Layout.php
   [line] => 491
)

This is line 491 (and context)

/**
 * Create block object instance based on block type
 *
 * @param string $block
 * @param array $attributes
 * @return Mage_Core_Block_Abstract
 */
protected function _getBlockInstance($block, array $attributes=array())
{
    if (is_string($block)) {
        if (strpos($block, '/')!==false) {
            if (!$block = Mage::getConfig()->getBlockClassName($block)) {
                Mage::throwException(Mage::helper('core')->__('Invalid block type: %s', $block));
            }
        }
        if (class_exists($block, false) || mageFindClassFile($block)) {
            $block = new $block($attributes);
        }
    }
    if (!$block instanceof Mage_Core_Block_Abstract) {
        Mage::throwException(Mage::helper('core')->__('Invalid block type: %s', $block));
    }
    return $block;
}

Seems nothing is wrong there (and why should it, its magento default code)

Now the next part is somewhat strange. I expected the class to live in app/code/core/Mage/Sales/Block/Order/Info I looked it up. The folders Order/Info didnt exist in my folder. Nor in the fresh install zip.

What is going on and more importantly, how can I fix this?


texts: Magento 1.9.2.2 admin url showing blank page?

texts:
Magento 1.9.2.2 admin url display blank page.display errors code in index.php like this way

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

but its not showing errors .Again its showing blank page
checked the var/log files but there is no error in this files.any one help on this


texts:
Is there is a built in API for search typing?
I have an autocomplete search for mobile app like website. How to get API for searching products every charcter hit?


texts:
After installing an fresh magento in bluehost and created a simple product and tried adding to cart. But the shopping cart page shows empty

I am not getting any errors in error log. I have tried clearing cache and reindexing all the indexes.If I add a product from search page, product is adding to cart. Any help please ?


texts: Can any body tell me how can we get The Category thumbnail image url and Icon image url to display image on frontend in magento 2.3.2


texts: Magento 2 : Most of the Links are not working after upgrade and compile in magento 2

texts:
Most of the Links are not working after upgrade and compile in magento 2.1

Like wish list, Add to Compare, edit/Delete product on cart page, Compare menu etc.

Is there any solution ?

The href links coming with hash (#).

Kindly help.


texts: Magento backend product page left tab issue

texts:
http://prntscr.com/9hsc54

It's not working for some reason. i click but nothing happens.

Need quick and serious help.


texts: Set Custom Title of the Success page in Magento

texts:
I wanted to change the title of the onepage success page.By default text is "Magento Commerce". how can i change this and set my custom title.

Please help me.

Thanks in Advance


texts: How to quickly tell if a Magento site is version 1.x or 2.x?

texts:
While browsing some sites that built on Magento, how do you tell if it based on 1.x or 2.x.

I do have Built-with extension in Chrome, but prefer manual approach.

Thanks!


texts: Making Name block read only in Magento 2

texts:
I want to make the default name block in Magento 2.3 as read only.
This is the block which is used every where. /vendor/magento/module-customer/view/frontend/templates/widget/name.phtml
If i override this file and make first name and last name read only, it get affected every where.
I want to make the first name, last name fields readonly only at Account Edit information form. https://prnt.sc/oj7taq
But the field becomes read only at Account creation form also. https://prnt.sc/oj7tjj.

How can i make the fields read only at only Edit Account information page.
Please help.


texts: Infinite scroll stopped working after switching to production mode

texts:
I had Strategery infinite scroll extension installed and running correctly on my Magento 2.2.2 store,while it was in development mode.

Today when I switched to production mode, it stopped working on frontend, though it is still enabled and all its configurations are correct.

I have tried to disable JavaScript minfy and combining, yet it is still not functioning well.

P.S :
 I have one new error in console that says: "SyntaxError: '' string literal contains an unescaped line break"

Update:
I solved it by changing default spinner to a custom one, it seems to have been the inclusion of it, though I am still unsure why it appeared only in production mode.


texts:
I am not sure which directoy to setup my child theme for a theme I purchased.

The original directory of the theme is:

app/design/frontend/Codazon/fastest/fashion

there are a whole bunch of other themes (sub themes?) from the developer in the fastest directory as well, like so:

app/design/frontend/Codazon/fastest/sportswear
app/design/frontend/Codazon/fastest/outdoor

etc.

I want to make a child theme of fashion

So should my file structure be like this?

app/design/frontend/Codazon/fastest/fashion_child

and second question, when creating my theme.xml file is this the proper way to link to the fashion theme:

<parent>Codazone/fastest/fashion</parent>


texts: M1: Remove "?___store=default" from the URL

texts:
I've tried most of the solutions to remove "?___store=default" from magento URL but no success.

that makes duplicates for every page on magento (1.9.4) site that effecting SEO.

is there a working solution for this issue?


texts: How to Set Product attribute to 'Use Default' by SQL

texts:
I would like to set 'Name' and 'Description' attribute to Use Default for a couple of store views.

Like I have those store views.

Eng CA
Eng USA
Fra
Spa

So I would like to set globally for all products use the default for the first 2 store views.

I will accept as correct answer a SQL script that set one of the 2 attributes to Use Default for a Store view


texts:
"PHP message: PHP Fatal error:  Uncaught TypeError: Argument 2 passed to Mage::dispatchEvent() must be of the type array, object given, called in TestimonialController.php on line 26"

I am facing above error, i have upgraded my php version to 7.1 with magento 9.1.0

here is my function

/*TestimonialController.php starts*/
public function editAction()
{
    $this->_title($this->__("Testimonials"));
    $this->_title($this->__("Testimonial"));
    $this->_title($this->__("Edit Item"));
    $id = $this->getRequest()->getParam("id");
    $model = Mage::getModel("testimonials/testimonial")->load($id);
    Mage::dispatchEvent('testimonial_save_before', $model);//Line No.->26

    if ($model->getId()) {
        Mage::register("testimonial_data", $model);
        $this->loadLayout();
        $this->_setActiveMenu("testimonials/testimonial");
        $this->_addBreadcrumb(Mage::helper("adminhtml")->__('Testimonial Manager"), Mage::helper("adminhtml")->__("Testimonial Manager"));
        $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Testimonial Description"), Mage::helper("adminhtml")->__("Testimonial Description"));
        $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
        $this->_addContent($this->getLayout()->createBlock("testimonials/adminhtml_testimonial_edit"))->_addLeft($this->getLayout()->createBlock("testimonials/adminhtml_testimonial_edit_tabs"));
        $this->renderLayout();
    }
    else {
        Mage::getSingleton("adminhtml/session")->addError(Mage::helper("testimonials")->__("Item does not exist."));
        $this->_redirect("*/*/");
    }
}
/*TestimonialController.php starts*/

/*Observer.php starts*/

class Ravi_Testimonials_Model_Observer extends Mage_Core_Model_Abstract
{

const COUPON_ACTIVE = 'testimonial/couponcode/activecoupon';
public function testimonialSaveBefore($observer){

    //echo $observer->getEvent()->getData()->getId();

    //echo $observer->getEvent()->getData()->getStatus();

    $tId = $observer->getEvent()->getData()->getId(); //line 33
    Mage::getSingleton('core/session')->setTid($tId);
    Mage::getSingleton('core/session')->setSt($observer->getEvent()->getData()->getStatus());

}

public function testimonialSaveAfter($observer){

$testimonialId = Mage::getSingleton('core/session')->getTid();
$status = Mage::getSingleton('core/session')->getSt();

if($status == 0 && $observer->getStatus() == 0){

    return;

}

if($status == 0 && $observer->getStatus() == 1){

    return;

}

if($status == 1 && $observer->getStatus() == 0){

//If status goes from disable to enable, notify customer via email. Write codd for send emails.
//return;
if(Mage::getStoreConfig(self::COUPON_ACTIVE) == 1){
Mage::helper('testimonials')->sendCustomerNotificationEmail($testimonialId);
}else{

    return;
}

}

}
}
/*Observer.php ends*/


texts: Magento 2: How to close all product tabs on Mobile

texts: I am working on magento 2 product detail page. How can I close all the tabs on mobile view by default


texts:
I created product attribute called model_pn_line and added the values for this attribute during product adding.

My product collection code is like below.

$category = Mage::getModel('catalog/category')->load($_product ->getId());
$productslist = Mage::getResourceModel('catalog/product_collection')
    ->setStoreId(Mage::app()->getStore()->getId())
    ->addCategoryFilter($category)
    ->addAttributeToSort('model_pn_line', 'asc');

The out put is like below.

My Question is how the 6 coming after No 57?


texts:
How do I make certain frontend pages accessible only by admin? I have tried using Mage::getSingleton('core/session') and Mage::getSingleton('admin/session') to no good end.  Any suggestions?

Oh, and by pages I mean frontend controller actions in case that wasn't clear.


texts:
I tried to install Klarna in my Magento 2.3.2 website using
composer trollweb.
I kept getting errors as the klarna checkout was not working.

In the end, I used mage2pro klarna to set it up

Is there any way I can install klarna on my Magento 2.3.2 site ?


texts: How to change the icon of toggle navigation link in magento2

texts: Please check the screen shot I want to make close button on toggle navigation link.


texts: Revoke access to downloadable product after refund in 2.2

texts:
I was wondering if there's a built-in way to remove a customer's access to download links for a digital product after issuing a refund. I realize they could have downloaded the file within that time, and I'm okay with that, but I'd prefer not to allow them to continue downloading.

If this isn't built into the core, I'm open to learning how I could implement this. Though I'm new to Magento, I have written a couple of modules to get my store working the way I want it to, so I'm not afraid to get my hands a little dirty :)

Thanks!


texts: I am running magento v2.X with Nginx and HHVM, making requests directly to HHVM works fine, and non-magento sites run fine too, but when I make a request to nginx for out of the box magento nginx seg faults and crashes.  My only location block in nginx is a proxy_pass to hhvm.  And otherwise I have a very stock Nginx config.  Why would it be seg faulting?


texts: Issue After migrating from version 1.7.2 to 2.1.6

texts:
Previous Version: 1.7.2
Current Version: 2.1.6

After migrating magento version from 1.7.2 to 2.1.6, following issues are coming.
Don't know, Whats the problem. Please help me to sort out this problem.

-----------XXXXXXXXXX_______________XXXXXXXXXXXXXXXXXXX


texts:
I am currently running a magento 2 website (ver. 2.2.6).  I have been an issue (pretty frequently) where some customers (not all) are reporting that they are commonly receiving an error upon attempting to submit an order.  The error that they receive is:

sort order field isnull(expiration_date), expiration_date, transaction_id contains restricted symbols

The customer(s) report that this error appears when they click on submit order, and the website never goes to the checkout success page.  Therefore the customer thinks that the website did not receive their order.  They then proceed to click on submit order multiple times, subsequently placing multiple orders.  I catch these with the payment alerts or the customer sends an email reporting that they just placed 8 orders by mistake.  Commonly, the customer reports being on a mobile device, and this happens with both paypal and/or credit card (Stripe processing).

I have also been advised that sometimes they do not get this error, but the site just looks like it does nothing and remains on the checkout page when they click on submit order, also subsequently placing multiple orders.

When I go to the backend of the site, I do see an order placed that matches the payment obtained from the customer, through the payment processor.  The problem is, I can not re-create this issue myself so it has been extremely difficult to trouble shoot.  As I have paid 2 separate developers to try and resolve this, with no success.

I am looking for some help with this issue, as it is causing many issues, and upsetting many customers.  Thanks!  Below is an image of the error, provided by a customer.


texts:
i want auto generation of meta description for my products
liks this:
Buy {product name} for Rs {price} at sitename.com | New Book | Authorised seller for {publihser}


texts: I want to customisation in magento(2.4 EE) quote functionality, like add other steps like checkout process have, is there any way?

texts:
In my simple quotes functionality, I want to add some more steps like the first default step of upload files, Comment and in Second step I want to shipping address, billing address selections like Checkout process have. And in the third step, I want terms & conditions functionality.
So is there any way to use the default checkout process code into quotes, and if yes then any help to how we will achieve that?


texts: How to change shipping address format in order view at admin panel

texts:
I try to change Shipping Address format in order view at admin panel.

this is original shipping Address format

LastName FirstName
company name
postcode country region, city
T: telephone

but i want to change shipping address format when country is Japan

LastName FirstName
postcode country region, city

but i don't know how to change.

i open and see  app\design\adminhtml\default\templates\sales\order\view\info.phtml file, i saw only one code as the following:

<fieldset>
            <address><?php echo $_order->getShippingAddress()->getFormated(true) ?></address>
        </fieldset>

anyone can help me?


texts:
i'm tring to import a date field correct into the special_from_date and special_to_date field of products however for some reason the result is not correct.

I have this

-<Item>
<sku>008739-91-31</sku>
<PriceChangeNo>PROM18-00011</PriceChangeNo>
<PriceType>1</PriceType>
<special_price>65.00</special_price>
<price>99.90</price>
<special_price_from_date>06-04-2018</special_price_from_date>
<special_price_to_date>09-30-2018</special_price_to_date>
</Item>

i try every format like d/m/y m/d/y y/m/d d-m-y m-d-y y-m-d
but the result is everytime different date but not correct.


texts: How to validate Required fields before onclick review.save when submit button

texts:
How to validate Required fields before onclick="review.save();"

Is there any javascript to validate required fields before this action onclick="review.save();?

Here is my button code

<button type="submit" title="<?php echo $this->__('Place Order') ?>" class="button btn-checkout" onclick="review.save();"><?php echo $this->__('Place Order') ?></button>

This is the selection box code: (I tried both required & required-entry)

                        <?php echo $survey_question; ?> *

<select class="validate-select required-entry" id="socialtype" name="socialtype1" title="<?php echo $survey_question ?>">
<option value=""><?php echo $this->__("- Select -");?></option>
<option value="Friend/Relative/Acquaintance"><?php echo $this->__("Friend/Relative/Acquaintance");?></option>
<option value="Google search"><?php echo $this->__("Google search");?></option>
<option value="Gumtree Advert"><?php echo $this->__("Gumtree Advert");?></option>
<option value="Facebook"><?php echo $this->__("Facebook");?></option>
<option value="Other"><?php echo $this->__("Other");?></option>
</select>

this is opcheckout.js

var Review = Class.create();
Review.prototype = {
initialize: function(saveUrl, successUrl, agreementsForm){
    this.saveUrl = saveUrl;
    this.successUrl = successUrl;
    this.agreementsForm = agreementsForm;
    this.onSave = this.nextStep.bindAsEventListener(this);
    this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
},

save: function(){
    if (checkout.loadWaiting!=false) return;
    checkout.setLoadWaiting('review');
    var params = Form.serialize(payment.form);
    if (this.agreementsForm) {
        params += '&'+Form.serialize(this.agreementsForm);
    }
    params.save = true;
    var request = new Ajax.Request(
        this.saveUrl,
        {
            method:'post',
            parameters:params,
            onComplete: this.onComplete,
            onSuccess: this.onSave,
            onFailure: checkout.ajaxFailure.bind(checkout)
        }
    );
},

resetLoadWaiting: function(transport){
    checkout.setLoadWaiting(false, this.isSuccess);
},


texts: Magento 2.1 - Emails not being sent - Shared cPanel Hosting

texts:
I have everything set up correctly with the below cronjobs running fine but I'm not receiving order confirmation emails?

*/15 * * * * /usr/local/bin/php -c /opt/alt/php7/etc/php.ini  /home/username/public_html/magento_root/bin/magento cron:run >> /home/username/public_html/magento_root/var/log/magento.cron.log&

*/15 * * * * /usr/local/bin/php -c /opt/alt/php7/etc/php.ini  /home/username/public_html/magento_root/update/cron.php >> /home/username/public_html/magento_root/var/log/update.cron.log&

*/15 * * * * /usr/local/bin/php -c /opt/alt/php7/etc/php.ini /home/username/public_html/magento_root/bin/magento setup:cron:run >> /home/username/public_html/magento_root/var/log/setup.cron.log&

All of the logs show these are running correctly.

Anyone know what it could be?


texts: Captcha won't show up when load contact form by Static Block

texts:
I am getting captcha at contact us page. But when same file is called in static block, contact us form works fine but captcha does not occur.

Kindly suggest any solution.


texts: Errors on editorial commens: indexer; setup (Magento 2.1)

texts:
I am struggling to reindex or run any editorial commands (apart changed to developer mode) via the CLI. From a feeling it could be an issue with permissions or connection between database and command files.
I get all the time get "error reports:

 First line: "[Zend_Db_Adapter_Exception]
      SQLSTATE[HY000] [2002]No such file or directory"
    Second line:"[PDOException]
      SQLSTATE[HY000] [2002] No such file or directory"

As example: can check cache status (get list), but not flush it (get error above). With indexer no commands works (all brings error lines listed above), but if I place only "bin/magento indewer" in CLI then I get a listed command list: [InvalidArgumentException]
  Command "indexer" is not defined.
  Did you mean one of these?
      indexer:show-mode
      indexer:set-mode
      indexer:reindex
      indexer:status
      indexer:reset
      indexer:info

I am not a developer and relative new with Magento, could anyone help to find the issue cause and lead step by step to try solutions?
I tried by now:
- placing chmod u+x bin/magento to give permissions to run some queries, but maybe its not enough level?
- installed magento via a "button" click on hosting company's website on php 5.6 with API CGI/FastCGI.
- I tried to check settings in app\etc\env.php (for server status). All apart of key founded to prove and looks correct.

More about my previous ticket where we did not find a solution to reindex, but at least to call some commands out:

/bin/magento file cannot be opened (Magento 2.1)


texts:
Whenever I add the trustpilot extension using composer require it succeeds but afterwards when I try to use any php bin/magento command it returns it with this error:

Warning: require(/home/nolimi2q/public_html/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php): failed to open stream: No such file or directory in /home/nolimi2q/public_html/vendor/composer/autoload_real.php on line 70
Fatal error: require(): Failed opening required '/home/nolimi2q/public_html/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php' (include_path='/home/nolimi2q/public_html/vendor/magento/zendframework1/library:.:/opt/alt/php72/usr/share/pear') in /home/nolimi2q/public_html/vendor/composer/autoload_real.php on line 70


texts:
I want to override getSelectionItemData private function from Magento\Bundle\Block\Catalog\Product\View\Type\Bundle.php file.

Does anyone know how to override this function as I want to change the price from this function.


texts:
We would like to develop a PWA storefront with Nuxt.js. Vue Storefront for Magento 2 doesn't utilize Nuxt.js and it will be many months (or longer) before Vue Storefront Next (the version built with Nuxt.js) supports Magento.
Some options we have seen include:

https://vuefront.com/
https://pwa.nuxtjs.org/ (not a store front out of the box)
Magento Studio PWA - not a Nuxt.js dev framework
Vue Storefront for Magento 2 - not a Nuxt.js dev framework

VueFront looks interesting, but it appears to be a much smaller project than Vue Storefont. Any thoughts on it?
Are there other Nuxt.js options we should consider?
BTW, our store is very non-standard. We cannot use Vue Storefront without heavy customization.
What is our best path for developing a Magento PWA frontend in Nuxt.js at this time? Our timeline dictates that we have to start development now.


texts:
My site worked fine yesterday.  When I tried to log in this morning I get a 404 for the admin page.

May I ask for direction on why?


texts: Xml Element reference is not allowed here

texts:
I am new to Magento & I am using Magento version 2.1.7 in my Windows 8.1 system with Xampp while creating a new module I am getting an error in my XML file located in the
app/code/vendor/module/view/frontend/layout

with below error message

Element referenceContainer is not allowed here for the reference Container

cannot resolve symbol 'content'

for the reference Container name

My Code is as follows

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation=
        "urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
                <block class="Funky\Hello\Block\Main"
                       template="blockContent.phtml"
                       name="funky_hello_HelloWorld"/>
        </referenceContainer>
    </body>
</page>

Please can some one tell me that what is the exact problem?


texts:
we use Magento Community version 1.8.0.0 (now Magento users for since several years). We and our members need to connect to our respective Accounting systems to facilitate the accounting procedures. Now it is a bit tedious to manually book invoices in the Accounting system. I would be happy to have your suggestions on which extensions/bridges to use. As we are based in Sweden it would be great if we could find solutions to Accounting system that are used here.
Of course more generally it would be interesting to hear how this demand is handled around the world.


texts: How can I change memory limit of my site

texts:
I get error like memory not enough,

but I have changed memory limit in code part,

After I went to check my site, memory limit was not changed, and Product Attributes Index not successes.

My php info,


texts:
Discount Coupon based on ip address in magento

How do I create a coupon code in Magento community edition, where I want the coupon code to apply the discount % only if a particular IP address is being used?


texts: Setting orders status to 'completed' for virtual products

texts: Is it possible to set the order status for purchases of virtual products to 'completed' when the payments is made (so no manual invoicing is needed)? If so, how?


texts: magento 1.9.2.4 blank page when send mail

texts:
I am working on website Magento 1.9.2.4 and having weird issue,
Wherever mail function is called in whole website, it shows blank page only.
Events can be customer registration, place order button or even forget password event.


texts:
I'm using magento 1.9.1.0. I found a issue:

My search type is Combined. On a search result, if I switch the sort order from relevance to price (for example), I'll see the items' order change. If I switch back to relevance, nothing changes. Is it a bug?


texts:
I need to install an existing Magento Cloud project locally using cli but facing issues with database dump.
Indeed here's the error I get :

  Hello xxxxxxx (UUID: xxxxxxx), you successfully connected, but the service xxxxxxx doesn't exist or you do not have access to it
  xxxxxxx@xxxxxxx.magento.cloud: Permission denied (publickey).

More details :
- cli logged in to magento-cloud with an account having access to the project
- cloud user is super admin on master environnment
- ssh key has been added with magento-cloud ssh-key:add command
- I've been able to clone the project without any problem
- same error when trying to use magento-cloud ssh

If you have any ideas why ssh is working for git clone but not for direct connection or if you think about a workaround, I'm listening :)

[EDIT] I've seen on platform.sh doc that a redeployment is necessary to activate new ssh keys but it's not mentionned in magento cloud doc, what do you think about it ?


texts:
I have setup an existing Magento 2 instance locally using a Docker(LAMP stack), which is working fine for store side but I haven't been able to get admin path working. It gives 404 page not found for $PROJECT_PATH/admin or $PROJECT_PATH/index.php/admin. I have tried all these things which I have found online to solve this but none of this has got it working:

All row in core_config_data table for path like '%base_url%' is set to $PROJECT_PATH
Clean URL is enabled and project path has AllowOverride All in apache config.
Have 'backend' => array ('frontName' => 'admin') in env.php
Have ran php bin/magento setup:config:set --backend-frontname="admin"

Can someone give me any pointers what could be the issue?


texts: How to make changed module files take effect?

texts:
I changed my extra.phtml file in a module that I already have installed, and that module is (i think) dependent on another module.

I've done all of these:

disable/reenable module
remove entry from setup_module table
setup:upgrade
setup:static-content:deploy
cache:flush
setup:db-schema:upgrade
setup:db-data:upgrade
indexer:reindex
deleting all the cache folders

but my changes are still not there.

Here is the source tree of the two modules:

Notice how the Sample module is the only one that has the "Setup" folder with only "InstallData" script.

The .phtml file I changed is under Catalog/view/frontend/templates/product/view/extra.phtml.

All the things I've googled tell me to delete the module rows in the setup_module table and then setup:upgrade. I tried that and my changes were still not there.

Here's my catalog_product_view.xml:

<?xml version="1.0"?>

  <referenceContainer name="product.info.form.content">
    <block class="Magepeople\Catalog\Block\Product\View\Extra"
        name="product.view.extra"
        template="Magepeople_Catalog::product/view/extra.phtml"
        after="product.info.addtocart">
    </block>
  </referenceContainer>

And my extra.phtml file:

<?php /* @var $block \Test\Catalog\Block\Product\View\Extra */?>
<?php $_product = $block->getProduct() ?>
<?php //print_r($_product->getsample_label); ?>
<?php
$tag = 0;
if($_product->getSample_price_guest()){
 $tag = 1;
} else{
  $om = \Magento\Framework\App\ObjectManager::getInstance();
  $customerSession = $om->create('Magento\Customer\Model\Session');
  if($customerSession->isLoggedIn()) {
    if($_product->getSample_customer_group()){
        $grouparray = implode(',',$_product->getSample_customer_group());
        $gid = $customerSession->getCustomer()->getGroupId();
        if(in_array($gid,$grouparray)){
            $tag = 1;
        }
    }
    // get Customer Group Id
  }
}?>
<?php if($tag):?>
        <button type="submit"  title="Add to Cart" class="action secondary full-width" id="product-sample-button">
            <?php echo $_product->getSample_label();?>
        </button>
        <input type="hidden" name="" id="sampleorder" value="1" />


texts: Magento 2 : How to send contact form notifications to multiple recipients ?

texts:
I would like to send contact from contents to multiple E-Mail recipients, I checked there is no options for comma separated email address same like orders,shipping etc.

how to do that ?

Any help would be appreciated.


texts: Product grid homepage display category link

texts:
On our homepage we display a product grid with 6 products.
We want to display below every product a link to the category of that product.

So for example one of the products is a laptop.
Below that laptop I want to display a link with "See all laptops".

Is this possible?


texts: Magento 2: Redirect to backend customer list from frontend

texts:
I'm trying to create a menu to redirect to the client list in the backend.

The menu is:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="header.links">
            <block class="Core\CoreCrm\Block\TopLink" name="change.customer">
                <arguments>
                    <argument name="label" xsi:type="string" translate="true">Change Customer</argument>
                    <argument name="path" xsi:type="helper" helper="Gsp\CoreCrm\Helper\Data::getUrlBackendCustomers">
                        <param name="name">value</param>
                    </argument>
                </arguments>
            </block>
        </referenceBlock>
        <move element="change.customer" destination="header.links" after="-"/>
    </body>
</page>

I have the next class:

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{

    const BACKEND_URL_CUSTOMER = 'customer/index/index';

    protected $_helperBackend;

    public function __construct(
        Context $context,
        \Magento\Backend\Model\Url $helperBackend
    )
    {
        $this->_helperBackend = $helperBackend;
        parent::__construct($context);
    }

    public function getUrlBackendCustomers()
    {
        return $this->_helperBackend->getUrl(self::BACKEND_URL_CUSTOMER);
    }

}

But this returns a url not correct.

  http://172.16.254.100/admin/customer/index/index/key/1645a44a6fb4d6c4c85e71bcc2e38caa13c6d047f7d5ef19db0eb9a77b2843b4/

When redirecting it takes me to the dashboard and not to the list of clients, this must be because of the key it generates. When it is not validated, it does not access.

How can I get a correct url?


texts: Change the position of the Newsletter success message in magento 2.3.3

texts:
By default newsletter success message is shown at the top of the page https://prnt.sc/vud4fh.
How can i show this message right below the Email text box using ajax https://prnt.sc/vud3ln
Any idea?