texts: Get custom config value in transactional email

texts:
Is it possible to get a custom config value in transactional email template?

Unfortunately the following doesn't work:

{{config path='extraconfig_options/emailsettings/primarycolor'}}

Our system.xml looks like:

<?xml version="1.0"?>
<config>
    <tabs>
        <extraconfig translate="label" module="extraconfig">
            Label
            <sort_order>1</sort_order>
        </extraconfig>
    </tabs>
    <sections>
        <extraconfig_options translate="label" module="extraconfig">
            Extra Config
            <tab>extraconfig</tab>
            <frontend_type>text</frontend_type>
            <sort_order>1</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
            <groups>
                <emailsettings translate="label">
                    Transactional Email Settings
                    <frontend_type>text</frontend_type>
                    <sort_order>1</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <primarycolor>
                            Primary Color
                            <frontend_type>text</frontend_type>
                            <validate>color</validate>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </primarycolor>
                        <secondarycolor>
                            Secondary Color
                            <frontend_type>text</frontend_type>
                            <validate>color</validate>
                            <sort_order>2</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </secondarycolor>
                    </fields>
                </emailsettings>
            </groups>
        </extraconfig_options>
    </sections>
</config>


texts: OnePage Checkout - hide payment method depending on matrixrate shipping method with multiple codes

texts:
We use MatrixRates to set shipping rates to various in-country destinations with two different services. As a result, one shipping provider has 47 different codes. Terms and conditions for COD are different for the two shipping providers. I've made two local payment modules, and need to call the correct one based on the chosen provider.

I've built on the tried and tested method found here

https://stackoverflow.com/questions/29299718/cash-on-delivery-payment-method-should-visible-only-for-some-zip-codes-pin-codes/29360908#29360908

by declaring two initial arrays in
app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml

<?php
   $yupack = array('matrixrate_matrixrate_330', 'matrixrate_matrixrate_331',
    [sequential list of 44 more variables] 'matrixrate_matrixrate_376');
  $kuroneko = array('matrixrate_matrixrate_283', 'matrixrate_matrixrate_284',
    [sequential list of 44 more variables] 'matrixrate_matrixrate_329');
?>

and replacing the equal expression the Stackoverflow answer:

if($_POST['shipping_method'] == 'flatrate_flatrate') {
  if($_code == 'checkmo') {
    continue;
}
}

with two in_array functions, the second one with the opposite parameters.

if(in_array($_POST['shipping_method'], $yupack)) {
 if($_code == 'nekodaibiki') {
   continue;
}
}

It works! It's great and wonderful, except - it takes a seriously long time.

Is this something I can count on improving as I move the site into production and reenable caching?
Am I missing a much more elegant solution?


texts: Adding attributes in magento from extension - solved

texts:
i am trying to insert some attributes (drop-down) into the magento. The creation of the attribute with option is completed successfully. I also create an attribute set based on that attribute successfully.
The problem is that when i add a product based on that attribute set the product is not visible on the website.

Here is my configuration for the dropdown attribute:

    $data = array(
                    'is_global'                     => '1',
                    'frontend_input'                => 'select',
                    'default_value_text'            => '',
                    'default_value_yesno'           => '0',
                    'default_value_date'            => '',
                    'default_value_textarea'        => '',
                    'is_unique'                     => '0',
                    'is_required'                   => '1',
                    'frontend_class'                => '',
                    'is_searchable'                 => '0',
                    'is_visible_in_advanced_search' => '0',
                    'is_comparable'                 => '0',
                    'is_used_for_promo_rules'       => '0',
                    'is_html_allowed_on_front'      => '1',
                    'is_visible_on_front'           => '0',
                    'used_in_product_listing'       => '0',
                    'used_for_sort_by'              => '0',
                    'is_configurable'               => '1',
                    'is_filterable'                 => '0',
                    'is_filterable_in_search'       => '0',
                    'backend_type'                  => 'varchar',
                    'default_value'                 => '',
                    'option'                        => ''
                );

--

i 've changed the above array to this one:

    $data = array(

                    'is_global'                     => true,
                    'frontend_input'                => 'select',
                    'is_required'                   => true,
                    'visible'                       => true,
                    'is_html_allowed_on_front'      => true,
                    'is_visible_on_front'           => true,
                    'is_configurable'               => true,
                    'is_filterable'                 => true,
                    'backend_type'                  => 'varchar',
                    'apply_to'                      => array('simple'),
                    'default_value'                 => '',
                    'position'                      => 1,
                    'visible_on_front'              => true,
                    'option'                        => ''
                );

but i still have the same problem. i think that i am missing something here.


texts: Magento 2.3.x - Subscribe to newsletter checkbox at onepage checkpout page - error during subscription

texts:
My requirement was to add a "subscribe to newsletter" checkbox at onepage checkout page (below "terms and condition" checkbox). All the things are fine except 2 issues:

The user MUST NOT be subscribed if he unchecks the checkboxes.
For the very first time when the user mail is not there in DB for newletter subscription and I hit the place order button, the page is broken but if the email is already there in DB (under newsletter subscribers in admin) and the user places the order and dont uncheck the chekbox, all fine.

I played with the observer checkout_onepage_controller_success_action (code below):

<?php
/**
 *
 * Register to Newsletter during checkout process
 */

namespace <Mynamespace>\<Mymodule>\Observer\Sales;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Newsletter\Model\Subscriber;
use Magento\Framework\App\RequestInterface;
use Psr\Log\LoggerInterface;

class OrderPlaceBefore implements ObserverInterface
{
    protected $_subscriber;
    protected $_request;
    protected $_logger;

    /**
     * @param Subscriber $subscrbr
     * @param RequestInterface $request
     * @param LoggerInterface $logger
     */
    public function __construct(
        Subscriber $subscrbr,
        RequestInterface $request,
        LoggerInterface $logger
    ) {
        $this->_subscriber = $subscrbr;
        $this->_request = $request;
        $this->_logger = $logger;
    }

    /**
     * Subscribe to newsletters if customer checked the checkbox
     *
     * @param \Magento\Framework\Event\Observer $observer
     * @return $this
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $order = $observer->getEvent()->getOrder();
        $customerEmail = $order->getCustomerEmail();

        try {
            **//Here the conditions should go, if the checkbox is checked then only subscribe to newsletter otherwise not
            //How to get custom checkbox value after order placement? Tried with $this->_request->getpost() but not working, returning an empty array**
            $subscriber = $this->_subscriber->loadByEmail($customerEmail);

            if (!$subscriber->getId()) {
                //at this line, first time for non-existing email, the page is broken, not sure WHY??
                $this->_subscriber->subscribe($customerEmail);
            }
        } catch (\Exception $e) {
            $this->_logger->critical($e->getMessage() . ' from Mynamespace-Mymodule ' . $customerEmail);
        }

        return $this;
    }
}

Not sure where I am wrong? Can you please guide?
Thanks in advance.


texts: Problem in creating a table via custom module ( UpdateSchema.php )

texts:
I am trying to create a new table via my module Ved_Mymodule

This module is active and when I change its setup_version in module.xml file then it is reflecting in setup_module table in the database.

\app\code\Ved\Mymodule\Setup\UpdateSchema.php

<?php

namespace Ved\Mymodule\Setup;

use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;

class UpgradeSchema implements UpgradeSchemaInterface
{
    public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $installer = $setup;
    $installer->startSetup();

    // Get emqube_mymodule table
    $tableName = $installer->getTable('ved_mymodule');
    // Check if the table already exists
    if ($installer->getConnection()->isTableExists($tableName) != true) {
        // Create emqube_mymodule table
        $table = $installer->getConnection()
            ->newTable($tableName)
            ->addColumn(
                'id',
                Table::TYPE_INTEGER,
                null,
                [
                    'identity' => true,
                    'unsigned' => true,
                    'nullable' => false,
                    'primary' => true
                ],
                'ID'
            )
            ->addColumn(
                'title',
                Table::TYPE_TEXT,
                null,
                ['nullable' => false, 'default' => ''],
                'Title'
            )
            ->addColumn(
                'summary',
                Table::TYPE_TEXT,
                null,
                ['nullable' => false, 'default' => ''],
                'Summary'
            )
            ->addColumn(
                'description',
                Table::TYPE_TEXT,
                null,
                ['nullable' => false, 'default' => ''],
                'Description'
            )
            ->addColumn(
                'created_at',
                Table::TYPE_DATETIME,
                null,
                ['nullable' => false],
                'Created At'
            )
            ->addColumn(
                'status',
                Table::TYPE_SMALLINT,
                null,
                ['nullable' => false, 'default' => '0'],
                'Status'
            )
            ->setComment('News Table')
            ->setOption('type', 'InnoDB')
            ->setOption('charset', 'utf8');
        $installer->getConnection()->createTable($table);

        }

        //if (version_compare($context->getVersion(), '1.0.3') < 0) {
            //code to upgrade to 1.0.3
        //}

        $installer->endSetup();
    }
}

Then I have run:

php bin/magento setup:db-schema:upgrade

php bin/magento setup:upgrade

But that table is not creating in the database.


texts:
when  Magento sends emails (any email for any provider like Gmail, Hotmail), the emails are sent but with a blank body. the title and subject are visible but the body is empty
is there anyone that has the same problem?


texts: Magento 1 order invoice does not support Arabic font

texts:
I am printing invoice pdf of Magento 1.9.2 in Arabic, but its showing box only.

Note: Its not supporting only on PDF invoice printing, but Arabic supporting everywhere else.

You can see invoice PDF copy screenshot


texts: Magento2: Issues with duplicate simple product

texts:
I have duplicate a simple product.

The original simple product has:

SKU: pld942
URL: pld942.html

after duplicate:

SKU: pld942-1
URL: pld942-1.html

I set in duplicate product:

enable
weight
qty
in stock
and then save and reindex

Still I not see this product. When I put url with duplicate product then 404 not found.

Any solution?


texts: Magento 2 Cannot translate phases in $.mage.__('XXX')

