texts: Magento - Changing the place of block to another page

texts:
I am using MA2 Juno theme and trying to move default checkout block to another place, like this:

Before:

After:

For this I figured out that I have to move this

<?php echo $this->getChildHtml('topBlock1') ?>

code block from header.phtml to topMenu.phtml

But after I changed, it didn't work. I think I need to tell somehow to Magento that topBlock1.phtml is ChildHtml of topMenu.phtml. But I don't know how.

After a very long Google search I saw that I have to do something in local.xml file.

I did something like this but it didn't work. Can you guys help me ?

<reference name="topMenu">
        <block name="top.block1" template="page/html/topBlock1.phtml" type="page/html_topblock1" as="topBlock1">
          <label>Top1 blocks</label>
        </block>
</reference>

PS: CSS file changes are not important I know how to edit those and override.


texts:
I want to change a country name in magento 2.2.6. Say I want to change united kingdom to 'great britain'.
All the countries are stored in a xml file at location

/vendor/magento/zendframework1/library/Zend/Locale/Data/en.xml

We can make the changes according to our locale file. I tried to change here but nothing happened (ofcourse I cleared all the caches).

In magento 1.9 I changed in the following file for this problem

/lib/Zend/Locale/Data/en.xml

So i tried to make the same change in locale folder in magento2 but nothing happened.
I found a lot of questions on magento stack exchange related to this but none has a proper answer.
So I was left on my own, what I did I changed all the files in magento 2.2 (including csv and xml), where I found united kingdom to great britain, cleared caches but to mu surprise I still get united kingdom (in country select box).

I know countries name are not stored in database and I have changed all the files where I could find united kingdom to great britain but still I get united kingdom.
I have no more method I could try for. If anyone faced the problem and could guide me in right direction.


texts: Magento Custom Category Layout on search results?

texts:
I've activated a custom design layout on a category, which loads up a different product view page for all the products within that category. It works well, but when searching for a product and then clicking on a product within that category, the custom layout isn't loaded and it falls back to the default layout.

Is there a way to change the product view shown on a search result or load the product view based on it being in that category?


texts: Magento Checkout Cart Image Thumbnail Resize White Frame/Border

texts:
In my checkout cart there is a white frame/border/background around my actual product image. it is because the image is not in the format 1:1

now my problem is, how to get rid of the white frame/border around the actual product image.

I am using Magento 1.8.0.0

I tried changing my code in checkout/cart/item/default.phtml like this:

From:

$this->getProductThumbnail()->resize(265);

To:
$this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->keepFrame(false)->resize(100);

Now when I do this the cart does not work anymore

I really need help


texts: Magento 2 how to get product multi select attribute?

texts:
How I can get the value of multi select attribute.
I tried with below code but all return null

$pro->getCustomAttribute('offer')
$pro->getAttributes('offer');
$pro->getAttributeText('offer')


texts:
I need to add custom breakpoint.
for example

max-width: 479
max-width: 767
max-width: 1023

Thanks in advanced.


texts:
UPDATED

I am trying to add new page on front end. I am doing as following. I have a form, where I am using my action to load the view. On button click it never goes to controller, please help me, what I am doing wrong.

My form is as

    <form id="abc-category-search-form" method="post" action="<?php echo Mage::getUrl('helloworld') ?>">
        <?php echo $this->__('Search by product SKU/Category') ?>:
        <input id="abc-category-search-string" name="search" value="" />
        <input id="abc-category-search-cat" type="hidden" name="category" value="<?php echo $category; ?>" />
        <button id="abc-category-search-submit" type="submit" class="engine-btn" value="" >
            <?php echo $this->__('Search') ?>
        </button>
    </form>

And I am adding page  like this.

app/code/local/Abc/Helloworld/etc/config.xml

        <?xml version="1.0"?>
<config>
    <global>
        <modules>
            <Abc_Helloworld>
                <version>
                    0.1.0
                </version>
            </Abc_Helloworld>
        </modules>
        <blocks>
            <abc_helloworld>
                <class>Abc_Helloworld_Block</class>
            </abc_helloworld>
        </blocks>
    </global>
    <frontend>
        <routers>
            <helloworld>
                <use>standard</use>
                <args>
                    <module>Abc_Helloworld</module>
                    <frontName>helloworld</frontName>
                </args>
            </helloworld>
        </routers>
        <layout>
            <updates>
                <helloworld>
                    <file>abc_helloworld.xml</file>
                </helloworld>
            </updates>
        </layout>

    </frontend>
</config>

And

app/code/local/Abc/Helloworld/controllers/IndexController.php

<?php

class Abc_Helloworld_IndexController extends Mage_Core_Controller_Front_Action {
    public function indexAction() {
        $this->loadLayout();
        $this->renderLayout();
    }
}

And

    app/code/local/Abc/Helloworld/Block/Helloworld.php
<?php

    class Abc_HelloWorld_Block_Helloworld extends Mage_Core_Block_Template {
        // necessary methods
    }

And Layout file is

 app/design/frontend/default/Jin/layout/abc_helloworld.xml

<?xml version="1.0" encoding="UTF-8"?>
<layout version="0.1.0">
  <helloworld_index_index>
    <reference name="content">
      <block type="abc_helloworld/helloWorld" name="helloworld_any_block" template="helloworld/index.phtml" />
    </reference>
  </helloworld_index_index>
</layout>

And .phtml

app/design/frontend/default/jin/template/helloworld/helloworld.phtml

    <?php
        echo 'Abdul Ghaffar';
    ?>


texts: how to add custom fee/extra fee in total by api?

texts:
I want to add an additional charge in the order total by Api. when a customer needs that.
I added an additional amount by following this link https://webkul.com/blog/add-custom-pricefee-order-total-magento2/.
Can someone help me how to add the amount by checking the flag. customer needs that through Rest Api.


texts: is there a way to debug and know whether my layout.xml file is called or not (or) rather is the problem is in my template?

texts:
My controller works fine
but when i am including layout (i.e loadLayout and renderLayout())
magento displays a blank page with default layout

Is there a way to know which all Layout.xml file's have been called or specifically if my Layout is called  or not

and if it is called then why isn't my template being displayed....
where does the Problem exist
Is there any way or tool to find that out Since every time when i get such problems , i cannot keep posting questions to figure the answer out..


texts: How to create Multiple Store with different domain in Magento

texts:
How to create multiple stores with different domains in Magento with same products, same database but different customers.

Example :

I bought 2 domains: mystore1.com and mystore2.com (FYI: mystore1.com already running)

Now I want to add mystore2.com to mystore2.com with same products, same database but different customers.

Notes:

Already tested with This Way
Please answer step by step !! Bounty for a correct answer.
and do not answer with referral link.


texts: Magento 2 Query to get SKU, Product Details ,more information

texts:
I need a query to fetch the following data by passing the product sku.

  catalog_product_entity as sku, catalog_product_entity_varchar as
  productName, catalog_product_entity_text as description

following are the tables

SQL Query


texts: How to get Product url and show in detail page even it is non visibility mode?

texts:
By default Magento does not allow the product which has 'not visibility in frontend' mode to avoid showing the product in listing and detail page. When user hit the previously loaded url, it redirects to 404 since it is not visibility in front end mode. I am in situation to load this product in its detail page only.(catalog_product_view).

I am extending Mage_Catalog_Block_Product_View to check. I am stuck now on how to get url and view page for non visibility product. kindly advice


texts:
I will try to explain as much as I can.

Take note:

We use the website as a view site only and no checkout is complete with the website. We use magento because it give us good module and easy configuration.

Here is our problem:

We already use magento 1 with our website and we want to upgrade for magento 2.

In magento 1, we have 1 store and 3 language (french - Canada | English - Canada | English - USA ), As for now the customer price is in CAD for Canada and in USD for USA.

Here is our configuration:

In the price section, we have an attribute that we can change currency depend on the product if we buy in USA or CAD and we choose the good one. When we have choose the good currency, we insert the base price and we have a third attribute, price.

So here is the configuration:

Base price currency -> USD or CAD
Base price -> Customer pricing
Price -> The base price changing with currency that we have choose

The default currency for our store is CAD, so when we choose CAD in the base price currency, the price will show same price as no change have been done, but when the base price currency is in USD, the price will be change with the day currency and will be auto updated each time magento currency will do.

Can someone help me to have this working with Magento 2 please?

It is an extension for Magento 1 and the company that have made this does not exist anymore.

Thanks in advance!


texts: Magento2.3.2 js and css not getting applied on frontend

texts:
I have a site in magento 2.3.2.
My code is getting fetched from var/view_processed instead of directly from app/code and app/design. See https://prnt.sc/slkvss
The css and css also not getting applied properly. Refer this link of my site https://wazoodl2.wsisites.net
What is the issue. I ran all the commands multiple time, still no affect.


texts: Magento 1.9- Pass a Parameter to cms page url

texts:
I am new to Magento, I need to pass parameters to a cms page created through the backend under the cms section. The steps I followed to create a page are as follows:

First of all, I added a new page layout using this answer.
Then I added a new page from admin panel, and added the layout created in the previous step to this page.
The page is created and I can access it using the url-key (custom-products) generated for this page, as example.com/custom-products The page content is loaded successfully.

Now my problem is, i want to pass a parameter to this url just like example.com/custom-products/1, but when I write /1 at the end of the url, It takes me to the Not found page.

But when I add a query-string parameters (example.com/custom-products?param=1) to this page the page works fine. But I don't want the parameter passed as query-string. I need it to be as example.com/custom-products/1

Any help in this regard would be really appreciating.

Bundle of thanks in advance.


texts:
I've a module to create Brands. So when see a brand detail I get an url like http://magento2.lan/brand/view/index/id/1/

And I would like the url looks http://magento2.lan/brand/view/brandName

I searched on the net but I only found examples about stores. Can you help me please ?


texts: How to set Success message with specific location

texts:
I have a custom module, with a controller that apply  discounts codes in payment page.

