texts:
I am attempting to create a basic text slider, which works perfectly well on a plain html page. However, when I move it to my Magento 2 site, I get an undefined error for this piece of javascript.

HTML

<>

                    MY FIRST MESSAGE

                    MY SECOND MESSAGE

SCRIPT

$(document).ready(function () {
    //rotation speed and timer
    var speed = 5000;

    var run = setInterval(rotate, speed);
    var slides = $('.slide');
    var container = $('#slides ul');
    var elm = container.find(':first-child').prop("tagName");
    var item_width = container.width();
    var previous = 'prev'; //id of previous button
    var next = 'next'; //id of next button
    slides.width(item_width); //set the slides to the correct pixel width
    container.parent().width(item_width);
    container.width(slides.length * item_width); //set the slides container to the correct total width
    container.find(elm + ':first').before(container.find(elm + ':last'));
    resetSlides();

    //if user clicked on prev button

    $('#buttons a').click(function (e) {
        //slide the item

        if (container.is(':animated')) {
            return false;
        }
        if (e.target.id == previous) {
            container.stop().animate({
                'left': 0
            }, 1500, function () {
                container.find(elm + ':first').before(container.find(elm + ':last'));
                resetSlides();
            });
        }

        if (e.target.id == next) {
            container.stop().animate({
                'left': item_width * -2
            }, 1500, function () {
                container.find(elm + ':last').after(container.find(elm + ':first'));
                resetSlides();
            });
        }

        //cancel the link behavior
        return false;

    });

    //if mouse hover, pause the auto rotation, otherwise rotate it
    container.parent().mouseenter(function () {
        clearInterval(run);
    }).mouseleave(function () {
        run = setInterval(rotate, speed);
    });

    function resetSlides() {
        //and adjust the container so current is in the frame
        container.css({
            'left': -1 * item_width
        });
    }

});
//a simple function to click next link
//a timer will call this function, and the rotation will begin

function rotate() {
    $('#next').click();
}

Console Error

(index):747 Uncaught ReferenceError: $ is not defined
    at (index):747
(anonymous) @ (index):747

Can anyone please suggest an edit to get this working?


texts: Blank-Theme Customize: How duplicate and customize Toggle-nav action

texts:
I just create a new theme based on theme_frontend_blank and i now would customize navigation menu on mobile device. I would create this kind of scenario:

I had create Account right icon modifing ./mytheme/Magento_Theme/template/html/header/logo.phtml.
<?= $block->escapeHtml(__('Toggle Nav')) ?>
<?= $block->escapeHtml(__('Toggle Nav')) ?>

I add in my ./Magento_Theme/wiev/layaout/default.xml this declaration for create a new navigation block (i just copy and paste the original "navigation-section" from module_theme layout xml and rename it "navigation1-section") and move block "store.links" in there:
<referenceContainer name="page.top">
        <block class="Magento\Framework\View\Element\Template" name="navigation1.sections" after    ="-" template="Magento_Theme::html/sections.phtml">
            <arguments>
                <argument name="group_name" xsi:type="string">navigation-sections</argument>
                <argument name="group_css" xsi:type="string">nav-sections</argument>
            </arguments>
        </block>
    </referenceContainer>
    <move element="store.links" destination="navigation1.sections" after="-" />

At this point i don't understand how on click icon make open one or other nav-section
Can someone help me
Tnx


texts: Magento2 GET value "Under review by Fraud Service" in RESPMS parameter from test Paypal Payflow on payment time

texts:
GET RESPONSE FROM PAYPAL

  RESPMSG    Under+review+by+Fraud+Service
  "transaction has been declined"

GET Param are from paypal
POSTFPSMSG  Review: More than one rule was triggered for Review
PREFPSMSG   Review: More than one rule was triggered for Review
PROCAVS A
PROCCVV2    P
RESPMSG Under+review+by+Fraud+Service
RESULT  126
SECURETOKEN 98uhf5vOncEq4uTf1LR8vBg3k
SECURETOKENID   a2c20746fd9eff2019cdd3238ea709cc
SHIPTOCITY  Crystal+Laos
SHIPTOCOUNTRY   US
SHIPTOSTATE IL
SHIPTOSTREET    52+West+Stt
SHIPTOZIP   61067
STATE   IL


texts: Htaccess Redirect Product Url without Category Path

texts:
Our current product URLs look something like this:

  https://www.example.com/category1/category2/product.html
  https://www.example.com/category1/category2/product-2.html

We want them to look like this and have proper 301 redirects set in place:

  https://www.example.com/product.html

  https://www.example.com/product-2.html

We are on Magento 1.9 and I know there is an option to exclude category URL
 under the admin>system>catalog>Catalog>Search engine Optimization> Use Categories Path for Product URLs > NO.

My question is, if the "Create Permanent Redirect for URLs if URL Key Changed" is set to yes, will that create a 301 redirect for all of my existing products? Will this be the outcome?
https://www.example.com/category1/category2/product.html will 301 redirect to
https://www.example.com/product.html

&

  https://www.example.com/category1/category2/product-2.html will 301

redirect to

  https://www.example.com/product-2.html

If that is not the outcome, is there something within the .htaccess file that I could add to make these changes at BULK?


texts: Magento 2 in custom grid click action result redirect given object object

texts:
I have created my custom grid increment id is click to result in redirect sales order view page. But given the action return object object.
file-path
vender/module/view/adminhtml/ui_component/assignorder_changeemail_listing.xml
<column name="order_id" class="vender\module\Ui\Component\Listing\Column\ViewAction">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                   <!-- <item name="filter" xsi:type="string">textRange</item>
                    <item name="label" xsi:type="string" translate="true">Order_Id</item>-->
                    <item name="indexField" xsi:type="string">order_id</item>
                    <item name="viewUrlPath" xsi:type="string">sales/order/view</item>
                    <item name="urlEntityParamName" xsi:type="string">order_id</item>
                </item>
            </argument>
        </column>

path of ViewAction.php: vender\module\Ui\Component\Listing\Column;
<?php
namespace vender\module\Ui\Component\Listing\Column;

use Magento\Framework\UrlInterface;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Ui\Component\Listing\Columns\Column;

class ViewAction extends Column
{
    protected $urlBuilder;

    public function __construct(
        ContextInterface $context,
        UiComponentFactory $uiComponentFactory,
        UrlInterface $urlBuilder,
        array $components = [],
        array $data = []
    ) {
        $this->urlBuilder = $urlBuilder;
        parent::__construct($context, $uiComponentFactory, $components, $data);
    }
    public function prepareDataSource(array $dataSource)
    {
        if (isset($dataSource['data']['items'])) {
            foreach ($dataSource['data']['items'] as & $item) {
                if (isset($item['order_id'])) {
                    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                    $incrId = $item['order_id'];
                    $collection = $objectManager->create('Magento\Sales\Model\Order');
                    $orderInfo = $collection->loadByIncrementId($incrId);
                    $orderId = $orderInfo ->getId();
                    $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log');
                    $logger = new \Zend\Log\Logger();
                    $logger->addWriter($writer);
                    $logger->info($item['order_id']);
                    $viewUrlPath = $this->getData('config/viewUrlPath') ?: '#';
                    $urlEntityParamName = $this->getData('config/urlEntityParamName') ?: $orderId;
                    $item[$this->getData('name')] = [
                        'view' => [
                            'href' => $this->urlBuilder->getUrl(
                                $viewUrlPath,
                                [
                                    $urlEntityParamName => $orderId
                                ]
                            ),
                            'label' => __('view')
                        ]
                    ];
                }
            }
        }
        return $dataSource;
    }
}


texts: Magento 2 - mouseup/mousedown event not fire on fotorama

texts:
In Magento 2, mouseup / mousedown event not fire on fotorama gallery.

Does have any idea about this?


texts: Change paypal payments standard variable

texts: I am using paypal payments standard, the shipping price is transferred as a product line (item variable) and therefore does not show in paypal as a postage amount. How can I change the shipping from item variable to shipping variable?


texts: Magento 2.3.1 Category Page is not loading in Magento admin panel

texts:
My Magento version is 2.3.1. all pages in the admin panel working correctly. but my category page is not loading shows console error.

I am already trying some solution like

    delete pub/static folder.
    delete the cache folder
    run the content deploy command.
    change the view_preprocessed in app/etc/di.exml

But still, it's not working.


texts:
in magento2 add custom.js file

file custom.js

require(
     [
       'Mageaddons_Popup/js/angular.min',
       'Mageaddons_Popup/js/textAngular-rangy.min',
       'Mageaddons_Popup/js/textAngular-sanitize.min',
       'Mageaddons_Popup/js/textAngular.min'
     ],
     function($){
      'use strict';
    // code
 });

i get error

  Error: Mismatched anonymous define() module: function (a){ "use
  strict";
  window.rangy=a("rangy"),window.rangy.saveSelection=a("rangy/lib/rangy-selectionsaverestore")}
  http://requirejs.org/docs/errors.html#mismatch

  var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' +
  id); in require.js


texts: Magento 2.3.1 Composer Fatal error when installing Ext

texts:
Trying to install anything on Magento 2.3.0 & 2.3.1 using Composer I get the following error.

Does anyone know how to fix this?

Fatal error: Uncaught TypeError: Return value of Magento\InventoryComposerInstaller\Plugin_composer_tmp1::initModuleDeployment() must be an instance of Magento\InventoryComposerInstaller\void, none returned in phar:///opt/cpanel/composer/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code:69 Stack trace:

0 [internal function]: Magento\InventoryComposerInstaller\Plugin_composer_tmp1->initModuleDeployment(Object(Composer\Script\Event))
1 phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(176): call_user_func(Array, Object(Composer\Script\Event))
2 phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(96): Composer\EventDispatcher\EventDispatcher->doDispatch(Object(Composer\Script\Event))
3 phar:///opt/cpanel/composer/bin/composer/src/Composer/Installer.php(204): Composer\EventDispatcher\EventDispatcher->dispatchScript('pre-update-cmd', true)
4 phar:///opt/cpanel/composer/bin/composer/src/Composer/Command/RequireCommand.php(18 in phar:///opt/cpanel/composer/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code on line 69


texts:
we've been given a Magento site to take over. I'm not familiar with Magento at all, but they have given us all files and DB schema. It all appears to be working on our server, apart from a strange parse error. When I add a product to my basket, and get sent to /checkout/cart/ the site dies (I see a blank screen).