texts:
Translation added to i18n files, phrases in <?php echo __("XXX");?>can be translated, but the those in $.mage.__('XXX') cannot be translated.

Any work around to translate phrases in $.mage.__('XXX')?


texts:
I just started working on magento 2 and i want to call a phtml file for every cms page.
I have created a theme and under Magento_Cms i have copied cms_page_view.xml from vendor and placed it in there.Now i added below code there.

<?xml version="1.0"?>

    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
            <referenceContainer name="content">
                <block class="Magento\Cms\Block\Page" name="cms_page"/>
            </referenceContainer>
            <referenceContainer name="maincontent">
                <block class="Magento\Cms\Block\Page" name="custom.page.title" before="-" template="Magento_Cms::page/title.phtml"/>
            </referenceContainer>
        </body>
    </page>

page/title.phtml placed inside Magento_Cms/templates/page/title.phtml and i used die there.. and after flushing cache my phtml is not getting call. I am not able to see die effect on page. Please suggest me how can i render custom phtml file for all cms pages using xml


texts: Showing a product attribute in admin sales orders overview page

texts:
How can i show a product attribute after the sku on the sales orders page the overview page when you goto sales->orders I want to add a column showing a product attribute in addition i need to be able to export this when exporting orders

I cant even find the template file for that page?


texts:
For my custom payment module I have a database table where I need to retrieve data from, but I have issues using collections.
For example I have a column named "order_id", I load the model that I have in my module and get the collection using $model->getCollection();
What's the correct way to get the data now?

When I use $collection->getData()["order_id"], I get an array with fields like ["order_id"]=> string(9) "145000021".

How can I get just the value from the table?


texts: Need to trigger javascript modal on homepage only once

texts:
We want to have the registration popup come up on (only) our homepage whenever a customer has not visited before. I think I can chase down the information on setting a cookie for the one-time behavior, but I'm trying to figure out how to inject the javascript necessary to call the existing cleversoft social-login modal.

The current modal is triggered by clicking a 'Create Account' link on the header bar which appears to call the following function:

        $('.registerpopup').on('click',function(event){
            qsModal_l.modal('closeModal');
            qsModal_r.modal('openModal');
        });

Presumably the first line just makes sure it isn't already open and since I want to do this on page load if the cookie is not already set, the modal would not be open so I'm assuming I only need to call the second line:

            qsModal_r.modal('openModal');

So basically I want to make sure that the cleversoft javascript is loaded into the page then call this function on only the homepage, but I'm not sure to go about it.

I see discussions about adding a javascript source to the  portion of cms_index_index.xml and/or the design portion of the content->page if I put the code in a .js file, but I'm not sure how to reference such a js file if I added it to the theme's web/js directory.

I also see comments about loading such a file with require.js but I'm not sure if calling a single function requires that much coding. (keeping in mind I also need to do the cookie check though, maybe it is?)

So what is the 'best practices' way of doing this sort of thing from the home page?

EDIT:
It appears the modal vars are local scope, but they can be accessed via the container. So I have a javascript file similar to this for just testing the ability to open the modal as app/design/frontend/Cleversoft/custom/web/js/regpopup.js:

require(["jquery"],function($) {
    $(document).ready(function() {
        setTimeout(function() {
            $('div#zoo-register-form').modal('openModal');
        }, 1000);
    });
});

Now I need to know how to add a reference to load that to the  of the layout.


texts: Homepage not showing logout in toplink for logged-in customers in magento

texts:
In my local machine, after customer logs-in, homepage is showing logout in the toplink but the same is not happening in live.
In live, when customer logs-in, then homepage behaving as if customer is not logged-in but in any other page, toplink is showing 'logout' option but moving to homepage showing 'login' in the toplink.
I am sure session is maintained because moving to other page is responding correctly but coming to homepage at the same time is showing the issue.

Can anyone please help in this?


texts: Magento 2: How to add customer address programmatically?

texts: I have successfully created a customer programmatically. Now I want to add an address to this customer. How can I do this programmatically?


texts:
I just installed Magento 2.3.3 in the Cpanel using Installatron. I didn't add any product. I changed the email in store->configuration->Email Options->Send Emails To.
but no email is coming when I submit the contact form. because of this issue, I reinstalled Magento before.
I search for a solution but nothing worked, can anyone help me I am new to Magento
you can check from this URL:  http://zahratalebtsama.ae/

my emails addresses are working fine
server sending emails fine check from this URL : http://zahratalebtsama.ae/mail_test.php


texts:
On any given Magento2 website, you can navigate to https://yourmagentostore.com/swagger and access the swagger UI for API methods.

One of the methods that you can test before being authenticated is getting a token. You get that by using the integrationAdminTokenService.
All that method needs is the admin username and password.

To me this seems like a security risk. Any bot can brute Force this form to try and guess the admin credentials.
So even if you created a complicated path to your admin route, here's an easy place for someone else to try and guess it.

Am I missing something? Are you supposed to disable swagger for your production environment?

While I'm at it, I guess you don't need the swagger UI, anyone can just brute Force the API integrationAdminTokenService to try and get the user credentials.

Does Magento2 have any measures in place to prevent such attacks?


texts: Regarding product list API to get only list of product for one store via REST API Magento2

texts:
[Domain]/rest/V1/products?searchCriteria[filter_groups][0][filters][1][field]=status&searchCriteria[filter_groups][0][filters][1][value]=1&searchCriteria[filter_groups][0][filters][1][condition_type]=eq

I have used this to get all products whose status is enabled.
Can we pass store id to get all products for particular store?


texts: Order Emails are not generated :: SMTP configurations required :: Magento community open source

texts:
Magento 2.3.1
PaymentGateway: Fatzebra
OS: Ubuntu 18.04
Environment: Dev

I have used following code from here: https://magecomp.com/blog/send-order-confirmation-email-after-successful-payment-magento-2/

I have also tried to make it work by disabling store->configuration->Sales->Sales Email->Order to No/yes both options but still not working.

Any ideas


texts: Magento 2 - GitHub credentials on component grid

texts:
I installed a plugin for Magento 2.1.3 from GitHub ( to be more specific, its the PayPal Plus from iways ) after successfully installing and activating it my websetup wizard stops working when i want to update / install extensions from the Magento Marketplace.

After a while of loading i get a 500 ( Internal Server Error )

Error shown in Chrome

GET http://host.domain/setup/index.php/componentGrid/components 500 (Internal Server Error)

After previeing the XHR element i see the following:

Message:
Command "show" failed: Failed to clone the git@github.com:i-ways/magento2-paypal-plus.git repository, try running in interactive mode so that you can enter your GitHub credentials

  [RuntimeException]
  Failed to execute git clone --mirror 'git@github.com:i-ways/magento2-paypal-plus.git' '/usr/www/users/nullnp/de_nullbar/var/composer_home/cache/vcs/git-github.com-i-ways-magento2-paypal-plus.git/'

show [--all] [-i|--installed] [-p|--platform] [-a|--available] [-s|--self] [-N|--name-only] [-P|--path] [-t|--tree] [package] [version]

Stack trace:
#0 /usr/www/users/nullnp/de_nullbar/setup/src/Magento/Setup/Controller/ComponentGrid.php(98): Magento\Setup\Model\PackagesData->syncPackagesData()
#1 /usr/www/users/nullnp/de_nullbar/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(82): Magento\Setup\Controller\ComponentGrid->componentsAction()
#2 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#3 /usr/www/users/nullnp/de_nullbar/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#4 /usr/www/users/nullnp/de_nullbar/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#5 /usr/www/users/nullnp/de_nullbar/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#6 /usr/www/users/nullnp/de_nullbar/vendor/zendframework/zend-mvc/src/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#7 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#8 /usr/www/users/nullnp/de_nullbar/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#9 /usr/www/users/nullnp/de_nullbar/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#10 /usr/www/users/nullnp/de_nullbar/vendor/zendframework/zend-mvc/src/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#11 /usr/www/users/nullnp/de_nullbar/setup/index.php(31): Zend\Mvc\Application->run()
#12 {main}

I hope someone can help me with that :)

Update:
I tried adding a accesstoken to the auth.json, no errors anymore but infinite loading and not showing the components.


texts: How to set different style.css for different stores?

texts:
I have 2 stores in my website, I want to use different CSS for each store.

for now, same css file is used for both store but I want to use different CSS for the store specific


texts: How to add phtml file at edit tab of Magento 2 custom module in admin?

texts:
I have created a custom module. When we click on the admin grid to edit,  it opens edit page. In that I am showing tabs. When I click on that tab I need to show template file. If you see the below screen you can get idea

this is my tab file

    <?php
/**
  /**
 * Exinent_Customerids Module
 *
 * @category    customer
 * @package
 * @author      pawan
 *
 */

namespace Vendor\Modulename\Block\Adminhtml\Customerids\Edit\Tab;

/**
 * customerid post edit form main tab
 */
use Magento\Backend\Block\Template\Context;
use Magento\Framework\Registry;

class Meat extends \Magento\Backend\Block\Template
{
//    const IBAN_TEMPLATE = 'Exinent_Customerids::test.phtml';
     protected $_template = 'test.phtml';
    protected $_coreRegistry = null;

//   public function __construct(
//        \Magento\Backend\Block\Widget\Context $context,
//        array $data = []
//    ) {
//        parent::__construct($context, $data);
//    }

//   protected function _prepareLayout()
//    {
//        parent::_prepareLayout();
//        if (!$this->getTemplate()) {
//            $this->setTemplate(static::IBAN_TEMPLATE);
//        }
//
//        return $this;
//    }
}

my layout file

<block class="Vendor\Modulename\Block\Adminhtml\Customerids\Edit\Tab\Meat" name="customerids_customerids_edit_tab_meat"/>
                <arguments>
                    <argument name="config" xsi:type="array">
                        <item name="label" xsi:type="string" translate="true">customerids_customerids_edit_tab_meat</item>
                        <item name="collapsible" xsi:type="boolean">true</item>
                        <item name="opened" xsi:type="boolean">true</item>
                        <item name="sortOrder" xsi:type="string">2</item>
                        <item name="canShow" xsi:type="boolean">true</item>
                        <item name="componentType" xsi:type="string">fieldset</item>
                    </argument>
                </arguments>


