texts: Magento 2.4 sales_order_invoice_grid populate custom column with values

texts:
I have added the column transaction_id to my sales_order_invoice_grid.
Vendor\Module\etc\adminhtml\di.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <virtualType name="Magento\Sales\Model\ResourceModel\Order\Invoice\Grid">
        <arguments>
            <argument name="columns" xsi:type="array">
                <item name="transaction_id" xsi:type="string">
                    sales_invoice.transaction_id
                </item>
            </argument>
        </arguments>
    </virtualType>
</config>

Vendor\Module\view\adminhtml\ui_component\sales_order_invoice_grid.xml
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_invoice_columns">
        <column name="transaction_id">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">Transaction ID</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

The header of the column appears as expected in the sales_order_invoice_grid and also in the CSV export file, which can be generated on this page.
The problem is the values are missing.

Can anyone say what I am missing or what could be wrong?
Thanks


texts: Magento 2.3.0 : Getting error in static content deploy command

texts: I am using Porto and updated Magento from 2.2.5 to 2.3.0 while deploying static content I am facing error that styles-1.css missing in the theme folder.


texts: Connecting Component Manager with Marketplace Account

texts:
We just created an instance of a 2.1 EE version. Everything works well and seems to work. But when we try to sign in into the component manager with our Magento account we get a RuntimeException with the following error (using wrong credentials specifically gives us a bad credentials warning):

Message:
Couldn't get available versions for package magento/framework-foreign-key

We didn't change any code yet. Does any know how we can proceed?


texts: How do I reference a block that only has an alias, and no name in Magento 2?

texts:
I am attempting to modify some arguments for a block that is defined in module-sales/view/adminhtml/layout/sales_order_view.xml on line 41.

<block class="Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer" as="default" template="order/view/items/renderer/default.phtml">

The problem, is that the block is not defined with a name, it only has an alias, so I am unable to use something like <referenceBlock name="default"/> to modify it.

I need to modify the "columns" argument inside this block.
Is there any other way to reference this block, or am I pretty much out of luck?


texts: What causes the following error: Warning: Illegal string offset 'is_in_stock' ... AdvancedInventory.php on line 87

texts:
During module development I've been writing a plugin which modifies the product options collection before it was loaded (adds a description field). Here is it:

  etc/di.xml

<type name="Magento\Catalog\Model\ResourceModel\Product\Option\Collection">
    <plugin name="addOptionDescription" type="Vendor\Module\Plugin\Product\Option\Collection" sortOrder="10" disabled="false"/>
</type>

Code:

<?php
namespace Vendor\Module\Plugin\Product\Option;

use Vendor\Module\Model\OptionDescription;
use Magento\Catalog\Model\ResourceModel\Product\Option\Collection as OptionCollection;

class Collection
{
    /**
     * @var \Vendor\Module\Helper\Data
     */
    protected $helper;

    public function __construct(
        \Vendor\Module\Helper\Data $helper
    ) {
        $this->helper = $helper;
    }

    /**
     * @param OptionCollection $subject
     * @param bool $printQuery
     * @param bool $logQuery
     * @return array
     */
    public function beforeLoad($subject, $printQuery = false, $logQuery = false)
    {
        if (!$subject->isLoaded()) {
            $this->addDescriptionToResult($subject);
        }

        return [$printQuery, $logQuery];
    }

    /**
     * Add description to result
     *
     * If yo get error message "Warning: Illegal string offset 'is_in_stock' ... "
     * @see http://devdocs.magento.com/guides/v2.0/install-gde/trouble/php/tshoot_opcache.html
     *
     * @param OptionCollection $collection
     * @return OptionCollection $collection
     */
    private function addDescriptionToResult($collection)
    {
        $tableName = OptionDescription::TABLE_NAME;
        $joinDescriptionExpr = 'main_table.unique_option_id = option_description.unique_option_id AND option_description.store_id = 0';

        $collection->getSelect()->joinLeft(
            ['option_description' => $tableName],
            $joinDescriptionExpr,
            ['description' => 'description']
        );

        return $collection;
    }

    /**
     * Resolve current store id
     *
     * @return int
     */
    protected function getStoreId()
    {
        return $this->helper->resolveCurrentStoreId();
    }
}

Everything seems to be ok, but... When I try to load the existing product edit page (on backend) I see the following error:

  Warning: Illegal string offset 'is_in_stock' in [...]/vendor/
  magento/module-catalog-inventory/Ui/DataProvider/Product/Form/
  Modifier/AdvancedInventory.php on line 87

In case I make changes as it is indicated in docs (set opcache.save_comments = 1 inside mine php-fpm config) everything works fine. But I can't understand, which code causes the error above and how can I prevent it without config modifications ?


texts: Moving Live database to a staging Server (M1)

texts:
I am moving my live database to a staging server in order to setup a development environment. I took two dumps of my live database

structure without data dump
data dump excluding the log tables

After creating my database, I can easily import the structure dump without any problem. When I try and import the data dump into staging database it throws an error. I have set foreign_key_check to 0 in the top line of the data dump file.

  1005 - Can't create table 'staging_magento.#sql-a2b7_3b99c8a'

Here is the line of sql that throws this error

ALTER TABLE `admin_rule`
ADD CONSTRAINT `FK_ADMIN_RULE_ROLE_ID_ADMIN_ROLE_ROLE_ID` FOREIGN KEY
(`role_id`) REFERENCES `admin_role` (`role_id`) ON DELETE CASCADE ON UPDATE
CASCADE;

I have looked into this issue and found that it may have occurred  because admin_rule and admin_role might not be InnoDB engine tables but I have checked and their engine is set to InnoDB.


texts: Need help in fixing redirects. My website is working super slow since yesterday

texts:
Since yesterday my website is working very slow suddenly I don't know what happen. If I truncate core_url_rewrite then it opens fast but then I have to reindex the website to make it function 100%. Now I also used Gtmetrix to scan my website and this is the result I got.

I really don't know how can i fix this issue, please if anyone can help me. Thanks


texts: Trying to mock Store getLocale, getting "Method cannot be configured..."

texts:
I have this Magento 2 unit test code:

    $storeInterfaceMockDe = $this->getMockBuilder(\Magento\Store\Model\Store::class)
        ->disableOriginalConstructor()
        ->setMethods(['getLocaleCode'])
        ->getMock();
    $storeInterfaceMockDe->expects($this->any())->method('getLocalCode')->willReturn('de_DE');

But PHPUnit throws:

  Trying to configure method "getLocalCode" which cannot be configured
  because it does not exist, has not been specified, is final, or is
  static

But the core uses similar code.

What am I doing wrong?

Actually the method is a magic method, so it really does not exist -- but why does it work in the core code?


texts:
I'm attempting to build a widget that allows the customer to build product tabs.

I'm using conditions to allow the user to filter on products (using the core CatalogWidget conditions block)

Widget.xml:

<parameter name="condition_1" xsi:type="conditions" visible="true" required="true" sort_order="10" class="Magento\CatalogWidget\Block\Product\Widget\Conditions">
    Conditions
</parameter>
<parameter name="condition_2" xsi:type="conditions" visible="true" required="true" sort_order="10" class="Magento\CatalogWidget\Block\Product\Widget\Conditions">
    Conditions
</parameter>

When I add 2 conditions like this to my widget.xml, I receive the following error in system.log:

  [2019-03-26 09:44:55] main.CRITICAL: An element with a
  "conditions__1__type" ID already exists. [] []

I've attempted to amend the elementId using a custom Conditions class and amending the output html like:

public function getInputHtml()
{
    $this->input = $this->elementFactory->create('text');
    $this->input->setRule($this->rule)->setRenderer($this->conditions);
    $this->input->setId($this->element->getId());
    return $this->input->toHtml();
}


texts:
I'm wondering if you can use Magento's ifconfig in layout xml for string comparrison?  Something like the below:

<action method="addCss" ifconfig="mdloptioncolor/genral_theme_setting/style_option==3"><stylesheet>'css/skyblue-color.css</stylesheet></action>

I've tried this but it does not work, is there a way of doing this?

Basically, instead of checking for a Boolean condition set by the user from the admin panel with a yes/no drop down, can check a for a string comparison in a drop down with multiple options


texts:
I created a new product under category domain.com/product/alpha, and when I open domain.com/product/alpha I can see the product, however when I click the product instead of opening the URL as domain.com/product/alpha/sampleProduct it opens as domain.com/sampleProduct.
I googled and found that I need to rewrite the URL in Marketing, but if it's the solution, isn't it odd? shouldn't the product be created under the category because I added it under that category?
Now if I have 200 products, editing each product is gonna take time. Please tell me whats the solution here, or if I did something wrong?
UPDATE:
I added a custom url under search engine optimization, but the new url now becomes domain.com/product/alpha/product/alpha/sampleProduct rather than domain.com/product/alpha/sampleProduct.


texts: Create customer in Magento 1.x via API REST

texts:
I am trying to create a new customers via an own API Model in Magento. Can't get the 'password' field from the POST request.

 /**
 * Create customer
 *
 * @param array $data
 * @return string
 */