The error log says:

PHP Parse error:  syntax error, unexpected '[' in /app/code/local/C3/Checkout/Block/Cart/Totals.php on line 41

Line 41 is:

$address->setShippingMethod(array_values($rates)[0][0]->getCode());

I can't find anyone else who has had this error. Does anyone have any ideas?

Thanks in advance!


texts: Magento 2.1.1 Unable to save parent category

texts:
I'm trying to save category from admin panel
but not able to save parent category, it fire error :: Something went wrong while saving the category.


texts:
I wanted to add a FAQ tab to the products page.
I created an attribute called faq in the admin panel as textarea with wysiwyg.
I also gave it a default value.
Then I added the attribute to an attribute set so it showed up in the product configuration in the backend and added some text.
Finally I added this to the catalog.xml in my own templates folder (based on rwd).

<block type="catalog/product_view_attributes" name="faq" as="additional" template="catalog/product/view/attributes.phtml">
    <action method="addToParentGroup"><group>detailed_info</group></action>
    <action method="setTitle" translate="value"><value>FAQ</value></action>
</block>

Now the Tab shows up in the frontend but neither shows my default value for the attribute nor the text I added in the product configuration.

Instead it shows for some products an exact copy of the description tab or for other products some additional fields like weight, etc.

Any idea what I am doing wrong here?


texts: Magento2: How to add multiple AND and OR conditions to filter/filterGroups?

texts:
The question is too close to this topic:
Magento 2: Product Repositories, Filter Groups, and `AND`

but is it possible to create criteria with multiple OR and AND?

In my case i would like to create alternative to this code:

/** @var $collection \Magento\Catalog\Model\ResourceModel\Product\Collection */
        $collection = $this->collectionFactory->create();
        $collection->addAttributeToSelect('special_from_date');
        $collection->addAttributeToSelect('special_to_date');
        $collection->addAttributeToSelect('price');
        $collection->addAttributeToSelect('special_price');
        $collection->setVisibility($this->catalogProductVisibility->getVisibleInCatalogIds());

        $collection->addStoreFilter()->addAttributeToFilter(
            'special_from_date',
            [
                'or' => [
                    0 => ['date' => true, 'to' => $todayEndOfDayDate],
                    1 => ['is' => new \Zend_Db_Expr('null')],
                ]
            ],
            'left'
        )->addAttributeToFilter(
            'special_from_date',
            [
                'or' => [
                    0 => ['date' => true, 'from' => $todayStartOfDayDate],
                    1 => ['is' => new \Zend_Db_Expr('null')],
                ]
            ],
            'left'
        )->addAttributeToFilter(
            [
                ['attribute' => 'special_from_date', 'is' => new \Zend_Db_Expr('not null')],
                ['attribute' => 'special_to_date', 'is' => new \Zend_Db_Expr('not null')],
            ]
        )->addAttributeToSort(
            'special_from_date',
            'desc'
        );

The problem is that i have here several wrapped OR conditions and all of them  are combined using AND.


texts:
I have created a block which contains my company name, address, telephone etc. How can I add this block to my contact page http://www.extenderstore.com.au/contact/ ?
I would like it located under the contact form.


texts: Add custom attributes when creating product via REST API

texts:
I am attempting to set custom attributes when creating a new product via the REST API. The products have a required attribute hpUuid. This is part of my JSON file to create the new product:

{
    "product": {
        "sku": "12345",

        ... Quite a few fields here ...

        "custom_attributes": [
            {
                "attribute_code": "hpUuid",
                "value": "123"
            }
        ],
    }
}

When submitting, the REST API returns this error:

{"message":"The \"hpUuid\" attribute value is empty. Set the attribute and try again."}

The fine docs suggest that the format is correct, but why can it not read the value?

EDIT: More information

I have tried two similar request bodies, based on different examples that I have found. One based on the fine manual is here:

{
    "product": {
        "name": "My Fine Product",
        "sku": "123",
        "attribute_set_id": 4,
        "status": 1,
        "visibility": 4,
        "type_id": "configurable",
        "extension_attributes": {
            "category_links": [
                {
                    "position": 0,
                    "category_id": "2"
                }
            ]
        },
        "custom_attributes": [
            {
                "attribute_code": "hpUuid",
                "value": "52"
            }
        ]
    }
}

And another based on an accepted Stack Overflow answer is here:

{
    "product": {
        "sku": "sku_from_rest",
        "name": "My Fine Product",
        "attribute_set_id": "4",
        "status": 1,
        "visibility": 4,
        "type_id": "virtual",
        "weight": 0,
        "extension_attributes": {
            "stock_item": {
                "stock_id": 1,
                "qty": 20,
                "is_in_stock": true,
                "is_qty_decimal": false,
                "use_config_min_qty": true,
                "min_qty": 0,
                "use_config_min_sale_qty": 0,
                "min_sale_qty": 0,
                "use_config_max_sale_qty": true,
                "max_sale_qty": 0,
                "use_config_backorders": false,
                "backorders": 0,
                "use_config_notify_stock_qty": true,
                "notify_stock_qty": 20,
                "use_config_qty_increments": false,
                "qty_increments": 0,
                "use_config_enable_qty_inc": false,
                "enable_qty_increments": false,
                "use_config_manage_stock": true,
                "manage_stock": true,
                "low_stock_date": "string",
                "is_decimal_divided": true,
                "stock_status_changed_auto": 0,
                "extension_attributes": {}
            }
        },
        "custom_attributes": [
            {
                "attribute_code": "hpUuid",
                "value": "123"
            }
        ]
    }
}

I have ensured that the attribute_set_id value of 4 is correct for the default attribute set. I have addionally added an attribute set number 9 which is a clone of the Default set. However, when I use the attribute_set_id value of 9 the product is created without an hpUuid, as if the value that I submitted was simply ignored.


texts: Credit Note functionality not working in Magento

texts:
Hope someone here can assist me!

It seems I'm having a problem with creating a credit note in Magento 1.7.0.2 (Yes, I know it's a slightly older version - Going to update to 1.9 in due course).

Whenever you start a credit note on an order that has been invoiced and shipped, the place where items and quantities are filled in seems to be greyed out - I have no option to add items to be refunded!

I've disabled any non-standard modules and this hasn't helped and I've also re-indexed and cleared cache (just incase!).

I've posted a screenshot below.

