texts: How to hide a div in .phtml if a customer is logged in magento 2

texts:
I want to have a block in home page that show text and button if customer is not logged in and if he is logged in this block have to disapear so how to proceed any help please
here is my code in .phtml

<?php $objectManagerlogin = \Magento\Framework\App\ObjectManager::getInstance(); $customerSession = $objectManagerlogin->get('Magento\Customer\Model\Session'); $baseurl = $objectManagerlogin->get('Magento\Store\Model\StoreManagerInterface')->getStore(0)->getBaseUrl(); ?> <?php if(!$customerSession->isLoggedIn()) :?>
 <?= /* @escapeNotVerified */ __('You have to be a member to see the content of this Page!!! To be one of our members click here', $baseurl .'customer/account/create') ?>

 –


texts: How to add onchange to a custom option (drop-down)

texts:
This should be simple but for some reason I can't find a solution.

I have some custom options that are listed on a drop down

I'd like to call a javascript function when the user changes the option.
This is the select tag that I'm looking for

I looked into ...catalog/product/view/options/type/select.phtm,...catalog/product/view/options/view/options.phtm, and into some additional files but it's nowhere to be found. Any idea about where should I find it?


texts:
I don't know why, when I click save post it will return an error

Please help me!


texts: Change a backend attribute type from Multi-select to Dropdown

texts:
My store has roughly 1000 products and 600 bundles, with approximately 8 store views. This equates to about 12,800 products or so.

We are going to be introducing configurables and one of the key attributes we want to reuse is a multi-select form field. Every product only has one type selected, so the EAV backend data-type which was configured during the set up of the original store was chosen incorrectly. At this point we'd like to migrate this to the dropdown data type.

Is there any relatively painless method for getting this set up outside of creating an entirely new attribute, porting the data, and deleting the old attr? Anyone with any experiences doing this that can lend me some helpful advice?


texts:
I have installed fresh installtion of magento 1.9.2.2

I have created group in customer group.

If I add any customer to that group using admin panel, and tries to login from frontend in different browser, it shows that

  Invalid login or password.

however if I clicks on forget password, enter user's email, I am getting email with password. Again if I try with same password, not able to login.


texts: Extending Order Email template in Magento 2

texts:
I am trying to extend the Order Confirmation Email Template to add the custom attribute. When I am trying to add code to core class it's printing the value in the email template. When enabling to my extended module it's not printing the value.

For this, I have done code.

di.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <preference for="Magento\Sales\Model\Order\Email\Sender\OrderSender" type="ABCSolutions\SalesEmail\Model\Order\Email\Sender\OrderSender" />
</config>

OrderSender.php

/**
     * Prepare email template with variables
     *
     * @param Order $order
     * @return void
     */
    protected function prepareTemplate(Order $order)
    {

        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $customer = $objectManager->create('Magento\Customer\Api\CustomerRepositoryInterface')->getById($order->getCustomerId());

        /** @param string $abccustomattribute*/
        $abccustomattribute = null;

        $customAttributes = $customer->getCustomAttributes();
        if(isset($customAttributes['abccustomattribute'])){
            $abccustomattributecode= $customAttributes['abccustomattribute'];
            if($abccustomattributecode->getAttributecode() == "abccustomattribute"){
                $abccustomattribute= $abccustomattributecode->getValue();
                $abccustomattribute.= " Working";
            }
        }

        file_put_contents('Order1.txt', print_r("\n" . 'API: ' . $abccustomattribute,true), FILE_APPEND);

        $transport = [
            'order' => $order,
            'billing' => $order->getBillingAddress(),
            'payment_html' => $this->getPaymentHtml($order),
            'store' => $order->getStore(),
            'formattedShippingAddress' => $this->getFormattedShippingAddress($order),
            'formattedBillingAddress' => $this->getFormattedBillingAddress($order),
            'abccustomattribute' => $abccustomattribute
        ];

        $transport = new \Magento\Framework\DataObject($transport);

        $this->eventManager->dispatch(
            'email_order_set_template_vars_before',
            ['sender' => $this, 'transport' => $transport]
        );

        $this->templateContainer->setTemplateVars($transport->getData());

        parent::prepareTemplate($order);
    }

After I have added the {{var abccustomattribute}} variable to Order Email template file order_new.html file.

Could you please suggest me where I went wrong?


texts: How to add a tab in product details page using Magento 2 admin panel

texts: how to add a tab in product details page using Magento 2 admin panel. Is there any option to do this ?


texts: Payment Restrictions Upon Checkout Based On Billing/Shipping Address

texts:
Our site currently offers 2 types of shipping method;
1. Credit Card
2. Interac (Debit)

We are looking to accept credit card payment ONLY under the certain conditions:
a. Billing & Shipping postal code match
b. Billing & Shipping does not match but sub-total is under $200.

Otherwise, only interac (debit) will be accepted and customers will be provided with a custom message/notification on the same page that explains 'why'.

So in another words, Interac will be the ONLY option if the customer wants to:
a. Ship to a different address other than billing address AND sub-total is OVER $200.

I am wondering how I can get this going? Any modules that do this so I can implement easily? Otherwise, it would be great if someone here can provide some tips on how I can achieve this. Thanks a million in advance.


texts:
Getting Default error on removing index.php from url.
i did same but getting error now.
2.In System -> Configuration -> Web -> Search Engines Optimizations- > Use Web Server Rewrites ->select YES

