texts: Are we unable to use Magento while reindexing Product Flat Data or any other index?

texts:
I am trying to reindex product flat data(about 85K products) with the following command and I am doing it at night when nobody is using the website and nothing else is going on the server.

nohup php -f indexer.php -- -reindex catalog_product_flat &

Then I was wondering if we can use the website or work in the backend when reindexing and I could not find any information about that online. So when I was reindexing, I was unable to use website or save product at all. The pages keep loading or show internal server error after a long time. Sometimes it rarely loaded with few pages successfully.

Is it possible to reindex and use our Magento website same time?
Do we just need a higher configuration server in order to keep doing both?

Currently the site is hosted on 8GB RAM and 4 Cores VPS.


texts:
I'm trying to add custom options for my products, using import product tools.

This is how my csv file looks like:

sku,custom_options
1001BG,"name=Line 1,type=field,required=0,price=0.0000,price_type=fixed,sku=,max_characters=5"

This is the error I get:

  "General system exception happened"

Any hint is appreciated.

P.S.: I tried to Convert to UTF-8-BOM, still not working.

I use Magento CE 2.1.3.


texts: checkout_cart_update_items_after is not working

texts:
I'm stuck in this. The checkout_cart_update_items_after is not firing. I already put a log statement in the function but is not getting executed. Whereas
checkout_cart_product_add_after is working fine.

<checkout_cart_product_add_after>
            <observers>
                <ysindia_customer_model_observer>
                    <type>singleton</type>
                    <class>Ysindia_Customer_Model_Observer</class>
                    <method>itemAdded</method>
                </ysindia_customer_model_observer>
            </observers>
        </checkout_cart_product_add_after>
        <checkout_cart_update_items_after>
            <observers>
                <ysindia_customer_model_observer>
                    <type>singleton</type>
                    <class>Ysindia_Customer_Model_Observer</class>
                    <method>checkCart</method>
                </ysindia_customer_model_observer>
            </observers>
</checkout_cart_update_items_after>

Observer.php

class Ysindia_Customer_Model_Observer
{

public function checkCart(Varien_Event_Observer $observer){
     Mage::log("Items after", null, 'observer.log');
}

public function itemAdded(Varien_Event_Observer $observer)
{
    Mage::log("Add after", null, 'observer.log');
}

}

Please help me, thanks


texts: Where would the location of the UPS Shipping specific files be? I'm looking to extend some of the functionality for UPS and can't seem to find it.


texts:
Team,
Can we do continuous deployment using a separate CI/CD pipeline instead of pre-integrated  Magento cloud CI/CD


texts: Add custom filed in default registration form magento

texts: I want to add some input fields in magento default registration. Is there any module to add fields in registration from admin panel?


texts: Purchase made via Paypal, any way to change the grand total?

texts:
A discount coupon was set to "Fixed amount discount" which will apply the coupon to each item in the cart. But the correct configuration should be "Fixed amount discount for whole cart".

Problem is the customer already paid using Paypal. Is there a way to rectify this?

The status of order in the admin panel is "Processing"

The invoice status is "Paid"

The transaction Is Closed is set to "No"

Thank you!


texts: Integrate both MySQL and MongoDB in magento

texts:
I am from python background. I have been assigned to analyzed to integrate only product catalog part to MongoDB and all other functionality will be remain in MySQL. As I am very new to magento(even php), please let me know bellow few question.

Is it possible to do it?
If yes (as per my homework), what is the best suitable ORM/ODM for this task?
Do we need to change lots of code in-built mogento code to integrate it?
Please let me know any other things, I need to concern.

Here is some link I got from google.

http://nl.smile.eu/News/News/Scaling-magento-with-mongodb
http://www.doctrine-project.org/2010/07/22/mongodb-for-ecommerce.html
https://zapier.com/zapbook/magento/mongodb/

Please try to understand, I may be asking very silly question but I have no idea about this. Please don't downvote it. Please fell free to have a discussion type answer.

Thanks in advance.


texts: Script to hide empty categories works but not with products without stock

texts:
I have this script to hide empty categories:

require_once '../app/Mage.php';
Mage::app()->setCurrentStore(0);

$categories = Mage::getModel('catalog/category')->getCollection()
                                                ->addAttributeToSelect('*')
                                                ->addAttributeToFilter('level',array('gt'=>2));

foreach($categories as $category)
{
    $products = $category->getProductCollection()
                          ->addAttributeToFilter('status', 1);
    if(!$products->count()) {
        echo $category->getName().'-';
        $category->setIsActive(0);
    } else {
        $category->setIsActive(1);
    }
    $category->save();
}

It hides categories with only de-activated products. But how can i extend this with a filter on products which have stock management, but are out of stock?


texts:
I am trying to integrate sagepay module into my shop mage 1.7 -  http://www.magentocommerce.com/magento-connect/ebizmarts-sage-pay-suite-ce-sage-pay-approved.html

It works fine with normal 6 step checkout, but I am using a 1 step checkout.

The default checkout calls these blocks in this order:

app\design\frontend\base\default\layout\checkout.xml    is called and then
app\design\frontend\base\default\layout\sagepaysuite.xml

My theme calls them as:

app\design\frontend\base\default\layout\sagepaysuite.xml    is called and then
app\design\frontend\theme\default\layout\onepagecheckout.xml

What sets the order of the blocks and how can I switch the call order to hopefully get this working!


texts: How can i export a sales report that includes order number, sale price, customer name and most importantly payment method. The sales view or any in the report section do not export with payment method. If i go to payment method in the orders tab there is no option to export


texts: In the shopping cart we need to sort products in the order they are added and the grouped products need to be ordered alphabetically.


texts: Error when Reinstalling or Uninstalling Extension from Magento Connect Manager?

texts:
I am using Magento 1.9.3.6. When I'm trying to reinstall or uninstall an extension from Magento Connect Manager. It is showing this error

Kindly help me to resolve this issue.
Thank You


texts: Magento 2 Add widget using WYSIWYG field in a custom widget

texts:
I have created a custom widget and it contains a WYSIWYG field. Everything works fine except the add widget option.

When I add the widget it will displayed in the editor. When I click the save button, it redirects to the admin dashboard.

I have followed the below url to create WYSIWYG field in custom widget.

  Magento 2.1: create a WYSIWYG field in a custom widget

How can I fix this?

Here is the issue

Working for other items


texts: Magento 1.9 - how to create an new observer on the event "customer_register_success" from the top

texts:
I'm quite newbie in magento. I'm trying to create observer on the event "customer_register_success". I follow the tutorial about how to compose the files in local module. But it didn't work.

When customer register on our website, customer should select the country where they live and it is saved as billing address. The goal i want to meet is that if customer live in United State, their group is standard group(just default group). If not, like live in Jamaica, Spain, they are assigned to international group automatically.

I know that GROUP exist because of tax class tho. but i must make it.

our website's customer group information is,

I'm willing to set the groupid based on their country name,id.
As you see the following,

  1)Directory

  2)app/etc/modules/Kbethos_CustomerGrouped.xml

First of all, I added a module configuration file to the app/etc/modules directory.

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

  3) app/code/local/Kbethos/CustomerGrouped/etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Kbethos_CustomerGrouped>
            <version>0.1.0</version>
        </Kbethos_CustomerGrouped>
    </modules>
    <global>
        <helpers>
            <customergrouped>
                <class>Kbethos_CustomerGrouped_Helper</class>
            </customergrouped>
        </helpers>
        <models>
            <kbethos_customergrouped>
                <class>Kbethos_CustomerGrouped_Model</class>
            </kbethos_customergrouped>
        </models>
        <events>
            <customer_register_success>
                <observers>
                    <kbethos_customergrouped>
                        <class>kbethos_customergrouped/observer</class>
                        <method>customerRegisterSuccess</method>
                    </kbethos_customergrouped>
                </observers>
            </customer_register_success>
    </events>
    </global>
</config>

  4)app/code/local/Kbethos/CustomerGrouped/Model/Observer.php

<?php
  class Kbethos_CustomerGrouped_Model_Observer {
  public function customerRegisterSuccess(Varien_Event_Observer $observer) {

 $event = $observer->getEvent();
    $customer = $event->getCustomer();
    $billingAddress = $customer->getPrimaryBillingAddress();

    if ($billingAddress) {
        $countryId = $billingAddress->getCountryId();
        switch ($countryId) {
            case 'US':
                $customer->setData('group_id', 1);
                $customer->save();
                break;
            default:
                $customer->setData('group_id', 27);
                $customer->save();
        }
    }

}
}

?>

5) /wh-clone/app/code/local/Kbethos/CustomerGrouped/Helper/Data.php

<?php

class Kbethos_CustomerGrouped_Helper_Data extends Mage_Core_Helper_Abstract
{
}

What sould i do more? please let me know. Thank you.


texts:
I have the following code in a custom module for admin backend, which is not running.

tinymce.html

<textarea class="admin__control-textarea wysiwyg" data-bind="
    value: value,
    valueUpdate: valueUpdate,
    hasFocus: focused,
    attr: {
        name: inputName,
        cols: cols,
        rows: rows,
        'aria-describedby': noticeId,
        placeholder: placeholder,
        id: uid,
        disabled: disabled
    }"
/>

<script type="text/javascript">
    require(['jquery'], function($){
        $(document).ready(function() {
            alert("inside tinymce template");
        });
   });
</script>

This produces the following HTML code

<textarea class="admin__control-textarea wysiwyg" data-bind="
    value: value,
    valueUpdate: valueUpdate,
    hasFocus: focused,
    attr: {
         name: inputName,
         cols: cols,
         rows: rows,
         'aria-describedby': noticeId,
         placeholder: placeholder,
         id: uid,
         disabled: disabled
     }" name="caption" cols="15" rows="2" aria-describedby="notice-I1P21H3" placeholder="" id="I1P21H3"></textarea>

<script type="text/javascript">
     require(['jquery'], function($){
         $(document).ready(function() {
            alert("inside tinymce template");
         });
     });
</script>

However, the alert is never fired.


texts: how to get only street address as they sign up

texts:
Is there any way to add the address form to the registration form or any free addon to add an extra field to the registration form so that I can get the customer location as they sign up?

I tried many times with  <?php $this->setShowAddressFields(true);?> this code but i want only street address it gives company name , country etc. ui want just street address.


texts:
Where can I define the size of the product image cache?

Our product-image in product image cache now automatically will be scaled down from 1900 pixels to 600 pixels.
But I want to keep the original size on product page, because details are important for us.


texts: Remove product from mini cart message Magento 2

texts:
Where can I find the following message that appears when you remove an item from the mini cart?

"Are you sure you would like to remove this item from the shopping cart?"