(Please note, the other information such as address and payment info are visible - I've just blanked them out in the screengrab!)


texts: Magento 2 Where (code) are the filters from the layered navigation applied to the product collection?

texts:
I'm trying to find the portion of code where the filters from the layered navigation are applied to the product collection.

The method called for product collection retrival is Magento\Catalog\Block\Product\ListProduct::_getProductCollection

Which in turn calls Magento\Catalog\Model\Layer::getProductCollection this uses a collection provider to instantiate the collection and then Magento\Catalog\Model\Layer::prepareProductCollection().

The layer object above contains the filters selected in the layered navigation on frontend and above metioned function (prepare) uses Magento\Catalog\Model\Layer\Category\CollectionFilter::filter.

As stated in the function associated comment this should filter the collection * Filter product collection yet I see no filters from the layered navigation applied.

I still can not find where the filters from the layered navigation are applied.

I should mention that the Magento\Catalog\Block\Product\ListProduct::_getProductCollection is called in the Magento\Catalog\Block\Product\ListProduct::_beforeToHtml method at then end of this method the filtered collection is loaded but even going with the debugger line by line I still can not find the portion of code that applies the filters.

In this method an 'catalog_block_product_list_collection' event is dispatched. Is it possible that the filters are applied in an Observer?

EDIT:

The only observer tapped to this event is Magento\Review\Observer\CatalogBlockProductCollectionBeforeToHtmlObserver and it does not seem to be related to my problem.

Edit 2:

The product collection used in Magento\Catalog\Block\Product\LitProduct
is extended from Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection which has a method _renderFiltersBefore which is called when the collection is loaded. Here the filters are fed and set through a searchCriteriaBuilder the search is made and put in a temporary table which is joined with the productCollection.

I still can not find the actual piece of code that retrieves and handles the filters.

Any help is appreciated.

Many thanks.


texts: Custom controller: Argument 1 must be instance of Context, instead Objectmanager is given

texts:
Created a module which was working for a long time, however after some other edits to the site I got this error:

  "Recoverable Error: Argument 1 passed to vendor\module\Controller\Cart\Index::__construct() must be an instance
  of Magento\Framework\App\Action\Context, instance of
  Magento\Framework\ObjectManager\ObjectManager given, called in
  /Applications/MAMP/htdocs/project/shop/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
  on line 93 and defined in
  /Applications/MAMP/htdocs/project/shop/app/code/vendor/module/Controller/Cart/index.php
  on line 14"

Removing var/generation, var/di and var/cache folders solve the problem, however, it reappears after setup:di:compile

Any thoughts on possible fixes?

Here is the controller code:

<?php
namespace vendor\module\Controller\Cart;

class Index extends \Magento\Framework\App\Action\Action {

    /** @var  \Magento\Framework\View\Result\Page */
    protected $resultPageFactory;

    /**      * @param \Magento\Framework\App\Action\Context $context      */
    public function __construct(\Magento\Framework\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory)     {
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

    /**
     * Blog Index, shows a list of recent blog posts.
     *
     * @return \Magento\Framework\View\Result\PageFactory
     */
    public function execute()
    {
      header('Content-Type:text/plain');
      header("Access-Control-Allow-Origin: *");
      $resultPage = $this->resultPageFactory->create();
      return $resultPage;
    }

}


texts: How to enable CORs to access Magento rest APIs : Magento2

texts:
I'm getting an error while call API from Angular APP
test website and app is hosted in different domain.

Website Url abc.test.com
Angular App : xyz.test.com

When I call API for Listing Of product in getting below Error

  Failed to load resource: the server responded with a status of 400 ()
  Access to XMLHttpRequest at
  'https://abc.test.com/rest/V1/products?searchCriteria%5BpageSize%5D=10&searchCriteria%5BcurrentPage%5D=1&searchCriteria%5BsortOrders%5D%5B0%5D%5Bdirection%5D=DESC&searchCriteria%5BsortOrders%5D%5B0%5D%5Bfield%5D=created_at'
  from origin 'http://xyz.test.com' has been blocked by CORS policy:
  Response to preflight request doesn't pass access control check: No
  'Access-Control-Allow-Origin' header is present on the requested
  resource.

How to solved it?


texts: Use Category of products for Related Products

texts: I have a large number of products that share a list of about 52 related products, which I am displaying in a slider on the product page. I would like to take these 52 products and put them in their own category, then use that category to list those related products. It would save me TONS of time, especially down the road. Is this possible? Can someone point me in the right direction?


texts: Magento Checkout Step Issue After Version Update

texts:
I have updated Magento 1.7 with latest version 1.9.3.9.

I am facing issue with checkout steps and Checkout progress.

In checkout steps first 2 steps are working but the 3rd step "Save Shipping Address" is not working. When I click on "Continue" button after selection of "Shipping Method" it's not going to next step "Payment Information".

Checkout progress section is blank.

I have also checked but there is no jquery error.


texts: Image not showing for Default Attribute set

texts:
I have two attributes sets "Default" and "bibliografi".  I have another attribute for images as "att_eby_images" .  In the website, images does show for products under "bibliografi" but it is not showing under "Default" attribute set.  The att_eby_image is there in the "images" tab in the admin.

Dont know where I am going wrong, please help


texts: Fatal error: Call to a member function getOptionArray() on a non-object

texts:
I am Created Custom Module "Recipe" (module name). when I add a mass action for status Magento throws an error like "Fatal Error: Call to a member function getOptionArray() on a non-object "

My Grid file code:

$statuses = Mage::getSingleton('recipe/status')->getOptionArray();

Also in my config.xml file code:

<resourceModel>recipe_mysql4</resourceModel>

So Can any one please tell me what was the mistake?

My Magento Version is: 1.9.2.3


texts: Out of stock images - Grey out if products are out of stock in Magento 2

texts:
I see that there is a solution for M1. Would this work for M2?

https://stackoverflow.com/questions/35292353/out-of-stock-images-grey-out-if-products-are-out-of-stock-in-magento-1-9-x


texts: magento product link goes blank after searching product

texts:
I am using Luxury theme and I am getting issue regarding search.

See my video about the error: https://www.screencast.com/t/sCcPQFeC

Whenever we search the product by name and click on product detail page it’s showing blank page but when I open same product through main navigation then it’s working fine.

http://usatileandmarble.net/


texts: How to create the same Order Grid Layout for all admin users

texts:
I created a good Order Grid Layout for our companies' workflow and I would like to set this as default for all users that work in our Magento 2 backoffice.
Now I have to go to every user (since we use 2FA I cannot login with their credentials) and check/ uncheck the right columns on the Order, Invoice and Shipment page. Is there a way I can create a default view for everyone? Or at least an import/export option so I do not have to do this manually for every new user we add?


texts: Magento 2: How to override the luma default.xml

texts:
I wish to do some customization in luma theme (default.xml).

I just created the default.xml file as specified below but it is not taking any effect.

Note sure is this the correct way to override the theme???


texts: How to show grid with customer and customer's attributes details in magento 2

texts:
I wish to show customer name,email and some customer attributes values in a separate grid please provide me a solution, how to replace a below code to show customer and its attribute values.

protected function _prepareCollection()
    {
        $collection = $model = $this->_model->create()->getCollection();

        $this->setCollection($collection);
        parent::_prepareCollection();
        return $this;
    }

Thanks in advance


texts: Magento 1.9 - MYGENTO_ logs flood server

texts:
I got e-mails from my host that the server was almost full, which was alarming because this particular shop is hosted on a huge server and only takes about 20% of the diskspace.

So I took to SSH to find out what folders were so huge, and I found that there are hundreds of MYGENTO_*.log files in a lot of different folders. This has never happened before, but must be going on for quite some time now because it takes some time before the disk is almost full.

I found and removed them all via SSH, but as soon as I delete them, they pop up again. So there must be some 'active logging' going on.

So I searched the filesystem for the filename and came up with two mentions in one file: /lib/Zend/Db/Adapter/Abstract.php creates these files (around line 486);

 /**
 * Prepares and executes an SQL statement with bound data.
 *
 * @param  mixed  $sql  The SQL statement with placeholders.
 *                      May be a string or Zend_Db_Select.
 * @param  mixed  $bind An array of data to bind to the placeholders.
 * @return Zend_Db_Statement_Interface
 */

private static $_numcall = 0;
public function query($sql, $bind = array())
{

[...]

    file_put_contents('MYGENTO_.log', json_encode(array(
        'timestamp' => $ta,
        '_numcall' => self::$_numcall,
    )) . "\n\r", FILE_APPEND | LOCK_EX);

    [...]

    if($dt > 1) {
        file_put_contents('MYGENTO_.log', json_encode(array(
            'DELTA' => $dt,
            'sql' => $sql,
        )) . "\n\r", FILE_APPEND | LOCK_EX);
    }

My first guess would be to just comment out these actions, but I'm hesitant because this is apparently in the core, and I've never had problems with it before. So my question is, why now all of a sudden?


texts:
Steps to install magento 2 on vagrant box
How to setup magento 2 on vagrant box ?
what are the minimum requirements to make it run at better then basic pace ?


texts: Adding coupon to products with unit price limit

texts: I am new to Magento. I wish to add a discount coupon to products with unit price more than $20.00. Please help me in creating the condition for that


texts: Display Common attributes for selected categories?

texts:
How can i show my attributes for my selected categories, actually its common attribute like Manufacture?

Note: if i remove from attributes set it is not displayed for my remaining categories,


texts: Dynamic Content based on items in Basket

texts:
Is there a way to dynamically display content on a page, based on whether there is something in your basket.

i.e Page would display certain block of text IF there is something in the customers basket AND would not display if there is nothing in the customers basket.


texts: Default Billing address is not selected by default in magento checkout 2

texts:
I have multiple address in my account. In the checkout, default shipping address is selected on the page load but the default billing address is not selected, instead I can see all the available addresses in the drop down.
Is there any code I have to make change to make default billing address to be auto selected in the checkout?
Thanks in Advance!!


texts: Magento 2: Videos not working in Product gallery

texts:
Video at product gallery inside product detail page is not working, However, it is working from admin panel but on product view it is showing only video thumbnail.
Video is not playing while clicking on video thumbnail.
Can any one give suggestion?
Thanks


texts: Category/search images not showing in Firefox

texts: I get Content Security Policy errors in Firefox. I have a CSP module that handles this just fine in Chrome, but this remains an issue in Firefox. Are there more steps that have to be taken to make security policies in Firefox?


texts: adding calendar on form field in magento 2 not working error 404

texts:
In frontend I've managed to add a form that loads in a modal shown after a product is added to cart. On that form a field must have a calendar on. I've used the attribute data-mage-init='{"calendar": {"showTime": false, "showOn":"both", "defaultDate":"-20y"}}' on the form field.
But on the console I see

  "NetworkError: 404 Not Found -
  http://testmagento2/pub/static/frontend/Magento/luma/en_US/calendar.js"
  .

Indeed in that location there is no calendar.js. Instead I've found the calendar.js under http://testmagento2/pub/static/frontend/Magento/luma/en_US/mage/calendar.js

I can't figure out the problem.
Any help is appreciated! Thank you in advance!


texts: Mage::log() not working on new Magento update (1.9.4.1)

texts:
After this new update (1.9.4.1), Mage::log() is not working. Apparently, it has something to do with Zend_Validate_File_Extension on line 819 at Mage.php where it checks if the file is_readable() before it even exists. I reversed the whole log() method to its previous version and it is working again.

What is the main channel that i can contact Magento team to report this issue?


texts: ReflectionException - Class does not exist error after 2.2.5 from 2.1.9

texts:
I have upgraded a Magento 2.1.9 store to 2.2.5.  The upgrade seems successful, and everything is working in development mode, but I am not able to compile or put the store into production mode.

The error I get when running setup:di:compile is:

[ReflectionException]Class Magento\Framework\Acl\CacheInterface does not exist

I have removed the contents of var/, generated/, generation/ etc, and set filesystem permissions specified in the documentation.

The full stack trace for the error is here:

[ReflectionException]
Class Magento\Framework\Acl\CacheInterface does not exist

Exception trace:
() at /var/www/html/magento2.2/vendor/magento/framework/Code/Reader/ClassReader.php:29
ReflectionParameter->getClass() at /var/www/html/magento-2.2/vendor/magento/framework/Code/Reader/ClassReader.php:29
Magento\Framework\Code\Reader\ClassReader->getConstructor() at /var/www/html/magento-2.2/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassReaderDecorator.php:35

Magento\Setup\Module\Di\Code\Reader\ClassReaderDecorator->getConstructor() at /var/www/html/magento-2.2/setup/src/Magento/Setup/Module/Di/Code/Reader/Decorator/Area.php:53
Magento\Setup\Module\Di\Code\Reader\Decorator\Area->getList() at /var/www/html/magento-2.2/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Area.php:109
Magento\Setup\Module\Di\App\Task\Operation\Area->getDefinitionsCollection() at /var/www/html/magento-2.2/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Area.php:84
Magento\Setup\Module\Di\App\Task\Operation\Area->doOperation() at /var/www/html/magento-2.2/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php:56
Magento\Setup\Module\Di\App\Task\Manager->process() at /var/www/html/magento-2.2/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php:206
Magento\Setup\Console\Command\DiCompileCommand->execute() at /var/www/html/magento-2.2/vendor/symfony/console/Command/Command.php:241
Symfony\Component\Console\Command\Command->run() at /var/www/html/magento-2.2/vendor/symfony/console/Application.php:843
Symfony\Component\Console\Application->doRunCommand() at /var/www/html/magento-2.2/vendor/symfony/console/Application.php:193
Symfony\Component\Console\Application->doRun() at /var/www/html/magento-2.2/vendor/magento/framework/Console/Cli.php:104
Magento\Framework\Console\Cli->doRun() at /var/www/html/magento-2.2/vendor/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at /var/www/html/magento-2.2/bin/magento:23

setup:di:compile

Any help with working out the cause of this error would be greatly appreciated


texts: Magento 2 - how to load JS template from filesystem in jquery widget

texts:
For example, native Magento theme-frontend-blank\web\js\navigation-menu.js has such code:

$.widget('mage.navigationMenu', {
    options: {
    ...
        collapsableDropdownTemplate:
            ''

And then they do

        this.collapsableDropdown = $(
            mageTemplate(
                this.options.collapsableDropdownTemplate,
                {elems: this.elemsToCollapseClone}
            )
        );

Is it possible to do something like this

collapsableDropdownTemplate: getTemplate(some_relative_path_to_template) ?
instead of

        collapsableDropdownTemplate:
            ''

My template is a little bit bigger and I want to allow frontend developers to modify it.


texts:
is there a way that I can get an order by selecting the cart id that was used to produce the order in the database?

I use the following code to get the cart id

Mage::getSingleton('checkout/session')->getQuoteId();


texts: Magento 2: How to use an image within a link

texts:
Attaching a link to an image is not an uncommon action to take, and I'm trying to accomplish this within the default.xml of my theme. We have a static image of a google maps location, and we want it to link to Google's map app.

XML

<block class="Magento\Framework\View\Element\Html\Link" name="location.link">
  <arguments>
    <argument name="label" xsi:type="string"><![CDATA[<img src="/pub/media/logo/default/location-map.png" />]]></argument>
    <argument name="href" xsi:type="string">https://goo.gl/maps/XSKNf</argument>
  </arguments>
</block>

The xml above correctly renders a clickable link that goes to the proper location, but the img tag itself is rendered as text, not as html. Removing CDATA results in the argument not being parsed.

It's obvious I'm coming at this wrong, and given M2's relative newness, I've not been able to find an example that shows a way.

Is what I am asking possible?

NOTE **
I am aware that I could just create a template file to accomplish this, but I'm asking if there is another method that would work. I would like to avoid creating unnecessary templates, if possible, just to render a single line of static html.


texts: Custom attribute value is not stored in DB

texts:
I created one custom field in magento2 checkout page by using the plugin.add the attribute via the set script.column is created in DB but the value is not saved in the DB after place the order in my checkout page.

i refer this link to create a custom field in magento2-https://belvg.com/blog/how-to-add-the-delivery-date-field-on-a-checkout-page-in-magento.html


texts: How to disable "Table rates" if free shipping is avaiable on checkout - Magento 2

texts: How can i disable "Table Rates" Shipping method on checkout if "Free Shipping" is avaiable?


texts: Css and Js are not loaded after install fresh Magento 2.1.3

texts:
I have installed Magento 2.1.3  after installation I go at admin but the admin link are not seeing proper I think some CSS and JS are missing ,

After I run deploy static command and re index and remove cache,

And then start admin panel but now its seeing weird

No CSS or JS file are loaded.

How do I resolve this issue?


texts:
When going through my check out if the customer is already a customer and tried to log in on my checkout page, when you click log in it just take you to the accounts log in page and i dont understand why. I tried adding the form key line as i have seen this has fixed other peoples problems but no luck.

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

        <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
        <form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">
            <fieldset>

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

<?php echo $this->__('Please log in below:') ?>

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

                            <input type="text" class="input-text required-entry validate-email" id="login-email" name="login[username]" value="<?php echo $this->htmlEscape($this->getUsername()) ?>" />

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

                            <input type="password" class="input-text required-entry" id="login-password" name="login[password]" />

                    <?php echo $this->getChildHtml('form.additional.info'); ?>
                    <?php echo $this->getChildHtml('persistent.remember.me'); ?>

                <input name="context" type="hidden" value="checkout" />
            </fieldset>
        </form>
        <?php echo $this->getBlockHtml('formkey'); ?>

            <button type="submit" class="button" onclick="onepageLogin(this)"><?php echo $this->__('Login') ?></button>

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

        <a href="<?php echo $this->getUrl('customer/account/forgotpassword') ?>" class="f-left"><?php echo $this->__('Forgot your password?') ?>

thank you so much if you can help


texts: getting "Consumer is not authorized to access %resources" when using rest API in magento2

texts:
AUTH REST API:

if(isset($_POST)){
    print_r($_POST);
    $email=$_POST['email'];
    $pass=$_POST['pwd'];

    //$email='memotest@gmailtest.com';
    //$pass='memo@123';

$userData= array("username" => "api", "password" => "*********");
$link = "4ao8yk15rvchyqhc.mojostratus.io";

//generateApiToken();

$ch = curl_init("$link/index.php/rest/V1/integration/admin/token");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($userData));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Content-Lenght: " . strlen(json_encode($userData))));
$token = curl_exec($ch);

 $ch = curl_init("$link/index.php/rest/V1/Login/check/$email/$pass");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_encode($token)));
$result = curl_exec($ch);
$result = json_decode($result, True);
echo "<pre>";

var_dump($result);die;

And Result :


texts: How to pass text input value to js in magento 2 knockout js?

texts: In my template.html file, I am having only the input field. After I complete entering the text in the input field, I need to pass the value to the js file without any button click. How to achieve this using Magento 2 knockout js?


texts: GMAIL: Magento Order/Invoice Emails Bounce Back

texts:
Basically, when someone places an order and they are using GMAIL account, such customers do not receive any order confirmation, invoice or tracking information.
72 hrs later I receive bounce back

Delay reason: SMTP error from remote mail server after end of data:
[MY SERVER IP ADDRESS] Our system has detected that this message is
suspicious due to the very low reputation of the sending IP address.
To protect our users from spam, mail sent from your IP address has
been temporarily rate limited.

Emails get bounce back only for GMAIL accounts.  Hotmail, Yahoo are all fine get delivered. Also, my server IP is not blacklisted anywhere.

However, I am able to send email to GMAILaddresses using webmail application such as roundcube and horder.

Any idea how to fix the issues with default Magento email not being received by GMAIL accounts?


texts: 'Sort by' option effect all other customer

texts:
I setup default 'Sort by' option as 'Positions' but I found when other customer changed 'Sort by' option like 'Name' on front-end, it effect to me too (I can see 'Sort by' is now 'Name' even if I didn't change option and I guess it also effect all other customer's view)

How can I make 'Sort by' option is not effect to other customers even if a customer change and show default 'Sort by' option first as always?


texts: To assign downloadable products to Magento configurable products

texts: I want to assign downloadable products to Magento configurable products. It is taking simple products only. Is there any solution for this?


texts: core_config_data settings not loading on shell script

texts:
I have a shell script that should send an API request to a certain endpoint, using username and password in a simple HTTP auth. Everything works fine using hard-coded values, but of course we want to make those values configurable, so each time the credentials or the endpoint change, we can adjust using the Admin interface.

The relevant part of the script is the following:

$url = Mage::getStoreConfig('my_namespace/api_name/base_url');
$username = Mage::getStoreConfig('my_namespace/api_name/username');
$password = Mage::getStoreConfig('my_namespace/api_name/password');

if (!$url) {
    $this->log("`my_namespace/api_name/base_url` should be set");
    $this->error = true;
}

if (!$username) {
    $this->log("`my_namespace/api_name/username` should be set");
    $this->error = true;
}

if (!$password) {
    $this->log("`my_namespace/api_name/password` should be set");
    $this->error = true;
}

if ($this->error) exit(1);

All this is inside a public function run() method of a class that extends from Mage_Shell_Abstract. Trying to run this script ends up showing all the three error messages, just like the values didn't exist in DB.

But the values are present in the database:

mysql> SELECT * FROM core_config_data WHERE path LIKE '%my_namespace%';
+-----------+---------+----------+--------------------------------+-----------------------------+
| config_id | scope   | scope_id | path                           | value                       |
+-----------+---------+----------+--------------------------------+-----------------------------+
|      5986 | default |        0 | my_namespace/api_name/base_url | http://the.api-endpoint.com |
|      5987 | default |        0 | my_namespace/api_name/username | Picard                      |
|      5988 | default |        0 | my_namespace/api_name/password | NCC-1701                    |
+-----------+---------+----------+--------------------------------+-----------------------------+

Caches were clean multiple times, so it's all good from this part. I can't see what is wrong here. Any help is welcome.


texts:
I have a custom admin grid and trying to add the Export to CSV option. I've added it already and the button works as well. The problem occurs when I try to export it, it only exports visible records. I dont have the MassActions setup so I can't really SELECT ALL and stuff.

How can I make it so whenever I hit the export to csv button, it exports ALL records instead of the visible ones.


texts: Does enabling category and product flat data will affect performance in Magento 2?

texts:
I have huge doubt in flat data feature in Magneto 2.

If I enable product and category flat data in Magento 2.

Will it affect the website performance heavily ?


texts: How the Redirect is happen in magento2 customer account controller?

texts: How Magento redirect the customer to account login controller form the account index controller?


texts: Show also fixed price for bundle product when special price is set

texts:
Currently when we set a special price for bundle product it shows the special price as configured price. We use bundles as package products so we hide all options and selections and bundles have only the default products attached to them.

We need to show also the fixed original price set for the bundle product. How could we show that too as a reference price for the special price?


texts: Custom Theme registration.php error in Magento 2

texts:
I'm using magento 2.2.5 and  try to create customer theme, I added the registration.php inside app/design/frontend/Test/mine/

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/Test/mine',
    __DIR__
);

when I ran the php bin/magento setup:upgrade , I got the following error:

  PHP Parse error:  syntax error, unexpected ''frontend/Test/mine''
      (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ')' in
      /var/www/project/app/design/frontend/Test/mine/registration.php on
      line 4


texts: 503 Service Unavailable in Magento 2.1.7 admin

texts:
I am working on a Magento 2.1.7 shop and  I have
created a child-theme of Magento Blank.

I need to delete maintenance.flag to get rid of the 503 Service Unavailable error and unlock my Magento admin (this problem appears only in the admin). The entire error message is:

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

There is no .maintenance.flag in the var directory. The php bin/magento maintenance:status command returns

Status: maintenance mode is not active
List of exempt IP-addresses: none

What can be wrong? Thank you!


texts: URL key for specified store already exists in Magento 2.1.1

texts:
I am trying to Update Category name in Magento 2.1.1 but its throwing "URL key for specified store already exists.".

This error is appearing in some categories while other categories are working fine.

main.CRITICAL: exception 'Magento\Framework\Exception\AlreadyExistsException' with message 'URL key for specified store already exists.' in D:\xampp\htdocs\m2demo\vendor\magento\module-url-rewrite\Model\Storage\AbstractStorage.php:85

I am just upadating category name.

Let me know if any one can help me.

Thanks for your answer in advance.


texts: How to create product price in real time based on forms?

texts:
I would create a product where price is made dynamically based on a form. You can see an example here (web site made with magento): http://minimegaprint.com/pieghevoli.html.

I have Made a form that with some calculus can calcolate a custom price.
Is there a way or extension or custom code that can send this custom price to magento product price?

Thanks a lot


texts: Remove sticky behaviour of cart summary in Magento 2.2

texts:
i need to disable sticky behaviour from the cart summary block in checkout cart page, but can't figure out how to do it.

I tried overriding js file

  /vendor/magento/theme-frontend-blank/Magento_Theme/web/js/theme.js

into

  app/design/frontend/MyVendor/MyTheme/Magento_Theme/web/js/theme.js

and commenting out sticky call:

 /* $('.cart-summary').mage('sticky', {
    container: '#maincontent'
  }); */

as is suggested in Customize sticky behaviour of Cart Summary: Magento 2, without success.

I'm using Magento 2.2.6

Thanks in advance,

Antonio.


texts: Magento 2 - SOAP Consumer is not authorized to access

texts:
In my Magento 2.0.13 is working, but on Magento 2.1.5 I received this message below when I accessed mystore.com/soap/default?wsdl&services=catalogProductRepositoryV1

  I don't want create a separed script.

<env:Code>
    <env:Value>env:Sender</env:Value>
</env:Code>
<env:Reason>
    <env:Text xml:lang="en">Consumer is not authorized to access %resources</env:Text>
</env:Reason>

This command is working mystore.com/soap/default?wsdl_list=1 on my Magento 2.1.5.

I believe that isn't issue related to the version, I used this reference:
http://devdocs.magento.com/guides/v2.1/soap/bk-soap.html


texts: Not able to add any additional attribute to Magento 2 Custom Theme's Logo Element

texts:
I have successfully created a custom theme as a child of Luma theme in my Magento CE 2.0.12 installation.

But if I add below code in my layout/theme.xml file, I am not able to add a title attribute to img tag of Logo:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="logo">
           <arguments>
              <argument name="logo_file" xsi:type="string">images/mytheme_logo.svg</argument>
              <argument name="logo_alt" xsi:type="string">Custom Alt</argument>
              <argument name="logo_title" xsi:type="string">Custom's Logo</argument>
              <argument name="logo_img_width" xsi:type="number">200</argument>
              <argument name="logo_img_height" xsi:type="number">200</argument>
           </arguments>
        </referenceBlock>
    </body>
</page>

Please suggest how to add additional attribute to img tag of Logo.


texts: Magento 2 : Best practice to load category EAV value

texts:
I want to know what is best practice to load a complex EAV attribute in a block. I have added a custom EAV attribute to category and I can see it in Catelog_Category_Entity_Text table, although I am not able to access it via, Category->getResource->getAttribute method.

Thanks in Advance.


texts: Can't get a new category attribute value

texts:
I have added a new category attribute but after creating attribute, Im not able to fetch value...

A custom attribute is visible on the backend but how could I get value. I have followed this tutorial.

https://www.atwix.com/magento/add-category-attribute/


texts: Add a product to checkout that isn't created in Magento?

texts:
I have a job at the minute that requires a third party (TP) system to add products to the magento cart. The third party hosts all product information and the pricing. The products being added to the cart will not be added to Magento directly (Catalog/Manage Products). I am looking to know if this is possible and if there are any resources that will help achieve this?

Basically, I am looking to add products to the cart and checkout without having the product created in magento. It will be sent to the website via GET/POST.

Thanks


texts: Where i can find "https://sitse.com/index.php/admin/sales_order_create/loadBlock/block/card_validation?isAjax=true request in magento 1?

texts:
I want to trigger this ajax request
https://sitse.com/index.php/admin/sales_order_create/loadBlock/block/card_validation?isAjax=true
I am not sure where is the code for it, it triggers when re order from backend magento 1
Any idea where i can find this ? Any thoughts ?


texts:
I'm creating a Payment Method and I need to include user validation when the store configures the extension (much like a login). I've been reading a lot about it, but I can't manage to make it work.

I've tried setting an observer that fires when the user clicks on "Save Config", but I'm still figuring out how to make the observer work.

But this made me wonder: is this the best way to do what I want or is there any better way?


texts: Navigation is not showing on home page and some category pages in magento2

texts:
On the home page and some category page menu is not showing. If we go to the product detail page then it appears.

I checked some links and disabled fastly CDN as suggested but still no luck. Currently built in cache is enabled.

Can anyone suggest me please.


texts: how to get a coupon code in magento 2.right now i am getting name i want a coupon code

texts:
public function __construct(

        \Magento\Framework\View\Element\Template\Context $context,

        \Magento\Framework\Registry $registry,

        \Magento\SalesRule\Model\ResourceModel\Rule\CollectionFactory  $collection,
        \Magento\Framework\Stdlib\DateTime\Timezone $_stdTimezone,
        array $data = []
    ) {
        $this->_coreRegistry = $registry;
        $this->collection = $collection;
        $this->coupon = $coupon;
        $this->_stdTimezone = $_stdTimezone;
        parent::__construct($context, $data, $collection, $coupon);
    }

public function getDiscountCoupon()

    {

        $currentTime = $this->_stdTimezone->date()->format('Y-m-d');
        $rules = $this->collection->create()
                        ->addFieldToFilter('is_active', 1)
                        ->addFieldToFilter('to_date', ['gteq' => $currentTime]);
            //echo $rules->getSelect()->__toString(); die();
        $product = $this->_coreRegistry->registry('product');

        foreach ($rules as $rule) {
            try {
                if ($rule->getActions()->validate($product)) {
                        $activeRules[] = $rule;
                }
            } catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
                continue;
            }
        }
        $rulesApplied = "
Applicable Offers:
";
        foreach ($rules as $rule) {
                $rulesApplied .= $rule->getName()."
";
        }
        return $rulesApplied;
    }


texts:
After fresh install magento 2.4.1, running the command setup:di:compile gives the error

currently working on windows
i tried all this on developer mode
chmod -R -v 777 generated
1) php bin/magento cache:clear
2) php bin/magento setup:upgrade
3) php bin/magento setup:di:compile
4) php bin/magento setup:static-content:deploy -f

