texts: Error when trying to upload image in WYSIWYG of custom module

texts:
I'm getting the following Javascript alert when I click the 'browse' button on the image insert popup of the WYSIWYG:

error: error in [unknown object].fireEvent():

event name: open_browser_callback

error message: MediabrowserUtility is not defined

So it looks like mage/adminhtml/browser.js isn't being included which is where MediabrowserUtility is defined.

My Form.php file for this page looks like this:

<?php
class Limesharp_Playzone_Block_Adminhtml_Competition_Edit_Form extends Mage_Adminhtml_Block_Widget_Form{
    protected function _prepareForm(){
        if (Mage::getSingleton('adminhtml/session')->getCompetitionData())
        {
            $data = Mage::getSingleton('adminhtml/session')->getCompetitionData();
            Mage::getSingleton('adminhtml/session')->getCompetitionData(null);
        }
        elseif (Mage::registry('competition_data'))
        {
            $data = Mage::registry('competition_data')->getData();
        }
        else
        {
            $data = array();
        }

        $form = new Varien_Data_Form(array(
                'id' => 'edit_form',
                'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
                'method' => 'post',
                'enctype' => 'multipart/form-data',
        ));

        $form->setUseContainer(true);

        $this->setForm($form);

        $fieldset = $form->addFieldset('competition_form', array(
             'legend' =>Mage::helper('playzone')->__('Competition Details')
        ));

        ...

        $fieldset->addField('details', 'editor', array(
            'label'     => Mage::helper('playzone')->__('Details'),
            'name'      => 'details',
            'config'    => Mage::getSingleton('cms/wysiwyg_config')->getConfig(),
            'wysiwyg'   => true
        ));

        $form->setValues($data);

        return parent::_prepareForm();
    }
    protected function _prepareLayout(){
        parent::_prepareLayout();
        if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
            $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
        }
    }
}

What needs to happen for that file to be included?


texts:
I want to add a product image in the new order email template.
How can I do this?
I am using my custom template and I want product image also.
so how can I take an image on my custom template
The custom template I have created from,

system->configuration->transnational emails


texts: Magento 1.9 - User Roles Permission return Fatal error

texts:
If i click System -> Permission -> Roles if i click any of roles return following error,

Fatal error: Class 'Mage_Cmsmquickview_Helper_Data' not found in /home/abc/public_html/app/Mage.php on line 547

How to solve thi Issue?


texts: How to delay USPS by one day? (we won't be able to actually package and send until the next day)

texts:
Magento 1.9.3.7

We started using USPS as the only shipping method.

We are unable to ship on the day the customer places the order (we ship the next day).

How can we set it up so that USPS takes that into consideration when showing the quotes for:

Priority Mail
Retail Ground

I guess we need the customer to have the right expectation as to when the package will arrive.


texts: Cant save customer attributes in Cron Job observer!

texts:
I have setup a cronjob in my custom module and it works fine. I know this because i put a PHP email script in there and I do in fact receive the email. The problem is with loading the customer model. It won't load the customer, much less save a customer attribute.

A few things:
1. Yes entity_id 50 does absolutely exist.
2. When I leave the first 3 lines in pendingApproval() I do not get the email. When i remove them I do get the email.
3. I have tried changing the email, firstname, lastname. Nothing. But this same code works when I run it in a controller in my browser.

Do i have the wrong current store or what? It's strange because I have another method in the same observer.php file and I make a call to the getModel('customer/customer') and it allows me to retrieve and save. However, it does not utilize a cronjob.

Any help is appreciated. Been messing with this for hours.

    <crontab>
    <jobs>
        <mycompany_referral>
            <schedule><cron_expr>*/1 * * * *</cron_expr></schedule>
            <run><model>referral/observer::pendingApproval</model></run>
        </mycompany_referral>
    </jobs>
</crontab>

<?php

class MyCompany_Referral_Model_Observer {

public function pendingApproval() {

    $customer = Mage::getModel('customer/customer')->load(50);
    $customer->setEmail('joebob@yahoo.com');
    $customer->save();

    $to      = 'myemail@email.com';
    $subject = 'alex';
    $message = 'ljoe';
    $headers = 'From: myemail@email.com' . "\r\n" .
        'Reply-To: myemail@email.com' . "\r\n" .
        'X-Mailer: PHP/' . phpversion();

    mail($to, $subject, $message, $headers);

}

}


texts: Magento 2.3 Extremely Slow - Multiple PHP Processes

texts:
As to replicate pretty much as the poster in this thread -
Magento 2.2 often extremely slow, 100% processor usage after setup:upgrade

I have now had to restore a Magento from overnight backup 3 times now. I am working to move to Magento 2.3 from Magento 1.9 but I get as far as installing few extensions and then suddenly Magento will start to slow and spawn loads of PHP processes and send the server load sky high. I went as far as removing every single extension I added that day and still the same. Restore database backup too, same issue. I cannot find a way without having to restore from a backup or a fresh install every time. I don't ever see how I will be able to run this in production environment if it keeps doing this...

I don't understand why it randomly does this.... I'm not an expert. I have ran every possible command and searched heavily for a fix for this issue to no avail.


texts: How to get shipping address by shipping address id?

texts: I have the order object. From that I can get the shipping address id. Can anyone suggest how to derive Shipping address by shipping address id?


texts:
None of the solutions works:

Magento 2.2: Unable to unserialize value?

Magento 2.2 error: Unable to unserialize value

Navigating to a page of the category, localhost/magento/en/shop?p=3 My error as below:

1 exception(s):
Exception #0 (InvalidArgumentException): Unable to serialize value.

Exception #0 (InvalidArgumentException): Unable to serialize value.
<pre>#1 Magento\Framework\App\PageCache\Kernel->process(&Magento\Framework\App\Response\Http\Interceptor#000000006184d2b80000000038bb4237#) called at [vendor/magento/module-page-cache/Model/Controller/Result/BuiltinPlugin.php:96]
#2 Magento\PageCache\Model\Controller\Result\BuiltinPlugin->afterRenderResult(&Magento\Framework\View\Result\Page\Interceptor#000000006184d61c0000000038bb4237#, &Magento\Framework\View\Result\Page\Interceptor#000000006184d61c0000000038bb4237#, &Magento\Framework\App\Response\Http\Interceptor#000000006184d2b80000000038bb4237#) called at [vendor/magento/framework/Interception/Interceptor.php:146]
#3 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#000000006184d2b80000000038bb4237#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#4 Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000006184d2b80000000038bb4237#), array(array('result-messages', 'result-builtin-c...', 'result-varnish-c...'), array('meigeeCompoResul...'))) called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:130]
#5 Magento\Framework\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000006184d2b80000000038bb4237#) called at [vendor/magento/framework/App/Http.php:140]
#6 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#7 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:258]
#8 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000006184d2ba0000000038bb4237#) called at [index.php:39]
</pre>

This page works fine in my server, but duplicate it under local environment shows this error. Why?

Edit: Note, /shop?p=2 and /shop?p=4 work, but /shop?p=3 shows this error


texts: Facing issue in composer installation (EE version)

texts:
facing issue on composer install for EE version. any solution?
Is there any way to change the Magento repo credential from the composer? I have configured one & save it in composer, I need to re-configure the second one.


texts: Filter is not display after custome product_listing.xml

texts:
I am trying to add new column in magento 2.1.3 admin -> Catalog -> Product grid

I used following code to display sale column in product grid

    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    /**
     * Copyright © 2016 Magento. All rights reserved.
     * See COPYING.txt for license details.
     */
    -->
    <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
        <columns name="product_columns" class="Magento\Catalog\Ui\Component\Listing\Columns">
            <column name="sale">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="filter" xsi:type="string">select</item>
                        <item name="add_field" xsi:type="boolean">true</item>
                        <item name="label" xsi:type="string" translate="true">Sale</item>
                        <item name="options" xsi:type="array">
                            <item name="disable" xsi:type="array">
                                <item name="value" xsi:type="string">1</item>
                                <item name="label" xsi:type="string" translate="true">Active</item>
                            </item>
                            <item name="enable" xsi:type="array">
                                <item name="value" xsi:type="string">0</item>
                                <item name="label" xsi:type="string" translate="true">Deactive</item>
                            </item>
                        </item>
                        <item name="sortOrder" xsi:type="number">75</item>
                    </item>
                </argument>
            </column>
        </columns>
    </listing>

I have put this code in view/adminhtml/ui_component/product_listing.xml

Issue is when i used this product_listing.xml file product grid filter  not displayed and when i click on filter icon filter is display on bottom of grid.


texts: Optimal Way Of Adding To The getBodyClass Method

texts:
This question relates to optimization. I'm using 1.7.0.2 CE.

I am adding a CSS <body> class conditionally to my frontend page(s). I have used an XML rewrite to introduce my own logic:

File: app/code/local/Jongosi/Module/etc/config.xml
...
<global>
    <blocks>
        <page>
            <rewrite>
                <html>Jongosi_Module_Block_Page_Html</html>
            </rewrite>
        </page>
    </blocks>
</global>
...

In that class, I rewrite the getBodyClass method:

File: app/code/local/Jongosi/Module/Block/Page/Html.php

class Jongosi_Module_Block_Page_Html extends Mage_Page_Block_Html
{
    public function getBodyClass()
    {
        parent::getBodyClass();
        // my own logic here
        return $this;
    }
}

The 'problem' is that this method is called many times per page load (4 times on a default install on the home page, 8 times on product pages). My custom logic is fairly intensive.

The <body> class must be rewritten for every page load.

However, I don't want my logic to run 8 times because it is increasing the page load. I am currently using a cookie, set to 3 second lifetime, but it feels dirty. I set the cookie on first iteration and then read it for the remaining 7 loops.

I hope what I'm trying to do is clear. Is there a way to cache the result for the page load only, then have it re-run the logic on the next page load? I've trawled through the core, but nothing I've found seems to provide a good solution.

Thank you.


texts: Magento 1: Add Customer Group in Order Grid

texts:
I want to add a column in Sales > Order Grid for "Customer Group" after the "Ship to name" column.
I know i need to modify app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php

Could someone please help me with the proper code?  Also, i don't want to build a custom module for this column.
Thank you!

Using Magento 1.8


texts:
Suddenly something very strange happen. In Catalog-Attributes-Manage Attributes the content appear in left column. The main column is empty.

This happen only to Attributes.
There are 2 columns: "side-col" and "main-col". For some reason all data is "side-col".
I try to disable third-party extensions but nothing change.


texts:
I want to ask something..
Do you ever use UPS Shipping module in magento?
I have weird case.. If I set shipping settings from "United States", the shipping module is working well..

But, If I set it from indonesia ( I already check the zip code fromups.com/ctc ), it's shows me nothing.. And I'll check it from ups.com/ctc , it shows me result..
So, anyone know about this problem?
Thanks


texts: How to enable show and hide search bar box

texts: How to show and hide the search bar input field I want to open it while I click on search bar icon?


texts: Magento- Custom attribute not displayed in product "Update Attributes"

texts:
There's a custom attribute inserted in magento by third party extension. This attribute is not listed among other attributes on Catalog > Manage Products > Actions > Update Attributes.

Are there any requirements in order an attribute to be able to edited massively on products?


texts: How to give discount to simple product under a bundle product?

texts:
I have bundle products which has 5 simple products as its options to be selected (Say, Product-A,Product-B,Product-C,Product-D,Product-E)

I want to design a coupon code which should offer like this:
If I purchase a bundle products and if that includes Product-C in its selection, then there should be 100% discount for the price included for Product-C and rest prices would be calculated as it is.

Whereas if the bundle product doesn't includes Product-C in its selection, then no deduction in price for that particular bundle product.

So, If I am selecting 3 bundle products, 2 of them having Product-C and if coupon code applied, then it should reduce price amount for Product-C for those 2 products but should be no effect in rest of the bundle product.

Is there a way to do this?


texts: Why did my header and footer links disappear after creating Magento_Theme?

texts:
I copied vendor/magento/module-theme/view/frontend/* to app/design/frontend/MyVendor/MyTheme/Magento_Theme and my header top.links and footer links all vanished!

Can someone please let me know why this is happening?

After doing more research, could it be because my theme's parent is Luma and not blank? Any help would be appreciated!


texts: Magento 2 Issue Observer Calling only One Time when Get Search Term Using Observer

texts:
I want to get the search term of current user. And according to that search term get products using custom query.

My observer is calling only one time when Cache is enabled.

Please provide me some help or suggestion.

<event name="controller_action_postdispatch_catalogsearch_result_index">

    <observer name="searchObserver" instance="Vendor\Module\Observer\Search\Data" />

</event>

<?php

namespace Vendor\Module\Observer\Search;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Stdlib\Cookie\CookieMetadataFactory;
use Magento\Framework\Stdlib\CookieManagerInterface;

class Data implements ObserverInterface {

const COOKIE_NAME = 'categoryId';
const COOKIE_DURATION = 86400; // One day (86400 seconds)

protected $_cookieManager;

/**
 * @var CookieMetadataFactory
 */
protected $_cookieMetadataFactory;
protected $_queryFactory;
protected $_filterBuilder;
protected $_searchCriteriaBuilder;
protected $_searchInterface;

public function __construct(
CookieManagerInterface $cookieManager, CookieMetadataFactory $cookieMetadataFactory, \Magento\Search\Model\QueryFactory $queryFactory, \Magento\Framework\Api\FilterBuilder $filterBuilder, \Magento\Framework\Api\Search\SearchCriteriaBuilder $searchCriteriaBuilder, \Magento\Search\Api\SearchInterface $searchInterface
) {
    $this->_cookieManager = $cookieManager;
    $this->_cookieMetadataFactory = $cookieMetadataFactory;
    $this->_queryFactory = $queryFactory;
    $this->_filterBuilder = $filterBuilder;
    $this->_searchCriteriaBuilder = $searchCriteriaBuilder;
    $this->_searchInterface = $searchInterface;
}

/**

 * Below is the method that will fire whenever the event runs!

 *

 * @param Observer $observer

 */
public function execute(Observer $observer) {
    $data = $observer->getData();
    $searchTerm = $this->_queryFactory->get()->getQueryText();
    $this->_filterBuilder->setField('search_term')
        ->setValue($searchTerm)
        ->setConditionType("like");

    $this->_searchCriteriaBuilder->addFilter($this->_filterBuilder->create());
    $searchCriteria = $this->_searchCriteriaBuilder->create();
    $searchCriteria->setRequestName("quick_search_container");
    $searchResults = $this->_searchInterface->search($searchCriteria);

    print_r($searchResults->getItems());
    $products = $searchResults->getItems();
    foreach ($products as $product) {

        echo $id = $product->getId();
        $result[] = $id;

    }
    exit;
    return $this;
}

}