After the discount it's applied, I set a success message.
Now this message it's showing on homepage, even I apply the discount on payment page.
So to see the message I need to go on homepage.
My controller where I set the message look like this:

if($values){
        $this->chdxeckoutSession->getQuote()->setCouponCode($couponCode)
            ->collectTotals()
            ->save();
         $this->messageManager->addSuccess(
                                __(
                                    'You used coupon code "%1".',
                                    $escaper->escapeHtml($couponCode)
                                )
                            );

Does anyone know how can I set the location for this message to be in checkout/payment page?


texts:
I created a simple module Wow_Page to create a Hello world page using route.xml with the help of magento 2 devdocs. But when i type the route in the url it is showing 404 error page not found.
My Code is as bellow-
app/code/Wow/Page/registration.php

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

app/code/Wow/Page/etc/module.xml

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

app/code/Wow/Page/etc/frontend/routes.xml

    <?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="learning" frontName="test">
            <module name="Wow_Page" />
        </route>
    </router>
</config>

and finally the controller file
app/code/Wow/Page/Controller/Page/View.php

 <?php /**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Wow\Page\Controller\Page;
class View extends \Magento\Framework\App\Action\Action
{
    /**
     * @var \Magento\Framework\Controller\Result\JsonFactory
     */
    protected $resultJsonFactory;
    /**
     * @param \Magento\Framework\App\Action\Context $context
     * @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
     */
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory)
    {
        $this->resultJsonFactory = $resultJsonFactory;
        parent::__construct($context);
    }
    /**
     * View  page action
     *
     * @return \Magento\Framework\Controller\ResultInterface
     */
    public function execute()
    {
        $result = $this->resultJsonFactory->create();
        $data = ['message' => 'Hello world!'];

        return $result->setData($data);
    } }


texts: Select Release_lock(?) error while reindexing - magento 1.9

texts:
I have a strange error with a reindex process in a Magento 1.9 installation. The trace shows a "MySQL Server Gone Away" error when trying to reindex in the web interface and via ssh. The error occurs after only 20 seconds, it might therefore not be related to a mysql timing issue (as specified in other answers on the same topic).

Those errors already occured in the past but I was able to solve the problem. I post an answer on this topic here. It worked several time but doesn't work anymore.

Looking at the trace I see that the error occured with the query SELECT RELEASE_LOCK(?). The lock name looks rather strange.

I tried numerous solutions on the web but none worked. If anyone can share some direction to solve this issue, he is welcome.

2016-03-15T19:20:44+00:00 DEBUG (7): Exception message:   SQLSTATE[HY000]: General error: 2006 MySQL server has gone away, query    was: SELECT RELEASE_LOCK(?);
Trace: #0 <path>/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 <path>/app/code/core/Zend/Db/Statement.php(311): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 <path>/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 <path>/app/code/local/Zend/Db/Adapter/Pdo/Abstract.php(239): Zend_Db_Adapter_Abstract->query('SELECT RELEASE_...', Array)
#4 <path>/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT RELEASE_...', Array)
#5 <path>/app/code/core/Mage/Index/Model/Resource/Helper/Mysql4.php(72): Varien_Db_Adapter_Pdo_Mysql->query('SELECT RELEASE_...', Array)
#6 <path>/app/code/core/Mage/Index/Model/Lock/Storage/Db.php(84): Mage_Index_Model_Resource_Helper_Mysql4->releaseLock('database...')
#7 <path>/app/code/core/Mage/Index/Model/Lock.php(208): Mage_Index_Model_Lock_Storage_Db->releaseLock('index_process_2')
#8 <path>/app/code/core/Mage/Index/Model/Lock.php(181): Mage_Index_Model_Lock->_releaseLockDb('index_process_2')
#9 <path>/app/code/core/Mage/Index/Model/Process.php(469): Mage_Index_Model_Lock->releaseLock('index_process_2', NULL)
#10 <path>/app/code/core/Mage/Index/Model/Process.php(223): Mage_Index_Model_Process->unlock()
#11 <path>/app/code/core/Mage/Index/Model/Process.php(260): Mage_Index_Model_Process->reindexAll()
#12 <path>/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(127): Mage_Index_Model_Process->reindexEverything()
#13 <path>/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#14 <path>/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#15 <path>/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#16 <path>/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#17 <path>/app/Mage.php(684): Mage_Core_Model_App-   >run(Array)
#18 <path>/index.php(86): Mage::run('', 'store')
#19 {main}


texts:
I Have a 2 Attribute set let assume

Toys and Baby care

Toys Menu i have an attribute gendernew

Baby Care Menu i Have an attribute babycare_gender

Toys Menu have Different Menu and Baby care have different menu

My Problem is I click Baby care Menu it shows gendernew and babycare_gender also even Baby care attribute set dosen't have gendernew attribute

How i will fix it?


texts: I've spun up a VM with Magento 2 install with sample data deployed and using the Luma theme. The navigation at the top of the theme had links to all the categories with sample data. I removed the sample data, created my own categories and added products. I cannot work out how to get my new categories into the menu or edit the menu?


texts: Point multiple domain names to one website in magento 2

texts:
How to point multiple URLs to the same website on Magento 2? I have 2 urls, both of which should open the same website. I have tried adding a case in index.php which points to an existing website's code.

case 'abc.example.in':
     $mageRunCode = 'abc_web';
     $mageRunType = 'website';
     break;
case 'pqr.example.in':
     $mageRunCode = 'abc_web';
     $mageRunType = 'website';
     break;

In base link url of the website(abc_web) I have put https://abc.example.in. When I try opening https://pqr.example.com, it does open the website but in the url it shows https://abc.example.in. I want https://pqr.example.com. Is there a way to do this?


texts: Submit Invoice and Submit Shipment issues

texts:
I have 2 Magento stores on the same server, Ubuntu, on AWS. The system runs with Nginx and PHP-FPM.

One of the shops have a problem in creating invoices. Every time I click Submit Invoice or Submit Shimpent, the site generates Internal Server Error and the server goes down.
What could it be?

The php logs, Nginx and Magento say nothing.


texts: If I update from php 5.4 to 5.5 on the server, will the 1.8.1 store have problem?

texts:
To install Magento 2 for new site, I need to update php from 5.4 to 5.5 on my server.

There will be any issue or problem on our 1.8.1 store after update php from 5.4 to 5.5?


texts: Catalog Search indexer process unknown error: SQLSTATE[HY000]: General error: 1813

texts:
**Catalog** **Search indexer** process unknown error:
SQLSTATE[HY000]: General error: 1813 Tablespace for table '`mydb`.`catalogsearch_fulltext_scope1_tmp`' exists. Please DISCARD the tablespace before IMPORT., query was: CREATE TABLE IF NOT EXISTS `catalogsearch_fulltext_scope1_tmp` (
  `entity_id` int UNSIGNED NOT NULL COMMENT 'Entity ID' ,
  `attribute_id` int UNSIGNED NOT NULL COMMENT 'Attribute_id' ,
  `data_index` longtext NULL COMMENT 'Data index' ,
  PRIMARY KEY  (`entity_id`, `attribute_id`),
  FULLTEXT `FTI_FULLTEXT_DATA_INDEX` (`data_index`)
) COMMENT='catalogsearch_fulltext_scope1_tmp' ENGINE=innodb charset=utf8 COLLATE=utf8_general_ci

When I try to do reindex I have this error. If I look into db for this table catalogsearch_fulltext_scope1_tmp it does not exists. But instead i sea that exist a table named catalogsearch_fulltext_scope2. I've tried to delete the catalogsearch_fulltext_scope1_tmp but there is no table in db...

The Magento is vs 2.2.0, PHP 7.0.25,

innodb_version          | 5.6.36-82.0                                          |
| protocol_version        | 10                                                   |
| slave_type_conversions  |                                                      |
| tls_version             | TLSv1.1,TLSv1.2                                      |
| version                 | 5.6.36-82.0                                          |
| version_comment         | Percona Server (GPL), Release 82.0, Revision 58e846a |
| version_compile_machine | x86_64                                               |
| version_compile_os      | Linux


texts: Customer create account template comes from path "persistent/". Why is that?

texts:
In my localhost/Magento, my theme path is base/default.

I try to edit my PHTML file for Create Account.

Basicly this file came from
    app/design/frontend/base/default/template/customer/form/register.phtml

but in my case register.phtml file come from
        app/design/frontend/base/default/template/persistent/customer/form/register.phtml

Why this happening? What is persistent?


texts:
I am working with the Instagram API in magento. I am giving coupons to my instagram followers if they follow our store on Instagram.

I am making the API calls to instagram in PHP using curl. Currently I am wrapping the API calls in helper functions inside my custom module. Should I instead be wrapping these calls in a function inside a model?

For example. I am making an API call to Instagram to determine if the current user is following my account. So, in my controller, I am making a call to my helper function which returns the follow status to my controller. In my controller, I will then update my models if necessary.

Am I correct in putting these API calls inside helper functions? When do I use helpers as opposed to models?

<?php

class Company_SocialCoupons_InstagramController extends Mage_Core_Controller_Front_Action
{
    public function followAction() {

       $status = Mage::helper('socialcoupons/instagram')->getFollow();

       if ($status == 'follows') {

            // 1. ADD DATA TO MY DATABASE using my custom model
            //    - Ex. Mage::getModel('socialcoupons/instagram')->setInstagramId(*IGID*), etc.
            // 2. CREATE COUPON
            // 3. EMAIL COUPON TO CUSTOMER
       }
}

class Company_SocialCoupons_Helper_Instagram extends Mage_Core_Helper_Abstract
{

public function getfollow() {

    $accessToken = $this->getAccessToken();
    $relationshipsUrl = 'https://api.instagram.com/v1/users/' . $this->getUserId() . '/relationship?access_token=' . $accessToken;

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $relationshipsUrl);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json'));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $jsonData = curl_exec($ch);
    curl_close($ch);