texts:
Anyone know any extension, thanks to which I will be able to create a category in website for customers to write an opinion about the store and I will be able to send an email asking for opinions after each order?

I do not mean issuing an opinion under all products only general reviews about the store.


texts: Graphql don't work in magento 2, please help me

texts:
I create a module in magento 2 to test Graphql, but it's not work.

my schema.graphqls

#Coppy codilar Blog
type Query{
    codilarblog: Codilarblog @resolver(class : "Codilar\\GraphQlDemo\\Model\\Resolver\\Blog") @doc(description: " the query return something")
}

type Codilarblog @doc(description : "Codilarblog defines the blog name and "){
    entity_id: Int
    blog_name: String
    author: String
    blog_content : String
}

my Resolver/Blog

<?php

namespace Codilar\GraphQlDemo\Model\Resolver;

use Magento\Framework\GraphQl\Config\Element\Field;
use Magento\Framework\GraphQl\Query\Resolver\ContextInterface;
use Magento\Framework\GraphQl\Query\Resolver\Value;
use Magento\Framework\GraphQl\Query\Resolver\ValueFactory;
use Magento\Framework\GraphQl\Query\ResolverInterface;
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;

class Blog implements ResolverInterface
{
    /**
     * @var ValueFactory
     */
    private $valueFactory;

    /**
     * Blog constructor.
     * @param ValueFactory $valueFactory
     */
    public function __construct(ValueFactory $valueFactory)
    {
        $this->valueFactory = $valueFactory;
    }

    /**
     * @param Field $field
     * @param ContextInterface $context
     * @param ResolveInfo $info
     * @param array|null $value
     * @param array|null $args
     * @return Value|mixed
     * @throws \Exception
     */
    public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)
    {
        try {
            $blog = $this->getBlogArray();
            $result = function () use ($blog) {
                return !empty($blog) ? $blog : [];
            };
            return $this->valueFactory->create($result);
        } catch (\Exception $exception) {
            throw new \Exception(__($exception->getMessage()));
        }
    }

    /**
     * @return array
     */
    public function getBlogArray()
    {
        $blog = [
            'entity_id' => 1,
            'blog_name' => 'Some blog name',
            'author' => 'Some Author Name',
            'blog_content' => 'Hi, this is blog content.'
        ];
        return $blog;
    }
}

my folder module

error after i upgrade and run :


texts: magento2 customize collection of product not effecting in layer & toolbar

texts:
I extend the collection using event 'catalog_block_product_list_collection'. Query displaying proper data, as well as showing proper record in product list page. But same collection is not loading for layer & toolbar section.
I have the same problem

How i can fix it problem?


texts:
I have /pub as document root (as recommended) and this always seems to get me into trouble.

Some extensions use https://www.example.com/pub/media/catalog/product/... as URL to images for example. This is acually the real path to the image files, but the working URL should be: https://www.example.com/media/catalog/product/...

So could I create a symlink /pub/pub that points to /pub to solve this?


texts:
Migration issue from M1.9 to M2.3.1

After importing settings successfully when I run data migration command it gave me following error:

There are no commands defined in the "migrate" namespace.


texts: Conditionally changing layouts (for categories that have subcategories)

texts:
I am developing a module so that for categories that have subcategories the subcategories are listed instead of the products.

My catalog_category_view_type_layered.xml file looks like this

<?xml version="1.0"?>
<body>
    <referenceBlock name="category.products" remove="true"/>
    <referenceContainer name="content">
        <block class="MyName\MyModule\Block\Category\View" name="category.categories" template="MyName_MyModule::category/categories.phtml" />
    </referenceContainer>
</body>

but I need some logic (I imagine with PHP) to only apply these layout changes conditionally.


texts: Magento 2 how to encrypt customer phone number and email

texts:
In Magento 2.3  i'am trying to encrypt customer phone number and email after registration.
Please help me out in this.
Thanks in advance.


texts: Running 2 `x-magento-init` scripts in a certain order

texts:
I have 2 x-magento-init coming from different parts of the application and running on the same element (this may not be important).

<script type="text/x-magento-init">
    {
        "domSelectorHere": {
            "path/to/js": {
                "config": {....}
            }
        }
    }
</script>

and in a different template

<script type="text/x-magento-init">
    {
        "domSelectorHere": {
            "path/to/other-js": {
                "config": {....}
            }
        }
    }
</script>

Is there a way to ensure that the second one path/to/other-js is executed after the first one?

Bonus: The first one path/to/js may or may not be present in the page.
Is there a way to make sure that if script 1 exists, then script 2 runs after script 1 and if it doesn't exist then script 2 just executes?

I know I can theoretically group them into one single js component but that involves a lot of work.
I'm looking for a lazy approach.


texts: How to get inventory source id in magento 2.3 order details

texts:
I need get the inventory source id based on the order item.
I tried with order details but it not display.
Anyone please help me.


texts:
Magento 2, Why we use data folder in api?
Use of data folder in api

If anyone knows please explain me
Thanks.


texts: Magento 2 add new theme without changing core files. Grunt

texts: How to extend default Magento 2 Grunt configuration without touching/editing core files like Gruntfile.js and dev/tools/grunt/configs/themes.js?


texts: Trying to get Magento 2 config using plugin

texts:
I'm kind of making my first baby-steps into Magento2.
I'm trying to migrate a Magento 1 module to Magento 2.
I need to be able to get the configuration values, and read/edit them from my module.
I created a plugin, using this on di.xml file:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Framework\App\Config\ScopeConfigInterface">
        <plugin name="MyCompany_MyModule_config_override_plugin" type="\MyCompany\MyModule\Plugin\Config" sortOrder="1" disabled="false"/>
    </type>
</config>

And this is on Plugin/Config.php:

<?php
namespace MyCompany\MyModule\Plugin;

class Config
{
    protected $logger;

    public function __construct(
        \Psr\Log\LoggerInterface $loggerInterface
    ) {
        $this->logger = $loggerInterface;
    }

    public function afterGetValue($path, $scopeType = \Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null)
    {
        $this->logger->debug('enter to after event');
        return true;
    }
}

When I use that, I'm getting lots of different issues each time on the frontend, for example this one:

1 exception(s):
Exception #0 (Exception): Notice: unserialize(): Error at offset 0 of 1 bytes in E:\MyCompany\code\magento2\vendor\magento\framework\View\DesignExceptions.php on line 68

I'm seeing on my debug log that the logger is working, here is the info:

[2017-03-29 19:31:56] main.DEBUG: enter to after {"is_exception":false} []
[2017-03-29 19:31:59] main.DEBUG: enter to after {"is_exception":false} []
[2017-03-29 19:32:00] main.DEBUG: enter to after {"is_exception":false} []
[2017-03-29 19:32:00] main.DEBUG: enter to after {"is_exception":false} []
[2017-03-29 19:32:01] main.DEBUG: enter to after {"is_exception":false} []
[2017-03-29 19:32:02] main.DEBUG: enter to after {"is_exception":false} []
[2017-03-29 19:32:02] main.DEBUG: enter to after {"is_exception":false} []
[2017-03-29 19:32:03] main.DEBUG: enter to after {"is_exception":false} []
[2017-03-29 19:32:04] main.DEBUG: enter to after {"is_exception":false} []
[2017-03-29 19:32:04] main.DEBUG: enter to after {"is_exception":false} []

Am I making the right approach to the task?
My final goal is to be able to intercept the config options and being able to modify them from my plugin.
Thanks in advance!


texts:
CMS page, much text dont work to save.
When I save a cms page with a few letters, about 3792 characters.
It works, but when I try to save the cms page with about 4000 characters, it did not work when I did this in the backend.
It says that it will be saved in the backend, but it will not.

However, if I log into my database, myphpadmin, I add the text there under the cms page. And it works.

I'm on a VPS,  I can not server config

Ideas?

1.9.2.4


texts:
I have a shop and the client is now introducing the products. After having done so he told me that he can't navigate to page 3 of a certain category. I checked and it's true, the browser is just stuck loading forever that page, I don't even see any html changes or petitions in firebug. I assume this must be due to a corrupted product but I don't know where to look!

I am currently in the process of making a database repair on a development envirment but I'm doing this blind since I don't know what I am repairing and I want to know what happened.

Any help or advice?

Repair tool said:

Add missing index(es) "FK_CORE_URL_REWRITE_PRODUCT_ID_CATALOG_CATEGORY_ENTITY_ENTITY_ID" to table "core_url_rewrite"
Add missing foreign key(s) "FK_CORE_URL_REWRITE_PRODUCT_ID_CATALOG_CATEGORY_ENTITY_ENTITY_ID" to table "core_url_rewrite"

var/log folder shows only warnings that were there before. Server log says nothing


texts: Standalone file in root to create a category attribute:

texts:
Hi I am trying to create a file in root of magento installation to add a category attribute. I don't know what i am doing wrong. Here is the code:

<?php
require_once('app/Mage.php');  // Include Mage files
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID)); //Set admin store id
$installer = new Mage_Sales_Model_Mysql4_Setup;
$installer->startSetup();
$attribute  = array(
    'type' => 'varchar',
    'label'=> 'New Product Name For Categories',
    'input' => 'select',
    'default' => array(0),
    'source' => 'eav/entity_attribute_source_boolean',
    'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'visible' => true,
    'required' => false,
    'user_defined' => true,
    'default' =>  '',
    'position'            => 100,
    'group' => 'General Information'  // Choose Group
);
$installer->addAttribute('catalog_category', 'name_for_categories', $attribute);
$installer->endSetup();


texts: How to show highest prices products on top in Magento2 categrory pages?

texts:
I want to show the highest priced products when enter any category page.
Is there any configuration in Admin pnael I should do ?
Regards.


texts: Magento 2 - Maximum execution time of 300 seconds exceeded

texts:
I am upgrading a website from Magento 2.2 to 2.5 and running into an error. I read through a lot of threads and forums but nothing is working. This includes adding

max_execution_time 60000, set_time_limit(0) in my php.ini

I am using Cloudways and they said any PHP directives defined in a .htaccess will not be used. To use PHP-FPM Settings.

I added the following values:

I restarted my server and looked into my phpinfo() and saw the changes I made were the same values in the image attached.

Preconditions

Running Magento 2.2.2, upgrading to 2.2.5
I have 1 website 1 store 4 store views. Over 250k orders and about 400 products.

Steps to reproduce

composer require magento/product-community-edition 2.2.5 --no-update
composer update
rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
php bin/magento setup:upgrade

Expected result

The Magento 2.2.2 upgrades to 2.2.5.

Actual result