protected function _create(array $data)
{
    /** @var $validator Mage_Api2_Model_Resource_Validator_Eav */
    $validator = Mage::getResourceModel('api2/validator_eav', array('resource' => $this));
    $data = $validator->filter($data);

    var_dump($data); //There is no 'password' field.


texts: How to display Vat Tax & Product Price separately on cart page in Magento 2

texts: I'm using VAT tax as including in product prices, But on cart page in Subtotal section i want to show original product price + Vat tax as separately. I'm trying but i could not fix this issue. in magento 1 i was fix this issue and working fine but in magento 2 i'm facing this serious issue. please check below images, first image of magento 1 is working fine but in 2nd pic you can see vat is not showing and total order is showing without Vat. I'm using magento 2.1


texts: bulk import url rewrite management for products

texts: Is there an extension, or a way using MAGMI by which I can import a csv containing the URLs and paths I wish to rewrite? Seems customary but I think I am missing something.


texts: Remove Custom Category From Database (Query)

texts: Can any body tell me where is category attribute stored in magento database ? And how could I remove it from MySQL?


texts: Mix a configurable product with custom options

texts:
We're trying to achieve a certain functionality using Magento and wondering what is the best way.

The scenario is as follows and similar to this page: https://www.go-in.co.uk/chairs/14424/grand-bistro-chair-0650/

Item Page:

Each product (a chair in this instance) has both "pre-defined" options and "customization options".
Each of the "pre-defined" options has a unique product URL, image, description and price.
Each of the "customization options", based upon the selection, has a unique product image, description and price (no unique URL in this case).

Category Page with Layered Navigation:

In the category page:

Only one main product (which is in the list of "pre-defined") is shown for each of the configurations.
Upon filtering, choose only one product configuration from the "pre-defined" list (https://www.go-in.co.uk/chairs/?f_152=7644) and show it in the category page.

Comments:

Let's assume we have an image available for each of the product's selections (which includes the "customization options" selections).
There is another set of items - think of a sofa. These items also have color options but also have a height and length options. We do not want to combine these in an attribute but simply as a custom option selection.

We were thinking of using a configurable product as the main product, with certain amount of "pre-defined options". These will have to be set to "not visible individually" and we will have to pull them somehow only when filtered. The issue with this approach comes into play on second set of sofa items where we would also like to include other type of options which are not described in attributes via the configurable product.

Your suggestions are appreciated.

Thank you!


texts: Magento 2: error 500 and issue with a Composer

texts:
I have an error 500 "site is currently unable to handle this request"., and this is what logs are writing:

[Wed Jul 25 07:21:16.343013 2018] [php7:warn] [pid 396] [client 176.125.35.8:44830] PHP Warning:  require_once(/opt/site/magento2/vendor/composer/autoload_real.php): failed to open stream: Permission denied in /opt/site/magento2/vendor/autoload.php on line 5
[Wed Jul 25 07:21:16.343052 2018] [php7:error] [pid 396] [client 176.125.35.8:44830] PHP Fatal error:  require_once(): Failed opening required '/opt/site/magento2/vendor/composer/autoload_real.php' (include_path='.:/usr/share/pear:/usr/share/php') in /opt/site/magento2/vendor/autoload.php on line 5

What I did:
rm -rf vendor/*
composer install
magento setup:static-content:deploy

And here's autoload.php:
 <?php
 // autoload.php @generated by Composer
 require_once __DIR__ . '/composer/autoload_real.php';
 return ComposerAutoloaderInit9a57ea70d7384ed87e1dc08bd2c8c9ab::getLoader();


texts: Showing changes on header.phtml only on homepage?

texts: So I am adding a feedback widget on the header.phtml file, works fine on the homepage but doesn't show on the other pages. Does anybody know?


texts: How to get sales with rest API in magento 2?

texts:
I have tried the following, but I get Consumer is not authorized to access %resources" error. Is there something I'm missing? Can you suggest another way to retrieve sales?

curl -X POST "http://magento2.app/index.php/rest/V1/integration/admin/token"      -H "Content-Type:application/json"   -d '{"username":"admin", "password":"test1234"}

The token returned is: 5si930daobo3t529j8yq6xx3wp77x2vf
I plug it in the next request:

curl -X GET -H "Authorization: Bearer  5si930daobo3t529j8yq6xx3wp77x2vf" -H "Cache-Control: no-cache" -H "Postman-Token: 366814d0-e058-7b89-c896-5670fb4fadb9" 'http://magento2.app/index.php/rest/V1/orders?criteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bfield%5D=status&criteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bvalue%5D=processing'

error message is returned:

{"message":"Consumer is not authorized to access %resources","parameters":{"resources":"Magento_Sales::sales"}}

Magento 2 Rest API: http://devdocs.magento.com/guides/v2.0/rest/restApi/restCollection/Magento/Sales/Service/V1/OrderList/orderList.html

Token-based authentication:
http://devdocs.magento.com/guides/v2.0/get-started/authentication/gs-authentication-token.html


texts:
I want to understand what "Code Applied" row in order totals is used for. this is a question I recieved from ERP team.
I have applied a fixed amount coupon, everything works fine, but in Order Totals, I have 2 lines about discount;


texts: How to load category (selected id's) in observer

texts:
In my observer, i need to load my selected category id's & selected website,

workout:

$category_products  = Mage::getModel('catalog/category')
    ->addAttributeToFilter('category_id', array('in' => array('680','894','895')))
   ->setWebsiteId(2);               // load website id

If i compare with my cart,

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

observer not triggered.


texts: Source model "mobilegifting / attributes_distribution" for the attribute "distributionsweg" was not found | Magento1

texts:
I am facing "source model "xxx / xxx_xxx" for the attribute "xxx" was not found" with many module who's module name(Retailo_MobileGifting) is canonical.

To change the name of all module is not a good idea.
How can I solve it.


texts:
Apparently, now Magento 2 supports uninstall scripts that allow db schema modification when uninstalling a module (horay!!).
As explained in here this only works for module installed via composer.
(I hope it will work in the future for all modules, but that's a different issue).
Let's say I have a module called Testing_Demo.
This module does 3 things that I would like to be removed when uninstalling it.

adds a table called testing_demo. So I need to drop it.
adds a product attribute called demo. So this needs to be removed
has some settings in system->configuration that might or might not be stored in the table core_config_data. All these settings have the path testing_demo/.... So these need to be removed also.

How should my module uninstall script look like?


texts: catalog price rules automaticaly removed after 12:00 am everyday when date change

texts: I have been applied Catalog price rules on some categories from some DATE to some DATE and it works OK but when date change on every midnight the rules are disable. i don't know why its happen please guide me anyone how to fix that


texts: How to add some special characters like "d'expédition" in email subject of magento subject from html template


texts: Show only the products of the selected category and not all the subcategorie products

texts:
Magento 1.9 includes all the products of the selected category and all the subcategories in the product list on the frontend.

I have configurable products in the main category and all the simple products in subcategories.

It is important for SEO that only the selected category products are shown to be indexed by Google.

Therefore I only want the products listed in the selected category.

I have searched this forum and others but I couldn't find a solution.
In the file catalog/product/list.phtml the method getLoadedProductCollection is used to get the product collection.

How can I change the collection to get the desired effect so that only the products in the selected category are returned?


texts: Magento 2 - Simple product Price and description not showing on product page

texts:
I tried to add simple product in Magento 2.2.6. Product created successfully but I viewed product detail page, price and short description are missing. I edit my product again and add a attribute option (like color or size) in configure tab. Price and description are now showing after attribute value/option.

Is configurable attribute option is required for also simple product?

Thanks


texts: Magento 2 REST API - Override Item Price while adding to Cart

texts:
I am trying to create orders via REST API with the steps listed in the following link.

  http://devdocs.magento.com/guides/v2.2/get-started/order-tutorial/order-intro.html

I want to change the price of the item when adding to the cart. But the price is not getting overridden and it always takes the default Product price.

Any possible help would be appreciated.


texts: Change product price according to visitor's country

texts:
I want to display different prices for the product according to visitor's country.

For ex.
For product ABC:
Price x should be displayed for country A.
Price y should be displayed for country B.
Is there any way to do it without creating any other store?
Thanks in advance.


texts: Transactional Email - Magento 1.9 Email Order Notification

texts:
I recently purchased some templates from theme forest.
https://codecanyon.net/item/magento-custom-email-templates-pro/19175962?s_rank=2

installed on the server and all is working great, I noticed in the code the images (thumbnails) were not showing up.

The code looks like this here,

foreach ($wa_data['items'] as $key => $value) {
$vars = get_object_vars ($value);
$_product = Mage::getModel('catalog/product')
            ->setStoreId($value->getOrder()->getStoreId())
            ->load($value->getProductId());
$item = array(
  'url' => $_product->getProductUrl(),
  'imgUrl' => Mage::getModel('catalog/product_media_config')
                   ->getMediaUrl($_product->getThumbnail()),
  'name' => $value->getName(),
  'sku' => $vars['_data']['sku'],
  'description' => $vars['_data']['description'],
  'number' => $vars ['_data']['product_id'],
  'qty' => intval($vars['_data']['qty_ordered']),
  'price' => $wa_data['symbol'] . ' ' . intval($vars['_data']['base_price']),
  'total' => $wa_data['symbol'] . ' ' . intval($vars['_data']
['base_row_total']),
);
 $wa_data['items'][$key] = $item;
}

I'm wondering if there is an issue here,

'imgUrl' => Mage::getModel('catalog/product_media_config')
               ->getMediaUrl($_product->getThumbnail()),

on the image in the code it looks like this here,

<a href="<?php echo $_item['url']; ?>"><img src="<?php echo $_item['imgUrl'] ?>" alt="<?php echo $_item['name'] ?>" />

Can you please help me get these thumbnails working. I'm using Magento 1.9.3

Any help understanding what is would be highly appreciated


texts:
How can i get item custom option from shipment item

my code is as

I am tring to get this using $options = $item->getProductOptions(); but it gives blank.

    <?php $_order = $this->getOrder() ?>
<?php $group = $this->getGroupcode(); ?>
<?php $shipmentId = $this->getShipmentid(); ?>
<?php if ($_order): ?>
<?php foreach($_order->getShipmentsCollection() as $shipment): ?>
    <?php foreach($shipment->getItemsCollection() as $item): ?>
        <?php
        $options = $item->getProductOptions();
        echo "<pre/>";print_r($item->getData());exit;
        $lineId = $options['info_buyRequest']['additional_options']['productline_id'];
        $groupId = Mage::getModel('productline/productline')->load($lineId)->getShippinggroup();
        if(!empty($options['info_buyRequest']['additional_options']['item_shippinggroup'])){
            $itemGroup = $options['info_buyRequest']['additional_options']['item_shippinggroup'];
        }else{
            $itemGroup =  trim(Mage::getModel('shippinggroup/shippinggroup')->load($groupId)->getTitle());
        }
        ?>
        <?php if($group == $itemGroup && $shipmentId == $shipment->getIncrementId()): ?>
        <?php echo $this->getItemHtml($_item) ?>
        <?php endif; ?>
    <?php endforeach; ?>
<?php endforeach; ?>
<?php endif; ?>


texts: How do I disable products when they become "out of stock"

texts:
I'd like to have items automatically change to disabled once they become "out of stock".

The default options simply remove the add to cart button but the product is still viewable if you have the products URL. This causes issues as products are still showing up in Google shopping, costing my client unnecessarily as customers are clicking through to the product, seeing it's unavailable and leaving.

Is there a way this can be done?

I'm running community edition 1.9.1.0.


texts: How to add a PHTML, CSS & JS to CMS Page in Magento 2?

texts:
The process was pretty straight forward for previous version of Magento. All I had to do was create .phmtl page in app\design\frontend\rwd\default\template\page and add js/css in js dir of root.

I can't seem to understand the process in Magento 2. Can anyone please give a step by step procedure for the same?


texts: Pulling information from Magento into wordpress?

texts:
I'm currently developing a wordpress theme for a site which has a shop running magento on the same server. I would really like to pull information from Magento into wordpress, such as a list of products, or product information.

Can anyone suggest a method for this, and/or a good tutorial. All of the information I've found assumes that Wordpress is someone running inside a Magento install. However these sites operate separately, and I would like to do this without plug-ins if possible.

Thanks!


texts: Magento 2: How to get customer collection

texts:
I got customer collection with help of objectManager but I don't know how to get customer collection via injecting a class in constructor(Dependency Injection).

So how we get customer collection using DI or factory method in Magento 2?


texts: How to get Last OrderId inside an Observer

texts:
I am trying to get the last order id for an order so that I can create an invoice and shipment automatically but I can't seems to load the correct orderId to perform the action...

Here is how I am trying to load the orderId Observer.php

$order = Mage::getModel('sales/order')->load($orderid);
$orderIncrementId = $order->getIncrementId();

If the orderId is not present throw exception

$order = Mage::getModel('sales/order')
            ->loadByIncrementId($orderIncrementId);
if (!$order->getId()) {
        Mage::throwException("Order does not exist, for the Shipment process to complete");
    }

The problem is if I pass in a static orderId no exception is thrown

$orderIncrementId = '1100000023-4';

But when I try to load it through the Model I can't

Can anyone show me how to get the orderId for an order please?


texts: Divide footer into two sections Magento 2

texts: I want to divide my footer into two sections using xml.


texts: How I can change language direction from left to right to right to left, I want to make magento in ara


texts: Can i get all blocks that belong to a certain route or handle?

texts:
Get all blocks from a certain handle or routes

I am looking for a way to get all blocks belonging to a certain handle or route, for example get all blocks within catalog_product_view. Is this possible without looping through all XML files?

The main goal is getting the block name by the template attribute, since this is displayed by the profiler. But so far I am unable to figure this out.

Clarification

I want to hide certain blocks ( in the frontend) from a menu in the Magento backend. Since blocks may differ from theme to theme I decided to just make a field where users put in the block name. Then observe if this configuration field is set and if it is remove this block before it's get rendered.

This works great, but most users do not know where to find the block name, so they are unable to do this. So I was thinking how to simplify this process and thought they could turn on their profiler so they could look up the block they needed to remove. Unfortunately the profiler does not give the block name and shows only an alias and the template file.

Since not every block has an alias but every ( displayed ) block has an template file i decided instead of a block name they could just enter the template file path given by the profiler for the specific block and observe the save event of the config page and automaticly find the corresponding block name. This however seems to be a challenge.


texts: How can I disable the cache via the database?

texts:
I have an automated job which converts our production database backups into development-friendly databases.  I'd like to include the disabling of Magento's cache in this job as well, but haven't found where it would be configured.

I've looked in core_config_data but didn't see any relevant records.  What tables and records would I need to update to be equivalent to System > Cache Management > Select All [check-boxes] > Actions = Disable > Submit?


texts: Magento2 + Elasticsearch with special Char search

texts:
i am using  Elasticsearch of M 2.3.1

i want to make search has to work with special char

that is if i search with "abc-123"

i am getting result of products which contain a string
abc, 123 abc-123 123-abc

which cause unwanted products are also listing.

it should be something like abc-123*  (even wildcard is also not working )

can any one help me on this ?


texts: I want to know how to delete product from Magento 2.2.4 in the admin store? I don't find the section and all answers I found on internet are with PHP code.


texts: Applying custom 'core' phtml files to a theme

texts:
In Magento 1 if I wanted to modify my own version of a phtml file I would move it into the theme directory, while maintaining the same structure. I have needed to do this on a single Magento instance that has multiple store views and uses different themes.

An example would be

app/design/frontend/base/default/template/page/html/breadcrumbs.phtml

Being added into

app/design/frontend/argento/<my_theme>/template/page/html/breadcrumbs.phtml

When viewing the website, my updated template would be used and not affect any other store views I have.
This method didn't require any xml updates, or technical wizardry, which suited me perfectly.

Magento 2 seems to be structure quite differently
The breadcrumbs file is held within

vendor/magento/module-theme/view/frontend/templates/html/breadcrumbs.phtml

A slider file is here

app/code/Swissup/EasySlide/view/frontend/templates/slider.phtml

Where would these need to be placed to display using my own theme, which is below

/app/design/frontend/Local/<my_theme>


texts: show a popup message on magento 2 checkout page when selecting a particular shipping method

texts:
I am working on website https://roadmaster.com.co/en_SA  When I reach
  checkout page, I have option to
  Collect your order in store ? Yes / NO - "This comes from Wyoming Pickup at Store extension"

  I want to display a message in a popup and based on reply "OK /
  Cancel" want to take some action. like getting back to the cart or
  selecting no and proceed further.


texts: How to insert componets in a product like apple website?

texts: I wanna insert adictionals options in a product and increment the price. How make it?


texts: Magento 2.3 - What should i do if Data Migration stopped?

texts: My data migration stopped due to putty time out error, after a set keep alive how to do further, shall i run again or revert everything (How to do this) and run again?


texts:
We have any issue with filter products by brand:
https://b2bstyle.pl/shoes-woman/sandals.html

During select brand return "No products found".

Anyone know where is issue and how to solve it?


texts: Magento 2.3.4: How to shorten the external order increment ID?

texts: The confirmations numbers(order increment ID) come through as 1000000936(6 zeros) when a customer places an order on our online store. I want to remove 3 of those zeros for all the coming order number so that we and the customer both see confirmation numbers like 1000936. Please tell me which table in Magento DB is to be edited and how or show me any other solution?


texts: Issue Google Shopping Index Magento 2.3.3

texts:
Trying to setup Google Merchant from Magento version 2.3.3

Now when done and I run:

php bin/magento indexer:reindex scconnector_google_feed

I get an error:

  Column not found: 1054 Unknown column 'catalog_product_entity.aw_gc_email_templates' in 'field list',

Which is referring to our AheadWorks Gift Card extension. However, I can not change scope as it is greyed out and not sure how now to solve this.

The error causes the index not to run properly.

Any suggestions on how to fix this?

Thanks.


texts: Around Plugin produce error in generateXml method for sitemap

texts:
I need to change the functionality of the generating sitemap xml. For that, I used around plugin for the generateXml() method in the Magento\Sitemap\Model\Sitemap class.
When I try to generate the file, the filename to be generated is coming as empty. So it produces exceptional error. How can we resolve it?

my di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Sitemap\Model\Sitemap">
        <plugin name="SitemapSplitter" type="Company\SitemapSplitter\Model\Sitemap" sortOrder="1"/>
    </type>
</config>

Company\SitemapSplitter\Model\Sitemap.php

<?php
namespace Company\SitemapSplitter\Model;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Model\AbstractModel;
class Sitemap extends \Magento\Sitemap\Model\Sitemap {

public function aroundGenerateXml(\Magento\Sitemap\Model\Sitemap $subject, \Closure $proceed, $requestInfo = null)
    {
      $this->_initSitemapItems();
        /** @var $sitemapItem \Magento\Framework\DataObject */
        foreach ($this->_sitemapItems as $sitemapItem) {
            $changefreq = $sitemapItem->getChangefreq();
            $priority = $sitemapItem->getPriority();
            foreach ($sitemapItem->getCollection() as $item) {
                $xml = $this->_getSitemapRow(
                    $item->getUrl(),
                    $item->getUpdatedAt(),
                    $changefreq,
                    $priority,
                    $item->getImages()
                );
                if ($this->_isSplitRequired($xml) && $this->_sitemapIncrement > 0) {
                    $this->_finalizeSitemap();
                }
                if (!$this->_fileSize) {
                    $this->_createSitemap();
                }
                $this->_writeSitemapRow($xml);
                // Increase counters
                $this->_lineCount++;
                $this->_fileSize += strlen($xml);
            }
        }
        $this->_finalizeSitemap();

        if ($this->_sitemapIncrement == 1) {
            // In case when only one increment file was created use it as default sitemap
            $path = rtrim(
                $this->getSitemapPath(),
                '/'
            ) . '/' . $this->_getCurrentSitemapFilename(
                $this->_sitemapIncrement
            );
            $destination = rtrim($this->getSitemapPath(), '/') . '/' . $this->getSitemapFilename();

            $this->_directory->renameFile($path, $destination);
        } else {
            // Otherwise create index file with list of generated sitemaps
            $this->_createSitemapIndex();
        }

        // Push sitemap to robots.txt
        if ($this->_isEnabledSubmissionRobots()) {
            $this->_addSitemapToRobotsTxt($this->getSitemapFilename());
        }

        $this->setSitemapTime($this->_dateModel->gmtDate('Y-m-d H:i:s'));
        $this->save();

        return $this;
    }
}
?>


