texts: Debugging instantiated classes in Magento

texts:
In PHP there get_object_vars, get_class and methods that return information about the class, we can use the Magento Zend_Debug::dump(), Mage::log() and up XDebug, but during module development in Magento, where we need overwrite some part of the administrative panel, for that we must look for the correct classes.

How to get list of all instantiated classes accessing a page of Magento?

Example: X user accessed Catalog->Attributes->Manage Attribute, how to generate a Debug with the list of all classes that were instantiated when the user accessed the Manage Attribute?


texts: Magento 2 Add different body classes for different Pages

texts:
Currently, I am working to HTML to Magento 2 conversion and I got the HTML from the designer which have the class in the body so I added it generally add

 in default.xml file in my Magento theme

but the main problem is body class is different for other pages

e.g

body class for home page is "home_page_body_class"

and for other pages is  "other_page_body_class"

I do not understand how to achieve it.

If anyone has an idea about that please share me.


texts: Magento2.22 In sitemap.xml inside more than product url getting like this "catalog/product/view/id/51"

texts:
I am using Magento2.2.2 and I used third-party module for URL regenerate this Iazel_RegenProductUrl and I apply command line through change URL

for example apply this /usr/local/php71/bin/php-cli bin/magento iazel:regenurl -s2 51

After cache flush than regenerate sitemap for a specific store and check it but same URL regenerate it "catalog/product/view/id/51".

If anyone this type of issue facing please reply to me because out website three store us UK and Italy.

In sitemap not generated same name multiple product url not generated and showing this url catalog/product/view/id/51 how to fix it in sitemap inside

Thanks in advance.


texts: magento 2 : catalog search with less than 3 characters

texts:
I am working on magento 2.1.3.

Is there any possibility to search with 2 characters using catalog search?

Now i can't able to search terms like tv.


texts: Show/Hide configuration field in Magento 2

texts:
In Magento 2 if we need hide/show the field in the same group we will fallow as below.

     <group id="general" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    General Options
                    <field id="active" translate="label" type="select" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1">
                        Enabled
                        <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                        <comment>Enable/Disable</comment>
                    </field>
                    <field id="depends_on_file" translate="File Name"  sortOrder="5" type="text" showInDefault="1" showInWebsite="1" showInStore="1">
                        Enter the File Name:
                        <depends>
                            <field id="active">1</field>
                        </depends>
                    </field>
                </group>

If we use <depends> it will act like show/hide based on active field.
In my case fields are in the different tab sections and I used the same <depends>, but not working for me. For this I used below method.

             <group id="custom_customer_general" translate="label" type="text" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1">
                General
                 <field id="file_name" translate="File Name"  sortOrder="5" type="text" showInDefault="1" showInWebsite="1" showInStore="1">
                    Enter the File Name:
                    <depends>
                        <field id="custom_general/general/active">1</field>
                    </depends>
                </field>
            </group>

I used the <field id="custom_general/general/active">1</field> validation to show/hide, but it's not working.
Can you please suggest me if I went wrong?


texts: Create link directly to specific tab in adminhtml customer edit page?

texts:
I have created an extension that adds a custom tab in the adminhtml customer interface.  After submitting the form on the page, how can I return the user to my custom tab instead of the default tab on customer edit.

This is the code I use to return to the customer edit page in my controller

$redirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
$redirect->setUrl($this->_redirect->getRefererUrl());
return $redirect;


texts:
And because of this error, sometimes the cart and checkout pages don't load properly. Any clue how to fix this? I've already tried to regenerate the pub/static folder, but it's still the same.

Thanks in advance!

This is the custom script I added. Not sure if this is what's causing the conflict?

jQuery( document ).ready( function( $ ) {var quotes = $('.rollover');
var quoteIndex = -1;
function showNextQuote() {
    ++quoteIndex;
    quotes.eq(quoteIndex % quotes.length)
        .fadeIn(500)
        .delay(4000)
        .fadeOut(500, showNextQuote);
}

showNextQuote();switch (window.location.pathname) {
case '/faq-delivery/':
    $( '#accordion' ).accordion();}  } );

And my require.js link: https://www.floweraddict.com/pub/static/version1499097796/frontend/Mgs/organie/en_US/requirejs/require.js


texts: Magento 1.9 - After Export Products, Category few columns values like 000,000,000

texts:
After export products, category few columns like 12,223,234,544,348,000,000,000   what is mean 000. How to view what category it is?

FYI - few products assigned to more than one category like 6 or 7 categories.

Screenshot : https://imgur.com/xKK9Tzi

File : https://we.tl/t-F2HsGD2bma


texts: Magento 2 - How to create new language pack for admin interface

texts:
I have successfully created a language package at /app/i18n/vendor/ja_jp and applied it to the storefront.

But the new language package is not appeared in the admin's account setting.
How can I create a new language package for the admin interface?


texts: Magento2.0.7 reindexing shows proccessing?

texts:
i have executed following command
sudo php bin/magento indexer:reindex

it is running  successfully but magento2 admin panel it shows processing
 suggest any solution


texts: Magento1.9.3 - Sagepay show 404 on mobile place order

texts: i am getting error 404 on order place on mobile screen only on


texts: Observer & plugin not working in magento 2

texts:
I am trying to add log on customer login from a vue magento frontend it calls "api/signIn" with Post method, I am not sure when i put a log in controller file or in any model file in customergrapghql module.
Any suggestions please ?


texts: Data migration from 1.9.2.4 to 2.3.1 - Failure

texts:
Please Help me on this,
I have migrate data from magento 1.9.2.4 to 2.3.1 There is a error like this :-

  Notice: Undefined offset: 19 in
  C:\xampp\htdocs\magento\vendor\magento\data-
  migration-tool\src\Migration\Step\Eav\Data 279


texts:
Magento 1 Submit order button not working for reorder.
I have tried to reorder with cod payment method, but it didn't create order for the first attempt of reorder.
When i refresh page & try then it works.
seems like payment method is not loading properly
any thoughts how to debug this & solve this ?


texts: Magento Sales Order View not displaying order info

texts:
Posted this on base StackOverflow and got no traction, so reposting here to see if the Magento experts have some insight.

Having an issue where our template is not displaying the order details. If we switch the template to default, we can see these two blocks rendered:

URL pattern: /sales/order/view/order_id/##

frontend/base/default/template/tm/checkoutfields/sales/order/info.phtml

and

frontend/base/default/template/sales/order/view.phtml

If we go to our Argento theme, they are not displaying at all. Same thing happens on the checkout success page too, so I'm sure it's related.

Using the PulseStorm CommerceBug extension, I can see this block in the Layout regardless of which theme we have selected:

URL example for debug output: /sales/order/view/order_id/XX/?showLayout=page&showLayoutFormat=text

<sales_order_view>
   <reference name="sales.order.info">
      <action method="setTemplate">
         <template>tm/checkoutfields/sales/order/info.phtml</template>
      </action>
      <block type="checkoutfields/view" name="checkoutfields" template="tm/checkoutfields/view.phtml"/>
   </reference>
</sales_order_view>

Started seeing this after we upgraded to EE 1.14.3, though not seeing where that would affect our template. We have since also upgraded to the latest version of the Argento theme to see if that would fix it and also updated to EE 1.14.3.1.

Checkout page: /checkout/onepage/success/

<checkout_onepage_success>
   <update handle="sales_order_view"/>
   <update handle="page_one_column"/>
   <remove name="customer_account_navigation"/>
   <remove name="left"/>
   <remove name="right"/>
   <remove name="downloadable.checkout.success"/>
   <remove name="sales.order.info.buttons"/>
   <reference name="my.account.wrapper">
      <action method="unsetChildren"/>
   </reference>
   <reference name="sales.order.info">
      <action method="setTemplate">
         <template>tm/checkoutsuccess/sales/order/info.phtml</template>
      </action>
   </reference>
   <reference name="sales.order.view">
      <action method="setTemplate">
         <template>tm/checkoutsuccess/sales/order/view.phtml</template>
      </action>
   </reference>
   <reference name="checkout.success">
      <action method="setTemplate">
         <template>tm/checkoutsuccess/success.phtml</template>
      </action>
      <action method="insert">
         <blockName>sales.order.info</blockName>
         <alias>info</alias>
      </action>
      <action method="insert">
         <blockName>sales.order.view</blockName>
         <alias>sales.order.view</alias>
      </action>
      <block type="core/template" name="checkoutsuccess.additional" template="tm/checkoutsuccess/success/additional.phtml"/>
   </reference>
</checkout_onepage_success>

Have also tried copying the two info and the view files over to our argento/flat theme directories along with adding the layout info to the layout files there to no avail.


texts:
I am unable to click on menus, submenu in admin Panel.  I have checked and found there are errors related to knockout.js in console panel.

Front-end is working fine but i can see the same knockout issue there also.
I have tried the commands mentioned below

php bin/magento s:up
php bin/magento s:s:d -f

But issues are still there.
I have checked in log files, below are logs

[2020-08-19 05:54:54] main.ERROR: Unable to resolve the source file
for
'frontend/theme/luma_child/en_US/Test_Catalog/css/bootstrap.min.css.map'
[] [] [2020-08-19 05:54:54] main.CRITICAL: Unable to resolve the
source file for
'frontend/theme/luma_child/en_US/Test_Catalog/css/bootstrap.min.css.map'
[] [] [2020-08-19 05:55:03] main.ERROR: Unable to resolve the source
file for 'frontend/theme/luma_child/en_US/knockoutjs/knockout.js'
[] [] [2020-08-19 05:55:03] main.CRITICAL: Unable to resolve the
source file for
'frontend/theme/luma_child/en_US/knockoutjs/knockout.js' [] []
[2020-08-19 05:55:03] main.ERROR: Unable to resolve the source file
for 'frontend/theme/luma_child/en_US/knockoutjs/knockout-es5.js' []
[] [2020-08-19 05:55:03] main.CRITICAL: Unable to resolve the source
file for
'frontend/theme/luma_child/en_US/knockoutjs/knockout-es5.js' [] []
[2020-08-19 05:55:04] main.ERROR: Unable to resolve the source file
for 'frontend/theme/luma_child/en_US/knockoutjs/knockout-repeat.js'
[] [] [2020-08-19 05:55:04] main.CRITICAL: Unable to resolve the
source file for
'frontend/theme/luma_child/en_US/knockoutjs/knockout-repeat.js' []
[] [2020-08-19 05:55:04] main.ERROR: Unable to resolve the source file
for
'frontend/theme/luma_child/en_US/knockoutjs/knockout-fast-foreach.js'
[] [] [2020-08-19 05:55:04] main.CRITICAL: Unable to resolve the
source file for
'frontend/theme/luma_child/en_US/knockoutjs/knockout-fast-foreach.js'
[] []