texts:
How can we enable this checkbox as standard? Now it is off by default. It concerns the checkbox to send the tracking data directly to the customer by e-mail.

https://i.stack.imgur.com/GfYAd.png


texts: Magento 2 : Programmatically Create Customer and Then Login

texts:
I am trying to create customer and then login programmatically. Below is my code :

<?php

use Magento\Framework\App\Bootstrap;

require __DIR__ . '/app/bootstrap.php';

$params = $_SERVER;

$bootstrap = Bootstrap::create(BP, $params);

$obj = $bootstrap->getObjectManager();

$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

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

$storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
$websiteId = $storeManager->getStore()->getWebsiteId();

$firstName = 'Test';
$lastName = 'Test';
$email = 'test@example.com';
$password = 'Test@123';

$address = array(
    'customer_address_id' => '',
    'prefix' => '',
    'firstname' => $firstName,
    'middlename' => '',
    'lastname' => $lastName,
    'suffix' => '',
    'company' => '',
    'street' => array(
        '0' => 'Customer Address 1', // this is mandatory
        '1' => 'Customer Address 2' // this is optional
    ),
    'city' => 'New York',
    'country_id' => 'US', // two letters country code
    'region' => 'New York', // can be empty '' if no region
    'region_id' => '43', // can be empty '' if no region_id
    'postcode' => '10450',
    'telephone' => '123-456-7890',
    'fax' => '',
    'save_in_address_book' => 1
);

$customerFactory = $objectManager->get('\Magento\Customer\Model\CustomerFactory')->create();

/**
 * check whether the email address is already registered or not
 */
$customer = $customerFactory->setWebsiteId($websiteId)->loadByEmail($email);

/**
 * if email address already registered, return the error message
 * else, create new customer account
 */
if ($customer->getId()) {
    echo 'Customer with email '.$email.' is already registered.';
} else {
    try {
        $customer = $objectManager->get('\Magento\Customer\Model\CustomerFactory')->create();
        $customer->setWebsiteId($websiteId);
        $customer->setEmail($email);
        $customer->setFirstname($firstName);
        $customer->setLastname($lastName);
        $customer->setPassword($password);

        // save customer
        $customer->save();

        $customer->setConfirmation(null);
        $customer->save();

        $customAddress = $objectManager->get('\Magento\Customer\Model\AddressFactory')->create();
        $customAddress->setData($address)
                      ->setCustomerId($customer->getId())
                      ->setIsDefaultBilling('1')
                      ->setIsDefaultShipping('1')
                      ->setSaveInAddressBook('1');

        // save customer address
        $customAddress->save();

        // Create customer session
        $customerSession = $objectManager->create('Magento\Customer\Model\Session');
        $customerSession->setCustomerAsLoggedIn($customer);

        echo 'Customer with email '.$email.' is successfully created.';

    } catch (Exception $e) {
        echo $e->getMessage();
    }
}

Above code create customer successfully as I can find them in database but they are not visible in admin customer grid. Also, after creating customer I am trying to login programmatically but no success. Please help.


texts: Custom attribute not showing in advance search page

texts:
I have created custom attribute programmatically as show below code.

$installer = $this;
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$installer->startSetup();
$setup->addAttribute('catalog_product', 'custom_attribute', array(
    'group' => 'General',
    'input' => 'select',
    'type' => 'int',
    'label' => 'custom_attribute',
    'source' => 'Namespace_Module_Model_Source_Customattribute',
    'required' => 0,
    'user_defined' => 1,
    'searchable' => 0,
    'filterable' => 0,
    'comparable' => 0,
    'visible_on_front' => 1,
    'visible_in_advanced_search' => 0,
    'is_html_allowed_on_front' => 0,
    'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
));
$installer->endSetup();

In this above script I have set  'visible_in_advanced_search' => 0 but now I have requirement that I need to enable to for advance search.

For that I created upgrade script and used this code to modify this attribute.

$installer = $this;
$installer->startSetup();
$installer->updateAttribute('catalog_product', 'custom_attribute', 'is_visible_in_advanced_search', 1);
$installer->endSetup();

But it hasn't worked. Please suggest what should I do to enable it for advance search.


texts: Programatically Add entry in custom table when from admin panel user is created

texts: I want when from admin panel user is created then entry also inserted into my custom table. I want this information in my table which consists following structure User_id,full_name_email. Where i write insert query for my requirement.


texts:
I seem to have set up everything correct in magento admin but emails for orders or confirmation or newsletter subscription do not seem to work, they seem to succeed,
But I do not receive any emails

Any one can please help me after trying all?

I use cpanel with whm, centos 7

Do I have to set up special email settings, something I see over my head?

Thanks a lot for your help


texts: What should the action attribute in menu.xml be?

texts:
In the file menu.xml located in MyNamespace\Mymodule\etc\adminhtml\menu.xml, I understand that this file allows me to add new items to the navigation menu in admin panel.

In the <add> tags, there is an action attribute that contains values that look like something/somethingelse. For eg:

<add id="MyNamespace_MyModule::mymodule_testing" title="Some title" module="MyNamespace_MyModule" sortOrder="10" action="Part_A/Part_B" />

What should be entered in the Part_A and Part_B of the action attribute? I doubt they are arbitrary. What do they refer to and what do they stand for? What effects would it have if I put in a wrong thing into this attribute?


texts:
I used Magento phone number validation validate-length maximum-length-11 minimum-length-11 validate-digits for phone number

is any other way to restrict phone number?


texts: I found this file /vendor/magento/module-customer/Controller/Account/LoginPost.php file is having some code. What is the explanation of below code?