    $response = json_decode($jsonData, true);
    $status = $response['data']['outgoing_status'];
    return $status;
}

public function generateAccessToken($code) {

    // exchange code for access token
    $accessTokenUrl = 'https://api.instagram.com/oauth/access_token';
    $data = array(
        'client_id'     => $this->getClientId(),
        'client_secret' => $this->getClientSecret(),
        'code'          => $code,
        'grant_type'    => 'authorization_code',
        'redirect_uri'  => $this->getRedirectUri()
    );

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $accessTokenUrl);
    curl_setopt($ch, CURLOPT_POST, count($data));
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json'));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $jsonData = curl_exec($ch);
    curl_close($ch);

    $response = json_decode($jsonData, true);

    if (isset($response['error_type'])) { // no error

        Mage::getSingleton('core/session')->unsInstagramAccessToken();
        Mage::getSingleton('core/session')->addError($response['error_message']);
        return $this->_redirect('*/*/authorize');
    }

    $accessToken = $response['access_token'];
    $id          = $response['user']['id'];
    $username    = $response['user']['username'];

    Mage::getSingleton('core/session')->setInstagramAccessToken($accessToken);

    return array(
        'id'       => $id,
        'username' => $username
    );
}

}


texts: I'm using Magento 1.9 C.E, and I want to remove pagination from catalog search result page. I want all the results to be coming on the same page itself with ajax. On click of a load more or something, the next page result will load that is will get appended to this result page. Can anyone give any idea on how to achieve this one?


texts: Hide Adminhtnl ids selectionsColumn on customer list

texts:
I can't figure out how to hide the first adminhtml column (ids) without breaking CSV export.

My customer_listing.xml looks like this:

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<listingToolbar name="listing_top">
    <massaction name="listing_massaction">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="component" xsi:type="string">Magento_Ui/js/grid/tree-massactions</item>
                <item name="componentDisabled" xsi:type="boolean">true</item>
            </item>
        </argument>
    </massaction>
</listingToolbar>
<columns name="customer_columns">
    <selectionsColumn name="ids">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="componentDisabled" xsi:type="boolean">true</item>
                <item name="indexField" xsi:type="string">entity_id</item>
                <item name="sortOrder" xsi:type="number">10</item>
            </item>
        </argument>
    </selectionsColumn>
</columns>

I found that when I use <item name="componentDisabled" xsi:type="boolean">true</item>column is hided correctly but CSV/XML list export breaks throwing: 'Invalid UI Component element name'.

Is there any way to hide it without breaking export? I considered showing it and disabling by CSS, but when the column is present other columns lost the desired column order.


texts: Please specify shipping method with custom shipping method - Magento 2

texts:
I've been trying to add custom shipping methods to a Magento 2 webshop, using configurations in app/code/vendor/module/etc/config.xml, app/code/vendor/module/etc/system.xml and app/code/vendor/module/Model/Carrier/Shippingmethod.php.

So, this all works, and I can select the shipping methods. Also, when NOT logged in, the checkout works fine and can get completed.

The problem is, when logged in with a (new) customer, when using one of the custom shipping methods, it throws the following error:
'Please specify a shipping method' (freely translated from original language).
The console throws the following error:

When I go the following link:

  http://mywebshop.com/rest/default/V1/carts/mine/payment-information

It says:
"User not authorized for %resources" and a  <trace> tag with a few php files:

Some research later, people talk about tokens and stuff, but can't figure it out.


texts:
I'm using the following code to display the subcategory of specific categories in a hardcoded mega menu:

<?php
$children = Mage::getModel('catalog/category')->getCategories(3);
foreach ($children as $category):
    $category = Mage::getModel('catalog/category')->load($category->getId());
    echo '
getUrl() . '">' . $category->getName() . '
';
endforeach;?>

This works great, but some of these subcategories has subcategories of their own, and I would like to display those too. How do I modify the above to include another level?


texts: Importing produtcs with images from .csv file error

texts:
When I try to import a .csv file with products and images I got this error:

Imported resource (image) could not be downloaded from external
resource due to timeout or access permissions

In the .csv file the image is stored without '/' for example : image.png
Before using the import function I've uploaded the image in pub/media/import
I've also tried to log the error in the exception.log file and it says pub/media/import/a/g/agricolture.png not found or has read restriction.
Why a/g if in the .csv Have I only the filename?

The image has 755 permission.


texts: Showing system configuration form field as disabled

texts:
Can anyone tell my how I can show a select box field in the system configuration as disabled?

I want to have a status field that shows the status of a job (running/not running). When the value is "running" I want to show a button that can stop the job.

My current approach is to have a <frontend_type>select</frontend_type> for the status and the button uses <depends> in order to decide if it is shown or not.
So far this works as expected.
But I don't want the select to be editable. Varien_Data_Form_Element_Select checks for attributes like readonly and disabled but how can I activate them?
Is there a simple solution besides writing a custom frontend_model?

As a sidenote: I would not need a select box to do this. A label would be more than enough. Unfortunately the Magento's form.js seems to stick to input or select when checking depends

Thanks in advance! :-)


texts: How to change HTML of Menu in Magento 2.4.2 Claue Theme?

texts:
I want to change some HTML in Magento 2.4.2 Claue theme.
Like when I add 12 subcategory the design is not good it will add subcategory one below other so it will not looking good. I want to add counter value to make it different ul after some subcategory and need to add some classes in that ul and li.
So, I want to change in file but when I search it will show three files and all are in cache folder.
app/code/MGS/Mmegamenu/view/frontend/templates/cache/top_menu.phtml
app/design/frontend/Mgs/claue/MGS_Mmegamenu/templates/cache/top_menu.phtml

So need to know how to change that HTML.


texts: How To change Bundle Products price to three decimal

texts: I want all bundle product price should be like: 55.225 including sales or order pages in admin panel


texts: Cannot add to cart after plugin to intercept

texts:
I am trying to intercept add to cart button.

What I intend to do:
If customer is not logged in, throw error message. Else if customer is logged in, add item to cart.

I did it in following way. I got the error message Cannot add to cart. as expector for customer that is not logged in. But I can't get user to add the product if the customer is logged in. I  get the error message We can't add this item to your shopping cart right now..

What am I doing it wrong?
Note that I can add the particular product to cart if i commented out the logic in this plugin.

=============================================================================
Note updated code as advise. It seems like can't get customer session with following code. Everything works correctly if i commented out the customer session \Magento\Customer\Model\Session and related code to check if customer is log in.

use Magento\Framework\Exception\LocalizedException;

class Cart
{
    protected $session;

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

    public function beforeAddProduct(
        \Magento\Checkout\Model\Cart $subject,
        $productInfo,
        $requestInfo) {
        if (!$this->session->isLoggedIn()) {
            throw new LocalizedException(__('Cannot add to cart.'));
            return [$productInfo, $requestInfo];
        }
       return [$productInfo, $requestInfo];
    }
}


texts: Is it possible for breadcrumbs to always display on a product page? Not just when navigated to through category layers

texts:
I.e. if you click on a product link in a Google search for example, when you come to the product page it will show the breadcrumb simply as:

Home / Product name

Which is missing the category structure showing where this product is held.

So there is key navigation links missing from this page that is displayed for the user.

I have the below code that will fix this BUT it doesn't work on any sub stores, and completely breaks them.

/**
 * Preparing layout
 *
 * @return Mage_Catalog_Block_Breadcrumbs
 */
protected function _prepareLayout()
{
if ($breadcrumbsBlock = $this->getLayout()->getBlock('breadcrumbs')) {
    $breadcrumbsBlock->addCrumb('home', array(
        'label'=>Mage::helper('catalog')->__('Home'),
        'title'=>Mage::helper('catalog')->__('Go to Home Page'),
        'link'=>Mage::getBaseUrl()
    ));
    // sometimes magento can't get category associated with a product
    // so the full breadcrumb is not shown
    // this is a hack to fix the issue.
    $current_category   = Mage::registry('current_category');
    $current_product    = Mage::registry('current_product');
    // let's check if magento knows what current category is
    // if it doesn't know, let's feed this info to it's brain :)
    if(!$current_category && $current_product){
        $categories = $current_product->getCategoryCollection()->addAttributeToSelect('name')->setPageSize(1);
        foreach($categories as $category) {
            Mage::unregister('current_category');
            Mage::register('current_category', $category);
        }
    }
    $title = array();
    $path  = Mage::helper('catalog')->getBreadcrumbPath();
    foreach ($path as $name => $breadcrumb) {
        $breadcrumbsBlock->addCrumb($name, $breadcrumb);
        $title[] = $breadcrumb['label'];
    }
    if ($headBlock = $this->getLayout()->getBlock('head')) {
        $headBlock->setTitle(join($this->getTitleSeparator(), array_reverse($title)));
    }
}
return parent::_prepareLayout();
}

Any ideas on a full solution that will work with sub stores? My understanding is there are basic SEO benefits of implementing this on top of the navigational benefit.


texts: Cron job script is running, but Magento order confirmation emails are not sending

texts:
As the Magento documentation states, you need to set up a cron job on your web server in order to get things like order confirmation emails to send out, like so:

* * * * * /bin/sh /home/[server_username]/public_html/cron.sh

This is a very simple cron job. The issue is, automated tasks are not completing in Magento. It's as if the script isn't being run by the cron job. And as a result, order confirmation emails are not sending (among all the other Magento automated tasks).

I've installed the AOE Scheduler extension to double-check every automated task in Magento and see when tasks are completing (or, in this case, when they're not). None of the tasks including core_email_queue_send_all are completing on the 1-minute-interval basis.

Now here's the weird part. If I just go run the cron.php script (cron.sh triggers cron.php) by loading it up in my web browser at mydomain.com/cron.php, the Magento automated tasks all execute! And since the script works like this when I run it manually, and I know cron jobs are working...I can't figure this out!

Please help!

Additional Details

Here's how I know cron jobs are working—I have tested cron jobs on my server by creating a PHP script that sends a basic email with mail(), and ran a similar cron job to the one above to execute it every minute—the cron job functions normally. I am also getting MAILTO emails from the server every time the cron job runs. No errors that I can see.