texts: How to get Order Id after place order in javascript?

texts:
I am defining placeOrder method in my payment method, here is my code:

placeOrder: function (data, event) {
    var self = this;

    if (event) {
        event.preventDefault();
    }

    if (this.validate() && additionalValidators.validate()) {
        this.isPlaceOrderActionAllowed(false);

        this.getPlaceOrderDeferredObject()
            .fail(
                function () {
                    self.isPlaceOrderActionAllowed(true);
                }
            ).done(
                function () {
                    self.afterPlaceOrder();

                    if (self.redirectAfterPlaceOrder) {
                        redirectOnSuccessAction.execute();
                    }
                }
            );
        return true;
    }

    return false;
}

How can I get order id before/after afterPlaceOrder method is called and redirection to success page is done?


texts: Custom Products Export Code working in Localhost but not working in Live site

texts:
I have code for export like sku, category id and category path name of sku,

code :

<?php
error_reporting(E_ALL | E_STRICT);
define('MAGENTO_ROOT', getcwd());
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
require_once $mageFilename;
// Mage::setIsDeveloperMode(true);
//ini_set('display_errors', 1);
Mage::app();
$products = Mage::getModel("catalog/product")->getCollection();
$products->addAttributeToSelect('category_ids');
//$products->addAttributeToFilter('status', 1);//optional for only enabled products
//$products->addAttributeToFilter('visibility', 4);//optional for products only visible in catalog and search
$fp = fopen('var/export/exports.csv', 'w');
$csvHeader = array("sku", "category_ids","category_name");
fputcsv($fp, $csvHeader,",");
$cat_name = array();
$cat_array = array();
$categoryFullPaths = getCategoryData();
foreach ($products as $product) {
    $sku = $product->getSku();
    $categoryIds = implode('/', $product->getCategoryIds()); //change the category separator
    $_cate_name = join(',', get_values_for_keys($categoryFullPaths, $product->getCategoryIds()));
    fputcsv($fp, array($sku, $categoryIds,$_cate_name), ",");
}
fclose($fp);

