texts: Trying to Save Customer Account Causes 500 Error

texts:
Whenever I try to save a particular customer account the screen changes to the following:

This page isn’t working
www.mywebsite.com is currently unable to handle this request.
HTTP ERROR 500

The developer tools shows the following error:

POST https://www.mywebsite.com/loginforadmin/customer/index/save/key/d30e331d956b64705194dec98ee5fb818d43ce247c0a8ad563d7184dc1fe846d/back/edit 500
submit @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/mage/utils/misc.js:149
_save @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/Magento_Ui/js/form/client.js:128
(anonymous) @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/jquery.js:3417
fire @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/jquery.js:3238
fireWith @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/jquery.js:3368
deferred.<computed> @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/jquery.js:3467
success @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/Magento_Ui/js/form/client.js:46
fire @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/jquery.js:3238
fireWith @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/jquery.js:3368
done @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/jquery.js:9846
callback @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/jquery.js:10317
XMLHttpRequest.send (async)
send @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/jquery.js:10260
ajax @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/jquery.js:9744
beforeSave @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/Magento_Ui/js/form/client.js:35
save @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/Magento_Ui/js/form/client.js:94
save @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/Magento_Ui/js/form/provider.js:62
submit @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/Magento_Ui/js/form/form.js:313
save @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/Magento_Ui/js/form/form.js:265
dispatch @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/jquery.js:5232
elemData.handle @ /pub/static/version1589884676/adminhtml/Magento/backend/en_US/jquery.js:4884

/pub/static/version1589884676/adminhtml/Magento/backend/en_US/mage/utils/misc.js:149

There was also the following error in the Apache logs.

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function getProduct() on boolean in /var/www/vhosts/mywebsite.com/httpdocs/vendor/magento/module-configurable-product/Plugin/SalesRule/Model/Rule/Condition/Product.php:61\nStack trace:\n#0 /var/www/vhosts/mywebsite.com/httpdocs/vendor/magento/module-configurable-product/Plugin/SalesRule/Model/Rule/Condition/Product.php(30): Magento\\ConfigurableProduct\\Plugin\\SalesRule\\Model\\Rule\\Condition\\Product->getProductToValidate(Object(Magento\\SalesRule\\Model\\Rule\\Condition\\Product\\Interceptor), Object(Magento\\Quote\\Model\\Quote\\Item))\n#1 /var/www/vhosts/mywebsite.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(121): Magento\\ConfigurableProduct\\Plugin\\SalesRule\\Model\\Rule\\Condition\\Product->beforeValidate(Object(Magento\\SalesRule\\Model\\Rule\\Condition\\Product\\Interceptor), Object(Magento\\Quote\\Model\\Quote\\Item))\n#2 /var/www/vhosts/mywebsite.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\\SalesRule\\...\n', referer: https://www.mywebsite.com/username/customer/index/edit/id/9381/key/e48a53a414efd2fb61198dc522db1d12421858d2c22c031c94298829768e80df/

This only seems to be happening on a single customer account, all others seem to be fine.

Does anyone know what might be causing this error and how I can resolve it?

Thanks


texts:
hello guys i have just installed magento 2 on my pc, its the first time i use it. when i log in as an admin i dont see any photos

also i dont see any images on the folder
does anyone knows what should i do ?
thanks in advance


texts: Are there any repositories for Magento1 patched version

texts:
Are there any github repositories for magento code patched with all the latest patches.

Basically, I would like to identify the core changes made to Magento 1.7.


texts:
I am quite new to magento so I was wondering if I did something wrong or forgot to do something.

I am trying to install magento 2.0.2 on my local machine (vagrant homestead) with the following configuration

PHP 5.6.18
MySQL 5.6.28
Nginx 1.8.0

All the required php modules are installed and activated.

The issue that I am having is that if I enter the setup url in the browser then the browser freezes and after some time the browser ask if I want to kill the website or wait. Opening the element inspector I notice a few errors in the console.

Here's the screenshot with the frozen browser

And here's the error message

The php.ini file had been updated accordingly to the magento recommandations. I also did chmod 777 on files and folders inside the magento root folder (only on my local machine for debugging purpose).

The owner of the files is also the web user.

Does anyone know why the setup would freeze? Thanks a lot for the help!

UPDATE:
I was installing magento via compose using these instructions: devdocs[DOT]magento[DOT]com/guides/v2.0/install-gde/prereq/integrator_install.html

Also it was possible to install magento 2 via command line. But as it seems the pub folder was missing files (css, js, img, ...)


texts: How can I enable system configuration values that are disabled

texts:
In the magento backend under stores->configuration,  I can't edit most of the system settings anymore. Usually I was able to uncheck "use system value" and then change the corresponding value as I needed.

I don't know what I did to change this behavior, but now I get the denied cursor when I hover over the "use system value" checkbox, and the checkbox itself is greyed out (uneditable).

How can I edit these values again?

edit 1: I'm on Magento 2.2.0, store view is "Default Config"

edit 2: This only seems to affect the "Default Config" settings. When I switch over to "Main Website" I can change the system settings. This is acceptable as a workaround for now, but I would love to know what's going on here so I can avoid it next time!


texts:
My one page checkout isn't working. Whenever the Place Order button is displayed the page just reloads.

There is een DOM element checkout-payment-method-load
Review is present at the bottom op info.phtml
There is a hardcoded button instead of <?php echo $this->getChildHtml('button') ?> in info.phtml
I've replaced the template & lay-out files with the base files


texts: How to add new tab in order_view Magento 2

texts: I want to add new tab to order_view and customer_edit pages from my extension. Can someone explain or write example how i can do this?


texts: Magento 2: I want to Display a Store switcher drop down in Top Header

texts:
I'm trying to make a drop-down for a store not store views on the top header.

I had searched more and more, but unfortunately always getting the store views solutions.

I had created an on Magento_Store/templates/switch/stores.phtml  and declared the stores.phtml on the Magento_Theme/block/default.xml Still nothing comes.

Anyone help me to set a drop-down for switching the stores.


texts:
First of all, i'm not familliar with apc.
It's turned on on my site. And i've been faced next problem:
I need to get current page number in my custom block on products list page. But, when i input  echo Mage::getBlockSingleton('page/html_pager')->getCurrentPage();, i get same page number on all pages (i mean on pages with params /?p=2, /?p=3 it allways '1') untill i will clean apc cache. This number changes only after cleaning cache. Not on every page changes.

Any ideas?


texts: I want to add title to confirme message.


texts: Refresh the cache programmatically in Magento 2 at window system

texts:
I am looking for code that can refresh or flush the Magento2 cache via script.

It was so easy in Magento 1.x.

I am running Magento2 on WAMP server (window).


texts: how to insert not filter variable into database?

texts:
i m using ajax to insert variable into database i have two input box one is email other is company name i m using filter_var to check email validation but now problem is how to insert company name without used this validation?

Here is my code

<?php
 require_once('app/Mage.php');
 ini_set('display_errors', 1);
 Mage::app('admin');
 $resource = Mage::getSingleton('core/resource');
 $writeConnection = $resource->getConnection('core_write');
 $company = $_REQUEST['company'];
 $email = $_REQUEST['email'];
 $email = filter_var($email, FILTER_SANITIZE_EMAIL);
 if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
   $query = "INSERT INTO guest_user_track(Guser_mail,Guser_name) VALUES
   ('{$email}','{$company}')";
$writeConnection->query($query);
echo json_encode(array("message"=>"success"));
}
else {
 echo json_encode(array("message"=>"error"));
}


texts:
I need to somehow detach the quote from the customer session so it is still sitting in the DB marked as active but no longer part of the customer session (still with the customer_id in the DB record though).  I've been scouring all the customer session and quote code but can't see anything obvious that helps me implement this.

Anyone got any ideas?


texts: Magento 2 - Admin product page layout issue

texts:
I am facing an issue while trying to go on the product page from a catalog in the admin. The product page grid layout not loading properly. Every time when I clear cache, page load correctly. What is the issue? Need help

requirejs error in the console


texts: Why the Magento 2 "Collection Data" Cache is used not for all entities?

texts:
In my practice I've never really faced with situation that it was needed to clean the collection cache. It is strange)
I checked and detected that the magento uses the collection cache only for 4 entities:

website
store_group
store
category

These entities uses for their collections the virtual types based on

\Magento\Framework\Data\Collection\Db\FetchStrategy\Cache

which in turn uses \Magento\Framework\App\Cache\Type\Collection for defining the cache type - collection.

You can find the all SQL-queries which used (after md5 tranformation) as cache keys - see the fetchAll method.

And these SQL-queries only to tables which related to entities listed above.

Why doesn't magento use the collection cache for other entities, such as products or CMS-pages?

When should we use the collection cache for own custom entities?


texts: Make phtml template into a CMS static block

texts:
I have a code of left side category list in left_cat.phtml file. The code is like below.

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

                APPLE

                AUDIO

                AV

                CAMERAS

                CCTV

                COMPONENTS

                MONITORS & TV's

                NAS Solutions

                PROJECTORS

                WIRELESS

                LAPTOPS & NOTEBOOKS

                NETWORKING

                PC'S

                PERIPHERALS

                PRINTERS & SCANNERS

                SOFTWARE

                CLEARANCE

and in XML file I've put the code like below.

<default>

        <reference name="left">
            <block type="core/template" name="left.category.list" template="category/left_cat.phtml"/>
        </reference>
</default>

Temporary I put the category list in the PHTML file. But, now I want to add category list in one of the static block and want to fetch that block in the XML file at particular location. I've tried to find solution using many resources, but hard luck.


texts: Magento 2.2.10 cancelling orders from admin

texts:
If I cancel order from admin the status change to rejected and the item status change to cancel as I expected.

Is it possible if I could move the reject status to cancel too?

If there is anything I can follow please guide or and tips


texts: How do I detect when a user switches between websites/store views?

texts:
I'm trying to work out how to detect when a user has left a store view and landed on another.

Basically I have website A with a domain of magento.com.localhost and website B with a domain of magento.co.uk.localhost.

On each website I have a store switcher. So if I'm on website A I have a link that looks like magento.co.uk.localhost/category?___store=gb&___from_store=us and when I click it I go to a different store view, but want to be able to track when this happens.

I figured the easiest way to do this is to use Mage::app()->getRequest() to get $_GET['from_store'] but this variable doesn't seem to exist due to the nature of the url rewrites.