I can also execute this exact command in the cron job...

/bin/sh /home/[server_username]/public_html/cron.sh

...in Terminal when I SSH in, and it runs the script successfully and Magento runs all automated tasks. It just doesn't run every minute in the cron job!

This is totally weird and I can't figure it out.... At the end of the day, all this work I did on this Magento store is moot if customer's can't check out and get confirmation emails.

Any advice would be extremely appreciated.


texts:
Does magento enterprise edition needs cron to be set in order to run Indexing the following process.

URL Redirects
Stock Status
Catalog Search Index
Product URL Rewrites
Category URL Rewrites
Catalog Category/Product Index
Catalog product price

I have flat catalog for category enabled, but whenever I modify category attributes like meta data, the changes are not getting reflected in the front end. But whenever I disable flat catalog for category, the changes are reflected. Please guide.


texts: Magento 2: Product repository's getList() method doesn't retrieve recent items

texts:
I have a model where I look for products from the database, filtered by a custom attribute:

/**
 * @var ProductRepositoryInterface
 */
protected $_productRepository;

/**
 * @var SearchCriteriaBuilder
 */
protected $_searchCriteriaBuilder;

public function __construct
(
    Context $context,
    ProductRepositoryInterface $productRepository,
    SearchCriteriaBuilder $searchCriteriaBuilder
)
{
    $this->_productRepository = $productRepository;
    $this->_searchCriteriaBuilder = $searchCriteriaBuilder;
    parent::__construct($context);
}

/**
 * @return \Magento\Catalog\Api\Data\ProductInterface[]
 */
public function getPartnerOffers()
{
    $searchCriteria = $this->_searchCriteriaBuilder
        ->addFilter('is_for_partners', 1)
        ->create();

    var_dump( $this->_productRepository->getList($searchCriteria)->getItems() );
    die;
}

When I execute getPartnerOffers(), it returns zero items. But when I edit the ProductRepository class to print the SQL query, then execute that query in a mysql console, I get all my items just fine.

I have two leads until there, but don't know how to investigate further:

The product repository might not search directly into the database but into some cache that I don't know of. It seems unlikely as I can find these items when I look for them directly using:

$this->_productRepository->get('product-sku');

These products that I look for have been created programmaticaly in the InstallData script. Maybe they're not "valid" enough to be returned, even though they exist in the catalog_product_entity table?

I'm starting to get really lost here, I had no trouble creating my own table, model and repository for another module, but working with a core repository really seems harder.


texts: Migration tool is too much on the Internet. Which one is good at migrationg from VirtueMart to Magento?

texts: I'm hesitating in choosing migration tools , I want to migrate from VirtueMart to Magento. My old website with 90000 entities and I want to keep the customers passwords after converting. Please advise me.


texts: SUPEE-8167 - PayPal IPN patch, Safe to Install right now?

texts:
Magento released SUPEE 8167, IPN patch, basically after JUNE 30, 2017, PayPal will start using HTTPS URL (secured) for IPN communication. Currently they are accepting HTTP requests.

Is it safe to install the patch RIGHT NOW, or it better to wait closer to Deadline ?


texts: magento 2 How to make a custom shipping address field required on checkout page?

texts:
I have created a custom shipping address field which is dropdown select and shows on checkout page.
While creating attribute I wrote their  required => true

but it is not working. I am able to save address without input in that field. Please guide me.

InstallData.php

$customerSetup->addAttribute('customer_address', 'industry_type', [
            'label' => 'Industry Type',
            'input' => 'select',
            'type' => 'varchar',
            'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Table',
            'required' => true,
            'position' => 333,
            'visible' => true,
            'system' => false,
            'is_used_in_grid' => false,
            'is_visible_in_grid' => false,
            'is_filterable_in_grid' => false,
            'is_searchable_in_grid' => false,
            'backend' => '',
            'option' =>
            array (
                'values' =>
                    array (
                        0 => 'Federal Government',
                        1 => 'State Government',
                        2 => 'Local Government',
                        3 => 'K through 12',
                        4 => 'Higher Education',
                        5 => 'Non Profit',
                        6 => 'Government Health Ca',
                        7 => 'Private Hospital',
                        8 => 'Doctor\'s Office',
                        9 => 'Teaching Hospital',
                        10 => 'None',
                        11 => 'Commercial',
                    ),
            ),
        ]);


texts: How to add custom attribtue in the ProductInterface of GraphQL response?

texts: I have lots of custom attributes created for product and i want to include those in the ProductInterface response when called through GraphQl, is there any way for me to add those ? or do i need to create resolver for each attribute and manually add those into the schema.graphqls ?


texts: How can I create an XML when an invoice gets created in admin

texts: How can I create an XML when an invoice has been created. Whenever order invoice gets created, it creates in a particular folder automatically.


texts: Import users/customers in Magento 1.9 without overwriting users/customers users passwords

texts:
As per title, I'm exporting users/customers from a previous Magento installation via the Dataflow functionality.

I've a problem with the import: the new installation already has some users/customers, and some of them are also in the exported data from the previous installation. Net result: such users get their password overwritten by the one in the export.

I already tried to blank the password in the exported data but the result is that the customer is unable to login with any password.

How can I handle this?


texts: Custom module with custom database table and per store settings

texts:
I am creating a custom module with a custom database table using the following tutorial.

This module is a custom contact form, and I would like the settings for that custom contact form to be on a per store basis, meaning, I want the send from email address to be different for each store I create.

Do I need to add specific fields to the database for Magento to pick up on this? Or does Magento do this automagically?


texts: Why is _designAttributes member private?

texts:
Here is another philosophical question.
In the category model Mage_Catalog_Model_Category all the members are protected except the  $_designAttributes member.
I know that they are special attributes but is there any reason for making this private?
To make the question a little broad, I see that there are some other members or methods in the core classes that are private and they don't make sense to me (a simple example Mage_Core_Helper_Data::_decorateArrayObject but there are more).

I will accept a 'These are some slip-ups of the developers' but only from a reliable source  - I'll decide who's reliable :)


texts: Using several fieldsets in an admin form

texts:
I'm trying to build an admin form with several fieldsets. One thing I noticed is that the fileds only get populated when the fieldset name is equal to the key returned in my DataProvider, which probably makes sense. Here is my DataProvider :
public function getData()
{
    if (isset($this->loadedData)) {
        return $this->loadedData;
    }

    $items = $this->collection->getItems();
    $this->loadedData = array();
    foreach ($items as $centrale) {
        $this->loadedData[$centrale->getId()]['centrale'] = $centrale->getData();
    }

    return $this->loadedData;
}

The fieldset will only be populated if it's name is 'centrale'.
What should I do if I want to use another fieldset with a different name ? Do I have to manually  set different keys for each of my fields ?


texts: While adding new user role the page is coming blank. Could anyone suggest any solution?


texts: Remove disable button opacity from search form Magento 2

texts:
I've create a new theme based on Blank theme. The search button is transparent when there is no text in the input.

How can I remove that transparency?

            <input id="search"
                   data-mage-init='{"quickSearch":{
                        "formSelector":"#search_mini_form",
                        "url":"<?= /* @escapeNotVerified */ $block->getUrl('search/ajax/suggest', ['_secure' => $block->getRequest()->isSecure()]) ?>",
                        "destinationSelector":"#search_autocomplete"}
                   }'
                   type="text"
                   name="<?= /* @escapeNotVerified */ $helper->getQueryParamName() ?>"
                   value="<?= /* @escapeNotVerified */ $helper->getEscapedQueryText() ?>"
                   placeholder="<?= /* @escapeNotVerified */ __('Search entire store here...') ?>"
                   class="input-text"
                   maxlength="<?= /* @escapeNotVerified */ $helper->getMaxQueryLength() ?>"
                   role="combobox"
                   aria-haspopup="false"
                   aria-autocomplete="both"
                   autocomplete="off"/>

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

        <button type="submit"
                title="<?= $block->escapeHtml(__('Search')) ?>"
                class="action search">
            <?= /* @escapeNotVerified */ __('GO') ?>
        </button>

In frontend on the search button I have this disabled=""; Maybe this is the problem?

<button class="action search" type="submit" title="Search" disabled="">
GO
</button>


texts:
I am trying to use the jquery DataTables in magento-2 frontend using the requirejs.
I can see the datables.min.js file in the net panel,

but somehow it give the following error.

My reuirejs-config.js looks like this

var config = {
    map: {
        '*': {
            dataTable: 'Ktpl_Slider/js/datatables.min'
        }
    }

};

And i am calling this function in a template file as follows

<script type="application/javascript">
    requirejs(['jquery','dataTable'],function($){
        $(document).ready(function(){
            $('#list-table').DataTable();
        });
    });
</script>

I guess there is problem with the order of loading the js files. i tried with shim configuration but that did not work, maybe there was some mistake in the shim configuration


texts: Invalid XML - Element 'config': Missing child element(s)?

texts:
It is in the checkout process. It seems the ajax call get 500. It only appears in the local environment. I don't know how to fix it...

The URL is: {localhost}/default/rest/default/V1/guest-carts/0b5bcc2be8ad76a0328858ee01fadb17/estimate-shipping-methods

  Status Code:500

Response:

  1 exception(s): Exception #0
  (Magento\Framework\Exception\LocalizedException): Invalid XML in file
  C:/xampp/htdocs/local/vendor/magento/module-checkout/etc/webapi_rest/events.xml:
  Element 'config': Missing child element(s). Expected is ( event ).
  Line: 2


texts: I need to export email adresses and phone numbers, in all my 65000 orders. Is this possible?


texts: Webservice not working in Magento 1.9.0.1

texts:
I configured some currencies in Magento (configuration>general>currencysetup and system>manage currency)

Unfortunately, although i can import manually, it won't update automatically.


texts: Magento 2 - Add product edit link on custom grid

texts:
I have custom admin grid, I want to add product edit link on it.