but still same issue


texts: Help please - blocks disappeared after apply SUPEE-6788 patch

texts: I applied SUPEE-6788 patch on magento 1.9.1 and now blocks on homepage disappeared. Here https://magentary.com/kb/cms-pages-transactional-emails-broken-after-supee-6788-patch/ they say go to System > Permissions > Blocks menu on admin but there is no such item on my admin menu, only "Users" and "Roles".


texts: Error whenever trying to create an order in Magento 2.3.3: Type Error occurred when creating object: Magento\\Framework\\Mail\\EmailMessage

texts:
The error seems to originate from trying to create an Email when a new order is created, the weird thing however is that Email's is turned off for the store.
From what i know of nothing has changed and the error suddenly appeared after 3 months of Magento running completely fine.
I have tried applying the patch EmailMessageInterface backward compatibility issue patch for Magento 2.3.3.
The error that appears in the system.log is the following:
[2021-02-12 07:41:49] main.CRITICAL: Type Error occurred when creating object: Magento\\Framework\\Mail\\EmailMessage, Argument 2 passed to Magento\\Framework\\Mail\\EmailMessage::__construct() must be of the type array, null given, called in /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116 [] []

[2021-02-12 07:41:49] main.CRITICAL: Saving order 5000279516 failed: Type Error occurred when creating object: Magento\\Framework\\Mail\\EmailMessage [] []\n