Time to upgrade takes longer than 300 seconds.
The maximum execution time of 300 seconds exceeded in /home/150747.cloudwaysapps.com/qqemzvkvdx/public_html/vendor/magento/frame
work/ObjectManager/Factory/AbstractFactory.php on line 111

Thanks for reading. Anything helps!


texts: Magento 2.3.0 robots.txt file location in server directory

texts:
I am trying to delete a disallow condition from robots.txt file. This is not located in root or /pub directories.

I can't change it from admin panel because seems like Magento 2.3.0 has a bug on theme edit page.

  Github thread for details

Thanks


texts: Creating a csv file that contains product details magento 1

texts:
I am trying to create a csv, using script that contains the below product attributes.

(id,
title,
description,
link,
image_link,
price,
availability)
in Magento 1

Has anyone implemented it? Or Any thoughts how it can be done ?


texts: Convert guest customer to regular customer on successful order place in magento 2

texts:
I'm looking for code to convert guest checkout customer to regular customer on successful order placement.

\Magento\Sales\Api\OrderCustomerManagementInterface $orderCustomerService in this class I have found one method called create that is accepting order id and converting to a customer. But I guess it is not working.

Anyone know the solution?


texts: Magento 2: I need to show all products collection name in custom attribute dropdown in catalog products grid in admin

texts:
I need to show all products collection name in custom attribute dropdown in catalog products grid in admin.

I just want to show Products dropdown like colors dropdown.

Thanks in advance.


texts: Magento 2.3.2: Database prefix error running setup:upgrade

texts:
I tried to install MailChimp extension through Composer, but when running setup:upgrade I received a database error. Assuming that the problem was in the extension, I restored the backup I made just before installing the extension. Out of curiosity I run "php bin/magento setup:upgrade" again and received the same database error!
The error I get is:

  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mg2_mg_catalogrule_product_price_replica' doesn't exist, query was: SHOW CREATE TABLE mg2_mg_catalogrule_product_price_replica

The prefix of my database is 'mg2_' and somewhere something assumes the table name starts with 'mg_' and then glues even my prefix in front of it.

I didn't have this problem after the last extension I installed. How can I find out what and where a wrong table name is assumed?


texts: Fatal error: Cannot instantiate interface in Magento 2?

texts:
As the part of creating bundle product programmatically in Magento 2.
I am getting below error. Even i removed var/cache and generation.

This may be a duplicate question but none of the answer is working for this issue.

  Fatal error: Cannot instantiate interface
  Magento\Catalog\Api\Data\ProductExtensionInterface in
  \ObjectManager\Factory\Dynamic\Developer.php on line 73

Used below code as the reference of link

$productExtension = $objectManager->create(\Magento\Catalog\Api\Data\ProductExtensionInterface::class);
$option = $objectManager->create(\Magento\Bundle\Api\Data\OptionInterface::class);
$option->setTitle('Size');
$option->setType('radio');
$option->setRequired(true);
$option->setPosition(1);
//$option->setProductLinks($links);
$productExtension->setBundleOptions([$option]);
$_product->setExtensionAttributes($productExtension);

I am using object manager for temporary/quick purpose, will convert the object manager to constructor injunction.

Any one can help me on this issue.


texts: List configurable options using custom extension?

texts:
I've purchased an extension called B2B Order List by Ecomwise and my aim was to create a category just visible to wholesale customers that lists relevant products and gives the user the ability to add multiple variants to their cart without flicking from page to page.
Everything is working however, if I've got a list of 10 products and each product has 3 configurable dropdowns (color, size, material etc), is there any way to list each individual variant so the user could add multiple of that same configurable product to their cart?

Currently it looks like this

And I'm looking for something like this;

Looking into the code for the extension it renders a select box for configurable options

Any help would be massively appreciated

Regards


texts: translate a content: 'Price'; in a scss file

texts:
I have a file called _catalog-extend.scss. When I open this file I see in de the code a hardcoded 'Price'.
  //
//  Price box
//  _____________________________________________
.product-info-main .price-box {
    width: 100%;
    float: left;
    padding-left: 40%;
    min-height: 60px;
    line-height: 60px;
    position: relative;
    justify-content: flex-start;

    // Price label content:
    &:before {
        content: 'Price';
        position: absolute;
        left: 0;
        min-height: 60px;
        width: 40%;
        line-height: 60px;
        text-transform: uppercase;
        font-weight: bold;
        color: $text__color;
    }

But how can I translate this piece "content: 'Price';" for a multistore?


texts: how to keep all Filters Visible in Magento

texts:
I want keep all filter visible on result page suppose if i select price 40 to 50 and it will display the product from price range 40-50 on that page i want display all price filter range as previous list page.in bellow code i was try for price attribute but when i selet one price range its not displying all price filter option on result page.

i have tried this code form this link http://inchoo.net/magento/layered-navigation-but-not-quite/

my website link:- click here

<?php $_filters = $this->getActiveFilters() ?>
<?php $obj = new Mage_Catalog_Block_Navigation(); ?>
<?php $_current_category=$obj->getCurrentCategory()->getUrlPath(); ?>
<?php $subs = $obj->getCurrentCategory()->getAllChildren(true); ?>

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

<?php echo $this->__('Currently Shopping by:') ?>

    <?php foreach ($_filters as $_filter): ?>

                    <?php $attributemodel=$_filter->filter->_data["attribute_model"]; ?>
                    <?php $attroptions=$attributemodel->getSource()->getAllOptions();?>
                    <?php $_categ= Mage::getModel('catalog/category');?>

                <?php foreach($subs as $cat_id): ?>
                        <?php $_categ->load($cat_id)?>
                        <?php $collection = $_categ->getProductCollection(); ?>
                        <?php $collection->addAttributeToSelect('price')?>
                <?php endforeach; ?>
                 <?php foreach($attroptions as $attr): ?>
                        <?php $count=0; ?>
                        <?php if($attr["value"]!=""): ?>
                                <?php $val=$attr["value"] ?>
                                <?php $collection->addFieldToFilter(array(array('attribute'=>'themes','gt'=>10)))?>

                                <?php $proddata=$collection->getData() ?>
                                <?php if($attr["label"]!= $this->stripTags($_filter->getLabel())): ?>
                                    <?php foreach($proddata as $prod):?>
                                        <?php //if($prod["type_id"]=="configurable"): ?>
                                          <?php if($prod["type_id"]=="simple"): ?>
                                            <?php $split=split(",", $prod["price"]);?>
     <?php foreach($split as $color): ?>
                                                <?php if($color==$attr["value"]): ?>
                                                    <?php $count++;?>
                                                <?php endif; ?>
                                            <?php endforeach; ?>

                                        <?php endif;?>

                                    <?php endforeach; ?>

                                    <?php if($count>0):?>

<a href="<?php echo $this->getUrl('').$_current_category ?>?price=<?php echo $attr["value"]?>" ><?php echo  $attr["label"]; ?>

                                    <?php endif; ?>

                                <?php else:?>

 <?php echo $this->stripTags($_filter->getLabel()); ?>

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

<?php endforeach; ?>

    <a class="all" style="float:right;" href="<?php echo $this->getClearUrl()?>">All

<?php endif; ?>


texts: abandoned-cart-email-is-not-sending-to-customer in magento 1.9

texts:
I have install and set up the abandoned cart as per the documentation but the customer did't receive any mail after adding product in cart
Here are my settings


texts: Magento2 - Run composer require without cli

texts:
I don't have access to ssh on my cpanel.

How is it possible to run composer require(composer require razorpay/magento) without any cli interface?


texts: Override Store View … "Enable Product" with "Use Default Value" for all Products

texts:
It has probably happened by import the products, that Magento 2 in the Store view "DE" set its own value - " Enable Product " is checked  - and no longer uses the "Use Default Value".

Is it possible to fix about the database to set the value Use default value for all products in Store View DE?

Which Tables I have to change?


texts:
I need to show the MSRP price next to the regular price on the product view page in a Magento 2 site.

So it would be like:

  $199  (MSRP: $399)

I have found this question: How to display MSRP / RRP on product page

The problem is I am lacking some pre-requisite knowledge to follow these instructions.

The theme I am using doesn't have a price.phtml so I guess I need to override it from a module.  I searched the vendor directory and found several price.phtml files which is confusing to me.  Which one do I override?

The theme I am using (Ultimo) has a custom catalog_product_view.xml file which has this xml which I think refers to the part I want to edit:

<container name="product.info.price" label="Product info auxiliary container" htmlTag="div" htmlClass="product-info-price" after="product.info.review">
    <container name="product.info.stock.sku" label="Product auxiliary info" htmlTag="div" htmlClass="product-info-stock-sku">
        <container name="product.info.type" before="-"/>
        <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.sku" template="product/view/attribute.phtml" after="product.info.type">
            <arguments>
                <argument name="at_call" xsi:type="string">getSku</argument>
                <argument name="at_code" xsi:type="string">sku</argument>
                <argument name="css_class" xsi:type="string">sku</argument>
                <argument name="at_label" xsi:type="string">default</argument>
                <argument name="add_attribute" xsi:type="string">itemprop="sku"</argument>
            </arguments>
        </block>
    </container>
    <block class="Magento\Catalog\Block\Product\View" name="product.info.review" template="product/view/review.phtml" after="product.info.stock.sku" />
    <block class="Magento\Catalog\Pricing\Render" name="product.price.final" after="product.info.sku">
        <arguments>
            <argument name="price_render" xsi:type="string">product.price.render.default</argument>
            <argument name="price_type_code" xsi:type="string">final_price</argument>
            <argument name="zone" xsi:type="string">item_view</argument>
        </arguments>
    </block>
</container>

So do I need to add something in to this xml for it to render the MSRP or do I need to edit something that it's already showing?  I can't see which template is responsible for outputting price so does that mean the default magento 2 one is being used?

I am really struggling here to get a firm grip on how the system works and edit it in correct manner.  Thanks for your help.


texts: How to Setup Facebook Ads Dynamic Variable Conversion Value?

texts:
I'm using Magento Community for my online store, and I am in the process of setting up my Facebook Website Conversion ads. I have already created and verified the conversion pixels, however, the conversion value by default is 0.01. Hence I do not know my true conversion value. What I am trying to do is to set up a dynamic variable for this conversion value.

May I know what am I supposed to replace the 0.01 with?

So far I have tried finding an answer on via Google search but to no avail. This link is probably the closest (although not meant to address Facebook/Magento issues): http://printready.co/dev-and-design/setting-up-dynamic-google-conversion-values/
Basically it replaces the 0.01 with $totalValue

Just wondering what is the term in Magento that I should be replacing 0.01 with?

P.S. My code below (edited a bit for privacy issues)

Thank you very much guys!


texts: How Can a product model get its eav Attribute in Magento 2

texts:
I added a custom field to product in admin panel named vendor_name
So I wanna get value of this field by do something like

$_product->getVendorName()

Like what I can do with non eav attribute (i.e $product->getSku())
But $_product->getVendorName() give me null value ,
What is the best solution to get attribute ? I wanna same syntax for both eav and None eav attribute.


texts: Storeviews not showing the same product image after import

texts:
Hi have a issue with the following issues which are connected to one and other.

I cannot delete images programatically from my products.
Images do show on 1 view and not on the other (same store/website)

I imported the photos via this function

Here are some screenshots

Default storeview: http://cl.ly/image/0p3L102K342h

storeview1:
http://cl.ly/image/1E3E270s393D

Storeview2:
http://cl.ly/image/1u220a0R2D0w

public function UploadFoto($product, $fotos){
        $img = 0;

        foreach ($fotos as $foto) {
            Conn::log(' img:'.$foto, 'status');
            $img++;
            if(strlen($foto)>3){
                if($img==1){

                    $pathdeel = substr($foto,0,1).'/'.substr($foto,1,1);
                    $file = Mage::getBaseDir('media') . DS . 'catalog/product'. DS . $pathdeel . DS . $foto;

                    $product->addImageToMediaGallery($file, array('thumbnail', 'small_image', 'image'), true, false); //assigning image, thumb and small image to media gallery
                }else{
                    $pathdeel = substr($foto,0,1).'/'.substr($foto,1,1);
                    $file = Mage::getBaseDir('media') . DS . 'catalog/product'. DS . $pathdeel . DS . $foto;
                    $product->addImageToMediaGallery($file, array(), true, false); //assigning image, thumb and small image to media gallery
                }

            }
        }
    }


texts: Magento - Linux server DU (root) CPU spikes

texts:
I am concerned about my server as I am seeing consistent CPU spikes in New Relic caused by DU. I am not having much help from the hosting company as they keep saying it is an application problem (however I got a little bit hopeful yesterday when someone actually looked into my server and and saw my APC memory was full up as the setting was only at 38mb.)

They adjusted it to 128mb. Since then the site performance has noticeably improved and the site feels more snappy.

I have started to notice the CPU spikes again which are consistent but site performance feels fine. Again it seems to be caused by DU (I am site owner so my knowledge is limited) see screenshot:

Here is an overview of the server over last 12 hours:

APC Stats

My server has 4gb ram and settings are as follows

PHP Memory - 2048mb
APC - 128mb

Here is a screenshot from Top command.

And the new relic server graphs around time of Top screenshot

Here are my cron jobs:


texts: Convert Magento 2 frontend with angular 7?

texts: I have a eCommerce project and client want website frontend based on Angular 7 and admin panel based on magento 2. Can anyone give me expert advise how to convert complete magento 2 frontend with Angular 7?


texts: Magento 2.3, Too Many Duplications in Product Image Cache?

texts:
I've been working on improving Magento product image quality since the start of the week. I have clients spend big bucks in product photography and their photos came out pin sharp, however, after product images uploaded the Magento (currently on 2.3), all product images look really washed out. Turned out by default Magento 2 has quite aggressive image compression on both gd2 and imagemagick.

I'm still figuring out the solution, but while I was checking product image cache, I found something needs a bit attention: there are a lot of duplicated images in image cache. To be specific, after uploading just one product image, I counted 22 images in total in the cache folder:

16 images are the same size at 4k
3 images are the same size as 8k
1 image at size 32k
1 image at size 52k
1 image at size 72k

My original product image size is 232k. As you can see how much compression there is, which is outrageous from my point of view!

I'm not sure why do we need so many variations of the exact image? Are they there for good reasons or it's just poorly done? This keeps bothering me because I cannot stop thinking how much server space we've wasted for the way image cache is done; while on the other hand we aren't able to get a decent image quality we deserve. Any opinions are appreciated, thank you!


texts:
I want to sell packs of several items.

For example Pack 1 contains: item A which costs 5 USD and five times item B each for 2 USD. Price of this pack 1 would be 12 USD. Customer should not see none of it. He only should see Pack 1 for 12 USD.

I would make unique item for unique price but I need to check stock availability of item A and item B.

Can magento do it?


texts: Upgrade error: magento 2.1.3 to version 2.2.1

texts:
I have Upgraded Magento 2.1.3 to version 2.2.1 then it's giving me an error as follows:

  Exception #0 (InvalidArgumentException): Merge for content type '' is
  not supported

Please help me anyone solution for that.

Thank you so much.


texts: Want to apply set prices based on quantity in cart (tier prices for multiple products)

texts:
I sell umbrellas (different colors) and am setting up my Magento cart. I would like the pricing to be set to be:

  1 umbrella = 15.95
  2 for $25, 3 for $34.

Additional quantities above 3 would be each at the the individual price for the 3 quantity amount (11.34 each).

(I currently have each umbrella with a price of $15.95.) What kind of promotion rule in the cart would accomplish this?

Creating Tier pricing, as suggested, will not work, as I have numerous color umbrellas, each set up as separate products with a price of $15.95. Tier pricing on each color umbrella would give the discount only if, say, 3 GREEN umbrellas are purchased, but NOT if 2 GREEN and 1 BLUE are ordered.

I need the discount applied to the TOTAL Quantity in the cart using the following: 1 umbrella - 15.95, 2 umbrellas - $25, 3 umbrellas - $34, 4 or more umbrellas adds $11.34 for each additional umbrella.  Can this be done?

And, can it be done within the admin panel without the use of a plug-in?

I have tried, pretty successfully, with setting this up with three rules similar to what you now suggest. However, can you explain what the fixed discounts of 4,61 and 3,45 mean?


texts:
This is a follow up question from this question. I want to override a Zend class using composer autoload. It used to work, but not anymore.
This is content of my composer.json  file:

{
  "name": "magento/sample-module-newpage",
  "description": "A Magento 2 module that creates a new page",
  "type": "magento2-module",
  "version": "1.0.0",
  "autoload": {
    "files": [ "registration.php" ,"Zend/Date.php"],
    "psr-4": {
      "Magento\\SampleNewPage\\": ""
    }
  },
  "require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
    "magento/framework": "~100.0"
  }

}

