texts: Magento 2.1: display a search bar in your website's header

texts:
I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank.

I have moved the top links at the right of the logo:

<move element="top.links" destination="header-wrapper" after="logo" />

I want to display the search bar (it does not display anywhere) above the top links (like the screenshot indicates).

For this purpose, I wrote the line below, in my default.xml file:

<move element="top.search" destination="header-wrapper" before="links" />

The result is that the search bar not only does not display above the top links but it does not display at all.

There is alse a app/design/frontend/Company_Name/Theme_Name/Magento_Search/layout/default.xml file with this code:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="top.search" destination="navbar-collapse" after="navigation.sections" />
        <referenceBlock name="advanced-search-link" remove="true" />
    </body>
</page>

As you can see, on the website's homepage, the search box does not appear anywhere.

What am I doing wrong?
Could the search feature be disabled from admin?
Can I display the search bar inside the top links <ul> element?


texts: 2 Orders From Same Account Information But Different People

texts: I have a weird situation I'm wondering how to fix or prevent. I had 2 orders come in with the same account information, but the actually customers were 2 different people. One was the right person with the account information and the other one was a completely different person. They were back to back orders, but come in about hour difference in time. Luckily the payment methods were different, but is there a reason why these 2 orders had the same account information attached to them?


texts: order email send to multiple customer(random customer)

texts:
My problem is ordered email send to random multiple customers, i have installed Magento(Magento ver. 1.9.3.8).

when customer place order, it will send an order email to random multiple customers. it sends order email to the customer(who order product) + random multiple customers. each and every time Magento send order email to a random customer. I do not have any file or folder in local(app\code\local)

I did clear index, Cache Storage Management, manually Cache clear(from var), flush Cache etc..

I have no idea how to fix it, Any help or suggestion will be appreciated.


texts: how to migrate customer password from woocommerce to magento2

texts: Is there any script available for migrate woocommerce customer password to magento2 customer password.


texts: Error log - 'PHP Fatal error: Class 'Mage_Catalog_Model_Product' not found in'

texts:
One of our clients is running a Magento site that experiences intermittent problems where the home-page half-loads occasionally.

Investigating /var/log/httpd/error_log reveals the following which appears to be the source of the problem:

[Sat Feb 28 21:05:45 2015] [error] [client ###.###.#.###] PHP Fatal error:  Class 'Mage_Catalog_Model_Product' not found in /var/www/html/app/code/local/TM/Highlight/Block/Product/Abstract.php on line 40

The culprit code block in /local/TM/Highlight/Block/Product/Abstract.php is:

    $this->addData(array(
        'cache_lifetime'    => 86400,
        'cache_tags'        => array(Mage_Catalog_Model_Product::CACHE_TAG),
    ));

I've had a quick look at the documentation for the Mage_Catalog_Model_Product class and it does seem that class exists and so does the constant CACHE_TAG.

What's going on here? Is it a bug in this Abstract.php (which has come from Templates-Master at http://www.templates-master.com)? Is the Mage_Catalog_Model_Product class magically being loaded sometimes and not loaded other times for some reason?


texts: magento2 checkout summary page refresh on click redio button event

texts: I want apply different charges with customer group on-click radio button via ajax summary part refresh in checkout page.If anyone know reply me.


texts:
I have a module which extends Magento API (SOAP). I make the call using an external file and everything is fine. When the same call comes from another system (the extension for API is for a mobile app) then I get

  SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1
  column(s)

and I don't have any idea what the problem is.
This is how I call my method:

$result = $client->call($session_id, 'customer.login', array(
    'website'   => 'base',
    'email'     => 'denisa@yahoo.com',
    'password'  => '123456'
));

Can someone tell what should I verify?


texts: How to resolve cache issue in my extension for Magento Marketplace?

texts:
I'm submit my extension in Magento Marketplace. I have checked all the functionality is working also check in Magento 2 coding standard but face one issue in QA Review.
I'm face below issue
I'm fill up form and upload image & save in admin in check in front end it will display only after cache flush.
Can anyone tell me how can I display that form without cache flush. I know about cacheable=false but it also not accepted by Magento Marketplace.
Please suggest me a way how can I successfully pass my extension from QA.
Thanks in advance.


texts: In Magento 2, what is the correct way to override adminhtml emails?

texts:
I want to override a Magento 2 email in adminhtml, has anyone done this already and what is the correct way to do this?

I have tried it like this: app/design/{vendor}/{theme}/{module}/email

Thank you!


texts: Amazon Payment Method will not show up in frontend

texts:
I've installed the Amazon Payment Plugin and configured it properly in backend. But for some reason it won't show up in frontend at all. I reviewed the logs but these are empty.
Can anyone point me in the right direction where to start debugging? Thanks!


texts: Magento 2 shopping Cart section call in cms page

texts:
I want to  add the cart section on cms page using

Admin -> CMS -> Pages -> Select any page on which you want to display block -> Click on design tab from left navigation ->Under Page Layout section insert the code in "Layout Update XML" field.

But I don't know which section add into The Layout Update XML

Thanks in advance


texts: How to get collection object when use where in collection

texts:
I am trying to add where in collection but it return

  Varien_Db_Select Object

instead of return collection object.

$collection = Mage::getModel('orderoutofuk/orderitem')->getCollection()->getSelect()->where('main_table.send_payment_request_date >= DATE(NOW()) - INTERVAL 7 DAY ');

and I want specific column value in array instead of looping through each object.


texts: Why is my Magento Admin Panel not loading properly all of a sudden?

texts: Just wondering if anyone can help me, all of a sudden i cannot view the Magento Admin Panel, it seems as if the page isn't loading properly or restricted. Any help would be greatly appreciated.


texts: Neither Token nor Oauth API Authentication are working Magento 2.2.3

texts:
Upon activating Oauth in Magento admin, there is no request sent to the callback URL.  If I try to setup normal token authentication, there are no tokens provided.

I followed the documentation for oauth.  Magento will call the URL at "Identity link URL" but it will not call the URL at "Callback URL."  I setup the script at the Callback URL to send me an email when it is called. I can copy/paste the Callback URL from Magento admin into Postman to confirm the script at the URL works so I am sure the URL is correct and the script will take action when it is called.  I am certain Magento is not sending anything to the Callback URL after selecting Activate, selecting Allow, getting expected redirect from Identity link URL, and selecting OK.  My server never saw a request at the URL entered in Callback URL.

I also tried setting up basic token authentication following the token authentication documentation.  This is basically the same process but Callback URL and Identity link URL are left blank.  Again, I hit Authorize and Allow but only the Consumer Key and Consumer Secret blanks are filled in where the documentation suggests Magento should also provide tokens.  What I see are the Access Token and Access Token Secret remain blank.

I have tried deleting values in oauth token table.  That had no impact.

I tried using Postman to post to POST mywebsite.com/oauth/token/request using the guidance provided in this post..  I am certain I had the Oauth 1.0 fields filled out exactly as described in the post.  However, Magento returned

  oauth_problem=oauth_consumer_key+is+a+required+field%2C+oauth_signature+is+a+required+field%2C+oauth_signature_method+is+a+required+field%2C+oauth_nonce+is+a+required+field%2C+oauth_timestamp+is+a+required+field

There is nothing in the magento/var/log/ logfiles that reflect any of the activity associated with setting up the APIs.

I was using the API successfully in the past by requesting a token using /rest/default/V1/integration/admin/token with a username and password.  At some point that stopped working and I actually don't recall where I got the username and password from as it is an odd looking username that I don't see in the list of users.  I am trying to set up the Oauth process in its place but having no luck at all.

Any guidance is appreciated.


texts: Create Magento 2 cron job task programmatically

texts:
To sync data between 2 portal, we need some action manually trigger, on click of button need to schedule a cron via programmatically. I have found solution but it is for Magento 1.

For Magento 2 what could be change ?

Code for Magento 1 is given below :

$timecreated   = strftime("%Y-%m-%d %H:%M:%S",  mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")));
$timescheduled = strftime("%Y-%m-%d %H:%M:%S", mktime(date("H"), date("i")+ 5, date("s"), date("m"), date("d"), date("Y")));
$jobCode = 'job_id';

try {
    $schedule = Mage::getModel('cron/schedule');
     $schedule->setJobCode($jobCode)
        ->setCreatedAt($timecreated)
        ->setScheduledAt($timescheduled)
        ->setStatus(Mage_Cron_Model_Schedule::STATUS_PENDING)
        ->save();
   } catch (Exception $e) {
     throw new Exception(Mage::helper('cron')->__('Unable to save Cron expression'));
   }

Magento 2 action code

use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\Controller\Result\JsonFactory;
use ABC\Du\Helper\Data;

class Products extends Action
{

    protected $resultJsonFactory;

    protected $schedule;

    /**
     * @var Data
     */
    protected $helper;

    /**
     * @param Context $context
     * @param Model $schedule
     * @param JsonFactory $resultJsonFactory
     * @param Data $helper
     */
    public function __construct(
        Context $context,
        Magento\Cron\Model\Schedule $schedule,
        JsonFactory $resultJsonFactory,
        Data $helper
    )
    {
        $this->resultJsonFactory = $resultJsonFactory;
        $this->helper = $helper;
        $this->schedule = $schedule;
        parent::__construct($context);
    }

    /**
     * Collect relations data
     *
     * @return \Magento\Framework\Controller\Result\Json
     */
    public function execute()
    {
        $timecreated   = strftime("%Y-%m-%d %H:%M:%S",  mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")));
        $timescheduled = strftime("%Y-%m-%d %H:%M:%S", mktime(date("H"), date("i")+ 5, date("s"), date("m"), date("d"), date("Y")));
        $jobCode = 'job_id';

        try {
            // schedule job

        } catch (Exception $e) {
            // exception handle
        }

        $message = 'Cron schedule at ' . $timecreated . ' will execute at ' . $timescheduled;
        /** @var \Magento\Framework\Controller\Result\Json $result */
        $result = $this->resultJsonFactory->create();

        return $result->setData(['success' => true, 'time' => $message]);
    }
}


texts: What is the difference between Mage_Core_Block_Abstract and Mage_Core_Block_Template?  When would I want to use each?


texts: REST API creating more than one media entry for product

texts:
I am trying to import some images for some products using rest rest API (POST to /V1/products/{sku}/media). Works fine for the first image for each product but always fails for the second with the following message:

  Failed to save new media gallery entry." which tells me nothing.

I have checked the payload many times and the few fields that could possibly require unique values (label, position and content name) are all set to unique ones.

What am I missing?


texts: Magento 2.3.1 customer grid sorting issue

texts:
I am using magento 2.3.1.

I am having this strange issue only in admin>customer grid

No matter which column I choose to sort the results are always the same.

It happens only in this grid.

What I tried:

reindex all indexers, several times
checked Redis conf, removed, reinstalled again
Checked Opcache settings, disabled and enabled back
Used nginx standalone, used Nginx as proxy pass with Apache
Reboot server several time
Magento caches are disabled, recleared several times, recopliled and redeploy
Cleared ui_bookmark table

Nothing from these helped.  The only thing I noticed is that on local server with apache only it works with no problem.

Also when this started, when I tried to install a new module, although module was istalled fine, upgraded and compiled when I went to admin I couldn't find it anywhere.

Again in local wasn't this problem. I think that these two are related.

  UPDATE

After making some operations to server and needed to restart all services like Nginx, php-fpm, Redis, varnish, elastic magento customer grid started to work fine again.

But after working in admin about 2 days again the customer grid isn't sorting.

I am sure that is definitely some cache problem....Something is caching this particular grid....I am using Redis 5. Maybe I switch to 4?

Any help or ideas will be appreciated!


texts: Invalid URI error after migrating Magento and no underscore in URL

texts:
I've migrated my Magento CE 1.7.0.2. to a new domain and have updated the local.xml and core_config_data table, web/unsecure/base_url and web/secure/base_url now contain the right urls. (Installation 1)

However upon opening the main page of my store I do get the following error:

There has been an error processing your request

Invalid URI supplied

a:5:{i:0;s:20:"Invalid URI supplied";i:1;s:871:"#0 /home/my-domain.com/public_html/lib/Zend/Uri.php(143): Zend_Uri_Http->__construct('http', '//my-domain...')
#1 /home/my-domain.com/public_html/app/code/core/Mage/Core/Model/Store.php(726): Zend_Uri::factory('http://my-doma...')
#2 /home/my-domain.com/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(313): Mage_Core_Model_Store->isCurrentlySecure()
#3 /home/my-domain.com/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(161): Mage_Core_Controller_Varien_Front->_checkBaseUrl(Object(Mage_Core_Controller_Request_Http))
#4 /home/my-domain.com/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#5 /home/my-domain.com/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#6 /home/my-domain.com/public_html/index.php(87): Mage::run('', 'store')
#7 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

The url of my Magento installation contains dashes but no underscores.

I've successfully installed a clean Magento installation (Installation 2) on the same server using a second database. This installation runs without problems, settings of the web/unsecure/base_url and web/secure/base_url in the core_config_data table are equal.

I've also configured the clean installation (Installation 2) in such a way that it links to the database of the original Magento installation (Installation 1) surprisingly this works fine too.

I feel something is wrong with one of the Magento files of Installation 1. Anybody a clue what might cause installation 1 not to work properly?


texts: redirect https to http for catalog & Product pages

texts:
we are using https for secure pages.

we can see http for unsecure pages - products and catalog pages.

we can see https for secure pages - My account, Login pages.

But if we manually type https:// for home , catalog & product pages, its redirecting to https only. but i want to redirect to http

before home page, catalog & product pages are in https.

i followed this in .htaccess:

#Redirect your Homepage from HTTPS to HTTP
RewriteCond %{HTTPS} on
RewriteRule ^$ http://%{HTTP_HOST} [L,R]

source : http://www.activo.com/redirect-https-to-http-for-any-homepage/

Than home page is working fine.

if we manually type https://example.com for home page ,its rediretcting to http://example.com. It's fine

what i have to do for catalog & product pages.


texts: Can anyone help me with Shipping code in php?

texts: As the quantity of product increases shipping charges also increases. How to write this in a php code?


texts: magento2 developer mode not properly set

texts:
I would like to change the workflow type to client side, but when I navigate to this configuration option, it tells me that this option is not available in production mode.

I've set magento to developer mode with magento deploy:mode:set developer multiple times, I've cleared everything in var/cache, var/view_preprocessed, pub/static and cleaned the cache, but no change. I've also set it to production mode and then back to developer mode, that didn't help either. Last but not least I just changed the config in app/etc/config.php and imported the config, but then the app just keeps telling me The configuration file has changed. Run app:config:import or setup:upgrade command to synchronize configuration.
I don't know what else to try, can somebody help?


texts: Getting an attribute price to format to 2 decimal places

texts:
I have the following code in my list.phtml file, this pulls in the price of the product and then multiplies it by 1.20 (this works great but it displays 3 or 4 numbers after the decimal point

 <?php if($_product->getData('deals_bus_price')) : ?>
    <?php  $attribute = $_product->getResource()->getAttribute('deals_bus_price');
if ($attribute) { echo "£", $attribute_value = $attribute ->getFrontend()->getValue($_product)*1.20 ; } ?>

<?php endif; ?>

Is there any way that I can add something which forces it to display only 2 decimals after the point..

I have tried getValue($_product)*1.20, 2;  etc but that doesn't work, all it displays is £288.492


texts:
what is the use of  in system.xml. In my module its getting error

Invalid XML in file /var/www/html/Magento2/app/code/A/A/etc/adminhtml/system.xml:
Element 'class': This element is not expected.

my code is

<system>
     <tab id="A" translate="label" sortOrder="50">
         <label>A</label>
         <class>A</class>
     </tab>


texts: How to set quantity 1 for some products?

texts:
I have created one attribute and based on that attribute, I have set quantity 1 to few products. But now my issue is that, when I add few products twice then its amount gets calculated.

How to avoid such scenarios ?


texts: Magento 1.9 rewriting base store url for multiple websites

texts:
I have three different websites and within one website three stores on a single Magento 1.9 installation.

 1. www.domain1.com
 2. www.domain2.com
 3. www.domain3.com

Each domain contains three store views. What I want are the following base urls for each store,

For domain 1,

www.domain1.com/in
www.domain1.com/intl
www.domain1.com/rw

For domain2,

www.domain2.com/in
www.domain2.com/intl
www.domain2.com/rw

And for domain3,

www.domain3.com/in
www.domain3.com/intl
www.domain3.com/rw

How can I achieve this? When I enable add General > Web > Url Options > Add Store Code to Urls to true the store codes are added to the url. That is perfect. But, I can't have duplicate store codes. So, I cannot define store code "in" twice or more. Similarly, for the rest of the two cases. Can anyone guide me how to achieve the desired result?


texts: How to delete and regenerate URL rewrites in Magento 2?

texts:
I have recently created 2 additional store view on magento 2 store.
Now the url of category and Products are not for those stores is not proper

Eg: http://example.com/catalog/category/view/s/pouches/id/20/
which is suppose to be http://example.com/accessories/pouches.html

Now when I save each product and category one by one it regenerate url rewrite for that product or category.

But there are lots of products and category.

So is there any way to regenerate URL rewrite

as in Magento 1.x it can be done via reindexing.


texts:
Upon importing our product database I encounter the following error when pressing "Check Data"

  General system exception happened

My image file directory is point to: pub/media/import/images

Has anyone experienced this issue?


texts:
In Magento 2.2.5 load product by id is not working.

I tried the below solutions:

Sol 1:

$product_id=20;
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->get('Magento\Catalog\Model\Product')->load($product_id);

Sol 2:

use Magento\Catalog\Model\ProductFactory;
protected $productFactory;
public function __construct(ProductFactory $productFactory) {
  $this->productFactory = $productFactory;
}
public function getProduct($prodId){
return $_product = $this->productFactory->create()->load($prodId);
}

followed this link

Update(My Entire Block Code):

<?php
namespace Namespace\Vendor\Block;
use Magento\Catalog\Block\Product\AbstractProduct;
class Customproduct extends AbstractProduct{
public function getProductDetail($productId) {
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    return $product = $objectManager->get('Magento\Catalog\Model\Product')->load($productId);
}

}


texts: How can I redirect my Home Page in Magento? (301 permanent redirect)

texts:
I have a CMS-Website and a SHOP-Wensite and I try to redirect the Magento Homepage to my CMS-Homepage. At my server the cms and magento are in two diffrent folders. If I click at myshop.domain.com it should be redirect to cms.domain.com

I've tried with a new page in magento and at "system > configuration > web > default pages" I choose my new page as home page.

At this page I can't use PHP (header location) ...or Javascript (document.location.href)

How can I redirect (301) my Magento HomePage to my CMS-Homepage?

With htaccess?
I found Catalog > URL Redirects  but my 301 didn't work?!


texts: Product compare list empty on costum module page

texts:
At header.phtml I load the product compare list with the following code:
$collection = $this->getLayout()->createBlock('catalog/product_compare_list')->getItems();
On default pages like category, product, cms pages the compare list is loaded.
But when I go to a custom module page (also on the frontend) the compare list is not loaded.
When I debug the $collection I noticed that _visitorId is different on the custom module page.
How can I load the compare list on the costum module page?


texts:
I succesfully moved the product related block in my page layout with

<move element="catalog.product.related" destination="product.info.right" after='-'/>

I want now to apply a custom template to this block:

product/list/mytemplate.phtml instead of product/list/items.phtml
How can I do?

I tried adding also

<block class="Magento\Catalog\Block\Product\ProductList\Related" name="product.review.related" template="product/list/items.phtml" />

but it don't works.


texts: Magento 2: How to put authorization to custom module API

texts:
I am developing a webapi for my custom module.  I referred the below article and able to create the basic webapi that will accept arguments from the URL and do some processing.

http://alankent.me/2015/07/24/creating-a-new-rest-web-service-in-magento-2/

This is the API i constructed for my module

http://example.com/index.php/rest/V1/mymodule/arg1/arg2

I want to now implement the authorization.  In other words the webapi should work only along with the Authorization bearer token.

How can I do that?


texts: How to display all sub categories from one category?

texts:
I'm trying to show all the subcategories of the category id3.
Category ID3 ->
  Category Level 2 for Category ID3 ->
    Category Level 3 (for category Level 2)

<?php if (!Mage::registry('current_category')) return ?>
<?php
$categoryId = 3;
$category = Mage::getModel('catalog/category')->load($categoryId);
$_categories = $category->getChildrenCategories();
?>
<?php $_count = is_array($_categories)?count($_categories):$_categories->count(); ?>
<?php if($_count): ?>

<?php echo $this->__('Каталог') ?>

                <?php foreach ($_categories as $_category): ?>
                    <?php if($_category->getIsActive()): ?>

                        <a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="current"<?php endif; ?>>
                            <?php echo $this->escapeHtml($_category->getName()) ?>

                    <?php endif; ?>
                <?php endforeach ?>

<?php endif; ?>


texts: Going from Admin Panel to Source Code and finding out what is running under the hood

texts:
I have a simple example. Say my system is messed up and I want to disable the cache
manually because my admin panel is not working. How do I go from figuring out what
component is run, and what php I should manually run to figure out the task.

What are the steps, from A to Z?

Thanks.


texts: TypeError: $(...) is null error in admin grid pagination in magento 2

texts:
I have pared grid in admin and have more than 20 records. Now I try to increase records par page limit from 20 to 30 but it gives js error 'TypeError: $(...) is null'.
For more detail refere images

When I select range from 20 to 30 I got error as shown bellow

If any one know then help me. Thanks in advance. :)


texts: Is FireBear Improved Import Export Extension/Support Safe?

texts:
I purchased the FireBear Improved Import Export Extension with support so that I can merge two stores into one and upgrade from Magento 1 to Magento 2.

After downloading the plugins and contacting their support through a ticket system on Bitbucket someone named Mr. Jack is requesting SSH access to the servers and an administrator account.

Being that this is an international company that I can't find a lot of info on I wanted to check and see if anyone has had experience with them and knows if they are reputable/safe enough to give access to my database.


texts: Dashboard left bar links are not working

texts:
I don't know what it happened.My dashboard left bar links are not working.Admin dashboard is looking ok, loading time is ok, but left bar is not working.

I run all commands

bin/magento setup:upgrade
bin/magento static-content
bin/magento indexer
bin/magento setup:di:compile
bin/magento cache:flush


texts: Does Magento have an uninstall for the db data and schema changes that an extension makes? If not, how would one write one?

texts:
It appears that the uninstall function in Magento Connect Manager only cleans up/reverts the source code added by a newly installed extension, not the data and the database schema changes.

After a day of trying and rejecting various extensions site builders end up with a messy database full of unused data.

It would be great for site builders and end users alike, if there was a way for an extension developer to somehow hook into the uninstall process and make their extension clean up after itself.

I know of CMS'es that offer this as core functionality out of the box.

Does anyone see a way to do this in Magento?


texts: Upgrading Magento 2.2.6 to 2.3.0: Component Dependency

texts:
Is there any way to upgrade from Magento 2.2.6 to 2.3 using the Web Setup Wizard? I'm getting the following error:

Check Component Dependency
We found conflicting component dependencies. Hide detail

Command "update" failed: Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0].
- magento/module-wishlist-sample-data 100.2.0 requires magento/module-wishlist 101.0.* -> satisfiable by magento/module-wishlist[101.0.0, 101.0.1, 101.0.2, 101.0.3, 101.0.4, 101.0.5].
- Can only install one of: magento/module-wishlist[101.1.0, 101.0.0].
- Can only install one of: magento/module-wishlist[101.1.0, 101.0.1].
- Can only install one of: magento/module-wishlist[101.1.0, 101.0.2].
- Can only install one of: magento/module-wishlist[101.1.0, 101.0.3].
- Can only install one of: magento/module-wishlist[101.1.0, 101.0.4].
- Can only install one of: magento/module-wishlist[101.1.0, 101.0.5].
- magento/product-community-edition 2.3.0 requires magento/module-wishlist 101.1.0 -> satisfiable by magento/module-wishlist[101.1.0].
- Installation request for magento/module-wishlist-sample-data 100.2.* -> satisfiable by magento/module-wishlist-sample-data[100.2.0].

Please see screenshot:

My PHP version is 7.1.18 on CentOS 7, no Composer.


texts: Product collection by non-existing images

texts:
I want to create a collection of all the products without a image and set them do the status "disabled".

Because i use a automatic import script there are some products that HAD images before, but don't have them anymore.

For that reason, there are images selected, but they don't exist anymore and the placeholder is shown on the frontend.

Is there anyway to still get the collection so i can give those product a new status?

This is what is tried and didn't work:

$_products = Mage::getModel('catalog/product')
    ->getCollection()
    ->addAttributeToSelect('*')
    ->addAttributeToFilter(array(
        array (
            'attribute' => 'image',
            'like' => 'no_selection'
        ),
        array (
            'attribute' => 'image',
            'null' => true
        ),
        array (
            'attribute' => 'image',
            'eq' => ''
        ),
        array (
            'nlike' => '%/%/%'
        ),
    ));

Strange thing is that the image is empty (but selected) and still doesn't show up in the collection.

EDIT:

When doing a var_dump on a product that shows a placeholder on the frontend and has no images in the backend i still see the file URL to the non-existing images:

["media_gallery"]=>
  array(2) {
    ["images"]=>
    array(3) {
      [0]=>
      array(9) {
        ["value_id"]=>
        string(5) "49038"
        ["file"]=>
        string(19) "/E/2/E23812_1_1.jpg"
        ["product_id"]=>
        string(4) "4386"
        ["label"]=>
        string(0) ""
        ["position"]=>
        string(2) "13"
        ["disabled"]=>
        string(1) "0"
        ["label_default"]=>
        NULL
        ["position_default"]=>
        string(2) "13"
        ["disabled_default"]=>
        string(1) "0"
      }
      [1]=>
      array(9) {
        ["value_id"]=>
        string(5) "49039"
        ["file"]=>
        string(19) "/E/2/E23812_2_1.jpg"
        ["product_id"]=>
        string(4) "4386"
        ["label"]=>
        string(0) ""
        ["position"]=>
        string(2) "14"
        ["disabled"]=>
        string(1) "0"
        ["label_default"]=>
        NULL
        ["position_default"]=>
        string(2) "14"
        ["disabled_default"]=>
        string(1) "0"
      }
      [2]=>
      array(9) {
        ["value_id"]=>
        string(5) "49040"
        ["file"]=>
        string(17) "/E/2/E23812_3.jpg"
        ["product_id"]=>
        string(4) "4386"
        ["label"]=>
        string(0) ""
        ["position"]=>
        string(2) "15"
        ["disabled"]=>
        string(1) "0"
        ["label_default"]=>
        NULL
        ["position_default"]=>
        string(2) "15"
        ["disabled_default"]=>
        string(1) "0"
      }
    }

So is there a way to filter a collection for a image URL that links to a non-existing item?

EDIT:

Got it:

$_products = Mage::getModel('catalog/product')
                ->getCollection()
                ->addAttributeToSelect('image');

foreach($_products as $_product){

    clearstatcache();
    $file = '../media/catalog/product'.$_product->getImage();

    if(!file_exists($file)) {
        $_product->setStatus(2);
        $_product->save();
    }

}

Thanks for the help, hope anybody else finds this post useful.


texts: Speed and Solr Search Issues with Magento Community Edition

texts:
I am relatively new to Magento and have been leaning over the Community Edition.

I just have three questions and I guess people like you who have used or are using Magento Community Edition can help me in this regard.

Have you used Magento Community Edition with a relatively mid-sized site? If yes, how is/was your experience?
Have you used Full Page Caching through some external module or your own customization in Magento Community Edition? Did it speed up the site effectively? How was your experience?
Have you implement Solr Search in Magento Community Edition? Did you implement it through some module or yourself?

Please pardon my blunt questioning. All I am hoping to hear from you guys is that Magento Community Edition is worth delving in for. All the comparisons I read made me stop at these two functionalities which Enterprise Edition has. I hope you could tell me your experiences so that I, and whole SO community can make better decisions.

Thanks


texts: Magento 2 - plugin error - enable cash on delivery only for specific shipment method

texts:
I created the plugin for different payment methods by following this post.

It works fine, but it has an error.

When you want to change to another shipping method, if you previously had a payment method selected and this is disabled by the plugin, it's enabled and duplicated.

Also, it doesn't load correctly, since it gives an error with javascript and doesn't load the method completely.

This 2nd failure is given even if you don't select any payment method previously

If they can review it, it's appreciated


texts:
I created a configurable product with its associated products.  I added two attributes in the way that magento tutorial suggested.

When I go to the product page
http://www.youbigtees.com/index.php/t-shirts/test1-tshirt.html

You can see the product attributes are there and I select one of each and hit add to cart - NOTHING happens.

Its driving me nuts .. can someone help - please?


texts: Magento equivalent to MovableType's FieldDay

texts: Does anyone know an equivalent to the MovableType plugin FieldDay(https://github.com/movabletype/mt-plugin-field-day/wiki/Basics) for Magento. I need to be able to create multiple instances of product field sets. (i.e. multiple instruction blocks)


texts: Magento2 $block->getChildHtml() error in nginx?

texts:
I have custom template, referenced in the .xml file below:

<referenceContainer name="content">
    <block class="Sample\ABC\Block\Adminhtml\Demo\Edit" name="demo.parent" template="Sample_Demo::parent.phtml">
      <block class="Sample\ABC\Block\Adminhtml\Demo\Edit\Child" name="demo.child" template="Sample_Demo::parent\child.phtml" />
    </block>
</referenceContainer>

in parent.phtml I call (1) <?php echo $block->getChildHtml('demo.child'); ?>

in localhost (Windows) it runs fine. But when I upload it to my nginx server it doens't run.

I change  (1) to

<?php echo $block->getLayout()->createBlock('\Sample\ABC\Block\Adminhtml\Demo\Edit\Child')->setTemplate('Sample_Demo::parent\child.phtml')->toHtml(); ?>

and it runs.

Please tell me what's the difference and what could be the solution to fix (1).


texts: Magento2: How to load category collection?

texts:
I have to load the category collection and show it on top menu position on my Magento site. I have tried object manager concept but it's not correct method to follow so that I have to load it using dependency injection.

I have referred this http://www.blogtreat.com/how-to-get-category-collection-in-magento-2/, but I don't know where to use this and how to show it on frontend since I'm new in Magento.

Can anyone please help me?


texts: How to show downloadable links in a block?

texts:
I'd like to add a static block in the Success Page with all downloadable product links listed. All my downloadable products are inside configurable products.
How can I achieve this?


texts: Magento 2: Safest way to delete spam customers specific date/email using MySQL?

texts:
what is the safest way to delete spam customers specific date/email using MySQL?

For example delete all customers with email example.com and from 9/15/2018 to 9/28/2018

I cant use back-end UI to delete the records because hosting limitation resources and its gives.

Warning: Error while sending QUERY packet. PID=28451 in /home/got52/public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228

So anyone have the mysql query doing that?
Thanks


texts: For example my repository get items by getList($searchCriteria) where I can see prepared query to base like this SELECT * FROM table. I am use xdebug so I need a line of breakpoint or name of function. Magento2.3


texts: Custom product type can not be deleted from cart: "Cannot remove the item."

texts:
I've created a custom product type and use it to create products programmatically via SOAP. The strange thing is if I add the product to the cart I can not remove it via the delete link, it alerts me that it "Cannot remove the item.". Manually creating a product of that type gives the same error.

If I create my product via SOAP using the simple product type however it works. I've not come across this issue before. Any ideas?

The delete URL differs:

custom product type: /checkout/cart/delete/id/27994/uenc/aHR0cDovL2Rldi5jb25maXNlcmllLmRvY2tlci9jaGVja291dC9jYXJ0Lw,,/

simple product type: /checkout/cart/delete/id/27995/uenc/aHR0cDovL2Rldi5jb25maXNlcmllLmRvY2tlci9jaGVja291dC9jYXJ0Lw,,/form_key/u8AsmNXOi8nzJ8d0

Company/ConfiguratorProduct/etc/config.xml

<catalog>
    <product>
        <type>
            <configurator translate="label" module="configuratorproduct">
                <label>Configurator Product</label>
                <model>configuratorproduct/product_type</model>
                <is_qty>0</is_qty>
                <price_model>configuratorproduct/product_price</price_model>
                <index_data_retreiver>configuratorproduct/catalogIndex_data_configuratorproduct</index_data_retreiver>
                <composite>0</composite>
                <price_indexer>downloadable/indexer_price</price_indexer>
                <can_use_qty_decimals>0</can_use_qty_decimals>
            </configurator>
        </type>
    </product>
</catalog>

Company/ConfiguratorProduct/Model/Product/Price.php

class Company_ConfiguratorProduct_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Price
{

}

Company/ConfiguratorProduct/Model/Product/Type.php

class Company_ConfiguratorProduct_Model_Product_Type extends Mage_Catalog_Model_Product_Type_Abstract
{
    const TYPE_CONFIGURATOR = 'configurator';
}

Company/ConfiguratorProduct/Model/CatalogIndex/Data/ConfiguratorProduct.php

class Company_ConfiguratorProduct_Model_CatalogIndex_Data_ConfiguratorProduct extends Mage_CatalogIndex_Model_Data_Abstract
{
    public function getTypeCode()
    {
        return Company_ConfiguratorProduct_Model_Product_Type::TYPE_CONFIGURATOR;
    }
}

Magento 1.9.x


texts: PHP Fatal Error causing 500 Internal Server Error

texts:
I recently started to work with a small merchant to set-up their first web-shop and chose Magento Community to do so.

While I have plenty of PHP, etc.. developer experience, Magento is new to me with a lot of set-up and configuration headaches along the way.

However I'm now getting a PHP Fatal Error logged as an Apache error as follows:

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught RuntimeException: ObjectManager isn't initialized in /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/ObjectManager.php:36\nStack trace:\n#0 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/File/Transfer/Adapter/Http.php(47): Magento\\Framework\\App\\ObjectManager::getInstance()\n#1 /opt/bitnami/apps/magento/htdocs/pub/get.php(58): Magento\\Framework\\File\\Transfer\\Adapter\\Http->__construct(Object(Magento\\Framework\\HTTP\\PhpEnvironment\\Response), Object(Magento\\Framework\\File\\Mime))\n#2 {main}\n thrown in /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/ObjectManager.php on line 36', referer: https://www.our-domain-here.com/index.php

The issue is causing a 500 Internal Error in Chrome for images that I upload through the admin interface.
They also fail in the shop interface.
Images are stored in the DB, I can see them load into the DB fine and they exist in the directory the DB points to.
I can load the images fine with a direct URL reference but they fail in the shop and admin interfaces as the URL has a get.php call.

I'm thinking its permissions issues but have been through as much online help re this as I can find with no success so only info left to query is does the above error message help point to where Magento is falling over?

Thanks.


texts: Change default shipping address in backend

texts:
By default I set default billing and shipping address as shown below,

In checkout page, i entered different shipping address as shoen below,

This address saved in backend as shown but the default shipping address not changed to the new address. How to fix this.


texts:
I tried to find something and googled myself but I couldn´t find anything that fits my needs.

I want to include a custom form with a number of different inputs on a Magento CMS page sending all to an email or to the Magento backend.

So that a user has like 10 different questions to answer and then on the submit button it all sends it to a given email address.


texts: Blank Admin after trying to install GoogleShoppingApi from github

texts:
I am wanting to use the Google Shopping Api from the github link below

https://github.com/bluevisiontec/GoogleShoppingApi

I have tried multiple times and followed all instructions without issue, but am getting a blank page in Admin. Error says:

a:5:{i:0;s:72:"Mage registry key "_singleton/googleshoppingapi/observer" already exists";i:1;s:1329:"#0 /home5/username/public_html/app/Mage.php(223): Mage::throwException('Mage registry k...')
#1 /home5/username/public_html/app/Mage.php(477): Mage::register('_singleton/goog...', false)
#2 /home5/username/public_html/includes/src/__default.php(22026): Mage::getSingleton('googleshoppinga...')
#3 /home5/username/public_html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#4 /home5/username/public_html/includes/src/__default.php(14363): Mage::dispatchEvent('controller_acti...', Array)
#5 /home5/username/public_html/includes/src/Mage_Adminhtml_Controller_Action.php(160): Mage_Core_Controller_Varien_Action->preDispatch()
#6 /home5/username/public_html/includes/src/__default.php(14241): Mage_Adminhtml_Controller_Action->preDispatch()
#7 /home5/username/public_html/includes/src/__default.php(18698): Mage_Core_Controller_Varien_Action->dispatch('login')
#8 /home5/username/public_html/includes/src/__default.php(18228): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#9 /home5/username/public_html/includes/src/__default.php(21056): Mage_Core_Controller_Varien_Front->dispatch()
#10 /home5/username/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#11 /home5/username/public_html/index.php(83): Mage::run('', 'store')
#12 {main}";s:3:"url";s:17:"/index.php/admin/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

Any ideas on how to fix this?


texts: Develop Marketplace like Alibaba using Magento (Without extension)

texts:
I need an Honest answer about this. I have created a marketplace with Magento with paid extension and the result is very disappointing. I said the web is slow and can be taken down with 10 concurrent connection.

I would like to know If I create a marketplace with very demanding requirement like 100 000 vendors with 1000 SKUs each. Do you think it is possible for Magento to handle this kind of load? (By this, it means I have to create 100000  websites within the Magento)


texts: Connect Manager Returns "No Release Found for "xxxx" skipping," and does nothing

texts:
I have a problem. My site doesn't use ssl for now. When i try to install an extension from magento connect by using magento connect manager it just returning "please wait" screen and after a while its showing No releases for 'Clarion_Customerattribute', skipping  for example.

I tried everything and i get this error about all extension, i tried a lot different extensions.

I tried to delete cache.cfg and connect.cfg from "download" folder.

What you guys can suggest?

I also tried installing extension with ssh and setted the permissiıon of mage-setup to 550.
This is the screen i get after these steps.


texts: I'm using a responsive Magento theme but when I'm making a div or html block through Magento back-end it isn't responsive. I can hardcode it with mediaqueries but what is the easiest and quickest way to do it? because there is 20392013 different mobile screen sizes.


texts: How to implement multi select category filter magento 1.8.1 or 1.9 without any extension?

texts:
i just changed link to checkbox by replace anchor with checkbox in filter.phtml file

<input type="checkbox" name="vehicle" onclick='window.location.assign("<?php echo $this->urlEscape($_item->getUrl()) ?>")'/><?php echo $_item->getLabel() ?>

Now i only need to filter category by multiple select checkbox in category page.

I try these extension:

https://www.magentocommerce.com/magento-connect/multiple-select-in-layered-navigation-filters.html

https://github.com/caciobanu/improved-magento-layered-navigation

lots of free extension but all don't have feature to select multiple category


texts: Magento 2 - Is it safe to delete 'var/vendor' directory?

texts:
I quiet often come across suggestions in forums asking to delete all the directories (below) under var/ as a fix to other problems
var/cache
var/composer_home
var/log
var/page_cache
var/vendor
var/view_preprocessed

Is it safe to do this? Especially I am curious about var/vendor. Will this directory be recreated after I delete it?


texts: Magento 2 get custom collection data in view/frontend/web/template html file for payment block on checkout page

texts:
I have a collection and I have created a helper function that returns all values in an array.

Now I need all those value in vendor\magento\module-checkout\view\frontend\web\template\payment-method\list.html file.

Also, I want the same value on the HTML file for payment method title display.

Please Help.

Thanks


texts: Two Transaction in single time in magento

texts: I need to save data in 2 tables at once in a single transaction in magento. The value to be stored in table 2 is dependent on values stored in table 1. How to handle this scenario in a single transaction?


texts: I need to add extra validations to user signup page. Currently user can enter characters to phone and fax fields. I want to prevent that from happening. How can I add those jquery parts? Where should I add them?


texts: Magento 1.9: Change product order and direction on load?

texts:
I need on load product order newest and order desc , right now I need to filter it manually and for direction I need to click on arrow twice at product listing....Is there any way to do it programmatically ?

can u change following of catalog/product/list.phtml...that i get newest product and in desc order ?

$_productCollection->clear()
                    ->getSelect()
                    ->reset(Zend_Db_Select::ORDER)
                    ->joinLeft(array('cpei'=>'catalog_product_entity_int'),     'e.entity_id = cpei.entity_id AND cpei.attribute_id = 197 AND cpei.store_id = 0', 'cpei.value as product_on_top' )
                    ->order(array('product_on_top DESC', 'price_index.min_price ASC', 'final_price ASC'));


texts:
I'm using TemplateMonter_FeaturedProduct ang I'm building an API to build mobile application. This extension let me add specific products to appear in specific block on the storefront. Those products are added from admin panel.

when I debug the code I found that to view products on the storefront it reads a block variable.

that's widget.xml file:

     <parameter name="product_ids" xsi:type="block" visible="true">
            <label translate="true">Choose custom products</label>
            <block class="TemplateMonster\FeaturedProduct\Block\Adminhtml\Widget\Chooser">
                <data>
                    <item name="button" xsi:type="array">
                        <item name="open" xsi:type="string" translate="true">Select ...</item>
                    </item>
                </data>
            </block>
        </parameter>

and that's block function used on .phtml

public function getProductIds()
{
    $productArr = [];
    //TODO: temporary hide manual products
    $productIdsStr = $this->getData('product_ids');
    //$productIdsStr = false;
    if($productIdsStr && is_string($productIdsStr)) {
        $productArr = explode(',',$productIdsStr);
    }
    return $productArr;
}

I need to get the result returned from getProductIds function in my API module.

Any solutions?


texts:
I've created a simple CRUD module for Magento 2 and now I'm running the tests to see if I didn't break something.
Apparently there are a lot of things wrong with my module. I will be posting some questions about this in the near future.
First problem is that I get this error:

Data set: array (
  0 => '\\Sample\\News\\Ui\\Component\\Listing\\Column\\AuthorActions',
)
Incorrect argument sequence in class \Sample\News\Ui\Component\Listing\Column\AuthorActions in [BASE_DIR]/app/code/Sample/News/Ui/Component/Listing/Column/AuthorActions.php
Required: $context, $uiComponentFactory, $urlBuilder, $components, $data
Actual  : $urlBuilder, $context, $uiComponentFactory, $components, $data

My class constructor looks like this:

public function __construct(
    \Magento\Framework\UrlInterface $urlBuilder,
    \Magento\Framework\View\Element\UiComponent\ContextInterface $context,
    \Magento\Framework\View\Element\UiComponentFactory $uiComponentFactory,
    array $components = [],
    array $data = []
)
{
    $this->_urlBuilder = $urlBuilder;
    parent::__construct($context, $uiComponentFactory, $components, $data);
}

Does this mean that for all my classes that extend an other class I have to put the constructor parameters in this order:

$requiredParentParam1,
$requiredParentParam2,
...
$requiredParentParamX,

$newParam1,
$newParam2,
....
$newParamY,

$optionalParentParam1,
...
$optionalParentParamZ

And what should I do with the optional parameters I add in my new class that are not in the parent class? Where should I place them?


texts:
I want to integrate PWA App into my Magento2 website , i have already tried with Tigren extension and made changes as per the document. After installation i am getting errors in checkout process.

I am getting the following Errors :

Uncaught ReferenceError: firebase is not defined

require.js:1895 GET https://xxxx/pub/static/version1575442910/frontend/Smartwave/porto/en_US/@firebase/app.js net::ERR_ABORTED 404 (Not Found)

Uncaught Error: Script error for: @firebase/app

How can i rectify these errors or is there any other way to implement PWA Application


texts: Magento 2 checkout form: how to add custom field?

texts:
How to add custom field to Shipping Address form in Magento 2 Onepage Checkout?

For example:

  add select box like "Country" below phone number field


texts: How to login Magento 2 from external web application

texts:
I have laravel application and Magento2 application. When I login to laravel application it should also get login to Magento application.

Scenario:

User login to laravel application.
User click on buy now
Button in laravel application it redirects to magento2 application (with automatically login to magento).
User finished transaction and back to laravel application.


texts: Transfer reviews from one product to another

texts:
I've had 10 products which are almost identical except diameter so I've added a configurable product and it's working just fine.
Downside: existing reviews of the old products are lost. Is there a way to transfer reviews from the old to the new product


texts: How to get HTML response of each multistore page?

texts:
there.

I want to get HTML response of my magento shop page.

So I coded a small PHP program for this with using CURL library(and I tried also with file_get_contents());

$crl = curl_init();
$timeout = 10;
curl_setopt($crl, CURLPT_URL, $url);
curl_setopt($crl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
$response = curl_exec($crl);
curl_close($crl);

At first glance, it works well. But I found one problem.

My shop has 2 multilingual store.
So I tried 2 urls.
"http://MYSHOP.COM/TARGET_PAGE/?___store=default&___from_store=french" and "http://MYSHOP.COM/TARGET_PAGE/?___store=french&___from_store=default"

However the both returns are same. they return always 'default' store result.
When I open these urls on my browser, they shows right result with each language. Why is it caused?

I guess it might be related with some cookie issue. how can I get the right result?

PS. I searched browser cookies with developer tools of Chrome, but I could not find any suspicious cookies which might be related with language info.


texts: Magento 2 can I have 2 front names for a module?

texts:
I want to create a module for which I would like 2 frontName is it possible. if yes how can I do it ?

Example

1. example.com/a/index/test
2. example.com/b/index/test
both pointing to app/code/Vendor/Test/Controller/Index/Test.php


texts: magento 1.9 open adminhtml menu external link in new browser tab

texts:
I need to add a link in the admin menu to an external web that opens in a new browser tab.

So I developed a module, and this is its config.xml

<frontend>
    <routers>
      <crmlink>
        <use>standard</use>
        <args>
          <module>MySpace_Crmlink</module>
          <frontName>crmlink</frontName>
        </args>
      </crmlink>
    </routers>
</frontend>
<adminhtml>
    <menu>
        <customer translate="title" module="customer">
            <title>Customers</title>
            <sort_order>40</sort_order>
            <!-- action>adminhtml/customer/</action -->
            <children>
                <crmlink translate="title" module="crmlink">
                    <title>CRM link</title>
                    <action>crmlink</action>
                    <sort_order>1010</sort_order>
                </crmlink>
            </children>
         </customer>
    </menu>
</adminhtml>

And then, there is a controller:

<?php
class MySpace_Crmlink_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        $this->_redirectUrl('www.example.com');
    }
}

It is working fine, the link is displayed under customer menu, and it works, I'm redirected to the external page example.com, but I need to open it in a ned browser tab, and I can't do it from the controller.

Is there a way to open the external link in a new tab as a target="_blank"?  I don't see a way to do it from the xml.


texts: Magento 2 checkout loader not hide in Internet Explorer

texts:
If JavaScript Bundling is Enabled checkout loader (loader layer) never hide (loader keeps loading) only in Internet Explorer and Safari. If I turn off JS Bundling all works

No errors in console

Who had this issue ?

I use magento 2.1.11

this does not help


texts:
I need to add a custom field(drop-down list) for a store view, what is the conditional statement I need to display this, it would be nice to have it dynamic and have it added in the admin side. Would it be a custom extension?

Store 1.) Displays the checkout form out of the box
Store 2.) Displays the checkout form including an extra field that needs to be managed every month and added too.
Store 3.) Displays the checkout form including an extra field (drop-down list) that has different data than Store 2

Thanks in advance.


texts: Magento Order product collections by best seller / Rating

texts:
On magento product view page, i'm trying to order upsell products by best selling / more rating

On a search i found that this code will work to get order product collection by best seling,

$storeId    = Mage::app()->getStore()->getId();

$products = Mage::getResourceModel('reports/product_collection')
            ->addOrderedQty()
            ->addAttributeToSelect(array('name', 'price', 'small_image')) //edit to suit tastes
            ->setStoreId($storeId)
            ->addStoreFilter($storeId)
            ->setOrder('ordered_qty', 'desc'); //best sellers on top

Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);

print_r($products->getData());

I have two issues where to add this code & how about adding set order by rating too ?

Any help is much appreciated.


texts:
I want to add discount rule with coupon code in order total section in sales order in admin-end.

Please let me know where I can make modifications. Sorry I just forgot to tell that coupon are getting generated dynamically via extension, actually the coupon code is being generated by abandoned cart extension.


texts: How to create custom grid like sales order in magento2?

texts: How to create custom grid like sales order gird with new,edit,save,delete,status,massdelete..etc in magento2.?


texts: Get all products with their custom options in Magento 2

texts:
I am trying to show all the products with their custom options in a magento grid in admin panel.
I can not figure out how to do this. I have to show products in grid and their custom options , if a product has 2 custom options then another row will show up for both custom options.
All custom options are of drop down types.
Any help will be appreciated.
Thanks Alot


texts: Where i have to add code to get instagram photos in home page in porto theme in magento 2

texts:
I want to display Instagram photos in my home page but problem is I don't know where I have to place code...
Could you please let me know where I have to place the code ?

Thanks in Advance.


texts: Magento 1.9.2 custom admin grid redirects to 404 error page

texts:
I want to add order items grid in the sales section of the admin panel

I am following the below link for the same
How to Add a Custom Table to Magento Admin Backend

I am getting the menu as order items in sales => order items but when I click on the order items  Link to goes to 404 error page

following  is the code in my config.xml file

<config>
<adminhtml>
    <menu>
        <sales>
            <children>
                <order_items translate="title">
                    <title>Order Items</title>
                    <sort_order>20</sort_order>
                    <action>adminhtml/order_items/index</action>
                </order_items>
            </children>
        </sales>
    </menu>
</adminhtml>

I have added Ikantam_KnowledgeBase.xml file in app/etc/modules folder which contains the following code :

<config>
<modules>
    <Ikantam_KnowledgeBase>
        <active>true</active>
        <codePool>local</codePool>
    </Ikantam_KnowledgeBase>
</modules>

i was not able to see the menu until I added this file in the above mentioned location . which was not given in the tutorial .

Now I am able to create the menu but the menu takes me to 404 error page.

The tutorial also mentions adding the following code in the configuration file

<config>
<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <knowledgebase before="Mage_Adminhtml">Ikantam_KnowledgeBase_Adminhtml</knowledgebase>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

when I added the above code to the config.xml files code the order items menu disappeared .

I am very new to Magento ,I  have no idea where this code should be added.
Any Help will be Highly Appreciated.


texts:
I have a problem with magento 1.9.1.0; I can not delete or modify a product category.
I look on the net but I have not found anything. Can you help me?


texts: Magento 2 get quantity of product in cart without loop

texts:
I have written a controller in Magento 2 that adds products to the logged in users account.

The controller is working properly however i am facing a slight issue.

You cannot add a product to your cart with a greater quantity than what is in stock. so you cannot add a quantity of 6 if there are only 5 in stock, this results in a 500 error. to get around this I am using this:

if($QuantityToAdd > $ProductStock){
   // throw error
}
else{
   // add to cart
}

and this is working fine for the scenario above.

however, this will also allow the user to add 4 products, and then try to add another 2 products separately. This will again result in a 500 error, stating:

  main.ERROR: We don't have as many "XXXX" as you requested.

in the logs.

So I added a foreach, on the current cart items to get the quantity of that product already in the cart:

if(($QuantityToAdd + $QuantityInCart) > $ProductStock){
   // throw error
}
else{
   // add to cart
}

this solved my errors. However now the controller regularly times out as it will cycle the cart foreach within the add products for each, so if the user is trying to add 200 product variants and they already have 200 products in the cart, the controller will loop over 40,000 times.

  200x200 = 40,000 loops

The quantities mentioned here are potentially at the lower end of possible usage.

To optimise this I have found a function:

if ($this->checkoutSession->create()->getQuote()->hasProductId($productId)) {
    //product is available in the cart
}

Without performing another foreach, or any kind of loop, is it possible to get the current quantity of the product in the cart, if the above if statement is true?

or alternatively,

$this->cart->addProduct($productToadd, $params);

is there a function that updates the product in the cart instead of adding the new quantity on to the existing quantity?

Thanks.

EDIT:

Foreach by request:

foreach($products as $purchase){
        $productSku = $purchase['Sku'];
        $qty = $purchase['Quantity'];

        $loadedProduct = $this->getProductBySku($productSku);

        $productStock = $this->stockRegistry->getStockItem($loadedProduct->getId());
        $manageStock = $productStock->getData('manage_stock');

        if($manageStock == "1"){
          $productQty = $productStock->getQty();
          $quantityInCart = 0;
          $items = $this->cart->getQuote()->getAllItems();
          $productId=$loadedProduct->getId();
          foreach ($items as $item) {
                if ($item->getProductId() == $productId) {
                  $quantityInCart = $quantityInCart + $item->getQty();
                }
            }
          if($productStock->getBackorders() > 1){
            if(($qty + $quantityInCart) > $productQty){
              $this->_messageManager->addError(__("Failed to add " . $purchase['Name'] . " - " .$purchase['Option'] . " " . $productQty . " available"));
              $return[] = $purchase['Name'] . " - " .$purchase['Option'] . " " . $productQty . " available";
              $proceed = false;
              $returnObject->success = false;
            }
          }
        }
      }

This foreach checks through each of the products the user is trying to add, if they are all fine, there is a second for each to add the products.


texts: Where can I find list of magento blocks?

texts:
I'm new to magento and struggling to find the purpose of various blocks. I tried to google but could not find a single page where atleast definition is given.

So, please someone give me a link where I can find the list of all magento blocks and their purpose.


texts:
I need to add a block on a simple product page which contains a url link to the parent if it exists. Block would be positioned under the short description.

I have seen lots of code examples (some are functions with a protected variable, others straight php code) to get the parent id but no explanation as to which file they should be added to or how they should be called.


texts: Order Email - Use Order ID to get custom attribute

texts:
In order_new.html, I am using {{var order.getTest()}} to try and get a custom order attribute (special instructions, purchase order, etc).  However, I need to pass the order id through to execute my code to return the variables.  How can I pass the order id to the function?

Sales/Model/Order.php:

public function getTest($orderid)
{
    $test = "THIS IS A TEST... ORDER ID: " . $orderid;
    return $test;
}

{{var order.increment_id}} prints the correct order id on the template of the email, however, when I try to add it to the above mentioned function, no value is being passed through.  Here's what I've tried on order_new.phtml:

{{var order.getTest({{var order.increment_id}})}}
{{var order.getTest(var order.increment_id}}
{{var order.getTest({{order.increment_id}})}}
{{var order.getTest(order.increment_id}}
{{var order.getTest({{var order}})}}
{{var order.getTest(var order}}
{{var order.getTest({{order}})}}
{{var order.getTest(order}}

Any help is greatly appreciated.  Thanks in advance


texts: How to add a required checkbox to checkout page (policy check)

texts:
I know that there is basic functionality, but it does not suit me.

How to display my template under the form with the link to the privacy-policy page?

Or tell me how to do it right. I need a checkbox under the form that asks to confirm that the privacy policy has been read.

I create a js file: app/design/frontend/Vendor/theme/Magento_Checkout/web/js/checkout-privacy.js

define(
    ['ko', 'uiComponent'],
    function (ko, Component) {
        "use strict";
        return Component.extend({
            defaults: {
                template: 'Magento_Checkout/checkout-privacy/checkout-privacy'
            }
        });
    }
);

and file: app/design/frontend/Vendor/theme/Magento_Checkout/web/template/checkout-privacy/checkout-privacy.html

<form id="checkbox-policy-form" data-mage-init='{"validation":{}}'>
    <input type="checkbox" class="checkbox-policy input required-entry" data-validate="{ required: true, 'validate-one-required-by-name': true, attr: { id: 'checkbox-policy' }}">

</form>

on payment step


texts:
I get the category by calling the method from the repository:

$category = $this->_categoryRepository->get($id);

But I have multiple Store views, one for each language. I saw that the get method takes the store ID as second parameter. The problem is I only have the store view code. How can I get the category details by store code?


texts: Allow HTML tags in Bank Tranfer Payment instructions

texts:
Default Magento payment method "Bank Tranfer" does not allow using HTML tags in Instructions text.

How can I change that?


texts: Magento 2.3.1 CE emai to friend not working

texts:
We have upgrade from Magento 2.2.3 CE to Magento 2.3.1 CE but Email to friend not working (recipient not receiving email).

Verified logs using tail command

tail -f var/log/debug.log

tail -f var/log/exception.log

tail -f var/log/sytem.log

No luck. please advise


texts: I would like to get the location of the .phtml file of this URL https://chaldal.com/sales/order/print/order_id/13/ of Magento2.


texts: Get "Minimum Qty Allowed in Shopping Cart" configuration value in the code

texts:
I'm running Magento 2.1.8. How can I get the minimum quantity allowed in shopping value in the code? I want to show this value in the product catalog template list.phtml file.

Edit: This is a global value that can be configured in Stores > Configuration > Catalog > Inventory.


texts:
Our price rules are used for discounts. Some of our orders come in via the API. Our API orders must not have any discount applied. How can I achieve this?

At the moment, price rules are applied to orders created via the API the same way as to orders created via the shop frontend.


texts: Magento 2 Parent's theme styles are not loading in the child theme

texts:
I have create a child theme that extends from magento-luma theme by following the steps below:

  app/design/frontend/Company/parent/registration.php

<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/Company/parent',
    __DIR__
);

  app/design/frontend/Company/parent/theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Parent Theme</title>
    <parent>Magento/luma</parent>
</theme>

  app/design/frontend/Company/parent/web/css/source/_extend.less

body{
  background-color: red;
}

After activating this theme from from magento admin. it works fine, load parent luma styles , images and js perfectly.
When I make another child theme that extends with the parent theme created above. It does not load the its parent themes styles and all other static assets.

I created the grand-child theme as follows.

  app/design/frontend/Company/child/registration.php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/Company/child',
    __DIR__
);

  app/design/frontend/Company/child/theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Child Theme</title>
    <parent>Company/parent</parent>
</theme>

  app/design/frontend/Company/child/web/css/source/_extend.less

body{
  color: yellow;
}


texts: Unable to resolve the source file for '...Magento_Customer/js/zxcvbn.js.map'

texts:
I'm running Magento 2.4.0 in developer mode with server-side compilation using PHP Less library.
Console is showing this error in every page:
DevTools failed to load SourceMap: Could not load content for https://example.com/pub/static/version1600339825/frontend/Example/default/en_US/Magento_Customer/js/zxcvbn.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

I tried to access to https://example.com/pub/static/version1600339825/frontend/Example/default/en_US/Magento_Customer/js/zxcvbn.js.map through the browser and it says:
Unable to resolve the source file for 'frontend/Example/default/en_US/Magento_Customer/js/zxcvbn.js.map'
<pre>#1 Magento\Framework\App\StaticResource->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#2 Magento\Framework\App\Bootstrap->run() called at [pub/static.php:13]
</pre>

I checked also the file https://example.com/pub/static/version1600339825/frontend/Example/default/en_US/Magento_Customer/js/zxcvbn.js and it exists.

What I tried
I thought the error was generated by a file merging so I tried to exclude zxcvbn.js from it adding this row in my theme etc/view.xml:
<item type="file">Magento_Customer::js/zxcvbn.js</item> <!-- It was already present -->
<item type="file">Magento_Customer::js/zxcvbn.min.js</item>
<item type="file">Magento_Customer::js/zxcvbn.js.map</item>

but it didn't work.
Any ideas?


texts: How to add Enable Disable functionality for a referenceBlock in Magento 2

texts:
I want to add Enable/disable functionality for a referenceBlock. <referenceBlock name="product_recommendations_pdp" remove="false" />
The referenceBlock can be remove="true" or remove="false" directly form admin-panel for just selecting.
referenceBlock is located at app/design/frontend/ProjectName/store/Magento_ProductRecommendationsLayout/layout/catalog_product_view.xml


texts: Call observer function when stock inventory attribute updated programatically

texts:
I'm updating product stock inventory attribute programactically. Considering performance, instead of saving whole product, I'm saving quantity attribute only.

    //  $quantity value
$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product);
$mainCurrQty = $stock->getQty();
$stock->setQty($mainCurrQty-$quantity);

At the same time I want to call catalog_product_save_after observer which is not working as it's not saving the product and saving the attribute value only. How I can call catalog_product_save_after observer when only a particular attribute value is updated programatically?


texts: Advance Search Not Working With Custom Atrtribute

texts:
I have modified the advance search form and added only my custom attributes in the form,
I have created the Select input with the exact same values from product attributes like:
<select name="make" id="make">
   <option value="">Please Select...</option>
   <option value="passend für Audi / Seat">passend für Audi / Seat</option>
   <option value="passend für Audi / VW">passend für Audi / VW</option>
   <option value="passend für VM">passend für VM</option>
</select>

In the admin i have the value for Make attribute like this, it is same as in SELECT input on frontend:

And on frontend where i have created the Select input has the same value to search:

But now when i try to search the products with this attribute in advance search it is not showing any products, as the product is assigned the attribute and has correct value.
Other attribute that is "Year" and having the Digits value is working fine with the same form.

Is there any settings or configuration i am missing for attributes or search?
I have cleared all the caches, Run the Indexer as well.
Any help will be appreciated.
thanks!


texts: what is the correct way to modify 3rd party module?

texts:
I have a 3rd party module installed in my magento.
I want to do some modification. I should modify the module directly or write another module to override it? Please advise


texts:
I want to modification in the product price. For example, if the product has priced $13.45 then it should display $13 but the price is more than $13.50 it should be $14.

So how to modify product price?


texts: Magento 2 : problem in the Checkout page : window.checkoutConfig is undefined

texts:
I am using Magento 2.0.2 and I have a problem with the Checkout page.

Sometimes there is a JS error appears in the file /Magento_Checkout/js/model/quote.min.js:

  TypeError: window.checkoutConfig is undefined

In this case, the Checkout page is not displayed.

So could anyone please suggest me what are the steps that I follow to find out the solution?


texts: Get list of all Catalog Price rules using API in Magento 2

texts: I want API endpoints that give me all available catalog price rules in Magento 2.


texts: Magento 2 custom module Class does not exist

texts:
I am using the custom module for minicart qty increment and decrement,
Module: https://github.com/kirtinariya1/MinicartAjaxQtyIncrementDecrement
After the installed module visible, but value not increased and decreased,
console Error:

Report log:
{"0":"Class Mymodule\\MinicartQty\\Controller\\Sidebar\\UpdateItemQty\\Interceptor does not exist","1":"#1 Magento\\Framework\\Code\\Reader\\ClassReader->getConstructor('Mymodule\\Minicart...') called at [vendor\\magento\\framework\\ObjectManager\\Definition\\Runtime.php:54]\n#2 Magento\\Framework\\ObjectManager\\Definition\\Runtime->getParameters('Mymodule\\Minicart...') called at [vendor\\magento\\framework\\ObjectManager\\Factory\\Dynamic\\Developer.php:48]\n#3 Magento\\Framework\\ObjectManager\\Factory\\Dynamic\\Developer->create('Mymodule\\Minicart...', array()) called at [vendor\\magento\\framework\\ObjectManager\\ObjectManager.php:56]\n#4 Magento\\Framework\\ObjectManager\\ObjectManager->create('mymodule\\Minicart...') called at [vendor\\magento\\framework\\App\\ActionFactory.php:44]\n#5 Magento\\Framework\\App\\ActionFactory->create('Mymodule\\Minicart...') called at [vendor\\magento\\framework\\App\\Router\\Base.php:306]\n#6 Magento\\Framework\\App\\Router\\Base->matchAction(&


texts: PHP Warning after upgrade from Magento 2.1.9 to 2.1.10

texts:
I'm having some issues with an installation of Magento 2 that I'm upgrading from 2.1.9 to the 2.1.10 security update.

I'm following the cli-upgrade instructions.

I'm running all commands as root. I enabled maintenance mode, and ran composer require magento/product-community-edition 2.1.10 --noupdate as specified. I then ran composer update, entered my auth keys, and manually cleared the var subdirectories.

As soon as I ran php bin/magento setup:upgrade it threw this error.

PHP Warning:  require(/var/www/html/app/etc/NonComposerComponentRegistration.php): failed to open stream: No such file or directory in /var/www/html/vendor/composer/autoload_real.php on line 60
PHP Fatal error:  require(): Failed opening required '/var/www/html/app/etc/NonComposerComponentRegistration.php' (include_path='/var/www/html/vendor/magento/zendframework1/library:/var/www/html/vendor/phpunit/php-file-iterator:/var/www/html/vendor/phpunit/phpunit:/var/www/html/vendor/symfony/yaml:.:/usr/share/php') in /var/www/html/vendor/composer/autoload_real.php on line 60

It seems like most commands that I run end with the same issue.

Thank you in advance for any help you can offer!


texts:
I have a multi store setup and want to setup separate shipping methods for each store. Need each method to show specifically for each store. The methods crossover to each of my stores, I have gone into the config and have attempted to disable/enable for each store but have been unsuccessful. Any ideas?

Thanks.


texts: Css files for individual pages(home/product/category/user profile/login)

texts:
I'm looking to create a theme from scratch and what I want to do is create .css files individually for each individual page and only load them specifically for that given page.
I believe this is the best option to optimize a page rendering's speed, correct me if I'm wrong.
What is the correct way of including each of these files for the given pages?
home/product/category/user profile/login/checkout

home.css | product.css | category.css | etc..

If I missed a component please let me know.
Thank you!


texts: Magento 1.9 Can I add a conditional field in advanced search?

texts:
I have searched the internet but still haven't found the answer to my question. Hope that someone here can help me.

I want to add a conditional field to the advanced search. For example, if a visitor fills out a number in the searchfield, the results will be in a range of -10 till +10 of the filled out value so, for example, if the filled out value would be 149 the search results should include products with values from 139 till 159 for that specific attribute. Can this be realised and if so, how can I realise this in the search form?


texts:
I was wondering what is the best approach for implementing sale (auth with immediate capture from the gateway) transaction in Magento?

I would like to achieve the best possible compatibility with any potential workflows, 3rd -party observers and configurations.

Should i just call parent::capture(); at the end of my authorize method?


texts: I'm having trouble figuring out why the layout is broken with http: but is correct in https:

texts:
This is very strange. I'm hoping someone has run into this before. When you view my test site normally, the layout is broken and the slider does not work. This was from the developer of the theme (I've edited the urls so that they won't be crawled the SE's):

  [developer] Seems like you have some JavaScript/CSS serverside caching or what.
  Because content of (http://test[dot]responderpse.com/skin/frontend/base/default/tm/easyslide/js/easyslide.js) is absolutely different from file on FTP skin/frontend/base/default/tm/easyslide/js/easyslide.js

So if you view the site securely (https://test(dot)responderpse.com) the layout works correctly. I'm having a hard time figuring out what could be causing this. There is no server side cache and magento cache is disabled.

  [webhost] So I do see you have everything turned off currently, and I am seeing the code on http when I visit your link. But I on a whim tried hitting https://test.responderpse.com/skin/frontend/base/default/tm/easyslide/js/easyslide.js and that looks like the actual easyslide.js correct? So I am not sure if it a cache issue or if its calling different based off the http call. I would make your developer aware of this, as there isn't anything actively caching the site currently. Let us know if you have any other questions.

Any help will be greatly appreciated. Thanks


texts: Magento 2 : How to get the best seller product collection?

texts:
I'm trying to get Best Seller Product collection using below code, but it will not display any data

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productCollection = $objectManager->create('\Magento\Sales\Model\ResourceModel\Report\Bestsellers\CollectionFactory');
$collection = $productCollection->create()->setModel('Magento\Catalog\Model\Product')->setPeriod('yearly');

How to get Best Seller Product collection ?


texts: Magento 2 : Create Custom Product Tab and Populate it With Product Attributes

texts: What would be a straight forward solution for creating a custom block as a product tab and populate it with product attributes?


texts: How to implement owl carousel in custom module?

texts:
I have tried to implement owl carousel slider in custom module followed How to call Owl Slider in Magento2

my phtml file

1

2

3

4

5

app/code/vendor/modulename/view/frontend/web/js/require-config.js

var config = {
    paths: {
            'owlcarousel': "web/js/owlcarousel"
        },
    shim: {
        'owlcarousel': {
            deps: ['jquery']
        }
    }
};

I am getting script error Uncaught Error: Script error for: owlcarousel


texts: Magento 1.8 if click Ship to different address Shipping information fields must be empty

texts:
When i click Ship to different address in check out page shipping information all the textbox must be empty.

For example if i click  Ship to different address radio button, it takes default address.

I need all the fields must be empty


texts: Magento: Saving new customer in onepage checkout

texts:
I am a relative novice at Magento (and new to StackExchange, so bear with me). My client is running a rather old community version (1.4).

They have set up checkout with Onepage checkout = YES, and Guest checkout allowed = NO.

What they discovered is that when new customers register as part of checkout, the customer record is not getting created. This seems like a pretty glaring error but in all my searching I can’t find anything to suggest that anyone is having this problem.

All of my research pointed to the submitOrder method of Quote.php as the place to look and I found this code:

if ($quote->getCustomerId()) {
            $transaction->addObject($quote->getCustomer());
        }

When I set a breakpoint at this point I (as I expected) found that this new customer has NO id, so the Customer object never gets added to the transaction.

Really, this seemed too obvious a problem so I kept exploring expecting to find that the Customer gets saved elsewhere, but found nothing. So, as a test, I changed the code to be:

 if (!$quote->getCustomerId()) {
            $transaction->addObject($quote->getCustomer());
      }

Well, the Customer and the Order got saved just as I hoped. But this seems WAY too obvious and might create issues for me if I want to save changes to customer data for existing Customers. But, I can deal with that for now.

I looked ahead in V1.8 to see if somehow this problem got fixed in a newer version, but the code is the same. That, and the fact that I can’t find any report of this problem makes me think I am not looking in the right place and have just put a convenient patch on the problem.

Can anyone help me out with this? Am I in the right place or way off base? Please advise!

Thanks in advance.


texts:
I want to override the function getLabelHtml in Magento\Framework\Data\Form\Element\AbstractElement.php

I make a copy of this file in my \app\code\CompanyName\ModuleName\Model\Framework\Data\Form\Element\AbstractElement.php

and I create a file in \app\code\CompanyName\ModuleName\etc\adminhtml\di.xml
with this code

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <preference for="Magento\Framework\Data\Form\Element\AbstractElement" type="CompanyName\ModuleName\Model\Framework\Data\Form\Element\AbstractElement"/>
</config>

and then I compile the module.
But is not work. Not override.


texts: Not Able To Add/Edit Category In Magento

texts:
I am having a frustrating issue in Magento Admin Panel. Whenever i try to add a subcategory under default category It only shows "Please Wait" Ajax Loader for a long time and nothing happens.

I tried to check by looking into Magento's system and exception logs but nothing is there. It seems to me some server issue which blocking the ajax requests in Magento admin Panel. But everything apart from it is working fine.

I added few products and it has been added easily. The problem is with category only.

My Magento Version is 1.8.1.0 and my server(Apache) is on Shared Hosting. Any help would be appreciable.


texts: White space bottom of website... can't find what causes it

texts:
Our Magento Store is found here

When scrolling to bottom there is white space below the footer maybe 20-30px

What could be causing this?

EDIT : I didn't do anything but for some reason it is not apparent anymore ???


texts:
I have a Magento 2.3.4 installed and I installed the AdobeStock integration via the official repository.
https://github.com/magento/adobe-stock-integration
How could I enable it via the admin panel?


texts:
In one page checkout I want to make one step instead two separate steps (default is one for shipping, one for payments methods). So I made changes in

checkout_index_index - removed payment-steps and moved item name="payment" xsi:type="array" to shipping-step
in LayoutProcessor.process changed payment localization to shipping-step
in js/view/payment.js removed stepNavigator.registerStep and added this.navigate() which calls getPaymentInformation() and sets block as visible

It worked out but I'm getting message that there are no payments. I think problem is in loading payments list. When are two steps, second step (this with payment)  is loaded after clicking on button below shipping methods. This button

sends address data to server (setShippingInformation) by calling url /rest/default/V1/guest-carts/xxxx/payment-information
get back payments list (and paymentService.setPaymentMethods is called)
and then shows second step (stepNavigator.next())

So before showing second step, payments are loaded from server. I could call this url /rest/default/V1/guest-carts/xxxx/payment-information but it requires address data in parameters. So it looks like payments methods can be resolved only after address is filled? But I want to show payments methods just after loading without looking at address.

At the beginnig of payments.js I noticed also this code paymentService.setPaymentMethods(methodConverter(window.checkoutConfig.paymentMethods)); It looks like that this code also loads payments list, so maybe I can assign somewhere in php code payments list to checkoutConfig?

Does anybody known how do this?


texts: How to disable customer account in Magento 2

texts: I want to disable particular customer account in magento store. Any free extension available for disable particular customer account in magento


texts: Magento 2 : Sorting Customer Attributes Option Array

texts:
I used these posts:
http://www.extensions.sashas.org/blog/magento-2-1-3-how-to-make-customer-attribute-update.html

Adding customer multiselect attribute

For creating a custom customer attribute select list. This is working but I would like to have select list ordered alphabetical because of length of list. Any ideas on how to pull this? I need to be able to assing a label and attribute for select options, such as:

class AllowedBrands extends AbstractSource
{
    public function getAllOptions()
{
    return [
        'option1' => [
            'label' => 'Univé',
            'value' => '13232'
        ],
        'option2' => [
            'label' => 'Achmea',
            'value' => '3121199999'
        ],
        'option3' => [
            'label' => 'Zeker',
            'value' => '9274'
        ]
    ];
    }
}

But how to make sure they are ordered alphabetical?


texts: Magento consuming a lot of memory on specific store view

texts:
I have a Magento store, with two store views, one for spanish language, and another one for english, so, I have this code:

//setting spanish store view
Mage::app()->getStore()->setId(8);

$time_start = microtime(true);

$idProduct = Mage::getModel('catalog/product')->getIdBySku('487767');
$product = Mage::getModel('catalog/product')->load($idProduct);
echo $product->getSku() . PHP_EOL;

$time_end = microtime(true);
$execution_time = ($time_end - $time_start);
echo 'Total Execution Time:'.$execution_time.' Seconds'.PHP_EOL;

When I execute that I see this:

  Total Execution Time:0.12779498100281 Seconds

But when I choose a different store view:

 //setting english store view
Mage::app()->getStore()->setId(1);

$time_start = microtime(true);

$idProduct = Mage::getModel('catalog/product')->getIdBySku('487767');
$product = Mage::getModel('catalog/product')->load($idProduct);
echo $product->getSku() . PHP_EOL;

$time_end = microtime(true);
$execution_time = ($time_end - $time_start);
echo 'Total Execution Time:'.$execution_time.' Seconds'.PHP_EOL;

The execution time is huge different:

  Total Execution Time:15.901492834091 Seconds

is consuming a lot of memory, any way for track de SQL generated of "load" function or something? Any ideas are welcome.


texts:
I added a <block> in page.xml in order to be able to load css files on some pages (not all) and in a particular place of the html <head>.

Using this trick, I can in CMS pages for example, order actions such as

<reference name="myownref">
<action method="addCss"><stylesheet>css/styles_home.css</stylesheet></action>
</reference>

It works, but It generates errors in log file :

2015-04-15T18:26:01+00:00 ERR (3): Notice: Undefined index: items  in .../magento/app/code/core/Mage/Page/Block/Html/Head.php on line 167
2015-04-15T18:26:01+00:00 ERR (3): Warning: Invalid argument supplied for foreach()  in .../magento/app/code/core/Mage/Page/Block/Html/Head.php on line 167

my modified page.xml :

     <block type="page/html_head" name="head" as="head">
                   ...
                    <action method="addJs"><script>mage/cookies.js</script></action>

                    <block type="page/js_cookie" name="js_cookies" template="page/js/cookie.phtml"/>

                    <!-- Remove items which the RWD package is not dependent upon -->
                    <action method="removeItem"><type>skin_js</type><name>js/ie6.js</name></action>

                    <!-- Add vendor dependencies -->
                    <action method="addItem"><type>skin_js</type><name>js/lib/jquery-1.10.2.min.js</name></action>
                  ...
                    <!-- Add stylesheets with no media queries for use in IE 8 and below -->
                    <action method="addItem"><type>skin_css</type><name>css/styles-ie8.css</name><params/><if><![CDATA[ (lte IE 8) & (!IEMobile)]]></if></action>
                    <action method="addItem"><type>skin_css</type><name>css/madisonisland-ie8.css</name><params/><if><![CDATA[ (lte IE 8) & (!IEMobile)]]></if></action>

                    <!-- Add stylesheets with media queries for use by modern browsers -->
                    <action method="addItem"><type>skin_css</type><name>css/styles.css</name><params/><if><![CDATA[<!--[if (gte IE 9) | (IEMobile)]><!-->]]></if></action>
                    <action method="addItem"><type>skin_css</type><name>css/madisonisland.css</name><params/><if><![CDATA[<!--[if (gte IE 9) | (IEMobile)]><!-->]]></if></action>

                    <!-- Add cutom css files -->
                    <action method="addItem"><type>skin_css</type><name>css/quote_form.css</name><params/></action>

<!-- MY CUSTOM BLOCK -->
                    <block type="page/html_head" name="myownref" as="myownref">

                    </block>

                    <!-- Sets viewport meta tag using text block -->
                    <block type="core/text" name="head.viewport">
                        <action method="setText"><text><![CDATA[<meta name="viewport" content="initial-scale=1.0, width=device-width" />]]>&#10;</text></action>
                    </block>
                </block>

Is it due to the fact that, on some page the block is empty, and that the for each loop crashes?

Is there a proper way to avoid this error?

Thanks for your help,


texts: How to properly populate ui-select component

texts:
I would like to copy the new category picker, from product edit form, to my custom form.

I found out that this component based on

\Magento_Ui\view\base\web\js\form\element\ui-select.js

so i added following to my form definition:

<field name="categories">
        <argument name="data" xsi:type="array">
            <item name="options" xsi:type="object">Magento\Catalog\Ui\Component\Product\Form\Categories\Options</item>
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string" translate="true">Category</item>
                <item name="componentType" xsi:type="string">field</item>
                <item name="formElement" xsi:type="string">select</item>
                <item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
                <item name="elementTmpl" xsi:type="string">ui/grid/filters/elements/ui-select</item>
                <item name="dataScope" xsi:type="string">categories</item>
                <item name="filterOptions" xsi:type="boolean">false</item>
                <item name="showCheckbox" xsi:type="boolean">true</item>
                <item name="chipsEnabled" xsi:type="boolean">true</item>
                <item name="disableLabel" xsi:type="boolean">true</item>
            <item name="levelsVisibility" xsi:type="number">1</item>
                <item name="multiple" xsi:type="boolean">true</item>
                <item name="sortOrder" xsi:type="number">20</item>
                <item name="listens" xsi:type="array">
                    <item name="newOption" xsi:type="string">toggleOptionSelected</item>
                </item>
                <item name="required" xsi:type="boolean">true</item>
                <item name="source" xsi:type="string">conditions</item>
                <item name="validation" xsi:type="array">
                    <item name="required-entry" xsi:type="boolean">true</item>
                </item>
            </item>
        </argument>
    </field>

This works fine. The component is displayed, i can pick the categories as well and the selected categories are also sent with the rest of the form.

However im not sure how to properly populate the component from data provider on page load. When the data provider returns array with different category ids e.g.

[7, 9]

The component receives the ids (when save the form i see the values in the request), but when the page is displayed the 'crumbs' are not visible. Like this:

So how can this component be populated with existing categories?


texts:
I want to add the custom attribute like Landmark, Address type, Locality etc on address page in Magento 2.1.12.

Please suggest me the better way to achieve this.


texts: How can I prepare my Github's extension to install using Composer?

texts:
Using the question below I've installed extensions hosted on private and public repositories using composer, but I need to create my custom extension now.

How to install an extension on a private Github using Composer?

What are the requirements to prepare my extensions on Github to be installed using the composer?


texts: Magento 2.3.2 Elasticsearch issue with multi language(Greek)

texts:
I am using Elasticsearch 6.8.1 with magento 2.3.2 instance.
Although in English store my search is working fine, in Greek store I am having some issues with the words having accents. This happens only if Elasticsearch is used. With mysql everything is fine

Example:

  room in Greek is "δωμάτιο"

  notice "ά" letter has an accent

If you search:

  "δωμ" you get right results including names with "δωμάτιο"(room)

But if you search:

  "δωμάτιο" or "δωμάτιο" or "δώμα"

You don't get any result with this word at all.

The accent in the letter "α" breaks the search.

I tried to put the letter with accents as a synonym but no luck.

Anyone with same issues please?

It is very annoying because it breaks search and make it not good for customers


texts: Are high AUTO_INCREMENT values in cron_schedule values are problem?

texts:
I am debugging a checkout problem, where the shipping address is not saved. This can be reproduced only some times and on production, under unclear circumstances.

Checking the logs I found

Serialization failure: 1213 Deadlock found when trying to get lock; try
  restarting transaction, query was: UPDATE `quote_address` SET ...

And googling I found an post in the Magento community forums, stating that cron_schedule might be involved with deadlocks.

I did a

mysql> select count(*) from cron_schedule;
+----------+
| count(*) |
+----------+
|     3778 |
+----------+
1 row in set (32.83 sec)

And it took very long. So I truncated the problem and seem to be not able to reproduce the problem any more at all (before in maybe 25% of the tries)

The Id column of the cron_schedule was around 14916548, so I am wondering if that is a problem for MySQL / MariaDB (5.5.5-10.0.38-MariaDB-0ubuntu0.16.04.1)?