I have a column that is showing product id, I want to use edit link instead of id. code for that column is this:

$this->addColumn(
    'product_id',
    [
        'header' => __('Edit Product'),
        'index' => 'product_id',
    ]
);


texts: Change search button in form.mini.phtml to normal button with text?

texts:
I am using my own version of the magento 1.9 RWD theme and I want to edit the search at the top so instead of the default search icon there is a button that says 'search' that i can style by myself in CSS. Do I need to edit something in form.mini.phtml? Or how would I go about doing this?

Thanks


texts:
I am trying to display a product attribute value - SKU in Order Summary block.

I have found the template where it is displayed: vendor/magento/module-checkout/view/frontend/web/template/summary/item/details.html, on line 15.

e.g. $parent.product_sku or $parent.[any-attribute-code]  outputs an empty string.
But in vendor/magento/module-checkout/CustomerData/DefaultItem.php have product_sku

 protected function doGetItemData()
    {
        $imageHelper = $this->imageHelper->init($this->getProductForThumbnail(), 'mini_cart_product_thumbnail');
        return [
     ...........
            'product_sku' => $this->item->getProduct()->getSku(),
          ........
            ],
    }

How can I get the value of product_sku?

P.S.
I also found this question - Magento2 - How can I display a product attribute value in Order Summary block? and Add custom product attribute to checkout summary Magento 2
But on this question no answer.

Anybody knows how can I do this?


texts: How to display a customer's PREVIOUS order ID in a CMS page?

texts:
Magento CE 1.9.2.2

Trying to fulfill a client's far-fetched request. Their previous developer created a module which allows the success/order confirmation page to be a CMS page which then references a PHTML file within the template. It was meant to facilitate programmatic order creation at a later point in time. For now, to confirm customer orders, it no longer uses success.phtml but an arbitrary file.

To over-simplify the question: What does it take to echo a customer's most recent order ID on a CMS page? Inside of this CMS page, it's referencing a core/template PHTML file. I'm able to render any static content from that file without issue but I can't echo any order data.

I attempted to make use of the success.phtml code and several other standard variations without success.

<?php $order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId()); ?>

Then just echo $order->getId() somewhere but obviously that does not work out of the box.

How would I proceed to call the most recent order information from a CMS page? Thanks.


texts: Need to hide $0.00 & replace by text 'Free Shipping' on checkout page if shipping method is free shipping

texts: I need to hide $0.00 & replace by text 'Free Shipping' on checkout page if shipping method is free shipping


texts: Magento 2 load external script in my custom page

texts:
I want to add an external script to my store. I have added the script in my phtml file and it is working fine. But I want to follow the magento EQP validation.
Here is my working code
my layout xml

Now I have changed it as follows (using require js function)

Phtml file

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

requirejs-config.js

var config = {
    map: {
        '*': {
            testjs:'https://test.test1.com/js/v1/test.js'
        }
    }
};

This is js file app/code/Vendor/Module/view/frontend/web/js/modtoken.js

define([
    "jquery",
    "jquery/ui",
    "testjs"
], function ($) {
    "use strict";
    return function (config) {
        Test.test1({
                token: config.token
            });
        console.log(config.token);
    }
});

But the above method is not working. Please help and suggest a method to call this file using require js.


texts: If Product Disable Not An Deleted Then Product Redirect To Parent Category in magento1.9

texts: I have disable product in back end then product is redirect to here parent category. I clearly say product is not and deleted only disable product can redirect to here parent category.


texts: Magento Shipping Methods for Saturday Delivery

texts:
In Magento 1.9 Admin config section under Fedex, 2 shipping methods we use in our store are not offered.

FedEx 2 Day Saturday Delivery
Priority Overnight Saturday Delivery

I have added them to the code in Mage/Usa and they show up but are not functioning.

I am using these service codes:

'FEDEX2DAYSATURDAYDELIVERY'     => 'FEDEX_2_DAY_SATURDAY_DELIVERY',
'PRIORITYOVERNIGHTSATURDAYDELIVERY' => 'PRIORITY_OVERNIGHT_SATURDAY_DELIVERY',

And have added these 2 options to the wsdl files.
I know I need to create my own modules for this, but trying to get this to work before complicating the process.


texts: Connection reset error when trying to login to admin panel

texts:
I have magento 1.9 setup for my website. When i am trying to login to the admin panel after submission the page redirects to connection reset error. I have tried various solutions like removing var folder, changing varien file but nothing of it has worked.

I have tried setting up the website on a different server and it works correctly there. It seems there is some issue with the server but i am not able to pin point the issue.

Any help would be highly appreciated!

Thanks


texts: Add custom block to existing tab in catalog product edit view

texts:
I need to add some content to the top of the images tab in the catalog product edit view. I do not want to add a new tab, i want to include some content (custom block) to the existing one.

I have seen a lot of tutorials on how to add a whole new tab, but nothing on how to edit an existing one.

I have managed to create an observer on the event "core_block_abstract_prepare_layout_after":

<core_block_abstract_prepare_layout_after>
      <observers>
          <edit_images_tab>
              <type>singleton</type>
                  <class>custom_module/observer</class>
                  <method>editImagesTab</method>
          </edit_images_tab>
      </observers>
</core_block_abstract_prepare_layout_after>

and remove and recreate the tab in the same position:

public function editImagesTabs(Varien_Event_Observer $observer) {
    $block = $observer->getEvent()->getBlock();

    if ($block instanceof Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs) {
        $block->removeTab('group_10');

        $block->addTabAfter(
            'group_10',
            array(
                'label'     => 'Upload Product Files',
                'content'   => $block->getLayout()->createBlock('adminhtml/catalog_product_helper_form_gallery_content')->toHtml() . 'custom content'
            ),
            'group_9'
        );
    }
}

Anyway, it seems that $block->getLayout()->createBlock('adminhtml/catalog_product_helper_form_gallery_content')->toHtml() is not enough to recreate the images tab.

Not sure if i'm going in the right direction.

Any hint would be greatly appreciated.


texts:
On setting up a new Magento instance (2.1), the process is getting stuck it seams at 99%, on

  Caches Clearing:

Is this normal? How long should this process take and is there any task after this that should execute that won't? Lastly, should I manually attempt to clear the cache now to make sure it is done?

FYI the PHP max_execution time is set to 1800, so I don't think it is timing out.


texts: Assign a customer group on registration. magento 2

texts: I have a customer registration form, and an additional field I want to assign a customer to specific group id on if he selected the custom field in the form. please suggest any solution for how to save a customer to a specific group.


texts: Magento 2: "The requested qty is not available" message autohides quickly

texts:
How do I prevent "The requested qty is not available" message from autohiding in product page while adding products to cart. I want to let user close the message instead of auto hide?
I was able to fix the similar issue in checkout page by updating messages.js file.
But unable to locate the code from where to fix this.


texts: Magento 1.9 force language in url always

texts:
I have a multistore language, lets say I have example.com with /en (english) and /fr (french). The default store is the french one.

So when somebody enters example.com he goes to the french store but the url remains example.com, and I need that only example.com/fr and example.com/en are available. So if somebody writes down example.com goes to example.com/fr automatically.

now I have that:
if you enter example.com    you go to example.com    in french.
if you enter example.com/fr you go to example.com/fr in french.
if you enter example.com/en you go to example.com/en in english.

I need that:
if you enter example.com    you go to example.com/fr in french
if you enter example.com/fr you go to example.com/fr in french.
if you enter example.com/en you go to example.com/en in english.

I have been searching, and I only see how to remove the language from the default store. But I need to add it always so nobody can go to the url without language.

I think it is not a good idea, but it is what I have to do.

PD: I have amasty geoip redirect installed


texts: Magento left navigation filter products by in stock or out of stock?

texts: In Magento how can I filter products by stock in the navigation ?


texts: Magento 2: Rest API throws error "The consumer isn't authorized to access %resources"

texts:
Working in the REST API and checking with the postman storeConfigs, storeViews, currency etc... API working fine but I am working on Add to Cart API and it's throwing in the below response.

"message": "The consumer isn't authorized to access %resources.",
    "parameters": {
        "resources": "self"
    },

  POST URL: http://test.com/rest/V1/carts/mine/items


texts: Payment is working but does not create transaction on order

texts:
Payment is working fine, order status is changed but Transactions is empty.
How can i get Transactions data on order?


texts: Magento 1.9 - Anyone used Voronoy Extra Fees Module?

texts:
Attribute value applied successfully with grand total but attribute not visible on back-end order total https://snipboard.io/JGuBUL.jpg
I am using this module for extra fees https://github.com/yvoronoy/magento-extension-extra-fee
In the checkout page extra fees field displayed and applied in grand total everything okay, in the order page the extra fees field  not visible, the grand total applied with extra fees but extra fees column not visible, any help thanks.
The only issue is extra fees field column not visible on backend but frontend its visible during checkout?
Front-end : https://snipboard.io/fdQN52.jpg
back-end  : https://snipboard.io/JGuBUL.jpg


texts: Print order attachment in magento order mass action

texts:
I have an extension of order attachment installed in my magento 1.7. What I need to do is to have an option in mass action of order grid to print order attachment.
How can I do that?


texts: What is the processing order of layout XML instructions

texts:
I know and do you confirm that Magento will first look for layout updates in the admin panel, and then in local.xml. when there are no updates it will then go to the next fallback step wich is all the different module xml files in the default theme and finally, if it doesn't find theme there either, it will look for them in the base theme. inside of the actual files.

A specific handles for pages or blocks will have a (higher priority) than what is inside of the default handles which covers pretty much every page.

There are some who also say that Magento loads xml in the alphabetical order ?
Admitting if there is some conflict or incoherence in xml between the module layout.xml and local.xml, What order will it take Magento between theme ?


texts: How to apply coupon on specific brands in Magento 1.9?

texts: In magento1 I want to create a Coupon & apply that coupon when only specific brand product is added to cart, if any other brand product is applied then the coupon code should be automatically removed or should not apply.