If I run this command at root of my websit (where app,vendor,... directories exist), I get this:

composer  dumpautoload
Generating autoload files

And then nothing happens. It used to add my Date.php file to end of vendor/composer/autoload_files.php. What should I do?

P.S: Mudule is installed and is working correctly.


texts: Magento 2: Using Root Level "mini-applications" Applications When Serving Files from `pub`

texts:
Magento 2 ships with an index.php and .htaccess file in the pub folder

pub/index.php

This is good, as it allows Apache or nginx to be configured with a web root that's more secure.

However, Magento 2 also ships with an index.php file in the root project folder.  Per previous comments from internal product owners, this is to work with web hosts that don't allow users to set a different web root.

Additionally, Magento 2 also ships with a few "mini-applications" that live off the root folder.

./setup/index.php
./update/index.php

One is the GUI installer (setup). The other is something called that component manager (update), an application that's presumed to be part of Magento 2 marketplace.

Is it possible to run Magento 2 using the more secure pub mode and still access these mini applications?

Or do you need to run Magento in the less secure "root index.php"  mode to access them?


texts: Magento2 "something went wrong while saving cart price rule update"

texts:
I am using Magento 2.1.3 Enterprise Edition, and when I try to add a new update for the Cart Price Rule like below:

  Marketing -> Cart Price Rule -> Schedule New Update or Click on Edit
  already exist update from list -> then open the action tab only not
  conditions -> save

Then after it I am receiving the following error:

  Something went wrong while saving the
  Magento\SalesRule\Api\Data\RuleInterface.

Can you please help me to know what is the issue/


texts: How to change price for configurable products in Product Listing using drop down options in Magento 2

texts:
I have created custom module in magento2, and I want to show configurable products options in the drop-down for the configurable product.

I have done using custom code, but problem is that when I change option for configurable product price does not change anything.

Could you please let me know what we need to do  to show change price on the change that related drop down.