Is there a Magento specific way to detect when a user has landed on the site from a different store code and how can I access that store code.

Many thanks in advance.


texts: Magento 2: Share product image in whatsapp sharing

texts:
I want to share the product image in WhatsApp, But I don't know the meta concept.

How to use meta tag in phtml file to share image ?

Here phtml file code, but using this display only url and description.

I want to send description with image.

    <?php
        $helper = $this->helperInit();
        $objectManagerInstance = \Magento\Framework\App\ObjectManager::getInstance();
        $url = $objectManagerInstance -> get('Magento\Framework\UrlInterface');
        $currentUrl = $url -> getCurrentUrl();
        $biturl =  $this->getShortenUrl($currentUrl);
        $active = $helper->whatsappshare_enable();
        $size = $helper->whatsappshare_size();
        $text = $helper->whatsappshare_text();
        $product = $this->getCurrentProduct();
        $p_name = $product->getName();
        $description = $product->getDescription();
        $imgUrl = $this->getImageUrl($currentUrl);
        ?>

    <?php
        $size_class = "whatsapp_small";
        if($size == 1) {
            $size_class = "whatsapp_small";
        } else if($size == 2) {
            $size_class = "whatsapp_medium";
        } else if($size == 3) {
            $size_class = "whatsapp_large";
        }
        if($helper->isMobile() || $helper->isTablet()) {
    ?>
      <div class="whatsapp_share <?php echo $size_class; ?>">
                <a href="whatsapp://send?text=<?php echo $text?>%0A%0A<?php echo $p_name?>%0A%0A<?php echo $biturl;?>"><?php echo __('Share');?>

            <?php
            } else {
            ?>
            <div class="whatsapp_share <?php echo $size_class; ?>">
                <a href="https://web.whatsapp.com/send?text=<?php echo $text?>%0A%0A<?php echo $p_name?>%0A%0A<?php echo $biturl;?>%0A%0A" target="_blank"><?php echo __('Share');?>

            <?php
                }
            ?>


texts: In Magento, we know that local modules can overwrite core functionality.  This is mainly done by using a rewrite rule in the config.xml.  My question is that since any module can do an overwrite, when developing, what is generally the best way to see for a given model or block what module is being used?  Can I get a final compiled list someplace?


texts: How to display default check checkbox in Magento custom option in product detail page

texts: I have 4 check-boxes as custom options and I would like to display default check-box checked in Magento front end. There is no option in Magento admin site to achieve that.


texts:
I have a custom module where my few DB fields are not being saved properly. I can see the values selected in $model->getData(); but it does not reflects in my Database.

try {

       echo '<pre>';print_r($model->getData());echo '<br>';// shows correct values selected
        $model->save();
        echo '<pre>';print_r($model->getData());exit;// shows correct values saved

    }

The above code shows me correct values being selected and processed, but not saved in DB.

Is there any way where I can print the INSERT query and check what is caysing the issue ?

Please Help !!!

Thanks.


texts:
The Magento 2.1.7 store contains multiple products with names like FA-7

But searching with the exact productname as keyword gives no results.
Searching with keyword like SKRF-7 give multiple products as result with productname starting with SKRF.

In Configuration > Catalog > Catalog > Catalog Search, we set the minimal Query Length on 2 characters.
Cache cleared, reindexed, but no results.

Anyone have a clue what could be the solution for this problem?


texts: Insert,delete,update product should reflect in third party website using API

texts:
I have a website which sells clothing and selling in elevenia. Elevenia have a seller option where we can add or create our product in the dashboard.

Its a tedious process and we go for Open API services which is provided by elevenia. Using API when we add,delete,update product in magento backend it should reflect in elevenia. API is provided by elevenia.

Basically, the format should be .xml and magento supports this feature. I don't have customer support from elevenia. Can anyone please tell me how to integrate third party API with magento? We have API key and tested with POSTMAN app using GET and POST method. I can get the values and can add the product.

The thing is how can I do it in magento? Please help me


texts: Where/How to re-order collection before pagination but after f.x Price

texts:
I'm trying to achieve so that products with specific Manufacturer should be the first in the collection (for example, user wants to sort by price, so it should show all the products by Manufacturer X sorted by the price and then rest of the products like normally).

My idea was to hook somewhere between when the collection is being sorted by those attributes, but before it is "paginated". But I have trouble finding the place for it...

Of course if someone has a better idea, I'd love to hear it :)


texts: Can't Reindex Catalog Search: 405 Not Allowed (Magento 2.4)

texts:
My Catalog Search needs reindexing, but sudo bin/magento indexer:reindex catalogsearch_fulltext won't work and returns the following:
Catalog Search index process unknown error:

<title>405 Not Allowed</title>

405 Not Allowed

nginx/1.16.1

I've seen other questions with a similar issue to mine, but none with this particular error. My Magento is using Elasticsearch 7.
EDIT: I deleted one product and tried again, and got the following error:
Catalog Search index process unknown error:
<!DOCTYPE html>

<meta charset="utf-8">
<title>Error</title>

Cannot PUT /magento2_product_1_v1


texts: What is mage in magento ,,explain following and also list all these kind of function or model used in magento

texts:
And also explain following function:

Mage::getModel('catalog/product');
load();
$category = Mage::getModel('catalog/category');
$category->load($categoryid);
$collection = $category->getProductCollection();
$collection->addAttributeToSelect('*');


texts: How to get the data from Magento2 Soap api using c# program along with wsdl link?

texts:
I followed the same steps as he followed from the below link

https://magento.stackexchange.com/questions/98845/c-can-access-magento-2-soap-api-without-oauth-token/101527#101527

But it not get the data. It causes "An unhandled exception of type 'System.ServiceModel.FaultException' occurred in mscorlib.dll

Additional information: Operation "VsDebuggerCausalityData" not found" exception. Pls refer the image also.

I referred below sites

https://stackoverflow.com/questions/10123153/how-to-remove-vsdebuggercausalitydata-header-section-from-soap-request-in-wcf

they asked to add the mentioned lines to the app.config file.

I too did but the same error is existing. Kindly help me or instruct me how to get the data from Magento2 Soap api with c# program. Please post step by step instruction with images.


texts: Payment status shows due after successful transaction

texts: I have integrated & configured PayU in my website. When I buy a product the transaction is successful and the payment is taking place. But the order details in the admin panel shows payment as due. Could anyone help me to sort it out??


texts:
I have tried to figure out from the Luma how the widgets are tied to categories.

Could you let me know where I can find the "link" between the block and category. The Add CMS Block in category doesn't have this default block...

How the e.g. sale-block is defined into Sale category?


texts:
I'm using Magento 2.3.1 and Porto theme, that theme is a hassle to install. Just got it done.

This is a Porto child theme

Is it necessary to install it?

is there an easy way to install it without having to reinstall Porto? Because I forgot to install it before.


texts: most forms not working with custom theme

texts:
I'm creating a custom theme, but most buttons and forms don't work when I activate it. The following, for example, doesn't work:

Add to Cart button on product page (nothing happens on click. However, Add to Cart works on category page)
Checkout page not working. (when I hit the first "continue" button, a window pops up: "Please choose to register or to checkout as a guest", regardless of whether or not I select "register" or "checkout as guest")
On "My Account" page, login button does nothing.
On "Create an Account" page, submit does nothing.

This seems to be a systemic problem, and I'm not quite sure how to troubleshoot. I compared the html output of my theme with the output of the "modern" theme (which does work) to see if all the same javascript libraries were being loaded. They are.

I'm running version 1.8.1.0

Has anyone else ran into a similar problem? Any ideas on how to troubleshoot from here?

I should add that I didn't edit any of the forms within my theme template files.


texts: Show different image of the product if the product is grouped

texts:
I want the product image to change on "catalog-category-view" depending on whether the product is 'grouped' or 'simple'.

In Magento_Catalog\templates\product\list.phtml the product image is called by

<?php echo $productImage->toHtml(); ?>

which calls image_with_borders.phtml

Here i tried something like that:

<?php
$_productCollection = $block->getLoadedProductCollection();
$is_grouped = $_productCollection ->getTypeId() == 'grouped';
if ($is_grouped != 1):
    echo "yes"; //example
else :
    echo "no";  //example
endif;
?>

But i always get:

  Fatal error: Uncaught Error: Call to a member function getTypeId() on
  null

How can i achieve this? I'm using that sort of code in list.phtml to differentiate between grouped and simple products and it'S working.

Specs: Magento Ver.-2.3.4 | PHP 7.2


texts:
I am trying to rewrite:

app/code/core/Mage/Sales/Model/Resource/Order.php

However I can't find the correct resource model identifier to use in my config.xml

<models>
    <what_should_this_be>
         <rewrite> Mynamespace_Mymodule_Model_Sales_Order_Resource_Order</rewrite>
    </what_should_this_be>
</models>


texts: Magento programmatically refresh statistics. - Magento1

texts: How to refresh statistics programmatically in Magento 1?


texts: Magento 2 Installation Issue: 404 error while trying to load admin page

texts:
I have successfully installed Magento 2 on the wamp server but I'm having a slight issue of loading the admin page as it is giving me a 404. Also, when loading its homepage the default theme that is luma in my case doesn't apply and instead gives me the following errors:

Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1/test1/pub/static/frontend/Magento/luma/en_US/mage/calendar.css
Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1/test1/pub/static/frontend/Magento/luma/en_US/css/styles-m.css
Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1/test1/pub/static/frontend/Magento/luma/en_US/css/styles-l.css
Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1/test1/pub/static/frontend/Magento/luma/en_US/css/print.css
Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1/test1/pub/static/frontend/Magento/luma/en_US/images/logo.svg
Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1/test1/pub/static/frontend/Magento/luma/en_US/css/styles-m.css
Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1/test1/pub/static/frontend/Magento/luma/en_US/css/styles-l.css
Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1/test1/pub/static/frontend/Magento/luma/en_US/requirejs/require.js
Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1/test1/pub/static/frontend/Magento/luma/en_US/css/print.css
Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1/test1/pub/static/frontend/Magento/luma/en_US/mage/requirejs/mixins.js
Failed to load resource: the server responded with a status of 404 (Not Found)
requirejs-config.js:602 Uncaught ReferenceError: require is not defined
127.0.0.1/:24 Uncaught ReferenceError: require is not defined
127.0.0.1/:26 Uncaught ReferenceError: require is not defined