texts:
I want to know what actually these two lines of code are doing.
    $redirectUrl = $this->accountRedirect->getRedirectCookie();
    if (!$this->getScopeConfig()->getValue('customer/startup/redirect_dashboard') && $redirectUrl) {


texts: How to Set Banner in homepage above the 2-column with left bar?

texts:
I need to place banner in magento homepage.
My homepage config:

  I set my homepage as 2-column with leftbar in CMS -> Pages.
  I need to set the banner in above 2-column with leftbar layout.

like this,
(HEADER)

(BANNER)

(2-COL with left bar).

Please help me I am new to magento.


texts: How can I show related products in magento 1.9

texts:
I am using Magento 1.9 with porto theme. i want to show related product in product page . I searched a lot on google , stack platform & in magento community. i tried all possible ways to add related products but failed . does anyone know exactly how to show related products ? I do reindex from

Login to Admin
Go to System -> Index Management
Select All checkboxes
Select 'Reindex Data' from Actions selection list
Click Submit button
I tried various method to add related products in product page as given in other posts like edit  in Catalog.xml & view.phtml . Unfortunately I Stuck , If any one know kindly help me.


texts: Customized contact us page for logged in user

texts:
I wish to add a contact us page customized for the logged in user in magento2 website. It should be like it's activated when a person is logged in and it should not ask for name or email , it should be populated with the name from account only.  Only text field to ask a question should be active.  I tried putting a block with a call to the contact us page, but it won't work as I need it to work. How should I approach this?
thanks


texts: Very Slow Magento MySQL Query - MySQL eav_entity_store select

texts:
Hi guys I have showing in new relic a VERY slow query on /checkout/onepage/success/ on multiple store views on my Magento installation.

It is taking 57 seconds!

SELECT `eav_entity_store`.* FROM `eav_entity_store` WHERE (entity_type_id = :entity_type_id) AND (store_id = :store_id) FOR UPDATE

We have around 30 store views but does anyone have any idea why this specific query would take so long? The table is fairly small so I am stumped!

Thanks!


texts:
Where to begin? An AJAX call is made to the Index controller action like so:

xmlhttp.open("GET",encodeURI(ctrlPath)+'?pId='+encodeURIComponent(pId)+'&pName='+encodeURIComponent(pName)+'&pUrl='+encodeURIComponent(pUrl)+'&email='+encodeURIComponent(cliendEmailId),true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send();

The controller Index action contains:

public function storeNotificationProductDataAction()
{
    header('Access-Control-Allow-Origin: *');
    $notifySuccessMes =  Mage::getStoreConfig('Outofstocknotification/general/activate_apptha_outofstock_notify_success_mes');
    $statusOfInsert = Mage::getModel('outofstocknotification/outofstocknotification')->notifyDataInserted();
    $statusOfInsert = intval($statusOfInsert);

    if ($statusOfInsert) {
        echo $notifySuccessMes;
    } else {
        echo "okay";
    }
}

The getModel() above calls the following model:

public function notifyDataInserted() {
    $isArray = count($_GET);
    $resource = Mage::getSingleton('core/resource');
    $read = $resource->getConnection('write');

    var_dump($_GET);

    $tPrefix = (string) Mage::getConfig()->getTablePrefix();
    $stockNotifiTable = $tPrefix . 'outofstocknotification';

    $this->getTable('outofstocknotification');
    if ($isArray) {
        ...blah blah blah db stuff
    }
}

The var_dump() retuns an empty array: array(0) { }. The AJAX calls fails with canceled but a direct call to the URL results in okay.

So, the GET variable is empty in the model. Please tell me why?

Also, this is NOT my code, please don't hate :)


texts: Always open default store in Magento 1.9

texts:
I have two stores 'English' and 'Arabic'. I have set 'Arabic' store as default store and first time when I open browser 'Arabic' store opens automatically but when I change the store from 'Arabic' to 'English' and close the browser and then open the website again it opens 'English' store.

I want that whenever the website is opened after closing browser the default browser should be always 'Arabic'.

Thank you


texts: How to create jewellery ring configuration module?

texts:
I am going to create ring configure module for my project in Magento 2.1 where I will select diamond than diamond setting ring and in third step I will select selected ring size.

Exactly I want is in reference URL.

Reference URL is : http://www.brilliantearth.com/design-your-own-engagement-ring/?nav=1

If there is any module exist or have any possible approaches to achieve this task please share.

Thanks.


texts: How can i change the default layout of login.phtml in magento. Suppose , now by default the layout for login.phtml is 1column.phtml and if I want this to change to 3column.phtml, what should I do?


texts: Custom System Configuration not showing in Store View

texts:
Hi I'm trying to figure out why is it that my custom menu under store->settings->configuration is not displaying when I select the store view. If it's in the Default config its displaying properly but when I select a store view it disappear. May I know why? and how can I have this custom menu display in the system configuration even if I change the store view. Below is my system.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="menu_config" translate="label" sortOrder="100">
            Menu Config
        </tab>

            <class>separator-top</class>
            Mega Menu
            <tab>menu_config</tab>
            <resource>My_CustomMenu::mega_menu_config</resource>
            <group id="general" translate="label" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                Configuration Settings
                <comment>Setup configuration and behavior of the Mega Menu.</comment>
                <field id="dropdown_custom" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    Menu display type                    <source_model>My\CustomMenu\Model\Config\Custom</source_model>
                </field>
            </group>

    </system>
</config>

This file is located in my module/etc/adminhtml/system.xml


texts: How to remove Special price and Regular price label from product detail page?

texts:
I tried,

app/locale/en_US/Mage_catalog.csv

Where to find this path in Magento 2?

I tried,

Stores –> Configuration –> ADVANCED –> Developer –> Magento
     Developer –> Translate Inline
Change "Enabled for Frontend" from 'No' to 'Yes'.
Press Save Config
Refresh Cache

But how to remove red lines?

Actually I have not understood properly. Can anyone explain briefly?


texts:
I am struggeling to set a certain set of attributes to my product page. I want to list certain attributes directly under the "short description".

I already copied and edited the attributes.phtml -> attributescontrollers.phtml

This file has a filter set:

<?php
$_helper = $this->helper('catalog/output');
$_product = $this->getProduct()?>
<?php if($_additional = $this->getAdditionalData()): ?>

    <?php foreach ($_additional as $_data): ?>
    <?php $test_value = $this->escapeHtml($this->__($_data['label'])); ?>
    <?php if (strpos($test_value,'Color') !== false) { ?>

            <?php echo $this->escapeHtml($this->__($_data['label'])) ?>

            <?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?>

    <?php } ?>
    <?php endforeach; ?>

This way only the Color attribute is listed (will be a longer list). I also created the blcok I wanted in my catalog.XML

<block type="catalog/product_view_attributes" name="product.attributes" as="compatibility" template="catalog/product/view/attributescontroller.phtml"/>

Once again, this works fine if I call it outside of the view block.

How can I add this block just under the short description?


texts: multiselect form field not saved to database in magento 2

texts:
I have created a custom admin form.

$fieldset->addField(
    'core_units',
        'multiselect',
        [
            'name' => 'core_units[]',
            'label' => __('Select Core units'),
            'title' => __('Select Core units'),
            'class' => 'core_units',
            'values' => [
                         ["value" => 1,"label" => __("Option 1")],
                        ["value" => 2,"label" => __("Option 2")],
                      ["value" => 3,"label" => __("Option 3")],
                     ["value" => 4,"label" => __("Option 4")],
                      ["value" => 5,"label" => __("Option 5")],
                       ]
        ]
    );

    $fieldset->addField(
    'optional_units',
        'multiselect',
        [
            'name' => 'optional_units[]',
            'label' => __('Select Optional units'),
            'title' => __('Select Optional units'),
            'class' => 'optional_units',
            'values' => [
            ["value" => 1,"label" => __("Option 1")],
            ["value" => 2,"label" => __("Option 2")],
            ["value" => 3,"label" => __("Option 3")],
            ["value" => 4,"label" => __("Option 4")],
            ["value" => 5,"label" => __("Option 5")],
                        ]
        ]
    );

Here is my Save controller file code.

class Save extends \Magento\Backend\App\Action
{

public function execute()
{

    $data = $this->getRequest()->getParams();
    if ($data) {
        $model = $this->_objectManager->create('X247commerce\Qualbuilder\Model\Qualbuilder');

        $id = $this->getRequest()->getParam('id');
        if ($id) {
            $model->load($id);
        }

        $model->setData($data);

        try {
            $model->save();
            $this->messageManager->addSuccess(__('The Frist Grid Has been Saved.'));
            $this->_objectManager->get('Magento\Backend\Model\Session')->setFormData(false);
            if ($this->getRequest()->getParam('back')) {
                $this->_redirect('*/*/edit', array('id' => $model->getId(), '_current' => true));
                return;
            }
            $this->_redirect('*/*/');
            return;
        } catch (\Magento\Framework\Model\Exception $e) {
            $this->messageManager->addError($e->getMessage());
        } catch (\RuntimeException $e) {
            $this->messageManager->addError($e->getMessage());
        } catch (\Exception $e) {
            $this->messageManager->addException($e, __('Something went wrong while saving the banner.'));
        }

        $this->_getSession()->setFormData($data);
        $this->_redirect('*/*/edit', array('banner_id' => $this->getRequest()->getParam('banner_id')));
        return;
    }
    $this->_redirect('*/*/');
   }
}

The above code showing the multi select drop down in the form, but whenever options selected and saved, its not getting saved to database.

I am posting the controller data.

 Array
(
 [key] => 4317ff2ff34444a61eac0c70b0502924318cb0465c3c7244b0e59eef5c593059

[form_key] => ndLnj7PmwQfgbKYG
[core_units] => Array
    (
        [0] => 1
        [1] => 3
    )

[optional_units] => Array
    (
        [0] => 1
        [1] => 3
    )

)

If same row re-opened again. the options are non selected.

can anyone look into this and update me your thoughts.

Thanks in advance


texts: Magento2 : Multiple entries are creating in newsletter_subscriber table if i subscribe from different stores

texts: I have 3 stores, If i subscribe from English store one entry will create with status as 1 in db.then I changed the store from English to French and subscribe to the newsletter, instead of update the same entry new entry is creating with status 1.How to fix this issue.(Magento2.2.6 EE)


texts: Magento 1.9.3: every product is displayed in the search in full text mode

texts:
When searching for a product in 1.9.3, every product comes up in the list in fulltext mode.

How do I fix that issue ?


texts: Disable Place order button on checkout page until checkout agreement checkbox is checked

texts:
I need to disable place order button until checkout agreement checkbox is checked. I have written some jquery code to achieve this:

$('.action.primary.checkout').attr("disabled",true);

$(".checkout-agreement input[type='checkbox']").change(function() {
$('.action.primary.checkout').attr('disabled',false);
});

If I run this code through browser the result is shown. However if I put this code in my theme's custom js file, the result is not reflected.

The file is loaded on the checkout page(payment page).


texts: One Cateogry showing 404 - Subdirectory store

texts:
I have a subdirectory store which is MYURL/demo

I then have categories in there MYURL/demo/shop/category1 MYURL/demo/shop/category2

My initial categories are working fine, worth noting I have upgraded to 1.9.2.2 recently (EDIT: Tried on test environment which is still 1.9.0.1 and I get the same). I try to add a new category, checked the settings, exactly the same as the previous.

It shows up on MYURL/shop which lists the categories, but when I click through to the category I have a 404.

I also have a product inside it, which if I move to another category works fine!

Can anyone suggest how I can debug why this isn't displaying?

EDIT: Did some logging to in Category Helpers to see if an issue with the ID, Active State or Root Category with no issues


texts:
When accessing http the cart does not update until several minutes. This is true both after add to cart which puts you on an empty cart page, or when updating or clearing the cart on the cart page.
On https:// the cart functions normally.
See link to store


texts: I have a problem with my Magento 1.9.2.3 stores in that every morning I wake up and the Admin says "One or more of the cache types are invalidated..." and I need to clear the cache. Previously I have set up a cron job to delete the var/cache folder at 6am every morning which worked fine. However, I would like to use Redis or Memcached now but am not sure how I could clear the cache with these automatically like cron. And is the solution the same for both Redis and Memcached?


texts:
I have a file which is stored in magento root.If I access this file from browser like : localhost/test_magento/new.php,it works fine.

But when I tried to access this file from android mobile it always respond me with "403 Forbidden : You don't have permission to access /test_magento/new.php on this server".

Where I am going wrong ?


texts: Magento how to set attribute seo meta title and description product

texts:
I have a catalog of 30,000 products on Magento, and I would make sure that the plugin I of seo (free) all products have tag, store name, category name. I turned on the network, to see how to build an attribute, then add the plugin but without results.

As in the screen, I do not know what attribute inserting in the document, how to create it or create it where this attribute.


texts: How to use javascript in ko template in magento 2?

texts:
I have a custom module which will overrride vendor\magento\module-checkout\view\frontend\web\template\shipping-address\shipping-method-item.html, here is the code

        <input type="radio"
               class="radio"
               ifnot="method.error_message"
               ko-checked="element.isSelected"
               ko-value="method.carrier_code + '_' + method.method_code"
               attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code,
                    'checked': element.rates().length == 1 || element.isSelected" />

        <each args="element.getRegion('price')" render="" />

                <?php echo __('Pick_up_name') ?>
                <input type="text" name="pick_up_name">

            <input type="radio"
                   attr="'value' : method.method_code, 'id': 's_method_' + method.method_code" />

I want to add some javascript in above page but not successfull, anyone how to do that?


texts: Custom block is not showing on my account page

texts:
I created a block on app/code/local/Mage/Catalog/Block/Product/Mostviewed.php

Mostviewed.php

<?php

class Mage_Catalog_Block_Product_Mostviewed extends Mage_Catalog_Block_Product_Abstract{
    public function __construct(){
        parent::__construct();
        $storeId    = Mage::app()->getStore()->getId();
        $products = Mage::getResourceModel('reports/product_collection')
            ->addOrderedQty()
            ->addAttributeToSelect('*')
            ->addAttributeToSelect(array('name', 'price', 'small_image'))
            ->setStoreId($storeId)
            ->addStoreFilter($storeId)
            ->addViewsCount();
        Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
        Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);

        $products->setPageSize(5)->setCurPage(1);
        $this->setProductCollection($products);
    }
}

On my app/design/frontend/base/default/layout/customer.xml included my block as below

<block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml">
                .
                .
                .
                .
                .
                <block type="catalog/product_mostviewed" name="catalog_product_mostviewed" as="most_viewed" template="catalog/product/mostviewed.phtml"/>
            </block>

I added below in my dashboard.phtml

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

I added template file in MY_THEME/catalog/product/mostviewed.phtml But it is not showing and no error tagged in system.log also


texts: Orders are missing in Magento but showing as paid in Paypal

texts:
I have missing orders in Magento which were actually paid for without confirmation, nor an email and are absent in Magento back-end.
As a test I place an order and I don't see anything going on the last point of checkout. I think that something went wrong.
I check my store for new orders I check my emails but nothing. So naturally I place the order again as I think it wasn't processed. Second time it went through fine. Later I see on PayPal that I actually placed 2 orders and charged for two orders.
The database doesn't show the two only the second one. However in PayPal there are two order numbers (e.g. 1777587 and 1777588) and in the database just one (e.g. 1777588). Obviously the number is being generated by Magento given to PayPal to process but not being saved. Weird!
However it doesn't happen every time to every one but it happens 15% of the times lately. Thats not good people get charged twice or I lose orders.


texts:
I use MasterCard Internet Gateway Service (MIGS) - Hosted Server (3-Party Payments) http://www.appmerce.com/migs-vpc-mastercard-internet-gateway-service-magento.html#.VkWD9b_CeiE

1: http://www.appmerce.com/migs-vpc-mastercard-internet-gateway-service-magento.html#.VkWD9b_CeiE  module for payment.i configure all detail but after redirecting it to api.it gives Invalid Digital Order  MIGS Payment Gateway  error.
here is screenshot

i don't know what is issue  .i googled about this but not success.


texts: Magento2 How can i show search field through wysiwyg editor?

texts:
Magento2 how can i show search field though wysywyg editor?
I am using theme inherted by default blank theme.


texts:
Has anybody used any extension for a US eshop to import the various TAX automatically?

I had accurateTax for Magento 1, but they don't support M2. What is the best option for Magento 2.1.4?


texts: How to optimize images loaded into site from instagram?

texts: I am currently working on a website loaded with multiple social media items.  I have optimized the js, css and other files.  My current problem is that there is an instagram slider that takes the pictures from instagram and it slows down the loading of the site.  The images are updated a couple of times a week and we cant have static pictures.  How do I work on this to improve the loading speed of the slider?  Do I load it only after the whole page is loaded or is there a better way to do it?


texts:
what will be output of the following program

<?php
class Test
{
    protected $_value;

    public function __construct()
    {
        $this->_value = 1;
    }

    public static function getOutput()
    {
        //echo "hello";
        return $this->_value*5;
    }
}
echo Test::getOutput();
?>

I think it should be 5 but it gives blank.Can anybody describe why it blank page?


texts:
I just did a fresh install of Magento 2.1.5 and there is not a folder for app/code/core or app/code/community

Where can I get all the files under the core and community folder?

I went through some tutorial online and they always reference files from these folders.

Is there a link where I can download the files and add them to these folders?

Thanks


texts: How to check if customer is logged in or not?

texts:
How to find if a customer is logged in or not in Magento 2.

If the customer is logged in then how to get customer data from a session?


texts: What is the purpose / attack behind people doing covert automated customer registration?

texts:
We have recently observed people creating customer accounts automatically on Magento sites in bulk. Errors in their tools make it obvious that all the accounts they're creating are linked, such as identical corrupted data in signup fields, even though the registration HTTP requests are spread out over time, from a variety of IPs, and using different useragents.

We have never seen these accounts log in or return after the creation step.

So given someone's collecting a list of working customer account/passwords for a particular Magento instance, what purpose could these bulk accounts be for? Is there an attack or exploit class that this is a sign of / warning for?


texts: VARCHAR truncated to 25 characters when saved through model

texts:
Given mysql column is created under a table after extension installation. As mentioned, the size of VARCHAR column is 100.

$table_config->addColumn(
'value',
Varien_Db_Ddl_Table::TYPE_VARCHAR,
100,
array(
    'nullable' => false,
)

);

But when I try to save a created API key through model->save() method. The string gets truncated to 25 characters only.

$key = hash('sha256', 'mm_'.rand());
/save API Key in the configure page
    Mage::getModel('mm_sync/config')->setData(array(
            'name'  => 'api/key',
            'value' => $key,
        ))
        ->save();

The same value in the table:

+-----------+---------+--------------------------+
| config_id | name    | value                    |
+-----------+---------+--------------------------+
|         1 | api/key | 91XVVbiUBMDt40jZgKA51g== |

Any clue ?


texts: Change product price based on stock quantity in magento 1.9

texts:
I have a situation where the product price should change based on the number of items on inventory. Example, if the stock has > 10 item then the product price should be some special price like 100$. If the stock is < 10 then the price should show the original price of the product.

I have created a custom module with a custom attribute(minQtyApplicableForSpecialPrice) for minimum quantity applicable for the special price. Now I have to change all the places like the product, cart and checkout pages where the price should show the special price based on minQtyApplicableForSpecialPrice value.

Any help is appreciated. Thanks in advance.


texts: Magento 2 using around interceptor/plugin to modify exception message

texts:
In the Magento\Checkout\Model\PaymentInformationManagement::savePaymentInformationAndPlaceOrder() method all exceptions are caught and   CouldNotSaveException is created with a generic message.

I want to make this message user friendly as I am implementing a fairly complex restriction and the generic message would cause lots of confusion for the customer.

    public function savePaymentInformationAndPlaceOrder(
    $cartId,
    \Magento\Quote\Api\Data\PaymentInterface $paymentMethod,
    \Magento\Quote\Api\Data\AddressInterface $billingAddress = null
) {
    $this->savePaymentInformation($cartId, $paymentMethod, $billingAddress);
    try {
        $orderId = $this->cartManagement->placeOrder($cartId);
    } catch (\Exception $e) {
        throw new CouldNotSaveException(
            __('An error occurred on the server. Please try to place the order again.'),
            $e
        );
    }
    return $orderId;
}

My idea to work around this issue was to create an around plugin so that I could catch the new Exception the throw the previous exception which I create via an observer level check.

public function aroundSavePaymentInformationAndPlaceOrder(
    \Magento\Checkout\Model\PaymentInformationManagement $subject,
    callable $proceed,
    ...$args
) {
    try {
        $result = $proceed(...$args);
    } catch (\Magento\Framework\Exception\CouldNotSaveException $e) {
        throw $e->getPrevious();
    }

    return $result;
}


texts: Searchbar - Javascript? Making stuff retractable

texts:
I know I've been asking a lot of questions lately, but there is so much I need to know and learn.

My question this time around is: How do I create a searchbar like this?

You know, it being able to drop down and all.
I've tried it in the past, but so far haven't been able to create a retractable searchbar.
I've learned some javascript in the past, but either I am too rusty to get the job done or I just didn't learn about making retractable content like that.


texts: Magento 2.4 category page product not load

texts:
Magento 2.4 category page default product collection doesn't load. And elasticsearch working perfect. So Please help me.
THANKS.


texts:
how to integrate ccavenue manually in magento 1.9.

i followed those steps but did't get any option in payment method

Step1: Get module from CCAVENUE
Step2: Get your working key from CCAVENUE site. Keep your merchant id handy.
Step3: Open the module folder. Copy the folder Avenues to app\code\core\Mage
Step4: From Module folder Copy the file Mage_Avenues .xml to app\etc\modules
Step5: From module folder Copy the folder avenues to app\design\adminhtml\default\default\template
Step6: Open ..\app\code\core\Mage\avenues\controllers\StandardController.php and mention your working key in it.
Step7: Open ..\app\code\core\Mage\avenues\controllers\libfuncs.php goto line 56. function cdec, and add $dec = 0; within it before the loop. (this solves the variable not defined bug)
Step8: In Magento backend Refresh all cache and reindex all
Step9: In CCAVENUE backend setup redirect page.
Step10: SETTING IT UP IN MAGENTO: • Click on configuration, Click on payment methods, Select Cavenuepayment, Enter the merchant_Id, Enter the workingkey Save configuration

i followed those steps but did't get any option in payment method
 Step1: Get module from CCAVENUE

Step2: Get your working key from CCAVENUE site. Keep your merchant id handy.

Step3: Open the module folder. Copy the folder Avenues to magento\app\code\core\Mage

Step4: From Module folder Copy the file Mage_Avenues .xml to magento\app\etc\modules

Step5: From module folder Copy the folder avenues to magento app\design\adminhtml\default\default\template

Step6: Open ..\app\code\core\Mage\avenues\controllers\StandardController.php and mention your working key in it.

Step7: Open ..\app\code\core\Mage\avenues\controllers\libfuncs.php goto line 56. function cdec, and add $dec = 0; within it before the loop. (this solves the variable not defined bug)

Step8: In Magento backend Refresh all cache and reindex all
Step9: In CCAVENUE backend setup redirect page.
Step10: SETTING IT UP IN MAGENTO: • Click on configuration, Click on payment methods, Select Cavenuepayment, Enter the merchant_Id, Enter the workingkey Save configuration


texts: how to get category product reviews count in magento 2?

texts: How to get the category products review count in category page and calculate the review stars?


texts: How do I get the minimal price of a grouped product from a product collection?

texts:
I'm loading all products using the product collection resource model.

$_categoryId = $this->getCategoryId();

$_productCollection = Mage::getResourceModel('catalog/product_collection')
        ->addMinimalPrice()
        ->addFinalPrice()
        ->addTaxPercents()
        ->addCategoryFilter(Mage::getModel('catalog/category')->load($_categoryId))
        ->addAttributeToSelect('*')
        ->addAttributeToFilter('status', 1)
        ->addAttributeToFilter('visibility', 4);

I'm however not able to display the minimal price of grouped products using for example.

echo $_productCollection->getFirstItem()->getMinimalPrice();

This does work for simple products. This seems to be related to the fact that this is a core/template block type and not a catalog/product_list block. But using catalog/product_list is not an option due to other reasons.


texts: magento 2 Cant show products on categories

texts: I have added some products in one category. All products are enabled, with quantity and catalog, search option, I have also disabled cache and reindexed multiple times but on the frontend the product will show only if I directly access the products url and they do not show up on the category page.


texts:
I want data from the order table which contain products related to category ID(80). This is the category ID.
And want data From: 2012-11-17 to 2015-9-15.
Data I needed (Name, email, shipping address, phone number.)


texts: Magento 2 - Get attribute options and sort order

texts:
I need to get the label and sort order (as defined in backend) of all the options of a custom attribute, programmatically.

I'm using this interface: Magento\Eav\Api\AttributeRepositoryInterface

This is what I tried already:

// Access to the attribute interface
$attribute = $this->_attributeRepository->get(\Magento\Catalog\Model\Product::ENTITY, 'attribute_code');

// Get an array of options
$options = $attribute->getOptions();

// Get the label and sort order of each option
foreach ($options as $option) {
    var_dump($option->getLabel()); // Works OK
    var_dump($option->getSortOrder()); // Always returns NULL
}

I have double checked and there exists a sort order, both in database and in admin area, but the getSortOrder method always returns NULL.

Any ideas?


texts: What are correct methods to implement in a repository?

texts:
What methods is a repository required to implement?

The documentation (https://devdocs.magento.com/guides/v2.3/extension-dev-guide/service-contracts/design-patterns.html) states that you need to implement save(), get(), getList(), delete() and deleteById(). But I often see example in Magento core that use different variations such as getById() instead of just get(). Or use completely different methods.

Is there a standard? Any tutorials that could be recommended?


texts: Extension to Save Credit Card Details to Create One Step Checkout Process

texts:
We are into Magento ecommerce development and we would like to know if there is any possibility to save credit card details of the user (name, CC number, Exp Date).  We are creating one website with a fast checkout process, so whenever a repeat customer wants to purchase something he/she does not have to see or update billing, shipping and payment information. Let us know, if there are any Magento extensions, any audio, video tutorials or any documentation that could help us to achieve our aim.

I tried with CLS PayPal Credit Card Tokenization, but failed to get expected results, we will be glad if we get any hints, guidance or help.

Thanks a lot in Advance


texts:
I'm writing a custom import script that needs to allow admins only to work. I'm new to Magento and having trouble extracting the session. It's actually an old script someone else wrote, and I'm trying to make sense of it. What I did so far was create a directory product_import in the root folder and put the following in index.php:

require_once (__DIR__ . '/../app/Mage.php');
ini_set('auto_detect_line_endings', TRUE);

Mage::app('admin');
Mage::getSingleton('core/session', array('name'=>'adminhtml'));
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

if(Mage::getSingleton('admin/session')->isLoggedIn() === false) {
    echo 'Not logged in!'; die();
}

echo 'Logged in!';

Now, even though I'm logged in as admin, I keep getting the Not logged in message. What am I doing wrong?


texts:
I'm newbie with Magento and I need something that probably it's very stupid. In a custom module I've got a controller and in that controller I want to read a variable. This variable is the products per page number. Does anybody know which helper or what else I need to read that?

The variable I want to read is a variable configurable in Magento administrator in Configuration/Catalog:
-Products per Page on Grid Default Value

Thank you!


texts: Magento 2 minicart translation issue on some browser

texts:
I have Magento 2.2.5 website running successfully, but I am facing one serious issue on Minicart section and add to cart button. Everything get translated but on some browser like chrome and safari minicart and add to cart button are not translating. Can any one help me to fix this issue.

Website URL

See here too


texts: search drop down name replace with parent category

texts:
I am using ultimo magento theme.
In this Each search drop down has a text "ALL CATEGORIES".

Anyone can replace with parent category?

my folder path is

app/design/frontend/ultimo/default/template/catalogsearch/form/contents.phtml


texts: Removing wishlist link - top header magento 2

texts:
I've seen this question asked time and time again, and i know this will sound like a duplicate. But every answer everyone else has doesn't work for me.

I'm using:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="top.links">
            <referenceBlock name="wish-list-link" remove="true" />
        </referenceBlock>
    </body>
</page>

To try and remove the wish-list-link from the top link set, but this doesn't seem to work, i understand that im in the right block but i assume im not targeting the correct 'wish list link' - I understand i can disable the module but i might need the module further down the line, so this really isn't an option for me.

Any help would be great.

Just to note im also inside of my theme, inside of...

  /Vender/Theme_name/Magento_Theme/layout/default.xml


texts:
We are running Magento ver. 1.9.0.1 and after installing SUPEE-6788 we always get this error when running Magento cron.sh

So, when following command runs

/bin/sh /var/www/vhosts/example.org/httpdocs/cron.sh

We get this error, and it was not there before installing SUPEE-6788

  PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from
  'https://www.mage-world.com/api/soap/?wsdl' : Extra content at the end
  of the document  in
  /var/www/vhosts/example.org/httpdocs/app/code/local/MW/Mcore/Helper/Data.php
  on line 907


texts: Magento 2 Custom Module Controller getLayout , createBlock, getBlock , append Fatal error:

texts:
namespace My\Module\Controller\Index;

 use Magento\Framework\App\Action\Context;

class Index extends \Magento\Framework\App\Action\Action
{
protected $_resultPageFactory;

public function __construct(Context $context, \Magento\Framework\View\Result\PageFactory $resultPageFactory)
{
    $this->_resultPageFactory = $resultPageFactory;
    parent::__construct($context);
}

public function execute()
{
    $resultPage = $this->_resultPageFactory->create();
    $block = $resultPage->getLayout()->createBlock(
        '\Magento\Framework\View\Element\Template',
        'my.block',
        array('template' => 'My_Module/test.phtml')
    )->toHtml();

    if($resultPage->getLayout()->getBlock('content')){
        $resultPage->getLayout()->getBlock('content')
            ->append($block);
    }

    return $resultPage;
  }
}

The code above in controller returns :

Fatal error: Uncaught Error: Call to a member function append() on boolean...

Any ideas? thanks


texts: How to add a selection for an option in bundle items in Magento

texts:
I have already created Bundle product in magento 1.9.2.2.

All the bundle items are of "Radio Buttons" input type having few options already defined to them. This I have created using admin-panel.

Now, I am in requirement to add a simple product in the selection for second option of each of the bundle product present in the store.

NOTE: I want to add the same simple product to each bundle product.

Can anyone help me to do this programmatically!


texts: M1: Google Indexing different currency (USD) as oppose to default currency (GBP)

texts:
We have a single store website with 3 currencies (GBP, USD, EUR) where the default currency is GBP. The other currencies are selectable using the currency selector. Currently Google is indexing & caching everything with USD prices.

What would be the cause of this and is there a solution?

N.B. new sessions should use GBP & There is NO Geo IP functionality.


texts: Magento Search returns an empty Catalog Element, no "No Products Found" Message

texts:
One day the Magento search was working, and then this morning it appears to have stopped entirely.

For troubleshooting, I have already:

Cleared the cache via Magento Admin Panel
Deleted the /var/cache/ folder contents
Switched the Catalog search to Both (LIKE & FullText)
Re-Indexed everything Multiple Times
Changed the "default" category from "Default Category: 0 Products" to "Browse Books: All Products"

Currently, no results show, and echos and prints within

app/design/frontend/progressive/default/template/catalog/product/list.phtml

&&

app/design/frontend/progressive/default/template/catalog/product/list/toolbar.phtml

Do not display at all. I have no idea why the search is failing, possibly due to an improperly defined STORE ID on the Product level?

Thanks in advance.


texts: Product view: switch between product/view.phtml templates based on an attribute?

texts:
I want to create a second product view. The value of a custom attribute determines which template supposed to be used. Now I'm struggling about the best approach.

I've already overwritten the viewAction() of the ProductController. But I don't know how I can replace the template based on a custom_attribute. Could anyone please point me in the right direction?

Thank you so much for any help!


texts: Magento2 Add Quote ID in Sales Order Grid

texts:
I am trying to display quote id of an order in the sales order grid. New field is getting displayed in the grid. However the value of the quote id is not getting populated in the grid against each order.

How to show the quote id from the sales. I believe di.xml needs to be added for it work. I am not sure how the di.xml needs to be.

Here is the code view\adminhtml\ui_component\sales_order_grid.xml

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Ui/etc/ui_configuration.xsd">
<columns name="sales_order_columns">
    <column name="quote_id">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string" translate="true">Quote Id</item>
            </item>
        </argument>
    </column>
</columns>
</listing>


texts: Magento2 users in the backend website scope

texts:
I have 3 websites under one Magento,
how can I give separate login for each store for admin users?
should Every store should be managed separately from the backend and frontend
also USERS and ROLES Should be separate and related to every store alone

I'm new to Magento


texts: display particular category products in empty search result page

texts:
In empty search result page, I need to display the product list of a particular category.  So, I have added the code

<?php echo $this->getLayout()->createBlock('catalog/product_list')->setCategoryId(5)->setTemplate('catalog/product/list.phtml')->toHtml()?>

in catalogsearch/result.phtml.  But this is not worked.

While check the flow, I have found that $this->getLayer() calls the catalogsearch in app/code/core/Mage/Catalog/Block/Product/List.php.  Can I change the layer as Catalog, if the search is empty.  If it is possible to change the layer, then how to do that?


texts: Showing welcome text is wrong when switch websites - related to Session

texts:
Enviroment:

Magento version 2.4.1
PHP 7.4
MariaDB 10.0.26

Setting:

The website has multiple websites (2 websites)
Login into Dashboard -> setting Account Sharing Options is Per websites

Reproduce bug:
First, login website A. We can see welcome text in the header. "Welcome, Trang Thi"

After that, I switch to website B. Immediately, you will see the unreasonably here.
I have installed not sharing an account between websites, but some functionality of the old account still appears. Example: My account, Company Structure, ...

I think this error is related to the session, please help me and give me a solution to resolve it.
Thank everyone for reading!


texts: Created a new customer group and shipping rates have changed.

texts:
So like the title says, I've created a new customer group and everyone in that customer group automatically has different shipping rates.

Our typical "home delivery" price for every customer is $9.99. Why all of a sudden is the customers in this new group displaying $11.19?

I noticed it's on a product price basis, if i add more stuff to the cart it goes up more.

I've looked through admin but nothing is jumping out at me thats changed.


texts: "Prettifying" the custom options in cart page

texts:
I am setting up a store and the client realized the way the custom options are displayed on the cart are "stupid" and I cannot for the life of me get them to change.

Here is an image of what I hope to accomplish: http://i.imgur.com/JCrKAV9.jpg the top one shows how it is currently being displayed. the bottom part is how I want it to be displayed. there is no individual styling, they are all encapsulated with a single
 tag.

Adobe:

            Adobe Acrobat XI - Professional - $427.00, Adobe Acrobat XI - Standard - $149.00, Adobe Captivate 8 - $949.00

I'm using mageworx. com/advanced-product-options-magento-extension.html to make a template for custom options, so i do not need to add them by hand each time, and it has an option to put linked SKUS's in the cart but it just puts a jumble of products into the cart, if a client buys 2 computers with different software, there is no way for us to know which software goes on which computer.

I have been suggested to style it using CSS, which is impossible, (being they are contained inside a DD tag)

I have also been suggested to str_replace the ","'s with

 which outputs the following: imgur.c om/dSOMQwG.jpg as you can see in that example, only the first item has the , replaced, the rest are nested list items. I do not understand why magento feels the need to place them in one block of text.


texts: CVN input field not accepting input on checkout all of the sudden

texts:
All of the sudden the CVN input box will not accept input from a user on checkout:
https://www.everydayblade.com/checkout/onepage/

I do not know what changed and do not see a useful error. I've tried several browsers and I simply can not enter data into the field. How can I start to troubleshoot? Thank you as always.

I'm using Stripe payment gateway in test mode.


texts:
As you can See in bellow pic, my inline translation is disabled, but I am getting inline translate option in fronted.

and fronted is

I have two stores, English and Dutch, inline translation is appearing on English, Dutch version if fine. as shown

Dutch

English


texts: Unable to save customer name to mysql database in magento

texts:
Here is my code:

if ($user->isLoggedIn()) {

            $userinfo = $user->getCustomer();
            $userid = $userinfo->getId();
            $username = $userinfo->getEmail();
            $userfullname = $userinfo->getName();
            Mage::log(
                    "{$userid},{$username},{$userfullname}\n",
                    null,
                    'product-updates.log'
                );
            $up_id = intval($userinfo->getId().$product->getId()."");
            $data = array(
                        'click_time' => date("Y-m-d H:i:s"),
                        'product_id' => $product->getId(),
                        'product_name' => $product->getName(),
                        'product_category' => $category,
                        'product_value' => $product->getPrice(),
                        'user_id' => $userid,
                        'username' => $username,
                        'fullname' => $userfullname,
                        'firstname' => $userinfo->getFirstname(),
                        'middlename' => $userinfo->getMiddlename(),
                        'lastname' => $userinfo->getLastname(),
                        'register_time' => $userinfo->getCreatedAt(),
                        'up_id' => $up_id
                    );
            $model = Mage::getModel('modulename/modelName')->load($up_id,'up_id')->addData($data);
            try {
                $insertId = $model->save()->getId();
            } catch (Exception $e){
            }
}

Points:

-> product-updates.log file logs everything correctly with username (email) and full name of the customer.

-> on saving to database, product_id , and all fields successfully save except for customer name, customer middle, first and last name and register_time.

-> No errors in system.log, no exceptions in exception.log

-> Logs are enabled and cache is disabled.

Problem:

So problem is that I am not able to save customer name, even though it is being displayed in the product-log file correctly. Also there are no syntax errors or any other error because other fields are getting saved to the database.

Edit:
My database structure:

username    varchar(200)
fullname    varchar(200)
firstname   varchar(200)
middlename  varchar(200)
lastname    varchar(200)


texts: How to eliminate the decimal point in the product price and add zeros based on the number of digits post period operator?

texts:
I need to ensure the product price either gets 0 appended to it with decimal point removed if there is only one digit after the decimal point or 00 appended if there is no decimal point. The logic I could come up with so far is as follows. I would request SO to enlighten me on making this work with your correction. Thanks

Suppose the product price is 458.99
  I need it to be 45899- only remove the period.
Suppose the product price is 458.9
  I need it to be 45890
Suppose the product price is 458
  I need it to be 45800

$str=$_product->getFinalPrice();
if (!is_int($str) {
    if (strpos($str, '.') === false )) {
        $new_str = $val . 00;
    } elseif (strlen(substr(strrchr($str, "."), 1)) == 1{
        $new_str = str_replace('.','', $str) . 0;
    } elseif (strlen(substr(strrchr($str, "."), 1)) == 2 {
        $new_str = str_replace('.','', $str);
 }


texts: unable to login in admin it give error like `Role id 'G' already exists in the registry`

texts:
I am trying to login to admin in commercial addition but it generate report like below.I have tried to disable compiler using include/config file nothing changed.can anyone please guide me on this.

 a:5:{i:0;s:42:"Role id 'G' already exists in the registry";i:1;s:2393:"#0 /var/www/vhosts/cap-it.com/httpdocs/lib/Zend/Acl.php(160): Zend_Acl_Role_Registry->add(Object(Mage_Admin_Model_Acl_Role_Group), NULL)
#1 /var/www/vhosts/cap-it.com/httpdocs/app/code/core/Mage/Admin/Model/Resource/Acl.php(100): Zend_Acl->addRole(Object(Mage_Admin_Model_Acl_Role_Group), NULL)
#2 /var/www/vhosts/cap-it.com/httpdocs/app/code/core/Mage/Admin/Model/Resource/Acl.php(69): Mage_Admin_Model_Resource_Acl->loadRoles(Object(Mage_Admin_Model_Acl), Array)
#3 /var/www/vhosts/cap-it.com/httpdocs/app/code/core/Mage/Admin/Model/Session.php(98): Mage_Admin_Model_Resource_Acl->loadAcl()
#4 /var/www/vhosts/cap-it.com/httpdocs/app/code/core/Mage/Admin/Model/Observer.php(53): Mage_Admin_Model_Session->login('robert.b', 'acmRIjqHxz7Q4l0...', Object(Mage_Core_Controller_Request_Http))
#5 /var/www/vhosts/cap-it.com/httpdocs/app/code/core/Mage/Core/Model/App.php(1297): Mage_Admin_Model_Observer->actionPreDispatchAdmin(Object(Varien_Event_Observer))
#6 /var/www/vhosts/cap-it.com/httpdocs/app/code/core/Mage/Core/Model/App.php(1278): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Admin_Model_Observer), 'actionPreDispat...', Object(Varien_Event_Observer))
#7 /var/www/vhosts/cap-it.com/httpdocs/app/Mage.php(414): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#8 /var/www/vhosts/cap-it.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(503): Mage::dispatchEvent('controller_acti...', Array)
#9 /var/www/vhosts/cap-it.com/httpdocs/app/code/core/Mage/Adminhtml/Controller/Action.php(150): Mage_Core_Controller_Varien_Action->preDispatch()
#10 /var/www/vhosts/cap-it.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(407): Mage_Adminhtml_Controller_Action->preDispatch()
#11 /var/www/vhosts/cap-it.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(248): Mage_Core_Controller_Varien_Action->dispatch('index')
#12 /var/www/vhosts/cap-it.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(174): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /var/www/vhosts/cap-it.com/httpdocs/app/code/core/Mage/Core/Model/App.php(345): Mage_Core_Controller_Varien_Front->dispatch()
#14 /var/www/vhosts/cap-it.com/httpdocs/app/Mage.php(638): Mage_Core_Model_App->run(Array)
#15 /var/www/vhosts/cap-it.com/httpdocs/index.php(78): Mage::run('', 'store')
#16 {main}";s:3:"url";s:6:"/admin";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}


texts: How can I display a custom maintenance message on Magento 2.2.4

texts:
I have to update several modules of Magento, also deactivate others and during that the frontend will not be available.

How can I make a simple personalized message? Would you touch on some Magento or Apache directory?

And how can I make a separate message page for every language?


texts: Magento 2 : All field DIsable in Search Engine Robots Section Admin

texts:
From Admin panel , in Content-> Configuration -> Search Engine Robots , all filed is disable. I am not able to edit any field , is there any setting

Any idea please Share


texts: Where Magento check to show products for each store?

texts:
As you know, Magento supports multi-stores. I'm working with an extension that need to link a store with a specific warehouse.

For example, a store which sales furniture will be linked with a warehouse for furniture, a clothes store will be linked with a warehouse for clothes.

So I have a question, where Magento check to show products for each store? I need to rewrite this function.

Thank you.

EDIT

When I read about "explanation of Magento's Store / Store View / Website layers", I saw that "Products and Categories are managed on the store level".

So where exactly the code that "manage" products and categories?


texts: Magento 2: How to get All Active Categories in Custom Module Admin Form Dropdown?

texts:
Here is my form UI component code:
<field name="category_id">
    <argument name="data" xsi:type="array">
            <item name="options" xsi:type="object">Vrinsoft\Appscreens\Model\Allsection\Source\Categories</item>
            <item name="config" xsi:type="array">
            <item name="dataType" xsi:type="string">text</item>
            <item name="label" translate="true" xsi:type="string">Field Label</item>
            <item name="formElement" xsi:type="string">select</item>
            <item name="source" xsi:type="string">allsection</item>
            <item name="sortOrder" xsi:type="number">20</item>
            <item name="dataScope" xsi:type="string">category_id</item>
            <item name="validation" xsi:type="array">
                <item name="required-entry" xsi:type="boolean">false</item>
            </item>
        </item>
    </argument>
</field>

Here is my source code file Model\Allsection\Source:
<?php

namespace Vrinsoft\Appscreens\Model\Allsection\Source;

class Categories implements \Magento\Framework\Option\ArrayInterface
{
    protected $_categories;

    public function __construct(\Magento\Catalog\Model\ResourceModel\Category\CollectionFactory $collection)
    {
        $this->_categories = $collection;
    }

    public function toOptionArray()
    {
        $collection = $this->_categories->create();
        $collection->addAttributeToSelect('*')->addFieldToFilter('is_active', 1);
        $itemArray = array('value' => '', 'label' => '--Please Select--');
        $options = [];
        $options = $itemArray;
        foreach ($collection as $category) {
            $options[] = ['value' => $category->getId(), 'label' => $category->getName()];
        }
        return $options;
    }
}

?>


texts:
I have a one question.

Maybe, someone have successfully (and using good practices) changed url part to other word.

For example : From #payment to  #quote  ?

Thanks.


texts: where is configurable product priceBox js function declared?

texts:
I'm trying to debug a problem with configurable product price not changing when the user selects a product's color and size however I'm not sure how to proceed.
It seems the relevant function
        _UpdatePrice: function () {
            var $widget = this,
                $product = $widget.element.parents($widget.options.selectorProduct),
                $productPrice = $product.find(this.options.selectorProductPrice),
                options = _.object(_.keys($widget.optionsMap), {}),
                result;

            $widget.element.find('.' + $widget.options.classes.attributeClass + '[option-selected]').each(function () {
                var attributeId = $(this).attr('attribute-id');

                options[attributeId] = $(this).attr('option-selected');
            });
            $.each(options,function(key,val){
                if(!val){
                    delete options[key];
                }
            });
            result = $widget.options.jsonConfig.optionPrices[_.findKey($widget.options.jsonConfig.index, options)];

            $productPrice.trigger(
                'updatePrice',
                {
                    'prices': $widget._getPrices(result, $productPrice.priceBox('option').prices)
                }
            );

is failing to get the $productPrice.priceBox('option').prices as it is undefined during the _getPrices call
In order to understand why it's undefined I'd like to debug the function priceBox('option') but I'm unable to step into it on the debugger.
Where is this function declared? How can I debug it?
This is the $productPrice variable content on the debugger.

This is the element where it points

        4,70&nbsp;€
                <meta itemprop="priceCurrency" content="EUR">

Any hint is appreciated.


texts: Wrong table prefix in DB/Statement/Pdo/Mysql.php

texts:
We have moved a Magento 2.3 website from one domain to another, and all is done well.

Bu now when a customer is trying to purchase a order, it comes with a error. And I can se in the exception.log the error, is becuase it looks for the old databse table:

sinm1.yn6g_sequence_order_1 this should be: sinm1.yman_sequence_order_1

The yn6g is the old database prefix.

How can I change it?


texts:
I am trying to get Solr to work with Magento EE. So far I have SOLR / Jetty running, Magento connecting to SOLR and Solr outputting logs when something is searched / indexed.

The problem I have is the following error:

  SEVERE: org.apache.solr.common.SolrException: ERROR: [doc=397|1] Error
  adding field 'attr_nav_multi_styles'='[, , , ]'   at
  org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:324)
    at
  org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:60)
    at
  org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:115)
    at
  org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:158)
    at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:79)    at
  org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:58)
    at
  org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
    at org.apache.solr.core.SolrCore.execute(SolrCore.java:1372)    at
  org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356)
    at
  org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)