function get_values_for_keys($mapping, $keys)
{
    $output_arr = array();
    foreach ($keys as $key) {
        $output_arr[] = $mapping[$key];
    }
    return $output_arr;
}

function getCategoryData()
{
    $category = Mage::getModel('catalog/category');
    $tree = $category->getTreeModel();
    $tree->load();

    $ids = $tree->getCollection()->getAllIds();
    $categories = array();
    $rootCategoryId = Mage::app()->getStore('english')->getRootCategoryId();
    if ($ids) {
        foreach ($ids as $id) {
            $category->load($id);
            $categories[$id]['name'] = $category->getName();
            $categories[$id]['path'] = $category->getPath();
        }
        foreach ($ids as $id) {
            $path = explode('/', $categories[$id]['path']);
            $string = '';
            foreach ($path as $pathId) {
                if ($pathId == 1 || $rootCategoryId == $pathId) continue;  // Uncomment commented code if you want to remove Default Category name.
                $string.= $categories[$pathId]['name'] . '/';
            }

            $categoryFullPaths[$id] = rtrim($string,"/");
        }
    }
    return $categoryFullPaths;
}

Its perfectly working in localhost, when I try to live site its not working


texts: Pagination not showing correct number of items

texts:
I have this block with pagination:

        protected function _prepareLayout()
        {
            parent::_prepareLayout();
            $this->pageConfig->getTitle()->set(__('Table'));

            if ($this->getItem()) {
                $pager = $this->getLayout()->createBlock(
                    'Magento\Theme\Block\Html\Pager',
                    'Module.pagination.pagination.pager'
                )->setAvailableLimit(array(10=>10,15=>15,50=>50,100=>100))->setShowPerPage(true)->setCollection(
                    $this->getItem()
                );

                $this->setChild('pager', $pager);
                $this->getItem()->load();
            }

            return $this;

        }
        public function getItem()
        {
$obj = \Magento\Framework\App\ObjectManager::getInstance();
            $attributeSetCollectionFactory = $obj->get('Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory');
            /** @var \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection $attributeSetCollection */
            $attributeSetCollection = $attributeSetCollectionFactory->create();
            $attributeSets = $attributeSetCollection->getItems();

            return $attributeSetCollection;
        }

        public function getPagerHtml()
        {
            return $this->getChildHtml('pager');
        }

    }

And in my template I have this under the table:

 <?php if ($block->getPagerHtml()): ?>

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

    <?php endif ?>

THE PROBLEM IS:

I have 18 items in my table, but I set to show only 10 per page, but, nothings happen, the page reload, but continue showing 10. what I'm doing wrong?

EDIT: I remove the set size and continue the same issue


texts:
I was just wondering if it was possible to update the value of a key in the Mage::registry without unsetting and resetting the item in the registry.

e.g.

$ids = array('1', '2', '3');
Mage::register('testing-key', $ids);

$re_ids = Mage::registry('testing-key');
$re_ids[] = '4';

Mage::registry('testing-key') = $re_ids;


texts:
I have a products collections. But in "color" i see option_id number.

Mage::getModel('catalog/product')
                ->getCollection()
                ->addStoreFilter(Mage::app()->getStore())
                ->addAttributeToSelect('color')
                ->addAttributeToSelect('url_path')
                ->addAttributeToFilter('name', $name)
                ->addAttributeToFilter('status', 1)
                ->addAttributeToFilter('visibility', 4);

How i can join eav_attribute_option_value table into my collection and get from him "frontend_label" of colors?


texts: Should my product types be changed from configurable so that child discounts can be applied?

texts:
Issue: I need child products to have a special price that does not inherit from the parent product.

Details: Currently I am using configurable products to list product options. We need to run a promotion where each child product is discount. My problem is that the discount amount is different per product. So, where child option one may be discounted by $0.50, child option two may be discounted by $2, and option three by $1. Out of the box Magento does not allow differing special prices for child options - they're all inherited.

Is there a solution for this or should I be using bundled or group products rather than configurable.

Example:
Yummy Water (Configurable Product with normal pricing and desired discount)

20 ml bottle - $1 - $0.50
1 L bottle - $5 - $2
Case of 5 20 ml bottle - $4 - $1
Case of 10 1 L bottle - $40 - $10

 EDIT:

In response to answer below: I left this problem hanging but am forced to revisit it now. I've reviewed 3 extensions whose purpose is to apply simple product pricing to configurable products. One is open source but has not been updated recently and the other two are a bit pricey for not being certified developers - Yes, I have trust issues as well.

I'm considering removing the configurable products and making the simple products publicly viewable while creating sub-categories for each product type option but my concern here is SEO impact (seemingly duplicate content) and the impact on the user experience since the customer would then have to go through multiple categories to browse a single flavor as opposed to how they currently can find the flavor and simply choose their size.


texts:
I can't login to admin panel on Magento 2.3.0 version. After I press Sign In button I have this message: "Invalid Form Key. Please refresh the page."
and in the system.log file I have this:

[2019-02-15 12:32:34] main.ERROR: The store that was requested wasn't found. Verify the store and try again. [] []
[2019-02-15 12:32:34] main.CRITICAL: The store that was requested wasn't found. Verify the store and try again. [] []

In the browser console I see this:

"NetworkError: 404 Not Found - https://www.domain.com/pub/static/version1550234757/adminhtml/Magento/backend/pt_PT/js-translation.json"
js-tran...on.json
Error: https://www.domain.com/pub/static/version1550234757/adminhtml/Magento/backend/pt_PT/js-translation.json HTTP status: 404

err = new Error(url + ' HTTP status: ' + status);


texts: how to support quantity for the option value

texts:
I want to support the quantity of option value, please refer to the following case:
Product A has option size, with option value as: large, medium and small. How to allow configure it on the Magento admin to create a product that allow customer able to order 3 large, 4 medium and 5 small option value in one product order?
What is the Mage code that can specify the qty of option value when adding such product into cart?


texts: Marketpress to Magento: 301 redirect using htaccess

texts:
We're moving a site from MarketPress (WP plugin) to Magento.

Old WP site permalink structure is https://website.com/store/products/product-url
Magento  url structure is https://www.website.com/category-name/product-url

How can we achieve this using htaccess, so that matching links are redirected correctly?

TIA


texts:
When I select an image to a CMS page it gives get the following error:

  Target element not found for content update

I have tried several options, contacted the host, updated max_input_vars = 4000 post_max_size = 32M   -> still no luck.
All these options didn't work: http://www.magentocommerce.com/boards/viewthread/179844/

Maybe someone can help me out,
or maybe upload a working 1.4.1.1 /js/mage/adminhtml/browser.js file?

Also when I loook at the editor, i see no images:
But when I look on the website and check the source all is ok.


texts: Limiting the number of drop-down options

texts:
I have created an attribute which consists of two option. say A and B and on the front-end, I have another attribute which is a drop-down. Is it possible to limit the number of options in the front-end drop-down attribute based on another product attribute

Back-end

Front-end

Actually limiting the configurable product which is shown in the front-end based on an attribute option

Any help will be appreciated. Thanks in advance


texts: How does product attribute filtering works? It seems to return values through ajax when some URL like this is called "test.html?color=5459&size=5447" but where is this ajax is being called? And what controller method it's calling? I need to analyze its code and can't seem to locate them.


texts: I want to create a custom module, it will have one model called Product and I want to load product details from Redis cache. So how to configure a model which will get loaded up from redis.


texts: After deleting the authorization form on the checkout, the payment button for all Payment Methods stops working

texts:
I want to delete the authorization form on the checkout page so that any user can pay for the goods without authorization. The site will only pay via PayPay.

When I delete the contents vendor/magento/module-checkout/view/frontend/web/template/form/element/email.html

or in checkout_index_index.xml

delete

<item name="component" xsi:type="string">Magento_Checkout/js/view/form/element/email</item>
    <item name="displayArea" xsi:type="string">customer-email</item>
    <item name="tooltip" xsi:type="array">
    <item name="description" xsi:type="string" translate="true">We'll send your order confirmation here.</item>
</item>

The form disappears, but the PayPal payment button and another payment method that I will connect stop responding, how can I solve this?


texts:
Here's the situation I need to redirect one of my product to homepage make it as homepage at the same time the URL must be changed to home, so instead of www.example.com/sample-product it should be www.example.com take note that I am accessing this link www.example.com/sample-product.

I am also confused if I'm going to use the rewritten URL.

What would be the best approach?


texts: Error when getBlock('category.products.list') in Observer

texts:
public function __construct(
        Config $pageConfig,
        Category $categoryHelper,
        UrlInterface $urlBuilder
    ){
        $this->pageConfig = $pageConfig;
        $this->categoryHelper = $categoryHelper;
        $this->urlBuilder = $urlBuilder;
    }

    public function execute(Observer $observer)
    {
        if ('catalog_category_view' != $observer->getEvent()->getFullActionName()) {
            return $this;
        }
        /** @var \Magento\Catalog\Block\Product\ListProduct $productListBlock */
        $productListBlock = $observer->getEvent()->getLayout()->getBlock('category.products.list');
        $category = $productListBlock->getLayer()->getCurrentCategory();

        /**
         * Remove default canonical tag
         */
        if ($this->categoryHelper->canUseCanonicalTag()) {
            $this->pageConfig->getAssetCollection()->remove($category->getUrl());
        }

        /** @var \Magento\Catalog\Block\Product\ProductList\Toolbar $toolbarBlock */
        $toolbarBlock = $productListBlock->getToolbarBlock();
        /** @var \Magento\Theme\Block\Html\Pager $pagerBlock */
        $pagerBlock = $toolbarBlock->getChildBlock('product_list_toolbar_pager');
        $pagerBlock->setAvailableLimit($toolbarBlock->getAvailableLimit())
            ->setCollection($productListBlock->getLayer()->getProductCollection());

        /**
         * Add rel canonical with page variable
         */
        $this->pageConfig->addRemotePageAsset(
            $this->getPageUrl([
                $pagerBlock->getPageVarName() => $pagerBlock->getCurrentPage()
            ]),
            'canonical',
            ['attributes' => ['rel' => 'canonical']]
        );

        /**
         * Add rel prev and rel next
         */
        if (1 < $pagerBlock->getCurrentPage()) {
            $this->pageConfig->addRemotePageAsset(
                $this->getPageUrl([
                    $pagerBlock->getPageVarName() => $pagerBlock->getCollection()->getCurPage(-1)
                ]),
                'link_rel',
                ['attributes' => ['rel' => 'prev']]
            );
        }
        if ($pagerBlock->getCurrentPage() < $pagerBlock->getLastPageNum()) {
            $this->pageConfig->addRemotePageAsset(
                $this->getPageUrl([
                    $pagerBlock->getPageVarName() => $pagerBlock->getCollection()->getCurPage(+1)
                ]),
                'link_rel',
                ['attributes' => ['rel' => 'next']]
            );
        }

        return $this;
    }
    protected function getPageUrl($params = [])
    {
        $urlParams = [];
        $urlParams['_current'] = false;
        $urlParams['_escape'] = true;
        $urlParams['_use_rewrite'] = true;
        $urlParams['_query'] = $params;

        return $this->urlBuilder->getUrl('*/*/*', $urlParams);
    }