texts: My site speed is very slow. Can anyone please let me know how can I optimize all the images? So, my site loading can be faster.


texts: Magento Cloud Integration - js and css files

texts:
We have recently inherited a Magento 2 cloud environment that has a working production and staging.

We also have an integration environment that should have identical code to staging but neither the frontend or backend is working properly.

The css/js files for Integration are all returning 404's as it is trying to access the non-minified versions of these files while only the minified versions exist.

For example in the admin it tries to find ---/require.js which does not exist but if I manually go to ---/require.min.js the file exists.

Staging/Production both call to the .min.js version of files. Images are showing and css/js is there it is just not named what it is looking for. We have tried several of the standard things (clear cache, deploy static content) but no change. The deploy mode is set to production.

Is there a setting that controls this somewhere or some other likely culprit for why it would not look for the correct files.


texts: Class Magento\Eav\Model\Attribute\Data\Datetime does not exist After Magento2 Migration

texts:
When Creating a Customer registration I am getting this error

  "We can't save the customer"

on front end. I have Migrated from Magento 1.9.1.1 to Magento 2.3.3.

This is error log:Exception message: Class Magento\Eav\Model\Attribute\Data\Datetime does not exist.


texts:
I am calling a block left.phtml from my main store file like this:

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

In the layout file this is described as:

<reference name="left">
        <block type="marketplace/storeleft" name="store_left" template="marketplace/storesearch/left.phtml" />
</reference>

Till now everything is working fine. Now I want to call another block from within this block:

            SHOP NOW

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

I have changed the layout file for this

<reference name="left">
    <block type="marketplace/storeleft" name="store_left" template="marketplace/storesearch/left.phtml" />
    <block type="marketplace/storeleft" name="rate_bakery" template="marketplace/storesearch/ratebakery.phtml"/>
</reference>

But this new block is getting included after the "left" block. How do I include this new block within the "left" block and not after?


texts: What is second argument in getRequest()->getPost()

texts:
What is the use of second argument in getRequest()->getPost?

$products = $this->getRequest()->getPost('products', -1);
$products = $this->getRequest()->getPost('products', 1);
$products = $this->getRequest()->getPost('products');


texts: Magento 2 Transfer link.phtml to my own theme

texts:
I've created a Magento 2 theme.

I'd like to modify this file but transfering it to my own theme:

vendor/magento/module-catalog-search/view/frontend/templates/advanced/link.phtml

My question is:

Where do I transfer it to?


texts: Convert the price from Base Currency to USD at the stage of paypal payment?

texts:
I have integrated PayPal to my website and PayPal does not support Base currency INR and support if Base Currency US Dollar.

Partial Working Method:

  app\code\core\Mage\Paypal\Model\Express\Checkout.php

$this->_api->setAmount($this->_quote->getBaseGrandTotal())
            ->setCurrencyCode($this->_quote->getBaseCurrencyCode())
            ->setInvNum($this->_quote->getReservedOrderId())
            ->setReturnUrl($returnUrl)
            ->setCancelUrl($cancelUrl)
            ->setSolutionType($solutionType)
            ->setPaymentAction($this->_config->paymentAction);

Just replace the below code:

$this->_api->setAmount($this->_quote->getBaseGrandTotal())
            ->setCurrencyCode('USD')
            ->setInvNum($this->_quote->getReservedOrderId())
            ->setReturnUrl($returnUrl)
            ->setCancelUrl($cancelUrl)
            ->setSolutionType($solutionType)
            ->setPaymentAction($this->_config->paymentAction);

this one is working but the price Rs.70  displayed like $70 at my PayPal payment page. How to solve this issue?

How to convert the price from Base Currency to USD at PayPal payment?


texts: How to get stock item in configurable-product/:sku/children rest api magento 2

texts:
How to get stock_item for every child product return in  configurable-product/:sku/children.
I can able to get stock_item in Products/:sku only.


texts: In the Nav Menu Display categories if they have products

texts:
I only want to display the categories in Navigation Menu which has product associated with it. Categories without products shouldn't be displayed. I have tried below code but it doesn't work. Any help will be appreciated

$_storeId = Mage::app()->getStore()->getId();
$_rootCatId     = 7;
$_rootCategory  = Mage::getModel('catalog/category')->load($_rootCatId);
$collection = $_rootCategory->getChildrenCategories($_storeId);

I have checked $collection->ProdcutCount() > 0.
But its not working.

Thanks


texts: Customers using paypal not receiving magento order confirmation

texts:
We are using CE1.9.2.4 with all patches installed.
We offer Paypal express checkout as a form of payment. Customers who are paying with paypal are not receiving the Magento order confirmation after completing payment and their order.
We have checked our settings and they appear to be correct. We are receiving the payment IPN and the payment, and the order is showing as processing.
The problem is only with paypal payments, customers using a credit card are no problem.


texts: Magento 2.4 with luma showing correct placeholder instead of small_image

texts:
I am workin in a magento 2.4 with luma as a vendor so the list.phtml come directly untouched from the core of magento.
I can see the images in the admin and in the product view gallery but at the product list I only see the placeholder this happend with all products imported and new and all images work fine at the admin and product view.
If i change the view.xml of the vendors luma template I can see the change of the paceholder type.
Thing that I already try:

run  php bin/magento catalog:image:resize (Product images resized successfully)
clean all type of caches
give 777 to pub to be sure that the rezize has access to the folder.
check that all folders have the apache user.
check the cache folder and i can see the image it is there.
check that the .htaccess it is not afecting the image (also the placeholder it is showing)
change the list.phtm to be sure that the listing it is comming from the magento core file
check the small_image attribute in the admin and db
check logs to see if when i crete a new product with images give any error (nothing found)
check the product attribute in the database to see if it has the path to the file in the catalog.
try using flat catalog product.
try using small images
check the different scopes editing the product to be sure that all images are selected for the image.
change the small_image to Global

I am a developer mode and after each change I clear the cache and some times reindex and rezize all over again.
My asumtions are that it is nothing bad with the php server configuration or .htaccess because the placeholder image it is showing and also the image at the product view.
I also know that when at list.phtml magento do:
$productImage = $block->getImage($_product, $imageDisplayArea);

The problem already happend and it gets the placeholder.
I getting crazy with this problem that I had in the past but usualy was prmitions or after import a need for rezize.
Any ideas welcome...


texts: Magento 2 - How to create a new custom module API

texts: In Magento 2, How to create custom module API? of course, I need have security? Anyone can help explain with a sample module, thanks!


texts: How to create a new eav attribute in Magento 1

texts: How can I create a new EAV attribute for customer in Magento 1 using SQL script.


texts: Security Patch SUPEE-11314 - Possible problems?

texts:
Magento have released new Magento 1 versions

1.14.4.5
1.9.4.5

The patch number is SUPEE-11314 and is available at https://magento.com/tech-resources/download