I have checked in the pub there is not directory associated with knockoutJs
Anyone please guide me to sort this out.


texts: Magento 2 - Admin grid and export use different timezone

texts:
I'm using Magento 2. So, I created a Adminhtml data grid in a custom module. The problem is that the data grid doesn't match the exported data. I've set the timezone, but it seems data grid and exported data use different time base.

Below is the code I use to show created_at attribute.

<column name="created_at" class="Magento\Ui\Component\Listing\Columns\Date" component="Magento_Ui/js/grid/columns/date">
        <settings>
            <filter>dateRange</filter>
            <dataType>date</dataType>
            <label translate="true">Created At</label>
            <sorting>asc</sorting>
        </settings>
    </column>

Tell me if you need more information regarding this problem. Any hint is appreciated. Thanks!


texts: Magento 2 - How to use simple product images for configurable products when no configurable product image is uploaded?

texts:
How can I use the simple product image for configurable products where no configurable product image is uploaded? Currently I can see the placeholder image unless options are selected. I set up Magento 2 that product images are updating depending on the attribute selection. But it attaches the simple product images to the placeholder image.
It simply should replace the placeholder image with the first associated simple product image.


texts: Invalid Header Value detected Error in magento 2.3.3

texts:
I as an admin , received and email which states "Product alerts cron warnings Invalid header value detected".
Can any body tell me what is the issue here? and how this can be resolved?


texts: Magento 2 : Add child products return error using REST API

texts:
Magento 2.1.8.

I firstly successfully use rest API to create a parent item (configurable item). Then I use the API to create a child item (simple product item) under the parent item. The Magento 2 backend gives me "Products "%1" and "%2" have the same set of attribute values." error.

See following logs:

1. successfully create a parent item:

ACTION:

PUT

URL:

/index.php/rest/V1/products/8100

HEADER:

Content-Type:application/json

Accept:application/xml

............

RESPONSE:

HTTPCODE:

200

RESPONSE:

<?xml version="1.0"?>

<response>

  <id>361</id>

  <sku>8100</sku>

...........

Then I try to add a child item:

ACTION:

POST

URL:

/rest/V1/configurable-products/8100/child

HEADER:

Content-Type:application/json

Accept:application/xml

REQUEST:

{"childSku": "8116"}

RESPONSE (with error):

HTTPCODE:

400

RESPONSE:

<?xml version="1.0"?>

<response>

  <message>Products "%1" and "%2" have the same set of attribute values.

</message>

  <parameters>

    <item>372</item>

    <item>337</item>

  </parameters>

</response>

It used to work on 2.0.11, I upgraded to 2.1.8 then lots of my API calls are not working. This is just too hard to integrate other software to Magento 2.


texts: JSON Response parse error from controller

texts:
Magento 1 - I keep getting a parse error.  I can't figure out where my syntax is wrong.

$this->getResponse()->setHeader('Content-type', 'application/json');
$this->getResponse()->setBody(json_encode({"user": true}));

This is my ajax request:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
            <script type="text/javascript">
                $(document).ready(function(){
                    $(".emailfocusout").focusout(function(){
                        var email = $('.emailfocusout').val();
                        console.log('EMAIL: ', email);
                        $.ajax({
                            url: '/checkout/Email/Email/email/' + email,
                            type: 'POST',
                            contentType: 'application/json',
                            success: function(data) {
                                console.log('SUCCESS: ', data);
                            },
                            error: function(data) {
                                console.log('ERROR: ', data);
                            },
                        });
                    });
                });
            </script>


texts: how to add shipping city attribute to the cart rules

texts:
Promotions -> shopping cart price rules -> conditions tab, there are cart attribute option like the shipping country,shipping state/province. I also want the shipping city. How to get that shipping city in the dropdown.

Thanks,


texts: Update Product Qty while product is being added to cart

texts:
I want to update qty to 2 when product is added to Cart. Basically I want that when a user ads a product to cart(qty is not visible for user), it is set to qty by default. I have created an observer and using event checkout_cart_product_add_after

But when I try to add product to cart, somehow the CPU Usage % goes like 90% and server crashes and I have to restart apache. My code looks like -

namespace Referral\Duplicate\Observer;

use Magento\Framework\Event\Observer as EventObserver;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\Event\ObserverInterface;
use Magento\Quote\Model\Quote;
use Magento\Sales\Api\Data\OrderInterface;
use Magento\Checkout\Model\Session as CheckoutSession;

class DuplicateObserver implements ObserverInterface
{
    private $_checkoutSession;
    protected $_productRepository;
    protected $_cart;
    protected $formKey;
    public function __construct(
        \Magento\Catalog\Model\ProductRepository $productRepository,
        \Magento\Checkout\Model\Cart $cart,
        \Magento\Framework\Data\Form\FormKey $formKey,
        CheckoutSession $checkoutSession,
        \Magento\Catalog\Model\Product $product,
        \Magento\Quote\Api\CartRepositoryInterface $quoteRepository,
        \Magento\Quote\Model\Quote\Item $item

    )
    {
        $this->quoteRepository = $quoteRepository;
        $this->_productRepository = $productRepository;
        $this->_cart = $cart;
        $this->formKey = $formKey;
        $this->product = $product;
        $this->_checkoutSession = $checkoutSession;
    }

    public function execute(EventObserver $observer)
    {
        $couponCode = 'duplicate';
        $items = $observer->getQuoteItem();
        $product = $observer->getEvent()->getData('product');
        $productId = $product->getId();

        $skuQty = count($observer->getQuoteItem());
        $cartItems = $this->_cart->getQuote()->getAllVisibleItems();
        $quote = $this->_checkoutSession->getQuote();
        $_product = $this->_productRepository->getById($productId);

        $params = array(
                    'form_key' => $this->formKey->getFormKey(),
                    'product' => $productId,
                    'qty'   => 1
                );
        // //$newProduct = $this->product->load($productId);
        //$this->_cart->addProduct($product, $params);
        $this->_cart->save();

    }

}

Issue comes when I uncomment line -

// //$newProduct = $this->product->load($productId);
        //$this->_cart->addProduct($product, $params);


texts: Having issue in reindex while i m reindexing product price

texts:
There was a problem with reindexing process. SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1,

  Query was: INSERT INTO catalog_product_index_price (entity_id,
  customer_group_id, website_id, tax_class_id, price,
  final_price, min_price, max_price, tier_price, group_price,
  vendor_id) SELECT catalog_product_index_price_idx.entity_id,
  catalog_product_index_price_idx.customer_group_id,
  catalog_product_index_price_idx.website_id,
  catalog_product_index_price_idx.tax_class_id,
  catalog_product_index_price_idx.price,
  catalog_product_index_price_idx.final_price,
  catalog_product_index_price_idx.min_price,
  catalog_product_index_price_idx.max_price,
  catalog_product_index_price_idx.tier_price,
  catalog_product_index_price_idx.group_price FROM
  catalog_product_index_price_idx ON DUPLICATE KEY UPDATE entity_id
  = VALUES(entity_id), customer_group_id = VALUES(customer_group_id), website_id = VALUES(website_id),
  tax_class_id = VALUES(tax_class_id), price = VALUES(price),
  final_price = VALUES(final_price), min_price =
  VALUES(min_price), max_price = VALUES(max_price), tier_price =
  VALUES(tier_price), group_price = VALUES(group_price),
  vendor_id = VALUES(vendor_id)


texts: magento 2 - Invalid credentials for 'https://repo.magento.com/packages.json', aborting

texts:
Trying to install magento 2 on localhost. I am getting this message

  Invalid credentials for 'repo.magento.com/packages.json', aborting.

Initially, I had created a secure key by navigating to magentocommerce.com/magento-connect/customerdata/secureKeys/list/ url.

I tried composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <installation directory name> command and entered the username as public key and password as private key. I was then prompted whether I need to save it? And I selected the option "Y".

But by some mistake the secure key  got deleted.

Now, when I am trying to create a new project, its giving me

  Invalid credentials for 'https://repo.magento.com/packages.json', aborting.

I want to update my auth.json file . But I'm unable to get the command. Can you please help me for the same?


texts: Add custom UI Component (button) to product listing with POST request

texts:
how can I add button that make POST request to controller next to "Add Product" button in product listing? So far I do it like this, but it isn't send POST:
Vendor/Module/view/adminhtml/ui_component/product_listing.xml
<?xml version="1.0"?>
    <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
        <settings>
            <buttons>
                <button name="synchronize" class="Vendor\Module\Block\Adminhtml\Product\Edit\Button\CustomButton">
                </button>
            </buttons>
        </settings>
    </listing>

Vendor/Module/Block/Adminhtml/Product/Edit/Button/CustomButton
<?php

namespace Vendor\Module\Block\Adminhtml\Product\Edit\Button;

use Magento\Backend\Model\UrlInterface;
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;

class CustomButton implements ButtonProviderInterface
{
    private $urlBuilder;

    public function __construct(UrlInterface $urlBuilder)
    {
        $this->urlBuilder = $urlBuilder;
    }

    public function getButtonData()
    {
        return [
            'label'=>__('Custom label'),
            'class' => 'action-secondary',
            'on_click'=> "setLocation('" .
                $this->urlBuilder->getUrl("path/to/controller", ['key'=>$this->urlBuilder->getSecretKey('front', 'controller', 'action')])
                . "')",
            'sort_order'=>100,

        ];
    }
}


texts: Magento 2.3 - How to handle multi store same product name duplicates error when edit?

texts:
I have migrated Magento from 1.9.2.3 to 2.3.4, if i try to change the product details i am getting error like product name isn't unique. I am using multi-Store so that the same product name available in all stores How to handle this issue? I can't able to import the product images.
Anybody faced this, How to solve this issue?


texts: Language switcher not changing frontend language

texts:
I have Magento 1.9.2.0 with the sample data and default Madison Island store with 3 view names; English, French and German. In frontend when I switch the language using the select field, nothing happens! The frontend is still in English?

Shouldn't this select field switch the frontend language automatically? is there anything else that I should install since this is Magento and they do everything differently/complexly.

In Cache Storage Management I disabled it to all.

I'm on Windows 8 machine using Chrome browser and store installed through** http://127.0.0.1/** localhost