Second thing index.php is case sensitive, some times my website url automatically convert to capital letters like (http://www.blumelife.co/Index.php/about-us/) this url is working very well. but some time it changes automatically to (http://www.blumelife.co/index.php/about-us/) so it shows default error.
How can i stop this case sensitivty.

I installed magento 1.9 and server is window server.


texts: Magento2 : How to get base require js baseUrl to get static files?

texts: I am creating a custom module which retrieves the image from Package_Module/images/image.jpg in my javascript code. How to get the require js base URL or Static URL? or do you have any suggestions on what is the best to get the link of an image asset from javascript level?


texts: {{store url=" "}} or {{base_secure_url}} or {{base_unsecure_url}} for my situation?

texts:
Which one of these is best if I am running one store and the test environment is running unsecure where as production is running secure and we're only planning to have one store in the Magento instance and not multi-store?

If there were more than one store, would this impact the usage of the {{base_secure_url}} versus {{base_unsecure_url}} or the {{store url=""}}?

Thanks!


texts: How to get sku's of selected bundle products from order item?

texts: I see only product titles of products that are selected in product_options property of order item. Is there any way to get ids or skus of those products?


texts: How to upload multiple images/files in magento2 custom module backend?

texts:
I have uploaded single image successfully by below code.

$uploader = $this->_objectManager->create('\Magento\MediaStorage\Model\File\Uploader',['fileId'=>'image_photo']);

                    $uploader->setAllowedExtensions(['jpg', 'jpeg', 'gif', 'png']);
                    $imageAdapter = $this->_objectManager->get('Magento\Framework\Image\AdapterFactory')->create();
                    $uploader->addValidateCallback('image_photo', $imageAdapter, 'validateUploadFile');
                    $uploader->setAllowRenameFiles(true);
                    $uploader->setFilesDispersion(true);
                    $result = $uploader->save($mediaDirectory->getAbsolutePath(\{{namespace}}\{{module_name}}\Model\Image::BASE_MEDIA_PATH));

We also get multiple file object in a controller. Could anyone please guide how we can achieve upload for multiple files as well?


texts: Magento 2 : Add custom js to a single CMS page

texts:
I am trying to add custom js to a single CMS page in Magento 2.2.5.

Here is what I got:

I have put the rellax.min.js file at :/app/design/frontend/TemplateMonster/md/web/js

And I want to use that js on my about us CMS page so I invoked it like :

some text

some text

The problem I am facing is that the js doesn't seem to affect the rellax class like it is suppose to do.

Thanks for the help.

I have added rellax.js in /public_html/app/design/frontend/TemplateMonster/md/web/js
Then requirejs-config.js in this path
/public_html/app/design/frontend/TemplateMonster/md with the following code

var config = {
    map: {
        '*': {
            rellax: 'md/js/rellax'
        }
    },
    shim: {
        rellax: {
            deps: ['jquery']
        },
    }
};

And this is the code in my CMS page

some text

some text


texts: Magento2 Issue Stopping Customers Logging Into Account

texts:
Error output in log is as below:

main.CRITICAL: The element "customer_form_login" can't have a child
because "customer_form_login" already has a child with alias
"form_additional_info". {"exception":"[object]
(Magento\Framework\Exception\LocalizedException(code: 0): The
element "customer_form_login" can't have a child because
"customer_form_login" already has a child with alias
"form_additional_info". at
/home/vendor/magento/framework/Data/Structure.php:625)"}


texts: Explanation about a code generation in Magento 2?

texts:
I want to know :

The purpose of code generation in Magento 2 ?
How it works, (how Magento generate that code) ?

I know basic code generation


texts: Maintenance on large logging files in Magento

texts:
I was running into an issue with the system.log and some custom log files getting way to large to find anything or even to open them.

Normally we don't run logs on live webshops but in this case it was necessary. This resulted in log files reaching sizes of several hundred Mb.

I'm looking for a solution where, just like Apaches logs the files are split up by day and only retained for X days.


texts: Magento UI Library to use or not to use?

texts:
Is anyone using Magento 2's built in UI Library?

I usually like to keep things inline with the framework, so I try to use the tools provided and follow the best practices set by the framework.  But the new UI Library is ugly and over complicated with very little documentation.  I really don't want to use it.

I'm just wondering if it's just me that doesn't like it and what everyone else is doing with regards theming in Mage 2?


texts: Magento 2: Initialize calendar widget inside payment uiComponent

texts:
I am working on a Payment Gateway and I have to work with the customer's date of birth with a certain payment option.

To get this, I want to load the calendar widget on a text input field (since date of birth is not required for all shops, I have to to it this way).

My component extends an 'abstract' component, which extends 'Magento_Checkout/js/view/payment/default':

Abstract renderer which serves as 'parent' (abstract.js):

define(
    [
        'jquery',
        'Magento_Checkout/js/view/payment/default',
        'Modulename_Gateway/js/action/place-order',
        'Magento_Checkout/js/model/payment/additional-validators'
    ],
    function ($, Component, placeOrderAction, additionalValidators) {
        return Component.extend({
            ...
        });
    }
);

Renderer for the given payment method (directdebitsecured.js):

define(
    [
        'jquery',
        'Modulename_Gateway/js/view/payment/method-renderer/abstract',
        'Modulename_Gateway/js/action/place-order',
        'Magento_Checkout/js/model/url-builder',
        'mage/storage',
        'Magento_Checkout/js/model/payment/additional-validators',
        'Magento_Customer/js/model/customer',
        'Magento_Checkout/js/model/quote',
        'mage/calendar'
    ],
    function ($, Component, placeOrderAction, urlBuilder, storage, additionalValidators, customer, quote) {
        return Component.extend({
            defaults: {},
            initialize: function() {},
        });
    }
);

Of course, defaults and initialize function are not empty.
The js/action/place-order file contains logic for the order placement.

The HTML template file is defined in the defaults object of my directdebitsecured component:

defaults: {
    template: 'Modulename_Gateway/payment/modulename-directdebit-secured-form',
    birthdate: ''
},

Inside that file I want to load the calendar widget, but I have no success.
I've tried several ways:

Binding it to my input text field

via data-mage-init='{"calendar": {}}' (just nothing happens)
data-bind="mageInit: {'calendar': {}}" (throws an error in requireJs)

Calling it directly

jQuery('#idOfMyInputField').calendar({}); (just nothing happens)

Calling it with requireJs inside of the HTML template

require(["jquery","mage/calendar"], function($){
    $("#birthdate").calendar({
        showTime: false,
        //dateFormat: "yy-mm-dd"
    });
});

Calling it inside of my compoent, which defines $ for jQuery

$('#idOfMyInputField').calendar({}); (just nothing happens)

Anyone has a idea, why none of these ways is working?

Btw, calling

jQuery('#birthdate').calendar({});

in the console when the page is loaded works without problems.


texts: Magento External Database Connection - Error

texts:
Hi so I am trying to add in a connection to another database in Magento so I can query it, I have done the following:

Made a module and this is my config.xml:

<?xml version="1.0"?>
<config>
    <global>
        <resources>
            <externaldb_write>
                <connection>
                    <use>externaldb_database</use>
                </connection>
            </externaldb_write>
            <externaldb_read>
                <connection>
                    <use>externaldb_database</use>
                </connection>
            </externaldb_read>
            <externaldb_setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </externaldb_setup>
            <externaldb_database>
                <connection>
                    <host><![CDATA[IPADDRESS]]></host>
                    <username><![CDATA[USERNAME]]></username>
                    <password><![CDATA[PASSWORD]]></password>
                    <dbname><![CDATA[DATABASE]]></dbname>
                    <model>mysql4</model>
                    <type>pdo_mysql</type>
                    <active>1</active>
                </connection>
            </externaldb_database>
        </resources>
    </global>
</config>

And this is my code frontend:

<?php
  $resource = Mage::getSingleton('core/resource');
  $conn         = $resource->getConnection('externaldb_read');
  $results  = $conn->query('SELECT * FROM tablename');
  print_r($results);
?>

And I get the following error:
a:5:{i:0;s:125:"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'admin_magento_t.tablename' doesn't exist, query was: SELECT * FROM tablename";i:1;s:3026:"#0 /SERVERPATH/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)

I am confused why it says table "admin_magento_t.tablename" doesnt exist when I am only looking for "tablename"? I have tried this connection manually in PHP and it connects to the database fine

Can someone advise me on this?

Thanks!


texts:
When a bundle product is shown, i need to load a specific attribute of the asigned bundle items (which are simple products of course).

The attributes must be loaded in the view.phtml file located in /app/design/frontend/default/default/template/catalog/product/

My magento version is 1.9.2 CE, thanks for your help.

Edit:

Ok let me be more specific. I have a bundle product which consists of serveral simple products. Some of these simple products have an attribute called "length".

I need to calculate the length of the bundle product by adding all the lengths of the assigned simple products.
Can anyone tell me please how this can be done?


texts: Magento Add product to cart programmatically - Works in one website, fails in other

texts:
I have a magento store with two websites for Italian and Spanish market. I perform a php page to add items to cart programatically, but it works in Spain but not in Italy.

See sample code that works on ES but not in IT.

umask(0);
Mage::app();
$session = Mage::getSingleton('core/session', array('name' =>> 'frontend'));
$cart = Mage::getSingleton('checkout/cart');
$cart->init();
$cart->addProduct(140616, 3);
$session->setCartWasUpdated(true);
$cart->save();

In var_dump afther $cart->init(); I see that the cart in IT dont load customer data.

Var_Dump in ES

object(Mage_Checkout_Model_Cart)[80]
  protected '_summaryQty' => null
  protected '_productIds' => null
  protected '_data' =>
    array (size=1)
      'quote' =>
        object(Mage_Sales_Model_Quote)[82]
          protected '_eventPrefix' => string 'sales_quote' (length=11)
          protected '_eventObject' => string 'quote' (length=5)
          protected '_customer' =>
            object(Mage_Customer_Model_Customer)[136]
              protected '_eventPrefix' => string 'customer' (length=8)
              protected '_eventObject' => string 'customer' (length=8)
              protected '_errors' =>
                array (size=0)
                  empty
              protected '_attributes' => null
              protected '_addresses' => null
              protected '_addressesCollection' => null

Var_Dump in IT

object(Mage_Checkout_Model_Cart)[81]
  protected '_summaryQty' => null
  protected '_productIds' => null
  protected '_data' =>
    array (size=1)
      'quote' =>
        object(Mage_Sales_Model_Quote)[83]
          protected '_eventPrefix' => string 'sales_quote' (length=11)
          protected '_eventObject' => string 'quote' (length=5)
          protected '_customer' => null
          protected '_addresses' => null
          protected '_items' =>
            object(Mage_Sales_Model_Resource_Quote_Item_Collection)[136]
              protected '_quote' =>
                &object(Mage_Sales_Model_Quote)[83]
              protected '_productIds' =>
                array (size=11)
                  0 => int 139190
                  1 => int 139167
                  2 => int 73844

Any sugestion?

Thanks


texts:
I have asked many times and whilst some answers are well meaning haven't got this working yet. I hate to  post a "bump" message (in fact this is my first, ever) and but this seems such a basic question. Either it won't work, I am doing something wrong, I haven't asked in the right place (or the right way) or I need new aftershave.

Here are the unanswered questions:

https://community.magento.com/t5/Installing-Magento-2/Cannot-install-Magento-2-on-Windows-7-localhost-using-XAMPP/m-p/48777#U48777

Why does the web based install of Magento 2 on Windows 7 localhost using XAMPP always fail?

Magento 2 CSS and JavaScript not loading from correct folder


texts: Magento 1 'sign up for newsletter' on checkout onepage

texts:
I've searched and searched how to add the 'sign up for newsletter' checkbox (same as on  the customer/account/create/ page), to the /checkout/onepage page,  but can't find any definitive answer.

I'd like it at the 'billing information' stage if possible.


texts: magento 1.9.2 displays base currency as display currency

texts:
I am setting up Magento e-Commerce 1.9.2 for my client. he is located in UAE and wants to use Paypal for transactions. As AED is not supported by Paypal so I am using US Dollars as Base currency and AED as default Display Currency.

Now the issue is magento displays base currency on the front-end instead of Default Display Currency.

so Please if you can help me with that.


texts: Unable to see Categories and Products I added on the frontend

texts:
Magento Version : 2.2.3

Steps :

Login as  Admin
Go to catalog and Add catagories
Then go to Products add products

PFA screenshots :


texts: I want Complete guide of product listing on home page programmatically. I have created a custom module and as well as a custom theme anyone could help me in this?


texts: How to set tax rate for not logged in customer in magento 1.9?

texts: Is it possible to set tax rate for not logged in customer . In my store tax rate working fine for logged in user.


texts: Overriding magento core scripts.js file: Magento 2

texts:
In our custom module, we have pages similar to the order page. We need some changes in the scripts.js file only in those custom module pages.
Following is the core file we are using is

  module-sales/view/adminhtml/web/order/create/scripts.js .

In order to override we added requirejs-config.js in the following location

  app/code/[Namespace]/[Module]/view/adminhtml/requirejs-config.js

with the following content

var config = {
    map: {
        '*': {
            'Magento_Sales/order/create/scripts': 'Namespace_Module/js/scripts',
        }
    }
};

We copied the scripts.js file in the custom file scripts.js in the following location

  Namespace/Module/view/adminhtml/web/js/scripts.js

The custom module pages are working as we expected. But the modifications are affecting not only in custom module pages but also in the Magento pages also.

Please, can anyone help?


texts: Need product id dynamically in a button which is appended through javascript in magento 1.9

texts:
I am creating an extension of products quick view. For that, i have given an option in admin panel to choose if a user is using custom template or default. if he uses default template: in that condition, i am overwriting list.phtml but if he uses a custom template am adding a class name to which I am adding a button in that class using javascript. But while doing that I need that whenever a button is clicked, it fetches the current click product id: I cannot do that, I tried something which I am sharing with you:

<?php
$customThemeStatus = Mage::getStoreConfig('product_quickview/settings/custom_theme');
if ($customThemeStatus == '1') {  ?>

in above script i am trying to send clicked product id in below ajax request. and this is a page which getting included in the list.phtml

<?php
$quicViewSelectorName = Mage::getStoreConfig('product_quickview/settingsselector_name');
$quickViewButtonText  = Mage::getStoreConfig('product_quickview/settingsbutton_text');
echo "
<?php }


texts:
I can't run any bin/magento commands, always got killed. (setup:di:compile, cache:clean, cache:flush, indexer:reindex)

I already changed memory_limit = -1 the php.ini, and tried to run the bin/magento commands with specified memory size; but all return "Killed" like the above picture.
I also tried to clean var/log/* generated/* var/cache/* folders, but still same.
Anyone know how to fix this issue?
Thanks so much


texts: Shopping Cart Price Promotion on total only

texts:
I have set up Discounts on a couple of Products for a specific Customer.
While the discount is applied correctly, it is shown at the end of the Checkout page. I'd prefer the individual Product Discount to be shown on the product line.

Is this an option?

Kevin


texts: M2 Modal Widget - Variable for Link, Title, and Content

texts:
I want to have links that activate a modal window with dynamic content and title. I would assume there is a way to do this with variables. I can do it now as a separate script for each modal, but is there a way to make it dynamic?

Links:

Modal 1
Modal 2
Modal 3
Modal 4

Modal Content

TITLE 1

CONTENT CONTENT 1

TITLE 2

CONTENT 2

TITLE 3

CONTENT 3

TITLE 4

CONTENT 4

Javascript

require(
    [
        'jquery',
        'Magento_Ui/js/modal/modal'
    ],
    function(
        $,
        modal
    ) {
        var options = {
            type: 'popup',
            responsive: true,
            innerScroll: true,
            title: 'Dynamic Title',
            buttons: [{
                text: $.mage.__('Ok'),
                class: '',
                click: function () {
                    this.closeModal();
                }
            }]
        };

        var popup = modal(options, $('#header-mpdal'));
        $("#click-header").on('click',function(){
            $("#dynamic").modal("openModal");
        });

    }
);


texts: How to remove/hide columns from sales grid by default

texts:
How can I remove or hide some of the columns from sales_order_grid. For example I want to hide next columns:

Purchase point
Ship to Name
Signifyd Guarantee Decision

I tried with overriding sales_order_grid and adding visibility attribute as false, but nothing happened.

I want to hide them in Default View, and not to create new View with those columns disabled.

Thank you


texts: Load testing the cart with a fixed cookie

texts:
I am working on improving the performance of a Magento 1.9 store. I have made a lot of improvements that have reflected well in load tests on the home page and product pages, and on the cart without a cookie.

I have been asked to load test the checkout too. I am familiar with Blitz, ApacheBench, Siege, Jmeter and httperf but I am unsure of how best to use them to mimic normal cart page loads.

So far, I have visited the cart page in my browser, with items in my cart. I then copied the cookie into ApacheBench. The CPU and memory utilization on the server stayed very low but the throughput peaked at about 9 page loads per second, where we are able to do about 15x that on the home page (and it is reflected in the utilization).

There is nothing recent in the Magento error logs.

Specifically, I wonder if Magento or PHP might lock session data during the page load. If it does, which would be sensible in my opinion, then we would have to load test with a pool of different session cookies to avoid these locks, which would obviously not affect real usage the same way.

I am aware that there is already a similar thread. This thread relates specifically to any flaws in my methodology of copying one cookie into the load tester. I am looking for any insight about the use of sessions in Magento, flaws in my methodology and better evaluation techniques for the cart.

The setup is as follows: Magento 1.9, Nginx 1.9, HHVM 3.16 via FCGI (also tested with PHP 5.6), MariaDB 10.1 & Redis.


texts: How to add content to added Block magento 2

texts:
I made a block from admin side  content->block  And I can add data from admin side in it and add it to a page I know. But How can I add data to it using phtml and xml ? any working example would be highly appreciated as I am confuse and didn't get any example .
Suppose I made a block named 'No-Picture'  using admin side


texts:
We have built the website using Magento 2.2.3. Our site stuck randomly. I'm getting the following error on the console when the site is stucks. If I reload the page, the page is working.

    Uncaught Error: Mismatched anonymous define() module: function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a){this.name="RavenConfigError",this.message=a}d.prototype=new Error,d.prototype.constructor=d,b.exports=d},{}],2:[function(a,b,c){var d=a(5),e=function(a,b,c){var e=a[b],f=a;if(b in a){var g="warn"===b?"warning":b;a[b]=function(){var a=[].slice.call(arguments),h=d.safeJoin(a," "),i={level:g,logger:"console",extra:{arguments:a}};
    http://requirejs.org/docs/errors.html#mismatch
        at makeError (ea50f7eecd2edcaffa739d8da1769ce2.min.js:16)
        at intakeDefines (ea50f7eecd2edcaffa739d8da1769ce2.min.js:77)
        at ea50f7eecd2edcaffa739d8da1769ce2.min.js:97


texts: Extension to use ticket for discount at checkout

texts:
I would like to know if there is an extension that can support the following:

Someone can use redeem tickets for 10% discount on the total value of the products in cart.

The customer should enter at checkout the amount that will be cashed with tickets (until 10%) of the total value.

Is there a extension for that?


texts: where is the db backup location when deleting a website

texts:
i'm pending to delete a website via Manage Stores, i checked "
Create DB Backup", but i don't know how it backup, backup what? and where is the backup files will be stored?


texts: Rest API: Consumer is not authorized to access Magento_Sales::sales

texts:
I am creating an Invoice through Magento REST API with the below request:

POST "https://<magento-domain>/mg2/rest/V1/order/9/invoice"

Request Headers:

{
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer jnsptpdgsvmk5mrbctisi3e0yml7k6iu"
}

Request Body:

{
    "capture": true,
    "order_id": 9,
    "items": [{
        "order_item_id": 33,
        "qty": 3,
        "extension_attributes": {}
    }],
    "notify": true,
    "appendComment": true,
    "comment": {
        "extension_attributes": {},
        "comment": "Invoice#: 22",
        "is_visible_on_front": 0
    },
    "arguments": {
        "extension_attributes": {}
    }
}

But I consistently get this error:

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

I am certain that the token I use works, because I am able to search orders and customers using the same token.  The token is automatically renewed when I get a 401 error code in the response.

Also, the user I set up in Magento is an Administrator, which (I believe) has a full access on all objects (Sales Orders, Invoice, Shipments, etc.).

I have already configured the Integrations as well.  So I am not sure what else I am missing?

Thanks in advance.


texts: Magento 2 | Remove add to cart from catalog/category/view/

texts:
when you browse through a category

  www.url.com/catalog/category/view/

you can see several products.

I want to remove the add to cart button from these.
You should only be able to put them into the cart when you are on the detailed page of the product.

Edit: here you can see a picture

[![enter image description here][1]][1]

I am not able to find the right template.
Do you know how I can do this?

Thanks!

Edit: Anyone knows how to remove the hover effect when you hover over a product?


texts: Error: "Name Prefix" is a required value in Magento 2.2

texts:
I have made required 'Show Prefix' from admin config setting. Now prefix is shown on the customer account edit page.

But, when i am trying to save customer prefix, then i am getting Error: "Name Prefix" is a required value."

I have also used 'Prefix Dropdown Options' but again, I am getting same error.

 I am getting this error in Magento Ver 2.2.1, Ver 2.2.2 and Ver 2.2.3. Is anybody else getting this type error?


texts: login to magento 2 admin using API token

texts:
I have a react dashboard that gets data from Magento 2 via Rest API using token based authentication.
I want a button somewhere in my reach dashboard to auto-login to Magento 2 admin backend.

How to achieve this?


texts: change category and subcategory url separator hyphen

texts:
i want change category and subcategory URL separator like(Example site:http://www.flyingmachine.co.in/)

example:
Mobile/brand/samsung

want change to
Mobile-brand-samsung


texts: Overriding Magento 2 file causes fatal error

texts:
I've created an override by copying the original file here and then making my changes:

  app/code/Vendor/Module/view/adminhtml/templates/order/create/items/grid.phtml

I have created a layout XML to remove blocks (named "items_grid") associated with the original layout folder, and then use my override file instead. (Assuming I've done correctly)

  app/code/Vendor/Module/view/adminhtml/layout/sales_order_create_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="items_grid" remove="true"/>
        <referenceBlock name="content">
            <block class="Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid" template="Vendor_Module::order/create/items/grid.phtml" name="items_grid_new">
            </block>
        </referenceBlock>
    </body>
</page>

However, when I load the page, I received the below error:

  Fatal error: Uncaught Error: Call to a member function getItems() on boolean in vendor/magento/module-sales/Block/Adminhtml/Order/Create/Items/Grid.php on line 132

Note: When I checked my code by updating directly in the core file, it worked fine. It just seems to be this override module setup that's causing the issue.


texts:
I have created a custom module to optimize catalogsearch result, so that now my search box work with custom attribute brand, it search all products for that brand.

But when I search with wrong spelling of brand then it does not return result. So how to get correct brand from wrong spelling to return same catalogsearch result.

For Eg. : I have a brand dabur and when I search for this keyword then my custom code working as I want but when I search for dabar dubar etc. then my code is not working.

So how to get correct brand from search keyword in my custom module?


texts: How can I add Magento 2 Shipping Methods details field?

texts: How can I add a extra field on my custom Shipping Methods to show fronted Shipping Details ?


texts: Magento add image to media gallery causing duplicate images with _1 appended

texts:
So I have a folder of images and a php array that has sku's for keys and an array of images i need to add to that sku's gallery as its value ...for example:

['A2052'] => ['tmp/A2052-1.jpg', 'tmp/A2052-2.jpg']

I run through this array and try to add the images to the products with this code:

    foreach ($skuImageMap as $sku => $images) {
        $ourProduct = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);
        if ($ourProduct) {
            foreach ($images as $index => $imagePath) {
                if (file_exists($imagePath)) {
                    try {
                        $ourProduct->addImageToMediaGallery($imagePath, null, false, false);
                        $ourProduct->save();
                        echo "The image $imagePath was added to $sku successfully : $imageCount \n";
                        $imageCount++;
                    } catch (Exception $e) {
                        echo "There was an issue saving image $imagePath to $sku :" . $e->getMessage() . "\n";
                    }
                } else {
                    echo "The image $imagePath does not exist.\n";
                }
            }
        } else {
            echo "The product $sku does not exist \n";
        }
    }

The issue is that when I run this script I get two images saved to the gallery for each image. One correct one and another with _1 appended (which obviously doesnt exist so its broken). I can't seem to stop this duplication. Why is it adding two images on every save?


texts: How can I set default value in text box in magento admin custom form

texts:
I have create a field English video and save to data in database but I can't set value in edit time

I have used this code for set value.

$fieldset->addField('title', 'text', array(
            'label'     => Mage::helper('ultimate_option')->__('English Video'),
            'id'  => 'option_english',
            'name'      => 'option_english',
            'after_element_html' => '

                                <button id="English" class="add" type="button" title="Add">Add</button>

',
            'value'  => 'hello !!'
        ));

but getting this blank result

How can I set value for English text box at edit time.


texts: Magento 2 : How to create an EAV entity module?

texts:
I want to create EAV entity module. I refer these below links. I want to do the same in Magento 2.

How to create an EAV entity?

How to do it in Magento 2?

Please help me.

Thanks.

UPDATE:

I can able to save the record in the main table. But, I can't able to store in the eav table.

Eg. : I can able to save in vendorname_modulename_modulename table. But, I can't able to save record in vendorname_modulename_modulename_varchar & vendorname_modulename_modulename_text table.


texts: what is the event for this product price print in home page in magento 2

texts:
when i open that Lenovo storage 1.2 T
product

I customized the product price by this event
1)catalog_product_get_final_price
2)catalog_product_collection_load_after
3)checkout_cart_product_add_after

but home page products showing the wrong
price
how I can fix with my customized event product price for those blocks??
my Magento ver 2.2.6


texts: M1 to M2 upgrade changed product URLs; Google links get 404

texts:
I've upgraded from Magento 1 to Magento 2. Everything is working fine otherwise, but the product links found in Google for the site result in a 404 page due to the URL structure having changed. I sent a new sitemap to Google about a week or two ago but it has not helped the situation. Google Search Console reports nearly 15,000 unfound pages.

For example, searching Google with product number "9480662" results in this link:

http://purku.net/index.php/volvo-s40-ii-6/voimansiirto/vauhtipyora-volvo-kaksoismassa-vauhtipyora-9480662-b5244s-b5244s2-b5252fs-v70-s40-v50-99-10.html

Whereas the correct URL for the product is this:

http://purku.net/index.php/catalog/product/view/id/3105/s/vauhtipyora-volvo-kaksoismassa-vauhtipyora-9480662-b5244s-b5244s2-b5252fs-v70-s40-v50-99-10/

This may be due to the M1 installation having an SEO extension that changed how URLs were set up in the store, which is not present in the new installation.

How can I correct this?


texts: Categories not appearing in Top-horizantal menu

texts:
I've created a couple of categories for my products but none of the category is appearing on the homepage. It should appear as a Top-horizantal bar but I couldn't see any trace of it. Any idea about what I'm doing wrong? Do I need to incorporate any code to make it appear? I'm sorry I don't have sound knowledge of PHP. Please help.

Website: http://www.dirtrades.com


texts: Magento2.3: How to show the template file in a particular category page?

texts:
I have a custom module and on that I have a template file. I want to show that template in a particular category instead of it displaying in all the category pages.

How can I achieve that?

Anyone please suggest me to achieve this result?


texts: EcomDev_PHPUnit fixtures: set config XML attributes

texts:
Sometimes I need to set up config XML attributes for automated testing.

For example:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <global>
        <somenode foo="bar" />
    </global>
</config>

I would like to define this as a fixture as the XML configuration is only needed for executing some tests. Is this possible with EcomDev_PHPUnit?

For now I'm working around the issue by executing this in my setUp method:

Mage::app()->getConfig()->getNode('global/somenode')->addAttribute('foo', 'bar');


texts: Magento 2: Get WYSIWYG editor's data in frontend?

texts:
I add wysiwyng editor in admin Ui form.

<field name="content">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="sortOrder" xsi:type="number">30</item>
            <item name="label" translate="true" xsi:type="string">Content</item>
            <item name="formElement" xsi:type="string">wysiwyg</item>
            <item name="template" xsi:type="string">ui/form/field</item>
            <item name="source" xsi:type="string">popup</item>
            <item name="wysiwyg" xsi:type="boolean">true</item>
            <item name="dataScope" xsi:type="string">content</item>
            <item name="validation" xsi:type="array">
                <item name="required-entry" xsi:type="boolean">true</item>
            </item>
        </item>
    </argument>
</field>

It saves data in the following format in database, that' ok for me:

But when I get data in frontend, it shows this text instead of an image.
I want to convert all {{ }} format to HTML like default CMS page, static block functionality.


texts:
How to get Checkout Information in custom mail

   /* Get Information For Un support Email to Admin */
        $customer = Mage::getSingleton('customer/session')->getCustomer();
        //$name = $customer->getName();
        $email = $customer->getEmail();

        $cart = Mage::getSingleton('checkout/cart')->getQuote();
        $productName = array();
        /*$skus = array();*/
            foreach ($cart->getAllItems() as $item) {
                $productName[] = $item->getProduct()->getName();
                /*$skus[] = $item->getProduct()->getSku();*/
            }
        $productNames = implode(', ', $productName);
        /*$productSkus = implode(', ', $skus);*/
        $quote = Mage::getModel('checkout/session')->getQuote();
        $grandTotal = 0;
        foreach ($quote->getAllItems() as $item) {
            $total += $item->getPriceInclTax() * $item->getQty();
        }

        $checkout = Mage::getSingleton('checkout/session')->getQuote();
         $billAddress = $checkout->getBillingAddress();

         Mage::log($billAddress->getData());
          //you can get contact number in that
         $tele = $billAddress->getTelephone();
         $add = $billAddress->getCity();
         $street = $billAddress->getStreet1();
         $state = $billAddress->getRegion();
        $name = $billAddress->getName();

 $template_id = 'my_custom_email';
    // Who were sending to...
       $email_to = 'mymail@gmail.com';
    //$email_to = Mage::getStoreConfig('trans_email/ident_general/email');
    //$email_to = Mage::getStoreConfig('trans_email/ident_support/email');
    $customer_name   = $name;
    // Load our template by template_id
    $email_template  = Mage::getModel('core/email_template')->loadDefault($template_id);

    $custom_variable = $name;
    $custom_variable1 = $email;
    $custom_variable2 = $postCode;
    $custom_variable3 = $productNames;
    $custom_variable4 = $tele;
    $custom_variable5 = $total;
    $custom_variable6 = $add;
    $custom_variable7 = $street;
    $custom_variable8 = $state;

    $email_template_variables = array(
        'custom_variable' => $custom_variable,
        'custom_variable1' => $custom_variable1,
        'custom_variable2' => $custom_variable2,
        'custom_variable3' => $custom_variable3,
        'custom_variable4' => $custom_variable4,
        'custom_variable5' => $custom_variable5,
        'custom_variable6' => $custom_variable6,
        'custom_variable7' => $custom_variable7,
        'custom_variable8' => $custom_variable8,

    );
    $sender_name = Mage::getStoreConfig(Mage_Core_Model_Store::XML_PATH_STORE_STORE_NAME);
    $sender_email = Mage::getStoreConfig('trans_email/ident_general/email');
    $email_template->setSenderName($sender_name);
    $email_template->setSenderEmail($sender_email);
    $email_template->send($email_to, $customer_name, $email_template_variables);


texts: How to remove my application link from my account section?

texts:
I want to remove the "My Applications" link from my account section

How to remove that?


texts: How to check what suppee patches have been installed on Magento

texts:
I'm about to start working on a Magento website and with the two security patches released yesterday (SUPEE-7405 & SUPEE-7616) I would like to ensure that all other security patches were installed before attempting them.

I can see from magereport.com that SUPEE 6788 (secrets leak) is not installed but 5344 (Shoplift), 5994 (admin disclosure), 6285 (XSS, RSS), 6482 (XSS) are all installed.

Magereport.com does not confirm if SUPEE-6285 or any of the patches prior to SUPEE-5344.

Is there any way to check on Magento exactly what patches have been installed? in the code or db perhaps?


texts: Magento 2: Obtaining an order object by an increment id in a loop using repositories and SearchCriteriaBuilder

texts:
This is my first stack exchange question, so I apologise in advance if I've not asked it in the correct way. I've just begun the process of getting to grips with Magento 2 in preparation for a migrating a few sites from Magento 1.

I've been reading quite a few posts on the best way to load an order from an increment id and it appears that that the recommended way is using repositories and SearchCriteriaBuilder objects as per this post Magento 2.1.1 How to load Order with Increment ID using OrderRepository object. The post suggests passing the SearchCriteriaBuilder object into the constructor.

private $orderRepository;
private $searchCriteriaBuilder;

public function __construct(
        \Magento\Framework\App\Helper\Context $context,
        \Magento\Sales\Model\OrderRepository $orderRepository,
        \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder
){
    $this->orderRepository = $orderRepository;
    $this->searchCriteriaBuilder = $searchCriteriaBuilder;
    parent::__construct($context);
}

and then obtaining the order using something like

$searchCriteria = $this->searchCriteriaBuilder
    ->addFilter('increment_id', '000000001', 'eq')->create();
$orderList = $this->orderRepository->getList($searchCriteria)->getItems();

$order = $orderList[0];

My question, however, is whether this would work in a loop

foreach ($incrementIds as $incrementId) {
    $searchCriteria = $this->searchCriteriaBuilder
        ->addFilter('increment_id', $incrementId, 'eq')->create();
    $orderList = $this->orderRepository->getList($searchCriteria)->getItems();
    $order = $orderList[0];

    ...Do some work on order...
}

It doesn't look like there is an obvious method to reset the searchCriteriaBuilder object on each iteration, so on the second iteration I believe the second filter would get applied as well as the first and no rows would be returned.

Is the way round this to instantiate a new SearchCriteriaBuilder instance using a SearchCriteriaBuilderFactory on each iteration of the loop?

Would I be better just instantiating \Magento\Sales\Model\Order objects  and loading those instead using the built in loadByIncrementId method?

Regards Mark


texts: "The response is in wrong format" error in (magento core) DHL shipping module

texts:
I've scoured the Internet and asked on numerous forums for 2 months looking for an answer to this problem and only gotten 1 response that had nothing to do with the problem.

The DHL shipping module refuses to work in all latest releases of Magento.

Even on a fresh install of 1.7, 1.8, and 1.9 and only enabling it without configuring any other setting it refuses to work and keeps spitting this error in return for all versions:

2014-07-24T13:12:40+00:00 DEBUG (7): Array
(
    [0] => String could not be parsed as XML
    [1] => The response is in wrong format.
    [__pid] => 25540
)

Simply enabling it and nothing else DHL never comes up as a shipping option and only reports that it's not available.

There is nothing on the Internet specifically about this issue which is blowing my mind because it's bugged in all of the CE releases. It can't be that no one is using the DHL shipping module.


texts: New customer email confimation goes to my email instead of the customers email address

texts:
I just want to swap out the customers email to example@mail.com so I receieve the confirmation code so I can confirm accounts before they are able to order.

I am looking around in the CreatePost.php but can't see anywhere I can easily swap them out.

Thank you.


texts: get all country names with their state and region code

texts:
Here is my Magento code:

private function getAllCountry() {

    require_once("../app/Mage.php");
    umask(0);
    Mage::app("default");

    $countryName = Mage::getModel('directory/country')->load('FR')->getName(); //get country name

    echo 'Country Name ->'.$countryName.'
';

    $states = Mage::getModel('directory/country')->load('FR')->getRegions();//state names

    foreach ($states as $state)
    {
        echo 'ID->'.$state->getId().'
';
        echo 'Name->'.$state->getName().'
';

    }
}

I want to get the list of all country names with their states and region id in an array.


texts:
i create a custom checkout block for checkout success page, but unfortunately the data printed twice first in the right div inside body, but the other printed after the footer, here's the checkout_onepage_success.xml:

<?xml version="1.0"?>
<body>
    <referenceContainer name="order.success.additional.info">
        <block class="Namespace\Module\Block\Success"
               name="namespace.order.success"
               template="Namespace_Module::order/success.phtml"
               after="-">
        </block>
    </referenceContainer>
</body>


texts:
I'm already logged in the frontend of my website.

Then I go to Admin -> Customers -> Edit My Customer & Click on Force Sign-In

It gives below error

  This customer has no tokens.

The user should be logged out from the frontend. Correct?

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

Required to use https://marketplace.magento.com/bitexpert-magento2-force-customer-login.html ?

Does it relates to oAuth?


texts: Magento 1.94 image upload - exif missing

texts: After upgrade to 1.94 I realized that image upload is removing all Exif data from uploaded images. I tried to search for any '->stripImage()' string in the project but no success.


texts: How to manage Magento store with 60 Million Products

texts:
I have completed the product import process of 60 Million products in Magento 2. But products are not visible on the front-end, while debugging this I found that re-indexing of products is still in progress.
I have tried to optimize the re-indexing so that all the products could be visible on the front-end.
While working on this re-indexing part I have analyzed the following things and now I am confused should I go ahead with Magento or not.

Default re-indexing with 16 core cpu and 32gb ram is too much slow, calculated assumption for re-indexing all category is more than 2 years.
If anyhow I do manage the first time re-indexing by increasing the server size again there will be pain on every product insert or update because Magento do the re-indexing from starting everytime.

I am not sure how the other e-commerces use the magento for millions for products.
Thanks,


texts:
When I try to run a bin/magento command, I get this error:
Composer file not found#0 /var/www/html/vendor/magento/framework/Composer/ComposerFactory.php(47): Magento\Framework\Composer\ComposerJsonFinder->findComposerJson()
#1 /var/www/html/vendor/magento/framework/Composer/ComposerInformation.php(368): Magento\Framework\Composer\ComposerFactory->create()
#2 /var/www/html/vendor/magento/framework/Composer/ComposerInformation.php(381): Magento\Framework\Composer\ComposerInformation->getComposer()
#3 /var/www/html/vendor/magento/framework/Composer/ComposerInformation.php(244): Magento\Framework\Composer\ComposerInformation->getLocker()
#4 /var/www/html/vendor/magento/framework/App/ProductMetadata.php(122): Magento\Framework\Composer\ComposerInformation->getSystemPackages()
#5 /var/www/html/vendor/magento/framework/App/ProductMetadata.php(82): Magento\Framework\App\ProductMetadata->getSystemPackageVersion()
#6 /var/www/html/vendor/magento/framework/Console/Cli.php(98): Magento\Framework\App\ProductMetadata->getVersion()
#7 /var/www/html/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI')
#8 {main}

Here is what I tried so far:

bin/magento clear:cache & bin/magento cache:flush - gives the same error above.
composer install - gives the same error above.
composer update - gives Composer could not find a composer.json file in /Users/Ismail/Development/magento2project

How can I fix this issue? Thanks in advance!


texts: Get Order Items from product sku and customer email

texts:
Currently i can retrieve my order collection from customer email like this, but it will retrieve all the order and when i print the data there's no information about product items for each order:

if(Mage::getSingleton('customer/session')->isLoggedIn()) {
      $customer = Mage::getSingleton('customer/session')->getCustomer();
      $email = $customer->getEmail();

      $orderCollection = Mage::getModel('sales/order')->getCollection();
      $orderCollection->addFieldToFilter('customer_email', $email);
      echo "<pre>";
      print_r($orderCollection->getData());
}

basically i want to retrieve an order id based on product sku and customer email so i can get the order items, is there a way to do this?


texts:
I need to add a button in my custom module admin form , which calls an action 'upload'

How can I achieve it ?


texts: Magento 2: RuntimeException it is being used by another process

texts:
When I do clear cache using command line & refresh page on Frontend 1st time it gives below exception.

  1 exception(s): Exception #0 (RuntimeException): The path
  "D:/wamp/www/magento2/var/generation/Magento/Checkout/Model/Session/Interceptor.php.6260"
  cannot be renamed into
  "D:/wamp/www/magento2/var/generation/Magento/Checkout/Model/Session/Interceptor.php"
  Warning!rename(D:/wamp/www/magento2/var/generation/Magento/Checkout/Model/Session/Interceptor.php.6260,D:/wamp/www/magento2/var/generation/Magento/Checkout/Model/Session/Interceptor.php):
  The process cannot access the file because it is being used by another
  process. (code: 32)

When i refresh same page again/2nd time it loads page proper. What will be cause for above exception?


texts: Sorting Latest Magento Reviews By Date (For Homepage)

texts:
I'm trying to display the latest 10 review on the homepage. For some reason, they are not sorting by date.

$review = Mage::getModel('review/review');
$collection = $review->getProductCollection();
$collection->addAttributeToSort('created_at', 'DESC');
$collection->addAttributeToSelect('*')->getSelect()->limit(10);
$review->appendSummary($collection);

If I print the SQL generated by $collection->getSelect(), I get the following:

SELECT `e`.`entity_id`, `e`.`type_id`, `e`.`attribute_set_id`,`e`.`name`,
    `e`.`sku`, `rt`.`review_id`, `rt`.`created_at` AS `review_created_at`,
    `rt`.`entity_pk_value`, `rt`.`status_id`,`rdt`.`title`, `rdt`.`nickname`,
    `rdt`.`detail`, `rdt`.`customer_id`,`rdt`.`store_id`
FROM `catalog_product_flat_1` AS `e`
    INNER JOIN `review` AS `rt`
        ON rt.entity_pk_value = e.entity_id
    INNER JOIN `review_detail` AS `rdt`
        ON rdt.review_id = rt.review_id
WHERE (e.status = 1)
ORDER BY `e`.`created_at` DESC

Ended up changing the select to:

$reviews = Mage::getModel('review/review')->getResourceCollection();
$reviews->addStoreFilter( Mage::app()->getStore()->getId() )
      ->addStatusFilter( Mage_Review_Model_Review::STATUS_APPROVED )
      ->setDateOrder()
      ->addRateVotes()
      ->load();

And the order is now fine....but somehow I lost the review summary. Star ratings I mean.


texts: Magento 2 - Add new field to Megaplaza_Blog Post

texts:
I have a problem adding a new field to Megaplaza_Blog Post.

I've modified UpgradeSchema to modify DB and add a new column.
Column was created successfully.

I've added some code to

  /app/code/Mageplaza/Blog/Block/Adminhtml/Post/Edit/Tab/Post.php

    $fieldset->addField(
        'name2',
        'text',
        [
            'name2'  => 'name2',
            'label' => __('Short Title (athletes)'),
            'title' => __('Short Title (athletes)'),
            'note' => __('Short Title (athletes)'),
        ]
    );

In admin>Megaplaza>Post>Edit I can see the value of this column from database in Input field.
When I try to save, $fieldset is being rested and every thing from modified code is gone, and i'm getting (from

  app/code/Mageplaza/Blog/Controller/Adminhtml/Post/Save.php

`

$data = $this->getRequest()->getPost('post');
print_r($data);die();

  Array ( [short_description] =>short dec2[post_content]
  =>123[store_ids] => Array ( [0] => 1 ) [image] => Array ( [value] => /1/4/14851838971112.png ) [enabled] => 1 [in_rss] => 1 [allow_comment]
  => 1 [url_key] => qrq2341-123 [meta_title] => [meta_description] => [meta_keywords] => [meta_robots] => INDEX,FOLLOW [categories_ids] =>
  Array ( [0] => 6 [1] => 8 ) )

Correct output should be like this

Array ( [post_id] => 11 [author_id] => 1 [name] => abcdef123 [name2] => 123123 [short_description] =>short dec2[post_content] =>123 [store_ids] => Array ( [0] => 1 ) [image] => Array ( [value] => /1/4/14851838971112.png ) [enabled] => 1 [in_rss] => 1 [allow_comment] => 1 [url_key] => qrq2341-123 [meta_title] => [meta_description] => [meta_keywords] => [meta_robots] => INDEX,FOLLOW [categories_ids] => Array ( [0] => 6 [1] => 8 ) )


texts: How to override schema.graphqls file of any module? Is there any way to override schema.graphqls file of any module.


texts: How to change the /contact router to something else?

texts:
By default Magento2 offers a contact form. This can be reached under http://domain.tld/mage2orwhatever/contact.

But we want to have the router to be translated, in our case it'd be kontakt.

How can I change the router from contact to kontakt or something different?


texts: How to get processed email template using template id in Magento 2?

texts:
I wanted to load a particular processed email template by using its id. how to process this in magento 2.
in magento 1.x the code is like

 $sTemplate = Mage::getModel('core/email_template')
->load($templateId)
->getProcessedTemplate(array(
    'firstname' => 'John',
    'lastname' => 'Doe'
));

Please help me.

Thanks.!


texts: Magento 2 checkout 'shipping-information' response

texts: In checkout page when we click Next button from shipping step, we can see a response named shipping-information that contains payment methods and totals information. Where is this response come and can i access/modify the response?


texts:
How to change /blog url to some other url in Magento 1.9.2
     I want to redirect request at  http://www.xxxx.com/modular to  http://www.xxxx.com/blog/modular


texts: Magento 2 show /Hide my custom payment method - (based on zip code) at checkout not working

texts:
I am creating a custom payment method module.

It is not working in all cases.

Zip code validation works properly for guest customers and newly registering customers.

For already registered customers sometimes zip code validates and show the payment method at checkout page but sometimes not.

I have cleared the cache an tried,still no way.
Following is the code i used.
Please help.

/Model/zipay.php

public function isActive($storeId = null)
    {

        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $cart = $objectManager->get('\Magento\Checkout\Model\Cart');
        $this->cart = $cart;
        $cartCount = $this->cart->getItemsCount();

        $zip  = "";
        $ziparray = [];

        # Retrieving ship address

        $shippingAddress = $cart->getQuote()->getShippingAddress();
        $address         = $shippingAddress->getData();
        $zip             = (string)$address['postcode'];

        # Retrieving backend configured allowed zip details

        $configzip = $this->_scopeConfig->getValue('payment/zipay/zip', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
        $config_method_status = $this->_scopeConfig->getValue('payment/zipay/active', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);

        $ziparray = explode(",",$configzip);

        if ($config_method_status == 1){
            if (in_array($zip, $ziparray,TRUE)) {
                $logger->info("zip enabled matched");
                return true;
            }else{
                $logger->info("zip enabled not matched");
                return false;
            }
        }else{
            $logger->info(" zip not enabled");
            return false;
        }
    }


texts: How can I convert simple product to bundle product programmatically

texts:
I have a system which has a set of products of three "types":

Simple products without associated products;
Group products;
Simple products, which are associated to group products.

I need to:

convert type 1 into bundle product and create associated simple product.
convert type 2 into bundle product and keep it's associated simple products.

I know already about this extension http://www.magentocommerce.com/magento-connect/displaze-change-product-type.html but seems be capable of only converting simple -> bundle, while I also need grouped -> bundle conversion.

UPDATE 2:
Since it is not possible to change product types with avs-fastsimpleimport, I removed anything about it from the question.

UPDATE 1:
Based on this questions and answers I made up my solution: 1, 2, 3, 4.
Here is the MySQL update code, which actually does the trick for me:

/*
 * preparing list of simple products,
 * which are not associated with any other
 * complex products (group, bundle, configurable and so on)
 */
SET @simpleSkuList = (
    SELECT
        GROUP_CONCAT(sku)
    FROM
        catalog_product_entity
    WHERE
        type_id = 'simple'
        AND LENGTH(sku) = 8
        AND(
            entity_id NOT IN(
                SELECT DISTINCT
                    (product_id)
                FROM
                    catalog_product_super_link /* associated product ids of configurable */
                UNION
                    SELECT DISTINCT
                        (linked_product_id)
                    FROM
                        catalog_product_link /* associated product ids of grouped */
                UNION
                    SELECT DISTINCT
                        (child_id)
                    FROM
                        catalog_product_relation /* associated product ids of bundled and grouped */
            )
        )
    GROUP BY type_id
);

/* changing simple products type to be 'bundle' products */
UPDATE
    catalog_product_entity
SET
    type_id = 'bundle'
WHERE find_in_set(sku, @simpleSkuList);

And the question now sound like, does anybody think that this MySQL query can be improved somehow?


texts:
I am having problem with the navigation filter.

My developer has left us long back and when we bought this theme on our filter we had an option of view all for those title which had long search terms like for brand it shows all brands but because of this view all feature we can see 5,6 brands then by clicking it we can see more.

My problem here is the developer had removed that view all option from the filter long back and we need it back as we have a lot of brands that came in.

I tried doing it from the filter.phtml file but it didn't work as its not changed from there.

Can I have some help ?
For reference, here's the link : https://stage.kiabza.com/mens-preowned-fashion.html


texts:
I have an advanced search form on all pages. If you search nothing, it takes you to a results page with 'Please specify at least one search term.'.

The problem is, this results page contains an advanced form, so I end up with two forms.

How do I removed this extra form?

Note: If you do use a search term, you get your results and the extra form is not there.


texts: After Magento upgrade from 2.2.8 to 2.3.3

texts:
i have upgrade my magento version from 2.2.8 to 2.3.3 after upgrade when i run setup upgrade command i am getting this error in ebizmart mail chimp extension

  Uncaught Error: Call to undefined method
  Ebizmarts\MailChimp\Helper\Data::encrypt()

Any help will be appreciated.


texts: Magento override login template only for my brazilian shop

texts:
Can I override the login template only for my brazilian shop?
The template that I want to override is located here:

  app/design/frontend/rwd/default/template/persistent/customer/form/login.phtml


texts:
Is there a readily available way to get Media url path from component ?
I know there is a getMediaUrl fetching from graphql in venia-concept/webpack.config.js
Tried in my component: global.MAGENTO_MEDIA_BACKEND_URL but that's undefined.


texts: Global login but still have customer seperated

texts:
I have 1 magento instance with 2 different websites set up within it. The websites are /retail and /trade

Within the header I have a link to a login page. The issue I have is that if a trade user was to try and login on the /retail site then magento would say the login is invalid because the customer accounts are not shared.

Therefore my question is this, is it possible to have a global login page and then you customer to be redirected to the correct website based on their account?


texts: Magento 2 - Overriding cart slider template

texts:
I'm a front end developer and recently started working with Magento 2. Currently I'm Working with Magento 2.2.6. and trying to override Cart Slider template which is I found in my theme Magento_Checkout > template > minicart > content.html
I have made some structural changes, and then run the compile command, but I'm unable to see my changes. The file in pub>static>... folder doesn't reflect my changes. Not sure what I am doing wrong in compiling the code


texts: How to Determine Product Price the Customer is Actually Paying After Applied Discounts

texts:
Including every special price, tier price, costumer group price, catalog discount, cart discount and what ever else might have changed the price. Just what the customer is actually paying and printed on the bill. Right now I got

$product->getFinalPrice()

But that does not include the coupons. This supposed to include coupons but is empty for me:

Mage::getModel('catalogrule/rule')->calcProductPriceRule($product,$product->getPrice());

BTW: I am in an observer attached to the sales_order_save_after event.

My current workaround is to read discount_description and apply the discount manually:

if (strcasecmp($order['discount_description'], 'WELCOME') == 0)
{
     $item->price = round($product->getFinalPrice() * 0.9, 2);
}

But this is ugly and you need to implement this for each discount.

Update

I couldn't find the correct price or any product information in $order->debug() so I am calling $quote->getItemsCollection()->getItems().


texts: delete all tables with the same prefix in database

texts:
I did the installation of a theme in Magento through the quick start of the theme, however, duplicate tables were created in the db.
So the tables have no prefix and prefix with their duplication.

The question is, how do I delete all tables with the prefix?

the prefix is: #_


texts: How to clear swatches cache when there is an update from an external source?

texts:
I have some changes where swatches should be greyed out for some product depending on its stock in physical stores.
I get the stock in physical stores from a webservice (which is ran every 5 mins by a cron) which is then populated in a table and this data is used to know if the swatch should be greyed out or not.
It works just fine for my use case, the only issue is whenever there is an update, it does not work unless i clear the cache.
I have tried clearing the associated product and configurable product cache programatically - but this does not help.
What am i missing?


texts: Magento 2 Undefined offset during migration

texts:
I'm getting next error during migrate:data

  Notice: Undefined offset: 1 in /var/www/magento/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 455

            $destinationRecord->setValue(
            'entity_type_id',
            $this->mapEntityTypeIdsDestOldNew[$destinationRecord->getValue('entity_type_id')]
        );

I've tried to truncate all eav tables, but this error dont go away. How can i solve it?


texts: I am working on apply multiple coupon on cart page in magento 2. I want to know the observer event where i can apply my logic for applying multiple coupon.


texts: Child theme won't override default files

texts:
I'm developing with Magento 2.2.2 and I'm trying to create my own child-theme that inherits from the default blank theme.
I tried to override the /vendor/magento/module-catalog/view/frontend/templates/product/list.phtml file with my own theme but it still grabs list.phtml when using my new theme.
I copied list.phtml from the vendor and pasted it to MyVendor/mytheme/Magento_Theme/templates/product but I can't get it to work.

I tried cleaning the cache, deploying static files, deleting var/cache, pub/static, var/view_preprocessed, var/page_cache but nothing seems to work.

It seems like an easy thing to do but I can't find what is wrong with my theme because it still uses the default file. I know this because I am using hints on the frontend.


texts: Magento 2: How to sort products by discount

texts:
I want to add a new custom option "Discount" inside Sort By dropdown on category page so that I can sort the discounted products from sort by options.

Please help, How can I implement this functionality.

Any help will be appreciated.


texts: How to create and configure multi websites in magento2.2.4?

texts:
I have created two websites like this.

Actually my website like this http://puppetkart.com/

When i opened my new website, I am getting website without CSS and Media files.


texts: Fedex label creation issue in magento1.9

texts:
I am facing below issue in Fedex but i configured correctly in fedex in front end that same credentials working fine it gave quote for the product while shipping and only issue in label creation.

stdClass Object(
[HighestSeverity] => ERROR
[Notifications] => stdClass Object
    (
        [Severity] => ERROR
        [Source] => prof
        [Code] => 1000
        [Message] => Authentication Failed
    )

[TransactionDetail] => stdClass Object
    (
        [CustomerTransactionId] => *** Express International Shipping Request using PHP ***
    )

[Version] => stdClass Object
    (
        [ServiceId] => ship
        [Major] => 19
        [Intermediate] => 0
        [Minor] => 0
    )

)


texts: LoginForm uses http:// to submit while site is on https, how to make it https?

texts:
My customer login form, forgot password and all these forms are not working as they are redirected to same page with an error in console "form is using http whereas it should be https".

I altered from developer toolbar and make the action attribute value of form starting with https:// and then it worked fine.

Am wondering how to make it https?

BTW it is magento 1.5 and I know it is very OLD.


texts: Sub category is different front-end when checking back-end

texts:
On the front-end of my site I have a sidebar which shows the subcategorys
But when I change the "sortorder" in the back-end the front-end keeps its position.

How can I change the way it orders it the same as back-end?

My .phtml
/app/design/frontend/default/blanco/template/catalog/navigation/leftnav.phtml

    <?php
        $currentCat = Mage::registry('current_category');
        echo '

'.$currentCat->getName().'

';

        if ( $currentCat->getParentId() == Mage::app()->getStore()->getRootCategoryId() ){
            $loadCategory = $currentCat;
        }else{
            $loadCategory = Mage::getModel('catalog/category')->load($currentCat->getId());
        }
        $subCategories = explode(',', $loadCategory->getChildren());
        if(count($subCategories) > 1){
            echo '
';
            foreach ( $subCategories as $subCategoryId ){
                $cat = Mage::getModel('catalog/category')->load($subCategoryId);
                if($cat->getIsActive()){
                    echo 'getURL().'">'.$cat->getName().'';
                }
            }
            echo '
';
        }
    ?>


texts: How can I remove the reviews section from the product details page? Magento 2.2.7

texts:
I am using standard Luma theme installed with Magento 2.2.7. I would like to remove the "Reviews" panel completely and also the links below the Add to Cart button.

Where can I find the template files to comment these areas out? My theme appears to be inside /vendor/magento/.......


texts:
I am creating a custom extension. And frontend is working fine!  But now i want to add a menu admin panel.

For that i added below code on my config.xml after </global>

<adminhtml>
<menu>
<refer>
<children>
<refer>
<title>Refer</title>
<sort_order>0</sort_order>
<action>refer/adminhtml_index/index</action>
</refer>
</children>
</refer>
</menu>
</adminhtml>

But nothing is coming.
Am i doing anything worng???


texts: Magento 2.3.5 with cpanel - Unable to downgrade composer to 1.10.20

texts:
(Magento 2.3.4) I am trying to downgrade composer due to not being able to run Composer commands as follows. NOTE: from my understanding Magento 2.3 is not compatible with composer 2.
composer require stripe/stripe-php:^7

I am getting the following error which is due to composer 2.

The "dealerdirect/phpcodesniffer-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "magento/inventory-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "laminas/laminas-dependency-plugin" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.

It seems I am successfully able to get composer installed on root (public_html) running the following commands as i have done many times.
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

php composer-setup.php --version=1.10.21

All settings correct for using Composer
Downloading... Composer (version 1.10.21) successfully installed to: /home/nde89g9/composer.phar
Use it: php composer.phar

php -r "unlink('composer-setup.php');"

I am getting no error from above ^ and the files are being installed.
After trying to run downgrade script its giving me the following error
composer self-update --1

The "dealerdirect/phpcodesniffer-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "magento/inventory-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "laminas/laminas-dependency-plugin" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
Warning: You forced the install of 1.10.21 via --1, but 2.0.12 is the latest stable version. Updating to it via composer self-update --stable is recommended.

Upgrading to version 1.10.21 (1.x channel).

[Composer\Downloader\FilesystemException]
Filesystem exception:
Composer update failed: "/opt/cpanel/composer/bin/composer" could not be wr
itten.
rename(/home/nde89g9/.composer/cache/composer-temp.phar,/opt/cpanel/compose
r/bin/composer): Permission denied

It seems to be trying to downgrade cpanels composer rather than Magento or root composer.
Note: I have not used cpanel in years as I normally would not need it.
So the question is, HOW would I be able to downgrade composer on root when it seems to be trying to downgrade the cpanels composer?


texts: Magento2: How to restrict customer dashboard links in frontend

texts: How can i restrict customer dashboard links for specific customer group  in magento2 frontend


texts: Magento 2 How to Create Custom Checkout Step and Save its Value In Order

texts:
How to Create a custom checkout step with input field and save its value into the order table i want to only textbox field into the checkout.

Thanks in Advance


texts: How to show other Attribute Value on Filter in product page

texts:
Sir We Have Face A Problem When We Filter Product To Specify Attributes Other Value are Not Show

Example
We Have Color Attr

RED
GREEN
BLUE
ORANGE
 When we Filter with Geeen RED,BLUE,ORANGE are not Show
I Want to Show RED,BLUE,ORANGE That We filter other Product With This Color


texts: My store address working fine But magento admin page show error. the error is


texts: Magento 2:- How to add order export feature to seller dashboard?

texts:
I'm using Marketplace and there is separate dashboard for each seller from where seller can manage their sections e.g-products,stores,orders etc.

for now,on order grid seller can't export the order but we want to add order export here.

As i tried and added following code one by one on the marketplace UI component file marketplace_orders_listing.xml under the "listingToolbar" tag but it doesn't works:-

<exportButton name="export_button">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="selectProvider" xsi:type="string">sales_order_grid.sales_order_grid.sales_order_columns.ids</item>
                </item>
            </argument>
        </exportButton>

OR

 <exportButton name="export_button">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
        <item name="selectProvider" xsi:type="string">marketplace_orders_listing.marketplace_orders_listing.orders_columns.order_id</item>
        </item>
      </argument>
     </exportButton>

OR

<exportButton name="export_button"/>

All three above code are adding a Export button:-

But after clicking on export button,it's redirecting me on 404 Page so please help me to add this feature.

Expected Result:-


texts: Display product's unit price and product's total tax on invoice email

texts:
I need to show the product's unit price (price per 1 product) excluding tax on the invoice email. Example:
Product A   Qty: 4   Unit price (excl. tax): $100   Total (excl.Tax): $400   Tax: $50   Total (incl. tax): $450

I also need to show the total tax amount for each product. Any ideas how to achieve this in invoice email?


texts: What's the best way to clean Magento reviews template for DOM elements?

texts:
The default Magento reviews template is generating thousands of DOM elements that are causing slow loads. Especially DT DD tags. Is there any way to clean the code? The only one I can see is removing the SPAN element after "review by".

  <?php foreach ($_items as $_review):?>

            <a href="<?php echo $this->getReviewUrl($_review->getId()) ?>"><?php echo $this->escapeHtml($_review->getTitle()) ?> <?php echo $this->__('Review by %s', $this->escapeHtml($_review->getNickname())) ?>

            <?php $_votes = $_review->getRatingVotes(); ?>
            <?php if (count($_votes)): ?>

                <col width="1" />
                <col />

                    <?php foreach ($_votes as $_vote): ?>

                        <?php echo $this->escapeHtml($_vote->getRatingCode()) ?>

                                <div class="rating" style="width:<?php echo $_vote->getPercent() ?>%;">

                    <?php endforeach; ?>

            <?php endif; ?>
            <?php echo nl2br($this->escapeHtml($_review->getDetail())) ?>
            <?php echo $this->__('(Posted on %s)', $this->formatDate($_review->getCreatedAt()), 'long') ?>

    <?php endforeach; ?>

-

I have removed that SPAN and SMALL attributes, which reduced DOM elements from 5k to 4700, but that is still way too much.


texts: image upload with Magento Elastic Load Balancer

texts:
My Magento store is configured with Elastic Load Balancer but when i try to upload product images from the backend sometimes it fails.

I have IP

192.168.2.1 - A
192.168.2.2 - B

My problem is there are times that images are uploaded to server B and magento fails to locate the images.

My Site is equiped with:

Elastic Load Balancer
CDN
AWS

please help its been two months since i started to face this problem. I new to server staff and only follow tutorials online.


texts:
When i use grunt exec:theme it clears all files in pub/static but does not copy new images, scripts and fonts.

I dont have any errors in CLI.
I clear all cache and i use grunt refresh.


texts: Magento 2 - Custom API to get layered navigation

texts:
In magento 2.2.5 Enterprise edition

I am trying to get layered navigation using custom API.

I got solution form here:
https://magento.stackexchange.com/a/262086/31910
and http://www.sivaschenko.com/magento2-category-layered-navigation-filterable-attributes/

my code is this: Please ignore ObjectManager it is only for testing purpose

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $filterableAttributes = $objectManager->get(\Magento\Catalog\Model\Layer\Category\FilterableAttributeList::class);

    //$appState = $objectManager->get(\Magento\Framework\App\State::class);
    $layerResolver = $objectManager->get(\Magento\Catalog\Model\Layer\Resolver::class);
    $filterList = $objectManager->create(
        \Magento\Catalog\Model\Layer\FilterList::class,
        [
            'filterableAttributes' => $filterableAttributes
        ]
    );

    //$appState->setAreaCode('frontend');
    $layer = $layerResolver->get();
    $layer->setCurrentCategory($category);
    $filters = $filterList->getFilters($layer);

    $data = array();
    foreach ($filters as $filter) {
        if ($filter->getItemsCount()) {
            $data[] = $filter;
        }
    }

    return $data;

The problem is, I am getting this error after applying this code:

  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.created_in'
  in 'where clause', query was: SELECT FLOOR((ROUND((e.min_price) * 1,
  2)) / 10000) + 1 AS range, COUNT(*) AS count FROM
  catalog_product_index_price AS e\n INNER JOIN
  catalog_category_product_index_store1 AS cat_index ON
  cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND
  cat_index.visibility IN(2, 4) AND cat_index.category_id='46'\n INNER
  JOIN cataloginventory_stock_status AS stock_status_index ON
  e.entity_id = stock_status_index.product_id AND
  stock_status_index.website_id = 0 AND stock_status_index.stock_id =
  1\n INNER JOIN search_tmp_5e05a53f383179_70162465 AS search_result
  ON e.entity_id = search_result.entity_id WHERE
  ((stock_status_index.stock_status = 1)) AND (e.created_in <=
  '1573154701') AND (e.updated_in > '1573154701') AND ( e.website_id =
  '1' ) AND ( e.customer_group_id = 0) AND (e.min_price IS NOT NULL)
  GROUP BY FLOOR((ROUND((e.min_price) * 1, 2)) / 10000) + 1 ORDER BY
  (FLOOR((ROUND((e.min_price) * 1, 2)) / 10000) + 1) ASC

I don't know why it is adding (e.created_in <= '1573154701') in where clause

Can anyone help me resolve this issue?


texts: How to change layout to on page instead of inside a tab in product detail page

texts:
I'm trying to remove the tabs layout on the Magento product detail page. I am currently using Mag 1.9 RWD theme. Instead of displaying the Specs, Description, The Collection, Reviews and Related Products in tabs I just want them be laid out on one page.

I have found the section in rwd\mytheme\layout\catalog.xml that creates the tabs but as a Magento newb I am unsure on best practices to remove these sections outside of the tabs and directly into the page.

 <block type="mmcatalog/product_view_tabs" name="product_tabs" as="product_tabs" template="catalog/product/view/tabs.phtml">
                 <block type="catalog/product_view_attributes" name="product.attributes" as="additional" template="catalog/product/view/attributes.phtml">
                    <action method="addToParentGroup"><group>detailed_info</group></action>
                    <action method="setTitle" translate="value"><value>Specifications</value></action>
                </block>
                <block type="catalog/product_view_description" name="product.description" as="description"
                       template="catalog/product/view/description.phtml">
                    <action method="addToParentGroup">
                        <group>detailed_info</group>
                    </action>
                    <action method="setTitle" translate="value">
                        <value>Description</value>
                    </action>
                    <block type="magenmagic_attributeoptions/description" name="attribute.option.description" as="option.description" template="magenmagic/attributesoptions/description.phtml"/>
                </block>
                 <block type="mmcatalog/product_view_collections" name="product.collection" as="product.collection" template="catalog/product/view/collection.phtml">
                    <action method="addToParentGroup"><group>detailed_info</group></action>
                    <action method="setTitle" translate="value"><value>The Collection</value></action>
                </block>
                 <block type="catalog/product_list_related" name="catalog.product.related.new" as="related_products_new" template="catalog/product/list/related.phtml" after="additional">
            <action method="addToParentGroup"><group>detailed_info</group></action>
            <action method="setTitle" translate="value"><value>Related Products</value></action>
        </block>
            </block>

Thanks in advance for any help or advice in the correct method to approach this


texts: Filter by attribute doesn't bring any products

texts:
I have added an attribute (multivalue) in a M2 site that I have. I have linked some products with some attribute values. I have also included the attribute in the layered navigation. I can see the number of products in the parenthesis (on the layered navigation) that the values have but when I click on an attribute value then on the right it says that no products exist with this value.

As you can see from the screenshot Birthday says it has 20 products.

Any ideas?

Thanks


texts:
Already follow from this dev document this

1.npm install -g grunt-cli

2.Rename 3 files
 - package.json.sample into package.json
 - Gruntfile.js.sample into Gruntfile.js
 - grunt-config.json.sample into grunt-config.json

3.cd your_Magento_instance_directory
  npm install
  npm update

4.adding themes in dev/tools/grunt/configs themes.js

 default: {
    area: 'frontend',
    name: 'Tutor/default',
    locale: 'en_US',
    files: [
        'css/styles-m',
        'css/styles-l'
    ],
    dsl: 'less'
}

however Im using linux ubuntu 16.0, Im running command grunt in magento root folder

Loading "Gruntfile.js" tasks...ERROR

    Error: Cannot find module '/home/user/www/tutor/dev/tools/grunt/configs/local-themes'
    Warning: Task "default" not found. Use --force to continue.

Aborted due to warnings.

anybody know about this error.

Thanks


texts: Layered Navigation is not working on Searched Result Page in Magento2

texts:
I have been assigned on a task in which layered navigation is working perfect on product list page while not working on Searched Result page.

Only one filter is working fine but not when we try to apply 2 filters with 'AND'

Any clue how to fix it.


texts:
I have following issue. I developing a new Magento store which data is imported from a old xt:Commerce store. The redirects in .htaccess works but xt:Commerce has URLs included with index.php and additional parameters.

For example:

Old URL: /index.php?cat=c484_Brandlbracke.html
New URL: http://www.anfalas.de/hundeaufkleber/rassehunde-a-c/brandlbracke.html

It works not with the URL index.php included. Have anyone an idea or way? I tried it also with default Magento URL Administration in Backend. I have only a list of thousands URLs as CSV.


texts: PHP Warning: Illegal string offset order_fk

texts:
I don't find a reason why the offset is considered illegal in the code snippet. Any suggestion to fix this with an explanation why the error occurs is greatly appreciated.
    foreach ($my_return->refund_items as $key => $my_refund_item) {
        $refund_item_info = $my_return->get_line_item_info($my_refund_item['lineitem_fk']);
        if ($refund_item_info['order_fk'] != 0)
            $my_refund_item['sku'] = $refund_item_info['sku'];
        $refund_items_array[] = $my_refund_item;
    }


texts: Expected Delivery Date on Transactional Email

texts: I need to add "Expected delivery date" in the Transactional Email of Magento. Can anyone please tell me the predefined variable (or code) for expected delivery date in magento. If there are no predefined variable in magento for expected delivery date, is there another solution?


texts: In stock products only in my search custom code

texts:
$productCollection = Mage::getResourceModel('catalog/product_collection')
    ->addAttributeToSelect('author')
    ->addAttributeToFilter('author', array('like' => $searchstring.'%'))
    ->setPage($pageid, $resultcount);

above given is my search custom code. Please let me know how to only add in stock product using the above code.


texts: how to get shipping method using order id in magento 2

texts:
I am trying to get the shipping method using Object Manager

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('Magento\Sales\Api\Data\OrderInterface')->load($orderid);

by doing var_dump on $order->getShippingAddress()->getData() i get no such thing as shipping method, from where i can get shipping method?
I am new to magento.

after referring to this link

  Magento2: How to get shipping method in order using observer `sales_order_save_after`?

I don't know how to use sales_order_save_after if that's the only solution out there.


texts: Dashboard, 24 hours stats, shows negative revenue amount

texts:
As above, the Magento dashboard shows a negative value for the 24 hour period.  There has been a change to the system where shop orders (we have a bricks and mortar store) are done via orders that are at a 100% discount through Magento.  There is a shopping cart rule set up to offer 100% discount for any orders from a customer in a certain customer group (e.g. the Shop customer).

Could this be causing the issue, or is something else at work here?  Never seen this before in our store in a year of running.


texts: Magento 2 - How to reset XML block arguments such as CSS

texts:
I'm wondering how to unset CSS that has been set through the XML, for example:

<block class="Magento\Framework\View\Element\Template" name="navigation.sections" before="-" 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>

That code is from the Magento Theme module. I would like to remove the group_css argument in my own theme, I do not want .nav-sections to be added to by markup.


texts: Add custom block that appears in product section below price or quantity or add to cart button i nmagento 2

texts: I need to show custom text where product shows in the system like on product listing page, detail page, hompage feature and new product section, crosssell and upsell product section.


texts: RWD theme - What's controls the size of an image after clicking the swatch?

texts:
When I'm on the category page I have 2 swatches for an image. When I click on either of the swatches, it shrinks the size of image to the default magento square. I need it to stay the same size as the base image that comes up by default.

How do I define this? Where? I see in list.phtml there is a
$_imgSize which I have set.
How do I prevent it from cropping and adding whiteness around the
image?

I imagine that this shouldn't be too difficult but I can't for the life of me find out where this is being controlled.


texts: Paypal Standard Not Working After Upgrade

texts:
I have Upgraded Magento from 1.4 To 1.7.0.2, Previously on site PayPal Standard was working fine. I have again entered the merchant email, Set Payment Action to "Sale", Set Enable SSL verification to "No".

But After Clicking Pay Now button on PayPal I am getting the following error:

  Return to merchant and try a different payment method. We are not able
  to process your payment using your PayPal account at this time. Please
  return to the merchant's website and try using a different payment
  method (if available).

I have enabled the debug mode to Yes. But log file also not created. I have checked the permission too.

Please Help!!


texts: Multistore on single domain without subdomains or subfolders, perhaps using cookies

texts:
We currently have multiple websites and stores (store views) in order to support multiple base currencies and languages. We have a seperate subfolder for each website.

Is it possible to do away with the subfolders and have the current store stored in a cookie? This would appear to the user in much the same way switching languages works; you don't see the store view code in the URL.


texts: Payment content showing with HTML tags on admin invoice pages

texts:
Magento 1 version : 1.9.4.0
Magento 2 version : 2.3.5
Fresh install of m2
Run migrate:settings
Run migrate:data
All data is migrated

We migrated data successfully but getting issues of html tags on invoice pages.
Admin->Sales->Invoices->Click on any invoice->Invoice page will open "Payment Information" under "Payment & Shipping Method" head here Data(content or description) showing in html tags.

Expected result

Data must be show WITHOUT HTML tags

Actual result

But here data is showing WITH HTML tags

Please check screenshot -

I just changed vendor/magento/module-sales/view/adminhtml/templates/order/invoice/view/form.phtml

before - <?= $block->getChildHtml('order_payment') ?>

now i using escaper function like this -

$data = $block->getChildHtml('order_payment');
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
echo $escaper = $objectManager->create('Magento\Framework\Escaper')->escapeHtml($data);

Sample data(which i get on $data) -

Western Union

WU Instructions: Western Union is a common way for people to send any currency to the USA. For Western Union you can either use their website, or go to a nearby Western Union store. Once you do this, email us back the information.

To find your nearest location, go to:
locations.westernunion.com
Bring your invoice, and this information with you to the Western Union store. This is the "Receiver" information:

* Name: john cloe
* Street: 123 b 108th mw
* City, State & Zip: Seattle, Washington State, 98121
* Country: USA
* Phone: 123-456-7890

When the money is sent, email us back: WU Control number; Senders full name, Senders City, State, and Country. That is it.

but still not working

Section -

<div class="admin__page-section-item order-payment-method<?php if ($_order->getIsVirtual()) : ?> order-payment-method-virtual<?php endif; ?> admin__fieldset-wrapper">
            <?php /*Billing Address */ ?>

                <?= $block->escapeHtml(__('Payment Information')) ?>

                    <?php
                    $data = $block->getChildHtml('order_payment');
                    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                    $allowableTags="";
                    $result = strip_tags($data, $allowableTags);
                    echo $escaper = $objectManager->create('Magento\Framework\Escaper')->escapeHtml($result, $allowableTags);
                    ?>

                    <?= $block->escapeHtml(__('The order was placed using %1.', $_order->getOrderCurrencyCode())) ?>

<?= $block->getChildHtml('order_payment_additional') ?>

How to remove this HTML tags ?


texts: Magento 2.3.1 - URL rewrite rules are not creating for product after update url key

texts:
Any one faced below issue in default Magento 2.3.1 and if found any solution then please help us to solve this.

We are facing an issue with URL rewrite rules in fresh Magento 2.3.1 version.

  Issue: URL of the product does not getting updated after change URL
  key of category in multi-website setup. (NOTE: This issue is not
  coming when only one website is set up)

Precondition:
Fresh Magento 2.3.1
One category which has one product.
Multi website setup.

Steps to reproduce error:
Step 1: Go to the category at admin side.
Step 2: Update URL key of category.
Step 3: Save category.

  Actual result: New URL rules are created with updated the key for the
  category but not created for the product. NOTE: URL rules of the
  product are created for the second website which does not default
  website, rules only not created for the mail website product.

  Expected result: Rules should be created/updated for the category and
  all products which are assigned to this category as well it should be
  created for all websites.


texts: Are magento sites affected by heartbleed bugs and if yes what can I do for mitigation?


texts: Error while adding layout update to the widget

texts:
I am using a theme that has been built on Magento 1.9. Whenever I am trying to add layout update to a widget and save it I am getting the error below.

An error occurred during saving a widget: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-ves_kitchen-default-61' for key 'UNQ_CORE_LAYOUT_LINK_STORE_ID_PACKAGE_THEME_LAYOUT_UPDATE_ID', query was: INSERT INTO `core_layout_link` (`store_id`,`area`,`package`,`theme`,`layout_update_id`) VALUES (?, ?, ?, ?, ?)

Can someone kindly tell me why is this happening and how I can sort this out?


texts:
In the internet are described different ways to diplay checkout progress in the left sidebar. But how to diplay it in the top of the page?

And I have a second question: how to know at what step the user is? I need to set a CSS class to a element in dependence of what step the user is.