A summary (covering both M1 and M2 so it's hard to discern) is available at https://helpx.adobe.com/security/products/magento/apsb20-22.html

Did you encounter any compatibility problems or bugs after applying the patch?


texts: I want to enable template path hint in Magento 2 by code as we do in Magento 1.9 we set params so how we can do in Magento 2?


texts: I would like to know if it's possible and if so is it a good idea to create a custom module and then create more than one custom blocks for it. Would this be a good approach or should I create a new module for every custom block I want to create.


texts: How do you disable the "Manufacturer's Suggested Retail Price" on magento.


texts: Assign phtml code to a block (made on admin side)

texts: I want to add this phtml code   <?php echo $this->getLayout()->getBlock('breadcrumbs')->toHtml(); ?>  to add breadcrum to a block made at admin side , I made a block using  admin   named  'custom-breadcrumb' now How I can assign this code on admin side ?


texts: How mass set up an custom customer attribute?

texts:
Check this out:

I have two custom customer attributes: sms_promo and sms_on_order_change. Both have values only with 0 or 1.

My question is how for example i can set for all customers sms_promo to be 1 and sms_on_order_change to be 0 ?

Thanks in advance!


texts: Magento 2: Hide action button by ACL rule in XML definition (ui component)

texts:
I have added action button to the customer form (vendor/module/view/adminhtml/ui_component/customer_form.xml):

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <argument name="data" xsi:type="array">
        <item name="buttons" xsi:type="array">
            <item name="btnAccounting" xsi:type="string">Vendor\Module\Block\Customer\Adminhtml\Edit\AccountingButton</item>
        </item>
    </argument>
</form>

but I need to hide this button by ACL rule.

Can I do it in this XML definition or should I use \Magento\Framework\Authorization (implements \Magento\Framework\AuthorizationInterface) class to do it in the button code (\Vendor\Module\Block\Customer\Adminhtml\Edit\AccountingButton):

public function __construct(
    \Magento\Backend\Block\Widget\Context $context,
    \Magento\Framework\Registry $registry
)
{
    parent::__construct($context, $registry);
    $this->authorization = $context->getAuthorization();
}

public function getButtonData()
{
    $isAllowed = $this->authorization->isAllowed('Vendor_Module::access_rule');
    if ($isAllowed) {
        ...
    }
}


texts: Magento : Extend Caching Time For External JS

texts:
I want to Increase Expire time for External JS how can I achieve this?
Extend from .htaccess doesn't work for this.

And We can use CDN for External JS , like zopim , zendesk , google fonts , google JS etc.


texts: Custom Payment Method form block - can't display on checkout page - Call to a member function setMethod() Error

texts:
I get fatal error while setting up custom payment method block for checkout page

`Fatal error: Call to a member function setMethod() on a non-object in
app/code/core/Mage/Payment/Helper/Data.php on line 106`

Here's my Implementation

Payment Method File paths

app/code/local/SecurePay/SecureFrame/Block/Form
app/code/local/SecurePay/SecureFrame/controllers
app/code/local/SecurePay/SecureFrame/Model/Standard.php

Block Class

<?php
     // app/code/local/SecurePay/SecureFrame/Block/Form/SecureFrame.php
class SecurePay_SecureFrame_Block_Form_SecureFrame extends Mage_Payment_Block_Form
{
 protected function _construct()
  {
    parent::_construct();
    $this->setTemplate('secureframe/form/secureframe.phtml');
  }
}

Payment Model

<?php
class SecurePay_SecureFrame_Model_Standard extends Mage_Payment_Model_Method_Abstract {
    protected $_code = 'secureframe';
    protected $_formBlockType = 'secureframe/form_secureframe'; //This line thows the error
// other stuff ....
}

Also If I comment the line protected $_code = 'secureframe'; Error disappears but obviously custom payment block does not get set

Edit:
Config.xml File

    <?xml version="1.0"?>
<config>
  <modules>
    <SecurePay_SecureFrame>
      <version>0.1.0</version>
    </SecurePay_SecureFrame>
  </modules>
  <global>
    <models>
      <secureframe>
        <class>SecurePay_SecureFrame_Model</class>
      </secureframe>
    </models>
    <helpers>
      <secureframe>
        <class>SecurePay_SecureFrame_Helper</class>
      </secureframe>
    </helpers>
    <blocks>
      <secureframe>
        <class>SecurePay_SecureFrame_Block</class>
      </secureframe>
    </blocks>
  </global>
  <default>
    <payment>
      <secureframe>
        <model>secureframe/standard</model>
        <active>0</active>
        <order_status>pending</order_status>
        <title>Payment via Securepay</title>
        <payment_action>sale</payment_action>
        <test_mode>1</test_mode>
        <merchant_id></merchant_id>

        <allowspecific>0</allowspecific>

        <currency_accepted>AUD</currency_accepted>
        <sort_order>1</sort_order>
      </secureframe>
    </payment>
  </default>
  <frontend>
    <routers>
      <secureframe>
        <use>standard</use>
        <args>
          <module>SecurePay_SecureFrame</module>
          <frontName>SECUREPAY</frontName>
        </args>
      </secureframe>
    </routers>
  </frontend>
</config>

Template file path for phtml file in template directory

app/design/frontend/base/default/template/securepay/secureframe/form/secureframe.phtml

What I am doing wrong ?? How to resolve this error and display custom form on checkout page

P.S. Also tried placing the form phtml file outside the securepay directory like

app/design/frontend/base/default/template/secureframe/form/secureframe.phtml

However error does not get resolved

Edit
Here is the code from Helper file which is giving error

 public function getMethodFormBlock(Mage_Payment_Model_Method_Abstract $method)
{
    $block = false;
    $blockType = $method->getFormBlockType();
    if ($this->getLayout()) {
        $block = $this->getLayout()->createBlock($blockType); // This might be causing error, not sure (from helper file reported in error)

        $block->setMethod($method);
    }
    return $block;
}


texts: Default values in input fields disappeared

texts:
I've noticed that the default values for the catalog search and newsletter subscription have disappeared.

I have checked form.mini.phtml

<script type="text/javascript">
//<![CDATA[
    var searchForm = new Varien.searchForm('search_mini_form', 'search', '<?php echo $this->__('Search entire store here...') ?>');
    searchForm.initAutocomplete('<?php echo $catalogSearchHelper->getSuggestUrl() ?>', 'search_autocomplete');
//]]>
</script>

and subscribe.phtml

<script type="text/javascript">
//<![CDATA[
    var newsletterSubscriberFormDetail = new VarienForm('newsletter-validate-detail');
    new Varien.searchForm('newsletter-validate-detail', 'newsletter', '<?php echo $this->helper('newsletter')->__('Enter your email address') ?>');
//]]>
</script>

However I haven't changed anything on this. I'm guessing it's some sort of .js conflict?


texts: Magento 2: Re-order the Customer Account links

texts:
I'm trying to re-order the links in the Customer Account (mysite.com/customer/account/) of my site. I've created:

#app/design/frontend/Mike/sitename/Magento_Customer/layout/customer_account.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="Customer My Account (All Pages)" design_abstraction="custom">

<body>

    <!-- Removes the My Credit Cards links successfully -->
    <referenceBlock name="customer-account-navigation-my-credit-cards-link" remove="true"/>

    <!-- Won't move the Newsletter Subscription link to the bottom of the nav bar! -->
    <referenceBlock name="customer-account-navigation-newsletter-subscriptions-link" after="-"/>

</body>

Any idea why it won't work? Is the order of the links set elsewhere in Magento – in the admin area and stored in the database, for example..? Is there a problem with the XML above?

I've cleaned all cache and have run magento setup:static-content:deploy en_US but it does nothing. As I've noted in the code snippet, the My Credit Cards link is removed successfully, but the Newsletter link doesn't move anywhere.


texts: What is Factory in Magento2? Why use this. I want to know more details about Factory. When we can use Factory.


texts:
I added 2 more status for the orders, and I would like to automatically send transactional email when the orders reach this status.

I added the Email templates, but have no idea what I have to do to automatically send these emails.


texts: My country is missing from the Countries Options in merchant location dropdown menu

texts:
I am looking for "Jordan" as the merchant location in the Countries Options dropdown list, but it is not there!  It was in My previous version of 1.8
Any ideas on how to add it?  Is this related to the Arabic language pack that my developer has not installed yet?
Many thanks in advance.


texts: Ajax call failed to load content from Controller in Magento 2.1.4 Enterprise Edition

texts:
I am trying to do an auto search for my html form. I requesting to controller for data but it is saying:

Failed to load http://127.0.0.1:8080/Project/abc/abc_foo/foocon/: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.

I added following code to my controller:

Header('Access-Control-Allow-Methods', '*');

Header('Access-Control-Allow-Headers', '*');

Header('Access-Control-Allow-Credentials','*');

Please find the ajax code below:

$(document).ready(function () {
    $("#inputName").keyup(function(){
    var valueCount = $("#inputName").val();
        if(valueCount.length > 3){
            $.ajax({
                url: 'http://127.0.0.1:8080/Project/abc/abc_foo/foocon/',
                dataType: 'json',
                type: 'post',
                contentType: 'application/json',
                data: JSON.stringify({ "inputName": $('#inputName').val()}),
                processData: false,
                success: function (data, textStatus, jQxhr) {
                    console.log(data);
                },
                error: function (jqXhr, textStatus, errorThrown) {
                    console.log(errorThrown);
                }
            });
        }
    });
});

Please suggest the solution. I checked several times but not getting any help.


texts: Exam-Labs and Magento Certified Developer Exam

texts:
I'm trying to take the exam for the Magento Certified Developer. I've done some researches and found this Exam Labs website, and here we can try a test exam.

I wonder if the answers provided to each question are realiable?

Because when I came to this question today,

  Question No : 68 - In order to successfully register and configure a new entity capable of being saved and loaded from the database, you
  must create a model and which three of the following? (Choose three)

  A. a collection class

  B. configuration settings in your module's config.xml

  C. an entry in Mage::$_registry

  D. a record in the eav_entity table

  E. a resource model

  F. a table in the database that will store the entity s data

The answer website provided is B,E,F. I agree with B and E. but why F is correct? shouldn't it be D?


texts:
I have overwritten the 2columns-left layout by positioning a container using the move action and then assign the order in one of the containers.

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="1column"/>
<move element="main" destination="columns.inner" before="-" />
<referenceContainer name="columns">
    <container name="columns.inner" htmlTag="div" htmlClass="columns-inner" before="-">
        <container name="div.sidebar.main" htmlTag="div" htmlClass="sidebar sidebar-main" after="main">
            <container name="sidebar.main" as="sidebar_main" label="Sidebar Main"/>
        </container>
        <container name="div.sidebar.additional" htmlTag="div" htmlClass="sidebar sidebar-additional" after="div.sidebar.main">
            <container name="sidebar.additional" as="sidebar_additional" label="Sidebar Additional"/>
        </container>
    </container>
</referenceContainer>

This throws the following error in system.log.

  main.CRITICAL: Broken reference: the 'div.sidebar.main' tries to reorder itself towards 'main', but their parents are different: 'columns.inner' and 'columns' respectively. [] []

I guess it's because the move action is the last action in queue when rendering.

How can I remove this error?. Can I change the order of the rendering actions?


texts: In the checkout page, how to default select and load a payment method?

texts:
In the final magento checkout page, at the payment method part, I have two options, SagePay and PayPal.

Neither are selected, but I would like the SagePay option preselected by default, and therefore load automatically without the customer having to select anything.


texts: Set a specific product page as the homepage or redirect on homepage

texts:
I am creating a shop with only one product. I want this product page to be the homepage, or instantly redirect to that product page when i visit the store. Any idea how?

I did find this option to set a homepage url:

But if i simply enter

  /product-sku.html

there then it won't work and my homepage returns a 404.


texts: Magento 2 - Disable some modules per store view

texts:
I have setup two stores in Magento 2.2.6, each store have their own theme and url address.

In one store I have Porto theme installed in the second store I have other theme.

How I can disable for example Porto theme / modules in the second store?

Thank you


texts:
Hi i have installed magento2.0 in my PC and i moved total bakeup including database to another PC

When i run the file using ip in that configured system its redirecting to my IP

Please tell me the solution?

I have moved all the files and i have imported DB and then changed path in coreconfig file also still its redirecting to my IP.


texts:
I'm trying to show the name + quantity in stock for each simple product of a configurable product.
I'm trying

<?php
if($_product->isConfigurable()) {
/*  $itemsinstock = 0; */
        echo '
Aantal in voorraad van:
';
        echo '
';
        foreach ($_product->getTypeInstance(true)->getUsedProducts ( null, $_product) as $simple) {
                $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($simple)->getQty();
                $stock = round($stock,2);
                echo "
". $simple->getName()." &nbsp;:&nbsp;	$stock
";
/*              $itemsinstock+= $stock; */
        }
    echo '
';
/*  echo $itemsinstock; */
} else {
        echo "
". $this->__('Availability:') ."&nbsp;". number_format(Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty(), 0) ."
";
}

?>

I do see the quantity, but the name is empty.
When I replace getName by getId, I get the correct id.

I read somewhere that the name is an attribute, but I can't get the name. I must do something wrong, but what/where?

Can some of you point me to the right direction?


texts: How to add my own code to replace navitagion bar (main menu)

texts:
I have code (html, css and js) that make a navigation bar (as main menu) I want to put the html, css and js within the magento 2.3 blank theme (i already created a theme that inheritances from blank theme).

How do I add my navbar into new magento theme.


texts: Set page limit for category and don't allow to change it

texts:
I want to set specific page size for one category, I do this in Custom Layout Update this way:

<reference name="product_list_toolbar">
    <action method="addPagerLimit"><limit>2</limit></action>
    <action method="setDefaultGridPerPage"><limit>2</limit></action>
    <action method="setDefaultListPerPage"><limit>2</limit></action>
</reference>

It works as intended - default limit is 2, but when I change the limit in other category (e.g. to 9) it is now current limit.
Probably limits are stored in users session.

I would like to override current limit in this particular category, to be 2 all the time. I tried methods setCurrentLimit and setLimit but both doesn't work.


texts: Magento2 how to extend wishlist_index_index.xml?

texts:
In my theme directory, wishlist_index_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer.wishlist">
            <block class="Magento\Wishlist\Block\Customer\Wishlist\Button" name="customer.profile" as="profile" template="customer/profile.phtml" cacheable="false" />
            <block class="Unis\Profile\Block\Customer\Wishlist" name="customer.profile2" as="profile2" template="customer/profile2.phtml" cacheable="false" />
        </referenceBlock>
    </body>
</page>

in Magento_wishlit/templates/view.phtml

<?php echo $this->getChildHtml('profile'); ?>
<?php echo $this->getChildHtml('profile2'); ?>

but the childhtml profile2 didn't display;

the block class

Unis\Profile\Block\Customer\Wishlist extend Magento\Wishlist\Block\Customer\Wishlist;


texts: Magento 2: I need to get Current quote data from checkout cart model in Custom cron job

texts:
I want to get current quote data for cronjob in cron/run.php. But it's not working.

Please check my below code. I am stuck with this. Magento2 version is CE 2.2.6

namespace ABC\Abandon\Cron;
use \Psr\Log\LoggerInterface;

class Run {

    protected $logger;
    protected $scopeConfig;
    public function __construct(
        LoggerInterface $logger,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
    ){
        $this->logger = $logger;
        $this->scopeConfig = $scopeConfig;

    }

    public function execute(){
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $cartObj = $objectManager->get('\Magento\Checkout\Model\Cart');
        $quoteId = $cartObj->getQuote()->getId();
        $itemsArray = $cartObj->getQuote()->getAllItems();
        foreach($itemsArray as $item) {
            $productName[] = $item->getName();
        }
        if(is_array($productName)){
            $productNames .= implode(';',$productName);
        }
        $abdata['productNames'] = $productNames;
        $abdata['quoteid'] = $quoteId;
        return $abdata;
    }
}


texts: Magento 2.3.4 Command "show" failed: In RemoteFilesystem.php line 742:

texts:
This error shows when I hit Extension manager in the Magento Admin. How do I fix it?

Command "show" failed: In RemoteFilesystem.php line 742: The 'https://repo.wyomind.com/packages.json' URL required authentication. You must be using the interactive console to authenticate show [--all] [-i|--installed] [-p|--platform] [-a|--available] [-s|--self] [-N|--name-only] [-P|--path] [-t|--tree] [-l|--latest] [-o|--outdated] [--ignore IGNORE] [-m|--minor-only] [-D|--direct] [--strict] [-f|--format FORMAT] [--] [<package> [<version>]]


texts: Set Products Out Of Stock If They Haven't Been Updated Within A Day

texts:
I'm just wondering if there is a way to set my products as out of stock if they haven't been updated within a day?

Any method will do, I am importing products via CSV and if a product isn't in the CSV but is in my products database I want it to appear as out of stock.

Any idea how I can do this?

Thanks


texts:
Yesterday I have Uploaded files of Aoe scheduler (which I had downloaded from GitHub) through FTP on my project.

But when I setup schedules from admin, it wasn't working. I got error in report files as "last_seen" column (and some other column names) are missing in the table cron_schedule (I checked into DB and yes they were not there).

So, to fix this I have dropped the table through php myadmin, downloaded Aoe scheduler V 1.5.0 from here and uploaded these fresh files to replace the previous ones.

But, now the issue is that the cron_shedule table is not at all being created in database. so the schedular options are not working in backend.

I need to reinstall this module to make emails work.

Please Help!


texts: Magento 2 - Type Error occurred when creating object: Magento\Framework\Interception\Config\Config after upgrade to 2.3.2?

texts:
After I ran the update from Magento 2.2.8 to Magento 2.3.2, I am getting this error whenever I run a CLI command like upgrade or cache,

  main.CRITICAL: Type Error occurred when creating object: Magento\Framework\Interception\Config\Config, Return value of Magento\Framework\Interception\Config\CacheManager::load() must be of the type array or null, string returned [] []

Any idea how to solve that?

Thanks!


texts:
I create a Catalog price rule in admin. Now it's applying in the front-end. But, I want to show actual price in the shopping cart. So I did the below code in abstract.php file. After that I call it in default.phtml. Now I can see the product price are showing like that I want. But now I need to show one line with discounted price before the grand total label.

    public function getPriceWithoutDiscount()
    {/*Edit by Yesh*/
       if ($this->getProductId()) {
             $productID = $this->_getData('product');
             $productID = $this->getProductId();
             $product = Mage::getModel('catalog/product')->load($productID);
             $price = $product->getPrice();
       }
    return $price;
    }

Any suggestions?

Please see my screenshot


texts: Why my theme is not showing on the admin panel on Magento 2.1?

texts:
I have created a new custom theme in it. My theme structure is as follows.

app\design\frontend\Magento\mytheme
----css
----js
----images
----fonts
----etc
----media
----Magento_Theme
----composer.json
----theme.xml
----requirejs-config.js
----registeration.php

In etc folder
--------view.xml

In media folder
--------preview image

The issue is that my theme is not showing in the admin panel. I need to apply it.

I have also run setup upgrade and content deployed command but that not effect.

Can any one suggest me any solution to fix this issue?


texts:
Which one is a better way for customize the admin email templates?

  (contact submitted_form, sitemap generate_warnings, etc)


texts:
I can't seem to find where to edit this:

http://snag.gy/e9xbd.jpg

I couldn't find anything in CMS -> Pages / Static Blocks with these hyperlinks circled in red.

Where do you edit these?


texts: magento 2 list not showing in Stores > Settings > All Stores

texts: i'm trying to setup a new magento site in 2.3.5p1 with multiple store views. after creating all the store views, i added all products. Now when i visit the stores list in Stores > Settings > All stores, the list has gone missing, although the number of records says 10. Below is the image for ref. Please advise how to resolve.


texts:
I need to set a Vacation message in Magento as I will be closing my store for a week.
So far I found that editing text in Demo Store notice works ok. But I am not sure if editing text in Demo Mode and turning it on is a good idea.

Any recommendation how should I proceed ? I only need to put a message, I don't want to turn off checkout.


texts: How can i check availability of a product using pincode feature?

texts:
How can i check availability of a product using pin-code in checkout page in magento ?

Is it can be override the core functionality or have to include a custom module ?


texts: Email variable order.getShippingAddress().getStreet1() returns null

texts:
I have created custom order email template and placed some order shipping address variables inside it.
Most variables work ok, but the following are always returning no value:

{{var order.getShippingAddress().getStreet1()}}
{{var order.getShippingAddress().getCountry()}}
{{var order.getShippingAddress().getCountryModel().getName()}}

Any ideas?


texts: Product Import: Recoverable Error: Argument 1 passed to Mage_Catalog_Model_Convert_Adapter_Product::saveRow() must be of the type array, boolean given

texts:
For some reason, the import function is throwing errors on roughly 10% of the products I am attempting to import. The strange thing is I can export the CSV direct from Magento using the typical export all products profile and import that same exact CSV and the same bunch of products are throwing that error.

The exact error is :

  Recoverable Error: Argument 1 passed to Mage_Catalog_Model_Convert_Adapter_Product::saveRow() must be of the type array, boolean given, called in /home2/esdzone/public_html/app/code/core/Mage/Adminhtml/controllers/System/Convert/ProfileController.php on line 250 and defined in /home2/esdzone/public_html/app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php on line 625

Any idea what could be causing this problem?


texts: Magento magento_default_pages_tmp objectID(10) too big?

texts: I'm trying to use Algolia in Magento for autocomplete search. It tell me that this object is too big.. Now I'm not interested to algolia working or not. My interest is to understand what is this object. Where I can find it? What is it?


texts: Magento 2 don't show some product in macrocategorie after migration from Magento 1.9

texts:
I've done a migration from Magento 1.9 to Magento 2.1.5. All product are present in catalogue and subcategories, but some product (not all) are not rendered on the frontend in the page of macrogategories.
I've checked from the admin if there are some difference in the congiguration of the products, but all have the same and I can't understand where is the problem.


texts: Not able to reindex "Catalog URL Rewrites", all other index are indexed fine in magento 1.9.3.8

texts:
I have upgraded Magento 1.9.1.1 to Magento 1.9.3.8.
After this I am not able to reindex "Catalog URL Rewrites" index while all other index are working fine (I am able to index them).

I am getting error 505 error:
"Request Timeout
This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'."

Also I am not able to get this error info in any log files.
Also I have no SSH access.

I have upgraded the website in localhost and then move files only to live server today. Website is working fine but as reindexing is one of the most important step so I am not able to do this and its causing some other issue in backend.


texts: magento atrributes values not showing on admin and frontend

texts:
I have upgraded magento version from 2.1.8 EE to magento 2.3.1, after upgrade some attributes values are not showing in admin and frontend, like full short description is showing blank in admin and so not rendering on frontend too.
Checked the values in database, they are present in database.
I have done setup upgrade, di compile, reindex and cache flush .

Please provide a solution.


texts:
I need to retrieve image's url in phtml from pub/media dir, the same image that i used in a static wysiwig block retrieved with {{media url="path/to/image.jpg"}}.

I know $block->getViewFileUrl(), but it takes images from app/code or app/design.

Is there a same easy way?


texts:
i am trying to remove the validation.js script from my home page as it is not need here. I am using this code in my page.xml

    <cms_index_index>
    <reference name="head">
                <action method="removeItem"><script>prototype/validation.js</script></action>
    </reference>
</cms_index_index>

But the script is still being loaded. What am i doing wrong?

Thanks


texts: I need to remove some of my products from one a single website and it's store view. How do I do this, without ending up deleting it from all all stores?


texts: Magento 2.1 with new domain and I can't login into admin anymore

texts:
We just go our real domain pointed to our VPS with Magento 2.1 on it.

Before: dev.domain.com

Now: www.domain.com

The shop is working more or less ok with a few hiccups.

We have already changed the base_url and the secure_base_url.

I can't login into the admin area anymore without any error message.

Nothing on the login page - I'm just being returned to the login.

Nothing in system, exception or debug.log.

I already found this one here:

SOLVED - Magento 2 - Unable to login to admin (no error message) stuck at login screen

but I don't have "cookie" at all in core_config_data.

Until yesterday, I never had any problems to login to the admin area with the subdomain dev.domain.com


texts: Reducing page load time on product collection / product collection usage options

texts:
I want to show the full product list from a category without pagination, however with ~500 simple products page loading is slow. Is there any way I can fetch the full collection and show sections at a time, reducing page load times?

Alternatively is there a way I can setPageSize(20) (or something), but save the full collection for use later in the list.phtml file?


texts: Which basic modules do you recommend to disable for performance and other? - Magento2

texts:
Which basic modules do you recommend to disable for better performance or other reason?
(I solved a checkout issue after disabling Dotdigitalgroup_Sms module.)


texts: Trying to display the 'country_of_manufacture' attribute on product view with extra html if value exists. Why does this code not work?

texts:
This is the php code I wrote for our product view page. It should only show on the front end if the variable has a value. yet the html still shows even if the product does not have the variable defined. Note: This is specific to the magento predefined country of manufacture attribute.

<?php
    $coManufacturer = $this->getProduct()->getAttributeText('country_of_manufacture');
?>
<?php if ($coManufacturer): ?>

Country of Origin: <?php echo $coManufacturer; ?>

<?php endif; ?>


texts: How to Change Order of Stylesheets and JS in Magento and Add Multiple CSS/JS Files

texts:
After using local.xml to add stylesheets and js like so:

<?xml version="1.0"?>
<layout>
<default>
    <reference name="head">
        <block type="core/text" name="google.cdn.jquery">
            <action method="setText">
                <text><![CDATA[<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><script type="text/javascript">jQuery.noConflict();</script>]]>
                </text>
            </action>
            <action method="setText">
                <text><![CDATA[<link rel="stylesheet" href="//css.cdn.tl/normalize.css">]]>
                </text>
            </action>
            <action method="setText">
                <text><![CDATA[<link rel="stylesheet" href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css">]]>
                </text>
            </action>
        </block>
            <action method="addItem">
                <type>skin_css</type>
                <name>css/bootstrap.css</name>
            </action>
            <action method="addItem">
                <type>skin_css</type>
                <name>css/layout.css</name>
            </action>
            <action method="addItem">
                <type>skin_js</type>
                <name>js/script.js</name>
            </action>
    </reference>
</default>
</layout>

I find several problems.

In the "Block" portion of the code, only the last action is used. Why does that happen?
On the page source, my default styles.css is inserted before my other css files. I was hoping to have style.css be the last css file on my page. How to fix this issue?
My jQuery is loaded after my default script.js. How can the order be reversed?


texts: translating a string with html elements in it

texts:
I'm having trouble translating this string in M2. It has '' element in it, I have tried all possible string splitting options but none of them seems to work. Is there some kind of a trick that I don't know?

    <?php /* @escapeNotVerified */ echo __('Order Date: %1', '<date>' . $block->formatDate($block->getOrder()->getCreatedAt(), \IntlDateFormatter::LONG) . '</date>') ?>

I need to translate that Order Date: %1 part

I hope it hasn't been asked before, though I didn't find an answer for it from anywhere.


texts: How to save customer_address custom attribute from checkout onepage

texts:
I have created a custom customer_address attribute using below script  :

$installer = new Mage_Customer_Model_Entity_Setup('core_setup');
$installer->startSetup();

$installer->addAttribute('customer_address', 'country_code', array(
    'type' => 'varchar',
    'input' => 'text',
    'label' => 'Country Code',
    'global' => 1,
    'visible' => 1,
    'required' => 0,
    'user_defined' => 1,
    'visible_on_front' => 1
));
Mage::getSingleton('eav/config')
    ->getAttribute('customer_address', 'country_code')
    ->setData('used_in_forms', array('customer_register_address','customer_address_edit','adminhtml_customer_address'))
    ->save();
$installer->endSetup();

and added it in billing.phtml as :

<input type="text" name="billing[country_code]" value="<?php echo $this->escapeHtml($this->getAddress()->getCountryCode()) ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Country Code')) ?>" class="input-text  required-entry " id="billing:country_code"  />

But on order place other values saved in customer address but not custom attribute.

How to do that?


texts: Magento2 - Get image url in model/helper

texts:
I have a helper class Email under vendor/module/model/helper/Email.php

I have to access a image in the module_path/view/frontend/web/images

I can't use $this->getViewFileUrl('vendor_module::images/image.jpg'); or $block->getViewFileUrl('vendor_module::images/image.jpg');

How can I call the image in my helper class?

Helper file

<?php

namespace Vendor\Module\Model\Helper;

use Magento\Framework\View\Asset\Repository;
use Magento\Framework\App\RequestInterface;

/**
 * Class Email
 * @package Vendor\Module\Model\Helper
 */
class Email
{
    protected $request;

    public function __construct(
        \Magento\Framework\App\Request\Http $request
    )
    {
        $this->request = $request;
    }
    /**
     * @param array $params
     */
    public function sendBasicmoduleFormMails(array $params)
    {
        $params = array('_secure' => $this->request->isSecure());
        $image = $this->assetRepo->getUrlWithParams('Vendor_Module::images/image.jpg', $params);
        $headers = 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
        $headers .= "From: <from_email>" . "\r\n" .

        $headers .= "X-Mailer: PHP/" . phpversion();
        $body = "Some email content with an {$image}";

        mail(some_email, 'a subject', $body, $headers);
    }
}


texts:
I am migrating my store from apache to Nginx due to memory and performance concerns. I configured vhost file for http and https, but somehow I am not able redirect http://www.domain.com/admin to https://www.domain.com/admin.

On login window, it prompts me to login and I was able to login successfully, but it doesnt redirect from http to https before login. After login it redirects to https without any certification issue.

Certificate is valid as I am able to browse normal pages in https by typing in manually.

Here is my config file:

server {
listen      80;
server_name www.domain.com domain.com;
root        /var/vhost/www/domain.com/public_html/;
index index.html index.php;

access_log /var/vhost/www/domain.com/logs/access_log;
error_log /var/vhost/www/domain.com/logs/error_log;
listen 443  ssl;
ssl_certificate /var/vhost/www/domain.com/ssl/www_domain_com_ee.crt;
ssl_certificate_key /var/vhost/www/domain.com/ssl/domain.com.np.key;
ssl_protocols       SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers         HIGH:!aNULL:!MD5;
location / {
    try_files $uri $uri/ @handler;
    expires 30d;
}
location /app/                       { deny all; }
location /includes/                  { deny all; }
location /lib/                       { deny all; }
location /media/downloadable/        { deny all; }
location /pkginfo/                   { deny all; }
location /report/config.xml          { deny all; }
location /var/                       { deny all; }

location /var/export/ {
    auth_basic              "Restricted";
    auth_basic_user_file    htpasswd;
    autoindex               on;
}
location  /. {
    return 404;
}

location @handler {
    rewrite / /index.php;
}

location ~ .php/ {
    rewrite ^(.*.php)/ $1 last;
}

location ~ \.php$ {
    try_files $uri =404;
    expires off;
    fastcgi_read_timeout 900s;
    fastcgi_index index.php;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_param HTTPS on;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param  MAGE_RUN_CODE default; ## Store code is defined in administration > Configuration > Manage Stores
    fastcgi_param  MAGE_RUN_TYPE store;
    include /etc/nginx/fastcgi_params;
}
rewrite ^/minify/([0-9]+)(/.*.(js|css))$ /lib/minify/m.php?f=$2&d;=$1 last;
rewrite ^/skin/m/([0-9]+)(/.*.(js|css))$ /lib/minify/m.php?f=$2&d;=$1 last;

location /lib/minify/ {
    allow all;
}
gzip on;
#gzip_comp_level 9;
gzip_min_length  1000;
gzip_proxied any;
gzip_types       text/plain application/xml text/css text/js application/x-javascript;

}

Would really appreciate your help smile

Thanks


texts: How to mock Mage_Admin_Model_Session to use getUser method?

texts:
I'd like to test a method with different admin-user, I mocked the admin session with this code:

$stubAdminSession = $this->getModelMockBuilder('admin/session')
        ->disableOriginalConstructor()
        ->setMethods(null)
        ->getMock();
$stubAdminSession->expects($this->any())
        ->method('getUser')
        ->will($this->returnValue(Mage::getModel('admin/user')->load($data['user_id'])));

$this->replaceByMock('singleton','admin/session', $stubAdminSession);

but when I call the follow instruction

$admin = Mage::getSingleton('admin/session')->getUser();

the admin variable is null.
In debug mode I can see the matchers array inside the

Mage::getSingleton('admin/session')

with correct stub and the correct methodNameMatcher


texts: SSL configuration on confidential part of store on front end

texts:
I have an issue in my website I want to enable the https on confidential part of front end like checkout, login, register etc I make the configuration like this in backend

but https is not enabling on confidential part of store I create some model for secure checkout found on google but still didn't work. if I change the unsecure base url to https it apply on whole site which I don't want.

Kindly any body can help me in this issue..


texts:
I have a custom admin form and unfortunately it doesnt have a UI component xml file.

I was able to add the no-whitespace class validation.

I would add also a regexp pattern, but I don't know where I should specify the format.

I tried

'class' => 'no-whitespace pattern',
'pattern' => '^[0-9]+(,[0-9]+)*$'

but only no-whitespace works fine

any idea?
tnx


texts:
I created a form in backend like this:

I want to  change save button text from 'Save' to 'Insert', here's my code:

  Block\Adminhtml\Tools\Edit.php:

namespace Test\UploadFile\Block\Adminhtml\Tools;

use Magento\Backend\Block\Widget\Form\Container;

class Edit extends Container
{

    protected $coreRegistry;

    protected $toolsId=false;

    public function __construct(
        \Magento\Backend\Block\Widget\Context $context,
        \Magento\Framework\Registry $registry,
        array $data = []
    ) {
        $this->coreRegistry = $registry;
        parent::__construct($context, $data);
    }

    protected function _construct()
    {
        $this->_objectId = 'tools_id';
        $this->_controller = 'adminhtml_tools';
        $this->_blockGroup = 'Lime_UploadFile';

        parent::_construct();

        $toolsId = $this->getToolsId();
        if (!$toolsId) {
            $this->buttonList->remove('delete');
        }
    }

    public function getHeaderText()
    {
        $toolsId = $this->getToolsId();
        if (!$toolsId) {
            return __('New File Item');
        } else {
            return __('Edit File Item');
        }
    }

    public function getToolsId()
    {
        if (!$this->toolsId) {
            $this->toolsId=$this->coreRegistry->registry('current_tools_id');
        }
        return $this->toolsId;
    }

}


texts:
Like, I have 5 items in my Cart.
It means there is 1 row in quote table. Which contains parent ID.
And,  5 rows in quote_item which describe all 5 items.
I want separate 3 items from these 5 in another custom quote and need a separate quote for these 3 items.
Expected result:
I want 2 quotes,
1 have 2 items AND 3 items will assign to the newly created quote.
Help would be appreciated.


texts: while closing modal popup header is still not closed in magento 2

texts:
I have created a custom modal popup in Magento 2.
But while closing the modal popup, the header of the popup modal is still not closed.
Can anyone guide me to close the entire popup including the header in Magento 2


texts: How to let customers order out-of-stock items by making them understand they might take longer to get and ship?

texts:
Magento 1.9.4
Porto theme

There are certain products we will not have on-hand but can order them and deliver with a slight delay if/when a customer is interested.
What would be the best way to approach this? How to set it up in the Magento shopping cart and how to make it clear to the customer that they are ordering a product which is currently not in stock but we will get it for them and deliver as soon as possible?


texts: Magento 2.3 : File Upload issue in UI Component Form

texts:
I have created a form with Ui component. It contains a file field. When I upload a file it shows an error in the console

Here is my code
Ui component form

         <field name="ffl">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="source" xsi:type="string">ffl</item>
                    <item name="label" xsi:type="string" translate="true">Licence Pdf</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="formElement" xsi:type="string">fileUploader</item>
                    <item name="required" xsi:type="boolean">true</item>
                    <item name="uploaderConfig" xsi:type="array">
                        <item name="url" xsi:type="url" path="ffl/ffl/fflupload"/>
                    </item>
                </item>
            </argument>
        </field>

Fileupload controller

namespace NameSpace\Ffl\Controller\Adminhtml\Ffl;

use Magento\MediaStorage\Model\File\UploaderFactory;
use Magento\Framework\Controller\ResultFactory;

class Fflupload extends \NameSpace\Ffl\Controller\Adminhtml\Ffl
{
    private $uploaderFactory;
    private $mediaDirectory;

    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\Filesystem $filesystem,
        UploaderFactory $uploaderFactory
    ) {
        $this->mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA);
        $this->uploaderFactory = $uploaderFactory;
        parent::__construct($context, $registry);
    }

    /**
     * Save action
     *
     * @return \Magento\Framework\Controller\ResultInterface
     */
    public function execute()
    {
        try {
            $data = $this->getRequest()->getPostValue();
            $uploader = $this->uploaderFactory->create(['fileId' => 'ffl']);
            $uploader->setAllowRenameFiles(true);
            $uploader->setAllowedExtensions(['doc','pdf']);
            $path = $this->mediaDirectory->getAbsolutePath('fflfiles/');        ;
            $result = $uploader->save($path);

            $result['cookie'] = [
                'name' => $this->_getSession()->getName(),
                'value' => $this->_getSession()->getSessionId(),
                'lifetime' => $this->_getSession()->getCookieLifetime(),
                'path' => $this->_getSession()->getCookiePath(),
                'domain' => $this->_getSession()->getCookieDomain(),
            ];
         } catch (\Exception $e) {
             $result = ['error' => $e->getMessage(), 'errorcode' => $e->getCode()];
         }
        return $this->resultFactory->create(ResultFactory::TYPE_JSON)->setData($result);
    }
}

Please help me.


texts:
And console show this error

Failed to load resource: the server responded with a status of 404 (Not Found)
/magento2/pub/static/frontend/Sm/himarket/en_GB/Magento_Ui/js/lib/logger/console-output-handler.js:34 [2017-12-13 03:21:35] [ERROR] Failed to load the "Magento_Tax/js/view/checkout/minicart/subtotal/totals" component.
ConsoleOutputHandler.show @ /magento2/pub/static/frontend/Sm/himarket/en_GB/Magento_Ui/js/lib/logger/console-output-handler.js:34
/magento2/pub/static/frontend/Sm/himarket/en_GB/Magento_Msrp/js/view/checkout/minicart/subtotal/totals.js/ Failed to load resource: the server responded with a status of 404 (Not Found)
/magento2/pub/static/frontend/Sm/himarket/en_GB/Magento_Ui/js/lib/logger/console-output-handler.js:34 [2017-12-13 03:21:35] [ERROR] Failed to load the "Magento_Msrp/js/view/checkout/minicart/subtotal/totals" component.


texts: Resolved - Reading Database Table Info in Magento Way

texts:
I'm using this simple PHP code below to read data from my module's table, but can't do the same thing using Magento codes.

Tried to do that using different articles but was either getting errors or the whole table structure was displayed in the page instead of just the information.

How can I do that?

    <?php
    $servername = "localhost";
    $username = "username";
    $password = "";
    $dbname = "dbname";

   // Create connection
   $conn = new mysqli($servername, $username, $password, $dbname);
  // Check connection
   if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
   }

   $sql = "SELECT comment_txt, name, comment_date FROM mytablename where productcomment_increment_id='$productId' && comment_status='Approved'";
   $result = $conn->query($sql);

   if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
        echo "Author Name:";
        echo $row["name"];
        echo "
 Comment: ";
        echo $row["comment_txt"];
        echo "