Update

I have downloaded the modules: Locale_Mage_community_fr_FR & Locale_Mage_community_de_DE and it seems to work, so please close the question :)


texts:
Magento2 has installed successfully. At least IT says so. Calling the localhost domain launches the website properly and everything there looks good. However, when I run localhost/admin I get a 404.

Every iteration of the URL returns the same result (/Admin /admin /Admin/ or /admin/)

The install is dev alpha-101 and the entire install process progressed without error or warning.

Is there a file mod I need to make to allow the admin app to run? I can't figure out why the regular website runs, but the admin app does not.

Any pointers greatly appreciated.


texts: Can we change default error pages of Magento 2?

texts: I want to know that can we change default error pages of magento without touching core files of magento 2.


texts: While sorting my product collection automatically shuffeling

texts:
For Magento 2.2 I'm using:-

$categoryId=185;

$ct = $_objectManager->create('Magento\Catalog\Model\Category')->load($categoryId);
        $collections = $ct->getProductCollection()
                     ->addAttributeToSelect('*')
                     ->addAttributeToFilter('status', 1)
                     ->addAttributeToSort('sort_value', 'DESC');

    echo "<pre>Test" ; print_r($collections->getData());exit;

& getting 15 records.

but currently, 'sort_value' attribute is empty for all 15 records. & whenever I'm refreshing pages each time collection is shuffling while the same script is giving fixed collection for Magento 1.

I needed fixed collection means whenever I refreshed the page it should remain same.

For a product, I assigned sort_value=10 just for testing & now this product is coming always on top.while rest of the 14 products(having empty sort_value) are shuffling.

Note:-1 the type of sort_value is price.

2- I've used  addAttributeToSort('sort_value', 'DESC'); on product listing & it gives expected result.

Please help me to resolve this issue.


texts: MAGENTO 2 - Plugin class... doesn't exist

texts: Good evening friends, I am getting an error response while trying to save the products, I tried to clear the cache and do the compilation, but I have the second image as an error response, could you tell me what might be happening?


texts: Magento 2: Fetching last generated invoice

texts:
In Magento 1, I can fetch the invoice details like,

$orderObject = Mage::getModel('sales/order')->load($orderId);

$invoiceCollection = $orderObject->getInvoiceCollection();
foreach($invoiceCollection as $invoice):
    $invoiceId =  $invoice->getId();
endforeach;

How can I do the same in Magento 2?


texts: how to move the custom block middle of the page in Magento 2

texts:
I added custom block in home page Magento 2, but it's showing in the top of the page

  I want to move to after banners

how can I achieve this?

cms_index_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block class="FM\Quick\Block\Custom" name="default_home_page" template="FM_Quick::cms.phtml"/>
        </referenceContainer>
    </body>
</page>


texts: Quick create simple product doesn't inherit custom attributes

texts:
I set up a list of custom attributes in a configurable product, and I found that the quick create form is really handy to set up the simple associated products.
Problem: the simple products are not inheriting the custom attributes set on the parent configurable product.
Can this be automated, so that every custom attribute values in configurable parent product is set on its children simple products ?
Thanks.
Edit
I now realized that I do not intend to have configurable simple products appear as standalone products, so I presume I won't lose search functionality even when the attribute will be set only in the viewable parent product.
Nevertheless, I keep the question opened if it's a simple solution like attaching to an observer.


texts: Is there a solution for Oauth 2 with Magento 1.9? Being that 1.9 is not current its hard finding updated solutions


texts: How to solve checkout translation issue magento 2.2.7?

texts:
I am unable to translate 2 stuff in checkout, its there in csv but not working.

When i am enabling "Translate Inline" from admin its showing like this


texts:
I have written job code on crontab.xml

<job name="vendor_out_for_delivery_notifiation" instance="Bakeway\VendorNotification\Helper\Data" method="sendPushNotificationForUpcomingOrderCron">
        <schedule>0 */21 * * </schedule>
</job>

I have given 9pm of every night but its not working entries is not going in to cron_schedule table.

I have created custom group of this cron.

<group id="vendor_notification_cron_group">

php bin/magento cron:run --group="vendor_notification_cron_group"

Please reply if you have any solution.


texts: set programmatically an option that is not the default one

texts:
I have a select, and programmatically sets the default value:

$attributes->setData($attributeToApply->getAttributeCode(), $attributeToApply->getDefaultValue());

select 'foo' has option 'bar' with order '0' and option 'baz' with order '1'. 'bar' is the default option.

But now I need to apply another value that is not the default one, for one concrete attribute code.

if ($attributes->getData($attributeToApply->getAttributeCode()!='foo') {
    $attributes->setData($attributeToApply->getAttributeCode(), $attributeToApply->getDefaultValue());
} else {
    $attributes->setData($attributeToApply->getAttributeCode(), $attributeToApply->/* what should I use here?? */);
}

Default value has order: 0, and the other value has order: 1. How can I set it by it's order? or at least by its option label?

Edit: I'm trying this statement, but it's still setting default value:

$attributes->setData($attributeToApply->getAttributeCode(), 'baz');


texts: Custom Import a csv file Action in Admin Grid Form page?

texts:
I am trying to retrive the upload file on form submit in admin grid.
In that I did not get the filepath because of the $model->getdata not able to find the path on line 123 in below code.
 <?php
        /**
        * Webkul_Grid Add New Row Form Admin Block.
        * @category    Webkul
        * @package     Webkul_Grid
        * @author      Webkul Software Private Limited
        *
        */
        namespace Webkul\Grid\Block\Adminhtml\Grid\Edit;

        /**
        * Adminhtml Add New Row Form.
        */
        class Form extends \Magento\Backend\Block\Widget\Form\Generic
        {
        /**
        * @var \Magento\Store\Model\System\Store
        */
        protected $_systemStore;

        /**
        * @param \Magento\Backend\Block\Template\Context $context,
        * @param \Magento\Framework\Registry $registry,
        * @param \Magento\Framework\Data\FormFactory $formFactory,
        * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
        * @param \Webkul\Grid\Model\Status $options,
        */
        public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\Data\FormFactory $formFactory,
        \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
        \Webkul\Grid\Model\Status $options,
        array $data = []
        ) {
        $this->_options = $options;
        $this->_wysiwygConfig = $wysiwygConfig;
        parent::__construct($context, $registry, $formFactory, $data);
        }

        /**
        * Prepare form.
        *
        * @return $this
        */
        protected function _prepareForm()
        {
        $dateFormat = $this->_localeDate->getDateFormat(\IntlDateFormatter::SHORT);
        $model = $this->_coreRegistry->registry('row_data');
        $form = $this->_formFactory->create(
        ['data' => [
        'id' => 'edit_form',
        'enctype' => 'multipart/form-data',
        'action' => $this->getData('action'),
        'method' => 'post'
        ]
        ]
        );

        $form->setHtmlIdPrefix('shipment_');

        $fieldset->addField(
        'content',
        'editor',
        [
        'name' => 'content',
        'label' => __('Content'),
        'style' => 'height:36em;',
        'required' => true,
        'config' => $wysiwygConfig
        ]
        );

        $fieldset->addField(
        'publish_date',
        'date',
        [
        'name' => 'publish_date',
        'label' => __('Publish Date'),
        'date_format' => $dateFormat,
        'time_format' => 'H:mm:ss',
        'class' => 'validate-date validate-date-range date-range-custom_theme-from',
        'class' => 'required-entry',
        'style' => 'width:200px',
        ]
        );
        $importdata_script =  $fieldset->addField(
        'importdata',
        'file',
        array(
        'label'     => 'Upload File',
        'required'  => true,
        'name'      => 'importdata',
        'note' => 'Allow File type: .csv and .xls',
        )
        );

        $importdata_script =  $fieldset->setAfterElementHtml(
        "

        <script type=\"text/javascript\">

        document.getElementById('grid_importdata').onchange = function () {

        var fileInput = document.getElementById('grid_importdata');

        var filePath = fileInput.value;

        var allowedExtensions = /(\.csv|\.xls)$/i;

        if(!allowedExtensions.exec(filePath))
        {
        alert('Please upload file having extensions .csv or .xls only.');
        fileInput.value = '';
        }

        };

        </script>"
        );
        $form->setValues($model->getData());
        $form->setUseContainer(true);
        $this->setForm($form);

        return parent::_prepareForm();
        }
        }


texts: Possible to combine configurations and custom options?

texts:
I am trying to import simple and configurable productsthat also have custom options.
But when I import these products my connection in the configurable product of the configurations are gone.
I already tried importing first all my products without the custom options.
And that works. When I try to import the custom options the custom options are added to the simple product but the connection between configurable and simple is broken again.
Am I missing a column or a setting or is this just standard Magento behaviour and is it just not possible?
Thanks!


texts: How can I change CSV import image as replace?

texts:
When I import products with CSV file with base_image,small_image,thumbnail_image and additional_images values it's adding images as new images.

I want to it replace with current images.

How can I do it?


texts: Magento 2 - get Excl. Tax, Incl. Tax label

texts:
I want to switch positions of Excl and Incl. Tax. I did it by editing

amount/default.phtml

and changing

$block->hasAdjustmentsHtml()

above the span. But, now i want to display label on it. When i use

$block->getPriceDisplayLabel()

i get "Incl. Tax", but instead, i want to show first "Excl. Tax". So how can i access both of the labels as i want?


texts:
I have a series of clothing lines setup as configurable products, with sizes created as the associated simple products.

Occasionally we will over sell a single simple product, but it is always the last item to sell that over sells. i.e. we have sold out of every other size except for a single size 6 item. That size 6 will possibly oversell, so it appears that the stock item isn't being deducted for the final item, or it isn't being set to out of stock.

What is the best way to start investigating this? Where should I be looking? Has anyone seen this issue before? Would this have anything to do with the cron job?


texts: I have a question about how shipping costs are calculated in magento 2. Don't I need to specify product dimensions somewhere? I am selling some quite large yet light items. How does the DHL connection work and how can I accurately charge the right amount of shipping fees?


texts: How to preview a cms page in Magento 2 admin panel

texts:
Is it possible to preview the CMS page before push live?

I can't preview my page while creating a page on cms page in admin panel Magento 2.
How can I preview?


texts: How to get short description of grouped product

texts:
I tried to display the short description of a grouped product in grouped.phtml:

<?php if ($_hasAssociatedProducts): ?>
            <?php foreach ($_associatedProducts as $_item): ?>
                <?php if ($_product->isSaleable()): ?>