texts: How to add image roles programmatically in products Magento 2?

texts:
I am creating products programmatically. I am using below code to add product image.. Images are adding perfectly fine.. but image roles are not showing. Can anyone please help me to add image roles in product images programmatically.

$c_product = $ob->create('Magento\Catalog\Model\Product')->load($product->getId());
if(file_exists($image1))
    $c_product->addImageToMediaGallery($image1, array('image', 'small_image', 'thumbnail'), false, false);


texts: Magento 2 colour swatches not showing on homepage

texts: I have used Magento's default feature for calling New products on homepage. In  the list I have a configurable product with visual swatches. But the visual swatches not showing on homepage, can anyone suggest the best way to do this.


texts: Define Multiple Table Names In XML Config File

texts:
I am creating two database tables as part of a new extension. I can create one table just fine, but I get the following error message when I try to create two tables:

PDOException: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'awesome_ness' already exists

Here's my config.xml entry:

<models>
    <awesome_ness>
        <class>Awesome_Ness_Model</class>
        <resourceModel>ness_resource</resourceModel>
    </awesome_ness>
    <ness_resource>
        <class>Awesome_Ness_Model_Resource</class>
        <entities>
            <ness>

awesome_ness

            </ness>
        </entities>
    </ness_resource>
</models>

In my install-1.0.0.php script, I have two createTable definitions, like so:

<?php
$installer = $this;

$installer->startSetup();

$table_one = $installer->getConnection()
    ->newTable($installer->getTable('awesome_ness/ness'))
    ->addColumn('...');
$installer->getConnection()->createTable($table_one);

$table_two = $installer->getConnection()
    ->newTable($installer->getTable('awesome_ness/ness'))
    ->addColumn('...');
$installer->getConnection()->createTable($table_two);

$installer->endSetup();

I guess I need to know how to create two

 definitions. Thanks in advance.


texts: Error 404 when go to simple product URL of configurable product

texts:
I have a configurable product showing on frontend. There are 3 simple product link with it.
Here is my configurable product in backend:

The URL of my configurable product in frontend will be like this:
https://domain/becks-beer-bt-330ml-24pk.html

But if I try to access its simple product link like my URL key:
https://domain/becks-beer-bt-330ml-24pk-case-24.html

or
https://domain/becks-beer-bt-330ml-24pk-each.html

It give me error 404 page. Is it possible for me to go to simple product URL of my configurable product.
Thank you!


texts: /bin/magento file cannot be opened (Magento 2.1)

texts:
I am trying to find my way to reindex the system using cli (in cms graphical interface on save and schedule corn jobs did not work). Diverse commands were tried:

- php /bin/magento indexer:reindex [indexer]
- php /bin/magento indexer:reindex

Unfortunately nothing worked and returned message "Could not open input file: /bin/magento".

Any advise?

Situation:
- Mode in developer set yesterday successfully (Today cannot open), used command:
php magento deploy:mode:set developer, confirmation "Enabled developer mode."

In /bin structure ran command ls -la shown that the Magento file is there (what I see in file structure as well).


texts:
I'm working on a store where they do not always have the product right away, sometimes they have to produce it.

So they asked for a function that would be like this:

imagine there's a order, the customer ordered 3 products, X, Y and Z.

They have product X in stock, so they want to ship it, but products Y and Z will be produced, so they will generate 1 or two more shipping.
And they would like to decide when to change status to complete, in this case it will be only after all products are delivered.

Right now after we sent the first tracking code it changes automatically to Complete.

Is it possible?


texts:
I am running in to weird issue.When i try to access the product url its going to 404 page.Its happening for for some products.

I tried to reindex,clean cache ,removed the url from url key in admin and saved again.

Still the same issue. any help would be greatly appreciated. This enterprise  1.14.2.0 upgraded from EE 1.9.


texts: Move Custom tab at top of left sidebar customer dashboard

texts:
I want to move my custom tab from bottom to top in customer dashboard left sidebar.

I tried below thing

    <referenceBlock name="customer-account-navigation-account-link" remove="true"/>
    <referenceBlock name="customer_account_navigation">
                    <block class="Training\Msg\Block\Current" name="customer-account-navigation-account-customlink">
                        <arguments>
                            <argument name="label" xsi:type="string">Dashboard</argument>
                            <argument name="path" xsi:type="string">customer/account</argument>
                            <argument name="sortOrder" xsi:type="number">210</argument>
                        </arguments>
                    </block>
                </referenceBlock>
<move element="customer-account-navigation-account-customlink" destination="customer_account_navigation" before="customer-account-navigation-orders-link"/>

What I actually need is I want to change My Account tab name according to the customer group, all set well but the tab is display at the bottom.


texts: Magento 2.2.0 : TypeError: element.getRecordCount is not a function in dynamic rows in admin form

texts:
I have created custom modules with Magento 2.1.6 and there is dynamic rows added in custom module form. Where admin can add dynamic data with the help of magento dynamic rows. And It is working fine with that magento version.
But when I have integrated that same module in Magento 2.2.0, it is not working and below error occurred.

TypeError: element.getRecordCount is not a function

How can I resolve this issue ?


texts: Magento 2: Product status doesn't change after changing to another status

texts:
When I changed the status of the product from visible to invisible and when I view the product (in the admin panel) it displays correctly but on the table shows the preview status (see attached ). and it doesn't work correctly on the frontend.
Can everybody help me  ?
Thanks


texts: "Cannot do shipment for order" API Fatal error

texts:
My Magento application is connected to 3rd party system that manages orders and also updates shipping tracking information using Magento's Soap API.

But for few orders we are facing

#<SOAP::FaultError: Cannot do shipment for order.

and due to this shipping tracking information is not updated.

I am not able to figure out What could be possible reason for such error?

Has any one faced such issue? whats need's to be done.

Thanks


texts: Magento 2 master slave connection for DB

texts:
I am planning to enable Master and slave connection on my Magento site.
Magento team suggest me to check my 3rd party and custom modules support this master/slave config or not.

I am not sure how can I check it.
suggestions are much appreciated.

Thank you.


texts: check condition before signup form submission in Magento 2

texts:
I have a very simple task to be done, on my registration.phtml page, I would liek to check the Affiliated Code entered is correct or not before submitting the form for signup.
To do so, I added a Input button like this:
<input type="button" name="checkcode" id="checkcode" class="action primary" value="Check Code">

$('#checkcode').on('click', function() {
        console.log('I am called');
        $.ajax({
            url:"checkcode.php",    //the page containing php script
            type: "post",    //request type,
            dataType: 'json',
            data: {referral_code: $('#referral_code').val()},
            success:function(result){
                if (result.flag == 0) {
                    document.getElementById("sub").disabled = true;
                } else { document.getElementById("sub").disabled = false;}
            }
        });
    });

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

// @codingStandardsIgnoreFile

?>
<?php
/**
 * Create account form template
 *
 * @var $block \Magento\Customer\Block\Form\Register
 */
?>

<?php
// Get Affiliate information
    $_dataHelper = $this->helper('MW\Affiliate\Helper\Data');
    $isEnabled = $_dataHelper->moduleEnabled();
    $refCode = $_POST["referral_code"];
    $isValid = $_dataHelper->checkReferralCode($refCode);
    echo json_encode(array("flag"=>$isValid));
?>

In a nutshell, I simple like to check this code $_dataHelper->checkReferralCode($refCode); before submission.
I am non Magento and non php programmer. Just understand the logic here.


texts: How to Convert an Object into Array in magento 2

texts:
i Need All cms pages in an array I got All in an object but the format i got is not that I expected

$cms = $this->collectionFactory->create()->toOptionIdArray();
echo "<pre>";
print_r($cms->toArray());
exit();

these lines gave me result as

Array
(
    [0] => Array
        (
            [value] => no-route
            [label] => 404 Not Found
        )

    [1] => Array
        (
            [value] => home
            [label] => Home Page
        )

    [2] => Array
        (
            [value] => enable-cookies
            [label] => Enable Cookies
        )

    [3] => Array
        (
            [value] => privacy-policy-cookie-restriction-mode
            [label] => Privacy Policy
        )

)

but i need this something like

Array
(
     [
            "value" => 'no-route',
            "label" => '404 Not Found'
     ],
     [
            "value" => 'home',
            "label" => 'Home Page'
     ],
     [
            "value" => 'enable-cookies',
            "label" => 'Enable Cookies'
     ],
     [
            "value" => 'privacy-policy-cookie-restriction-mode',
            "label" => 'Privacy Policy'
     ],

]

i want to add CMS pages in a drop down

$options = [
            [
                'label' => __('Catagories'),
                'value' => [
                    [
                        'label' => __('Anchor Catagories'),
                        'value' => self::CATAGORIES_ANCHORED
                    ],
                    [
                        'label' => __('Non-Anchor Catagories'),
                        'value' => self::NON_CATAGORIES_ANCHORED
                    ]
                ]
            ],
            [
                'label' => __('All Products'),
                'value' => [
                    [
                        'label' => __('All Product Types'),
                        'value' => self::PRODUCT_ALL
                    ],
                    [
                        'label' => __('Simple Product'),
                        'value' => self::PRODUCT_SIMPLE
                    ],
                    [
                        'label' => __('Virtual Products'),
                        'value' => self::PRODUCT_VIRUAL
                    ],
                    [
                        'label' => __('Downloadable Products'),
                        'value' => self::PRODUCT_DOWNLOADABLE
                    ],
                    [
                        'label' => __('Configureable Products'),
                        'value' => self::PRODUCT_CONFIGUREABLE
                    ],
                    [
                        'label' => __('Grouped Products'),
                        'value' => self::PRODUCT_GROUPED
                    ],
                    [
                        'label' => __('Bundle Products'),
                        'value' => self::PRODUCT_BUNDLED
                    ]
                ]
            ],
            [
                'label' => __('CMS pages'),
                'value' => [

                ]
            ]
    ];

in the CMS pages options