Date: ";
        echo $row["comment_date"];
        echo "

";
    }
   } else {
   //echo "0 results";
   }
   $conn->close();
   ?>

I will greatly appreciate helpful answers.


texts: Insert customer address programmatically weird behaviour

texts:
I'm using magento v2.2.5 , i successfully insert customer programmatically and after i finished insert the customer , i tried to insert customer address like this:

//load
$customer = $this->insertCustomer();
$data['customer_id'] = $customer->getId();

//create address
/* \Magento\Customer\Model\AddressFactory */
$address = $this->addressFactory->create();
$address = $this->addressDataFactory->setCustomerId($data['customer_id'])
      ->setFirstname($data['firstname'])
      ->setLastname($data['lastname'])
      ->setCountryId($data['country'])
      ->setRegion($data['region'])
      ->setPostcode($data['postcode'])
      ->setCity($data['city'])
      ->setTelephone($data['main_telephone'])
      ->setStreet($data['street'])
      ->setIsDefaultBilling('1')
      ->setIsDefaultShipping('1')
      ->setSaveInAddressBook('1');
$address->save();

if i run this code the address is not being be saved in database, but if i add this code die($address->getId()); after $address->save();  the address is being saved in the database table. for example:

...
  ->setIsDefaultShipping('1')
  ->setSaveInAddressBook('1');