<?php echo $block->escapeHtml($_item->getShortDescription()) ?>

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

But nothing is displayed like this.
Any idea why?


texts:
<reference name="footer">
    <action method="addItem">
        <type>skin_js</type>
        <file>js/fabric/tool/controller_tool.js</file>
    </action>
</reference>

I used above code to load js in footer. But Magento throws error Like

  Invalid method Mage_Page_Block_Html_Footer::addItem(Array (
      [0] => skin_js
      [1] => js/fabric/tool/controller_tool.js ) )

I need to load js in footer. How To overcome this issue.


texts: Attaching guest checkout orders to user accounts

texts:
I'm stuck with a specific requirement on my magento shop. I have enabled the guest checkout method on magento to remove the necessity of registering.

But now this information is useless for providing customized experience to the customer in future if he registers himself. When the person who has used guest checkout previously, registers himself on my shop, I want his previous orders to get attached with his account, so that his whole shopping history can be combined to give him better shopping experience.
Is there any possibility to do that within the possibilities of magento. If any of you have done that previously, please give any pointers to achieve this. Please, feel free to provide other better alternatives, if my thoughts are wrong somewhere.
I'll greatly appreciate any help,
thanks in advance.

Edit: I got success in editing customer's name and other options, but still looking for some help to attach the customer's account to the order, so that it is available in the order history of customer.


texts: How do I create a confirmation pop-up before purchase?

texts:
I want a pop-up to show with a message after the user clicks PROCEED TO CHECKOUT.

So the process goes like:

User clicks PROCEED TO CHECKOUT
Pop-up shows with the message with AGREE or DISAGREE buttons
If DISAGREEd, close pop-up, and do not do anything, stays in the same page
If AGREEd, redirect to checkout

PS: I do not need this information to go through backend somewhere, because this message has to be agreed to by all customers, no exception, so I will assume that if the order is placed, then the customer agreed to this message.

PS 2: I know I could place this message in html body, but for our business, this condition is so important I want to create a popup for it.

I'm using Magento 2.2.5 with PHP 7.1

Where should I start?


texts:
You used to be able to change the quantities of products without having to actually open a new page for the specific SKU. You could do it right from the catalog page where it shows all your SKUs.

Either my browser is screwy, or this is no longer possible.