This looks to be related to layered navigation in someway (although 'use with catalog navigation' is disabled in the config.)

Does anyone have any insight into this? Specifically what this is referring to: attr_nav_multi_styles

Thanks


texts: Show popup message before check for login

texts:
I tried to show a popup message when customer tried to login. I add some code in LoginPost.php like in code below but it's not work.

LoginPost.php :

try {
      echo "  <script type='text/javascript'>
              alert('adadasd'); //This code i tried to popup a message
              </script>";

      $customer = $this->customerAccountManagement->authenticate($jsonObject[0]->EMAILOWNER, $jsonObject[0]->PASSWORDOWNER);
      $this->session->setCustomerDataAsLoggedIn($customer);
      $this->session->regenerateId();
      setcookie("Role", $jsonObject[0]->ROLE, time() + (86400 * 30), "/");
      if ($this->getCookieManager()->getCookie('mage-cache-sessid')) {
         $metadata = $this->getCookieMetadataFactory()->createCookieMetadata();
         $metadata->setPath('/');
         $this->getCookieManager()->deleteCookie('mage-cache-sessid', $metadata);
      }

How can i show a popup there? So the login will not continue before the customer click the popup message?


texts: Magento table rate weight vs destination

texts: I am using magento table rates Weight vs Destination for shipping method. I have added weight up to 3 kg and shipping price according to that. It is working fine. But above 3 kg  the shipping price will be INR 25 per KG. For example if the weight will be 5 KG then the shipping price will be 5 x INR 25 = INR 125 How to achieve that in Table Rate.


texts: Where in the Core is Layout Update XML from the Admin applied?

texts:
I'm trying to understand how Magento renders the custom layout xml that you can add to CMS pages or categories via the design tab. It seems to be applied after the theme's local.xml, but I can't find it.

I see loadLayoutUpdates in Mage/Core/Controller/Varien/Action.php at line 294-ish, but nothing there looks like it's getting anything from the database. (Custom layout updates are stored in the database, no?)

(To be clear, I'm not asking how to enter custom layout xml in the admin. Just wondering what's going on under the hood.)


texts: Why Magento SOAP multiLocationInventoryStockList is not accepting any filter request?

texts:
I am trying from magento soap to get info about inventory from individual "sku", but object "multiLocationInventoryStockList" is getting me back result from all locations Id's.

Here is my code in C#:

Filter:

string locationid = "1";

filters filter = new filters
        {
            complex_filter = new[]
            {
                new complexFilter
                {
                    key = "sku",
                    value = new associativeEntity { key = "eq", value = "123456-Test"}
                }
            }
        };

Then call for results:

var list = client.multiLocationInventoryStockList(sessionID, locationid, filter);

Now this same filter works fine for other objects e.g. catalogProductList, but not for multiLocationInventoryStockList. I can't find any documentation for this object that is requesting diffrent keys and values in filter.

I am using magento 1.9


texts: Wrong Search Result for the API rest/default/V1/products in Magento 2.3.6

texts:
I have 3 websites and each has a store and store-view, the website one has the store_code: default, when I search for products while passing the store_code: default, the search result shows products that are not in the website one.
https://example.com/rest/default/V1/products?searchCriteria[filter_groups][0][filters][0][field]=name&searchCriteria[filter_groups][0][filters][0][value]=%25bag%25&searchCriteria[filter_groups][0][filters][0][condition_type]=like&searchCriteria[filter_groups][0][filters][1][field]=name&searchCriteria[filter_groups][0][filters][1][value]=%25%25&blacksearchCriteria[filter_groups][0][filters][1][condition_type]=like

Sample output:
"items": [
        {
            "id": 351,
            "sku": "LSI-012-0001",
            "name": "Bag",
            "attribute_set_id": 4,
            "price": 28,
            "status": 1,
            "visibility": 4,
            "type_id": "simple",
            "created_at": "2019-11-23 11:06:38",
            "updated_at": "2020-10-14 10:55:01",
            "extension_attributes": {
                "website_ids": [
                    5
                ],
                "category_links": [
                    {
                        "position": 0,
                        "category_id": "31"
                    },
                    {
                        "position": 0,
                        "category_id": "63"
                    }
                ]
            }
            .
            .
            .

In the extension_attributes the website_ids:5 is not the website where the default store belongs.


texts: Can it be possible to overwrite the widget.xml data of the module in some convenient way (instead of editing module source)? For example if there is need to add more containers  to place widget or to add another template to it.


texts: Admin Login is not redirecting to the dashboard after server change

texts:
I just moved my magento store from sharing server to AWS. After that I am not able to login as admin. Admin login page shows validation with wrong credentials and for right ones it refreshes the page with new url but stays in login page.

  The frontend works correctly.

Any leads?
Thanks in advance.


texts: Magento 2: User cant logged in into to account page, no error showing!

texts:
I have Migrated Magento 2 website from subdomain to root. after migration user cant logged into the account but admin is working fine.
if user clear the cache and try to login , login works fine but when the cookies expire it wont work.
Everything look perfect but dont know what can be the issue.


texts: How to remove main page title "Create New Customer Account" from registration page?

texts:
I am needing to remove the main page title "Create New Customer Account" from the registration page.
I see everywhere that I need to add the line below somewhere but where?
<referenceBlock name="page.main.title" remove="true" />
Essentially I'd like to remove the following div from the page.

        Create New Customer Account

Is this possible?


texts:
All of our product prices are stored as gross and have a related tax class. As per Mage's standard calculations the tax rate is added to the product's net value to calculate the product's gross price. I want to change this so that the gross price of the product is always the price the customer is charged regardless of the address the order is being shipped to (and its associated tax rate).

An example:

If a product's gross price is set at £26.50 and the customer has specified a UK shipping address (tax rate 20%) the price is broken down (and displayed) like so:

GB Address (tax rate 20%)
Product Price:  £26.50
Product Tax:    £4.42
Order Gross:    £26.50

However, if the customer then changes their delivery address from a UK address (tax rate 20%) to a Spanish address (tax rate 21%) then the gross price for this order is re-calculated like so:

ES Address (tax rate 21%)
Product Price:  £26.50
Product Tax:    £4.64
Order Gross:    £26.72

My question is; is it possible to configure Magento to not increase the gross price when the tax rate changes? All I want to do is inform the customer as to what £ value of the product's gross price is taxable (not increase the product's price).

So the ES Address order would calculate like this:

ES Address (tax rate 21%)
Product Price:  £26.50
Product Tax:    £4.64
Order Gross:    £26.50


texts: What is the optimal setting for PHP's memory_limit for Magento 2

texts:
I am on a VPS box with a total RAM of 3GB. I have dozens of hosts running on it. I am trying to install Magento 2 on the box now.

Magento 2.0.7 recommends PHP memory_limit = 1G
My server is configured at memory_limit = 64M

I want to restrict the memory increase to just the new host on the box and ideally only to the process(es) that need it.

Can you share with me:

what would happen to Magento 2.x if I ran it with only 64M memory?
what processes specifically require all this memory?

Thank you.


texts: Magento enterprise edition 1.14 automation functional tests

texts:
Does Magento enterprise edition 1.14 have pre written functional automation tests? We use Magento 1.14 and I have to decide if I have to start building functional end-to-end user journey tests from scratch using say testng or can I start using the functional tests which come with Magento 1.14 (if any) and build on it?

My other question is isn't it enough I do end-to-end user journey tests like logging in, placing order, payment for order, cancel order, etc .. which will implicitly test the units(code) underneath from a QA tester point of view?

I am also thinking if I don't use Magento framework I will be able to use the same automation tests for some other store which doesn't use Magento at all.

Share your thoughts.


texts: how to resolved this error during the installtion magento 2?

texts:
State for the same indexer already exists

> [ERROR] Magento\Framework\Setup\Exception: State for the same indexer
> already exists. in
> C:\xampp\htdocs\magento\vendor\magento\framework\Setup\Patch\PatchApplier.php:167
> Stack trace: #0
> C:\xampp\htdocs\magento\setup\src\Magento\Setup\Model\Installer.php(1002):
> Magento\Framework\Setup\Patch\PatchApplier->applyDataPatch('Magento_Indexer')
> #1 C:\xampp\htdocs\magento\setup\src\Magento\Setup\Model\Installer.php(874):
> Magento\Setup\Model\Installer->handleDBSchemaData(Object(Magento\Setup\Module\DataSetup),
> 'data', Array) #2 [internal function]:
> Magento\Setup\Model\Installer->installDataFixtures(Array) #3
> C:\xampp\htdocs\magento\setup\src\Magento\Setup\Model\Installer.php(367):
> call_user_func_array(Array, Array) #4
> C:\xampp\htdocs\magento\setup\src\Magento\Setup\Controller\Install.php(109):
> Magento\Setup\Model\Installer->install(Array) #5
> C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\Controller\AbstractActionController.php(84):
> Magento\Setup\Controller\Install->startAction() #6 [internal
> function]:
> Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
> #7 C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(490):
> call_user_func(Array, Object(Zend\Mvc\MvcEvent)) #8
> C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(260):
> Zend\EventManager\EventManager->triggerListeners('dispatch',
> Object(Zend\Mvc\MvcEvent), Object(Closure)) #9
> C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\Controller\AbstractController.php(118):
> Zend\EventManager\EventManager->triggerEventUntil(Object(Closure),
> Object(Zend\Mvc\MvcEvent)) #10
> C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\DispatchListener.php(118):
> Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request),
> Object(Zend\Http\PhpEnvironment\Response)) #11 [internal function]:
> Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent)) #12
> C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(490):
> call_user_func(Array, Object(Zend\Mvc\MvcEvent)) #13
> C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(260):
> Zend\EventManager\EventManager->triggerListeners('dispatch',
> Object(Zend\Mvc\MvcEvent), Object(Closure)) #14
> C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\Application.php(340):
> Zend\EventManager\EventManager->triggerEventUntil(Object(Closure),
> Object(Zend\Mvc\MvcEvent)) #15
> C:\xampp\htdocs\magento\setup\index.php(39):
> Zend\Mvc\Application->run() #16 {main}