$address->save();
die($address->getId());


texts: Magento 2 Header Sign In Sign Out Issue on CMS pages

texts:
I have a strange issue in Magento 2. After successfully logged in it redirected to My account page and working fine as per Magento 2 standard.

The issue raised after going to CMS pages. It still shows sign in link in header while I have already logged in.

In other pages, its working fine e.g. on product, category, homepage...

The issue only appears in CMS pages.

I have faced this issue In Magento 1 and resolved it by Hole punching. But I have no idea how can do it in Magento2.

what could be the issue and how can I resolve it?


texts: Why magento2 outputs the query while showing data from ResourceModel collection Factory..?

texts:
protected $productCollectionFactory;

public function __construct(
        .....
        \Custom\MyModule\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
        ...
    ) {
        $this->productCollectionFactory = $productCollectionFactory;
       ....
    }

   public function execute()
   {
    $collection = $this->productCollectionFactory->create()->load(1)->getData();
    var_dump($collection);
die();
    return $collection;
    }

Output:

SELECT `main_table`.* FROM `custom_mymodule` AS `main_table`
/home/magento2/Custom/MyModule/Controller/Product/products.php:68:
array (size=1)
  0 =>
    array (size=6)
      'id' => string '1' (length=1)
      'product_name' => string 'Moongoose' (length=30)
      'product_sku' => string 'Moo74' (length=3)