Anyone know a fix for this?`


texts: Setting the product status disabled not working in Magento2

texts:
In Magento 2, I am trying to set the product Status as Disabled. But, it is not working. Here is the code.

$product = $this->objectManager->create ( 'Magento\Catalog\Model\Product' )->load ( $productId );
           if($product->getImage () || $product->getSmallImage () || $product->getThumbnail ()){
                $product->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_DISABLED);
           }else if($product->getImage () || $product->getSmallImage () || $product->getThumbnail ()){
               $product->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED);
           }
$product->save ();


texts: How to dissociate all products from a specific category programmaticaly : Magento2

texts:
How to dissociate all the products from a specific category through code ?
I have the category id. I need to take all the products, out  of this category id.


texts: Magento 2 - Docker - Data not persisting

texts:
I'm currently running Magento 2 on Docker using docker-compose.yml here is the file:

version: '3.0'
services:
  web:
    image: alexcheng/magento2
    container_name: magento2
    ports:
      - "80:80"
    env_file:
      - env
    volumes:
      - /dev/mytheme:/var/www/html/app/design/frontend/mytheme/default
      - magento-data:/var/www/html
  db:
    image: mysql:5.6.23
    container_name: mysql
    volumes:
      - db-data:/var/lib/mysql/data
    env_file:
      - env
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: phpmyadmin
    ports:
      - "8580:80"
  smtp:
    image: namshi/smtp
    container_name: smtp
    restart: always
    ports:
      - "25:25"
  redis:
    image: redis
    container_name: redis
    command: ["redis-server", "--appendonly", "yes"]
    volumes:
      - redis-data:/data
  elasticsearch:
      image: elasticsearch:6.6.2
      container_name: elasticsearch
      ports:
        - "9200:9200"
  rabbitmq:
    image: rabbitmq
    container_name: rabbitmq
    ports:
      - "5672:5672"
volumes:
  db-data:
  magento-data:
  redis-data:
    external: false

From what I understand, the volumes exist so it should work.

Here is the scenario:

docker-compose down then
docker-compose up -- data is all lost need to reinstall everything

The whole database is wiped out. There are no tables at all.

docker container exec -it mysql bash
mysql -h db -u magento -p
Take a look at the tables - nothing is there.

In order to reinstall everything, you need to run:

docker container exec -it magento2 bin/magento setup:uninstall
docker container exec -it magento2 install-magento

Sometimes you need to give the write permission to folders in order to run install-magento properly so:

chmod 777 -R var/cache...

I thought db-data and magento-data should do the trick...

I'm not able to explain more than this... Is anyone else running into this problem?

FYI: I'm running docker on Windows 10 Pro with Hyper-V

Thanks in advance!


texts: magento 2: getAttributeText() return wrong value

texts:
I'm trying to get Custom Attribute by getAttributeText(), i've 3 store with 3 different url
So when i use that function, 2 of my store return "no", and 1 return "yes", i don't know how to fix this or any idea what is cause
Please help, thanks you guys :(

So here is how i set up in admin:

As you can see, right now, i config it to "no", but 2 of my store working fine (return "no"), and another store is not working well (return "yes")
So here is the code:

  ..\Magento_Catalog\templates\product\view\addtocart.phtml

<?php $_product = $block->getProduct(); ?>
<?php $buttonTitle = __('Add to Cart'); ?>
<?php $dailydealhelper=$this->helper('Smartwave\Dailydeals\Helper\Data'); ?>
<?php if ($_product->isSaleable()): ?>

    <?php if($block->getRequest()->getParam('dailydealproduct') || $dailydealhelper->isDealProduct($_product->getId())) : ?>
       <?php $productSku=$_product->getSku(); ?>
    <input type="text" id="todate" value="<?php echo $dailydealhelper->getDailydealToDate($productSku); ?>" style="display:none;" >
    <input type="text" style="display: none;" id="fromdate" value="<?php echo $dailydealhelper->getDailydealFromDate($productSku); ?>">

        <?php if($block->getRequest()->getParam('dailydealproduct')) :?>

        <?php endif; ?>

                <?php echo __('Offer Ends In:'); ?>

<?php echo __('Days'); ?>

<?php echo __('Hours'); ?>

<?php echo __('Minutes'); ?>

<?php echo __('Seconds'); ?>

    <?php endif; ?>

    <?php
    $is_saleable = $_product->getAttributeText('is_saleable');
    if ($is_saleable) {
      $is_saleable = trim($is_saleable," ");
      $is_saleable = strtolower($is_saleable);
    }

    $request_quote = $_product->getAttributeText('request_quote');
    if ($request_quote) {
      $request_quote = trim($request_quote," ");
      $request_quote = strtolower($request_quote);
    }
    var_dump($request_quote); exit;

Thanks for reading :)


texts: size attribute showing limited items but category products have more than that in magento 2

texts:
Size attribute showing limited items in filter navigation but category products have more than that in Magento 2. Please see the following images for more details.

Anyone know how to solve it ? Thanks in advance.


texts: How to disable COD payment method based on product attribute?

texts:
I want to hide COD payment method based on the Product attribute. I tried payment_method_is_active event method to disable using observer like below.
My observer file is here
public function execute(
    \Magento\Framework\Event\Observer $observer
) {
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$method = $observer->getEvent()->getMethodInstance();
$quote  = $observer->getEvent()->getQuote();
$cart = $objectManager->get('\Magento\Checkout\Model\Cart');
$items = $cart->getItems();
$disable_cod = false;
foreach ($items as $item) {
$options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
    if(array_key_exists("attributes_info",$options) && count($options['attributes_info']) >= 1)
    {
      foreach($options['attributes_info'] as $myopt)
      {
          if($myopt['label']==='E-Gift'){ // Condition i am checking
             $disable_cod = true;
          }
      }
    }
if($disable_cod){
        $this->logger->critical("Disable COD");
        if($method->getCode() === 'cashondelivery'){
            $this->logger->critical("Here 1");
            $result = $observer->getEvent()->getResult();
            $result->setData('is_available', false);
        }
    }else{
        $this->logger->critical("Enable COD");
    }

}

COD is disabling only if I have an E-Gift product only. If I have other products with E-Gift product COD is not disabling. Ultimately I need to hide the COD if at least one product including E-Gift.
Please help me with this.


texts:
We have an observer listening to the sales_order_payment_transaction_save_commit_after event. However, the event doesn't always fire on checkout when using Sage Pay Pro (it works fine for PayPal and other methods and sometimes works for Sage Pay). Is there anything which can stop this event firing? This is EE  1.11.0.

Sorry for quite vague information, if you need anything else then let me know.


texts: Magento 2.2.x Product Image automatic Resize when height more than 1200px

texts:
Magento 2.2.x Product Image automatic resize when height more than 1200px

Might be default m2 bug.

LMK how to fix that problem?


texts: Apache Directive LocationMatch - Secure Admin Access

texts:
I am trying to restrict Admin Access to my Magento site, to allow a specific ip address, only. I found tutorials that mention the following:

Apache directive LocationMatch:

<code>
<LocationMatch "admin">
Order Deny,Allow
Deny from All
Allow from 10.10.10.0/24
</LocationMatch>
</code>

What is 'Apache Directive LocationMatch' and where do I add this? Totally clueless. Thanks in advance!


texts: Magento 2.3 - Uncaught TypeError: Cannot read property 'version' of undefined

texts:
Installed Magento 2.3.1 with sample data there are no js errors on the console. After changing the theme to Ves Need from Venustheme.

http://www.venustheme.com/theme/ves-need/

On hard refresh, the below issue occurs.

Uncaught TypeError: Cannot read property 'version' of undefined

Can someone please help me to sort out this issue.


texts: Add version js and css files in magento 2

texts:
I want to add version in js and css files in Magento2. I want browser to request url like

  http://example.com/pub/media/styles.css?ver=1.0.0

Instead of

  http://example.com/pub/media/styles.css

How can I achieve this ? In which file I need to make the changes.

Thank you


texts: Does Magento 1.9.2.4 include SUPEE-3941 patch?

texts:
I need to know if it is necessary to install SUPEE-3941 patch on Magento 1.9.2.4.

I am asking this because I just received Magento notification email to update SUPEE-8788 to version 2 and instructions state that it is necessary to apply SUPEE-3941 before updating SUPEE-8788 to version 2.

But SUPEE-3941 is available only for Magento 1.8.0.0 and 1.9.0.1.

Should I install it anyway?


texts: Show both regular & special price on configurable products

texts:
I want to show both special & regular price at the same time on the product listing and product page for configurable products.

Right now it only shows the final price. E.g. if the regular price is $50 and the special price is $40. I will only see 40$.

What I want is that a strike-through the version of the regular price also.

The simple products attached to the configurable products all have a regular & special price set - even if all regular/special prices are the same, only the final price is shown.

Simple products show both special & regular price at the same time. Both prices are also shown if a specific option of the configurable product is selected. But I want it to be shown initially when no option is selected as well.


texts: Magento 2.3.4: How to customize the default email template?

texts: The Share button on the product view page allows the customer to share the link to the product by email. I would like to customize the email template being used by this feature as seen in screenshot below. How do I go about replacing LUMA at the top with my store name?


texts: Magento 2 Tricky Certification Question - Relation between Block and Templates files

texts:
What is the Relations between blocks and templates ? Pick 3 options.

A) - Single block can have multiple template files.
B) - Multiple block can have single template files.
C) - Single Block instance can have multiple template files.
D) - Multiple block instance can have Single template files.
E) - Multiple block instance can have Different (multiple) template
files.

One of the option might wrong - but if someone knows the correct answers with options please provide the same.

I am really need yours answers for the above question - debugging a lot but not getting the exact answers.

If required i can give more information - but please help me with the answers

Ref link -

Magento 2 blocks and templates


texts: Catalog Search Results page - sort by price not working

texts:
Steps to reproduce:

Search for a term and the results are displayed by default sorted by
Relevance.
Change the sort by parameter to Price and change the sort to ascending order.
Results are not sorted in the ascending order.

Error in console:

  loader.js:210 Expected to start loader but did not find one in the dom

Looks like the query string parameter product_list_dir is missing. when I manually add it in the URL, it sorts fine.


texts: How to show the different contents to the customer and admin in the new order email?

texts:
Please help.

I need to do this for only one website as I have multiwebsite functionality in my project.


texts: Magento2: How can get current page layout?

texts:
How can I get the current page layout programatically?

I have tried this:

$block->getLayout()->getUpdate()->getPageLayout();

But the output is: 1column but that is wrong.

Any idea how to get it?


texts:
For one of our clients, I want to change the watermark of the images to a better resolution image

in Design > Configuration > Product Image Watermarks.

My question, because I see no 're-generate product images' button, and no 'auto-re-generate' option, will these images be generated again automatically with the new watermark?


texts:
Product page zoom option is not working, i have using

js/ecommerceteam/cloud-zoom.1.0.2.js
css/ecommerceteam/cloud-zoom.css

My working website  http://m.machinetoolsemart.com/

Product page http://machinetoolsemart.com/wim-ig-200-i-single-phase-without-arc-accessories.html

Anybody know what is the problem is going on my website?


texts:
It seems the Magento quantity field corresponds to Quantity Available (Qty On Hand - Qty committed to orders) and not Quantity On Hand.

If we are updating inventory we are going to count how many we have of something and enter that number, but this would be wrong because there could already be orders in queue for that item or an order could be placed as we are updating the Qty. Is there a standard practice for dealing with this in Magento?

An example to clarify:

I have 13 of Product X in my warehouse. There is an order for 3 of Product X in queue to be shipped, so my Magento inventory would actually show a QTY of 10.

Now if 20 more of Product X come in from a supplier and need to be added to inventory, my stock people would need to see I had a QTY of 10, add 20 to that number and enter a new QTY of 30 into the system.

Between the time they open Product X's inventory tab, and they do the addition and click save, 1 more order for Product X could be placed. This would mean I would have 33 on hand, 4 committed to orders, QTY would say 30, but my quantity available for sale is actually only 29.


texts: How to Create editable filed in sales > order Grid in Magento 2

texts:
How to create editable delivery date columns in order grid page.

Please Advice me.How to Create
Thanks.


texts:
I am working on Magento 2.1 CE. My current active Theme is the Default LUMA Theme

I wish to override the CORE Modules "bundle-input-type.js" located in "vendor\magento\module-bundle\view\adminhtml\web\js\components\bundle-input-type.js"

Can someone give me a detailed stepwise procedure to do the same ?

Online articles do not seem to help me much.


texts: Magento free shipping shopping cart price rule for guest and registered users for particular countries

texts:
I have created a shopping cart rule for "Free Shipping" for particular country users.

Its working only for the logged in users in the cart page, its showing "Invalid rule" for guest users in the cart page. Please any one help me please...


texts: Magento2: Is it possible to add configurable product in group product?

texts: Can you please suggest some idea that how to add configurable product in group product?


texts:
I have a custom basic admin theme but when active and I go to the admin area edit a product I get this error still.
[2020-11-13 09:46:46] main.ERROR: Unable to load theme by specified key: '' [] []

This is my di.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">

    <!-- Admin theme. Start -->
    <type name="Magento\Theme\Model\View\Design">
        <arguments>
            <argument name="themes" xsi:type="array">
                <item name="adminhtml" xsi:type="string">default/default</item> <!-- Example: "Magento/backend" -->
                <!-- fix "Incorrect theme identification key" -->
                <item name="crontab" xsi:type="string">Magento/backend</item>
            </argument>
        </arguments>
    </type>
    <!-- Admin theme. End -->
</config>


texts: After move magento to other server white screen

texts:
After i moved the a magento webshop http://www.delaviesportvoeding.nl/ ( change your host file to ip 149.210.132.3 to see the website ) i get a white screen. No erros facing up. I allready set up ini display errors. when i change the template it works so it must be something in the template.

some one can help me out?

Thnx!


texts: Create custom “Catalog Input Type for Store Owner” for magento 2

texts:
I need to create a special input type in adminhtml product form. My input will display as a table but save data as a standard text input.

Following the module Edge ProductAttachments I've created the module for magento 1.

Now a I'm trying to convert the module for magento 2, but when create a new product I obtain the error Class inputtable does not exist.

The steps to reproduce the error on an empty magento 2.0.2 installation:

Stores -> Product-> Add New Attribute
Set Catalog Input Type for Store Owner to Inputtable and Default label to Mytable
Click Save Attribute
Add the new attribute to Default attribute set
Product -> Catalog -> Add Product (simple product)

This is my code:

File: Fun/Tablegrid/etc/module.xml

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Fun_Tablegrid" setup_version="1.0.0">
    </module>
</config>

File: Fun/Tablegrid/etc/config.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <general>
            <validator_data>
                <input_types>
                    <tableinput>tableinput</tableinput>
                </input_types>
            </validator_data>
        </general>
    </default>
</config>

File: Fun/Tablegrid/etc/adminhtml/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="adminhtml_product_attribute_types">
        <observer name="tablegrid" instance="Fun\Tablegrid\Observer\AddTableinputAttributeTypeObserver" />
    </event>
</config>

File: Fun/Tablegrid/Block/Attribute/Renderer.php

<?php
namespace Fun\Tablegrid\Block\Attribute;
use \Magento\Framework\Currency;

class Renderer extends \Magento\Framework\Data\Form\Element\Text
{
    public function getHtml()
    {
        $this->addClass('input-table');
        return parent::getHtml();
    }
    //remove the other code to compact question
}

File: Fun/Tablegrid/Model/Catalog/ResourceModel/Attribute.php

<?php
namespace Fun\Tablegrid\Model\Catalog\ResourceModel;

class Attribute extends \Magento\Catalog\Model\ResourceModel\Attribute
{
    protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object){
        if ($object->getFrontendInput() === 'tableinput'){
            $object->setBackendType('text');
            $object->setFrontendInputRenderer('tablegrid/attribute_renderer');
        }
        return parent::_beforeSave($object);
    }
}

File: Fun/Tablegrid/Observer/AddTableinputAttributeTypeObserver.php

<?php
namespace Fun\Tablegrid\Observer;
use Magento\Framework\Event\ObserverInterface;

class AddTableinputAttributeTypeObserver implements ObserverInterface
{
    public function execute(\Magento\Framework\Event\Observer $observer){
        $response = $observer->getEvent()->getResponse();
        $types = $response->getTypes();
        $types[] = [
            'value' => 'tableinput',
            'label' => __('Tableinput'),
        ];
        $response->setTypes($types);
        return $this;
    }
}


texts: Event fire before save invoice in `sales_invoice` table

texts:
I want to save value in sales_invoice table of custom attribute ("current_seller_id").
i want to know any event that fire before save the invoice in sales_invoice table or use plugin of which method.
.
I already done like this functionality in sales_order table via using event sales_model_service_quote_submit_before
code is give below .

public function execute(\Magento\Framework\Event\Observer $observer)
{
    $order = $observer->getData('order');
    $quote = $observer->getData('quote');
    $quoteItems = $quote->getItems();
    foreach ($quoteItems as $quoteItem){
        if ($quoteItem->getCurrentSellerId() != ""){
            $items[]=$quoteItem->getCurrentSellerId();
        }
    }
    $seller_ids=implode(',',$items);
    $order->setCurrentSellerId($seller_ids);
    return $this;
}

Same i want to do with sales_invoice table.
Can anyone guide me ?


texts: Changing the background colour of Magento 2 based on Luma

texts:
I want to change the background colour of my magento 2 default page but it doesn't seem to be working. My code is:

Pulsestorm/StartinWithLess/etc - module.xml

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

Pulsestorm/StartinWithLess/view/frontend/layout - default.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column"
 xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento
/Framework/View/Layout/etc/page_configuration.xsd">
<head>
    <css src="Pulsestorm_StartingWithLess::red-alert.css"/>
</head>
</page>

Pulsestorm/StartinWithLess/view/frontend/web - red-alert.css

body
{
background-color:#f00;
}

Pulsestorm/StartingWithLess - registration.php

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

Any help would be much appreciated :)


texts:
I have to upload photos that are about 5-10mb each,but the default maximum size is 2mb.
I've searched in google and found that you have to edit the php.ini file and increase the amount.
However, when I go into my Cpanel, I cannot find php.ini, but there is phpsample.ini
If I go into this phpsample.ini, there is no code that has the maximum file size.
is there any other solution to fix this problem?
Thanks!


texts:
I've added Responsive Owl Slider extension to Magento.
https://github.com/gogoleva/Vsourz_Bannerslider
But i don't know how to show slider on homepage.
Readme of this extension:
For you to integrate Responsive Owl Slider extension in your Magento website, please follow these 3 easy steps:

Install the extension from Magento Connect
Create Category, Upload Image Banners, Select Category and Select Effects you want
Insert the Code Snippet where the banners to be shown

I don't know how to insert the code snippet. Please help me


texts: It is possible to addStatusHistoryComment to order without call $order->save()?

texts:
I need this because I don't want to dispatch $order->save() events.
I want to do something like $order->_getResource()->saveAttribute($order, 'statusHistoryComment');

I will be glad to any thoughts :)

UPD: It's looks like saveAttribute working with EAV model only. What about flat?


texts: Add new tab in product edit page in Magento 2.1

texts:
I want to add new tab in product edit page and for that i have follow this steps :

Create di.xml and add below code:

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <virtualType name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Pool">
        <arguments>
            <argument name="modifiers" xsi:type="array">
                <item name="modulename" xsi:type="array">
                    <item name="class" xsi:type="string">Namespace\Modulename\Ui\DataProvider\Product\Modifier\Customtab</item>
                    <item name="sortOrder" xsi:type="number">200</item>
                </item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Namespace\Modulename\Ui\DataProvider\Product\Modifier\Customtab">
        <arguments>
            <argument name="formName" xsi:type="string">product_form</argument>
            <argument name="dataScopeName" xsi:type="string">product_form.product_form</argument>
            <argument name="dataSourceName" xsi:type="string">product_form.product_form_data_source</argument>
        </arguments>
   </type>
</config>

Now I want to call custom phtml file to render html. How can I call custom phtml file ?


texts: I need to Change SEO keywords for categories. How can i Bulk Change Category Page Title, Meta Description/Keywords.


texts: Is there a way to add size chart in magento 2.1. I am new with magento and I am having trouble figuring out the cms. So, the client asked me to add size chart on single product. Any suggestion will be appreciated.


texts: Don't show the Product Detail Tab if empty (product detail)

texts:
My magento-product doesn't have any product detail infos (attributes) at my backend. But I see the empty "Product Detail Tab" on detail page. See screenshot.
How can I hide the Tabs in frontend. The Tabs are in my "catalog/product/view/tabs.phtml"

<?php foreach ($this->getTabs() as $_index => $_tab): ?>
<?php
if (($showDescription && $_tab['alias'] == 'description') || $_tab['alias'] != 'description') {
    if (($showDetails && $_tab['alias'] == 'additional') || $_tab['alias'] != 'additional') {
        if (($showDetailsTab && $_tab['alias'] == 'additional_tab') || $_tab['alias'] != 'additional_tab') {
            if ($tmpBlock = $this->getChildHtml($_tab['alias'])) {
                $_panes .= '
' . $_tab['title'] . '
';
                $_panes .= '
' . $tmpBlock . '
';
            }
        }
    }
}
?>

...

    <?php //IMPORTANT: id "product-tabs" is being used in: /catalog/product/view.phtml, /review/helper/summary*_nolinks.phtml   ?>

        <?php foreach ($this->getTabs() as $_index => $_tab): ?>
            <?php if (($showDescription && $_tab['alias'] == 'description') || $_tab['alias'] != 'description'): ?>
                <?php if (($showDetails && $_tab['alias'] == 'additional') || $_tab['alias'] != 'additional'): ?>
                <?php if (($showDetailsTab && $_tab['alias'] == 'additional_tab') || $_tab['alias'] != 'additional_tab'): ?>
                    <?php if ($this->getChildHtml($_tab['alias'])): ?>
                        <li id="tab-<?php echo $_tab['alias'] ?>"><?php echo $_tab['title'] ?>

                    <?php endif; ?>
                <?php endif; ?>
            <?php endif; ?>
            <?php endif; ?>
        <?php endforeach; ?>
        <?php echo $_extraTabs; //Append extra tabs after regular tabs ?>

<?php echo $_panes, $_extraPanes; //Append extra panels to regular panels     ?>


texts: Magento 1: How to prevents Bots which are crawling internal URL's?

texts:
Daily we get in our webservers logs hundreds of thousands of lines from bots who are visiting these paths:

/catalog/category/view/id/$1

/catalog/product/view/id/$i

where i is between 1 to 54000

As immediatelly measures:

We redirect these paths to a 404 error using in .htaccess file. As long as we use URL's rewrites nothing is affected inside Magento.
We catch the IP's and block them for a week using Fail2Ban.

Please let me know if there are any issues in time using method 1 (we did not re-index the Catalog URL's yet to see what is happening). If there are any other methods you are welcomed to reply.


texts: Magento2: store_id in UI Listing Component

texts:
I'm developing a Magento2 extension that has an admin grid which is generated using the UI Listing Component. The grid shows the records (a list of blog items) just fine. The extension allows to save blog items for specific store views which saves the blog_id together with the store_id in a separate database table. Now what I would like to do is show a column in the grid with blog items that shows the store views selected for each blog item.

The whole setup is quite similar to the CMS pages and cms_page_listing.xml. There is a column in my blog_listing.xml for the store view like this:

<column name="store_id" class="Magento\Store\Ui\Component\Listing\Column\Store">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
            <item name="sortable" xsi:type="boolean">false</item>
            <item name="label" xsi:type="string" translate="true">Store View</item>
        </item>
    </argument>
</column>

When loading the grid the following error is shown: "Notice: Undefined index: store_id in ..\vendor\magento\module-store\Ui\Component\Listing\Column\Store.php on line 82"

Obviously there is no store_id in the default collection of the blog items as it's connected through another table with the actual store_id's. But my collection looks like this and it should be in there:
app\code\vendor\module\Model\ResourceModel\AbstractCollection.php

protected function performAfterLoadBlog($tableName, $columnName) {
    $items = $this->getColumnValues($columnName);
    if (count($items)) {
        $connection = $this->getConnection();
        $select = $connection->select()->from(['blog_entity_store' => $this->getTable($tableName)])
            ->where('blog_entity_store.' . $columnName . ' IN (?)', $items);
        $result = $connection->fetchPairs($select);
        if ($result) {
            foreach ($this as $item) {
                $entityId = $item->getData($columnName);
                if (!isset($result[$entityId])) {
                    continue;
                }
                if ($result[$entityId] == 0) {
                    $stores = $this->storeManager->getStores(false, true);
                    $storeId = current($stores)->getId();
                    $storeCode = key($stores);
                } else {
                    $storeId = $result[$item->getData($columnName)];
                    $storeCode = $this->storeManager->getStore($storeId)->getCode();
                }
                $item->setData('_first_store_id', $storeId);
                $item->setData('store_code', $storeCode);
                $item->setData('store_id', [$result[$entityId]]);
            }
        }
    }
}

protected function joinStoreRelationTable($tableName, $columnName) {
        if ($this->getFilter('store')) {
            $this->getSelect()->join(
                ['store_table' => $this->getTable($tableName)],
                'main_table.' . $columnName . ' = store_table.' . $columnName,
                []
            )->group(
                'main_table.' . $columnName
            );
        }
        parent::_renderFiltersBefore();
    }

\app\code\vendor\module\Model\ResourceModel\Blog\Collection.php

protected function _afterLoad()  {
    $this->performAfterLoadBlog('vendor_module_store', 'blog_id');
    $this->_previewFlag = false;

    return parent::_afterLoad();
}

protected function _renderFiltersBefore() {
    $this->joinStoreRelationTable('vendor_module_store', 'blog_id');
}

So my question is, how do I go from here so the store_id column can be rendered with the correct store views?


texts: How the personal center displays all the product information purchased

texts: How to display all the product information purchased by the user. The product information includes (product name, rating, specification, order status, etc.)


texts:
I'm using magento 2.3.4, I have a database structure like this:

 //event
|event_id | name  |
+---------+-------+
|    1    |  Art  |
|    2    | Expo3 |

// score
| event_id |   judge     |   score  |            comment         |
+----------+-------------+----------+----------------------------+
|     1    |   Joe       |    5     | hmmmmmmmmmmmmmmmmmmmmmmmmm |
|     1    |   Love      |    4     | gooooooooooooooooooooooodd |
|     1    |   Beck      |  4.5     | wooooooooooooooahhhhhhhhhh |
|     2    |   Candence  |    3     | ouchhhhhhhhhhhhhhhhhhhhhhh |

The score table is related to the event table

I want to make a form in admin Magento 2, this form will have to add/edit the event table and add/edit multiple score for the event, I need to have like multiple score form that I can add/edit like this:

how can I achieve something like this for Magento 2 admin form?


texts: How to solve newly generated magento 2 file permission issue in ubantu 18.04?

texts:
I have install and configured magento 2 in ubantu 18.04. Everything work fine but when i am run magento2 command using cli than every time it will display file permission issue in "cache_dir" and "generated" folder.

I am try to give permission using this link Permission solution

But no luck.


texts:
When I merge CSS it creates 3 merged files, and they are served separately as such

<link rel="stylesheet" type="text/css" href="xyz.com/media/css_secure/32733c3332436554dae7e8f320cd2308.css" />
<link rel="stylesheet" type="text/css" href="xyz.com/media/css_secure/500ec48f83d706fbd5d7f451d4dabae4.css" media="all" />
<link rel="stylesheet" type="text/css" href="xyz.com/media/css_secure/ffb9623e4d4c994c96b4713dcfa604ca.css" media="print" />

How can I serve them all in one url like the Fooman Speedster. So they are like this.

<link rel="stylesheet" type="text/css" href="xyz.com/media/css_secure/32733c3332436554dae7e8f320cd2308.css,media/css_secure/500ec48f83d706fbd5d7f451d4dabae4.css,media/css_secure/ffb9623e4d4c994c96b4713dcfa604ca.css" />

This is so that I can reduce the number of http requests.


texts:
I've here a problem I try to solve since hours, but don't see the solution.

The packing unit of a product is 100.
The price for these 100 pieces is e.g. 50 $.

So I set the qty. increment to 100. That works fine and I get the message :

"Product is available for purchase in increments of 100"

But if I try to purchase one item (hundred pieces) the system will not allow that. I've to buy 100. But of course then the unit price will be multiplied with
100.

How to tell the system that 1 unit contains 100 pieces and the price therefor is
50$ and not 100 x 50 $?


texts: Reset admin grid filter programmatically in magento

texts: I want to reset the admin grid filter programatically in my custom module.


texts:
I have added a new attribute called m2_price and populated all the products with the correct values.

However, the issue I am having is with the Layered navigation. In the layered navigation the m2_price filters are shown as follows:

£0 - £10
£10 - £20
£20 - £30
£30 - £40
and so on...

However, this needs to work exactly the same as the price filter, so it should show:

£0 - £9.99
£10 - £19.99
£20 - £29.99
£30 - £39.99

But I can't figure out how to do this, I've tried overriding Mage_Catalog_Block_Layer_Filter_Decimal to extend Mage_Catalog_Block_Layer_Filter_Price calling the parent for each method but this didn't work.

Any ideas?


texts:
On my CLI i have version - 7.4.16 for my PHP
But when I try to load my website in the browser i get this

Magento supports PHP 7.1.3 or later. Please read Magento System Requirements.

What am I doing wrong ?
http://apex11.com


texts: Email template override - not showing changes

texts:
I wont to add new table column inside of my "sales_email_order_items" template file. I have found it in

/app/design/frontend/Emthemes/everything/default/Magento_Sales/templates/order/items.phtml

But whatever I change in code it does not reflected to the email template.

I tried to rename pub/ cache, view_preprocessed, generation, page_cache.

Also I run php bin/magento setup:static-content:deploy, but nothing. Email stands as it was.

What step am I missing?


texts: Magento 2 Payment Method Billing Address Country

texts:
Can one only show/allow specific countries in the billing address form in countries drop down ?

See screen shot attached. I need only/available in E.G: United Kingdom


texts: How to display cross sale products on checkout page Magento 2?

texts:
Is it possible to add cross sell products on the checkout page?
How can we do that?
Any help will be appreciated.
Thank you.


texts: requirejs load js but not work - magento 2

texts:
app/code/Vendor/Module/view/frontend/requirejs-config.js

var config = {
    map: {
        '*': {
            'gworks/jquery':'Vendor_Module/js/jquery.min'
        },

    }
};

In template file, I called like

<script type="text/javascript">
require(['gworks/jquery'],function($) {
    $(window).load(function () {
         alert('load from external jquery');
    });
});
</script>

In browser net tab above added js loaded [200 ok]

http://domainame/pub/static/frontend/Vendor/theme/en_US/Vendor_Module/js/jquery.min.js

but it still throw error in browser console like TypeError: $ is not a function and alert also does not come.

I am not familiar in requirejs so I doubted myself anything am I missing here?


texts: How can I upload colour attribute options using CSV in Magento?

texts:
I want to upload colour attribute options from a CSV file with visual swatch value. I have to import colour code for the visual swatch.

Kindly Help me!


texts:
Having a bit of an issue with this one, I managed to get a working interface to Magento by including the following code, which in turn includes the Magento 2 bootstrap.php

use Magento\Framework\App\Bootstrap;
require_once("../app/bootstrap.php");
$params = $_SERVER;
$bootstrap = Bootstrap::create(BP, $params);
$obj = $bootstrap->getObjectManager();
$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('adminhtml');
return $obj;

which returns an object that has the callable Magento methods. I've been trying to convert this into a callable class, so that I can call new magento() and have the same functionality, but in more compact code.

use Magento\Framework\App\Bootstrap;
require_once("../app/bootstrap.php");

class magento extends Bootstrap {

    public $params;
    private $bootstrap;
    public $obj;
    private $state;

    public function  __construct() {
        $this->params = $_SERVER;
        $this->bootstrap = Bootstrap::create(BP, $this->params);
        $this->obj = $this->bootstrap->getObjectManager();
        $this->state = $this->obj->get('Magento\Framework\App\State');
        $this->state->setAreaCode('adminhtml');
        return $this->obj;
    }
}

However, when running this class, the subsquent code

$product = $obj->get('Magento\Catalog\Model\ProductRepository')->getById( $entity_id );

the get function is being called from the magento class, not the $object

Fatal error: Uncaught Error: Call to undefined method magento::get()

I think I'm missing something obvious, but can't quite get my head around it.


texts:
I installed a plugin from amasty. This plugin adds a field "delivery_date" and "delivery_time" attribute to each order.

Now I am creating orders manually too and now my question is how can I set custom fields to an order?


texts: Magento2.3: Undefined variable: customergroupid

texts:
I'm getting the below error when I browse the following URL:

http://127.0.0.1/mywebsite/customer/account/create

1 exception(s):
Exception #0 (Exception): Notice: Undefined variable: customergroupid in /var/www/html/mywebsite/app/design/frontend/Module/vendor/Magento_CustomerCustomAttributes/templates/form/userattributes.phtml on line 27

I have checked the path and see I have below code:

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

// @codingStandardsIgnoreFile

?>
<?php
/**
 * Create account form template
 *
 * @see \Magento\CustomerCustomAttributes\Block\Form
 */
/* @var $block \Magento\CustomerCustomAttributes\Block\Form */
?>
<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customerSession = $objectManager->create('Magento\Customer\Model\Session');
if ($customerSession->isLoggedIn()) {
     $customergroupid = $customerSession->getCustomer()->getGroupId();
    //echo $customergroupid;

}
?>
<?php if(($customergroupid == 4) || ($customergroupid == 5) || ($customergroupid == 6)): ?>
<?php if ($block->hasUserDefinedAttributes()): ?>
    <?php if ($block->isShowContainer()): ?>
    <fieldset class="fieldset">
    <?php endif;?>
    <?php foreach ($block->getUserDefinedAttributes() as $attribute):?>
        <?php $attributeContent = $block->getAttributeHtml($attribute);?>
        <?php if ($attributeContent): ?>
            <?= /* @escapeNotVerified */ $attributeContent ?>
        <?php endif;?>
    <?php endforeach;?>
    <?php if ($block->isShowContainer()): ?>
    </fieldset>
    <?php endif;?>
<?php endif; ?>
<?php endif; ?>

How can I resolve this issue?

Your help will be greatly appreciated!


texts: Creating and placing a widget through install script

texts: Can I create a widget instance and assign it to a specific page to appear through install script? I'd like to have some functionality similar to sample contents, but with widgets. To be more specific, my question is aimed at creating instances of widgets and placing them on certain pages programmatically through install script.


texts:
I tried to change the subtotal value of cart. I used sales_quote_collect_totals_after event to change it, and inside the observer, i do the code below, but nothing change, where should i change the subtotal value?

Observer :

$quote = $observer->getEvent()->getQuote();
$total=$quote->getBaseSubtotal();
$quote->setSubtotal(0);
$quote->setBaseSubtotal(0);

$quote->setSubtotalWithDiscount(0);
$quote->setBaseSubtotalWithDiscount(0);

$quote->setGrandTotal(0);
$quote->setBaseGrandTotal(0);


texts: what is the best way to make Controller execution code run in background?

texts:
i have built a new Magento 2 module that get Data from external API and save these data to database.
my problem is that some Requests take too much time.. also may there will be many users requesting data from the same api at the same time.
Note: i'm using Controller to get the data from helper and save it to DB.
so my question here is: what is the best way to make this scenario happen..
1- when the user run the Request i need to check if the data in database then redirect him to the result page.
2- if the requested Data not in Database then make the Request run in background and redirect the user to spesific page while the Data loading in background.
any idea to solve this?
Thanks


texts:
Is it possible to create product page like this

http://tpy-urbancolors.com.tempwebsite.net/products/c13-montana-black-400ml/

Please guide me or suggest any extension


texts: How to store category id and also category name in custom table two different entity in magento 2?

texts:
How to Store category id and also Store category name in custom table two entity
public function toOptionArray()
    {
        $options = [];
        $categories = $this->collectionFactory->create()->addFieldToSelect('is_active', 1)
            ->addFieldToSelect('is_active')->addFieldToSelect('name')
        ->addFieldToSelect('entity_id')->addAttributeToFilter('level' , 2)->setStoreId(2);

        $options[] = array('value' => '0', 'label' => 'All Category');
        foreach ($categories as $category){
            $options[] = [
                'value' => $category->getEntityId(),
                'label' => $category->getName(),
            ];
        }
        return $options;
    }

Admin Form code
 <field name="category_id" sortOrder="18" formElement="select">
        <settings>
            <validation>
                <rule name="required-entry" xsi:type="boolean">true</rule>
            </validation>
            <dataType>text</dataType>
            Categry Id
            <dataScope>category_id</dataScope>
        </settings>
        <formElements>
            <select>
                <settings>
                    <options class="Vrinsoft\Appscreens\Model\Allsection\Source\Categories"/>
                </settings>
            </select>
        </formElements>
    </field>
    <field name="category_name" sortOrder="19" formElement="input">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">allsection</item>
                </item>
            </argument>
            <settings>
                <validation>
                    <rule name="required-entry" xsi:type="boolean">true</rule>
                </validation>
                <dataType>text</dataType>
                Category Name
                <dataScope>category_name</dataScope>
            </settings>
        </field>


texts: Magento 2 : Store credit does not deducted on reorder from admin

texts:
Issue : When we reorder from admin, & pay using customer store credit balance then order gets placed but store credit doesn't get deducted.

Using Magento/2.4 (Enterprise)
Steps to replicate error

Issue store credit in M2 via credit memo.
Go to customer’s account in M2
Click reorder
Add or update item if necessary
Edit prices if necessary
Edit addresses if necessary
Select Store Credit as payment method and select shipping method
Click submit order

Then if you look at the customer’s account the store credit did not get auto-deducted.
I have checked class
Magento2/vendor/magento/module-sales/Controller/Adminhtml/Order/Create/Save.php

But i did not found any code here that deduct store credit for order when order paid using customer store credit.
Any thoughts on this please ?


texts:
I have created a career module and jobs can access from below url.

mysite.com/careers

This page shows list of jobs with each job shows "View More" button.

When I click on the "View More" button then open a new page and must be show that selected job full details. So this single page link like to be:-

mysite.com/careers/jobdetails/index/view/1

Here "1" means job ID.

app/code/community/Sumith/Careers/Block/Jobdetails.php

<?php
class Sumith_Careers_Block_Jobdetails extends Mage_Core_Block_Template
{
    public function __construct()
    {
        parent::__construct();
        $datasets=Mage::getModel('careers/jobdetails')->getCollection()->addAttributeToSort('sh_job_details_id', 'DESC');//->addAttributeToSelect('*');

        $this->setDatasets($datasets);
    }

    protected function _prepareLayout()
    {
        parent::_prepareLayout();
        $pager = $this->getLayout()->createBlock('page/html_pager')->setCollection($this->getDatasets());
        $this->setChild('pager', $pager);
        $this->getDatasets()->load();
        return $this;
    }

    public function getPagerHtml()
    {
        return $this->getChildHtml('pager');
    }
} // end of the class

app/code/community/Sumith/Careers/controllers/JobdetailsController.php

<?php
class Sumith_Careers_JobdetailsController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        $this->loadLayout();
        $this->getLayout()->getBlock("head")->setTitle($this->__("Job Details"));

        $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");

        $breadcrumbs->addCrumb("home", array(
            "label" => $this->__("Home Page"),
            "title" => $this->__("Home Page"),
            "link"  => Mage::getBaseUrl()
        ));

        $breadcrumbs->addCrumb("careers", array(
            "label" => $this->__("Job Details"),
            "title" => $this->__("Job Details")
        ));

        $this->renderLayout();
    }
} // end controller class

I'm using magento 1.9 version.

If anyone can help me to fix this appreciate that.


texts: Unable to change the Shipping Address Label and to add drop-down value under text box in checkout page Magento 2.x

texts:
I was trying to change the Checkout page shipping address fields label but I can't find the files where I can change them.

I have checked all the files of shipping address files but I am unable to change the Label text.

Please Magento 2.x default checkout shipping address fields label and also check my desire text label for shipping address.

Is there anyone to help me out.

Please check my screenshots below.
1. Magento 2.x Default Checkout page url: https://cloud.githubusercontent.com/assets/22374102/25710262/92983352-310d-11e7-8676-6c333a13e6f8.png

Custom Checkout screenshot url link: https://cloud.githubusercontent.com/assets/22374102/25710264/92d236ec-310d-11e7-9a3e-fe82416e7041.png


texts:
I'm trying to install Magento 2.4.0 and I keep getting the "Access Denied" for user:
'root'@'localhost' (using password: NO)
I'm using Wamp64 Web Server to configure it and using Mysql 8.0.21. I can see that my root user has all privileges' granted to the magento DB. Also, root has a password but is showing with NO Password. This is the install command I'm  trying:
Administrator@Windows MINGW64 /c/wamp64/www/magento
$ php bin/magento setup:install
--base-url=http://store.magento.com:8080/
--db-host=localhost
--db-name=magento
--db-user=root
--db-password=password123
--admin-firstname=magento
--admin-lastname=user
--admin-email=myuser@gmail.com
--admin-user=admin
--admin-password=password123
--language=en_US
--currency=USD
--timezone=America/Chicago
--use-rewrites=1

And, this is the response I get:
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

In InstallCommand.php line 274:

Parameter validation failed

Could this be affected because my bash creds are showing as: Administrator@Windows or what should I be a checking to see that root has access?
Thank you so much for the help!


texts:
I'm facing a strange issue which I cannot still figured out. When I logged in Magento admin panel and try to upload an image to a static block, Magento auto log-outs. Actually whenever I try to upload anything in admin panel it automatically log-outs. Var and it's inner folders have permission 775.

Can anyone figure this out?


texts: I have added new product enable it -> in stock -> assign category but still not showing on the storefront. Why?


texts:
I have 3 websites in one Magento installation.

I have deleted 2 websites.

Now how do I delete more data from database to reduce my db size?


texts: How to hide success message after some time in contact us page success?

texts:
I tried below way to hide a success message after some time in contact us page. But Not working.

  app\code\Eight25media\Messagehide\view\frontend\requirejs-config.js

var config = {
"map": {
    "*": {
        "Magento_Theme/js/view/messages": "Vendor_Module/js/view/messages",
    }
}
}

  app\code\Eight25media\Messagehide\view\frontend\web\js\view\messages.js

define([
'jquery',
'uiComponent',
'underscore',
'Magento_Customer/js/customer-data',
'jquery/jquery-storageapi'], function ($, Component, _, customerData) {
'use strict';
return Component.extend({
    defaults: {
        cookieMessages: [],
        messages: []
    },

    /** @inheritdoc */
    initialize: function () {
        this._super();

        this.cookieMessages = $.cookieStorage.get('mage-messages');
        this.messages = customerData.get('messages').extend({
            disposableCustomerData: 'messages'
        });

        if (!_.isEmpty(this.messages().messages)) {
            customerData.set('messages', {});
        }

        $.cookieStorage.set('mage-messages', '');
        setTimeout(function() {
            $(".messages").hide('blind', {}, 500)
        }, 5000);
    }
});
});

How can i give a time out to contact us success message?


texts:
I am importing a large csv file(about 5.5 MB). Whenever I try to import it gives error

Product with specified super products SKU not found in rows

I have googled this issue and found that it is something related to configurable products.
But I was unable to find exact solution for this.
Please help.

EDIT

Below is the screen shot of first product in my CSV.

And the following screen shot have the products that just came after first product


texts: How to Create Custom Grid Filter Show All "NULL" Values in Specific Column

texts:
How can I make a filter for null values of my order ID

<column name="order_id">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
                <item name="filter" xsi:type="string">text</item>
                <item name="editor" xsi:type="array">
                    <item name="editorType" xsi:type="string">text</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">false</item>
                    </item>
                </item>
                <item name="label" xsi:type="string" translate="true">Order ID</item>
            </item>
        </argument>
    </column>

If a enter NULL in my filtering it should just show all row where Order ID is NULL or Blank


texts: Magento 2: Difference between flush catalog images cache and manually deleting files

texts: Is there a difference between using the Flush Catalog Images Cache button in admin and removing the files in pub/media/catalog/product/cache via command line?


texts: How to get URL rewrite Target Path programmatically

texts: I need to get programmatically the "Target Path" field that I have set in the Magento 1.8 Admin Panel, using Catalog -> URL rewrite management. How do I get it?


texts: Magento Table Rates shipping price is not beeing calculated correctly

texts:
I have set up a simple Table Rates for my store.

The rules are based on Price vs Destination. I have it set up:
if the price is lover that 35 then shipping is 2.99 and if higher then 0.

But I don't know why, but Magento calculates it wrong... Please see attached screenshot.

Anyone has a clue why this is happening?

I have the prices (product and shipping) tax included and everything...

I don't get it, it seems like Magento is taking to account the price without Tax and based on that price applies shipping cost's, but I want it to take a subtotal with Tax included and apply the correct shipping cost based on that amount.

Any ideas on how to fix this?

Thank you,


texts: Mandrill sending order confirmation mails 2 times

texts:
I am facing an issue with Mandrill extension. I installed Mandrill extension because order confirmation mails were going to spam. That issue is resolved but now order confirmation mails coming 2 times. What can be the issue?

I have disabled SMTPPro extension also but if I enable SMTPPro extension and disable Mandrill extension then mails are going in spam :(

I have also tried this solution (1st answer)  New order email being sent twice


texts:
First of all this might not be the right place to ask this question, if this is the case please let me know where the right place is?

Currently there is the module best practice reference on http://devdocs.magento.com/guides/v2.1/ext-best-practices/bk-ext-best-practices.html

In the first few days with Magento2 I have tried finding out what the 'best' way is of doing things with Magento2 and there does not seem to be a place which tells any new Magento2 developers what the plan is for Magento2 (e.g. what is going to be deprecated) and how to take a new approach to development.

As an example load and save are now deprecated I found a bit of info on Deprecated save and load methods in Abstract Model but there does not seem to be any real guidance from Magento on this.

another example is: Magento 2: Plugin vs Observer because of previously mentioned deprecation of methods a clear guide from Magento itself would be really good, in the current best practices for module developers I can not find anything along the lines of 'When possible use Plugins as particular events might become deprecated over time'

My Question: is there a location where these kind of changes are set out and how to approach these changes as a developer?


texts: A way to change the shipping method of an Order

texts: Is there a way to change programmatically the shipping method and consequently the shipping prices associated to an existing Magento Order when the order was already placed ?


texts: Where do we store persistent single variables in Magento 2 (module settings)?

texts:
I've read through the Magento 2 dev docs, and I can't seem to find were we store persistent variables, if at all. I'm trying to store a token value for a custom module.

I've searched a fair amount online, researching saving to the registry, but the registry doesn't save data persistently. I see that Magento 2 has "variable" and "variable_value" tables--is this where they are stored?

I'm looking for something like wp_option in WordPress or variables in Drupal 7, if anyone is familiar.

Or is it the case that we create our own tables to save module settings?


texts: Pre-Warming the Magento Enterprise Full Page Cache

texts:
The performance benefits of the full page cache in Magento Enterprise are fairly well known. What may not be quite so well known is that for the full benefit of this to be realized, it must be fully populated and hot, particularly on large product sets where you don't have just a few pages thus making use of organic traffic to prime it speedy enough.

Magento includes a built-in cronjob to crawl the site and warm the FPC early in the morning.

I've seen and heard of issues caused by early morning jobs taking too long to run, blocking other jobs from running, and would like to know what others use or would suggest be used to do this. A couple ideas I have are:

Put together a shell script to crawl every page in the generated sitemap file.
Use a separate crontab entry and a short PHP script to bootstrap Magento and execute the crawler process directly.

Any thoughts and/or experience on this is welcome!


texts: Magento 2.1 Notes for this Order no email customer option

texts:
We have a Magento 2.1 store we are setting up and just created a test order and noticed in the Notes for this Order section of the order admin panel there is no way to click a checkbox or anything to be able to email the customer the order note?

I am not sure if this is that way magento 2.1 is it doesn't allow you to email order notes to a customer or if I have a setting that I might need to enable? All I have is a "visable in frontend" checkbox?


texts:
How can I get all columns all or all attributes on product if there is no data on it?

For example this one :

How can I get the list of (post_id, name, url_key, post_content, tags, status, featured_image, created_at, updated_at).


texts: When i tried to export the customer i got this error Undefined offset: 0 in magento 2.3

texts:
I tried to export the customer from the magento i caught the error i didn't got any solution to resolve it.

  Notice: Undefined offset: 0 in
  /var/www/html/development/amt/vendor/magento/module-customer/Ui/Component/DataProvider/Document.php
  on line 171

Thanks in advance :)


texts: Magento2 - Adding a new extension attribute to customer / no customer attribute

texts:
I am new to the Magento world.
I would like to create a new extension attribute for Customer.
The idea is for a new attribute to appear in the customer edition: favourite type of coffee.
I've read the docs and various other posts, but still don't get it. Could someone explain it to me on the example above, how to do it step by step, or at least suggest how to do it?