Does anyone know how to solve this problem or what could be the cause?


texts: How to set maximum value of date attribute in Magento?

texts:
I want to set maximum value of "Date of Birth" (dob) attribute of the customer.

I want to set this date only earlier than today (not for future). After change I want to have JS validation on adminhtml backend in customer edit screen.

I want to update this attribute in setup scripts within my module.
How to achieve this?

Thanks in advance for your help.


texts: Magento 2 - Unable to resolve the source file for image

texts:
I have created an image and have uploaded this to my theme/web/images folder. I have then ran the following:

  php bin/magento setup:static-content:deploy

However I cannot get the image to show on the frontend, viewing the image URL I receive the following error?

Unable to resolve the source file for 'frontend/theme/theme/en_GB/images/Delete-16.png'
#0 /var/www/vhosts/domain.co.uk/httpdocs/vendor/magento/framework/App/StaticResource.php(121): Magento\Framework\View\Asset\File->getSourceFile()
#1 /var/www/vhosts/domain.co.uk/httpdocs/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\StaticResource->launch()
#2 /var/www/vhosts/domain.co.uk/httpdocs/pub/static.php(13): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\StaticResource))
#3 {main}

Any ideas on how I can get my images to show?

Thanks


texts: magento2 data migration error Exception #0 (BadMethodCallException): Missing required argument $options

texts: after migrating customer data when i click on view customer view data it was shown above error, please help me to resolve


texts: Javascript ReferenceError: reloadPriceOfSingleProduct is not defined

texts:
I get following errors in console of my browser if I change options on a Product under magento 1.9.3.3 :

Uncaught TypeError: Cannot read property 'success' of undefined
at klass.initialize (prototype.js:1743)
at klass.initialize (prototype.js:429)
at new klass (prototype.js:101)
at klass.Product.Config.updateData (configurable.js:450)
at klass.Product.Config.configureElement (configurable.js:269)
at klass.Product.Config.configureForValues (configurable.js:332)
at klass.initialize (configurable.js:105)
at klass (prototype.js:101)

Uncaught TypeError: Cannot read property 'processEmpty' of undefined
at PRODUCTNAME.HTML

Uncaught ReferenceError: StockStatus is not defined
at PRODUCTNAME.HTML

configurable.js:348 Uncaught ReferenceError: reloadPriceOfSingleProduct is not defined
at klass.Product.Config.configureImage (configurable.js:348)
at HTMLImageElement.<anonymous> (prototype.js:391)
at HTMLImageElement.responder (prototype.js:5598)

I tried to put old files (prototype.js, app/design/base,default,rwd folders)

Cleaned cache, index ... nothing helped

Anybody an idea?


texts:
I have the following setup:

Magento community 1.9.2

1 x Ec2 frontend, running Litespeed Webserver, php run through Litespeed's Php implementation - LSPHP, sort of like fast-cgi used in Nginx

1 x RDS server for database

I just configured 1 x Elasticache (Redis node)

I have configured my local.xml to send session and backend cache to the Redis database.

I can see the cache store is filling up, plus the speed difference is notable (plus no files in cache and session folders)

My three questions are:

do I still need to install php-Redis extension on the frontend web-server for php?  (Considering it's all working) I can't seem to work out what it's used for ?
Is there a way to know how much space I'll need ? My file store cache was less than 50mb yet my redis cache is already used 300mb
What happens if the store fills up? Does it delete old session caches ? Or does the site start having issues on the front end (like carts being emptied?)


texts: create attribute option at product import time in magento 2

texts:
I want to create attribute option value at product import time. i used some link but i have no luck with this.

Magento2 - programmatically add product attribute options

https://dev98.de/2016/12/21/how-to-create-attribute-options-in-magento2/

https://webkul.com/blog/programmatically-add-options-attribute-magento2/

Please expert any idea where is my mistake?


texts: How to track Product revision History in Magento 2

texts: Is there any feature to save product revision history for content changes like wordpress post history?


texts: How to run unit tests without using Selenium?

texts:
Is it possible to run MTF without using Selenium?

The main aim is to run tests on the web-server (Running Debian), we don't have any web browsers on the web server.


texts: Magento2: How to get product name above review

texts:
In tab review, we display all reviews available in our website.

how to get product name assigned to a given review? https://prnt.sc/rhodfq because each review relates to different products and I would like to display the product name with a link to product redirection like here: https://prnt.sc/rhoeu0


texts: Order ID sequence issue in Magento 1.9.2.4

texts:
order ID 100000099 is missing in my magento admin, I do not know whether it is deleted by mistake or not.

When I open order no 100000100. In url, order id shows 10000099.

after order ID 10000099. all orders show like this sequence.

The wrong ID also shows in front-end my acccount.

kindly help me to resolve this issue.

Thank You


texts: Magento 2.3: Using HTML in a Static Block

texts:
Can I use HTML content in a Static Box? If so, please provide the code that I can use in the Block Content to identify the code as HTML.
I am trying to use a Widget to insert  HTML content into the Main Content Container of a Category page to use as a landing page.


texts:
Fatal error: Call to a member function getBackend() on a non-object in
/home/***/public_html/app/code/core/Mage/Newsletter/Model/Resource/Subscriber/Collection.php
on line 139

I get this error when I click on Newsletter Subscribers.
Any idea what could cause this?


texts:
I have setup a stock notification "ONLY x LEFT" on a product page.
Could you please advise how to set a "Low Stock" notification on the category page?
As below (10 left):


texts: Magento 2 : Prevent stopping import execution in Magento 2

texts:
I am not able to find the code which is responsible for breaking import csv execution
from magento import tool in backend.
I do not want to terminate csv execution, even if error occur.
Any thoughts on this please ?


texts: How to restrict order in website wise in magento 2.2.0

texts:
I have created two websites and install track order.

website1
website2

but I have placed an order in website1 and track order working now properly but one issue website2 order display track order.

now how to restrict the order in website2.
please advance thanks for the help.


texts: Magento2 getViewFileUrl on backend and frontend

texts:
I have a file called image.png

Folder structure:

-app
   -code
       -Roland
           -HelloWorld
               -view
                   -adminhtml
                       -web
                   -frontend
                       -web
                          -image.png

When I call this on frontend:

$this->getViewFileUrl("Roland_HelloWorld::image.png");

Result: http://localhost/magento2/pub/static/frontend/Magento/luma/en_US/Roland_HelloWorld/image.png

And the image loads fine.

When I call this on backend:

$this->getViewFileUrl("Roland_HelloWorld::image.png");

Result: http://localhost/magento2/pub/static/adminhtml/Magento/backend/en_US/Roland_HelloWorld/image.png

The image is not loading as it is not in the adminhtml/web/ folder.

Is there any way to load the static url for this asset with the frontend application area? What would be the official way, I do not want to duplicate this image into both folder?

UPDATE #1

This might be good, does anyone know better solution?

echo $this->getViewFileUrl("Roland_HelloWorld::image.png", array(
    'area'  => 'frontend',
    'theme' => 'Magento/Luma'
));


texts: Importing orders from .csv into Magento 2

texts:
I've got some orders from M1, exported into a CSV that I need to add to Magento 2. There aren't too many so I don't mind doing it manually.
I've found that adding orders through the order section of the site will only create new orders and not let me add in historical orders. Is there any way to add them to the Database or another method?
Thanks


texts: change field labels in shipping address in order email in magento 1.9

texts:
i create a custom email in Transaction emails with name new sale and in its template i have this code that create the Shipping Address:

<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
                                {{var order.getShippingAddress().format('html')}}
                                &nbsp;
                            </td>

(its part of the table)
and the result of this code become like this:

  Shipping Address:
    firstname lastname
    address
    city,postal code
  country
    T: telephone

i want to change the labels of this fields like T:  to Phone Number:
how can i do this?


texts: Coupon creating using child product of a Configurable products

texts: I want to create a coupon using variance of a configurable product.Suppose,i have configurable product(Cp-01),it have three child simple products. Color of product is red,green,blue consequentially. I have create a coupon it will apply when size red and sku is Cp-01 .Please help me


texts: Where is customer_entity_static table in Magento?

texts:
while data:migration i get error
Base table or view not found: 1146 Table customer_entity_static

But there is no table with this name. Does anyone had similar problem with this table?
Source: magento 1.9.3.4
Destination: magento 2.4.1
Thanks in advance :)


texts:
I'm trying to display the information from an attribute with information as to when the product will be available again on my custom view.phtml page. This is my code:

        <?php if ($_product->getShortDescription()):?>

                    <?php // Check to see if the item is in stock
                    if($_product->stock_item->is_in_stock == 1):
                        echo $this->__('Availability') ?>:<?php echo $this->__('In stock') ?>

                    <?php else: ?>
                        <?php echo $this->__('This product is available on: ') ?><?php echo $_product->getAvailabilitydate(); ?>
                    <?php endif; ?>

                    <?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?>

            <?php endif; ?>

However, it is now displaying both. So when a product is not in stock it's displaying not in stock AND my custom attribute information. What am I missing here?


texts:
So I have this script:

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
require('app/Mage.php');
umask(0);

Mage::app();

/* tell the browser that we are a csv file */
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename=orders.csv");
header("Pragma: no-cache");
header("Expires: 0");

/* Set our dates */
$fromDate = '2016-05-20 00:00:00';
$toDate = '2019-01-01 00:00:00';

/* Get the collection. Here we set a date range, and ignore cancelled orders.
   You can filter the collection however you prefer */
$orders = Mage::getModel('sales/order')->getCollection()
    ->addAttributeToFilter('created_at', array('from'=>$fromDate, 'to'=>$toDate))
    ->addFieldToFilter('status', array('nin' => array('canceled')));

/* Here you can build an array, print to screen, write to a CSV etc */
echo "Order ID,Customer Name,Order Total".PHP_EOL;
foreach($orders as $o){

    /* lets output the required data in csv format */
    echo $o->getIncrementId().',';
    echo $o->getCustomerName().',';
    echo $o->getBaseGrandTotal();
    echo PHP_EOL;

    /* you can load the order items, if you need them */
    //$items = $order->getAllVisibleItems();
}

I want to get the sku, products ordered, quantity ordered. How can I do that?


texts: Add custom infomation to cart listing data in checkout#payment

texts:
I added some information to the cart listing overriding the getConfig function result it work well in shipping page but these results change when moving to payment page:
Here is the results dumped in the details.html:
Shipment page:
{
  "item_id": "591",
  "name": "name of product",
  "qty": 1,
  "price": "4295.8300",
  "base_price": "4295.8300",
  "discount_percent": "0.0000",
  "discount_amount": "0.0000",
  "base_discount_amount": "0.0000",
  "tax_percent": "20.0000",
  "tax_amount": "859.1700",
  "base_tax_amount": "859.1700",
  "row_total": "4295.8300",
  "base_row_total": "4295.8300",
  "row_total_with_discount": "0.0000",
  "price_incl_tax": "5155.0000",
  "base_price_incl_tax": "5155.0000",
  "row_total_incl_tax": "5155.0000",
  "base_row_total_incl_tax": "5155.0000",
  "weee_tax_applied": null,
  "weee_tax_applied_amount": null,
  "options": "[]",
  "price_before_discount_value": null, // custom value
  "saving_value": null // custom value
}

Payment page:

{
  "item_id": 591,
  "price": 4295.83,
  "base_price": 4295.83,
  "qty": 1,
  "row_total": 4295.83,
  "base_row_total": 4295.83,
  "row_total_with_discount": 0,
  "tax_amount": 859.17,
  "base_tax_amount": 859.17,
  "tax_percent": 20,
  "discount_amount": 0,
  "base_discount_amount": 0,
  "discount_percent": 0,
  "price_incl_tax": 5155,
  "base_price_incl_tax": 5155,
  "row_total_incl_tax": 5155,
  "base_row_total_incl_tax": 5155,
  "options": "[]",
  "weee_tax_applied_amount": null,
  "weee_tax_applied": null,
  "name": "name of product"
}

Any lead to make the item data the same in payment page will be appreciated!


texts: Will commenting out lines to hide price in store affect updates?

texts:
I wanted to remove the price of products from appearing anywhere on my site. I bought and installed a hide price extension which worked for the catalog and products pages but some products appeared on the home page still with the price. This was because the theme had a "product tabs" feature which displayed some products on the home page.

I went into various files in the following path "app/design/frontend/mytheme/template" and commented out the PHP code which things such as the price and the stock. Here is an example:

                                <?php if($quick_view):?><a data-toggle="tooltip" href="<?php echo $this->getUrl('arexworks/quickview/index',array('product_id'=>$_product->getId()));?>" class="button link-quickview" title="<?php echo $this->__('Quick View') ?>"><?php endif;?><?php /*
    */?><?php if ($_compareUrl = $this->getAddToCompareUrl($_product)): ?><a data-toggle="tooltip" href="<?php echo $_compareUrl ?>" class="button link-compare" title="<?php echo $this->__('Add to Compare') ?>"><?php endif; ?><?php /*
    */?><?php if ($this->helper('wishlist')->isAllow()) : ?><a data-toggle="tooltip" href="<?php echo $this->getAddToWishlistUrl($_product) ?>" class="button link-wishlist" title="<?php echo $this->__('Add to Wishlist') ?>"><?php endif; ?>

                            <?php /*if($_product->isSaleable()): ?>
                                <button onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')" class="button btn-cart" title="<?php echo $this->__('Add to Cart') ?>"><?php echo $this->__('Add to Cart') ?></button>
                            <?php else: ?>

<?php echo $this->__('Out of stock') ?>

                            <?php endif; ?>
                            <?php if($_product->getRatingSummary()):?>
                                <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
                            <?php else:?>

                            <?php endif;*/?>