<form data-product-sku="<?= /* @NoEscape */ $product->getSku() ?>"
      action="<?= /* @NoEscape */ $block->getSubmitUrl($product) ?>" method="post"
      id="product_addtocart_form"<?php if ($product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
    <input type="hidden" name="product" value="<?= /* @escapeNotVerified */ $product->getId() ?>" />
    <input type="hidden" name="selected_configurable_option" value="" />
    <input type="hidden" name="related_product" id="related-products-field" value="" />

    <?= $block->getChildHtml('form_top') ?>
    <?php if (!$block->hasOptions()):?>
        <?= $block->getChildHtml('product_info_form_content') ?>
    <?php else:?>
        <?php if ($_product->isSaleable() && $block->getOptionsContainer() == 'container1'):?>
            <?= $block->getChildChildHtml('options_container') ?>
        <?php endif;?>
    <?php endif; ?>

     <?= $block->getBlockHtml('formkey'); ?>

    <?php if($product->getTypeId() === 'configurable') : ?>
        <?php foreach($product->getTypeInstance()->getConfigurableAttributes($product) as $attribute) : ?>

                <label class="label" for="attribute<?php echo $attribute->getAttributeId(); ?>"><?php echo $attribute->getLabel() ?>
                <?php $values = $attribute->getOptions(); ?>

                    <select id="attribute<?php echo $attribute->getAttributeId() ?>" name="super_attribute[<?php echo $attribute->getAttributeId() ?>]" class="super-attribute-select upsell_options" data-validate="{required:true}">
                        <option value="">Choose an Option...</option>
                        <?php foreach($values as $value): ?>

                            <option value="<?php echo $value['value_index'] ?>" ><?php echo  $value['label'] ?></option>

                        <?php endforeach; ?>

                    </select>

        <?php endforeach; ?>

        <?php

        ?>
      <?php endif; ?>

    <?= $block->getChildHtml('form_bottom') ?>
</form>


texts: Magento 2, Can we import 10K product of csv at once

texts:
I have a client who wants to import the 10k product at once, He is saying that he has done it earlier, but I don't think it is possible, I have never seen that much of products to get imported at once.

So, please help me and suggest, how can I make it possible by any means necessary.
Any suggestions will also be helpful.
Thank you


texts: url to find file path in admin dashboard

texts:
where should i look for this file in project directory as i'm in this url index.php/admin/qquoteadv/edit/id/125/key/random-key

I couldn't find a qquoteadvController & editAction.


texts: I have created a Magento (1.9) store and I want other people to be able to upload and manage their own products. Is this possible using the Users/Roles in Magento or is there any other way to achieve this?


texts: How to know magento 1.9 version Using MySql?

texts:
I am having Magento1 Database details.
Using that can we get the version of Magento?

I found it can get with files or with some custom code. I am looking to get from the Database. In which table does it store the version?

Please, anyone, suggest the answer.


texts: Magento 2 Express Shipping Configuration

texts:
So we currently have setup a number of shipping rules that change the default shipping price for different ranges of products.
However we are now looking to add an express shipping option that is only available for a certain range of products, not all the products in the store. Is there a way to do this? I've been looking into using Table Rates but I don't see how we would limit this to one set of products rather than the whole store.
Ideas welcome!


texts: price_index table indexes wrong max_price?

texts:
We're currently experiencing a strange behaviour with the price_index table. We're having grouped products with several simple products associated, e.g.

Grouped product

Associated product 1 - 25,93€
Associated product 2 - 26,96€

For whatever reason the price_index table indicates the max_price as 49,74€ for that particular product. The $this->getLoadedProductCollection() SQL query results in showing what I suspected: http://screens.schloebe.biz/image_2013-06-04_09_32_41_001.png

A re-index didn't help as for indicating the max_price as the actual highest price of all associated products as for my understanding.

Sorry that I can't give you more info at this time, but I'm not getting what might be wrong with the price indexing mechanism (or is  there something I don't get?).

I'll help with any info neccessary. Thanks!


texts:
In the Magento backend, under System -> Configuration -> Advanced -> Developer -> JavaScript Settings -> Merge JavaScript Files, I set the field value to yes and enabled the Magento merge js. However, by activating this resource, the pages end up having changes in the load and its functionality, since one of the links containing the mined script has the defer parameter, which ends up loading the script after the page is already loaded, script contains other scripts of utmost importance to the functioning of the page.

Example script with defer parameter:

<script type="text/javascript" src="http://url_site/media/js/e921b7a36672e6f60a2f83a84d5f507e.js" defer></script>

I would like to know how to proceed so that you can remove this parameter from the script so that the pages work correctly. Even after researching a lot, I've got a lot of information, but none of them are focused on solving that problem.


texts: Customer Can't log in and have tried with formkey

texts:
Customer Can't log in only if i register a new user it automatically goes to my account.
However if i try to login with a existing user it refreshes the page.

I already tried to insert <?php echo $this->getBlockHtml('formkey'); ?> into the different login.phtml

that didn't work so i tried with <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />

right below the  tag and that didn't work either.

Any suggestions?


texts: Product with 0 inventory should be shown in PDP but must not get selected on clicking on them,

texts:
I wanted the different sizes to be shown on the PDP of my website, but if the product has 0 inventory art the back end it should show a cross sign over it so that it clarifies that it cannot be selected
eg: s=2m=1
l=0
xl=0

thus XL AND L size should show a cross on them making it visible to the users that the product is out of stock.

Please check and revert soon.my magento version is 1.9.3

Regards


texts: Save updated configurable product attribute to all associated products

texts:
I'm trying to extend Magento to where, when I update a custom attribute for a configurable product, it saves it to the corresponding custom attribute for all of its associated products. I've got an observer that watches the catalog_product_save_after event but I'm not exactly sure where to proceed in order to get it to save it to the associated products. I've looked at a lot of solutions here and other sites that deal with programmatically creating a configurable product and it's assocaited products, but nothing that does what I need. Any help would be greatly appreciated.

EDIT: Here's the final code I ended up with:

public function copyAttribute($observer) {
        try {
            // get the event product
            $product = $observer->getEvent()->getProduct();

            // check to see if product is configurable
            if ($product->getData('type_id') === 'configurable') {

                // get associated products
                $associated = $product->getTypeInstance(true)->getUsedProducts(null, $product);

                // create attribute array
                $feedArray = array('feedprice1', 'feedprice2', 'feedprice3');

                // loop through associated products and save configurable products changed value
                foreach ($associated as $associate) {
                    foreach ($feedArray as $feed) {
                        $associate->setData($feed, $product->getData($feed));
                        $associate->getResource()->saveAttribute($associate, $feed);
                    }
                }
            }
        }

        // log any errors
        catch (Exception $e) {
            Mage::log(print_r($e->getMessage(), 1), 'null', 'product-attribute-update.log');
        }
    }


texts:
I'm trying to remove the description block via:

  app/design/vendor/module/Magento_Catalog/layout/catalog_category_view.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="content">
        <block class="Magento\Catalog\Block\Category\View"
               name="children_category_imgs"
               template="category/children_category_imgs.phtml"
               before="category.products"/>
    </referenceContainer>

    <referenceBlock name="catalog.compare.sidebar" remove="true"/>
    <referenceBlock name="category.image" remove="true"/>
    <referenceBlock name="category.description" remove="true"/>
</body>

  vendor\magento\module-catalog\view\frontend\layout\catalog_category_view.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="columns.top">
        <container name="category.view.container" htmlTag="div" htmlClass="category-view" after="-">
            <block class="Magento\Catalog\Block\Category\View" name="category.image" template="Magento_Catalog::category/image.phtml"/>
            <block class="Magento\Catalog\Block\Category\View" name="category.description" template="Magento_Catalog::category/description.phtml"/>
            <block class="Magento\Catalog\Block\Category\View" name="category.cms" template="Magento_Catalog::category/cms.phtml"/>
        </container>
    </referenceContainer>
....
</page>

I have sucessfully removed the image using the same method.


texts: Magento2 - Attribute taking 0 as default value

texts:
I have a strange issue and not sure what is wrong, I have identical attributes (see image below), but the strange part is when I keep Metal 02 Weight blank and save the product its taking 0 value automatically, while this is not happening with Metal 01 Weight, can anyone help me how to find out the reason.
I have cleared / flushed all caches, all indexes are reindexed, completely removed generated , static folders and recompiled everything, still no effect.


texts: magento 2 : show all attributes after filters in layered navigation

texts:
I want to show all attributes and their options after filter applied.

so what I want is Filter should remain same it is after filter applied.


texts: Magento 2 duplicate PHPSESSID cookie when using session_start() in custom php script

texts:
I have custom php script that is called with ajax. It must be stand-alone script to save spent resources because it is called 1-3 times per each page load. Init Magento for each ajax call would cause server overload.

In that stand-alone script I use session so I start it with session_start().

Problem:
Some customers (in rare cases) reported that it removes products from cart and starts new session when ajax call to this script is loaded. I could not reproduce the problem on my side, but I suspect this is the problem:

As you can see in the image, it will create another PHPSESSID cookie. I read that modern browsers should not care about the leading dot, but here it will duplicate cookie.

Does anybody have any hint why this happens?


texts: Magento Fedex shipping methods displaying “Sorry, no quotes are available for this order at this time”

texts:
I'm using Magento version 2.2.5. I am having this problem when checkout, it keeps displaying

  "Sorry, no quotes available for this order at this time"

in Fedex shipping method.

When we select country India it show - Sorry, no quotes available for this order at this time.I entered the right address, right zip-code and also the right country.

I used test credentials of FedEx account

Select other countrey like - Australia work fedex and Flat rate shipping


texts: Programatically get product rating and review in magento 2 product collection

texts: How can programatically get product rating and review in product collection in Magento 2.


texts: Magento 2: How to create user defined option for checkbox in bundle product

texts:
I am trying to create "user-defined" option for the checkbox in bundle product.

Is there any plugin in the market or anyone can help me with coding?


texts:
class Crud_Pro_Block_Pro extends Mage_Core_Block_Template { } Fatal
  error: Class 'Crud_Pro_Block_Pro' not found in
  D:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Layout.php on
  line 491


texts:
Magento\Catalog\Pricing\Render\FinalPriceBox I want to rewrite this file and I have done this code but not working

  Custom\Outofstock\etc\di.xml

<preference for="Magento\Catalog\Pricing\Render\FinalPriceBox" type="Custom\Outofstock\Pricing\Render\FinalPriceBox" />

  Custom\Outofstock\Pricing\Render\FinalPriceBox.php

    <?php
     namespace Ec\Outofstock\Pricing\Render;

     use Magento\Msrp\Pricing\Price\MsrpPrice;
     use Magento\Framework\Pricing\Render\PriceBox as BasePriceBox;

    class FinalPriceBox extends \Magento\Catalog\Pricing\Render\FinalPriceBox
    {
        protected function _toHtml()
       {
            $result = parent::_toHtml();

            if(!$result) {
                $result = BasePriceBox::_toHtml();
                try {
                /** @var MsrpPrice $msrpPriceType */
                $msrpPriceType = $this->getSaleableItem()->getPriceInfo()->getPrice('msrp_price');
            } catch (\InvalidArgumentException $e) {
                $this->_logger->critical($e);
                return $this->wrapResult($result);
            }

            //Renders MSRP in case it is enabled
            $product = $this->getSaleableItem();
            if ($msrpPriceType->canApplyMsrp($product) && $msrpPriceType->isMinimalPriceLessMsrp($product)) {
                /** @var BasePriceBox $msrpBlock */
                $msrpBlock = $this->rendererPool->createPriceRender(
                    MsrpPrice::PRICE_CODE,
                    $this->getSaleableItem(),
                    [
                        'real_price_html' => $result,
                        'zone' => $this->getZone(),
                    ]
                );
                $result = $msrpBlock->toHtml();
            }

            return $this->wrapResult($result);
        }

        return $result;
    }
}


texts: Magento 2 Custom grid join with product table filter is not working

texts:
I've created a custom grid using Ui Component, In my custom table I have a product_id, So instead of showing the product_id, I like to show the product name in my grid so that I have added the below code into my collection class.

protected function _initSelect()
    {
        parent::_initSelect();
        $this->getSelect()->joinleft(
            array('cpev' => $this->getTable('catalog_product_entity_varchar')),
            'main_table.product_id = cpev.entity_id and cpev.attribute_id=84',
            array('product_name'=>'value')
        );
        $this->getSelect()->order('main_table.id desc');
        return $this;
    }

Then in my Ui component XML file, I added the product_name column as like follow

<column name="product_name">
        <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="sortOrder" xsi:type="number">150</item>
                    <item name="label" xsi:type="string" translate="true">Product Name</item>
                </item>
            </argument>
 </column>

Now in the grid, the product name is showing, but when I filter the product name I got the below log in exception.log file

Column not found: 1054 Unknown column 'product_name' in 'where clause', query was: SELECT COUNT(*) FROM `product_qa` AS `main_table`
 LEFT JOIN `catalog_product_entity_varchar` AS `cpev` ON main_table.product_id = cpev.entity_id and cpev.attribute_id=84 WHERE (`product_name` LIKE '%mi%')

The problem is the product_name columns is not exist in my customizable, So I want some input to accomplish the filter in my custom grid using the product name columns.

Thanks in advance for your better support.


texts:
In the product list, I show the manufacturer and everything works fine. But when I make a search, instead of showing the manufacturer’s name it shows No. I use the following code to show the brands :

$_product->getResource()->getAttribute('manufacturer')->getFrontend()->getValue($_product)

I'm using magento 1.7.0.2.


texts:
I am trying to edit the product edit page (first tab) in Magento and would like to move the quantity (as well as a few other things) from their respective tabs up to the first page. I see

<form action="<?php echo $this->getSaveUrl() ?>" method="post" id="product_edit_form" enctype="multipart/form-data">
<?php echo $this->getBlockHtml('formkey')?>

</form>

and know that the code for the quantity textbox is

        <?php echo Mage::helper('catalog')->__('Qty') ?>*

            <?php if (!$_readonly):?>
            <input type="hidden" id="original_inventory_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][original_inventory_qty]" value="<?php echo $this->getFieldValue('qty')*1 ?>"/>
            <?php endif;?>
            <input type="text" class="input-text required-entry validate-number" id="inventory_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][qty]" value="<?php echo $this->getFieldValue('qty')*1 ?>" <?php echo $_readonly;?>/>

        <?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?>

Does anyone know where the code for the first tab is? Does it have something to do with formkey?

Thanks!


texts: Magento 2 : Is there a way to query products using Custom Attributes in Rest API Call?

texts:
I have a custom attribute setup for Books called isbn_13

Now I try to find the products using the isbn_13 values but unable to filter the results based on this. Is there any way to do this?

Update: I am trying to do this via RestAPI

Here is the rest URL I have used while querying:

https://www.mysite.in/rest/all/V1/products/?searchCriteria[filterGroups][0][filters][0][field]=attribute_code&searchCriteria[filterGroups][0][filters][0][value]=isbn_13&searchCriteria[filterGroups][0][filters][0][conditionType]=eq&searchCriteria[sortOrders][0][field]=name&searchCriteria[sortOrders][0][direction]=ASC&searchCriteria[pageSize]=10&searchCriteria[currentPage]=1

Somehow I feel like I am missing something.


texts: How can I set a value in core_config_data with Magento 2 programmatically?

texts:
I know you can set config data in Magento 1 with:

Mage::getModel('core/config')->saveConfig('my/path/whatever', $value);

and you can get config data in Magento 2 with:

protected $_scopeConfig

public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig) {
    $this->_scopeConfig = $scopeConfig;
}

+

$this->_scopeConfig->getValue( 'path/of/config', \Magento\Store\Model\ScopeInterface::SCOPE_STORE );

But I can't figure out, how I can save config data in Magento 2


texts:
I'm using a modal to show conditions for subscribing to a newsletter list. But I'm having trouble translating the title when initializing the modal inside a phtml file.

The modal opens normally, but seems the mage/translate component doesn't successfully translate the title.

If I use title: <?php echo _('Test string') ?> it will translate normally, but shouldn't using $.mage.__('Test string') also work?

This is what I have in phtml:

    <script>
    require([
        'jquery',
        'Magento_Ui/js/modal/modal',
        'mage/translate'
    ], function ($, modal) {
        var options = {
            type: 'popup',
            modalClass: 'newsletter-conditions-modal',
            responsive: true,
            innerScroll: true,
            title: $.mage.__('Test string'),
            buttons: []
        };
        $(function () {
            $('.newsletter-conditions').on('click',function() {
                $(".newsletter-conditions-content").modal(options).modal('openModal');
            })
        });
    });
    </script>

And this is what I have in my csv translate file:

Test string,Test string 2,module,Magento_Ui

Can anyone tell me why this isn't working?


texts:
When I run indexer:status from the command line to look at the status of my indexes I notice some are like this:
| Catalog Product Rule | Ready  | Schedule  | working (7414 in backlog) | 2019-02-19 01:37:48 |

What does working xxxx in backlog mean? Is this something I should be worried about. 3 of my indexes are reporting that atm.
What table is the backlog in or where does this backlog reside? The last question// Is it safe to truncate the cron_schedule table?


texts: latest product with add-to-cart in home page

texts:
I'm new for Magento. I need to display latest added product in home page. I'm using following code in 2columns-left.phtml

<?php echo $this->getChildHtml('breadcrumbs') ?>

        <?php echo $this->getChildHtml('global_messages') ?>
        <?php echo $this->getChildHtml('content') ?>
        <?php
            $productsCollection = Mage::getModel("catalog/product")->getCollection()
                               ->addAttributeToSort("entity_id","DESC")
                               ->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInSiteIds())
                               ->setPageSize(6)
                               ->setCurPage(1);
            foreach ($productsCollection as $product) {
                $model = Mage::getModel('catalog/product')->load($product->getId());
                echo $model->getName().'
';
                echo $model->getPrice().'
';
                echo $model->getImageUrl().'
';
                echo "

";
            }
        ?>