texts:
I found how to use logical "AND" & "OR" in search criteria:

https://devdocs.magento.com/guides/v2.3/extension-dev-guide/searching-with-repositories.html
https://devdocs.magento.com/guides/v2.3/rest/performing-searches.html

How to use logical "NOT" in filters/filters groups?


texts: Magento 2 ACL rule move from one db to another

texts:
I have two environment of my website using Magento 2.2.1
One is dev and another is staging.

I have created ACL Roles and assign them to users.

Now i want to copy these ACL Roles to staging environment.

I have exported 4 tables:

  admin_user, admin_passwords, authorization_role, authorization_rule

and import into staging db.

But am facing issue while doing setup:upgrade.

Issue is:

  We can't find the role for the user you wanted

Any help will be appreciated.


texts:
I'm trying to implement an owl-carousel in my Magento webshop. I've loaded the .js file and the stylesheet. Jquery is (I believe) loaded from the template. When I use to code to activate the carousel I get the following error:

Uncaught ReferenceError: jQuery is not defined

I think it is caused by the fact that the owl carousel script is loaded before the jQuery.
I'm loading the .js file from local.xml, but I have no idea where the jQuery is loaded.

When I look in the head of the page I can see the jQuery is loaded from:

skin/frontend/theme/template/js/lib/jquery-1.10.2.min.js

Does anybody know in which file the script is called?
Or how I can make sure the jQuery is called before the .js?

Btw if I include the .js in head.phtml its still called before the jQuery


texts:
I have applied a patch SUPEE-11219 on my Magento 1.9.3.2.
I am getting a known issue (Accounts with Password length < 7 will be locked)
Is there any way , How to resolve this issue ?


texts: Custom Customer Attribute (string) get function not working

texts:
I have defined customer attributes for my customers, and have not had a problem calling upon those attributes until today. I have a custom text attribute for an outside account number. I can see it on the admin backend and edit it, works fine. However, when I try to call it on the front end it fails, while other attributes I set up the exact same way work fine. I have two attributes, outside_account (text/string), and on_terms (true/false boolean).