texts:
I have 2 modules: ModuleA and ModuleB.

ModuleA creates some categories in a data install script.
ModuleB creates a new category attribute in a data install script.

(the modules do other things, but these are the important things to mention for this question)

ModuleA sets data on the categories when created and I want it to set data for the attribute created in ModuleB.

But the values never persist if both modules are installed at the same time.

I currently have ModuleA depending on ModuleB but that makes no difference.

How can i resolve this issue and have both moudles installable at the same time?

EDIT TO QUESTION:

I have now moved the code for populating the category values into the same module and exactly same setup script that installs the attribute.  It also fails.

Therefore it would appear that it is not possible to create a new category attribute and populate values for that attribute during the same setup.

Is this a bug, or correct behaviour?


texts: Export a field from custom model grid with a diferent render to Csv

texts:
I created a custom column on sales order grid. It works as well but a used a custom render on a field (like this).

When I export the grid to CSV, the file contains the raw value, but I need apply another render to it for users understand the data.

So how I can do a custom render to column on grid just to export cases?


texts: Magento 2 : Field depends in system.xml when fields are not in the same group

texts:
How can you set <depends> for a field which is not in the same group of fields

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>

            Name
            <tab>tabname</tab>
            <resource>Namespace_ModuleName::method</resource>
            <group id="group" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                General Configuration
                <field id="field" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    Enable
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>
            <group id="connection" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                Connection Configuration
                <field id="disable_certificate_check" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                    Check
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <depends>
                        <field id="field">1</field>
                    </depends>
                </field>
            </group>

    </system>