It's working fine. But I can't correct code for add-to-cart option.

I found fllowing code from addtocart.phtml with script,

<?php $_product = $this->getProduct(); ?>
<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form">
<?php $buttonTitle = $this->__('Add to Cart'); ?>
<?php if($_product->isSaleable()): ?>

        <?php if(!$_product->isGrouped()): ?>
        <?php echo $this->__('Qty:') ?>
        <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
        <?php endif; ?>
        <button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><?php echo $buttonTitle ?></button>
        <?php echo $this->getChildHtml('', true, true) ?>

<?php endif; ?>
</form>

But, if I click add-to-cart, going to home page.

Please, help me.


texts: getting error on sending email to multiple recipients in magento 2

texts:
Exception #0 (Magento\Framework\Exception\RuntimeException): Type
  Error occurred when creating object:
  Magento\Framework\Mail\EmailMessage

$store = $this->_storeManager->getStore()->getId();
$transport = $this->_transportBuilder->setTemplateIdentifier('send_email_email_template')
    ->setTemplateOptions(['area' => 'frontend', 'store' => $store])
    ->setTemplateVars(
        [
            'store' => $this->_storeManager->getStore(),
        ]
    )
    ->setFrom('general')
    ->addTo(['name@gmail.com','name2@gmail.com'])
    ->getTransport();
$transport->sendMessage();

but on sending email to a single recipient

->addTo('test@gmail.com')

it sends without any load.

Magento Bug:

https://github.com/magento/magento2/issues/24984


texts: Magento 2: Missing Default Inventory Stock and Source

texts: While running the Magento indexer commands I received this error:  No linked stock found. After checking the backend I realised that there is no default inventory stock entry or source. I am running Magento 2.3.2 recently upgraded from Magento 2.2.6 Any ideas why this is happening?


texts: how to link product images on homepage/category page to product page

texts:
For this site I need the product images from the homepage or the category page to link to the product. Right now when you click on a product image it doesn't link to the product page. It does nothing. You have to click the name of the product in order to get to the product page. Anyone know a way to do this with reference to where to put the necessary code. I was thinking something with xml files but i am not sure which file and where it is located....

Thanks for the help...


texts: Link to Order Detail from Order Confirmation Email

texts:
I'd like the customer to be able to click a link from their order confirmation email that leads them to the order detail page on the website.

Is this possible out-of-the-box? If not, how would you recommend building this out?

Edit: could a valid solution involve just linking to /sales/order/view/order_id/[order id here]?


texts: Error while moving category in Magento 2 admin panel "There was a category move error"

texts: This error occurred while updating category position in admin panel.


texts: SUPEE 5344 patch seems to download Enterprise Edition patch

texts:
When trying to download the patch SUPEE 5344 for CE 1.7.x from https://www.magentocommerce.com/download the patch has a header which seems to say it's a patch for EE 1.12.

  SUPEE-5345 | EE_1.12.0.2 | v1 | 2d36f61cf684ed26286b6d10307fcb99dd47ff02 | Thu Feb 5 19:39:01 2015 +0200 | v1.12.0.2..HEAD

Is this is a mistake on the behalf of Magento, and where can I find the patch for CE?

Update: To make clear, this is not a problem with the filename of the patch, I'm aware SUPEE-5344 changes to 5345 when downloading for CE 1.7.x, the problem comes when you open the file and see the file is intended for Magento EE 1.12


texts: Paypal IPN notification is not working:: 500 Error

texts:
I am facing an issue with Paypal IPN message in Magento 1.8.1. When I placed the order with Paypal the Order status still shows Pending even I have set the IPN notification URL to http://www.devdomain.com/paypal/ipn/. Also try to place the IPN script in my root folder but no success. :(

I am using Paypal Standard. When I see inside the Paypal it shows 500 error in IPN history page.

Please advise how I can resolve this issue.


texts: Change date format from Calendar Widget magento 2.2.1

texts:
I want to change the date format of admin grid filters to "dd/mm/yy" format, but I could not make it work, I try this solution unsuccessful, the xml files are different in 2.2.1 magento version.

I have noticed that when the locale configurations setted with date format in "dd/mm/yy", all the widget calendars in forms, get the configuration, but the filter forms, in grids, still with "mm/dd/yy" format, which is not compatible with the locale configurations, so, how can I change the filter date field format?

Thanks in advance.


texts:
http://devdocs.magento.com/guides/v2.1/install-gde/docker/docker-over.html

I am using devbox into window 10, and it is working fine, but one question, how to share code between virtual machine and window.

So easily manage code between virtual machine and my code, by using that way i want to speed my development into window.


texts: check if price is being displayed tax included

texts: I am overriding the price.phtml template because I need to display a label. When in the backend, the "Tax Display Type" setting catalog products is set to 'Tax Included' but I don't know how to perform this check.


texts:
I need to upgrade magento 1.9.3 to 2.3. I have read the migration process at magento docs and other sites.

Now I have a few questions- 1.

Magento 2.3 requires php 7 while our magento 1.9 does not support php 7. I have found a patch but I am not confident about this as I do not want to distrub the running site. Should I try this patch?

2.

We can move to a new server also if that makes things easier. Should I try to install this in a new folder at the present server and later redirect it to the new installation or install at new server and change the dns?

What will you suggest? I am in a position to do both of them.

Thanks a lot for your time.


texts: Where is the definition of $mailer->send(); in magento

texts:
the following statement expires my page in the class when saving shipment.
the statment is:

$mailer->send();

Expires in this class when the shipment is saved and try to send email to the customer

class Mage_Sales_Model_Order_Shipment extends Mage_Sales_Model_Abstract

I want to debug why it is expiring my page. Where is the definition of the function or any other way to display the error message?