Error:
2020/08/06 15:15:17 [error] 1352#1352: *500 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function getLayer() on bool in /var/www/html/CDE/app/code/CompanyName/ModuleName/Observer/CategoryLinks.php:53


texts: How to extend magento product category limit from 1000 to 5000 in magento by php.ini

texts:
I need to extend max input var in magento for increasing category product limit. On 1000 product my category is not working with more than 1000 product...

I need to extend max_input_vars in Magento without touching php.ini file...

In index.php I have put this:

ini_set('max_input_vars', 3000);

is it good for increasing max_input_vars for Magento?

I'm using VPS and on that it is restricted to touch or change php.ini

So I need to put my code in index.php. I just want to know if that is fine.

Or any good solution please.


texts: Include en_US translation file in extension

texts:
When developing an extension is there an reason other than simply "Best Practice" to include a en_US or extension base language translation file?

Example

I write an extension with some text where the default language is English. I then translate this to say German and Swedish so I obviously include these two as translation files but should I really include a "native" language file which would have an exact match of string and translation. e.g

"My cool text","My cool text"

Maybe this question may seem a bit like a personal opinion.


texts:
I'm trying to run bin/magento setup:di:compile and I'm getting this error:

 [Symfony\Component\Debug\Exception\FatalThrowableError]
 Parse error: syntax error, unexpected '}'

There is no line number, nothing to help me determine where this error might be coming from. I don't have a PHP developer background, is there a way to figure out where this error is coming from?


texts: Observer code for place order button in magento

texts:
Can anyone provide me the working code for Observer-Event Place Order button. I have tried with **<sales_model_service_quote_submit_before>**, **<sales_order_save_after>**and **<sales_order_save_before>** But none of them working. I tried in rwd theme without any third party OPC extenions.
This is my 2nd question in this problem
My aim is to check and get a particular cookie and save in the order placed table along with the order when Place Order button is clicked. I think i will be able to do the cookie part but I am unable to get the observer to run in the 1st place


texts:
I was going to update from 2.3.2-p2 to 2.3.3-p1. I ran the composer update and everything worked. Now when I run any command it says segmentation fault. In working with my host this is what they have found-

I am seeing that that before it segfaults it is looping over the env.php and config.php over a thousand times.

Reviewing the stace, I am seeing that it is timing out on fd5 over and over between each call.

It looks like it is looping through resolving the store code and setting the locale.

How can I resolve this?


texts: Magento 2 Service Contract API Example For Creating A Shipment and Adding Items

texts:
What would be the correct way to within my Magento 2 module create a shipment, add items to it, and save it? I think the general idea would be to inject:

\Magento\Sales\Api\ShipmentRepositoryInterface $shipmentRepository,

and do something like:

    $this->shipmentRepository->create();
    $this->shipmentItemFactory->addItems(['order_item_id'=>'qty_to_ship']);
    $this->shipmentRepository-save();

This code doesn't work, but shows what I'm trying to do.
I have looked at how Magento itself does it in app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php and it is quite different. Perhaps I have to do it like that, but I'd prefer to use the API as that is what we are supposed to do.

Has anybody used the Service Contract API to do this?


texts:
I'm trying to display an additional product attribute when managing a product's attributes.

I've set up the attribute as follows:

http://imgur.com/HV9IK55

the descriptions (addable and editable by admin users in the config section) need to be displayed as a multi select dropdown.

I've written the following to programmatically add the attribute for products:

<?php
/* @var $this Mage_Core_Model_Resource_Setup */
$installer = $this;
$installer->startSetup();

$installer->addAttribute('catalog_product', 'additional_product_description', array(
    'group'                => 'General',
    'type'              => 'text',
    'backend'           => 'adminhtml/system_config_backend_serialized_array', // ***** NOT SURE IF THIS IS CORRECT, PLEASE ADVISE *****
    'frontend_input'    => '',
    'frontend'          => '',
    'label'             => 'Additional Product Descriptions',
    'input'             => 'multiselect',
    'class'             => '',
    'source'            => '***** ***** ***** NEED HELP HERE ***** ***** *****',
    'global'             => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,//can be SCOPE_WEBSITE or SCOPE_STORE
    'visible'           => true,
    'used_in_product_listing' =>true, //can also be false
    'frontend_class'     => '',
    'required'          => false,//can be true
    'user_defined'      => true,
    'default'           => '',
    'searchable'        => false,//can be true
    'filterable'        => false,//can be true
    'comparable'        => false,//can be true
    'visible_on_front'  => false,//can be true
    'unique'            => false,
    'position'            => 60,//put any number here
));

$installer->endSetup();

I can't figure out what I am supposed to use as the source - could anyone please advise?

The system.xml that sets up the serialized array I want to use for the attribute is the following:

<fields>
    <descriptions translate="label">
        <label>Product Descriptions</label>
        <frontend_model>runwaysale_productdescription/adminhtml_descriptions</frontend_model>
        <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
        <sort_order>0</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>
    </descriptions>
</fields>

I have already tested, and the config section works without any issues, I now need to add an attribute field to the products' attributes.

Any help would be massively appreciated.


texts: How to escape a % in magento translation

texts:
Inside Mage_Core.csv have the following line

  "Please input a valid CSS-length. For example 100px or 77pt or 20em or
  .5ex or 50%."

The problem is, Magento expect this % to be a parameter, and gives me the error

  "vsprintf(): Too few arguments"

How can i ignore this '%' ?


texts: Proper Way To Link to Other Magento Pages

texts:
I am trying to link to Login page, but my link is only redirecting to my home page. Here is what I am trying.

 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
 $block = $objectManagerLinks->get('\Magento\Backend\Block\Page\Header');

In my div

echo __('LOGIN', $block->getLoginLink());


texts: How to get all products programmatically in Magento 1.9?

texts:
I am trying to export all enable, disable, visible for both, not visible, the only catalog, only search. as well if there are 2 stores and assign different products.

So I want all products if any case is there I want to list out all products?
Is anyone help me?

Thanks in advance!


texts:
Is it possible to have different Invoice types in Magento for different payment methods? is there a easy way to setup this?

I.e. I would like to have one invoice template for Invoices that have been generated by orders  complted with creditcard payments, and other Invoice template for invoices that have been generated by orders completed with cash on delivery payment?


texts:
how to add the styling for the dropdown? in the tutorial they just say "the last touch is adding styles". But i can't find the correct styles in the luma directory and don't know what to change

http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-practice.html


texts: Magento2 : Reduce time of Product Update API Using REST

texts:
I have created an API to update Product Price, Product Cost, and Tier prices. The issue is the API response timing in around 7 to 8 secs every time for a single product update.

How can I reduce this?

Can we implement in API the logic of Default Product import to update product feature as that process is very fast?