texts: Magento 1.9 Update stock product status with sql query

texts:
We want to update stock status with sql query. This query worked and products status does as out of stock in product page. But when i did clearing cache, products is appearing in stock

when i check products in admin panel, products is appearing in stock.

Does magento has function for product status change?

$query = "UPDATE cataloginventory_stock_status SET stock_status = 0 WHERE product_id=".$product_id;

Thanks.


texts:
Magento CE 1.8.0.0 on server running Apache & PHP5.4.

Woke up this morning to discover our store's order grid had disappeared from our admin panel this morning without logging errors. I immediately assume someone had installed or modified something they shouldn't have so I jump in and check our version control - nothing changed in Git. I then check SSH history and I'm showing nothing new. The extensions we have in place still seem to be running without issue. I then proceed to tail PHP, Apache and MySQL logs. No warnings while refreshing the order page. I disabled all local extensions and manually disabled a few community extensions that I thought could be at fault. There are also no console errors reported in the browser.

The last grid related file to load on the page is adminhtml/default/default/template/widget/grid/container.phtml. The footer still renders without issue, it just doesn't want to load the next file which is adminhtml/default/default/template/widget/grid.phtml.

The only thing I can conclude is that there is something wrong with the results of the SELECT query that runs to generate the data seen in the order grid. We have an international ordering integration that has the ability to modify Magento order statuses and reflect various types of currency however I'm not seeing any orders sent from their system.

So now I'm proceeding to check the database itself, I'm looking at sales_flat_order and sales_flat_order_grid for corrupt data of some sort. As mentioned above, MySQL isn't reporting anything but I'm not sure if it would in a situation like this.

Question: Does anyone know the specific query that is ran in order to assemble an order grid in Magento? I'm interested in running it to try and reflect what the order grid itself might be loading and correct any corrupt data that I'm hoping to find. Also open to any other ideas of debugging this specific situation that anyone can suggest. Thanks in advance.


texts: Creating a database backup of a live shop?

texts:
I like to create a backup of the whole database before doing any major changes on a live environment.

For smaller projects that is no problem as it usually only takes a few seconds.

On larger projects however I've noticed that using mysqldump creates a lock on the database while the backup is being created - which is obviously very bad as new orders won't be accepted during that time period.

I've tried using the --skip-lock-tables command with mysqldump, but I fear that this might create an unusable backup, as the database might be written to while the backup is being created.

What are some recommended strategies for creating a backup of a database before doing any major changes, on a live environment?


texts: Magento 2 - No minified files generated in admin

texts:
I've recently minified my website with a huge success, but this little thing. I don't get any generated .js files in the Admin panel, which causes the menu and a bunch of buttons not to work.

It generates just fine at the frontend. Css generates just fine too.

Any suggestions?


texts: Magento 2 : Store Switch Problem it throws an error

texts:
When I try to Switch store in Front-end I got below strange error message.

  The store that was requested wasn't found. Verify the store and try
  again.

Store redirect properly there is no issue with the redirection.
Only thing is it redirects with the above message

Note : I recenlty upgrade from M2.2.6 to M2.3.3.

Anyone face this before?
What are the step to debug or solve?

Any help will be appreciated.


texts: How do I know what data I can access via an observer?

texts:
I'm trying to use the sales_order_invoice_pay observer.
I can see the dispatch in:
/vendor/magento/module-sales/Model/Order/Invoice.php
$this->_eventManager->dispatch('sales_order_invoice_pay', [$this->_eventObject => $this]);

Which seems to provide an invoice object?
But I'm having trouble accessing any properties or methods.
$order = $observer->getEvent()->getOrder();

returns nothing..
Generally speaking how do I find out what I can access via each observer?
There doesn't seem to be any documentation?


texts:
How can I sort catalogsearch results by 2 attributes instead of "position" or "relevance" only?
Not in toolbar, need to sort by default .. for example, first sort products with "attribute1" and then sort with "attribute2" without changing the toolbar and select any of them?

for more info, I have 4 products:

121/24R
123/83C
123/15H
121/55H

I have 2 attributes that first is for 123,121 and another one is for 24,83,15,55

Now I want to sort products results with first attribute in 'asc' and another one in 'desc'?

like this :

121/55H
121/24R
123/83H
123/15C

How can I use this method ?


texts: You can set up PayPal IPN URLs but you can only add one, so what do I do if I have a multistore?? The problem at the moment is that a user clicks on CANCEL at the PayPal page and they are redirected back to the wrong website. I want users to stay on the same website, not get redirected to another website in my Magento installation.


texts: Magento 2 add cart contents to email termplate

texts: Is there a way to add the contents of the users cart to an email template?  I would like to do this for the abandoned cart email and would rather not use a 3rd party extension.


texts: Display custom attribute on category page

texts:
On our category page I want to echo an custom attribute with attribute code "homepage_description".

I tried this, but that does not work:

<?php echo $_product->getHomepageDescription() ?>

I also tried this:

<?php echo $_helper->productAttribute($_product, $_product->getHomepageDescription(), 'homepage_description') ?>

How can I make this work?


texts:
I have been having some problems with my Magento 1.9.0 installation which seem to be related to access permissions mainly in the var and media directories.
I have had the host reset the permissions to the default permissions.

When I save a Product I get the error:
"File '/home/user/public_html/var/indexer/4//segments_a4xp' is not readable."

Upon further inspection, that file does not exist.

Can anyone please help me out with this?
Thank you.


texts:
I want to create an observer to execute when the import product is executing, i need persist product informations in another table when the export action is in process, i try the following:

  CatalogProductImportBunchSaveAfter

<?php
namespace Module\Imports\Observer;

use Magento\Framework\Event\ObserverInterface;
use Webkul\Marketplace\Model\ResourceModel\Product\CollectionFactory;

class CatalogProductImportBunchSaveAfter implements \Magento\Framework\Event\ObserverInterface {
    protected $_objectManager;
    protected $_collectionFactory;
    protected $_date;