EDIT:
When I am trying to create shipment for an order, the page throws this error:

"Request Timeout

This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'."

When I Investigate the problem by exploring the code, I reach $mailer->send();, the issue is not of the php max time expire, it always display this message on the same statement for some orders. I logged the timing also but the timing is not the issue. It expires on the same statement again and again also the email is not sending to the customer.

This issue appears for amazon orders only.


texts:
I have created an online store and there are already some products added as the demo and I've also added some products but these are not showing on the homepage of my website.
They do appear when I search them on search bar but my main page of the website doesn't show any products
you can also check www.tedifier.com
I don't have a lot of knowledge about Magento so please answer in simple words


texts:
I am not able to set qty increments as decimal (example 0.5) for product.
can anyone help me on that.


texts: Magento 2 from which file shipping methods displaying

texts: I am trying to change checkout page on shipping methods display pattern. According to template path hints i checked onepage.phtml in that i did't get the related script.In which file i have to check. can u please any one help in this


texts: Magento 2: How to defaultly open "content 2" tab?

texts:
I am using  accordion for tab open and close.How to open default "content 2" tab?

title 1

content 1

title 2

content 2

title 3

content 3


texts: Product Attribute Shipping Fee - Catalog Input Type for store owner - price

texts:
Admin has made
Product Attribute - Shipping Fee
Attribute Property
Catalog Input Type for Store Owner - Price
This product attribute will be shown at the time of product adding to admin or vendor in admin dashboard or vendor dashboard panel.
If admin or vendor write Shipping Fee = Rs 8 or $ 8 at the time of product adding
will this Shipping Fee amount will be added as shipping fee in the shopping cart with product price when customer add this product to cart ?
Screenshot 1 - http://prnt.sc/uaxh4b


texts:
How can I override a sidebar.phtml from:

  module-weee/view/frontend/templates/checkout/cart/item/price/sidebar.phtml

I have tried in the following ways:

<referenceBlock name="checkout.cart.item.price.sidebar" template="Eone_GiftProducts::cart/item/price/sidebar.phtml" />

AND

<referenceBlock name="checkout.cart.item.price.sidebar">
    <arguments>
      <argument name="template" xsi:type="string">Eone_GiftProducts::cart/item/price/sidebar.phtml</argument>
    </arguments>
</referenceBlock>

I have tried even with actions tag for setTemplate call but no success

I have tried to remove this block and re add it with my custom template but there is no way to makes him work.

I also tried to makes this change into checkout_cart_sidebar_item_price_renderers handle but with no success.

I must do it for displaying the original price above the price that was displayed in a cart for gift products, I was able to do it on checkout and checkout/cart pages but not able to do it for minicart component.
If i modify directly sidebar.phtml from module-checkout it works like a charm but I cant modify core files.


texts:
Product stock quantity in Magento 1.9

If a customer check out the product.

Without payment The product stock quantity is -1 or in the current value.


texts:
The following Magento1 code gets me a JSON string of all country regions (states, provinces, cantons, etc.)

Mage::helper('directory')->getRegionJson()

What is the equivalent code in Magento2?


texts: How to add text to URL so pages reflect only in stock options when in Magento 2

texts: Currently, on my site when I access product pages, the product counts reflect both in and out of stock options.  I would like when those product pages are loaded, the url changes to add '?stock=1' to the end of the url so that the counts reflect only in-stock options.  The page is also being filtered using AJAX, so I need to keep the url addition throughout the filtering process by the user.


texts:
The magento 2 checkout page fills in the shipping adress function disappears, how to set it up to show it?
The user is unable to fill in the shipping address!
This is my site, you can try it! supwatch.com


texts: Is It possible to add custom block in CMS pages?

texts:
I made an extension and place block for specific CMS pages, How Can I Place my block in CMS pages?
I am trying to enable extension from admin and select specific CMS pages then block should be displayed.

    <referenceBlock name="cms_page">
        <block name="pindemocms" class="Kitesky\PinterestBlock\Block\Display\Display" template="Kitesky_PinterestBlock::getpin.phtml">
            <arguments>
                <argument name="pintresetbck" xsi:type="string">pintresetbck</argument>
            </arguments>
        </block>
    </referenceBlock>
</body>


texts: Magento 2 - How to reload cart summary section