texts: Magento2: Black screen checkout in mobile verison

texts:
We have issue during checkout after display order info cart in mobile version.

Below screenshot:

Does anyone know how to solve this issue?

I have changed <button to <a before:

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

// @codingStandardsIgnoreFile

/** @var $block \Magento\Checkout\Block\Cart\Sidebar */
?>
<?php $themeHelper = $this->helper('MGS\Mpanel\Helper\Data'); ?>
<?php $enbCartDropdown = $themeHelper->getStoreConfig('mgstheme/general/cart_dropdown'); ?>

<div data-block="minicart" class="minicart-wrapper<?php if($enbCartDropdown): ?> minicart-wrapper--dropdown<?php endif ?>">
    <a class="action showcart" href="<?php /* @escapeNotVerified */ echo $block->getShoppingCartUrl(); ?>"
       data-bind="scope: 'minicart_content'">

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

                    <?php echo __('Mini Cart') ?>

            <?php echo $block->getChildHtml('minicart.addons'); ?>

    <?php endif ?>

It still does not work for me.

In template folder I found only this results:

opc-estimated-wrapper


texts: I want to add a custom step between payment method and order review so please guide me the steps to be followed in order to add custom step


texts: How to add search bar to menu bar in magento2

texts:
How to add search bar to menu bar in Magento2?

With file structure details explained.

Thank you


texts: Store Views - 404 Error - Magento 1.8 & 1.9

texts:
I have 2 store views in magento.

I have both Store Views under one website and one store:

Then in System Config I have each store view set the same:

Lastly Categories are set to redirect to static blocks with translations in them.

However when I visit these links I am redirected to a Error (404) page and back to the default site/language. Any ideas?


texts: I have a list of products with 3 attributes (Date, among others) to sort by. By default the sorting is an ascending order, is there a way to change it to be a descending order instead?


texts:
I successfully changed my store domain name and I was able to access my admin URL. Now when I changed my admin URL and getting 404 error. I followed these steps:

STORES → Configuration-Admin-ADVANCED-Admin Base URL-use custom url-yes
and then entered my custom admin URL.
Custom admin path is set to no while saving configuration.

On saving, the page went immediately to 404 error. Now I'm unable to access my admin URL.

Even after cache clear and flush, I'm still unable to access admin URL.
I tried to edit env.php but still no luck.

Any other steps to get back to the admin url. Should I try editing db from phpmyadmin?

Magento ver: 2.2


texts: Is there any way to run core_email_queue_clean_up without having to send all emails in the queue?

texts:
I probably run into this issue once every other month. We inherit a website from a client that is all up to date on its patches (1.9.1 and up), but cron was never set up. As soon as we set up cron, a years' worth of customers suddenly get emails about their (long fulfilled) orders, and then proceed to freak out calling about why they are being "double charged" for a product they purchased a year ago.

What's happening is once that cron job goes live, it runs the core_email_queue_send_all function, cleaning out it's massive backlog of Magento emails, then it runs the core_email_queue_clean_up function to empty out the queue.

Is there any way to manually bypass the core_email_queue_send_all function and only run the core_email_queue_clean_up function so that our clients don't suddenly get a million angry phone calls from confused customers? We want all clients going forward to get the proper emails, but it doesn't make sense to email people who have already gotten their products.


texts: Change product image issue in Minicart Magento2

texts:
I am trying to change product image in minicart,

Used below code to achieve it.

here is the code of my di.xml file.

<type name="Magento\Checkout\CustomerData\AbstractItem">
 <plugin name="Change_Product_Image_In_Minicart" type="Vendor\Module\Plugin\Minicart\Image" sortOrder="1"/>
</type>

This code i used in my plugin file Image.php

 class Image
 {
    public function aroundGetItemData($subject, $proceed, $item){
     $result = $proceed($item);
     $productImage = "some image link";
     $result['product_image']['src'] = $productImage;
     return $result;
   }
 }

I am getting below erro once used above code,

  PHP Parse error:  syntax error, unexpected '\xc2\xa0\xc2\xa0public' (T_STRING), expecting function (T_FUNCTION),
  Anyone suggest what is mistake here please,
      }

I have fixed the issue myself, can anybody update me code for, how to change image for each item in the minicart, suppose if i have 5 items in cart, i need to change image for each of them, How can i apply for each here?


texts: How to resolve login fail 'Your currnt session has been expired.' into admin pape in Magento 2?

texts: Using Magento CE 2.2.0 with sample data. this error happen when i change time zone in 'bootstrap.php', i try to change it back in it still error.


texts: How to restore 'sort by position' option for category sorting

texts:
In our store the sort by position (ie 'Best Value') option is not being shown when viewing categories. I believe this was removed/hidden by someone in the past but now we want to show it again.

I have checked all the common areas for this and can't find where/how it has been removed. For instance, all categories have all the sort options selected under the "Available Product Listing Sort By" list - the 'Best Value' option is not deselected for any category:

Also, i've checked and app/design/frontend/our/theme/template/catalog/product/list/toolbar.phtml does not exclude the 'position' attribute. I tried echoing the output of $this->getAvailableOrders() in toolbar.phtml and the list does not include the position field so I assume that position is somehow being removed via code before the template is rendered.

How can I find where/how position is being removed from the product sort options?

We are running Magento 1.9.3.8 CE.


texts: If I run setup:upgrade its giving below error

texts:
I have uploaded new module and trying to upgrade its giving below error.
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TABLE 434 WHERE `Non_unique` = 1' at line 1, query was: SHOW INDEXES FROM TABLE 434 WHERE `Non_unique` = 1

Its coming while setup upgrade.
Please help me someone to fix this.


texts: Why is default Luma theme so slow (Time to interactive) on PageSpeed insight?

texts:
I had bad result on Google Pagespeed Insight on small Magento Websites, using default theme and modifying only little stuff, plus adding static content to homepages.

And Pagespeed Insight rating are bad, more on mobile.

So I installed an empty 2.2.8 shop (no categorie, no product) to try to find out what I was doing wrong.