    public function __construct(
        \Magento\Framework\ObjectManagerInterface $objectManager,
        \Magento\Framework\Stdlib\DateTime\DateTime $date,
        CollectionFactory $collectionFactory
    ) {
        $this->_objectManager = $objectManager;
        $this->_collectionFactory = $collectionFactory;
        $this->_date = $date;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {

    //my logic to persist new data here;

    }

but, i dont now if this is ok. How can i recover all products informations on this observer?


texts: How add (new) label along with name in Magento categories menu

texts:
Can somebody suggest how to add (new) label along with
category/subcategory menu name like shown in the picture given.

Is there any Extension for this? If somebody has done this please help.


texts: Is it possible to filter out transactional emails for customers from certain referral sources?

texts:
It appears that it is against policy for one of the sites that is feeding us referrals to send out transactional emails to customers that've used their 'gateway' (for lack of knowledge of a clearly defined better word in this instance).

Our site has been flagged by this aforementioned gateway due to our site sending out transactional emails to the address that is provided when they go through their referral process to our Magento instance.

At this point I don't have a whole lot of information on the best way to identify what transactional emails to filter.

I do have a domain that [all of the currently referenced] mail is allegedly being sent to (leading me to believe that the referral process from their end is substituting an email address that they're seeing this outflow from), and that might be one way to try to filter these emails, but I really don't know if that is the best way to try to go about this or not.

So I figured I would ask the experts.  I believe SMTPPro is handling our 'transactional' emails, though I might be mistaken here.

Can anybody point me to a reference where I might find out a little bit better what subsystem, so to speak, is sending these emails (if indeed it is not SMTPPro), and how to go about selectively filtering what customers get an email sent and whatnot?

Any helpful information, or even pointers in the right direction, are greatly appreciated.


texts: cache using cacheable="false" in catalog_product_view.xml not working?

texts:
I need your help. I tried so many times to disable product view...

I modified the addtocart.phtml and need to uncached to work, (when cache is enabled is not working ok) now i have to left the web page cache disable and obviously is too slowly

<block class="Magento\Catalog\Block\Product\View"
       name="product.info.addtocart.additional"
       as="product.info.addtocart"
       template="product/view/addtocart.phtml"
       cacheable="false" />

I read a lot in forums but i can't find the real problem, i know with this cacheable="false" its not the best way because all the page was uncached, but at least all the rest of the web will ride fast.

Can you help me please?


texts: How to override newsletter.phtml (my account option) in Magento 2

texts:
I would like to edit the "General Subscription" text in my custom theme present in the My Account page under the Newsletter Subscription menu.

I've already located the page which is:

app/design/frontend/VENDOR/THEME_NAME/Magento_Customer/templates/form/newsletter.phtml

But I have no idea on how to create my custom module.

I've already created the registration.php and the module.php file.

  but can you please explain me, what should I put in the layout folder? And also, what is the path of the templates folder? Just
  templates/form/newsletter.phtml?

Please, help me!

Thanks


texts:
How to Upgrade magento version from 2.3.x to 2.3.x [Enterprise Edition]

Steps to successfully update Magento 2.3.x to 2.3.x [EE]


texts: How to add specific configurable product options to the wishlist

texts:
For some reason, whenever a product is added to my wish list it only adds the product. It does not add the selected configurable options (size/color). I know that it should be able to handle the configurable....

Can someone point me in the locations of the files that I should overwrite (with the original magento files)? I might have made a change to some file somewhere and overrode that option. I would very much like to have the configurable options be selectable/required for the wish list.

If that doesn't work then if someone could point me in the direction of an extension that will be separate from the base magento wish list that will accomplish the same thing :)

Thank!
Jonathan.


texts: Product price not being set for programmatically created quote item

texts:
I am using the following code to set the product to the quote object

$product=Mage::getModel('catalog/product')->load($id);
$quote->addProduct($product,new Varien_Object(array('qty'   => $productid)));

The product and it's quantity is stored in the sales_flat_quote_item table on saving the quote but the price and base price is 0. The price is not set with the price of the product.


texts: How to Revert SUPEE-8788 v1 and bash SUPEE-8788 v2

texts:
I installed SUPEE-8788 v1, but now I need to revert it and install SUPEE-8788 v2.

How can I revert SUPEE-8788 v1 and then install v2?

I installed it using SSH bash.


texts:
SO I am not sure if this is a bug or not, when using the API to update a product in magento 2.3.0 a PUT request like such:

curl -X PUT "https://example.com/index.php/rest/all/V1/products/24-MB01" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer TOKEN" -d "{ \"product\": { \"visibility\": 3 }}"

updates the visibility for the product with that SKU (as one would expect) however when i try to make a simillar update to a customer with a PUT request like this:

curl -X PUT "https://example.com/index.php/rest/all/V1/customers/8" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer TOKEN" -d "{ \"customer\": { \"middlename\": \"string\" }}"

I get a 400 error with "message": "The customer email is missing. Enter and try again." the API to update only works if i add all of the required data like this:

curl -X PUT "https://example.com/index.php/rest/all/V1/customers/8" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer TOKEN" -d "{ \"customer\": { \"id\": \"8\", \"firstname\": \"Jon\", \"lastname\": \"Smith\", \"email\": \"Jjsmith@gmail.com\", \"middlename\": \"jac\", \"store_id\": 1, \"website_id\": 1 }}"

if I leave any of these values out i get an error with the exception of id which if left out creates a new record or throws an error if the email already exists (despite the id being specified at the end of the URL) also when id is passed in with the data that IDs record is updated even if it is not the id at the end of the URL

This does not seem to be the way the API should operate any help or explanation of whats going on would be appreciated.


texts: Get Website Id on multi website on Cart Page

texts:
I am trying to get the websites ids against each product on cart page like this but didn't work.

 <?php foreach($this->getItems() as $_item):
              echo "<pre/>";
              $product = Mage::getModel('catalog/product')->load($_item->getId());
               print_r($product->getWebsiteIds());
             echo $this->getItemHtml($_item) ?>
            <?php endforeach ?>

It showing output with 1 result.Some product belongs to website 2

Array
(
    [0] => 1
)


texts: Recover part of a code from a backup file

texts:
Pretty new to Magento.

After I made a patch update I got a problem in my backend with editing my products. I can press the edit button but unfortunately I does look completely wrong. I wonder if it would be possible to recover some files from my backup (tar.gz file) and upload these via FTP manager.

Best regards

Jesper


texts: How to Add discount code form to multi shipping address

texts:
I have been working for 2 days for applying multiple coupon on cart I know there are modules which are available for that. But i don't want to use it. I want some custom code so that i can apply more than 1 coupon code in the single order.

Please help. i am very tired after working on the same stuff.


texts:
How does Magento2 populate its $routerList in :

public function dispatch(RequestInterface $request)
{
    \Magento\Framework\Profiler::start('routers_match');
    $routingCycleCounter = 0;
    $result = null;
    while (!$request->isDispatched() && $routingCycleCounter++ < 100) {
        /** @var \Magento\Framework\App\RouterInterface $router */
        foreach ($this->_routerList as $router) {
            try {
                $actionInstance = $router->match($request);
                if ($actionInstance) {
                    $request->setDispatched(true);
                    $this->response->setNoCacheHeaders();
                    $result = $actionInstance->dispatch($request);
                    break;
                }
            } catch (\Magento\Framework\Exception\NotFoundException $e) {
                $request->initForward();
                $request->setActionName('noroute');
                $request->setDispatched(false);
                break;
            }
        }
    }
    \Magento\Framework\Profiler::stop('routers_match');
    if ($routingCycleCounter > 100) {
        throw new \LogicException('Front controller reached 100 router match iterations');
    }
    return $result;
}


texts:
I having extra language(Australia,Brazil,Cameroon,Canada, extra English,French,German,Italy,Russia) as in picture 1.
But I can't find them in my store, as picture 2, any way to remove them?


texts: PayuBiz Account Will be Accept on Rupee but order place on Dollar

texts: Magento 2 PayuBiz Suppose Customer Order Place $40 but actually what happen in PayuBiz Payment will be showing only 40 Rupees


texts: How do I remove header off extension without affected website header?

texts:
I have a one page easy checkout extension for point of sale. What its doing is pulling tin the theme header. I cant hide with css as it will affect the header on the website so what is the correct way to remove this and what file will I be searching for and where would I find it.

I'm very new to magento, please remember that when responding.


texts: Magento2 - Wishlist counter is suddenly stopped working in the header

texts:
I am using Ultimo theme in the site and few changes to the My Wishlist to wishlist and added one icon with link and also changed 1 item/items to 1% from csv only but suddenly counter stopped working and it doesn't show  in the header section.

Below is my code in link.phtml file :

      <a href="<?php echo $this->getUrl('wishlist') ?>">
         <?php echo __('My Wishlist') ?>


texts: What is the Current Admin Password in Magento Enterprise

texts:
If I create a role, say "SAdmin" and give this role all the permissions as Magento Admin except permissions for Roles and Users - when Magento prompts for "Current Admin Password" when SAdmin is making changes, is this password that the SAdmin user logged in with or is it referring to the Administrator password?

Also, is the SAdmin able to perform all tasks except for creating users and Roles?


texts: Magento 2: Display Swatchs in my template file

texts:
I am fetching configuration products from SKU, I am displaying configuration by dropdown, and using selected value I am generating proper SKU of that product.

Ex: if customer select 'MH01' and select configure color:'Black' & Size:'S', the product's SKU will be 'MH01-S-Black' and it's working perfectly fine but now I want to replace configure dropdown by swatches.
I am already getting the value of attributes for the swatch, but not successfully display to my template file.

Here is my controller:

           $getProduct = $this->getRequest()->getParam('get_product');
           $productDetail = $this->productRepository->get($getProduct);
           $data['name'] = $productDetail->getName();
           $data['id'] = $productDetail->getId();
           $data['sku'] = $productDetail->getSku();
           $data['price'] = $productDetail->getFinalPrice();
           $data['stock'] = $productDetail->getQuantityAndStockStatus();
           $data['config'] = $this->configurable->getConfigurableAttributesAsArray($productDetail);

           $result = $this->jsonFactory->create();
           $result->setData($data);
           return $result;

as per my knowledge, $data['config'] have an all attribute value for swatches, please correct me if I am wrong.

Source: how to get swatches attribute option in magento 2

Data in $data['config']: https://drive.google.com/file/d/1vV1EwHqzjO1RZHkpQ6KGR19qb5jxgRVL/view?usp=sharing

My template viewproduct.phtml (writing only AJAX)

require(['jquery'],function(){
    jQuery(document).ready(function() {
        var data = '';
        jQuery("#load_product").submit(function(e){
            e.preventDefault();
            var getProduct = jQuery("#get_product").val();
            var url = "<?php echo $block->getUrl('viewproduct/loadproduct/index');?>";
            jQuery.ajax({
                url: url,
                type: "POST",
                data: {get_product:getProduct},
                showLoader: true,
                cache: false,
                success: function(response) {
                    console.log(response);
                    data = response;
                    if (!jQuery.trim(response)) {
                        alert("Product is not configurable");
                        location.reload();
                    } else {
                        jQuery("#newProduct").html('');
                        jQuery("#example").css('visibility', 'visible');
                        jQuery('.productName').html('');
                        jQuery('.productName').html(response.name);
                        jQuery('.productPrice').html('');
                        jQuery('.productPrice').html(response.price+'$');
                        jQuery.each(response.config, function (index,value) {
                            var select = value.label + '<select class="configurable"  name="' + index + '" >';
                            jQuery.each(value.values, function (key, opt) {
                                select += '<option value="' + opt.value_index + '">' + opt.label + '</option>>'
                            });
                            select += '</select>';
                            jQuery("#newProduct").append(select);
                        });
                    }
                }
            });
        });

I also tried other answers to display swatches, but

they are using objectManager.
mostly answer showing swatches for category page or productList.

like:How to get visual swatch image from attribute_id?

I need swatches for specific products which users asking, I am getting data from AJAX request.

Any help, a suggestion would be appreciated


texts:
After Magento is installed and configured, is there a way to streamline the installation and configuration of additional modules?

For example, when deploying Odoo, one can rsync a module to an Odoo installation, use XML-RPC to reload the module, and any database and/or configuration changes can happen automatically. The Odoo architecture makes it easy to automate this process.

I am wondering if there are similar methods for working with Magento.

For scripting the initial installation of Magento, install.php is perfect:

http://www.magentocommerce.com/wiki/groups/227/command_line_installation_wizard

For scripting the installation and configuration of additional modules, perhaps there is some better documentation for mage than what I have found so far?

https://www.yireo.com/blog/1294-magento-15-mage-command-line

Having seen how well the XML-RPC interface works for Odoo, I had hoped there might be similar functionality exposed by Magento to allow for remote automation and control of a Magento installation.

But if mage is the official tool... a link to some documentation would be amazing!


texts: OK Html and Css loaded into page but it wont render properly

texts: I have added Css and Html code into a cms page. Problem is I cant get the page to render properly Any ideas or help would be good. You can take a look at the problem Ime facing Below. As you can see footer has expanded quite large and 2 buttons at top of page have dropped.


texts:
I got the product collection in my custom template using the following snippet:

<?php
 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();

 /** @var \Magento\Catalog\Model\ResourceModel\Product\Collection
  $productCollection */
  $productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
 /** Apply filters here */

 $productCollection->load();

 foreach ($productCollection as $p)
 {
  echo "<pre>";
  print_R($p->getData());
 }
Here i got array with product id like this

 Array
(
[entity_id] => 1
[attribute_set_id] => 4
[type_id] => virtual
[sku] => Double Corona Natural (box of 25)
[has_options] => 0
[required_options] => 0
[created_at] => 2015-12-23 09:20:38
[updated_at] => 2015-12-23 09:20:38
[is_salable] => 1
)

From this entity_id, how can I load products like we did in Magento 1.x?

$_product = Mage::getModel('catalog/product')->load($productID);