texts:
when i was trying to enter "manage categories" i have got this error :

  a:5:{i:0;s:138:"Source model "mttheme/system_config_source_category_attribute_source_block_proportions" not found for attribute "mtmenu_proportions_right"";i:1;s:4129:"#0 /home/sajidatcp/public_html/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(387): Mage::exception('Mage_Eav', 'Source model "m...')

what i have to do to fix this ?


texts:
I had a complaint about the cart stopping working on a Magento 2.2.3 instance and noticed the following errors showing within php logs:

[Fri Apr 06 15:28:54.964616 2018]
[:error] [pid 58985] [client 77.96.38.47:55599] PHP Fatal error: Uncaught Error: Call to a member function getThumbnail() on null in /home/sites/magento/public_html/vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php:63
Stack trace:
#0
/home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/DefaultItem.php(66): Magento\ConfigurableProduct\CustomerData\ConfigurableItem->getProductForThumbnail()
#1
/home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/AbstractItem.php(31): Magento\Checkout\CustomerData\DefaultItem->doGetItemData()
#2
/home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/ItemPool.php(63): Magento\Checkout\CustomerData\AbstractItem->getItemData(Object(Magento\Quote\Model\Quote\Item))
#3
/home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/Cart.php(167): Magento\Checkout\CustomerData\ItemPool->getItemData(Object(Magento\Quote\Model\Quote\Item))
#4
/home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/Cart.php(98): Magento\Checkou in /home/sites/magento/public_html/vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php on line 63

Cart seemed to be working for most people except a new user who had just started and a few customers seemed to have been having the issues from looking over the logs.

I flushed the redis cache as felt it was session related and this was handled by redis. This stopped the issue occurring for now however am worried it will come back so was wondering if anyone can suggest what may have gone wrong here?

Redis does not have any memory limits configured and there were no errors in Redis logs so feel that is fine but am out of ideas of how this has happened.


texts: How to update cart total summary section using js Magento 2?

texts:
i want to update my cart total when some one add product into cart and redirect to checkout cart page then need to update cart total how can I get that..
i have refer following link but got an error of get getTotalsAction() undefined:
reference link:
https://www.rakeshjesadiya.com/update-cart-total-summary-section-js-magento-2


texts: Add default value to City field in Billing and Shipping

texts:
Just like there is a default value for 'State/Province' field which is: 'Please select region, state or province' I need to add a default value to City field in billing and shipping steps in checkout.
In my case the City is drop-down list getting its list of cities from database.

In app>design>frontend>base>default>template>checkout>onepage>billing.phtml, the city field code is:

     *<?php echo $this->__('City') ?>

        <input type="text" title="<?php echo $this->__('City') ?>"
             name="billing[city]"
             value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>"
             class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>"
             id="billing:city"/>


texts:
Searched the entire Internet and did not find information about RMA on magento2.
Tell me how to connect RMA to my magento2? Is it possible?

I have CE magento2


texts:
I have created the new magento site and importing the data from the old site but I have the problem with the URLs. Old site URL starts from www.sitename.com but in my new site it starts from sitename.com without www. Now I am trying to add WWW in my magento site or remove the WWW from the old site through .htaccess file

but the problem is when I change the magento site bse URL to www.sitename.com it is giving server not found error

I have also used the htacess rule to remove the WWW from the old links?


texts: Magento 2 : How to get Swatches attribute options in popup?

texts:
Magento2 - popup open in ajax response. So all values come from the controller and set in the popup, but attributes options are not shown.

\vendor\magento\module-checkout\view\frontend\templates\cart\item\renderer\actions\edit.phtml

<?php if ($block->isProductVisibleInSiteVisibility()):  ?>

<a class="action action-edit display-before" data-id="<?php echo $itemId; ?>" data-product-id="<?php echo $productId; ?>"
   href="<?= /* @escapeNotVerified */ $block->getConfigureUrl() ?>"
   title="<?= $block->escapeHtml(__('Edit item parameters')) ?>">

        <?= /* @escapeNotVerified */ __('Edit') ?>
    <?php endif ?>

my ajax popup


texts: How to use viewModel with our custom model?

texts: I have created custom table in database. Now I want to fetch data from that table and want to display on category page only and I have to use viewModel for that.Since I am beginner I don't know how to do this.


texts: Slow and memory problems: Refresh category with 100 products

texts:
I have a category with 100 new products. After an import I remove all products from this category and add 100 new products. This is very slow and cause memory problems, so I am doing something wrong. Here is the code:

public function removeAllFromNew()
{
    $category_id = 8;
    $products = Mage::getModel('catalog/product')->getCollection()
        ->addCategoryFilter(Mage::getModel('catalog/category')->load($category_id));
    foreach($products as $product)
    {
        $categories = $product->getCategoryIds();
        if(in_array($category_id, $categories))
        {
            $product_load = Mage::getSingleton('catalog/product')->load($product->getId());
            $categories = array_diff($categories, array($category_id));
            $product_load->setCategoryIds( $categories );
            $product_load->save();
        }
    }
}
public function updateNew()
{
    self::removeAllFromNew();

    $category_id = 8;
    $products = Mage::getModel('catalog/product')->getCollection()
        ->addAttributeToFilter('neuheiten', array('neq' => '') )
        ->addAttributeToSort('neuheiten', 'desc')
        ->addStoreFilter()
        ->setPage(0, 100);

    foreach($products as $product)
    {
        $categories = $product->getCategoryIds();
        $categories[] = $category_id;
        $product_load = Mage::getSingleton('catalog/product')->load($product->getId());
        $product_load->setCategoryIds( $categories );
        $product_load->save();
    }
}

How can I do this any better?

I think at first I should not query all products in removeAllFromNew(). How can I limit this to products in a category?

Update I added a addCategoryFilter in removeAllFromNew() but it looks like adding a product to the category is the slow part.


texts: Add to cart bundle product programatically magento 2

texts:
I tried with add to cart bundle product but getting error when run the custom code. you can see below code for bundle product.

    $objectManager =  \Magento\Framework\App\ObjectManager::getInstance();
    $quote = $objectManager->get('\Magento\Checkout\Model\Cart');
    $_product = $objectManager->get('\Magento\Catalog\Model\Product')->load(28);
    $params = array (
        'product' => 28, // product id
        'qty' => 1, // product qty
        'related_product' => null,
        'bundle_options' => array(
            6 => 1, // 6 is bundle sub product id and 1 is option id
            2 => 2
        )
    );

    $quote->addProduct($_product, $params);
    $quote->save();

and when i run the custom above code you can see below error.

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Please specify product option(s).

can you please suggest what is the issue on code.
Thanks


texts: I want to Delete products custom options using bulk remove functionality. How I can archive that?


texts: main.CRITICAL: Rolled back transaction has not been completed correctly. magento2

texts:
When purchasing from the checkout form in Arabic language, this error gives me
main.CRITICAL: Rolled back transaction has not been completed correctly."vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:270)

But in English language work fine. How to solve this issues?


texts: How to use modman for managing modules in github?

texts:
I am trying to use modman (https://github.com/colinmollenhour/modman) for managing my Extensions in github.

First I am trying to add MagePsycho_Someext extension as demo.

So far I have done the following steps

/var/www/magento-dir/ -> My Magento Installation Dir
/var/www/MagePsycho_Extensions/ --> Git Repository Dir

cd /var/www/MagePsycho_Extensions/
git clone git@github.com:magepsycho/Someext.git
touch modman
git commit -am 'Modman file added'
git push origin master
cd /var/www/magento-dir/
modman init
modman clone git@github.com:magepsycho/Someext.git
Developed the extension 'MagePsycho_Someext' in /var/www/magento-dir with the following files

app/etc/modules/MagePsycho_Someext.xml
app/code/local/MagePsycho/Someext/etc/config.xml
app/code/local/MagePsycho/Someext/Helper/Data.php

10 Added the files mapping info in /var/www/magento-dir/.modman/Someext/modman as

app/etc/modules/MagePsycho_Someext.xml  app/etc/modules/MagePsycho_Someext.xml
app/code/local/MagePsycho/Someext/etc/config.xml app/code/local/MagePsycho/Someext/etc/config.xml
app/code/local/MagePsycho/Someext/Helper/Data.php app/code/local/MagePsycho/Someext/Helper/Data.php

11 modman update Someext

but got the following errors:

WARNING: Target does not exist (.modman/Someext/modman):
 app/etc/modules/MagePsycho_Someext.xml  app/etc/modules/MagePsycho_Someext.xml

Notes:
I am developing extensions in /var/www/magento-dir/. And want to deploy these extensions(one per repository) in github using modman.
When I am finished with module development, I want those files to be added to the repository. For that I have used .modman/*/modman file for mapping. But unable to make it work.

Where and what am I missing?
Or Is this the incorrect approach?

[EDIT]

I just realised that my approach is just opposite. First, You have to add extension files and modman with path mappings, push it to the repo and then pull it using modman clone.

How would you do if you first develop the extension and then use modman for pushing changes to the repo?


texts: How to intersect 2 collections in Magento

texts:
I have 2 lists of countries: the default directory/country list and another one from an extension. I want to display only the values from the Magento list that are common between the two values. The reason why I want to do this is because the list from the extension is prone to have typos, whilst on the other hand the list from Magento can get translated to the store view language.

I thought I might give array_intersect a try, but Magento throws the following warning:

  Warning: array_intersect(): Argument #1 is not an array

The code that I have is

class Company_Module_IndexController extends Mage_Core_Controller_Front_Action {
    public function indexAction() {
        //list from the extension with country names
        $mapcountries =   Mage::getModel('gmapstrlocator/gmapstrlocator')->getCollection();
        foreach ($mapcountries as $mapcountry) {
            $mapcountry = $mapcountry->getData('country');
        }
        //list from Magento with country names instead of iso codes
        $magecountries = Mage::getModel('directory/country')->getCollection();
        foreach ($magecountries as $country) {
            $cn = $country->getName();
        }
        //display the intersection between both
        $finalcountries = array_intersect($mapcountry, $cn);
        print_r($finalcountries);

    }
}

How can I achieve this? Maybe array_intersect isn't a good option and you guys have other ideas.

Thanks.


texts: How to add product category to page title as data attribute?

texts:
I am brand new to Magento and am a Wordpress developer and am trying to get my bearings on something that seems like it should be simple to accomplish. I am trying to simply add a data-attribute to my product title on the product details page. I want to do this so I can add some logic in my JS based on it. The issue is despite the research I have done I cannot get it to work.

I have located the title.phtml file and tried adding in

data-category="<?php echo $block->getCurrentCategory->getId() ?>"

but when I reload the page it is just white.

What is the easiest way to go about this? In wordpress I can literally just do the_title() and it gets the title of the post. Is there something similar by chance?


texts:
Today I have automated the cron jobs in cpanel after that I am getting message in Magento backend dashboard like
Yopto - An error occurred during the automated sync process! (module: Yotpo_Yotpo)
Please find the attached image.


texts: Static Block stylesheet is not applied in PWA

texts:
I have created one CMS block in my admin panel and want to display it on my PWA homepage. I have added below code in my RootComponents/CMS/CMS.js file.

import React, { Component } from 'react';
import CmsBlock from 'src/components/CmsBlock';

import './cmsPage.css';
import {bool, shape, string} from "prop-types";

export default class CMS extends Component {
    render() {
        return (
            <CmsBlock identifiers={'my-block-identifier'} />
        )
    }
}

It displays my block on PWA homepage.

Now, I have added some class in my cms block content and want to apply stylesheet on that class. I have imported cmsPage.css in my JS file and added my stylesheet in cmsPage.css file. But the stylesheet is not being applied to my block content on PWA page.

After debugging a little, I found that the classes in my CSS is being renamed in PWA. It appends random string around my class defined in cmsPage.css. While the class name is still actual classname in my static block content, the stylesheet is not being applied to the content.

I know I can add my stylesheet inline in my static block content but I don't want to do that. Does anyone have any idea or faced similar issue with static blocks in PWA?


texts: Advanced Catalog Search showing wrong catalog

texts:
I'm new to Magento and am working on my new company's previously existing site.  I've managed to iron out most of the kinds except for one:

We have one account running the back-end of two websites with two very different product groups.  The site I am working on now has no issues with its actual catalog, but when I go to the "Advanced Search" page it only displays options for the other website's catalog.

I'm sure this is a quick fix, but I'm operating via the dashboard and cannot find any way to manipulate the Advanced Search.

Thank-you in advance!


texts: Magento2 - Layered Navigation how to create multiselect functionality using code

texts:
Magento2 version is - 2.1.2

I am creating custom module for layered navigation and i want to create multiselect options functionality for layerednavigation.

I have already displayed checkbox over there by overriding the template of layered navigation in my custom module now what i need is how to select those checkbox  as multiselect**.

  I have seen there are lot of extenstions available for that but i
  want to do it with code.is it possible ?

Is there any good tutorial to override layered navigation module and create this kind of functionality ?

Advance Thanks.


texts:
I'm building an extension, following the official Magento developer's guide, here: http://info.magento.com/rs/magentocommerce/images/Magento-Extension-Developers-Guide-v1.0.pdf

In the app/etc/modules/Mage_Extension.xml file, the following code results in a fatal error:

<config>
    <modules>
        <Mage_Extension>
            <active>true</active>
            <codePool>community</codePool>
            <depends>
                <Mage_adminhtml />
            </depends>
        </Mage_Extension>
    </modules>
</config>

However, this is stipulated as a recommendation by Magento on page 8 of the guide. If I comment out the depends code, all is well:

<config>
    <modules>
        <Mage_Extension>
            <active>true</active>
            <codePool>community</codePool>
            <!--
            <depends>
                <Mage_adminhtml />
            </depends>
            -->
        </Mage_Extension>
    </modules>
</config>

Can anyone tell me why this throws an exception and whether I should just leave it out?

Thanks.


texts: Magento 2.3.3 Hide product that are missing product image

texts:
Im using Magento2  v2.3.3 Open source.
My store consist of around 76000 products and some of them are missing product images. Is it possible without much coding to hide products on the frontend that doesn't have product images?
I have already looked at these but It didn't do much for me:

https://stackoverflow.com/questions/14244485/hide-products-without-images-magento
https://community.magento.com/t5/Magento-2-x-Programming/How-can-i-hide-products-with-no-images-on-frontend/td-p/115508
https://www.commercers.com/blog/en/magento-products-not-Hide-without-artikelbild/


texts: Magento 2: Mass 301 Redirects for 404 Pages

texts: I have a need in magento2 in Extension create like magento1 Mass / Bulk Redirects (301, 302, or any status) for Magento 404 Pages.


texts: Customer Navigation Links reordering not working

texts:
I am trying to re-order customer account navigation links.

And I have tried out the below 2 approaches:

Using move

File Path: \design\frontend\DasLeben\porto\Magento_Customer\layout\customer_account.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true" />
     <move element="customer-account-navigation-my-designs" destination="customer_account_navigation" after="customer-account-navigation-orders-link" />
     <move element="customer-account-navigation-mycard" destination="customer_account_navigation" after="customer-account-navigation-my-designs" />
     <move element="customer-account-navigation-my-saved-cards" destination="customer_account_navigation" after="customer-account-navigation-mycard" />
     <move element="customer-account-navigation-address-link" destination="customer_account_navigation" after="customer-account-navigation-my-designs" />
</body>
</page>

I have even tried adding the move attributes in the corresponding link definition classes in customer_account.xml, but it doesn't work.

Using sortOrder

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <body>
    <referenceBlock name="customer_account_navigation">
      <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-my-designs-link">
        <arguments>
          <argument name="path" xsi:type="string">my-designs</argument>
          <argument name="label" xsi:type="string">My Current Designs</argument>
          <argument name="sortOrder" xsi:type="number">210</argument>
        </arguments>
      </block>
    </referenceBlock>
  </body>
</page>

Both the approaches have no effect on the link account in customer account. What am i doing wrong?


texts:
I'm trying to move the cart next to the search bar here but it isn't working.

A user has asked the same question here:

Move Mini Cart (Magento 2)

When I put in

<move element="minicart" destination="header.container" before="-" />

or

    <move element="minicart" destination="header.panel" after="top.search" />

My cart ends up in the top right corner on the first code and on the second one, it disappears.

Code:

I have moved my search bar by adding the below to default.xml:

        <move element="top.search" destination="header-wrapper" after="logo" />


texts:
I want to change the product reviews tab contents.
I could do that with XML files:

<reference name="product.info">
    <action method="unsetChild">
        <name>product.reviews</name>
    </action>
    <block type="reviewcontainer/tabs" name="product.reviews" as="reviews" after="additional">
        <action method="addToParentGroup">
            <group>detailed_info</group>
        </action>
        <action method="setTitle" translate="value">
            <value>My Reviews</value>
        </action>
        <action method="setTemplate">
            <template>mymodule/review_tab.phtml</template>
        </action>
    </block>
</reference>

However I have some settings in the System/Configuration page that should control if the reviews are changed. So my question is how can I do this from code?


texts:
In system.xml file, I have declared a button as below:

<import_customer translate="label comment">
                <label>Import Customer</label>
                <comment><![CDATA[Import customers data]]></comment>
                <frontend_type>button</frontend_type>
                <frontend_model>cemimport/adminhtml_system_config_form_button</frontend_model>
                <action_url>module/importer/customers</action_url>
                <sort_order>1</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>0</show_in_website>
                <show_in_store>1</show_in_store>
            </import_customer>

Is there any way for me to get <action_url> value inside the _getElementHtml method?

class Namespace_Module_Block_Adminhtml_System_Config_Form_Button extends Mage_Adminhtml_Block_System_Config_Form_Field
{
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
    {
}


texts: Magento 2 Product page disable tabs scrolling

texts: I want to disable those tab click scroll down. when clicking on any tab I don't want to scroll on its content


texts: Get Order Summary Details Using Session?

texts:
In Magento Checkout page i want to get the Cart Details Like

  Product name,
  Price,
  Quantity,
  product Image.

Using Session . .
I dont know how to get the session Details..
Kindly Help Me out here. .


texts:
i would like to know how to get the frond end properties in magento because in the resource model that i got these properties are not available, i dont know why or how to get them, this is the collection that i got:

        $collection = Mage::getResourceModel('eav/entity_attribute_collection');

but if i try to get any front end property doesnot give anything:

  foreach($collection as $attribute){
        Mage::log($attribute->getIsSearchable(),null,"layerfilter.log");
   }

Output:
     2014-06-23T21:44:48+00:00 DEBUG (7):


texts: call custom phtml with Ajax or Knockout in magento admin order detail page

texts: anyone know how we can call custom phtml in order detail page admin side.


texts: Magento 2 how to skip shipping address and shipping methods step

texts:
I am trying to skip Shipping address & shipping methods step (i am trying to show checkout page as like downloadable product )

I commented below code in checkou_index_index.xml file, but payment step also not displaying

<item name="shipping-step" xsi:type="array">
</item>


texts:
I'm having the problem where I can't log into the backend of Magento 1.8 after I've pulled it onto my local vagrant box.  When I log in using an incorrect password, I get an error message.  When I use correct credentials, it just loops.  I've tried:

Making sure I'm not using local host.  I've set it up so I'm using www.ared.dev on the local machine.
Making sure all URLs have been updated in core_config_data.
Made sure timezone is set correctly.
Checked that cookies were being set and not immediately expiring (Domain on the cookie is showing up as .www.ared.dev (I'm not sure if the dot in front of the domain is a clue to what the problem may be or not)
Checked that I don't have multiple adminhtml stored in my browser
My store method is "Files" and I see sessions being wrote to /var/session
I even tried the core hack to /app/code/core/Mage/Core/Model/Session/Abstract/Varien.php.  That didn't work either.

I'm starting to run out of posts to Google.

The error message I'm getting in the logs is:
ERR (3): Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/www/XXXX/var/session)  in Unknown on line 0


texts:
I have an idea to build SAAS site where clients can have their own independent eCommerce shops. (pretty much like shopify)

Does Magento CE license allow me to use Magento as backend?

Set apart all technical details.

I want to be sure on legal part.


texts: Disable custom module functions for user roles

texts:
I've created a custom module that allows you to delete orders. Now what I want is that when another user has logged in with a custom role (so not the Administrator), this function won't work. If I disable the resource responsible for deleting orders for the custom user, the user can still perform the action although the settings for disabling and enabling are not visible.

The .php file responsible checks if the module is enabled, and if so, it will run the code. If it is disabled, it should throw the following

else {
        $this->messageManager->addError(__("Either you're not allowed to delete orders or the function has been disabled"));

        $resultRedirect = $this->resultRedirectFactory->create();
        $resultRedirect->setPath($this->getComponentRefererUrl());
        return $resultRedirect;
    }

But unfortunately, when the function has been enabled by the Administrator, the function will also be enabled for other users.

Is there a work around for this, so that when the administrator is not logged in, the function will not work?

Thanks in advance.

-- SOLUTION (thanks to Shireen N) --

add the following function and use it as validation like so:

protected function _isAllowed() {
     return $this->_authorization->isAllowed('Vendor_Module::resource');
}

if ($enabled and $this->_isAllowed()) {
    // your code here
}


texts:
I am new to magento. I am using magento 2, and I already create a new module to test for product output.

Block :

 public function getProductCollection()
{
    $collection = $this->_productCollectionFactory->create();
    $collection->addAttributeToSelect('*');
    $collection->setPageSize(3); // fetching only 3 products
    return $collection;
}

show.phtml :

$productCollection = $block->getProductCollection();
foreach ($productCollection as $product) {
    print_r($product->getData('type_id'));
}

It's only show the product type_id, but I want to show it like on home page product (like widged product list), is there a way for it?


texts:
I'm trying to install magento data migration tool for magento 2.1.6, while on ssh session, i get an error message saying: Package fabpot/php-cs-fixer is abandoned, you should avoid using it. Use friends ofphp/php-cs-fixer instead
following the advice on that post

I tried changing the  "fabpot/php-cs-fixer": "~1.2" with "friendsofphp/php-cs-fixer": "~2.0" on the composer.json rerun, but the problem appeared once again. I tried to edit the json.lock, but it doesn't have "fabpot/php-cs-fixer": "~1.2"

just "fabpot/php-cs-fixer": "0.4.0" and "fabpot/php-cs-fixer": "1.7.*"

any advice how to proceed?


texts: Varnish & Cloudflare on Magento 2 - issues

texts:
I'm using Varnish on my Magento 2.4.1.
I've enabled Cloudlfare now, it works well but when I do some changes on the backend (like adding text on category pages, etc), it is not reflecting on the frontend anymore => I have to clear Varnish cache completely to make the changes appear.
I've asked my hosting company to apply this:
https://support.cloudflare.com/hc/en-us/articles/200169376-Can-I-use-Cloudflare-and-Varnish-together-
They did but that doesn't make any difference.
Is it possible to make Varnish & Cloudflare to work together on M2 ?
Many thanks !


texts:
I have a website that I maintain, and I happened to visit a product that although in the admin I can see that I have 7 photos of the product in the front end I can only see 6 of them. Strangely enough I also noticed that if I right click on "Inspect" I found that the image is "pulled" properly and I if I copy the link and enter it to the browser it's displayed properly.
Any idea what is causing it?

EDIT: This is a snapshot of the admin seciton. I can't see the image with sort order 1 in the frontend.


texts: Show attribute with type Media Image on category listing

texts:
I'm trying to show a link to the Base Image of a product. This attribute is a Media Image type and Magento doesn't hydrate this attribute on the category listing. I was able to make it available by manually changing the used_in_product_listing column to 1.

Will this affect anything in Magento in an adverse way? Why is this field hidden on the attribute form when Media Image is selected?


texts:
FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Magento\Framework\Exception\NoSuchEntityException: No such entity. in
  /var/www/html/dev/vendor/magento/module-store/Model/WebsiteRepository.php:80
  /var/www/html/dev/vendor/magento/module-store/Model/StoreResolver/Website.php(46):
  Magento\Store\Model\WebsiteRepository->get('dev') 1
  /var/www/html/dev/vendor/magento/module-store/Model/StoreResolver.php(140):
  Magento\Store\Model\StoreResolver\Website->getAllowedStoreIds('dev') 2
  /var/www/html/dev/vendor/magento/module-store/Model/StoreResolver.php(126):
  Magento\Store\Model\StoreResolver->readStoresData() 3
  /var/www/html/dev/vendor/magento/module-store/Model/StoreResolver.php(89):
  Magento\Store\Model\StoreResolver->getStoresData() 4
  /var/www/html/dev/vendor/magento/framework/Interception/Interceptor.php(58):
  Magento\Store\Model\StoreResolver->getCurrentStoreId() 5
  /var/www/html/dev/vendor/magento/framework/Interception/Interceptor.php(138):
  Magento\Store\Model\Stor" while reading response header from upstream,
  client: 127.0.0.1, server: local.dev.com, request: "GET / HTTP/1.1",
  upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock:", host:
  "local.dev.com"

I'm facing this issue, when the magento EE V2.2.0 installing in my local system.
Anyone, Please let me know how to fix this issue??


texts: Subtotal include tax in order email magento 1.9

texts:
I must have the subtotal with taxes included, but I can not find where to set it.
I search in all file template, but without success.

thanks


texts: Automatically product assign particular category?

texts: I have a new attribute called feature (Yes or No), If i set yes it automatically assign one new category called feature.


texts:
The below code entry is already in DB, Now I need to add one field to customer id and want to rerun this code via programmatically.

$this->getSelect()->join(
                    ['detail' => $this->getReviewDetailTable()], 'main_table.review_id = detail.review_id', ['detail_id', 'title', 'detail', 'nickname', 'customer_id']
            );

I have created a custom module from for  Product Review. In above I have overrides the Magento review collection class, while overriding this part shows error as

  You cannot define a correlation name 'detail' more than once

So Now In my override class I have added the one more field, But DB has the entry already. I also need to handle this while updating or overriding   in my class so pls provide me a solution


texts: magento checkout and allowing countries with no postcode + payment method paypal

texts:
Is there a fix for allowing countries no postcode and paypal?  Paypal seems to require a postcode.

The interface should disable PayPal instead of allowing this to occur.

  ERR (3): exception 'Mage_Core_Exception' with message 'PayPal NVP
  gateway errors: The field Shipping Address Postal Code is required
  (#10730: Shipping Address Postal Code Empty). Correlation ID:
  d8d6bf1b1fb4f. Version: 94.0.' in
  app/code/core/Mage/Paypal/Model/Api/Nvp.php:1062


texts: Authorized.net "Sorry, but something went wrong. Please contact the seller."

texts:
I have tried to do checkout with credit card but this error occurs when placing an order I filled the system config and added the Signature Key other details use both the url sandbox and product I also tried test mode yes/no and also increase time 45 to 60 but issue remains same. I am very tired please anyone give me the solution.

Thank you in advanced


texts:
What is the best practice for the given situation?

I'm creating an extension and following Magento's best practices by creating my layout and templates in base/default but putting them in the module folders..etc. One of the requirements of the extension though, is to add something into the header template about where the default welcome message is. I don't want to change the core header template and I can't create my own theme because it's an extension. I'm not sure just adding a block to 'header' would work. What can you do?


texts:
why we use in general static content deploy command in Magento 2?

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


texts: Problem adding Google Analytics Code and Facebook pixel in Magento Community 1.9.3

texts: Our site was hacked a while back and ever since we 'brought it back' we are unable to add Google Analytics code or a new Facebook pixel in - System/Configuration/General/Design/HTML Head/Miscellaneous Scripts. I've also tried manually pasting both codes into all the instances of head.phtml I was able to find.


texts: how can we change the position of pop up?

texts:
I am using google customer reviews script it showing a popup on my website corner bottom right but I want to change its position from right to left because my live chat is there but it's not working through CSS how to do it my code is

  window.renderBadge = function() {
    var ratingBadgeContainer = document.createElement("div");
    document.body.appendChild(ratingBadgeContainer);
    window.gapi.load('ratingbadge', function() {
      window.gapi.ratingbadge.render(ratingBadgeContainer, {"merchant_id": 7912975});
    });
  }


texts:
I am looking to buy a module (or if there is free one) to improve layered navigation.

I am looking for something with fast filtering, SEO, multiple selections (I sell wheels so might need to select 17" and 18". Default navigation wont allow this)

Does anyone have experience of a improved navigation system to suggest? I am happy to buy one but want to make sure I am getting the right thing for the money.


texts: I can't figure out this CSS / less issue that is blowing up my exception.log

texts:
Any idea why this keeps going nuts in my exception.log

[2019-02-18 22:08:35] report.CRITICAL: .lib-font-size is undefined in /srv/public_html/var/view_preprocessed/pub/static/frontend/website/en_US/css/base-extend.less {"exception":"[object] (Magento\\Framework\\View\\Asset\\ContentProcessorException(code: 0): .lib-font-size is undefined in /srv/public_html/var/view_preprocessed/pub/static/frontend/website/en_US/css/base-extend.less at /srv/public_html/vendor/magento/framework/Css/PreProcessor/Adapter/Less/Processor.php:97)"} []

[2019-02-18 22:41:21] report.CRITICAL: .lib-font-size is undefined in /srv/public_html/var/view_preprocessed/pub/static/frontend/website/en_US/css/base-extend.less {"exception":"[object] (Magento\\Framework\\View\\Asset\\ContentProcessorException(code: 0): .lib-font-size is undefined in /srv/public_html/var/view_preprocessed/pub/static/frontend/website/en_US/css/base-extend.less at /srv/public_html/vendor/magento/framework/Css/PreProcessor/Adapter/Less/Processor.php:97)"} []

[2019-02-18 22:41:21] report.CRITICAL: .lib-font-size is undefined in /srv/public_html/var/view_preprocessed/pub/static/frontend/website/en_US/css/base-extend.less {"exception":"[object] (Magento\\Framework\\View\\Asset\\ContentProcessorException(code: 0): .lib-font-size is undefined in /srv/public_html/var/view_preprocessed/pub/static/frontend/website/en_US/css/base-extend.less at /srv/public_html/vendor/magento/framework/Css/PreProcessor/Adapter/Less/Processor.php:97)"} []

I don't have to much more to offer. It just started happening and it's writing to the exception log and filling it up really quick.


texts: Magento 2 : What are difference between developer and production mode?

texts: What are the different facility we have between developer and production mode of Magento 2.x ?


texts: Getting code or percent from sales_order_tax on order

texts:
Magento 2 saves data in a 'sales_order_tax' table per transaction. I need to get the tax code and tax percent from this table for each order; however I can't find methods to do so? $order->getTaxPercent() would be obvious, but this does not work.

I do not need or want the tax percentage at an item level; just the tax rate on an order based on shipping address.


texts: Magento 2: Remove price change from custom option dropdown in magento 2.2.3

texts:
Is there a way of removing the price change (e.g. the string '+$10.00' or '+$15.00') from after the option name in a custom option dropdown list?

Any help would be much appreciated.


texts: Rest API V1 configurable-products Options Value

texts:
I am post Data

{
  "option": {
    "id": 39,
    "attribute_id": "134",
    "label": "Beden",
 "values": [
            {
                "value_index": 18
            },
            {
                "value_index": 17
            }
        ],
     "product_id": 47
  }

But not add "value_index": 17. I didnt understand Get result This

[
    {
        "id": 26,
        "attribute_id": "134",
        "label": "Beden",
        "position": 0,
        "values": [],
        "product_id": 47
    }
]

Please Help Me.


texts:
I want to Provide an option for uploading file [ ex : image ] As it is default magento feature, its not visible in product view page

these 3 files are exists :

 app/design/frontend/rwd/theme/template/catalog/product/view/options/file.phtml

 app/design/frontend/rwd/theme/template/catalog/product/view/options.phtml

 app/code/core/Mage/Catalog/etc/config.xml

in 3rd file inside node , below code exists:

config->global->catalog->product->options->custom->groups

<file translate="label" module="adminhtml">
    File
    <render>adminhtml/catalog_product_edit_tab_options_type_file</render>
    <types>
        <file translate="label" module="adminhtml">
            File Upload
        </file>
    </types>
</file>

Is i need to check in any other place ?


texts: Why jQuery is not working for mobile filter

texts:
In mobile view, i have the set of filters set to display: none;
and im trying to use jQuery's .toggle function to display and hide those filters, but for some reason my jQuery is not working and nothing happens when i click the filter button.

HTML:

<?php echo $this->__('Filter') ?>

        <?php $_filters = $this->getFilters() ?>
        <?php foreach ($_filters as $_filter): ?>
        <?php if($_filter->getItemsCount()): ?>

<?php echo $this->__($_filter->getName()) ?>

<?php echo $_filter->getHtml() ?>

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

jQuery:

You can test here (must view in mobile (<767px wide browser)):
http://180fragrances.com/index.php/kentucky-derby-hats-women


texts: How to run composer.patch on Magento 2.1

texts:
I am trying to run this patch

PATCH_MDVA-4538_EE_2.1.4_v2.composer.patch

when I simply run the patch command it hangs. Is there a composer.patch command that I need to do?


texts: Configurable Product Attribute Price "undefined"

texts:
Using a configurable product and the size attribute to change the prices at the product page the size selector don't show the full price and show this "undefined"
Front-end
https://prnt.sc/j9mkqc
Admin Panel:
http://prntscr.com/j9mpb5