My question is will doing this break my site if I perform Magento updates, say, a year from now? If so, is there a better way to prevent prices from appearing anywhere on my site?

I have seen various comments saying "never modify the core code" but I don't know if that extends to simply commenting out some PHP.

Any help would be appreciated!


texts:
I'm working with the Magento SOAP API. Many of the methods will list entites and allow for filtering in the request - however I can find no information in the documentation about what filters are available to use.

I've found some documentation about the kinds of operators we can use, but I'm left guessing at the field names themselves. Perhaps this is considered obvious for Magento developers, but I have little familarity with the Magento core.

Is there a list anywhere of the various fields that can be used for filtering? Specifically I'm looking for sales order filters at present, but ideally I'd like a comprehensive list of every field that can be filtered on every API method that allows filtering.


texts:
I am using magento community Edition 1.9.0.0. I created two different store for English and Spanish. And for Spanish i have added library to convert the data in the Spanish language,
But it not converting whole data like categories, static block etc.

My Question is, is there any way or any extension for that, rather than create separate block and page into a Spanish.


texts:
insert action

public function fanbookAction(){
        $img = ''.$this->getRequest()->getPost('img');
                if(isset($_FILES['img']['name']))
                {
                    try{
                       $uploader = new Varien_File_Uploader('img');
                         $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
                         $uploader->setAllowRenameFiles(true);
                         $uploader->setFilesDispersion(false);
                         $path = Mage::getBaseDir('media').DS.'FanBook'.DS;
                         $destFile = $path.'/'.$_FILES['img']['name'];

                         $filename = $uploader->getNewFileName($destFile);
                         $uploader->save($path, $filename);
                         $img ='FanBook/'.$filename;

                          $collection = Mage::getModel('fanbook/fanbook');
                          $collection ->setData('img',$img);
                           $collection->save();

                         $this->_redirectReferer();
                    Mage::getSingleton('core/session')->addSuccess('Done');
                    }

                    catch(Exception $e) {

                    }

                }
    }

Delete Action

public function deleteAction()
    {
        if( $this->getRequest()->getParam('id') > 0 ) {
            try {
                $fanbookModel = Mage::getModel('fanbook/fanbook');

                $fanbookModel->setId($this->getRequest()->getParam('id'))
                    ->delete();

                Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
                $this->_redirect('*/*/');
            } catch (Exception $e) {
                Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
                $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
            }
        }
        $this->_redirect('*/*/');
    }

While Deleteing I want to Delete Media folder also How to achieve this?


texts: Magento Full Page Cache (FPC) does not get warmed

texts:
I experience a weird issue on Magento ver. 1.14.2.0. The FPC was enabled in backend (Cache Management) but var/full_page_cache didn't exist. I figured out that app/etc/enterprise.xml was missing. After I restored it from a vanilla Magento installation the folder got created. But the size of the folder does not increase although I'm hitting several category and product pages:

du -sh full_page_cache/
4.0K    full_page_cache/

It stays empty. I've already set the folder to 777 but no change.

Does anyone know what is may causing the issue?

Thanks!


texts: Reindex stuck on processing and says 'Index process is working now. Please try run this process later.'

texts:
The index Catalog URL Rewrites is stuck on processing.

When clicking on Reindex Data it gives the error 'Index process is working now. Please try run this process later.'

Other threads suggested deleting the files in the var/locks folder but for me the locks folder doesn't even exist.

How can I fix this?


texts: Tire price not calculating at the cart page

texts: One product has tire price option, but when i click 'add to cart' button, I am  getting wrong 'unit price' and 'subtotal' at the Shopping cart page. Please see the both images:


texts: Magento 1.9 multi stores with independent carts

texts:
Is it possible to have independent cart for each store under single magento installation. Now i have created a site with 2 stores, but each store is sharing the single cart.
How it is possible to have independent cart for each of my store.

Example site is https://www.usinger.com/


texts: show in store not working in magento system.xml

texts:
I have created a section in system->config things are working fine.

I have defined like

<xyz module="abc_latest" translate="label">
     <label>my new setting</label>
     <show_in_default>1</show_in_default>
     <show_in_website>1</show_in_website>
     <show_in_store>1</show_in_store>
</xyz>

but only in store view it is not appearing. in default and website it is showing properly.


texts: Custom Configuration with Unknown Number of Fields

texts:
I've created my own module and custom configuration, and I want the user to be able to add as many fields as they need in the custom config.

Here's a mock up of what I'm after:

I want the user to be able to add as many users as they like to this list by clicking the Plus button.

Is this possible or is there a pattern I'm missing? I want the user to be able to add N sections, each following the pattern of taking in User Id and User Title so I hopefully end up with something like this JSON:

[{userId: 15, title: "Product Admin"}, {userId: 16, title: "Chat Moderator"}]

Thanks,
Harry


texts:
I've seen this error elsewhere, but the general consensus seems to be "Increase the allowed memory PHP has". Ours is already at 1GB, so I'd like to figure out (if possible) what's going wrong here.

The full error is:

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 523800 bytes) in /lib/Zend/Locale/Data.php on line 819

Then, in the Data file mentioned, line 819 is the citytotimezone case:

case 'citytotimezone':
    $_temp = self::_getFile($locale, '/ldml/dates/timeZoneNames/zone', 'type');
    foreach($_temp as $key => $found) {
        $temp += self::_getFile($locale, '/ldml/dates/timeZoneNames/zone[@type=\'' . $key . '\']/exemplarCity', '', $key);
    }
    break;

This intermittent error just started happening within the last week or so, but we've not made any relevant changes that should be affecting this.

How can I begin to debug this issue?

We are using PHP 5.3.10, if that's relevant.


texts: Is hole punching cache method working in Magento2? How to implement in Particular Block in Magento2?

texts: Can anyone please explain hole punching Cache method and how to implement in particular one block in Magento 2.


texts:
We have managed to change the favicon for the main website but when someone clicks on a link that opens a new window (application forms, etc) then the magento favicon is used. Every time I delete the favicon in my root directory and upload my own (with the same name) it overwrite it and restores the Magento one.

I have also now gone through and deleted every Magento favicon there is in my root directory and still it appears......

How change a i change it so on every change even the new windows that open up have my favicon?


texts: Best way to create admin grid in Magento 2

texts:
I want to know the differece of the multiple ways we can create an admin grid in Magento 2.

Some people says that the best way is with the php, because is the best to debug, but i find more responses that are only in xml that it make me think that it's the best way.

In this page i see different ways

and which is the best and what is the difference ?

UPDATE

I see most of people use the uicomponent. It's better solution?


texts:
When I have gone through Mage_Bundle module in magento, I found this code snippet inside app/code/core/Mage/Bundle/etc/config.xml.

<admin>
    <fieldsets>
        <catalog_product_dataflow>
            <is_in_stock>
                <product_type>
                    <bundle/>
                </product_type>
            </is_in_stock>
            <manage_stock>
                <product_type>
                    <bundle/>
                </product_type>
            </manage_stock>
        </catalog_product_dataflow>
    </fieldsets>
    ...
</admin>

What is this <fieldsets /> stands for ? I have searched a lot. But every reference is describing about system fieldsets. Can anyone here describe, what is this for ?

Thanks in advance.


texts: Magento 1: Stop supporting Flash at the end of 2020

texts:
Reference url: https://www.blog.google/products/chrome/saying-goodbye-flash-chrome/
Adobe announced its plans to stop supporting Flash at the end of 2020. And google announced that remove Flash completely from Chrome toward the end of 2020.
Still we are using magento1 and image upload depended on flash. if flash removed from chrome, how to upload images in magento 1?

is all magento 1 version depended on flash? (currently using 1.9.4.4)
is there any patch from magento for this issue?
what are the impact on magento 1, if flash removed from browser?
what is the solution for the image upload, if flash removed from browser?


texts:
I'm getting the following error when listing the products in a category:

Fatal error: Call to undefined method Magento\Eav\Model\Entity\Attribute\Source\Boolean::getSpecificOptions() in /var/www/html/magento2/httpdocs/vendor/magento/module-configurable-product/Model/ResourceModel/Product/Type/Configurable/Attribute/Collection.php on line 297

It's just the standard page that the topmenu takes you to when clicking on a category. Could anyone point me in the right direction to resolve this issue?


texts: Moving a referenced block via arguments?

texts: Is it possible to reorder elements by passing an <argument> inside a referenceBlock tag if I am not able to add my after/before where the block was first called?


texts: How do I get the ID of a dropdown attribute by its text label?

texts:
I have a product attribute which is configured to be a dropdown with a fixed list of available values.

Now I need to write a script which will filter based on the selected value of the dropdown attribute.  The filter needs to know the integer ID of the value, but the script input uses the text based label of the attribute.

How would I lookup the integer ID of the desired attribute value?


texts: From which function discount coupon value is getting subtracted from Subtotal?

texts:
I want to know the function name from where coupon value is getting subtracted from subtotal or any table used?

I want to change the cart Subtotal value, if coupon code is applied then it should take MRP not selling price.


texts:
Facing Error whilst updating Magento 2.3.4 to 2.3.5-p2 on Home Page

Type Error occurred when creating object:
Magento\Catalog\Model\Product\Filter\DateTime


texts: Magento 2 add link next to Size attribute in product page

texts:
In Magento 2 product page I need to add a link beside the Size attribute, should show as below image.

which xml and phtml file to edit?


texts: Create invoice again which was deleted programmatically

texts:
I had deleted an invoice programmatically by using the following code:

$invoice = Mage::getModel('sales/order_invoice')->load(97);
$invoice->delete();

Now I need Invoice Button to invoice again. I have done lot of Google but didn't got success.

Please Help Me