</config>


texts:
I kind of understand how the logic and the benefit of proxies in Magento 2 di. But can anybody tell me, how to use it?!
Alan Storm use the generated proxy class, for example, I would call

\Magento\Store\Model\StoreManagerInterface\Proxy in my construct method.

But if I take a look in Magento di.xml files and also in the respective php class, the constructor class does not call a proxy. e.g.
// module-store/etc/di.xml line 49
<type name="Magento\Store\Model\Resolver\Store">
    <arguments>
        <argument name="storeManager" xsi:type="object">Magento\Store\Model\StoreManagerInterface\Proxy</argument>
    </arguments>
</type>

and the model
// module-store/Model/Resolver/Store.php
/**
 * @param \Magento\Store\Model\StoreManagerInterface $storeManager
 */
 public function __construct(\Magento\Store\Model\StoreManagerInterface $storeManager)
 {
     $this->_storeManager = $storeManager;
 }

So does the constructor call the regular Model interface or the proxy with magic that I don't see till now?


texts:
I have seen this has been posted before but but cannot find a definitive answer.

When trying to add a new integration (System > Integrations > Add New Integration), the New Integration page comes up but with nothing on it except Save and Back buttons. Clicking the Save button results in

Notice: Undefined index: all_resources in /vendor/magento/module-integration/Controller/Adminhtml/Integration.php on line 141

  Magento version is 2.2.6

I have tried flushing the cache and re-indexing. And I have the same problem on both the production site and staging site (default mode).

Much appreciated if anyone can help with this.


texts: How to move the add to cart section under the short description on product view page

texts:
I am customizing the Magento2 Blank theme, by using a custom child theme. On the product page, I want the custom options and add to cart section to appear below the short description. All products will have custom options.

I have created the file:

  app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml

with the following content:

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="product.info" destination="product.info.price" after="product.price.final"/>
    </body>
</page>

But it doesn't work. Where is my fault?


texts: Magento 2: Get Product URL and SKU using SQL Query

texts: How can I get all SKUs and Product URLs using only SQL Query?