I tested with GTMetrix and get an A (99%) on PageSpeed (so I guess it's not a configuration problem)

JS and CSS are minified, even HTML. I even installed a Varnish to be sure !

But PageSpeed Insight ratings are as bad as with modified Luma. (around 38-40)

https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Ftestmg2.g-softs.net%2F (the link might not be valid in time, it's just a test website)

So does anyone knows why default template got so bad ratings ?

Is there a way to improve it easily (I'm more of a backend than a frontend dev) ?

Do you know an ultra basic templates with good PageSpeed ratings ?

Thanks in advance !

JM

Edit : I just tried with a Magento 2.3.1. Same results.


texts: Custom module's template not rendering in frontend in magento 2

texts:
I am using magento 2.1.7 with default luma theme(fresh magento installation).

I am using a custom module which show call for price option on product details page and category page.

Module's installation and configuration done successfully, but module's template file not rendering in frontend (product page and category page).
Please suggest If there is any issue in layout rendering.

Here is my catalog_product_view.xml

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="Company_Modulename::css/font-awesome.min.css"/>
        <css src="Company_Modulename::css/fancybox/jquery.fancybox.css"/>
    </head>
    <body>
        <referenceBlock name="product.info.addtocart">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Company_Modulename::addtocart.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="product.info.addtocart.additional" >
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Company_Modulename::addtocart.phtml</argument>
            </action>
        </referenceBlock>
        <referenceContainer name="product.info.social">
            <block class="Magento\Catalog\Block\Product\View" name="product.info.modulename" template="Company_Modulename::modulename_form.phtml" after="product.info.mailto" />
        </referenceContainer>
    </body>
</page>

here is my module's addtocart.phtml template file path:-

app\code\Company\Modulename\view\frontend\templates\addtocart.phtml

Please let me know if required more to explain the issue.
Thanks in advance.


texts: Magento2 : getting 404 not found error after setup upgrade

texts:
My magento2.1 store (production mode) was working properly, but after run setup:upgrade commands frontend console showing 404 error for core js file.

I also executed static content deploy commands but still issue persist.

Please suggest how to resolve this?

EDIT

Console showing below errors :

And in system.log errors are :

main.CRITICAL: Directory "/public_html/pub/static/_requirejs/frontend/Smartwave/porto_child/en_US/secure" cannot be created Warning!mkdir(): Permission denied [] []
main.CRITICAL: Block requirejs-config throws exception and cannot be rendered. [] []


texts: How to separate discount in multi line in magento2?

texts: I want to apply multiple discount in separate line.Right now i have coupn code and sales rule applied in same cart what should i do so cart and checkout page display relevant discount in separate line in magento2.


texts: Shipping observer module breaks payment option

texts:
I made an observer module to limit the possible payment options for certain shipping methods. The most notable is to only allow cash payment with an in-store pickup. This is my Observer.php:

public function paymentMethodIsActive(Varien_Event_Observer $observer) {
    $event           = $observer->getEvent();
    $method          = $event->getMethodInstance();
    $result          = $event->getResult();
    $carriers        = Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingMethod();

    if ($carriers == 'storepickup' ){
        if($method->getCode() == 'storepayment'){ $result->isAvailable = true; } else { $result->isAvailable = false; }
    }

The modules config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <MyCompany_PaymentFilter>
            <version>0.0.1</version>
        </MyCompany_PaymentFilter>
    </modules>
    <frontend>
        <events>
            <payment_method_is_active>
                <observers>
                    <paymentfilter_payment_method_is_active>
                        <type>singleton</type>
                        <class>MyCompany_PaymentFilter_Model_Observer</class>
                        <method>paymentMethodIsActive</method>
                    </paymentfilter_payment_method_is_active>
                </observers>
            </payment_method_is_active>
        </events>
    </frontend>
</config>

The module itself works fine; it does only show the cash option when instore pickup is chosen. But it 'disables' the option. When I try to finish the checkout it throws the "The requested Payment Method is not available" error.

Whenever I remove the aforementioned if statement, the cash payment option is shown, available and works properly. If I put the if-statement back in the module, it is shown but not active. Why? How? Huh?


texts: Invalid method Magento\Eav\Model\Entity\Attribute::canBeFilterableInGrid when accesing customer_grid in the administration

texts:
This error is pretty strange, how come that when I try to access the customer grid all of the sudden it is throwing me this error?

Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid method Magento\Eav\Model\Entity\Attribute::canBeFilterableInGrid

I checked that class and the method does not exist.


texts: How to use an array for the field name in a UI component?

texts:
How do I set the name of a UI component field to use a nested array rather than just the name?

As an example, I want it to be:

<input name="something[field_name]"/>

Currently it is:

<input name="field_name"/>

I've seen the catalog module does this, but this seems to be via a block and not directly in the UI component, which is what I want to do!


texts: company name in place of first/last name for Business customer group?

texts:
How can i make the customer group Business request a Company Name instead of
First Name or Last Name. this way when signing up a company i can put in the company info since there wont be any first/last name. i then need the company name to be shown anywhere first/last name is usually shown (invoices, account area, ETC.)


texts: How to add additional shipping charge after table rate?

texts:
I'm using Magento default Table Rates - Weight v/s Destination.

Products will be volumetric/weight based. Example :- X meters/X kg.

After table rates is calculated.

If cart total weight/volume who ever exceeds up to X level, i have to add additional weight also then it's rate.

Can i achieve this using magento default functionality or need to do customization in shipping method?


texts: Product url displaying category-ID and product-ID

texts:
Few Product urls are displaying with category and product id but few products are working fine.

I want to keep all URL like: http://localhost/magento2/test-product not
like below http://localhost/magento2/catalog/product/view/id/1234/category/12/

My issue is same like link 1 and link 2 but its not sorting out. I tried mage2 solution but it also didnt help.

  This is specific for each category. Product-URLs of one category are
  working well but other category have issues. That means
  issue can be of category level not a product level.

Looking for solution.


texts: Add a button to custom settings form field

texts:
I'd like to add a button on the settings form of my plugin
Here the code for my input field in Vendor\App\etc\adminhtml\system.xml
<field id="api_key" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
    <label>Api Key</label>
</field>

any suggestions?


texts: Product slider issue in owl carousal in Magento 2.2

texts:
I am facing issue in owl carousal below one is the code, but it showing error,

<script>
            require([
                'jquery',
                'Mageplaza_Productslider/js/owl.carousel.min'
            ], function ($) {
                $('#mageplaza-product-slider-<?php echo $productsliderId;?>').owlCarousel(<?php echo ($block->getAllOptions())?>);
            });
    </script>

Uncaught TypeError: Cannot read property 'fn' of undefined
    at /pub/static/version1514191789/frontend/Magento/luma/en_US/Mageplaza_Productslider/js/owl.carousel.min.js:6
    at /pub/static/version1514191789/frontend/Magento/luma/en_US/Mageplaza_Productslider/js/owl.carousel.min.js:6
(index):890 Uncaught TypeError: $(...).owlCarousel is not a function
    at (index):890
    at Object.execCb (require.js:1650)
    at Module.check (require.js:866)
    at Module.<anonymous> (require.js:1113)
    at require.js:132
    at require.js:1156
    at each (require.js:57)
    at Module.emit (require.js:1155)
    at Module.check (require.js:917)
    at Module.enable (require.js:1143)


texts:
I have edit to html code in magento/app/locale/en_US/template/email/contact_form.html

but when i get email it gives row html.

code is as bellow in html

{{template config_path="design/email/header"}}
{{inlinecss file="email-inline.css"}}

Name:	{{var data.name}}

Email: 	{{var data.email}}

Telephone: 	{{var data.telephone}}

Comment: 	{{var data.comment}}

{{template config_path="design/email/footer"}}

any solution for this ?


texts: Getting error during magento 2 Installation

texts:
I am getting the error in Magento 2 installation.

** Error:**


texts: Added custom field to category and its not showing on frontend

texts:
I want to add a picture on top of category name in frontend.  I tried creating a custom field for the category and adding a picture that way. I can't see anything I type in the custom textarea. I tried flushing cache and reindexing data.

Atwix_CustomCategoryAttribute.xml

 <?xml version="1.0"?>
    <config>
        <modules>
            <Atwix_CustomCategoryAttribute>
                <active>true</active>
                <codePool>local</codePool>
            </Atwix_CustomCategoryAttribute>
        </modules>
    </config>

config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Atwix_CustomCategoryAttribute>
            <version>0.0.1</version>
        </Atwix_CustomCategoryAttribute>
    </modules>

    <global>
        <resources>
            <add_category_attribute>
                <setup>
                    <module>Atwix_CustomCategoryAttribute</module>
                    <class>Mage_Catalog_Model_Resource_Setup</class>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </add_category_attribute>
            <add_category_attribute_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </add_category_attribute_write>
            <add_category_attribute_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </add_category_attribute_read>
        </resources>
    </global>
</config>

mysql4-install-0.0.1.php

<?php
$this->startSetup();
$this->addAttribute(Mage_Catalog_Model_Category::ENTITY, 'custom_attribute', array(
    'group'         => 'General Information',
    'input'         => 'textarea',
    'type'          => 'text',
    'label'         => 'Custom attribute',
    'backend'       => '',
    'visible'       => true,
    'required'      => false,
    'visible_on_front' => true,
    'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
));

$this->endSetup();


texts:
Using the base URL variable {{config path="web/unsecure/base_url"}} on advanced search page (url/catalogsearch/advanced?) seems to display different results based on whether the variable is used before or after the form (at least that is where I guess the change happens).
At the top of the page it displays url as:
url/pagename
Whereas after the form it displays:
url/catalogsearch/pagename
Is there a way round this that would still allow the use of variables to display urls?


texts: What is the difference between RMA and RMA authorization?

texts: I know what is RMA and what does it stand for but I don't know whats the difference between RMA and RMA authorization. Searched on Google as well as Magento Knowledge Base but did not find anything that I was looking for. To be specific it's available under Sales Email->RMA and Sales Email->RMA Authorization in Magento Enterprise Edition.


texts:
I have installed SMTP Pro extension in my site. I am using Gmail server to send mails. On doing Run test, I am getting the following error message.

SMTP Pro Self Test Results
Sending test email to your contact form address: XXXXXX.com from: XXXX.com. Unable to send test email.
Exception message was: Unable to connect via TLS
Please check the user guide for frequent error messages and their solutions.
Default templates exist.Email communications are enabled.

My site uses PHP version 5.6. Openssl is also enabled.

I am facing this error after installing SSL for the site.

Please share your thoughts.


texts: How to pass data in Data layer in magento 2.1 - Google tag Manager / Analytics

texts:
I've created google analytics and Google tag manager account to find out all event of product like Add to Cart, Remove Cart, Checkout, Product click, Checkout, Product impression in Google Analytics.

I've created tag and Trgger for that but its not reflecting in Google anaytics.

First i want to display data layer in front end with all products details.

Please tell me how to pass data in data layer.

So i have to put code in core file to get product id, name, price, etc. and pass variable on datapush script as mentioned on this URL.

Or Magento have default functionality for this.
only paste the script on header file? to get datalayer in frontend with details


texts: Observing REST API requests from 3rd party

texts:
I would like to know if there are any API events that are fired when a third party API sends a request to Magento?

For example, if a 3rd party makes a call to salesOrderShipmentCreate() method app/code/core/Mage/Sales/etc/wsdl.xml would my observer still fire if it were listening for sales_order_shipment_save_after ?

I would appreciate if anyone knows if this approach would still work, if not which event should I listen for when API calls made to Magento from a third party...


texts: Shopping Cart Price Rule where the discount given changes according to the shopping cart total

texts:
Is there any way in Magento 1.9.x to set up a shopping cart rule that does the following:

Shopping Cart Total > £1000
Discount = 5%

Shopping Cart Total <= £1000
Discount = 10%

This way we can give out the same voucher code to lots of clients, and give them a discount that doesn't get too big when the shopping cart total is over a thousand pounds?


texts:
I have installed an extension for testimonial by V Group Inc. after the installation when i tried to add testimonies, the extension was giving me this error

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.vgroup_testimonial' doesn't exist, query was: DESCRIBE `vgroup_testimonial`

screenshot

please help

link of the extension

https://marketplace.magento.com/vgroup65-testimonial.html


texts: Magento 1.9.3.8: How many cache records can the default zend_cache handle?

texts:
I recently checked my cache size in Magento 1.9.3.8 and noticed a high number of cache records. I decided to completely flush the cache storage to monitor the cache.

After 24hrs the cache has about 4500 records and a size of 206M
After 48hrs the cache has about 6500 records and a size of 332M

I guess the size of the cache will now grow slower as time goes on but I'm still wondering how many records the default zend_cache of M1 can handle.

I have about 5000 products with 1 store view. Are the records/size normal for this kind of shop?

Thank you


texts:
I am trying to make the purchase order optional at checkout but it is not working. I tried editing the file:

/vendor/magento/module-offline-payments/view/frontend/web/template/payment/purchaseorder-form.html

Any change I make to this file is not reflected on the frontend. I also tried to override it with my template

/app/design/frontend/Infortis/base/Magento_OfflinePayments/view/frontend/web/template/payment

What am I doing wrong?


texts: Is shop by brand a standard feature on Magento 2?

texts:
So layered navigation is a standard feature and it has brands in. What about a page within a category that lets you shop by brand of that category.

I feel like this is very similar to the layered navigation page.

However is there a standard magento way of creating a page within a category that you can shop by brand?


texts: Magento 2 What is the path component after rest /rest//V1/...?

texts:
I have a multi-store setup, each store view has its own domain, and I just noticed on order-place Magento calls this API

https://example.com/rest/wholesale/V1/carts/mine/payment-information

and I was just wondering where that gets parsed and what does it specify.

I've already went thru \Magento\Webapi\Controller\Rest and resolver
and couldn't find it.


texts: Magento Custom Product Page Design and Custom Options

texts:
I'm working on a turning some static HTML into a Magento template / theme, but I'm having some problems figuring out the best way to do things in Magento.

The product page design we have is quite different to the default layout in Magento, so my first thought was to make a custom layout for the product page and apply that as the default for all products. At first this approach seemed like a good one, however it's very quickly showing its limitations.

I'm trying to get the custom options for a product, but it's just returning null even though there are custom options, etc.

I was wondering if there was a better way of adding a custom product page, or a better of of approaching the problem. Maybe there is a way of inheriting some XML so that I can access the pre-made code for getting custom options etc?

Here is the code for my custom layout, it's just a basic custom layout XML:

app/etc/modules/Product_Page.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Product_Page>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Page />
            </depends>
           </Product_Page>
    </modules>
</config>

app/code/local/Product/Page/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Product_Page>
            <version>0.0.1</version>
        </Product_Page>
    </modules>
    <global>
        <page>
            <layouts>
                <productpage module="page" translate="label">
                    Product
                    <template>page/html/product.phtml</template>
                    <layout_handle>product_page</layout_handle>
                </productpage>
            </layouts>
        </page>
    </global>
    <frontend>
        <layout>
            <updates>
                <product_page>
                    <file>product_page.xml</file>
                </product_page>
            </updates>
        </layout>
    </frontend>
</config>

app/design/frontend/{template}/default/layout/product_page.xml

<?xml version="1.0"?>
<layout>
    <product_page translate="label">
        Product
        <reference name="root">
            <action method="setTemplate">
                <template>page/product.phtml</template>
            </action>
            <action method="setIsHandle">
                <applied>1</applied>
            </action>
        </reference>
    </product_page>
</layout>

I will try and provide any extra information you might want as fast as possible.

Thanks!


texts: Magento2 : How to add attribute options values into dropdown attribute programmatically

texts: Need way to add options to already created Color attribute.


texts: Can't edit products after update to 2.1.4

texts:
I updated Magento to 2.1.4.

Now, there are extension dependency issues when I tried to update the extensions. The more important issue is that I can't edit any products. The products are still on the front end of my website. They are also still displayed on the product grid on the back end, however, when I click them to edit, I get a black page with the product name on it. See the photo below:

I get the same black screen for blocks and CMS pages.

Any help is greatly appreciated.


texts: Magento 2.0 - Difference between migrated product and normal product

texts:
I migrated the products data from Magento 1.9 to 2.0.  Just noticed there is a difference in the way how products are created.  See the images below.

Edit page of a migrated product

Edit page of a normal product

You can see the difference.  For example, the first screen shows 'Migration_General' but the second screen shows 'Product Details'...

I don't find any error. The migrated products are displayed as usual.  But why the admin view showing the difference?

Update :
There are 3 product attribute set found and the migrated products refer to a different attribute set and the new product refer to the default attribute.


texts: Magento configurable product dependent attribute

texts:
Currently I am working on a  project where there is requirement of the associate product dependency.
E.g : If have an computer and have associated product  brand X,Y,Z and and RAM of brand X,Y,Z
If I select brand X than the RAM should only show from BRAND X. I am not looking for an exact code for
it, just an approach how can it be achieved,if it is. Thank you for the help in advance.


texts: My upgrade code won't work - what I'm doing wrong?

texts:
Updated Config

in my config I have now (and it seems to see the script but then once I run it it gives me only a echo "Creating new column ......" then stop and does nothing):

<?xml version="1.0"?>
<config>
<modules>
    <EDPA_Adpan>
        <version>0.0.1</version>
    </EDPA_Adpan>
</modules>
<global>
    <blocks>
        <edpa_adpan>
            <class>EDPA_Adpan_Block</class>
        </edpa_adpan>
    </blocks>
    <helpers>
        <edpa_adpan>
            <class>EDPA_Adpan_Helper</class>
        </edpa_adpan>
    </helpers>
    <resources>
        <adpan_setup>
            <setup>
                <module>EDPA_Adpan</module>
                <class>Mage_Core_Model_Resource_Setup</class>
            </setup>
        </adpan_setup>
    </resources>
</global>
<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <EDPA_Adpan before="Mage_Adminhtml">EDPA_Adpan_Adminhtml</EDPA_Adpan>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>
<adminhtml>
    <layout>
        <updates>
            <edpa_adpan>
                <file>edpa/adpan.xml</file>
            </edpa_adpan>
        </updates>
    </layout>
</adminhtml>

then in mysql4-upgrade-0.0.4-0.0.5

echo 'Creating new column ......';
/* @var $this Mage_Eav_Model_Entity_Setup */
// Add an extra column to the eav/catalog_products table:
$installer = $this;
$connection = $installer->getConnection();
$installer->startSetup();
$installer->getConnection()->addColumn($installer-
getTable('eav/catalog_product_entity '),
'lo',
array(
    'type' => Varien_Db_Ddl_Table::TYPE_VARCHAR,
    'nullable' => false,
    'default' => '0',
    'comment' => 'Price reduction lo level (%)'
));
$installer->getConnection()
->addColumn($installer->getTable('eav/catalog_product_entity '),
'hi',
array(
    'type' => Varien_Db_Ddl_Table::TYPE_VARCHAR,
    'nullable' => false,
    'default' => '100',
    'comment' => 'Price reduction hi level (%)'
));$installer->endSetup();

expecting it will stop because there is die(); in a code but it doesn't
It also updating record in core_resource to the new version but table is not altered, can anyone explain me why ? or maybe the table name is wrong ?
These new columns should appear in catalog_products_entity.
I managed to remove all the errors but it still won't create additional columns in database.


texts: how to make top level menu item not active?

texts:
I have created 2 drop down categories in the menu bar each having some sub menus

Is it possible somehow to set it in a way that a visitor can click it but it won't do anything other than show the dropdown so users must select one of the subcategories to see the products.


texts: Payment methods based on billing region?

texts:
What I need to do is to display different payment methods based on billing regions. Magento has built in the option to display different payment methods based on the country. So my question is this can be made to display different methods of payment depending on the region of the country. For example, if I have country x with payment methods pay1 pay2 pay3, for the region y of this country I want to be only pay1 and pay2.

It would be better if I didn't modify any core files.


texts: Dynamically hide mutiselect for different actions

texts:
In Magento 2, I have 2 actions in my controller: newAction() and edit().

Both actions will use for a same form with few inputs. Among them is multiselect for store selection. I want to show it when I creating the brand, and hide it while editing the brand. Form realised as ui-component and coded in XML.

How can I do this?

Thank you very much!


texts: How to add 301 redirection rule magento2?

texts:
How to add 301 redirections for the base URL in Magento 2.1 via .htaccess.

http://www.example.com/

http://www.example.com

http://example.com

http://example.com/

https://example.com

http://example.com

https://www.example.com/

I want to all these url versions 301 redirected to https://www.example.com


texts: Magento Search Not Working with One Word

texts:
Wondering if someone could help with this...

TL;DR: Is it possible to duplicate a searched query in Magento php files without the user knowing. E.g. Searching 'Adidas' actually searches 'Adidas Adidas' but only shows as 'Adidas' to the user.

Ok, so I know the Magento CE search isn't great and needs a little help, but one thing I can't get working is a search with one word.

It's really bizarre. I'm using the 'like' search. I've changed the necessary code from 'OR' to 'AND' which helped a bit but I can't seem to show any results if I type a brand name such as 'Adidas'.

However, if I type 'Adidas Adidas' all the relevant products show up.

So I'm curious, is it possible to change some code so it duplicates the word being search for, without the user knowing that the word has been duplicated?

And please ask if none of that makes sense, I've just tried to give as much info as possible.


texts: How to install Magento security patch for Enterprise Edition (Commerce)?

texts:
How can I get Magento patches for Enterprise Edition (now Magento Commerce), I have followed:

http://devdocs.magento.com/guides/m1x/other/ht_install-patches.html#get-ee

but not getting the exact path. I want to install patch SUPEE-10415.


texts: how to add additional images to a product in magento?

texts: Can anyone please let me know how to add additional images to a product. I already have an image with Small Image, Base Image, Thumbnail radio boxes selected and I want to upload another or additional image for that product without selecting all the 3 radio buttons. Thanks


texts: Magento Custom report module remove blank records

texts:
I have created custom report module using  below link

http://magentotutorial.org/how-to-create-magento-custom-reports/

It is working  but whenever filter by date it show some empty rows and some result rows but, I want to remove empty rows.


texts: Remove other shipping methods from cart if free shipping is available?

texts:
IF the cart has items with a value > $100, the customer gets free shipping. I removed all other shipping methods from the checktou by following http://projectamplify.com/insight/remove-magento-shipping-methods-if-free-shipping-available/.

There it says, it will also work for the cart, but it is not. THe cart still shows the wrong shipping (the one for carts < $100).

How can I change that so that I see free shipping in cart, too if value > $100?

Thanks!


texts: Why `code` folder is missing under `app` folder in magento 2 stable version?

texts:
I have downloaded Magento 2 stable from https://www.magentocommerce.com/download with sample data and installed.

It's working fine in both areas i.e. frontend & backend.

But I could not find app/code folder.

Similar module folders are found under vendor\magento.

Has the folder structure changed in Magento 2 again?
Where we can put our custom module folder?


texts: After n98-magerun.phar extension:search Mage in root catalog i see nothing. What else could I do?


texts: Address Information And Customer address are not showing in magento 2

texts:
I have upgrade m2.2.1 to m2.2.5 but address template or customer address are not working

This is not only in order view, but also everywhere that displayed the customer address by the template and calling the \Magento\Customer\Block\Address\Book::getAddressHtml() method.
For example, in the Customer Address Book:

a show like this template

  {{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend
  middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend
  suffix}} {{var suffix}}{{/depend}}{{depend firstname}} {{/depend}}
  {{depend company}}{{var company}} {{/depend}} {{if street1}}{{var
  street1}} {{/if}} {{depend street2}}{{var street2}} {{/depend}}
  {{depend street3}}{{var street3}} {{/depend}} {{depend street4}}{{var
  street4}} {{/depend}} {{if city}}{{var city}}, {{/if}}{{if
  region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}
  {{var country}} {{depend telephone}}T: {{var telephone}}{{/depend}}
  {{depend fax}} F: {{var fax}}{{/depend}} {{depend vat_id}} VAT: {{var
  vat_id}}{{/depend}}

Order informtion admin

Customer informtion admin

Customer informtion frontend


texts: Find value in comma separated string column through query

texts:
I have a field inside a table that contains a string made of the country codes:IT,GB,US,DU,... and I need to check if the customer's country (GB,IT,..) is inside this string.

I know I can use CHARINDEX() in SQL to accomplish this result or retrieve the string, convert it in an array and then check with in_array, but I wonder if there is a way (and if it is better) to do this task during the query.

This is my current code:

Mage::getModel('razorphyn_country/product')->getCollection()
    ->addFieldToFilter('active', 1);
    ->addFieldToFilter('productId', $productId);

And country is the field that contains the string


texts: after everyday my database backup size increasing 2mb/day

texts: When I live my magento store site the database size was 2.xx MB  after one week when i take my database backup its size increase up-to 8.xx MB and browsing speed also reduced please any one tell me that why Database size is increasing automatically while i am not adding any new products in it and how to reduce it size to minimum


texts: Custom Attribute Tab in Magento2 Easy Tabs

texts:
In Magento1 in the static block:

 {{block type="core/template"
 template="catalog/product/product_technology.phtml"}}

And then in the product_technology.phtml file:

<?php
    $_helper = $this->helper('catalog/output');
    $_prodID = Mage::registry('current_product')->getId();  $_product = Mage::getModel('catalog/product')->load($_prodID );

    $attributeSetModel = Mage::getModel('eav/entity_attribute_set');    $attributeSetModel->load($_product->getAttributeSetId());   $attributeSetName  = $attributeSetModel->getAttributeSetName();

?>

            <col width="25%" />
            <col />

             <?php if (0 == strcmp($attributeSetName, 'Clothing')): ?>

                    Clothing Shape
                    <?php echo $_product->getClothing_shape() ?>

                    Outer Fabric
                    <?php echo $_product->getOuter_fabric() ?>

                    Clothing Lining
                    <?php echo $_product->getClothing_lining() ?>

               <?php elseif (0 == strcmp($attributeSetName, 'Sleeping Bags')): ?>

                    Outer Fabric
                    <?php echo $_product->getOuter_fabric() ?>

                    Inner Fabric
                    <?php echo $_product->getInner_fabric() ?>

                    Filling
                    <?php echo $_product->getFilling() ?>

               <?php endif; ?>

In Magento2 in the static block:

 {{block class="Magento\Framework\View\Element\Template" name="product_technology_file" template="Magento_Catalog::product/view/product_technology.phtml.phtml"}}

And then in the product_technology.phtml file: ???

the Mage registry is deprecated in Magento2


texts:
I need to change the response of Search Rest API in Magento 2.

Request:rest/V1/search?searchCriteria[requestName]=quick_search_container
&searchCriteria[filterGroups][0][filters][0][field]=search_term
&searchCriteria[filterGroups][0][filters][0][value]=t-shirt
&searchCriteria[filterGroups][1][filters][1][field]=sleeve_type
&searchCriteria[filterGroups][1][filters][1][value]=173
&searchCriteria[filterGroups][2][filters][2][field]=neck
&searchCriteria[filterGroups][2][filters][2][value]=105

Response:

"items": [
    {
        "id": 154,
        "custom_attributes": [
            {
                "attribute_code": "score",
                "value": "45.5335884094238300"
            }
        ]
    }
]

need to add more product information like product name, sku, type, images etc..,

"items": [

    {
        "id": 154,
        "sku": "sample001",
        "name": "sample product 1",
        "type": "configurable",
        "image_url": "http://magentohost/pub/media/catalog/product/s/s/1.png",
        "custom_attributes": [
            {
                "attribute_code": "score",
                "value": "45.5335884094238300"
            }
        ]
    }
]

but response have id and score only. How to add product information to search api response?


texts: How to get current category id while placing product order in Magento's admin section

texts:
I want to get current category id while placing order.
I have tried code as below,

$layer = Mage::getSingleton('catalog/layer');
$Category = $layer->getCurrentCategory();
$currentCatId= $Category ->getId();

It is giving empty value.


texts: Magento 2 : How can I reset the Data Migration Tool?

texts:
I've inherited a mid-migration project from another dev, and need to start the data migration from scratch. It seems like it has been run before, and the M2 tables for product, customer, and order data have been truncated.

I've tried data and delta modes with and without reset, dropping the m2_cl tables from M1, and even importing the correct product, customer, and order info into those tables, but I keep getting the same vague warning when I run the migration:

  [WARNING]: Mismatch of entities in the document: sales_order_grid Source: 17857 Destination: 0

Any ideas?


texts: Error: Unable to upload application to Magento Cloud

texts:
When I try to push a new code to my Magento Cloud instance I get this error below, it doesn't matter which version, even a version that worked previously.

How could I find the issues?


texts: multiple websites on magento 2 with the same title on google

texts:
I have an issue on my multiple websites magento 2 : I have different domain each one has its own theme,default page..., but on google seach the both websites show the same title( the title of cms page of the first website)
Help


texts:
I had some issues with my local dev version of my Magento 1 website so I copied all the files from the live site to my local and broke it :-/

I'm now getting database access errors as below:
Can anyone help out please?
'myusername' is in place of my real username
'mywebsite' is in place of my real website name

SQLSTATE[HY000] [1045] Access denied for user 'myusername'@'localhost' (using password: YES)

 1. C:\xampp\htdocs\magento\lib\Zend\Db\Adapter\Pdo\Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
 2.  C:\xampp\htdocs\magento\lib\Varien\Db\Adapter\Pdo\Mysql.php(396): Zend_Db_Adapter_Pdo_Mysql->_connect()
 3. C:\xampp\htdocs\magento\lib\Zend\Db\Adapter\Abstract.php(460): Varien_Db_Adapter_Pdo_Mysql->_connect()
 4. C:\xampp\htdocs\magento\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
\xampp\htdocs\magento\lib\Varien\Db\Adapter\Pdo\Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
 5. C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Resource.php(179): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
 6. C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
 7. C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
 8. C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
 9. C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getWriteAdapter()
 10. C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Resource\Cache.php(53): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter()
 11. C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Cache.php(478): Mage_Core_Model_Resource_Cache->getAllOptions()
 12. C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Cache.php(520): Mage_Core_Model_Cache->_initOptions()
 13. C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\App.php(1202): Mage_Core_Model_Cache->canUse('config')
 14. C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Config.php(417): Mage_Core_Model_App->useCache('config')
 15. C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Config.php(297): Mage_Core_Model_Config->_canUseCacheForInit()
 16. C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\App.php(424): Mage_Core_Model_Config->loadModulesCache()
 17. C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Model_App->_initModules()
 18. C:\xampp\htdocs\magento\app\Mage.php(684): Mage_Core_Model_App->run(Array)
 19. C:\xampp\htdocs\magento\index.php(90): Mage::run('mywebsite', 'website')
 20. {main}


texts: Interpreting profiler results on a slow page

texts:
I'm still having major problems with configurable products and page load speeds. I have a configurable product with 530 associated products, each with around 4 custom options.

I'm also using SCP, but I don't think this either responsible or helping my load times, so am currently kinda ignoring it.

I have run the page profiler and this particular product takes 9.9 seconds to load, and the biggest (if I'm interpreting it correctly?) culprits are below:

__EAV_COLLECTION_LOAD_ATTR__ - 3.9239
CONFIGURABLE:Mage_Catalog_Model_Product_Type_Configurable::getConfigurableAttributes - 4.8121
TTT2:Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection::_afterLoad - 4.5175
CONFIGURABLE:OrganicInternet_SimpleConfigurableProducts_Catalog_Model_Product_Type_Configurable::getUsedProducts - 4.5157

It seems the problem is "Magento" rather than the additional module as most of the time taken is on core Magento methods, if I'm right. As such is this just a limitation of configurable products? i.e. for a highly variable product, it's wise to keep to only a few associated products (which kinda defeats the object and is actually extremely limiting). All of my products are highly configurable, hence the choice, however I didn't realise it was so slow.

Is this a configuration issue, or a hardware issue, or will I just have to rethink the whole situation. Even if I upgraded hardware presumably it may speed up slightly but wouldn't be scalable and should that product ever increase in it's configurability the same "bottleneck" would be reached.

Is it the custom options attached to the product causing the issue and as such the actual configurable part is fine, it's just once you start loading up options?

And to finish, if you were tasked with creating a store where, for example, a "Candle" could have 1000 different permutations, i.e. colour, size, shape etc, and still maintain a scalable fast solution?

Any thoughts and ideas are appreciated on this as I initially posted a while back and was a bit vague, but have since done a bit of profiling and believe I've located (some) of the problem, just how to fix going forward.


texts:
I have code like below in my html file

        <form class="form form-discount" id="comment-form">

                        <textarea class="input-text" id="comment-code" name="comment-code" rows="2" maxlength="200" data-bind="attr:{placeholder: $t('Enter comment')} " ></textarea>

        </form>

Which opens tab on clicking the Customer Note text, how to open the tab on page load itself. please anybody suggest me.


texts: Magento 1.9.1 - Element with id "bureauid" already exists

texts:
When I go in the section Customer > Manage customers > Click on a customer, this error :

Element with id "bureauid" already exists

This error since I installed magento 1.8 to 1.9.1.


texts: How to resolve session issue with cms in magento?

texts:
I have created one CMS page for showing coupon code information in Magento. It was successfully created.

But when I open that CMS page, it will be opened another user account’s coupon information. But other links are working correct.

In the url(http://www.example.in/coupon/), if I put "/" at the end its working correct from the account def@gmail.com.
When I open that link from the account “abc@gmail.com” that CMS page open with the "def@gmail.com" account's information.
But if I remove that "/" at the end, its working correct from the account "abc@gmail.com". When I open that link from the account “def@gmail.com” that CMS page open with the "abc@gmail.com" account's information.

I don’t know, why it’s come like this.

Please help me.


texts: Magento Bundle 'As Low As' Price - I need to add tax

texts:
All prices are in the database excluding tax, but are shown including tax. A bundle product detail page shows the price correctly. (lets call it £120). However, the preview of the product you click on to get to the detail page, the price is shown as 'as low as £100' - i.e. it excludes the product tax of 20%.

Can somebody tell me how to correct this, what files to edit and what code?

My Magento website is version 1.9. Confident in and around FTP and the Magento file system, but have been trying forever to get this to work.


texts: Unable to enable modules Cannot enable Magento_Paypal because it depends on disabled modules:

texts:
I am getting this error while installing Magento 2.3.0.

  Unable to enable modules because of the following constraints: Cannot
  enable Magento_Paypal because it depends on disabled modules: Unable
  to enable modules because of the following constraints: Cannot enable
  Magento_Braintree because it depends on disabled modules:
  Magento_InstantPurchase: Magento_Braintree->Magento_InstantPurchase

  Magento_InstantPurchase: Magento_Paypal->Magento_InstantPurchase
  Cannot enable Magento_Sitemap because it depends on disabled modules:
  Magento_Robots: Magento_Sitemap->Magento_Robots

I googled for this error but nothing helpful found.Please help me to fix this error. Or let me know what I am doing wrong.


texts: Layout of module for Admin is not loaded

texts:
my config.xml is

<?xml version="1.0"?>
  <config>
   <modules>
        <Octane_SMTP>
            <version>1.0.0</version>
        </Octane_SMTP>
   </modules>
    <frontend>
     .............
    </frontend>
    <admin>
     <routers>
         <SMTP>
            <use>admin</use>
            <args>
               <module>Octane_SMTP</module>
               <frontName>adminSMTP</frontName>
            </args>
        </SMTP>
    </routers>
 </admin>
 <adminhtml>
   <layout>
      <updates>
          <SMTP>
              <file>SMTP.xml</file>
          </SMTP>
      </updates>
   </layout>
   <menu>
      <SMTP translate="title" module="Adminhtml">
         <title>My plugins</title>
         <sort_order>100</sort_order>
         <children>
             <set_time>
                   <title>Address book</title>
                   <action>adminSMTP/adminhtml_index</action>
              </set_time>
          </children>
       </SMTP>
    </menu>
</adminhtml>
   <global>
     <blocks>
         <SMTP>
              <class>Octane_SMTP_Block</class>
         </SMTP>
      </blocks>
         <helpers>
              <SMTP>
                   <class>Octane_SMTP_Helper</class>
              </SMTP>
         </helpers>
<models>
 ..........

</global>
</config>

my layout file SMTP.xml which is located at app/design/adminhtml/default/default/layout

and controller file which is located at

app/code/local/Octane/SMTP/controllers/Adminhtml

class Octane_SMTP_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
    {
    public function indexAction()
          {
             echo"show something plz.....";
             $this->loadlayout();
             //$this->renderLayout();
          }
    }


texts: Magento 2: How do I join sales_order_grid table to sales_order_item table?

texts:
select *  from sales_order_item t1
inner join quote_item t2 on t1.quote_item_id=t2.item_id
inner join sales_order_grid t3 on t1.order_id=t3.entity_id

I am trying to pull a report along with each items price and that's what I got but it seems like it isn't the correct join table.

Can anyone help me with getting a correct table join?


texts: how to get ProductUrl at backend , in magento2?

texts:
I wan to get productUrl at backend side.

I am trying it by productrepository. I am getting right url at custom controller.

But when I'm trying it in import module's start controller I'm getting admin extra.

Like:

expected: www.example.com/catalog/product/view/id/9450/s/testProduct

Actualresult: www.example.com/adminBoard/catalog/product/view/id/9450/s/testProduct

I have already refer How to get product's frontend url from backend?

but not reached at solution.


texts:
I am developing an app and I want to login in magento using the Rest Api.
I can get tokens but when I go to http://myhost.com/magento/oauth/authorize/ shows a login page where the customer have to instroduce their credentials. Is there a way to send username / password avoiding the login page?


texts: How to add NOINDEX NOFOLLOW in product page for magento 2

texts:
I need to change my meta tag to NOINDEX and NOFOLLOW for particular page (especially in product detail page) in magento 2. I have tried adding

<head>
    <meta name="robots" content="NOINDEX,NOFOLLOW"/>
</head>

and also

<reference name="head">
    <action method="setRobots"><value>NOINDEX,NOFOLLOW</value></action>
 </reference>

In layout update xml but not changing from default how to fix the issue.

P.S.:I need to update via magento 2 backend.


texts: How to show Bar Navigation Menu Magento 2 Blank Theme

texts:
I'm new to Magento and currently working on setting up a version 2.0 shop.

However, I don't see to be able to activate/make the navigation menu bar to show in the Blank theme.

Does anyone know how to do that?

Thanks!


texts: How to add common logic to all module controller actions?

texts:
I have module with license based.I have to check license is valid or not in my all controllers.

Now Actually i'm placing my logic in each action.

Is there any better way to check logic & redirect to different page if license is not valid.


texts: How to add Backorder in Customer account dashboard in magento 2.1?

texts:
I want to display backorder if any sku have backorder list.
See below screenshot:
For ITP7 SKU :
ordered :1
shipped : 1
backordered : 0

For ITP1 SKU :
ordered :1
shipped : 0
backordered : 1


texts: How get all the attributes on product detail by product id with EXTERNAL SCRIPT PHP?

texts:
How get all the attributes on product detail by product id with PHP JSON ?
i am implement for my magento android, Thanks


texts: Rebuild cache (varnish/redis) after clearing?

texts:
I have my shops set up with Varnish and Redis, that all works great. It's fast, responsive. But after clearing the caches (i.e. after updating repositories and what not), every first load of every page is slow. The second time I open that page, it's lightning fast again.
Of course, this is because the cache has been updated after visiting that page. Is it possible to rebuild the cache for all pages on my shop, without manually clicking every product or relying on visitors to open all the pages?
I'm thinking maybe something as a crawler that requests every page in the sitemap or something. I can't seem to find anything about this online. Does anyone have any ideas?


texts:
I am facing an error while running command di:compile
This is my block file
<?php

namespace Company\Module\Block;

class Booking extends \Magento\Framework\View\Element\Template
{
    /**
     * Construct
     *
     * @param \Magento\Framework\View\Element\Template\Context $context
     * @param array $data
     */
    public function __construct(
        \Magento\Framework\View\Element\Template $context,
        array $data = []
    )
    {
        parent::__construct($context, $data);
       }

    /**
     * Get form action URL for POST booking request
     *
     * @return string
     */
    public function getFormAction()
    {

        return '/companymodule/index/booking';
    }
}

below is the error i am getting. can someone help me to figure things out
Company\Module\Block\Booking
                Incompatible argument type: Required type: \Magento\Framework\View\Element\Template\Context. Actual type: \Magento\Framework\View\Element\Template; File:


texts:
I have changed Base url in Magento 2.1, but it does not works.

While installing I have set base url to www.domain1.net. I need to change it to www.domain2.net.

What I tried:

Update baseurl in core_config_data:

UPDATE core_config_data
SET value = 'http://www.domain2.net/'
WHERE path IN ('web/secure/base_url', 'web/unsecure/base_url');

Replace design/head/includes/

UPDATE core_config_data
SET value = REPLACE(value, 'http://www.domain1.net/', 'http://www.domain2.net/')
WHERE path = 'design/head/includes';

Then changed Store Url

 php bin/magento setup:store-config:set --base-url="http://www.domain2.net/"

 php bin/magento setup:store-config:set --base-url-secure="https://www.domain2.net/"

Finally cleared the cache:

php bin/magento cache:flush

After serach www.domain2.net it throw server not found.

Reference:

https://mage2.pro/t/topic/22
http://blog.netgloo.com/2016/05/13/magento-2-change-base-url-using-the-command-line/

What is it the right way to change Base url in magento 2.1?


texts:
I'd like to add the sales guest form to a cms page?  This is the form you find at yourdomain.com//sales/guest/form/ it's template is app/design/frontend/base/default/template/sales/guest/form.phtml

I've tried using this method which outlines how to do it for the Magento contacts form but am not sure how to re-work this method for the sales/guest/form, I think my action attribute is wrong.

This is what I have

<!– Order Search Form –>
{{block type="core/template" name="orderSearchForm" form_action="/sales/guest/view" template="sales/guest/form.phtml"}}
<!– Order Search Form –>

This displays the form on the page but when I submit it, it just reloads the page rather than find the order at ourdomain.com/sales/guest/view/


texts: admin grid action column caption show original data

texts:
I want to show the caption as database return value

    $this->addColumn('quota_item_id', array(
        'header'    => $helper->__('quota_item_id@sales_flat_quota_item'),
        'align'     =>'left',
        'width'     => '20%',
        'index'     => 'quota_item_id',
        'type'      => 'action',
        'getter'    => 'getQuota_item_id',
        'actions'   => array(
            array(
                'caption'   => $this->getQuota_item_id(),
                'url'       => array('base'=> '*/*/edit'),
                'field'     => 'id',
                'onclick' => "return popitup('".$this->getUrl('*/*/edit', array('id' => $this->getQuota_item_id()))."')"
            )
        ),
    ));

'caption'   => $this->getQuota_item_id(), Shows nothing, anyone know how to fix it?


texts: How to get the current category filter in the catalog collection..?

texts:
<?php
$_category = $this->getCurrentCategory(); $_categoryCollection = Mage::getResourceModel('catalog/category_collection')
                 ->addCategoryFilter($_category)
                 ->addAttributeToSelect('*')
                 ->addAttributeToSelect('is_brand','yes')
                 ->addAttributeToFilter('level','5')
                 ->addIsActiveFilter();
foreach($_categoryCollection as $cat){?>
<ui>
<?php //display current_Category image
     if($cat->getImageUrl()): ?>
      <img src="<?php echo $cat->getImageUrl(); ?>" />
<?php endif; ?>
     <a href="<?php echo $cat->getUrl(); ?>">
<?php //display current_Category image
     echo $cat->getName(); ?>

<?php
        }
        ?>

I want to display categories which have the value "yes" for the category attribute "is_brand". and i want it to be fetched from the current category. I could not access getCurrentCategory() inside catalog/category_collection..

      i need only to fetch the category collection of level 5 only in the current category.
      THE ABOVE CODE FETCHES COLLECTIONS WITH LEVEL 5 FROM ALL CATEGORIES.


texts:
I've installed the Bitnami Certified Magento on GCP. How do you disable the bitnami banner that appears in the bottom right hand of the home page? The instructions referenced on the page from the banner is to run:

sudo /opt/bitnami/apps/APPNAME/bnconfig --disable_banner 1

The result is:

sudo: /opt/bitnami/apps/magento/bnconfig: command not found


texts:
I cannot export order list from Magento backend. When I am trying to do it, I am getting below error.

It would be appreciable if someone can help to resolve this problem.


texts:
php bin/magento indexer:status

When I add a new catalog price rule from admin. The offer price could not be reflected in the front-end. then I check the indexing options. all indexing are UPDATE ON SHEDULE. How can i get the updated price on frond-end with out reindexing?

I have checked the indexer:status shown below. Please check and help me.

+----------------------------------------------------+--------+-----------+---------------------+---------------------+
| Title                                              | Status | Update On | Schedule Status     | Schedule Updated    |
+----------------------------------------------------+--------+-----------+---------------------+---------------------+
| Amasty Product Label                               | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 07:55:41 |
| Amasty Product Label                               | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:06:51 |
| Amasty Related Products                            | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:06:52 |
| Amasty Related Products                            | Ready  | Schedule  | idle (6 in backlog) | 2020-05-27 07:55:41 |
| Amasty Reports                                     | Ready  | Schedule  | idle (6 in backlog) | 2020-05-27 07:55:41 |
| Amasty Reports                                     | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:06:52 |
| Amasty: Advanced Search  - Categories              | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:05:59 |
| Amasty: ElasticSearch - Popup Data                 | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:06:36 |
| Amasty: ElasticSearch - Relevance Rules (Products) | Ready  | Schedule  | idle (6 in backlog) | 2020-05-27 07:55:37 |
| Amasty: ElasticSearch - Relevance Rules (Rules)    | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:06:30 |
| Amasty: Product Grid - Qty Sold                    | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:06:52 |
| Catalog Product Rule                               | Ready  | Schedule  | idle (5 in backlog) | 2020-05-27 09:53:08 |
| Catalog Rule Product                               | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:05:34 |
| Catalog Search                                     | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:06:30 |
| Category Products                                  | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:05:28 |
| Customer Grid                                      | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:05:26 |
| Design Config Grid                                 | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:05:25 |
| Inventory                                          | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:05:41 |
| Product Categories                                 | Ready  | Schedule  | idle (2 in backlog) | 2020-05-27 09:53:08 |
| Product EAV                                        | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:05:39 |
| Product Price                                      | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:05:59 |
| Stock                                              | Ready  | Schedule  | idle (0 in backlog) | 2020-05-27 10:05:41 |
+----------------------------------------------------+--------+-----------+---------------------+---------------------+


texts: Can not get customer profile id from Authorize.net

texts:
I have an issue with not getting authorize.net customer profile id.
Below is my code using which I am requesting for 'CreateCustomerProfile.'

$this->getRequest()
            ->reset()
            ->setData(array(
                           'merchantAuthentication' => array(
                               'name' => trim($this->getApiLoginId()),
                               'transactionKey' => trim($this->getTransactionKey())
                           ),
                           'profile' => array(
                               'merchantCustomerId' => $this->getPayment()->getQuote()->getCustomerId(),
                               'description' =>  $this->storeUrl(),
                               'email' => $this->getPayment()->getQuote()->getCustomerEmail(),
                               'paymentProfiles' => array(
                                   'CustomerPaymentProfileType' => array(
                                       'customerType' => 'individual',
                                       'billTo' => array(
                                           'firstName' => $this->getPayment()->getQuote()->getBillingAddress()->getFirstname(),
                                           'lastName' => $this->getPayment()->getQuote()->getBillingAddress()->getLastname(),
                                           'address' => $this->getPayment()->getQuote()->getBillingAddress()->getStreet(-1),
                                           'state' => $this->getPayment()->getQuote()->getBillingAddress()->getRegion(),
                                           'city' => $this->getPayment()->getQuote()->getBillingAddress()->getCity(),
                                           'company' => $this->getPayment()->getQuote()->getBillingAddress()->getCompany(),
                                           'country' => $this->getPayment()->getQuote()->getBillingAddress()->getCountry(),
                                           'zip' => $this->getPayment()->getQuote()->getBillingAddress()->getPostcode(),
                                           'phoneNumber' => $this->getPayment()->getQuote()->getBillingAddress()->getTelephone(),
                                           'faxNumber' => $this->getPayment()->getQuote()->getBillingAddress()->getFax(),
                                       ),
                                       'payment' => $this->_convertPayment($this->getPayment())
                                   )
                               )
                           ),
                           'validationMode' => 'liveMode'
                      ));

Now issue is,some times I get Customer profile id and some time not.So by analyze this code,. please help me why this issue is generated.


texts:
Here is what I am trying to achieve. I have a magento2 store and I want to add customization functionality. The way it is going to work is I add a link on products page which will take users to this customization page.

This customization page will have its own URL and hence will be a new module. Here is what I have so far:

Controller: Does nothing, returns a page.
Block: Has some sample functions defined.
Templates: Has HTML code and gets the values by calling sample functions from block.

Here is what I need now:

Where should my logic go. This logic will get the metadata from database for chosen product and display options. Should this be in block or the controller?
I think the logic to display options will be in template. Correct me if I am wrong.


texts:
I am trying to keep the google library files but confused on the destination folder. In magento 1.9 we can  kept in lib folder.
Can any one please give the solution for that


texts:
I need to apply some security patches to a Magento 2.2.7 installation but I don't want to upgrade to 2.2.8 or 2.2.9

Is it possible to apply a patch (e.g. PRODSECBUG-2202: Security bypass via form data injection - CVE-2019-7871 ) without upgrading Magento2 from 2.2.7 to 2.2.9?

e.g. any of the security upgrades here: https://magento.com/security/patches/magento-2.2.7-and-2.1.16-security-update

Thanks


texts: How to get Product Collections with filter attribute value in Magento 2?

texts:
I am trying to get product collection with filter by attribute Color(code) with value Black(5). I have one configurable product with color Black(5), Red(6).
Here Product Name Product 1(configurable product), Product 1 Black (simple product), Product 1 Red (simple product).

So I get the resulting Product 1 Black (simple product) but I want to result from Product 1(configurable product).

So please let me know the code for this.
My code is

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$categoryProducts = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');

$categoryProducts->addAttributeToSelect('*')->addAttributeToFilter('color', array('eq' => '5'));
foreach ($categoryProducts as $product) {
    echo "
";
    echo $i.'==='.$product->getId().'==='.$product->getName();
    echo "
";
    //$i++;
}

Thanks in Advance!


texts: Find products without an attribute value

texts:
We have round about 1500 products and some of them has no weight, even though it is a required attribute. I think an import in the past was the mistake...

How can i get all products which don't have a weight?


texts: Magento 2.4 Installation: In SearchConfig.php line 81: Could not validate a connection to Elasticsearch. No alive nodes found in your cluster

texts:
I am running ElasticSearch6 in my docker files.
if i run http://localhost:9200/ in my browser i get this information.
{
"name" : "shakedeal-1",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "X4OkctATTgmlcdLzmtJ4Yg",
  "version" : {
    "number" : "6.5.4",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "d2ef93d",
    "build_date" : "2018-12-17T21:17:40.758843Z",
    "build_snapshot" : false,
    "lucene_version" : "7.5.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

Here are the contents of my docker/elasticSearch/config/elasticSearch.yml  file.
---
## Default Elasticsearch configuration from elasticsearch-docker.
## from https://github.com/elastic/elasticsearch-docker/blob/master/build/elasticsearch/elasticsearch.yml
#
cluster.name: "docker-cluster"
node.name: "shakedeal-1"
network.host: 0.0.0.0

# minimum_master_nodes need to be explicitly set when bound on a public IP
# set to 1 to allow single node clusters
# Details: https://github.com/elastic/elasticsearch/pull/17288
discovery.zen.minimum_master_nodes: 1

## Use single node discovery in order to disable production mode and avoid bootstrap checks
## see https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
#
discovery.type: single-node

Now if i install my magento2 using CLI command.
php bin/magento setup:install --base-url='http://tile500.co.pk/' \
--db-host='mysql' --db-name='Tile500New' --db-user='root' --db-password='tiger' \
--admin-firstname='Magento' --admin-lastname='User' --admin-email='sanaullahAhmad@gmail.com' \
--admin-user='admin' --admin-password='admin123' --language='en_US' \
--currency='USD' --timezone='America/Chicago' --use-rewrites=1 \
--search-engine='elasticsearch6' --elasticsearch-host='localhost' \
--elasticsearch-port='9200'

I get this error
[Progress: 601 / 1206]
Installing search configuration...

In SearchConfig.php line 81:

  Could not validate a connection to Elasticsearch. No alive nodes found in your cluster