texts:
By enabling Template Path Hints for Storefront I have found out that /var/www/html/magento/app/design/frontend/Mgs/claue/Magento_Customer/templates/form/register.phtml is the template file for Create Account page (https://domain/customer/account/create/ ).
I have added the below code to the top of the page :
<?php
if (isset($_POST['submit'])) {
$cookie_name = "mycity";
$cookie_value = $_POST['city'];
}
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/");
?>

.
.
.
.
The form has a field:
<input type="text" name="city" value="<?php echo $_COOKIE[$cookie_name]; ?>" title="<?php /* @escapeNotVerified */ echo __('City') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city') ?>" id="city">

.
.
.
The Create Account Button:
<button type="submit" name="submit" style="border-radius: 40px;" class="action submit btn btn-primary btn-full" title="<?php /* @escapeNotVerified */ echo __('Create an Account') ?>"><?php /* @escapeNotVerified */ echo __('Create an Account') ?></button>

.
.
.
But I get the below error:
1 exception(s):
Exception #0 (Exception): Notice: Undefined variable: cookie_value

If remove the coddition if (isset($_POST['submit'])) and give $cookie_value = "New York"; a hardcoded value it works but can't assign the field value as $cookie_value.


texts: Braintree credit card fields disabled in Latest version of Chrome - Magento 2.1

texts:
I have Magento 2.1 enabled with the native checkout, I noticed that the credit card fields stay disabled in the latest version of Chrome, in all other browsers it works fine.

Anyone had the same issue?

See below the answer from Braintree (They are mentioning extension but I'm running the native checkout, not an external extension):

  I’ve run some tests on your website, and I see that the credit card
  fields are disabled in Chrome(latest version), but working in other
  browsers. The Braintree extension that you are using has integrated
  our Hosted Fields for its payment form, which renders an iframe to
  handle input for each field where your customer enters credit card
  details. I see that the iframe is not loading in Chrome, that should
  be the reason why the credit card fields are shown as disabled and
  cannot accept input.

  I also tested my own Hosted Fields integration and it works fine in
  Chrome. What I believe is happening is that the Braintree extension
  that you are using is not compatible with your one step checkout
  extension in Chrome.

UPDATE

That's a known issue in Magento 2.1 and the fix will be available in Magento 2.1.1
https://github.com/magento/magento2/issues/5903


texts: How to remove the action of a menu.xml item?

texts:
I have a menu.xml like this:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="Xtento_TrackingImport::menu" action="Xtento_TrackingImport/index/index" title="Some title" module="Xtento_TrackingImport" sortOrder="101" parent="Magento_Sales::sales" resource="Third_Party::menu"/>
    </menu>
</config>

I want to remove the 'action' in it.
I've try some thing like this in my override menu.xml file :

<update id="Xtento_TrackingImport::menu"/>

And

<update id="Xtento_TrackingImport::menu" action=""/>

And also

<update id="Xtento_TrackingImport::menu" action="#"/>

But none of them work.

Please help, thanks.


texts: Trying to get filterable attributes of product collection

texts:
I am trying to get filterable attributes of product collection after applying filter to it programmatically.

same as layered navigation idea after I apply filter to category, it just return attributes that I can filter with it. that's what I am trying to do here.

I need that to return filterable attributes after applying filter to collection to send it to mobile app via api.

$category = Mage::getModel('catalog/category')->setStoreId(1)->load(84);
$collection = $category->getProductCollection()
                        ->setOrder('position', 'ASC')
                        ->addAttributeToSelect('*')
                        ->addAttributeToFilter('status', 1)
                        ->addAttributeToFilter('visibility', 4)
                        ->setStoreId(1);

$filtringAttributes = Array
(
    (object) array
        (
            'label' => 'Ref Nav Doors',
            'code' => 'ref_nav_doors',
            'value' => 693
        ),

    (object) array
        (
            'label' => 'Color',
            'code' => 'color',
            'value' => 5
        )
);

if (!empty($filtringAttributes)) {

    foreach ($filtringAttributes as $attribute) {
        $key = $attribute->code;
        $value = $attribute->value;
        $collection->addAttributeToFilter($key, $value);
    }
}


texts: How Magento Can give Refund more than order amount - MagentoEE 2.1.5

texts: I am unable to find the reason behind it.


texts: How to hide menu bar if user is not logged in private store

texts: How can I create a model that hides the menu bar if user is not logged in, and show only login page?


texts: Magento 2.2.5 How to add google captcha to newsletter form without use any third party extension

texts:
There is so many extension available for Google Captcha implement to Magento 2 newsletter form or any other form.

But i want to add Google Captcha from scratch, without using any third party extension.

Could anyone help or give guidance how to achieve this things.

Edit :(What i try)

I add code to below file to get google captcha. google captcha is showing but newsletter form stop working and give error like Something went wrong with the subscription

  app/design/frontend/Rocketbazaar/tgbl/Magento_Newsletter/templates/subscribe.phtml

<form class="form subscribe"
        novalidate
        action="<?php /* @escapeNotVerified */ echo $block->getFormActionUrl() ?>"
        method="post"
        data-mage-init='{"validation": {"errorClass": "mage-error"}}'
        id="newsletter-validate-detail">

            <?php /* @escapeNotVerified */ echo __('Sign Up for Our Newsletter:') ?>

                <input name="email" type="email" id="newsletter"
                            placeholder="<?php /* @escapeNotVerified */ echo __('Enter your email address') ?>"
                            data-validate="{required:true, 'validate-email':true}"/>

            <button class="action subscribe primary" title="<?php /* @escapeNotVerified */ echo __('Yes please!') ?>" type="submit">
                <?php /* @escapeNotVerified */ echo __('Yes please!') ?>
            </button>

            <input type="checkbox" id="recaptcha-verification-1" name="recaptcha-verification-1" value="" class="hide required-entry" style="visibility:hidden;position:absolute;left:-1000000px" />

    </form>

Any help would be appreciated!Thanks.


texts: "SHOPPING CART IS EMPTY" after login in with the user ID and password

texts:
I upgraded my Cloud hosting account (doubled the processor and memory) but now - I am getting the following problem:

When a customer goes through the order process, after they log in - a page appears with the products, then they hit the "proceed to checkout" button but nothing happens...they click it again and then it comes up with a page that has this:

  SHOPPING CART IS EMPTY

  You have no items in your shopping cart.

  Click here to continue shopping.

I have already increased the cookie life time to 86400 under

Sytem -> Configuration -> Web -> Session and Cookie Management

I think this is a problem with the server time. We are in the Mountain Standard Time zone and the backend of Magento is set to that (MST). My hosting company is asking me what they shall set the server time to?


texts: How to Remove + Sign From dropdown from bundle product?

texts:
how can we remove +(Plus) sign from Dropdown list from bundle product?
in Magento 2.3.4
i have tried this link but its not work for me..  Link


texts: Page Builder not working for the custom ui form admin

texts:
I have added the page builder in my admin form.But when I try to click on the setting icon for the elements it does not work.
 <field name="description" formElement="wysiwyg" sortOrder="90">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="source" xsi:type="string">storelocator</item>
            </item>
        </argument>
        <settings>
            <additionalClasses>
                <class name="admin__field-wide">true</class>
            </additionalClasses>
            <validation>
                <rule name="required-entry" xsi:type="boolean">false</rule>
            </validation>
            <label translate="true">Store View</label>
            <dataScope>description</dataScope>
        </settings>
        <formElements>
            <wysiwyg>
                <settings>
                    <wysiwyg>true</wysiwyg>
                </settings>
            </wysiwyg>
        </formElements>
    </field>


texts: Magento2 Possible to configure "Decrease Stock When Order is Placed" On storeview level?

texts:
I have a Magento 2 installation which has two websites - B2C and B2A. For B2A site I need to disable Stock Management so products won't be subtracted from the inventory when order is placed. I can understand this feature can be made from Stores->Configuration->Catalog->Inventory->Stock Options, and set Decrease Stock When Order is Placed to No. But it seems this option is working only globally, and can't be managed on website / storeview level?

And if this option can not be configured to website level, any suggesstions what else I can do to make Stock management disabled for B2A site?


texts: How to get cross sell items in mini cart magento 2.3

texts: How can we get cross sells items in mini cart in magento 2.3. please suggest any extension or best way to do it.


texts: Magento 2. Sales -> Invoices - add custom column to grid (Override invoice grid collections)

texts:
I have added one column in my sales invoice grid. My custom column is in sales_invoice table.

How can I override existing sales invoice grid and add my custom joint query.

Thanks in advance


texts: Beginner Magento 2 Development without SSH

texts:
I've been developing and become quite familiar with another framework, but I'd like to start learning and seriously taking on Magento 2.

My host is a shared linux environment that DOES NOT provide SSH capability. They do have a commercial option that does provide SSH.

However, I'm not wiling to fork out for this just yet, until I feel I'm ready or familiar enough with Magento 2.

I was able to install Magento 2 through cPanel and Softaculous, and got it running just fine. But on further experimentation, I realized SSH is essential - until I stumbled upon some helpful posts that pointed out PHP's system() command.

My question is really, as a beginner, will system() be enough for the time-being? I'm able to change store modes, enable/disable maintenance, static deployment and several others.

Thanks and apologies, compared to my previous framework, Magento 2 is quite overwhelming and the amount of resources available online are so vast. My previous php cart was just everything in one single forum.


texts: How to use google recaptcha in my custom form

texts:
I am following this link https://magebug.blogspot.com/2018/05/magento-2-add-google-recaptcha-in.html
The link suggests add a controller, i have already a controller file, how to add more than one controller under  execute()


texts: Make mobile menu appear sooner on Magento 2

texts:
The mobile menu appears at 768px and I want to change that to a custom value.

I've read on here to do the following:

The JS for the menu that has that functionality can be found in

  lib/web/mage/menu.js

First create the folder structure in your theme ex:

  [Namespace]/[theme_name]/web/mage/

And copy menu.js from lib/web/mage/menu.js to [Namespace]/[theme_name]/web/mage/menu.js

And change

 mediaBreakpoint: '(max-width: 768px)'

to

mediaBreakpoint: '(max-width: 1025px)'

But this isn't working, can anyone help please?


texts: Magento 2 - Event after customer edit Account Information

texts:
I need to add some custom logic in my extension after Editing Account Information, It should not trigger at Change Password or Edit Address.

Will customer_account_edited work.

$this->_eventManager->dispatch(
        'customer_account_edited',
        ['email' => $customerCandidateDataObject->getEmail()]
    );


texts: Run tests for a specific module in Magento2

texts:
Running the tests for Magento to using php bin/magento dev:tests:run takes a lot of time.
Is there a way to run the tests for a specific module only?

I'm a noob in (unit) testing so have mercy.


texts: find which database table is connected by admin panel

texts:
we are using magento extension.

using that extension we are storing values in admin panel.

i want to know what is the database table name the values are storing