texts:
I try following js code to reload cart summary section.

 <script>
     require(['jquery',
             'jquery/ui',
             'Magento_Checkout/js/model/quote',
             'Magento_Checkout/js/model/cart/totals-processor/default'
     ], function($,
                 quote,
                 totalsDefaultProvider){
         "use strict";
           jQuery(document).ready( function() {
               jQuery(".item_shipping").change(function(){
                   alert("Page loaded.");
                   totalsDefaultProvider.estimateTotals(quote.shippingAddress());
               })
           });
       });

  Following error give on console
   TypeError: options is undefined  return
   $.getJSON(options.sectionLoadUrl, parameters).fail(function (jqXHR) {


texts: Magento 2 : State dropdown showing regionID is required field

texts:
I am using magento 2.1. On Admin side on order creation page, some specific countries have states in dropdown. I need to show state dropdown for India country. For this purpose I have fired following 2 queries.

INSERT INTO `directory_country_region` VALUES
(548 , 'IN', '35','Andaman Nicobar'),
(549 , 'IN', '28','Andhra Pradesh'),
(550 , 'IN', '12','Arunachal Pradesh'),
(551 , 'IN', '18','Assam'),
(552 , 'IN', '10','Bihar'),
(553 , 'IN', '04','Chandigarh'),
(554 , 'IN', '22','Chhattisgarh'),
(555 , 'IN', '26','Dadra Nagar Haveli'),
(556 , 'IN', '25','Daman Diu'),
(557 , 'IN', '07','Delhi'),
(558 , 'IN', '30','Goa'),
(559 , 'IN', '24','Gujarat'),
(560 , 'IN', '06','Haryana'),
(561 , 'IN', '02','Himachal Pradesh'),
(562 , 'IN', '01','Jammu Kashmir'),
(563 , 'IN', '20','Jharkhand'),
(564 , 'IN', '29','Karnataka'),
(565 , 'IN', '32','Kerala'),
(566 , 'IN', '31','Lakshadweep'),
(567 , 'IN', '23','Madhya Pradesh'),
(568 , 'IN', '27','Maharashtra'),
(569 , 'IN', '14','Manipur'),
(570 , 'IN', '17','Meghalaya'),
(571 , 'IN', '15','Mizoram'),
(572 , 'IN', '13','Nagaland'),
(573 , 'IN', '21','Odisha'),
(574 , 'IN', '34','Pondicherry'),
(575 , 'IN', '03','Punjab'),
(576 , 'IN', '08','Rajasthan'),
(577 , 'IN', '11','Sikkim'),
(578 , 'IN', '33','Tamil Nadu'),
(579 , 'IN', '36','Telangana'),
(580 , 'IN', '16','Tripura'),
(581 , 'IN', '09','Uttar Pradesh'),
(582 , 'IN', '05','Uttaranchal'),
(583 , 'IN', '19','West Bengal');

Second Query :

INSERT INTO `directory_country_region_name` (`locale`, `region_id`, `name`) VALUES
('en_US',548,'Andaman Nicobar'),
('en_US',549,'Andra Pradesh'),
('en_US',550,'Arunachal Pradesh'),
('en_US',551,'Assam'),
('en_US',552,'Bihar'),
('en_US',553,'Chandigarh'),
('en_US',554,'Chhattisgarh'),
('en_US',555,'Dadar and Nagar Haveli'),
('en_US',556,'Daman Diu'),
('en_US',557,'Delhi'),
('en_US',558,'Goa'),
('en_US',559,'Gujarat'),
('en_US',560,'Haryana'),
('en_US',561,'Himachal Pradesh'),
('en_US',562,'Jammu and Kashmir'),
('en_US',563,'Jharkhand'),
('en_US',564,'Karnataka'),
('en_US',565,'Kerala'),
('en_US',566,'Lakshadweep'),
('en_US',567,'Madhya Pradesh'),
('en_US',568,'Maharashtra'),
('en_US',569,'Manipur'),
('en_US',570,'Meghalaya'),
('en_US',571,'Mizoram'),
('en_US',572,'Nagaland'),
('en_US',573,'Odisha'),
('en_US',574,'Pondicherry'),
('en_US',575,'Punjab'),
('en_US',576,'Rajasthan'),
('en_US',577,'Sikkim'),
('en_US',578,'Tamil Nadu'),
('en_US',579,'Telangana'),
('en_US',580,'Tripura'),
('en_US',581,'Uttar Pradesh'),
('en_US',582,'Uttaranchal'),
('en_US',583,'West Bengal');

After firing above queries, on order page, in country dropdown when I select India, state dropdown is getting populated. But when I select state and fills other required info and submits page, it is showing me following error.

  "regionId is a required field."

Not able to fix this issue. Kindly help if anyone knows.


texts: Element 'css': This element is not expected. in Magento 2.2.5 (upgraded from Magento 2.1.9)

texts:
1 exception(s):
  Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'css': This element is not expected.
  Line: 542 facing this issue in 2.2.5.

I have upgraded from Magento 2.1.9 to Magento 2.2.5 version.

Please help me guys.


texts: How to upload mp4 video using wyswing editor in Magento 2

texts:
I have added wyswing editor in my custom module. From there, I want to allow to upload mp4 video from that editor.
How can I do that?
Any one please help me.


texts: Element 'block': This element is not expected : magento2

texts:
I have created one extension it is not working in my custom magento application(2.2.4) but it is working fine in default magento2.2.4.

I am getting error because of below code
defaul.xml code:

<head>
<block class="HK\Hplus\Block\CheckIframe" name="hplus_checkiframe" template="HK_Hplus::checkiframe.phtml"/>
</head>

============

  Exception #0 (Magento\Framework\Config\Dom\ValidationException):
  Element 'block': This element is not expected. Expected is one of (
  title, css, link, meta, script, remove, attribute ). Line: 715

When i run my page it is throwing above error
I have disabled all third party extension still getting this issue.
Same extension working fine in native magento.


texts: How do I remove the (required) Phone Number input from the Checkout page? I don't need my customers to enter their number and don't want it to put them off from checking out.


texts: Magento2 - Call to the empty Gift message object causes the observer class to fail

texts:
I'm trying to edit an associative array containing order info.

This array for our backend application gets created under sales_order_place_after event once the order is placed .Everything works as expected except when the order is placed with empty gift message.

Another event sales_order_save_after being used to only fetch the gift message fails when the order is placed without any optional gift message.

Order gets placed successfully, and the second observer class gets the control but fails when the execution reaches this line of code !empty($this->_orderGiftRepo->get($order->getId())) Any help/suggestion is greatly appreciated.


texts: Magento 2.3 requirejs-config.js is empty on production mode

texts: After setting Magento 2 to production mode, Magento generated all the static files in pub/static/frontend/Vendor/theme/en_US except for the requirejs-config.min.js file, the file exists but its empty and some js files are returning 404 in browser, copying the generated file from when the server was on default mode (generated on the fly) and pasting it in requirejs-config.min.js once the server is on production mode, fixes the 404 files issue but the solution is a hack. any idea why Magento is not generating the file in any directory (fr_FR,en_US).


texts: Does anyone know a simple Magento 2 module which enables Ajax in the layered navigation?


texts: Magento 2 - Custom block won't show in layout

texts:
I made a custom module to display store information like phone, address, etc.

I'm overriding the blank theme's default.xml layout with my theme in \app\design\frontend\MyVendor\MyTheme\Magento_Theme\layout\override\base\default.xml (which is working as far as I can tell), and inserting my custom block there (and it isn't being recognized). I also tried using a layout extension with my module in \app\code\MyVendor\Custom\view\frontend\layout\default.xml but that isn't being recognized either.

Here is my override default.xml file with my custom block:

<referenceContainer name="header.container">
    <container name="header.panel.wrapper" htmlClass="panel wrapper" htmlTag="div" before="-">
        <container name="header.panel" label="Page Header Panel" htmlTag="div" htmlClass="panel header">
        ...
        <block class="MyVendor\Custom\Block\Phone" name="custom.phone" template="MyVendor_Custom::phone.phtml"/>
        ...
        </container>
    </container>
</referenceContainer>

The phone.phtml file is located in \app\code\MyVendor\Custom\view\frontend\templates. The code is just:

<?php echo $block->getPhoneNumber(); ?>

xxxxxxxxxxxxxxxxxxxx

The Phone.php file is located in \app\code\MyVendor\Custom\Block. The code:

<?php

namespace MyVendor\Custom\Block;

use Magento\Framework\View\Element\AbstractBlock;

class Phone extends AbstractBlock
{
    public function getPhoneNumber()
    {
        return $this->_scopeConfig->getValue(
            'general/store_information/phone',
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE
        );
    }
}

The module is recognized and active. I guess the path to the phone.phtml template is wrong, but I can't figure out why!


texts:
I have referred several blogs which explains CRUD functionality, some of the blogs write code like saving a model, in a Controller and some in a Block.

Blogs CRUD functionality in Block :

  http://alanstorm.com/magento_2_crud_models_for_database_access/
  http://excellencemagentoblog.com/blog/2016/04/04/magento2-crud-module-development-series-part3/

Blogs CRUD functionality in Controller :

  https://www.ashsmith.io/magento2/module-from-scratch-part-5-adminhtml/
  https://stackoverflow.com/questions/31988661/magento-2-insert-data-into-database

I am bit confused which Magento 2 standard should I adopt?

I use Magento Version 2.1.7.


texts: How to get product details using product ID magento2 REST API

texts: I need one help. I need to fetch the product details by product ID using REST API magento-2. I searched many API but its taking the sku value to give the product details. Here My requirement is to get all details using the product ID.


texts: Magento 2 : issue with service class of API (Message: Notice: Undefined index: entity_id)

texts:
this is error:

  var//log/debug.log:[2019-12-10 10:59:36] main.CRITICAL: Report ID:
  webapi-5def7a98e911d; Message: Notice: Undefined index: entity_id in
  /Applications/MAMP/htdocs/Magento2_3/app/code/SimplifiedMagento/Custom2/Model/PositionRepository.php
  on line 46 {"exception":"[object] (Exception(code: 0): Report ID:
  webapi-5def7a98e911d; Message: Notice

This is my service method:

public function getDetails($email)
        {
            $emailId = $email;
           $customer = $this->customerFactory->create();
         $arr =  $customer->getCollection()->addFieldToSelect(['entity_id'])->addFieldToFilter('email',$emailId)->getData();
           $entityId = $arr['entity_id'];

           //entity id is above

           $customTable = $this->addDataFactory->create();
          $array = $customTable->getCollection()->addFieldToSelect(['position'])->addFieldToFilter('customer_id',$entityId)->getData();
            $position = $array['position'];
            $obj = $this->positionInterfaceFactory->create()->setPosition($position);
            return $obj;
        }
}


texts:
I need a script that will check all magento products and set them to instock if the qty is greater than 0.

The plan is to run this as a scheduled cronjob so that it will be checking for any products that have their stock value incorrectly set.

My code is rather crude so far but here is what i have come up with:

<?php PHP_SAPI == 'cli' or die;
ini_set('memory_limit','1024M');
set_time_limit(0);
error_reporting(E_ALL | E_STRICT);
require_once '../app/Mage.php';
umask(0);
Mage::app();

$product = Mage::getModel('catalog/product')->load($product_id);
$stock_item = $product->getStockItem();

     if ($stock_item->getQty() < 0){
        $stockItem->setIsInStock(true);
        $stockItem->save();
        $product->save();
     }
?>

Unfortunately when i run this nothing changes in the backend and no products are set to instock as they should.

Perhaps somebody could point to where i'm going wrong or a better solution?


texts: hi, I have installed Version 2.3.5-p1 Installation is incomplete

texts:
I have installed  Version 2.3.5-p1 community edition
now I am getting the following error
Installation is incomplete.
Check the console log for errors before trying again.


texts: Trying to upgrade from 2.1.6 to 2.1.7 and getting a composer error

texts:
I am trying to upgrade from Magento 2.1.6 to 2.1.7 using this https://stackoverflow.com/documentation/magento2/9022/upgrading-magento#t=201704130958117574309 as my guide.

I type in- composer require magento/product-community-edition 2.1.7 --no-update

Then the next step when I run composer update I get this error-

  Your requirements could not be resolved to an installable set of packages.

  Problem 1
      - The requested package magento/project-community-edition 2.1.6 is satisfiable by magento/project-community-edition[2.1.6] but these conflict with your requirements or minimum-stability.

What is causing this error?

Edit:

{
"name": "magento/project-community-edition",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"version": "2.1.6",
"license": [
    "OSL-3.0",
    "AFL-3.0"
],
"require": {
    "magento/product-community-edition": "2.1.7",
    "composer/composer": "@alpha",
    "magento/data-migration-tool": "2.1.6",
    "magento/project-community-edition": "2.1.7"
},
"require-dev": {
    "phpunit/phpunit": "4.1.0",
    "squizlabs/php_codesniffer": "1.5.3",
    "phpmd/phpmd": "@stable",
    "pdepend/pdepend": "2.2.2",
    "fabpot/php-cs-fixer": "~1.2",
    "lusitanian/oauth": "~0.3 <=0.7.0",
    "sebastian/phpcpd": "2.0.0"
},
"config": {
    "use-include-path": true
},
"autoload": {
    "psr-4": {
        "Magento\\Framework\\": "lib/internal/Magento/Framework/",
        "Magento\\Setup\\": "setup/src/Magento/Setup/",
        "Magento\\": "app/code/Magento/"
    },
    "psr-0": {
        "": "app/code/"
    },
    "files": [
        "app/etc/NonComposerComponentRegistration.php"
    ]
},
"autoload-dev": {
    "psr-4": {
        "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
        "Magento\\Tools\\": "dev/tools/Magento/Tools/",
        "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
        "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
        "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
    }
},
"minimum-stability": "alpha",
"prefer-stable": true,
"repositories": {
    "0": {
        "type": "composer",
        "url": "https://repo.magento.com/"
    },
    "magento": {
        "type": "composer",
        "url": "https://repo.magento.com"
    }

},
"extra": {
    "magento-force": "override"
}
}

@RamaChandran I followed the link you mentioned and tried this

"repositories": [
    {
        "type": "composer",
        "url": "http://packages.magento.com/"
    }
]

When I do that I get this error

  [Composer\Downloader\TransportException]
    Your configuration does not allow connections to http://packages.magento.com/packages.json. See https://getcomposer.org/doc/06-config.md#secure-http for details.

I switched the url to https and now get this error-

  [Composer\Downloader\TransportException]
   The "https://packages.magento.com/packages.json" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: Name or service not known
   failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known


texts: Price of product displayed incorrectly in Arabic view

texts:
While switching to Arabic view, price of the product is displayed as described :
150.00 is being displayed as 1,50.00.

Please anyone help in resolving this.


texts: Magento 2 Order Summary not showing up on checkout shipping tab on IE browser 11

texts:
I have customized the checkout_index_index.xml file to display the order summary on the checkout shipping tab as Magento 2 by default doesn't display it.

Here is my customization on the checkout_index_index.xml added after line 387:

<item name="totals" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/summary/totals</item>
<item name="displayArea" xsi:type="string">totals</item>
<item name="config" xsi:type="array">
    <item name="template" xsi:type="string">Magento_Checkout/summary/totals</item>
</item>
<item name="children" xsi:type="array">
    <!-- sort order for this totals is configured on admin panel-->
    <!-- Stores->Configuration->SALES->Sales->General->Checkout Totals Sort Order -->
    <item name="subtotal" xsi:type="array">
        <item name="component"  xsi:type="string">Magento_Checkout/js/view/summary/subtotal</item>
        <item name="config" xsi:type="array">
            <item name="title" xsi:type="string" translate="true">Cart Subtotal</item>
        </item>
    </item>
    <item name="shipping" xsi:type="array">
        <item name="component"  xsi:type="string">Magento_Checkout/js/view/summary/shipping</item>
        <item name="config" xsi:type="array">
            <item name="title" xsi:type="string" translate="true">Shipping</item>
            <item name="notCalculatedMessage" xsi:type="string" translate="true">Not yet calculated</item>
        </item>
    </item>
    <item name="grand-total" xsi:type="array">
        <item name="component"  xsi:type="string">Magento_Checkout/js/view/summary/grand-total</item>
        <item name="config" xsi:type="array">
            <item name="title" xsi:type="string" translate="true">Order Total</item>
        </item>
    </item>
</item>

This works on Chrome and firefox (refer screenshot but not in IE 11.

Is there anything I am missing here?


texts: How to translate PHTML text including html markup

texts:
I'm familiar with how to translate strings including variables such as

<?php echo sprintf(__('Hello %s'), $yourVariable) ?>

So what's the cleanest way to translate this example in a PHTML tempalte?

<?php echo __('Please call our Sales Team on '); ?>

<a href="<?php echo __('tel:0123456789')?>">
    <?php echo __('0123456789')?>
</a>


texts:
Below file contains product_sku value.

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

how to get/use product_sku in custom js file .If anyone knows please explain me