In order to get the values of these attributes on the frontend, I wrote a couple methods based on a guide I found. In /app/code/core/Mage/Checkout/Model/Type/Abstract.php I defined the methods:

public function getOnTerms()
{
    $onTerms = $this->getData('on_terms');
    if(is_null($onTerms){
        $onTerms = FALSE;
        }
}

public function getOutsideAccount()
{
    return $this->getData('outside_account');
}

Then two more methods in /app/code/core/Mage/Customer/Helper/Data.php:

public function getCustomerOnTerms()
{
    $onTerms = $this->getCustomer()->getOnTerms();
    if(is_null($onTerms)){
        $onTerms = FALSE;
        }
    return $onTerms;
}

public function getCustomerOutsideAccount()
{
    return $this->getCustomer()->getOutsideAccount();
}

Now when I call Mage::helper('customer')->getCustomerOnTerms() it works fine and I get the value of on_terms. However, when I call Mage::helper('customer')->getCustomerOutsideAccount()  it fails and returns a null, even when values are entered for the customer.

I'm not sure if there is additional code I need to add because its a string instead of a boolean, but I've tried lots of things and have been unsuccessful each time. Any assistance would be wonderful! Thank you! And I know a lot of the code is ugly I will clean it up more once I have it all working properly!


texts: How to trigger 404 in Magento 1 from a block or helper?

texts:
I would like to redirect the user to 404 when an error occurs from a block or helper.
In the controller i can do it like this:

$this->norouteAction();
return;

I would like to do the same thing from a block or helper . How can I do it ?


texts: Up-sell: adding a description to the product link

texts:
I have three products: The first one is a main product which has the second one as up-selling product. They pretty much fit together because they are related somehow (for example a MP3-Player and some headphones).

Now there is a third product, which I also would like to add as a up-selling product, for example a special waterproofed bag which isn't really related to the other two products. Though, you could use that product for the MP3-Player to keep it dry during sports. I would like to add that as a description especially for this relation. Like a "reason" why that product is related to the other one.

Is there any kind of extension or even a way to do that with Magento in general?


texts:
I have created a custom template for the invoice email and added the variable {{var comment}} to the email template. The other modifications I have made to the email template does show, but not the comment.

I have added a few comments to the invoice, but none show up. I am referring to the email that sends when you have an invoice open and you click the Send Email button.


texts: Implementing a custom Magento indexer in an extension

texts:
I'm working on adding an additional column to a grid in an existing backend extension. I need to add an indexer to to this extension indexing the health (the amount of sells) of (roughly) the last 3 months. (90 days.) I'm splitting the health per month. (So, a field each for 1-30, 31-60 and 61-90 days ago.)

Having basically zero knowledge of Magento indexers I decided to create a simple featureless extension (a functioning adminhtml page and nothing more) and attempt to implement an indexer on that to learn how indexing works.

I've already looked at a few guides trying to figure out how to do this but none of them have fully functioning examples.

Mexbs: Creating custom Magento Index https://archive.is/rE0oz
AionHill: How to implement extremely fast custom indexing in Magento?
https://archive.is/LMiF6
Magento Stack Exchange: Custom Indexer, Magento way ?
Custom Indexer, Magento way ?
Stack Overflow: Magento - Add index to table column using upgrade
script
https://stackoverflow.com/questions/27009691/magento-add-index-to-table-column-using-upgrade-script

They include code needed to create an indexer without detailing how to implement it.

How would I create an indexer, implement it and use it for this kind of data? What type of index do I need to index this information?

I'm looking for an explanation of Magento indexes and a full implementation. Being able to get an index up and running with this kind of data in either extension works for me.


texts: How to show product custom attribute value on sales order view page under magento admin

texts: How to show product custom attribute value on sales order view page under magento 2.2.6 admin.


texts: Magento2 - Ajax Add to Cart - Out of stock situation - Stop redirect and show message dynamically

texts:
I have implemented Ajax to my "Add to Cart" button so that customers can add products to their cart without reloading the page.

Here is bare minimum of code which I used in order to achieve successful Ajax call in Product Details page for adding Product to Cart without refresh:

<form method="post" action="<?php /* @escapeNotVerified */ echo $block->getSubmitUrl($_product); ?>" id="product_addtocart_form"<?php if ($_product->getOptions()) {echo ' enctype="multipart/form-data"';} ?>>
    <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $_product->getId(); ?>" />

    <button type="submit">Add to Cart</button>

    <script type="text/x-magento-init">
        {
            "#product_addtocart_form": {
                "catalogAddToCart": {
                    "bindSubmit": true
                }
            }
        }
    </script>
</form>

Well, this far everything works perfect. When the button is clicked, message appears in page about successful Product adding to Cart.

The problem is when Product cannot be added to Cart for some reason (for example, out of stock). Then instead of message showing in page dynamically, the refresh happens and only then message pops out in page.

How do I stop refresh in those cases and simply just show the message about reason why Product is not able to be added to Cart?


texts: Category Issue Magento 2.3 (Porto Theme)

texts:
We have an issue with Category (www.lsxgarasjen.no).
We have 2 subchild categories ( so the path is Motordeler Og tuning - AN koblinger og Slanger) If wee try to go to the next step the next box (not sure what to call ut, sorry) disappears and you need to go through all the steps again.

Anyone know why this is happening?

Porto theme 3.2.1 and Magento 2.3. Megsmenu extension

Any help is appreciated.

Thanks


texts:
i want to add class="no-js" to the <html> Element.
How can i do this?

Is this possible with XML or should i override vendor/magento/module-theme/view/base/templates/root.phtml ?


texts: Everyone, I wanted to insert the Product collection in my Slider for this purpose I'm using JQuery script (In the theme Header) with the HTML and CSS. The Error is "$ signed undefined" while I'm doing inspect-->Console! The below example was trying to implement. kindly guide me!


texts:
Is it posible to set, for example related product:

I set "product_2" as a related product when managing "product_1". Now on frontend when I visit the "product_1" page I can see "product_2" in the blok "Related products".

Is is posible to see "product_1" as a related product when I visit "product_2" page? Or is it obligatory to set it in the administration.


texts: How do you add the CMS navigation block to an existing .phtml page?

texts:
I have a phtml template that I'd like to add the CMS nav menu to. The page is added through the hierarchy but when clicked it renders without the CMS navigation on the left side (the page is using the 2 column-left template). The others are standard CMS Pages created through the Admin so they work fine.

Does anyone know where I can find the block to add to local.xml? Everywhere I've looked on the internet is about how to add a page to CMS, not add the CMS component to the page. Any help would be greatly appreciated. Thanks!


texts: magento 2 - how to set attribute datetime display time?

texts: how to set attribute datetime display time ?


texts: Proper Place to Add CSS in Magento2 and Magento only Showing CSS Changes when Clearing Browser Cache?

texts:
I am trying to modify some CSS files in my Porto theme in Magento 2.3.5pt-2. When modifying the CSS in pub/media/porto/web/css/custom.css I am not seeing any changes. I am in developer mode, I have run static content deploy and cleared cached but nothing shows on frontend until I clear my browser cache. Is there a better way to modify CSS in Magento2 with out having to clear browser cache every time?
I am modifying the CSS in pub/media/porto/web/css/custom.css. Should I be modifying these theme CSS files somewhere else like in app/design/frontend/Smartwave/porto? Where is the best place to add CSS to modify your theme?
Trying to add this CSS
.sidebar .product-items .product-item-info .product-item-photo { width: 100%; }
.sidebar .product-items .product-item-info .product-item-photo img { max-width: 100% !important; width: 100%; }
.block.related .owl-stage,
.block.related .owl-stage .owl-item { width: 100% !important; }

.products.list .product-item-photo a { display: block; }

.page-products .product-image-photo.default_image {
    width: 100% !important;
}

.category-image img  {
    width: 100% !important;
}

Change in my dev environment are only reflected until clearing browser cache. Any help would be much appreciated.


texts: Search Criteria for the products in magento 2

texts:
I have gone through the Search Criteria functionality to filter the products, for this I have created the custom attributesmart_search multiselect attribute. And I have written some code for filter those items.

But it is not working for me, for this I written below stuff.

<?php

namespace ABCCompany\CustomerSearch\Observer;

class RedirectCustomerSearch implements \Magento\Framework\Event\ObserverInterface{

    /**
    * @var \Magento\Catalog\Model\ProductRepository
    */
    protected $_productRepository;

    /**
    * @var \Magento\Framework\Api\SearchCriteriaBuilder
    */
    protected $_searchCriteria;

    public function __construct
    (
        \Magento\Catalog\Model\ProductRepository $productRepository,
        \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder
    ){
        $this->_productRepository = $productRepository;
        $this->_searchCriteria = $searchCriteriaBuilder;
    }

    public function getSmartSearch($search){

        $searchCriteria = $this->_searchCriteria->addFilter('smart_search', $search)->create();
        $result = $this->_productRepository->getList($searchCriteria);
        return $result->getItems()

    }

}

In smart_search options have blue color, binding, Comics etc.. I have passed blue color, but it is returning nothing.

Could you please suggest me where I went wrong?


texts: Magento 2 : How to show a menu in header part?

texts: I  want to show a menu in header part in magento 2? please help me how to add in header part?


texts: Customer menu is not displaying after login

texts:
We are building our website using Magento 2.3 EE. We have extended the luma theme. While we test our site, we have found out that there is no links for customer to go to My account page. Please see the below screenshot.

I'm not sure that what I have missed. Can anyone please help me to resolv this issue?


texts: Magento 1.9 getCompanyName from registration form field

texts:
I have a custom module with an event observer that sends an e-mail to the admin as soon as a new user registers.

In my registration form i am using also the company field. Now I would like to show the company name also in my e-mail to the admin.

How can I call this value?  Everything I tried so far did not work. Who can help ?

thanks


texts: Maichimp send order notification magento 2

texts:
I have installed Mailchimp extension and integrated it with our Magento store.
The requirement is to send Order notification and delivery notification email in our Magento store through Mailchimp. I have connected my Magento store with Mai-chimp using your extension with API
The contacts from Magento to Mail-chimp are synched in audience.
But the order confirmation and Delivery notification email are not send so for that do we need to use Mandrill?
I have setup Order confirmation and shipping confirmation emails in Mail-chimp account


texts: Add product thumbnail in order email template

texts:
I want to add product thumbnail and custom attribute in the order
  email template.

Help !!!