texts: Show message with custom "content" when visitors try to add product to wishlist

texts:
Visitors are allowed to add product to wishlist and I would like to display a message content something like "you need to be signed in, in order to add product to your wishlist".

By default Magento doesn't display any messages and I think this can be confusing to some visitors.

Any idea how this can be done.

Also, same goes with the advice messages for "price change" and "back in stock".

thanks a lot!


texts: Magento Admin Login Error: Item (Mage_Sales_Model_Order) with the same id "1178" already exist

texts:
I get this error when trying to log in to my admin. Please help!

/lib/Varien/Data/Collection/Db.php(576): Varien_Data_Collection->addItem(Object(Mage_Sales_Model_Order))

Trace:
0 /lib/Varien/Data/Collection/Db.php(576):Varien_Data_Collection->addItem(Object(Mage_Sales_Model_Order))
1 /app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(533):Varien_Data_Collection_Db->load()
2 /app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php(61): Mage_Adminhtml_Block_Widget_Grid->_prepareCollection()


texts: Magento 2 - Not registered handle cms_block_listing_data_source

texts:
I am getting the error "Not registered handle cms_block_listing_data_source" on the Blocks section of the admin and the error "Not registered handle cms_page_listing_data_source" on the Pages section of the admin. Everything else in the admin seems to be working okay.

I have come across some answers online but nothing seems to have fixed it so far. These answers say that it is installing a module that has caused the error but I haven't installed a new module for a while which has confused me slightly.

I also have the error "Unknown entity type: Magento\Cms\Api\Data\PageInterface requested" on the front end of my website, I assume this is related to the back-end error but my knowledge isn't the best so not sure how to fix this.

I am using Magento version 2.3.2.

Any help on these issues would be greatly appreciated.


texts:
For some reason my Cron is not working anymore in my Magento 1.9.3 store.

I tried it by running it manually, but both solutions did not give any error, still zero results in the AOE Scheduler task list. Non of them are running.

I tried:

https://www.domain.com/cron.php

and by SH

sh /path/to/my/magento/root/cron.sh

How can I solve this issue?


texts: How to clear root catalog products from sql (magento 1.9)

texts:
I cleared all data but not able to clear root catalog products. These products are not available in product section. But still they are listed in root catalog  > categories Products section .

Any idea how to clear these products.

1) I already re-indexed and
2) flushed cache also


texts: Magento 2 - Backend Catalog - Product Table Top Not Displaying Correctly

texts:
Php 7.0
Magento 2.1.0
Apache 2.4.6
DB: Maria DB
I'm having an issue with the top row of the table used in the backend, where it has ID, Thumbnail, Name, Type, Attribute etc etc... and allows you so sort ascending/descending.
It was working perfectly fine yesterday, no changes had been done and today it looks like this:

Edit 1:
I also now have noticed its also on the Customer list:

Its also on other pages such as viewing static blocks etc.


texts: Magento2: How to create a page same as Product view page?

texts: In my custom extension, I want to display product view page same to same in Popup. Can anyone help me how to display product view page or create a page same as product view page.


texts: magento 1 documentation in romanian language

texts:
I want to get magento 1 documentation in Romanian language.
sorry for this kind of question but i have no idea about romanian language and
English search didn't work for me.


texts: Magento 2 - Product get id by sku - non existent product causes error

texts:
I am writing a module that takes a users input of product SKU (via a form) and then adds to the cart.

The issue I'm having is that when I am testing by using a non existent SKU the exception that is thrown can not be caught and leads to an exception on page.

Ideally I want to be able to catch the exception and display as a nice message to the user.

In my controller I am getting the product like so:

<?php
public function __construct(Context $context,
                            \Magento\Framework\View\Result\PageFactory $resultPageFactory,
                            \Magento\Checkout\Model\Cart $cart,
                            \Magento\Catalog\Model\ProductRepository $productRepository)
{
    $this->_resultPageFactory = $resultPageFactory;
    $this->_cart = $cart;
    $this->_productRepository = $productRepository;
    parent::__construct($context);
}

public function execute()
{
    $postParams = $this->getRequest()->getParams();
    // ... extract SKU process removed for clarity.

        //////// HERE IS THE ISSUE ////////////////
        try{
            $p = $this->_productRepository->get($sku);
        }catch(Exception $e){
            // this isn't caught, but outputed to the browser
            $errMsg = 'error: '.$e->getMessage();
        }
}
?>

Is there another way I can determine if a product SKU exists?

Thanks


texts: Send order to different dropshippers by product

texts:
A customer of mine is going to work with a few different dropshippers. It's going to be a Magento 2 Webshop.

What they want is: if a visitor orders Product A, an email should be send to the dropshippers that delivers product A. And if Product B is ordered, Magento should send an email to the other dropshipper that delivers Product B.

So the main question is: Can new order e-mails be send to different email addresses by choice of product?


texts: How to load stock item using product_id in Magento 2?

texts:
I am trying to get the stock status (is_in_stock) of an item. Currently, I am using the

\Magento\CatalogInventory\Model\Stock\StockItemRepository

which only accepts stock item id to fetch the product stock item data, is there any way we can fetch the stock using the product id?
 Like:

$this->stockItemRepository->loadByProductId($product_id)->getIsInStock();


texts: How to show/render product attributes by category selection during product creation in magento admin

texts:
There is by default coming product attributes in Product Information during product creation from Catalog->Manage Products->Add Product in admin after creating product attribute and setting it in Attribute set.

But the requirement is that product attribute will be coming by category selection. For example, If I select saree category, then the saree related product attribute will be coming in product Information during product creation in magento admin.

I have googled a lot. But there is no fruitful result by which I can start this type of requirement.


texts: How to implement js function in list.phtml magento?

texts:
If Load more products.. is clicked, I would like to work on the following code. Could anyone of you help me please? Thanks.

function sendLoadMoreProductsRequest(url) {
    new Ajax.Request(url, {
        onSuccess: function(response) {
            //Create dummy element
            var div = document.createElement('div');
            div.innerHTML = response.responseText;
            //refresh the page class element
            $$('.pages')[0].innerHTML = $(div).select('.pages')[0].innerHTML;
            //append the list to the existing product list
            $$('.category-products')[0].innerHTML += $(div).select('.category-products')[0].innerHTML;
            //check if there are more products to be loaded or not
            if(!$(div).select('.next.i-next')[0]){
                $('load-more-products').style.display = "none";
            }
        }
    });
}

function callbackFunc(e) {
    if($$('.next.i-next')[0]){
        var nextPageUrl = $$('.next.i-next')[0].readAttribute('href');
        sendLoadMoreProductsRequest(nextPageUrl);
    }
    else{
        //hide button
        $$(e.currentTarget).hide();
    }
}

//Assigning click event to the button which triggers the "next" link
$('load-more-products').observe('click', callbackFunc);


texts: Magento 2 sale price on additional items

texts:
Is there a concise way to have Magento apply a discount for multiple quantities of the same item, but only apply the discount to the additional items and exclude the first? For example, we would want to offer $200 for the initial purchase, but $180 on each additional identical item.
From what we've found so far, both Advanced Pricing and Cart Price rules will include the original item on any discount. Is there a way to offer "buy one at full price, get each additional purchase of the same item at a discount"?


texts: How can I disable cache for particular section or block

texts:
I have developed a top bar cart functionality for store front that displays latest three products added to the cart this works great when cache is disabled but when i enable the cache it showing weird subtotal in top cart and weird products in cart.

This make me sad :'(

I know this is happening because of cache. Is there anything that I can disable the cache for this section only? I have tried disabling the block html cache and check now this was working great but I found the category flat is having unspecified issues when block HTML is disabled.


texts: Magento 2.3.5 Content Security Policy CSP for Worker

texts:
I was really annoyed by the lack of documentation around the following console errors showing up.
[Report Only] Refused to create a worker from 'blob:https://domain.com/535c516f-8a3a-4d17-b0c0-a207e461f42c' because it violates the following Content Security Policy directive: "worker-src ".

Nowhere I found any information on how to solve it. There is documentation on the content security policy and although its report only its no harm but still irritating.


texts: Cart Product Update using API (SOAP v1) only updates quantity but not subtotal or total?

texts:
I can successfully add a product in cart and then check the cart.info to verify it. However, if I update any product in cart, only quantity is changed but the rowtotal, subtotal remains same

Added a product A in cart with quantity 2. When I fetch the cart.info, it shows quantity of Product A is 2, unit price: $5, rowtotal: $10 and so on.

And after updating same product for same customer(with quantity 4), The cart.info shows:
Product A, quantity: 4, unit price: $5, rowtotal: $10. (Expecting rowtotal to be $20)

Same follows for the cart subtotal and Grand Total - Not updated.

$proxy->call($sessionId,'cart_product.update',array($quoteID,$arrProducts));

Strange thing is, after updating the product quantity using API, when I refresh the cart page (on website - frontend), I can see the correct rowtotal subtotal and grand total in cart.info

Now sure if anything is wrong in API?


texts: Get collection of simple simple products in Magento2

texts:
I'm working on a custom module to fetch the latest 10 simple products but it doesn't work. Could anyone have a look and see what i'm missing? Thanks

public function getProducts()
{
    /** @var $collection \Magento\Catalog\Model\ResourceModel\Product\Collection */
    $collection = $this->_productCollectionFactory->create();
    $collection->addAttributeToSelect('*')
        ->addAttributeToFilter('type_id', array('eq' => 'simple'))
        ->setOrder('created_at')
        ->setPageSize(10);
    return $collection;
}


texts:
Hi currently running into an issue with magento 1.9 tax calculations.

I have a product setup as £10.82 with VAT of 20% to be added. The price including VAT is £12.98.

When 1 product is added to the cart everything is ok but if I add 7 the total should be £90.86 but its showing as:

Subtotal - £75.74 VAT - £15.15 Total - £90.89

Therefore 3p of VAT extra is added. Please advise on how I can fix this.

Thanks!


texts: How to remove configure product from cart in "checkout_cart_product_add_after" observer?

texts:
I am facing problem when i am removing configure product from cart using $cart->removeItem($itemId)->save(); method then its change all products price to zero. check this screen : https://prnt.sc/oagwbm

My code for removing item from cart :

foreach ($items as $item) {
    if($item->getProduct()->getId() == 208202){
        $this->_cart->removeItem($item->getItemId())->save();
    }
}

I am removing only one product from cart

Is there any other way to remove item from cart in observer ?


texts: Magento Code Migration Tool - Installation issue

texts:
i'm currently following the steps in

  https://github.com/magento/code-migration

to install the Code Migration Tool (not data migrate) to my localhost.

i am facing a problem at the

Installation step

When i run composer install,

it requires me username and password,
saying
Authentication required (repo.magento.com) ,

and i tried a few attemps, it just says

Invalid credential for https://repo.magento.com/packages.json, aborting.

i have done little research about the username and password on internet..

  https://community.magento.com/t5/Just-Ask-Alan/Invalid-credentials-for-https-repo-magento-com-packages-json/m-p/23820#M127

They suggested to get the private key and public key from my magento marketplace account, i did that but it doesn't work.

Also, the cmd doesn't allow me to type anything at the password.

Can anyone help me with this? Thanks >.<


texts: Composer package requirements unresolved

texts:
I created a package on packagist.org for the de_CH locale which is basically cloned from de_DE. Installing the de_DE package works fine via composer with Magento 2.1, but de_CH doesn't, although composer.json is (almost) the same. Only name and description differ, which shouldn't be the problem. The require definition is 100% the same in the composer.json files, but when I look at the packagist detail pages I notice 2 differences, the latter of which I seem not be able to influence.

version number 1.0.0 vs 1.8.0
requires magento/framework: 100.0.* vs magento/framework: ^100.0.0

The only thing I can think of right now is increasing the tag from 1.0.0 to something higher.

This is the output I get during installation:

$ composer require openstream/mage2-locale-de-ch
Using version ^1.0 for openstream/mage2-locale-de-ch
./composer.json has been updated
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 openstream/mage2-locale-de-ch ^1.0 -> satisfiable by openstream/mage2-locale-de-ch[1.0.0].
    - Conclusion: remove magento/framework 100.1.0
    - Conclusion: don't install magento/framework 100.1.0
    - openstream/mage2-locale-de-ch 1.0.0 requires magento/framework 100.0.* -> satisfiable by magento/framework[100.0.10, 100.0.11, 100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.0.6, 100.0.7, 100.0.8, 100.0.9].
    - Can only install one of: magento/framework[100.1.0, 100.0.10].
    - Can only install one of: magento/framework[100.1.0, 100.0.11].
    - Can only install one of: magento/framework[100.1.0, 100.0.2].
    - Can only install one of: magento/framework[100.1.0, 100.0.3].
    - Can only install one of: magento/framework[100.1.0, 100.0.4].
    - Can only install one of: magento/framework[100.1.0, 100.0.5].
    - Can only install one of: magento/framework[100.1.0, 100.0.6].
    - Can only install one of: magento/framework[100.1.0, 100.0.7].
    - Can only install one of: magento/framework[100.1.0, 100.0.8].
    - Can only install one of: magento/framework[100.1.0, 100.0.9].
    - Installation request for magento/framework (locked at 100.1.0) -> satisfiable by magento/framework[100.1.0].

Installation failed, reverting ./composer.json to its original content.

Any ideas what else I might be missing here?


texts: Show related product in cart page Magento 2

texts: I want to show related product in cart page, each product at least will have 3 or more related product, is there a way to do this?


texts: Why doesn't Magento 2.1 hint footer section?

texts:
I'm learning magento 2. I enabled hints from admin panel .I try to find in root directory but have had no success. In my screenshot, My question is
why does magento not hint footer section? where is store footer section in magento root directory? Please suggest how it works?

Thanks.


texts: Problems with getDescription() - how to remove line breaks without breaking the text?

texts:
I am having a bit of trouble right now.. I'm trying to create a php file to export products to a csv file and it's working pretty good.

My only problem is with the product description. I'm using the getDescription() function to get my product descriptions, but it inserts line breaks into the csv file, which won't work on import obviously. I'm trying to remove all line breaks and stuff, since I only want plain text for the descriptions.

I've tried using strip_tags, but it's doing weird things.. When I use strip_tags, the whole description is in one line like I want it to, but it also replaces all spaces with + and removes any of the German characters ..

Let me just show you what I mean. Here's the code I'm using:

<?php
error_reporting(E_ALL | E_STRICT);
define('MAGENTO_ROOT', getcwd());
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
require_once $mageFilename;
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
Mage::app();

$products = Mage::getModel("catalog/product")->getCollection();
$products->addAttributeToSelect('name');
$products->addAttributeToSelect('description');
$products->addAttributeToSelect('product_url');
$products->addAttributeToSelect('thumbnail');
$products->addAttributeToSelect('price');
$products->addAttributeToFilter('status', 1);//optional for only enabled products
//$products->addAttributeToFilter('visibility', 4);//optional for only visible products
$fp = fopen('export_moebelde.csv', 'w');
$csvHeader = array("art_nr", "art_name", "art_beschreibung", "art_url",     "art_img_url","art_waehrung","art_preis","art_lieferkosten");
fputcsv( $fp, $csvHeader,";");
foreach ($products as $product){
  $art_nr = $product->getSku();
  $art_name = $product->getName();
  $art_beschreibung = urlencode( strip_tags($product->getDescription()) );
  $art_url = $product->getProductUrl();
  $art_img_url = $product->getThumbnail();
  $art_waehrung = "EUR";
  $art_preis = $product->getFinalPrice();
  $art_lieferkosten = "0";
//  $category_ids = implode(',', $product->getCategoryIds());
fputcsv($fp, array($art_nr, $art_name, $art_beschreibung, $art_url, $art_img_url, $art_waehrung, $art_preis, $art_lieferkosten), "|");
}
fclose($fp);
?>

And here's the result:

jkfalieg-xxl|"Fiam Amigo XXL"|XXL+Liege+mit+Gestell+aus+Aluminium.Bezug%3A+Textiline+%28wetterfest+und+uv-best%C3%A4ndig%29.%0D%0A|https://www.zeitlos-einrichtung.info/fiam-amigo-xxl.html?SID=toarp61ih56l7610u5uf786qa0|/f/i/fiamamigo.jpg|EUR|195.0000|0

I know the product URL and the tumbnail URL need some work, but right now I just don't have a clue what to do about the description!

I appreciate any suggestions or tips you guys may have for me!


texts: Magento 2.3 "Review & Payments" page not loading

texts:
I just upgraded from Magento 2.2.3 to Magento 2.3. I am experiencing the following issue:

  During the checkout process, the "next" button on the "shipping" page
  does not work. It does not load the "Review & Payments" page.

This is the message that I am receiving. Does anybody else have this issue?

Thanks for any help!


texts:
Magento 2 Installation stuck at 67% every time I tried. The question has been asked before but the solutions offered for those posts didn't help.

memory_limit = 2048M on both php.ini & user.ini
max_execution_time = 360

Any one knows how to solve this?


texts: Always have to clear VAR to log in to Magento

texts:
I moved my site from a different domain. I can only log in if I do the following:

Change my password in PHPmyAdmin.
Delete VAR/CACHE.
Login using a cleared cache/incognito browser.

Any suggestions?


texts: How to run CLI Command on the product Save/update in Admin Magento2

texts:
How I can run an indexer command after save or update the product in the admin through any observer or any plugin?

I want to run "bin/magento wyomind:elasticsearchcore:indexer:reindex product" command when product get update/save in admin.


texts: Get product ids after import data finish

texts:
I want get Product Ids after import product using csv file.

When I go following menu System > Import/export > Import and import*.csv file of products and when finish import data one event called catalog_product_import_finish_before this event is in app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php.

This event work but not getting `ids(entity_id)` of product after imported.

Any one help me where I am going wrong ?

my app/code/local/Test1/Module1/etc/config.xml

<config>
    <modules>
        <Test1_Module1>
            <version>0.1.1</version>
        </Test1_Module1>
    </modules>
         <adminhtml>
              <events>
                <catalog_product_import_finish_before>
                    <observers>
                        <test_module1_catalog_product_import_after>
                            <type>singleton</type>
                            <class>module1/observer</class>
                            <method>afterImportProductData</method>
                        </test_module1_catalog_product_import_after>
                    </observers>
                </catalog_product_import_finish_before>
             </events>
          </adminhtml>
</config>

this is defined code in app/code/local/Test1/Module1/Model/Observer.php

public function afterImportProductData(Varien_Event_Observer $observer)
    {
        echo "<pre>";
        Mage::log($observer->getEvent()->getAdapter()->getData());
        die('die');
    }

Please help me.


texts: File permissions changed after applying patch - 403 Forbidden Error!

texts:
I was trying to install a patch through SSH and followed the directions to change folder permissions; it came up saying

  operation not permitted

but now my site is down with a

  403 - Forbidden Error

I am going through each folder manually trying to change the folder permissions back to 755 and the file permissions back to 644 but it's

Taking forever
More than possible that some will be missed.

Please help! How do I revert them all back?

Will typing this into my terminal help?

#!/bin/sh
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod 550 mage

I'm scared to touch SSH again. Can someone help me get it back?


texts:
How can we add extra field in image role in product page admin panel.

I want to add new field same as thumbnail in Image role popup.

http://awesomescreenshot.com/0e467tlo04


texts: catalog:images:resize not working in CLI in 2.3.4

texts:
We just upgraded our dev site from 2.3.3 to 2.3.4 and I'm trying to run the bin/magento catalog:images:resize command in CLI in hopes that it will fix some image styling issues I'm trying to resolve (removing white space from the border of a landscape image so it lines up with the product text on our product page).

However, when I run this command in CLI, I'm getting the following error message: Cannot resize images - product images not found

I can't seem to find any documentation on this error online. Anyone have any ideas on where to look for a solution?


texts:
I would like to know how I can display custom code in a CMS page. When using static blocks I can use the following code:

{{block type="cms/block" block_id="customcode"}}

I guess it has to be something like this:

{{block type="core/template" template="custom/code.phtml"}}

Does it work like that? Where do I put the file custom/code.phtml?


texts: Show products on homepage breaks page 1.9

texts:
I am currently found this solution to post products on homepage

{{block  type="catalog/product_list" category_id="7"  template="catalog/product/list.phtml"}}

once i paste above code inside CMS > Pages > homepage page underneath the text and save it replaces page completely with procuts page.

Is there way to just add product on bottom of home page while still keeping homepage text that i entered in CMS page?
Somehow it only shows one product even though i have 40 in the category 7


texts: Buying button sending to an empty cart page instead of product page

texts:
When I have all the caches active the buying product button at the home page sends the client to an empty cart page, and when I disable all the caches the buttons start to behave normally.
Any help is much appreciated, magento CE 1.9.0.1
All the best,


texts: Call of my custom module in a CMS Page not working

texts:
I am working on a quotation form module I would like to implement on my Shop Home Page

My config.xml is (app/code/community/Mine/Quotemodule/etc/config.xml)

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

    <frontend>
        <routers>
            <routeurfrontend>
                <use>standard</use>
                <args>
                    <module>Mine_Quotemodule</module>
                    <frontName>quotemodule</frontName>
                </args>
            </routeurfrontend>
        </routers>
        <layout>
            <updates>
                <quotemodule>
                    <file>quotemodule.xml</file>
                </quotemodule>
            </updates>
        </layout>
    </frontend>

    <global>
        <blocks>
            <quotemodule>
                <class>Mine_Quotemodule_Block</class>
            </quotemodule>
        </blocks>
    </global>
</config>

app/etc/modules/Mine_Quotemodule.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Mine_Quotemodule>
            <active>true</active>
            <codePool>community</codePool>
        </Mine_Quotemodule>
    </modules>
</config>

app/design/frontend/rwd/default/layout/quotemodule.xml

<?xml version="1.0"?>
<layout version="0.1.0">
     <default>
          <reference name="content">
          </reference>
      </default>
      <routeurfrontend_index_index>
           <reference name="content">
                <block type="quotemodule/quoteformblock"  name="quoteform_quoteformblock"
                          template="quotemodule/quoteform.phtml" />
           </reference>
      </routeurfrontend_index_index>
</layout>

app/code/community/Mine/Quotemodule/controllers/IndexController.php

<?php
class Mine_Quotemodule_IndexController extends Mage_Core_Controller_Front_Action
{
   public function indexAction()
   {
        $this->loadLayout();
        $this->renderLayout();
   }

   public function mamethodeAction()
   {
     echo 'test mamethode';
    }
}
?>

app/code/community/Mine/Quotemodule/Block/Quoteformblock.php
(unsued for the moment)

<?php
class Mine_Quotemodule_Block_Quoteformblock extends Mage_Core_Block_Template
{
     public function methodblock()
     {
         return 'informations de mon block !!';
     }
}
?>

and I have a app/design/frontend/rwd/default/template/quotemodule/quoteform.phtml file containing my html form.

When I go to the url my www.myshop.com/quotemodule/index, It works.

I then tried to implement the form by calling the module in my CMS Home page, by adding in content :

{{block type="mine/quotemodule" name="quoteform_quoteformblock" template="quotemodule/quoteform.phtml"}}

But when loading my homepage, it is empty..

Thank you for your help,

Alex


texts: Magento 1.8 - Same website different url

texts:
Is it possible to show the same products, pages, etc. on a different url?

The current situation is we have a Dutch website and we want to have a Belgium website. Both country's speak the same language, so basically we can show the same website for the Belgian people as for the Dutch people.

Current result: example.com/be/ redirects to example.com/nl/

Expected result: /be/ shows same website as /nl/ but payment methods, shipping costs, etc. are different.


texts:
I need to test a payment gateway and the sandbox only accept prices with no points or commas on it. Is there a simple way to change it on magento?

Thanks!


texts: Disable Cash on delivery if catalog or cart price rules apply on product

texts:
I want to disable the cod payment option on checkout for specific products which has any promotion rules apply on it.

How can i achieve it, please give suggestions. Thanks in advance.


texts: If I want to get data from sales_order_grid table, which CollectionFactory I should use?

texts:
If I want to get data from sales_order_grid table, which CollectionFactory I should inject?
for example:
If I want to get Sales_order_item, I should use
\Magento\Sales\Model\ResourceModel\Order\Item\CollectionFactory $itemCollectionFactory,

so
If I want get data from sales_order_grid, which CollectionFactory I should use?
IS there any documentation I can learn the difference of those different Collection Factory? Thanks
I just showing my code below, but I have no idea why magento saying
"has an error: Call to undefined method Magento\Sales\Model\ResourceModel\Order\Grid\Collection\Interceptor::create(). [] []
"
use Magento\Sales\Model\ResourceModel\Order\Grid\Collection as SalesOrderGridCollection;

    /**
     * @var SalesOrderGridCollection
     */
    private $sOGcollection;

    public function __construct(

        SalesOrderGridCollection $sOGcollection
    ) {

        $this->sOGcollection = $sOGcollection;

     public function getSalesOrderGrid()
        {

        try {
            $itemData = $this->sOGcollection->create();
                $currentDate = date("Y-m-d H:i:s"); // Y-m-d h:i:s
                $newDate = strtotime('-30 MINUTE', strtotime($currentDate));
                $newDate = date('Y-m-d H:i:s', $newDate);
                $itemData->addFieldToFilter('updated_at', ['gteq' => $newDate]);
                $itemData->addFieldToFilter('updated_at', ['lteq' => $currentDate]);
                $itemData->load();
            return $itemData;

            } catch (LocalizedException $e) {
                $this->logger->error($e->getMessage());
            }
            return null;
        }

$SalesOrderGride = $this->getSalesOrderGrid();


texts: getChildHtml inside of another .phtml file

texts:
I have a local.xml file that I have all of my "includes" in (if you want to call them that).

I have a nav.phtml file that is included inside of the header.phtml file with getChildHtml('nav'). In nav.phtml, I have a file that I want included with getChildHtml('topSearch').

Is this possible? Is there a better implementation?


texts:
I'd like to completely remove the Tax column from items list, in order pdf.

I've managed to remove the item tax value, but I can't find how to remove the "Tax" column header.

Any ideas?


texts:
Every time, I install an extension through Magento Connect Manager I get the following error:
Exception during cache and session cleaning
I tried running Magento Cleanup file and then try again.
also tried downloader/lib/Mage/Archive/Helper/File/Gz.php in your Magento directory and replace
$this->_fileHandler = @gzopen64($this->_filePath, $mode);

Still having issue; my Php Version is 5.5 if that helps and my host is Site Ground. I am lost why I am getting this error. Nothing in the logs either.
EDIT
Here is a screenshot of this error; I tried other extensions same thing


texts: Magento Getting an error when using live source file locally

texts:
I got the file backup from my live site and created a project in xampp/htdocs folder. And then connected it to a old database. When i am running the project in browser i got below error;

a:4:{i:0;s:92:"SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No such host is known. ";i:1;s:2553:"#0 C:\xampp\htdocs\test\lib\Zend\Db\Adapter\Pdo\Mysql.php(109): Zend_Db_Adapter_Pdo_Abstract->_connect()
C:\xampp\htdocs\test\lib\Varien\Db\Adapter\Pdo\Mysql.php(320): Zend_Db_Adapter_Pdo_Mysql->_connect()
C:\xampp\htdocs\test\lib\Zend\Db\Adapter\Abstract.php(460): Varien_Db_Adapter_Pdo_Mysql->_connect()
C:\xampp\htdocs\test\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
C:\xampp\htdocs\test\lib\Varien\Db\Adapter\Pdo\Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
C:\xampp\htdocs\test\app\code\core\Mage\Core\Model\Resource.php(169): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
C:\xampp\htdocs\test\app\code\core\Mage\Core\Model\Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
C:\xampp\htdocs\test\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
C:\xampp\htdocs\test\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
C:\xampp\htdocs\test\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getWriteAdapter()
C:\xampp\htdocs\test\app\code\core\Mage\Core\Model\Resource\Cache.php(53): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter()
C:\xampp\htdocs\test\app\code\core\Mage\Core\Model\Cache.php(478): Mage_Core_Model_Resource_Cache->getAllOptions()
C:\xampp\htdocs\test\app\code\core\Mage\Core\Model\Cache.php(520): Mage_Core_Model_Cache->_initOptions()
C:\xampp\htdocs\test\app\code\core\Mage\Core\Model\App.php(1183): Mage_Core_Model_Cache->canUse('config')
C:\xampp\htdocs\test\app\code\core\Mage\Core\Model\Config.php(414): Mage_Core_Model_App->useCache('config')
C:\xampp\htdocs\test\app\code\core\Mage\Core\Model\Config.php(294): Mage_Core_Model_Config->_canUseCacheForInit()
C:\xampp\htdocs\test\app\code\core\Mage\Core\Model\App.php(413): Mage_Core_Model_Config->loadModulesCache()
C:\xampp\htdocs\test\app\code\core\Mage\Core\Model\App.php(343): Mage_Core_Model_App->_initModules()
C:\xampp\htdocs\test\app\Mage.php(684): Mage_Core_Model_App->run(Array)
C:\xampp\htdocs\test\index.php(87): Mage::run('', 'store')
{main}";s:3:"url";s:27:"/test/test/";s:11:"script_name";s:25:"/test/index.php";}

I am unable to find an answer after searching and doing solutions from the internet too.

Can anyone please help me to solve this. Please advice me whether this is because of my old database or any other file issue or else database configuration issue.

Thank You.


texts:
I am newly stuyding in Magento.

Could you explain me about, How many default Magento pages are there after completing installation and what are they?

Default Page Like :

-> Home Page
-> Login Page
-> Register Page
-> Contact Us
-> Forget Password
etc..

Like that's.

Could you please assist me ..?


texts: WYSIWYG Editor not saving typed or pasted text

texts: We started a new build and are roughly 80 hours into it. When we type or paste content into the editor it will not save.  Is there something I can edit to check sensitivity? Is it a db issue?


texts: Magento Community Edition 1.9 End of life

texts:
Our current platform, Magento Community Edition 1.9, is slated to receive security patches until June of 2020, according to the documentation on Magento’s website

https://magento.com/blog/magento-news/supporting-magento-1-through-june-2020
https://magento.com/sites/default/files/magento-open-source-software-maintenance-policy.pdf

I have heard from alternate sources that Magento CE 1.9 will only be supported until October of this year (though I find that highly suspect). Secondly, what would a transition to a Magento Open Source 2.x version look like down the road when 1.9 eventually reaches end of support?


texts: export and import of products problems in magento 2

texts:
I exported products from Magento 2.0.5 and want to import to Magento 2.1.1

I got the following error:

  Data validation failed. Please fix the following errors and upload the
  file again. Following Error(s) has been occurred during importing
  process: Only the first 100 errors are shown. Download full report
  1. Product Type is invalid or not supported in row(s): 52, 53, 73, 74, 75, 528, 529 Checked rows: 529, checked entities: 529, invalid rows:
  7, total errors: 7


texts: How to get tracking number for items using order id for an order

texts:
I am getting the order information using

 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
 $order = $objectManager->create('Magento\Sales\Api\OrderRepositoryInterface')->get($orderid);

Then I am iterating the $order to get the ordered item related info.
How can I get the tracking number for those items as well?

 <?php foreach ($order->getAllVisibleItems() as $item): ?>
    // how to use $item to get tracking number
 <?php?>

I came to this this solution but this didn't work and I don't want to iterate it  $order->getTracksCollection() as I am already in a loop of <?php foreach ($order->getAllVisibleItems() as $item): ?>

 $tracksCollection = $order->getTracksCollection();
 foreach ($tracksCollection->getItems() as $item) {
    echo $track->getTrackNumber(); // Tracking number
 }


texts: Making an API: How can I sort products by popularity? How does catalog/product order by default?

texts:
We are building an API for an app and want to order our products by popularity. Now is my question, how would I go about that? We are already loading products via /catalog/product (and it all works and stuff) but for some reason I can't see to be able to order the products on popularity. From what I understand from it, I have to join a different table to do this. Isn't there an easier way of doing this? Also, how does the default sorting behavior work? When I make a call without an orderBy, does it automatically order on position?

Another question to add: do you have tips on google-ing stuff like this? Often times Google comes up with answers who are not entirely related to my question or more frontend related.


texts:
I am having some trouble with Magento Observers. What I am trying to do is: as I am saving a custom product in my adminhtml form I want to my the product sku with a 3rd party API sku. To do this I created an observer for the save action (savePreDispatch) , able to get the retrieve the SKU from the third party API but now my concern is : how can save to my collection the retrieved SKU in the observer?

I have tried something like $this = $observer -> getEvent() -> getProduct() and then save the SKU but it doesn't appear to work, any ideas?

my config.xml is below

<?xml version="1.0"?>
<config>
<modules>
    <Namespace_Module>
        <version>1.0.3</version>
    </Namespace_Module>
</modules>
<global>
    <resources>
        <namespace_module_setup>
            <setup>
                <module>Namespace_Module</module>
                <class>Namespace_Module_Model_Resource_Setup</class>
            </setup>
        </namespace_module_setup>
    </resources>
    <blocks>
        <namespace_module>
            <class>Namespace_Module_Block</class>
        </namespace_module>
    </blocks>
    <helpers>
        <namespace_module>
            <class>Namespace_Module_Helper</class>
        </namespace_module>
    </helpers>
    <models>
        <namespace_module>
            <class>Namespace_Module_Model</class>
            <resourceModel>namespace_module_resource</resourceModel>
        </namespace_module>
        <namespace_module_resource>
            <class>Namespace_Module_Model_Resource</class>
            <entities>
                <product>

namespace_module_product

                </product>
            </entities>
        </namespace_module_resource>
    </models>
</global>
<adminhtml>
  <events>
    <catalog_product_save_before>
      <observers>
        <namespace_module>
          <type>singleton</type>
            <class>namespace_module/observer</class>
            <method>catalogProductSaveBefore</method>
        </namespace_module>
      </observers>
    </catalog_product_save_before>
  </events>
</adminhtml>
</config>


texts: My category navigation layered navigation is showing no products

texts:
I am newbie in Magento 2, I configured the Magento 2 layered Navigation and did everything to set layered navigation for categories and size and color.

Layered Navigation is working perfect for color but not for categories and size.
When i select any size in Magento 2 layered navigation it shows no product but at side it shows number of products in that category.

I think this is Magento 2 bug, because i tried every settings and looked at every overriding file to check if there's any file causing error.

Here is what it seems like

For size it is showing only first and last size but not all sizes in siz attributes.


texts: How to update frontend static files in magento2

texts:
As we all know Magento2 creates static files path itself. You just need to add files in your module namespace/modulename/view/frontend(area)/web or more or like same path for js and css files. Now after running the CLI command setup:static-content:deploy magento will deploy static files under pub/static.

  Now if i would like to do some changes in those files then where i
  should do those changes? In the main file and again need to run the static-content:deploy command ? Or we can do in both places together.

The main question is why magento2 has this feature? For an extra abstraction layer!!..Does that makes any sense?


texts: How to drop a table in Declarative schema?

texts: How to drop a table in Magento 2.3.0 using declarative schema ?


texts: I've followed the instructions to setup a Grouped Product which has two Simple Products both in stock and quantity levels set. Neither have custom options. The grouped product shows the table of two product in the correct place but beneath that the "add-to-box" is empty. I have re-indexed the date and cleared cache.


texts: Get frontend baseurl from admin when 'Add Store Code to Urls' to yes

texts:
Based on this answer, you can fetch baseurl from backend with his code:

Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);

This won't work properly, if settings 'Add Store Code to Urls' is set to 'Yes' (details about that). In this case, it will add 'admin' into url.

I noticed that also

Mage::getModel('catalog/product')->load(1)->getProductUrl()

won't display proper url, it will add admin into url on fresh Magento installation.

Is that Magento bug? Is there any other proper way to get frontend base url from backend?


texts: Reset "Use Default Value" for specific store view on all products

texts:
Somehow a number of my products had the "Use Default Value" deselected.

My store has 2 languages, English and French.  French uses the Default Store value, so now when I update products it doesn't appear on the front end unless I manually go onto the product on the French store view and select "Use Default Value",

There doesn't appear to be an attribute for a mass action, I've come across some scripts and MySQL queries however it is not clear if those solutions reset all store views to use the default value.

The desired result is to set "Use Default Value" on a specific store view (French) on all products.

How do I reset a large number of products (or all products) to "Use Default Value" on a specific store view?


texts: How to add a custom footer to my Magento 2 theme?

texts:
My theme inherits from Blank. I know how to remove the footer links: Contact us, Advanced Search, etc... then I'd like to add a custom footer with 4 columns:

column 1 - Account links
column 2 - general information links
column 3 - Payment logo icons
column 4 - Newsletter sign up form

All elements would be in a footer.phtml template, however I dont know how to add this phtml file to the footer area.
And which folder this file should be located in? I know how to override templates, but the Blank theme does not have a footer.phtml enabled, so there is no a specific path to put my phtml file in.


texts: Magento2 : Pagination - jump to top of page

texts:
I have problem with next/prev Buttons in Pagination.
If user clicks button, it reloads the page (i think) in Ajax at the current page scroll position. Is there any method to force the reload jump to top of page?


texts: Remove the Proceed to Checkout button from the Shopping Cart page in Magento 1.9

texts: is there an easy way to remove the "Proceed to Checkout" button from the shopping cart page?  Instead I would like the "Check out with PayPal" to be the only option.  I suppose I would need the word "OR" to also be hidden.


texts: Best practice to fetch all configurable products + one "child" simple product

texts:
I'm trying to improve some bad code that is causing a really slow load time.

The code is used for some carousel displaying products.

You can see it here:

<?php
// Get all configurable products for the carousel.
$_productCollection_configurablesOnly = Mage::getResourceModel('catalog/product_collection')
    ->addAttributeToSelect('*')
    ->addAttributeToFilter('type_id','configurable')
    ->addAttributeToFilter('status', array('neq' => 2));
//->addAttributeToFilter('sku', array('nin' => array("SM106","SM107","SM110","SM107","SM110","SM111","SM116","SM121","SM118","SM119")));
//->addAttributeToFilter('sku', array('in' => array("SMX102")));

foreach ($_productCollection_configurablesOnly as $conf_product) {

    if ($conf_product->get_status() != 2) :

        // Get all simple products.
        // $simple_products = $conf_product->getTypeInstance(true)->getUsedProducts(null, $conf_product);
        $simple_products = Mage::getModel('catalog/product_type_configurable')->getUsedProducts(null, $conf_product);

        // Remove disabled simple products from the list.
        foreach ($simple_products as $k => $simple_product) {
            $simple_product_loaded = Mage::getModel('catalog/product')->load($simple_product->getId());
            if ($simple_product_loaded->getStatus() == 2) {
                // Product is disabled.
                unset($simple_products[$k]);
            }
        }
        $simple_products = array_values($simple_products);

        // Choose a random one.
        $random_simple_product = $simple_products[rand(0, count($simple_products) - 1)];

        // Get main image from the random simple product and from configurable product.
        if ($random_simple_product->getImage() && $conf_product->getImage()) {
            $random_simple_product_main_image = (string)$this->helper('catalog/image')->init($random_simple_product, 'white_bg_image')->keepFrame(false)->resize(500);
            $conf_product_main_image = (string)$this->helper('catalog/image')->init($conf_product, 'image')->keepFrame(false)->resize(500);
        } else {
            $random_simple_product_main_image = "";
            $conf_product_main_image = "";
        }

        // Get color. Replace spaces and ampersands with dashes to support URLs.
        $color = str_replace('&', '-', str_replace(' ', '-', $random_simple_product->getAttributeText('color')));
        ?>

            <a href="<?php echo $conf_product->getProductUrl() . '#' . $color ?>">
                <img class="hover" src="<?php echo $random_simple_product_main_image; ?>" alt="<?php echo $conf_product->getName(); ?>">
                <img class="no-hover" src="<?php echo $conf_product_main_image; ?>" alt="<?php echo $conf_product->getName(); ?>">

    <?php endif; ?>
<?php } ?>

<?php //endif; ?>

I'm aware of the fact that it gets all the configurable products (with all their attrs) and then getting all the simple products assigned to those. and pick one random.

I'm looking for the right way to do it without over-killing and selecting unnessecary data.


texts: Magento 2 order shipment tracking details

texts: How to get tracking information from order shipment in magento 2?


texts: Programmatically setting up a customer - Multi Select

texts:
When creating a customer programmatically I know how to set a simple text field eg

$customer = Mage::getModel("customer/customer");
$customer->setFirstname('John');

However my question is how do I set the values of a multiselect field


texts: Specific view for specific category in Magento 2

texts:
How to create specific view(list/grid) for specific category.

In Magento the default will be applied to all the categories, but need specific view for one category.


texts:
I’m having some issues with the pagination of a custom collection, if I call the following methods:
$this->matchesCollection->setPageSize($pageSize)->setCurPage(++$page);
and
$this->matchesCollection->getSelect()->__toString();
it returns the following part of a query: …= 0 LIMIT 100000
So, it has a limitation, but where did the offset go?
If the initial value of $page is larger than 1, there’s an offset, but the offset doesn’t increment, so apparently the query gets cached, is there any way to disable this?
Another method I tried is:
$pageRows = $this->matchesCollection->getSelect()->limit($pageSize, ($page * $pageSize));
The query seems to be right, but I guess this is not the recommended method and I don't have a clue about how to iterate through the $pageRows variable, whereas, with the setCurPage() method I can use foreach ($pageRows as $item) {}.
Any help is much appreciated.


texts: What is Difference Between Configurable Product & Simple Product In Magento?

texts: I Can't find any difference in the product types


texts: Magento2 Submit Form via ajax after checking multiple Qty box

texts:
I need to submit the ajax form after checking if all the qty boxes has value, if any 1 qty box is empty then stop form submit.

For this, I used below code but it is not working as excepted. I need to remove ajax request from foreach loop. Can some one guide me on this?

require(["jquery"], function ($) {
    $(document).ready(function () {
        $('#submit').click(function () { // The button type should be "button" and not submit
            var body = $('body').loader();
                    body.loader('show');
            if ($('#enquiry-form').valid()) {
                var string = "<?php echo $item_arr; ?>";
                var array = string.split(',');
                $.each(array, function( index, value ) {
                    if (!($('#cart-'+value+'-qty').val())) {
                    alert("Please enter required qty");
                    return false;
                    }else{
                        $.ajax({
                            type : 'POST',
                            url : "<?php echo $block->escapeHtml($block->getFormAction()); ?>",
                            data : jQuery('#enquiry-form').serialize(),
                            success: function(response){
                                var body = $('body').loader();
                                body.loader('show');
                                var returnedData = JSON.parse(response);
                                // alert(returnedData.message);
                                if (returnedData.type == 'success') {
                                    window.location.href = "<?php echo $this->getBaseUrl().'inquiry/index/success'; ?>";
                                }else if(returnedData.type == 'error'){
                                    alert(returnedData.message);
                                }else{
                                    alert(returnedData.message);
                                }
                            }
                            });
                    }
                });
            }
        });
    });
});


texts: Magento 2 How to add additional_data field in COD payment method

texts: In Magento 2 how to add text and select filed at COD payment method only.


texts: Magento2 set a price to configurable products depends on attribute

texts:
I have created a configurable products on my magento2 website. Now I have to set the price for associated products. I know how to set the price for single single attribute value but I need to set the price for combinations of attribute value.

for e.g. I have 3 attributes Size, Fabrics & Color. Now I want to set the price for combinations of Size and color. this facility not provided my magento. I have searched for custom functionality but know solution found. Anyone please help me to fix this issue. Thanks in Advance!


texts: Create local host for current live website

texts:
I have a live 1.9.2.2 website, however I want to make a local host version of it so I can run tests on changes, before applying them to my live site.

What is the best way to go about setting up a local host at this point? I've got instructions on how to do it for a site that isn't live, but wasn't sure if I needed to change anything if the site was already live.

Thanks!


texts:
I have tried pretty much everything to get this to work. I am running Magento 1.8.1. I made a price rule to give a certain customer group 50% off on products. Then when I am displaying the price of a product on product view it doesn't show the updated price for the customer groups. Is this still a bug? I read in 50 million articles that it was fixed in 1.8.1.

I dont know if this has anything to do with it. However, when I created my first catalog price rule, a rule that i never created popped up called discount I think with the same amount off. I deleted that, hence I didn't need it. Same thing happened when I created a shopping cart price rule.


texts: How to prevent LastPass to autofill Magento's admin configuration while edit?

texts: The problem happens when you modify something in admin configuration in Magento 2 admin panel. The LastPass will autofill obscured fields and you will lose your data in these fields. How to prevent this?


texts: What is the difference Between cataloginventory_stock_status & cataloginventory_stock_status_idx

texts: If I use cataloginventory_stock_status and cataloginventory_stock_status_idx return different values, what is the main difference between these two tables?


texts: Magento 1 - programmatically add SEO to product image name

texts:
i have uploaded image in the admin to a product. Now I want the product image to be proper SEO name, basically like productname-sometags.png

How can I do this? I have 1000 products on my site, it is not possible to change names of all one by one.

Please help me, is there anyway by which it can be done programmatically.


texts: How to Setup Magento Stores with Different Domain

texts:
I would like to know if it is possible, and more importantly, the correct approach, to use a single Magento instance/server to host the following two websites:

two magento ecommerce 'websites'
different product catalogue
different 'branding' for each
same payment methods
different paypal payment account
different customer base
different domain/URL
different email templates for each
same theme, but different color variation
same checkout workflow
same language
same currency

I am thinking in terms of maintenance of the code base and not having multiple logins for all admin/coding sytems..
However, I am also cautious about not making a single instance over complicated.

Once each site gets a larger customer base and more orders, I may split the two, however for now, I would like to keep things simple...but correct.

Thanks in advance.


texts: Magento 2 : How to solve Catalog Rule Product Status: REINDEX REQUIRED ( NO SSH access )

texts:
I have problem with Catalog Rule Product Status: REINDEX REQUIRED.

I'm using Magento 2.2.3 & DirectAdmin without SSH access.
Also, I triad through Admin panel & it's not working.

My Cron-job are okay.
I don't have any problems with it.
Please help. I'm exhausted.. :(


texts: Modify tax rate programmatically based on products without save in database

texts:
I need to apply different rates based on a custom attribute of product.
I created an observer to change the rate before the cart (sales_quote_collect_totals_before).

Everything works fine but when I change the rate (see quote below) I end up changing global scope. So during checkout, if another user go to cart, the rate will be changed during the process generating a different price at checkout.

$taxRate = Mage::getSingleton('tax/calculation_rate')
    ->getCollection()
    ->addFieldToFilter('code', 'myCodeTaxRate')
    ->getFirstItem()
    ->setRate($myCustomRate)
    ->save();

You can apply the value for only one session? change only in memory and not in the database?

I saw this and I think is a bad solution: Modify Tax Rule Programmatically - set Tax Rate array


texts: How can I install a new theme in Magento?

texts:
I want to install a new theme in Magento and I have also followed steps of this link (https://www.siteground.com/tutorials/magento/magento_themes.htm), but I am not able to get the theme in Magento.

Please help me on how to install a Theme on Magento.


texts: How I can create a link to page from template?

texts:
I would like to generate a link like this:

My link

Target page: example.com/my-custom-page.

Template: module-customer/view/frontend/templates/form/register.phtml


texts: Variable products - Cost of optional extras depends on size selection

texts:
I have one product, a garden shed, and it's available in 2 choices of cladding with 7 optional extras.

I would like the customer to be able to select the size of the shed they want and for the cost of the cladding and optional extras to then change accordingly.

Please see image to illustrate this price structure.

Does anyone know if this is possible in Magento Community? Any help would be greatly appreciated! Thanks so much!


texts: Magento2 - After I changed my dns my admin url throws a 404

texts: I developed a site with a generic system url through my hosting company. When I switched my dns to the sites regular domain name my admin are throws a 404 error now.


texts: Invalid signature error on rest-api retrieve products

texts:
I want to retrieve all products from magento website through rest api.

I am trying to connect to my Magento API but keep getting an invalid signature error.

i have all integration details like Consumer Key, Consumer Secret, Access Token & Access Token Secret.

i am working with Oauth to retrieve products but it shows me Invalid Signature error all time. the oauth_signature i am creating with Oauth not matching with the default functions creating oauth_signature of magento.


texts: Make Magento search more effective? Is there a way to make it search for product names first?

texts:
Magento 1.9.1
Porto theme

When we do a search for a word which is also contained in product names - it returns all kinds of products but does not show the products that actually have that word in their product names first.

What is the best way to make the Search look for products that contain the search for word first?

My settings are as follows:

Catalog Search
Minimal Query Length = 1
Maximum Query Length = 128
Maximum Query Words Count = 10
Search type = Combine (Like and Fulltext)
Apply Layered Navigation if Search Results are Less Than: 2000

I wouldn't mind installing an extension if it improves the search results.


texts: Magento 1.9.x - How can rewrite Mage_Core_Model_Session_Abstract_Varien class

texts:
I am trying to re-write Mage_Core_Model_Session_Abstract_Varien class in my custom module but getting error :

Recoverable Error: Argument 1 passed to Mage_Core_Block_Messages::addMessages() must be an instance of Mage_Core_Model_Message_Collection

What I have tried -

config.xml

<core>
      <rewrite>
           <session>Test_HelloDeveloper_Model_Product</session>
       </rewrite>
</core>

And ...Model/Product.php

class Test_HelloDeveloper_Model_Product extends Mage_Core_Model_Session_Abstract_Varien {

    public function start($sessionName=null)
    {
        Mage::log('method overrided...', null, 'override.log');

    }
}

What can be issues?


texts:
How can I retrieve a list of available pages such as Contact Us, About Us, Home etc... in Magento 2, my purpose to get a list of pages is to build a custom menu on left side bar.
Also is there any way to build a custom menu for selected pages in Magento 2?


texts: Adding a product attribute in checkout summary

texts:
I am having an attribute which needs to be there along with the product name. I want to add it in checkout summary area.
Please see the image below

Need to override this page:

  vendor/magento/module-checkout/view/frontend/web/template/summary/item/details.html


texts: Magento 2: How to override Luma Theme Home Page

texts:
I'm using Magento 2 CE Version 2.1.0 on WAMP Windows 10

I already referred

Magento 2: How to override mini-cart default template html file?

Would like to override Magento 2 Default Luma Theme

I have below folder structure

magento2
 |_ app
   |_ design
      |_ frontend
        |_ Custom
            |_Theme
              |_Magento_Theme
                |_templates
                  |_root.phtml     - Copy of Luma
                registration.php
                theme.xml

app\design\frontend\Custom\Theme\Magento_Theme\registration.php

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

app\design\frontend\Custom\Theme\Magento_Theme\theme.xml

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

I run php bin/magento setup:static-content:deploy & clear cache as well. It's not displaying my newly created Theme in Admin -> Content -> Design -> Configuration. Edit Dropdown List.

What I'm still missing?


texts: How to add more custom fields in magento1.9.3 in one page checkout

texts: I want to add custom fields like  whatsapp number etc in onepage checkout billing form and want to hide the shipping steps also.


texts: Magento 1.8 CE and PayPal Payments Standard - No Order Confirmation Emails, No Invoices

texts: On my client's Magento site, PayPal Payments Standard has worked fine with 1.8 CE, which we upgraded to about five months ago. About 10 days ago, Magento stopped sending order confirmation emails, but only on PayPal-paid orders. (PayPal itself still sends a "receipt for your payment" confirmation email.) At the same time, Magento also stopped creating invoices, again, only for PayPal-paid orders. The order is created successfully, but not the invoice. I've checked PayPal configuration, and it appears to be configured correctly. There are no recent entries in the exception log. Other emails, such as password-reset, are sending, and the client's ISP reports no issues with email. I'm sure there must be a setting that's been modified, but I can't find any settings that don't look right. Any ideas for further troubleshooting this problem?


texts: Get data of custom table error in magento 1

texts:
I want to get data of the custom table, this is my code

$address = Mage::getModel ( 'shippingaddresses/shippingaddresses' )->getCollection()->addFieldToSelect('*')->addFieldToFilter(
                   array(
                             array("account_id",["eq"=>$customerNumber]),
                             array("account_name",["like"=>"%".$customerName."%"]),
                             array("shipping_city",["like"=>"%".$customerCity."%"]),
                             array("shipping_postal_code",["like"=>"%".$customerCode."%"])
                   )
        );

My error

Column not found: 1054 Unknown column 'account_id.Array' in 'where clause', query was: SELECT `main_table`.* FROM `commercers_shippingaddresses` AS `main_table` WHERE ((`account_id`.`Array` = '') OR (`account_name`.`Array` = '') OR (`shipping_city`.`Array` = '') OR (`shipping_postal_code`.`Array` = ''))";i:1;s:2143:

UPDATE

I tryed this code but this has a problem. I need it find AND.

$address = Mage::getModel ( 'shippingaddresses/shippingaddresses' )
                  ->getCollection()
                  ->addFieldToFilter(['account_id', 'account_name', 'shipping_city', 'shipping_postal_code'],
                   [
                       ['eq' => $customerNumber],
                       ['like' => "%".$customerName."%"],
                       ['like' => "%".$customerCity."%"],
                       ['eq' => $customerCode]

                   ]);


texts: How to create a pop out window when a customer clicks proceed to check out

texts:
i want to make a pop out window which appears if a certain customer group is below a certain subtotal amount when they click on proceed to check out. I know how to check if the user is logged in, in a certain customer group and check if they are under a certain amount.

<?php if($login && Mage::getSingleton('customer/session')->getCustomerGroupId()==5)
    {
     if ($sub_total < 75)
    {?>

     <?php echo   "As an special customer you get free delivery on all orders however we do ask if you can try to get your orders up to £75 exc VAT so we can keep our prices competitive";
    }}?>

The bit I do not how know to do is how to display a message and some options in a pop out window when the customer clicks on the proceed to check out button, and don't really know where to start.

If i am not being clear just let me know :)

Thanks if you can help


texts:
I need to override a category that shows a product list in order to discard products with no active catalog rule and show only these products with some discount. Moreover, they should be counted correctly in layered navigation.

Which is the best way to achieve this?


texts: Not getting Customer details on Home Page, Category page

texts:
I am tring to get currently logged in Customer Detail Using below Code

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customerSession = $objectManager->get('Magento\Customer\Model\Session');
$customerData = $customerSession->getCustomer()->getData();
print_r($customerData);

I am Getting desired result on account page /customer/account/, Result as below

Array
(
    [entity_id] => 2
    [website_id] => 1
    [email] => email@example.com
    [group_id] => 1
    [increment_id] =>
    [store_id] => 1
    [created_at] => 2016-07-20 10:22:23
    [updated_at] => 2016-08-08 05:21:25
    [is_active] => 1
    [disable_auto_group_change] => 0
    [created_in] => Default Store View
    [prefix] =>
    [firstname] => Firstname
    [middlename] =>
    [lastname] => Lastname
    [suffix] =>
    [dob] =>
    [password_hash] => 94f205d......
    [rp_token] => f35c6ff1.....
    [rp_token_created_at] => 2016-07-20 10:22:24
    [default_billing] =>
    [default_shipping] =>
    [taxvat] =>
    [confirmation] =>
    [gender] =>
    [failures_num] => 0
    [first_failure] =>
    [lock_expires] =>
)

But not getting correct result on Homepage, category page, product page etc., Result as below

Array (
    [group_id] => 1
)


texts: Magento - implement free shipping at pre-discount price

texts:
Customer gets free shipping if the selling price is more than 50USD.

We currently have an offer on the site for 25% off. We want to offer free shipping at the original price.

As an example, consider I have a product which costs 60USD. Due to this, it qualifies for free shipping, however as the sale-price is less than the free-shipping price, the customer is charged shipping).

Is this even possible in Magento? I can't figure out a way.

Thanks in advance!


texts: Move Paypal Express Checkout button to top of the checkout page in magento 2

texts: I want to move Paypal express checkout button from the payment section to the top of the checkout page in Magento 2.


texts:
I know in email we can use {{var customer.getMarketerName()}} for get and use customer attribute.

But my attribute is an select and above code return id replace text
how I can get attribute text?


texts: Magento 2 REST API add product with category

texts:
I'm adding products with the following way to /rest/V1/products on Magento 2.

How can I add a product to a specific category? I'm using curl to post the data and can see the product added.

    ...

    $setHaders = array('Content-Type:application/json','Authorization:Bearer '.$adminToken);

    $productData = array(
        'sku'               => 'ZZZ simple 1  ' . uniqid(),
        'name'              => 'Simple Product ' . uniqid(),
        'visibility'        => 4, /*'catalog',*/
        'type_id'           => 'simple',
        'price'             => 99.95,
        'status'            => 1,
        'attribute_set_id'  => 4,
        'weight'            => 1,
        'custom_attributes' => array(
            array( 'attribute_code' => 'description', 'value' => 'Simple Description' ),
            array( 'attribute_code' => 'short_description', 'value' => 'Simple  Short Description' ),
            )
    );

    $productData = json_encode(array('product' => $productData));

    $requestURL = "http://192.168.1.225/rest/V1/products";

    $ch = curl_init();
    curl_setopt($ch,CURLOPT_URL, $requestURL);

    curl_setopt($ch,CURLOPT_POSTFIELDS, $productData);

    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_HTTPHEADER, $setHaders);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    if(curl_exec($ch)===false){
        echo "Curl error: " . curl_error($ch)."\n";
    }else{
        $response = curl_exec($ch) ?: "";
    }
    curl_close($ch);

    echo $response;

    ...


texts: How Do I Get Secure Image URLs in Magento

texts:
I ınstalled a Comodo Positive SSL about 3 hours ago.
And i made the changes in admin panel for using https.

But ı have that problem when i changed to https, all images, css and js stop working. And when i see the source of page all these images and css are still comes from http links.
For short front end layout is not shown well. I looked people if they had same problem before, like me but only found irrelevant stuff and basic things to made only pull visitors. This is bad really.

How can i do that?
Site is solempet.com


texts:
I installed Magento 2.1.3 in a2 hosting. After installation I tried to login Admin panel but I failed with a message "You did not sign in correctly or your account is temporarily disabled.". I tried with

php bin/magento magento admin:user:unlock abu` command  and `UPDATE admin_user a SET a.`failures_num` = 0, a.`first_failure` = NULL, a.`lock_expires` = NULL WHERE a.`username` = 'abu'

But I can't login for first time.


texts: How to get shipping price after shipping method has been selected on Magento 1.9?

texts:
I'm trying to get the shipping cost via an observer that is triggered on the event:

checkout_controller_onepage_save_shipping_method

I used this code in Magento 1.7:

$shipping =
Mage::helper('core')->currency($shippingMethod['shipping_amount'],true,false);

but it does not seem to work now (always returns zero).

In addition, the following code:

$total = $quote->getTotals()['grand_total']->getData('value');

returns only the total to be paid without the shipping cost.

Any advice will be much appreciated.


texts: How to place plugin on _getSelect in Price filter category

texts:
I am working with module need customization with category layernavigation
I found class Magento\Catalog\Model\ResourceModel\Layer\Filter\Price has been used in several places. I think it must be very important.  When I look I see more details:

/**
 * @var \Magento\Catalog\Model\Layer
 */
private $layer;

I wonder why $layer property is private? If anyone can short explain what layer is that would be great.

Second I found the function:

/**
 * Retrieve clean select with joined price index table
 *
 * @return \Magento\Framework\DB\Select
 */
protected function _getSelect()
{
 //Alot codes here
}

Is there a way to place plugin on above function, I want to add my code to filter follow my custom attributes and join query to another table ? It is a right place or i visit wrong place.

I don't want use preference in this case if no anymore choice. Override core function maybe very risky in future


texts: Is there any chance to call phtml file into system.xml file?

texts:
Hello,

I have to know that any chance to call phtml file into system.xml if yes then how is it possible?

Thanks.


texts: Custom theme - styles-m.css failed to open stream: No such file or directory

texts:
When setting up a new custom theme that has Magento/blank as a parent, we were able to deploy static assets locally but deploying to our staging site failed with an error.

[Magento\Framework\Exception\FileSystemException]
  Cannot read contents from file "/vagrant/site.dev.vendor.com/www/pub/static/frontend/Vendor/themename/en_US/css/styles-m.css" Warning!file_get_contents(/vagrant/site.dev.vendor.com/www/pub/static/frontend/Vendor/themename/en_US/css/styles-m.css): failed to open stream: No such file or directory

It feels as though the parent theme fallback is not functioning like it should, digging back through the output to php bin/magento setup:static-content:deploy shows that it is failing on a bunch of different less, css, and js files. The final error that comes out just lists styles-m.css.

We had a second developer set up the site in an identical environment as the first, and they also got the error in both production and developer modes.


texts:
I'm trying to implement a notification system on my website. So I'm trying to register a service worker, and I can't seem to make it work.

I've created a module with the following layout :

default.xml

<?xml version="1.0"?>
<page xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <head>

        <script src="[Vendor_Module]::js/main.js"/>

   </head>
</page>

And here's how I'm trying to register my worker (I'm following a tutorial from google) :

main.js

console.log('hello');
if ('serviceWorker' in navigator && 'PushManager' in window) {
    console.log('Service Worker and Push is supported');

    navigator.serviceWorker.register('sw.js')
    .then(function(swReg) {
      console.log('Service Worker is registered', swReg);

      swRegistration = swReg;
    })
    .catch(function(error) {
      console.error('Service Worker Error', error);
    });
  } else {
    console.warn('Push messaging is not supported');
    pushButton.textContent = 'Push Not Supported';
  }

Finally I'm getting this error in the chrome console :

main.js:12 Service Worker Error TypeError: Failed to register a ServiceWorker for scope ('https://mywebsite') with script ('mywebsite/sw.js'): A bad HTTP response code (404) was received when fetching the script.

I'm guessing I'm not providing the right path for the worker. Given my following directory tree, what filepath should I give to register() ?

Vendor/
└── Module/
    ├── etc/
    │   └── module.xml
    ├── view/
    |   └── frontend/
    |       ├── layout/
    |       |   └──default.xml
    |       └── web/
    |           └── js/
    |               ├── main.js
    |               └── sw.js
    └── registration.php

UPDATE :

It works when I give
/pub/static/frontend/Vendor/Theme/fr_FR/Vendor_Module/js/sw.js
to register() but is seems hacky to me ? Is there a better way ?


texts:
A client has a site that offers free shipping over £20 as a delivery method.
However, there are also some discount codes 15% off etc.

The client has a major issue with peoples baskets being £20+ then using a discount code and still qualifying for free delivery.

Is there a way of setting up the free delivery method to only apply to the basket after any coupons are used?

I also thought I could create a free delivery coupon and automatically apply it to the basket and set the priority after any other coupon, but can't seem to figure the rules out, other than giving a flat discount of the delivery cost on basket total.


texts: Not able to export product csv in magento 2.3

texts:
When i try to export csv from backend it get the message "Message is added to queue, wait to get your file soon". but i did not get any file later.
I tried this 4-5 time, same message appears.

what is the issue. Is the file getting saved somewhere into magento directory?


texts: Different products name in the different store views under the same store

texts:
I have my product info translation csv for multi store. I need to change my language for each product name.

What step do I need to take to accomplish this? How can I do this with the import/export tool because there is large number of product available in my magento shop.


texts: Before fill address on checkout page shipping method not showing but after fill address it showing in magento2

texts:
Before fill address on checkout page shipping method not showing and after fill address shipping method showing in magento2

I want to show shipping method every time.
Anyone have solution?

  if address blank then shipping area showing like below

  if address filled then shipping are showing correct like below


texts: For some reason my Magento site blanks out every night. Every morning I have to clear cache through command line for it to come back up. Any ideas why?


texts: Allow customer to choose Ship to Country at any time

texts:
How would I allow my customers to choose their ship to country at any time in the site.

I thought I could do so with this example code but the checkout still defaults to the stores default values (If not logged in, still as guest)

$shippingAddress = Mage::getModel('checkout/cart')->getQuote()->getShippingAddress();
$shippingAddress->setCountryId('GB')->save();
// Great Britain as an example!

The goal is to not have to create a store for every country and to show the customers that we can ship to any country.

The customer will choose from a country select page and then the site would remember the ship to at checkout.

Any guidance would be appreciated.


texts: How to add a search option to catalog (product page)

texts:
I have a column available for the search bar to be placed in but i'm struggling to add a search option.

How do I go about doing this using magento version 1.9.2.3


texts: Customer Edit Account Country Dropdown Issue Magento 2.3

texts:
We have Upgrade Magento 2.2 to 2.3 now I am facing Issues in the customer edit section area.

https://prnt.sc/pwwmsy

In admin Edit Customer we check there dropdown is broken after Brazil country. I have also check all possibilities in General all Country Dropdown and others but not getting any solution.


texts: How do i block my magento extension to use in a unregistered domain

texts:
I am working on magento custom module development and sales. usually i encrypt the extension code and install it on my client's websites so that they cannot re-use the extension in other domains.

Now i am looking for some other method through which i can stop others using my code other than encryption.

I heard about setting up license key to validate user's domain.Can anyone provide me more details or ideas about this.

Thanks in advance!


texts: Magento 2 : Custom phtml file add in product page

texts:
How to add custom .phtml file in product details page.
I also try this code in catalog_product_view.xml file, but can't working.


texts:
I want to see if there is anything exists in the cart if I am in a phtml page

I have tried to use session and cart but I am getting null
When I tried to use session I wasn’t sure how to get the quote ID in order to get cart ID but I don’t know which is the right approach to take
Could anyone help me out with this


texts: How to create custom customer attribute in Magento 2.4.1 and update and get data via REST API

texts: How do I create a custom customer attribute in Magento 2.4.1 and then update that attribute value via REST API and then get the attribute value with all other customer data via REST API?


texts: How to rewrite store view code in Nginx?

texts:
I have some trouble to fix this issue.

I have a Magento 2 installation with two websites and several store views:

https://www.websiteone.com/onenl
https://www.websiteone.com/oneen
https://www.websiteone.com/onede

https://www.websitetwo.com/twonl
https://www.websitetwo.com/twoen
https://www.websiteotwo.com/twode

Magento wants every store view code to be unique, so we've made them unique.

Now I want to rewrite them to shorter urls like:

https://www.websiteone.com/nl
https://www.websitetwo.com/nl

But I'm not able to get it working. I tried several things like:

location /onenl/ {
    try_files $uri $uri/ /index.php?$args;
    rewrite ^onenl/(.*)?$ nl/$1 break;
}

or

location /onenl {
    rewrite ^onenl nl last;
}

I or get a 404 CMS page not found from our base store view. Or I get an nginx 404 not found and in this situation I think he doesn't understand to fire up index.php.

What am I missing? :)

Thanks!


texts: Home page not showing the main content area: Magento

texts:
I am using Athlete Theme on my website: Site was working fine but today when i have checked it is missing the main page content and footer section.

When I directly put all my contents to 1column.phtml template its start showing all the contents. But if Tempalte use <?php echo $this->getChildHtml('content') ?> its stop showing anything on page.

I have tried by changing the template from 1column.phtml to 2column and also checked the style display:none but still no luck:

Here is the URL http://159.203.70.155/

Please help me on this issue thanks


texts: Has Magento newsletter block in 1.9.2.2 changed?

texts:
I updated to 1.9.2.2. from 1.9.1. Now i do not see the newsletter subscription form in footer anymore. In the block i use this:{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}Has this changed in 1.9.2? The text that i also added in that block does appear in footer, just not the form. I use Magemonkey and that is updated to latest version also, but no difference.

SOLVED: In the Magento backend under "System > Permissions > Variables" and "System > Permissions > Blocks" i added newsletter-en and refreshed cache... after that it was visible again in store.


texts: Composer install .zip could not be downloaded

texts:
When I run composer install I get the error message:

[Composer\Downloader\TransportException]
The "https://repo.magento.com/archives/magento/module-invitation/magento-module-invitation-100.3.5.0.zip" file could not be downloaded (HTTP/1.1 404 Not Found)

But I have auth.json in the magento/ directory like https://github.com/magento/magento-cloud says.

{
"http-basic": {
    "repo.magento.com": {
        "username": "xxx",
        "password": "xxx"
}

}
}

I also tried to put the auth.json file in ~/.composer to no avail.
Is there any way to test that my auth keys work? Thanks for the help.


texts: Magento 2 How to pass data from Controller to Block

texts:
I need to send data from controller to Block, I have used many ways but it does not work.
I'm trying this way:

Controller.php

public function execute()
    {

       $order_id = $this->getRequest()->getParam("order_id");
       $order = $this->orderInterface->loadByIncrementId($order_id);
       $pakkeShipment = $order->getPakkeShipment();

        $resultPage = $this->resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->prepend(__(' heading '));

        $block = $resultPage->getLayout()
                ->createBlock('Vendor\Pakke\Block\TrackInfo\TrackingInfo')
                ->setTemplate('Vendor_Pakke::track_info.phtml')
                ->setTrackingInfo($pakkeShipment)
                ->toHtml();
        $this->getResponse()->setBody($block);

    }

Block.php

class TrackingInfo extends Template
{
    public $trackingData;

    public function __construct(
        Template\Context $context,
        array $data = []
    ) {
        parent::__construct($context, $data);
    }

    public function setTrackingInfo($trackingData){
        $this->trackingData = $trackingData;
    }

    public function getTrackingInfo(){
        return $this->trackingData;
    }
}

pakke_index_index.phtml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceContainer name="content">
        <block class="Vendor\Pakke\Block\TrackInfo\TrackingInfo" name="tracking_info" template="Vendor_Pakke::track_info.phtml" />
    </referenceContainer>
</page>

I get an error in this way, I just want to send $pakkeShipment to setTrackingInfo() so I can use the method getTrackingInfo(); in my phtml.


texts:
I recently fell into an interesting argument.

My question is when should we use the local codepool to completely overwrite a class and when should we use Magento class overrides extending a class.

What are the pros and cons of using local copy over rewriting a class.


texts: How to skip some column to write csv data

texts:
I would like to skip some column to write data in CSV when it generate.

Here is my code to generate CSV in magento.

it would be start writing from column no 20 for first row only then continue with first column.

$csv = new Varien_File_Csv();
    $csvdata = array();
    /* genereate header */
    $csvdata[] = $this->getCsvColumn();

    $path = Mage::getBaseDir() . DS . 'exportmodel';
    if (!is_dir($path)) {
    $ioAdapter = new Varien_Io_File();
    $ioAdapter->mkdir($path, 0775);
     }
    $csv->setLineLength(1000);
    $csv->setDelimiter(';');
    $csv->setEnclosure('"');
    $file = $path . DS . 'importmodel.csv';
    $csv->saveData($file, $csvdata);


texts:
I have this code.

<a href="#" id="linkId" onclick="popWin('<?php echo $this->helper('shipping')->getTrackingPopUpUrlByOrderId(100000019) ?>','trackshipment','width=800,height=600,resizable=yes,scrollbars=yes')" title="<?php echo $this->__('Track this shipment') ?>"><?php echo $this->__('Track this shipment') ?>

It is supposed to open a popup with tracking details. But its not working. Can someone tell me whats wrong?

Please note 100000019 is my order id


texts: Magento 2: move mini-login dropdown to home page (header)

texts:
There is a mini login form on the checkout page.

How can I move it to the header so it displays on every page?


texts: What are immutable data objects (with examples) in Magento-2?

texts:
According to dev document there are no setter methods in data interfaces.

but in application almost every data interface contain setters also. There is no clarity on data interfaces.

According wikipedia an immutable object is an object whose state cannot be modified after it is created.
So what objects comes under the category of immutable?

I hope some one will update devdocs properly.

If any one has some knowledge on above things can you give some examples?

It's really tough to understand all new patterns in magento2. Someone should share their knowledge in devdocs otherwise every one fears to see the code.


texts:
I have to make a method to send my login and password to a website and get the xml it returns, its gonna be a list of products. What would be the best way? My options are: SOAP 1.1, SOAP 1.2, GET and POST?
Also, how could I read the xml it returns?


texts: Get a list of all blocks with their names

texts:
I'm trying to find a way to get a list of all magento 1.9 blocks with their names programmatically.

I.e:

$blocks= [
    'core/text_tag_css_admin' => 'Mage_Core_Block_Text_Tag_Css_Admin',
    'core/text_list_item' => 'Mage_Core_Block_Text_List_Item',
    'core/text_list_link' => 'Mage_Core_Block_Text_List_Link',
]

I searched but I haven't found anything on how to approach this problem.

Here's the code I have so far in case it will help someone else.

        public function toOptionArray()
        {
            /**
             * @var $blocks Mage_Core_Model_Config_Element
             */
            $blocks = Mage::getConfig()->getNode('global/blocks')->asArray();

            $classes = [];
            $options = [];
            $realClasses = [];

            foreach ($blocks as $key => $value) {
                $classes[$key] = $value['class'];
            }

            foreach ($classes as $key => $class) {
                $classKeys = explode('_', $class);
                $moduleDir = Mage::getModuleDir('', $classKeys[0] . '_' . $classKeys[1]);
                $moduleDir = $moduleDir . DS . $classKeys[2];
                if (empty($moduleDir))
                    continue;
                $files = [];
                $files = $this->listFIles($moduleDir);
                $relativeClasses = $this->getRelativeClasses($files, $moduleDir);
                foreach ($relativeClasses as $relativeClass) {
                    $realClass = $class . $relativeClass;
                    $realClasses[] = $realClass;
                }
            }

            $result = [];
            sort($realClasses);
        //TODO: Eliminate abstract classes
        foreach ($realClasses as $realClass) {
            try {
                //throws fatal error so can't be caught
                $r = new ReflectionClass($realClass);
            } catch (Exception $e) {

            }
            if (isset($r) && !$r->isAbstract())
                $result[] = array('value' => $realClass, 'label' => $realClass);
        }
        return $result;

        }

        protected function getRelativeClasses($files, $moduleDir)
        {
            if (empty($files) || !file_exists($moduleDir))
                return [];
            $classes = [];
            foreach ($files as $file) {
                $filePath = $file->getPathname();
                $relativeClassPath = str_replace($moduleDir, '', $filePath);
                $relativeClassPath = str_replace('.php', '', $relativeClassPath);
                $relativeClassPath = str_replace(DS, '_', $relativeClassPath);
                $classes[] = $relativeClassPath;
            }

            return $classes;
        }

        protected function listFIles($dir)
        {
            if (!file_exists($dir))
                return [];
            $files = [];
            $di = new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS);
            $it = new RecursiveIteratorIterator($di);

            foreach ($it as $file) {
                if (pathinfo($file, PATHINFO_EXTENSION) == "php") {
                    $files[] = $file;
                }
            }
            return $files;
        }


texts: Error message for email and confirm email validation

texts:
I have 2 fields in form .

1.user email
2.confirm email.

If I fill on user email field and moved to confirm email field then enter wrong email i.e; not same as user email, it is showing error "both emails should be same" so in this scenario, it is corect.

other scenario

If I fill on user email field and moved to confirm email field then enter same as user email then edit user name to some other name but it is not showing error message

I need error message on this scenario as well

    <input
       name="useremail"
       id="useremail"
       title="<?php echo $this->__('User Email') ?>"
       value="" class="input-text required-entry validate-email"                   type="text" />

    <input
       type="text"
       name="confirm_email"
       id="confirm_email"
       title="<?php echo $this->__('Confirm Email') ?>"
       class="input-text required-entry validate-cemail"
       value="" onpaste="return false;" />


texts:
I am getting a 503 Error randomly on my site with "Area Code is Not Set" I have not been able to track it down as it appears to be at random. The only way I can consistently get it to happen is to open 10-20 links at the same time, at least one of those pages will have the error.

The stack trace is not the same as far as I can tell between when the error is thrown that would narrow it down to an extension. Error Log here and here.

Also running "php bin/magento config:show" returns an area code not set error, none of the other CLI commands seem to do that though.

ENV: PHP 7.0.32, Nginx 1.10.2, Magento 2.2.5


texts:
We have created a Website with Magento 2.2.3. The page-speed score of our website is too low. We have already have the followings with our website:

Full Page Cache
Varnish Cache
Minify HTML and CSS
Image Optimizer
Memcache

Apart from the above, we are running our site in the Production mode. Though we have all the above said points with our site, the Page-speed score is too low. Please see the attached screenshot which is taken from GTmetrix.

I have followed the suggestions provided by GTmetrix but still the score is low.

Please comment with your suggestion to get better Page-speed score.

Thanks,


texts:
having this code:

$this->helper('catalog/image')->init($_product, 'slider_img')->resize(400,300)

how to check if the 'slider_img' exists?


texts: Magento 1.9.2 SUPEE-9652 Patch Admin image issue

texts:
I had downloaded SUPEE-9652  patch  and applied via command prompt,
It applied successfully but,
after applied the product image does not appear in admin grid,

how ever product image shows fine on front end.
Is there a way to fix or revert patch?

I tried to flush cache, Index management but no luck


texts: Multiple website search problems.PLZ HELP

texts:
I set up multiple websites (parked domain method) and the default website works perfectly. However, when I test the second website. The search function is not working, it always redirect into the current page without loading the search result(Eg. If I click search at the homepage it will go homepage or if I click search at the about us page then it will go to about us page)

I used Magento1.9.2.4 free template from template monster. This template uses cmsmart extension for doing the search. There are two kinds of search method. One is typing the keyword in the input text box and clicking the search button(This one works), the other is selecting the category type in the select box and then clicking the search button.(This one doesn't work)

The domain name we used is as following:

www.aricare.com.au(working one with the search)
www.shavingclub.com.au(not working one with the search when selecting the category from the select box and then clicking the search button)

Is it a redirect issue? I tried .htaccess and index.php separately but still can't fix the issue. （everything works fine except the second website's ajax search function）
－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－ －－－－－－－
.htaccess setting

RewriteBase /welcome/
RewriteCond %{HTTP_HOST} ^(.*)shavingclub.com.au
RewriteRule ^ - [E=MAGE_RUN_CODE:shavingclub]
－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－ －－－－－－－
index.php

switch($_SERVER['HTTP_HOST']) {

// shavingclub.com.au
case 'shavingclub.com.au':
case 'www.shavingclub.com.au':
Mage::run('shavingclub', 'website');
break;

// Mainstore.com (default store)
default:
Mage::run($mageRunCode, $mageRunType);
break;
}

Will it be a parameter lost issue? When I search at the default website, the url will be sth like "http://www.aricare.com.au/welcome/catalogsearch/result/?search_categories[]=103&q="
However, when I search at the second website the above url is not showing in the browser.

PLZ HELP. Thank you in advance.


texts: How to save data in DB with a form using Varien_Object?

texts:
I need to save all the data that comes from the form, plus a few additional fields of type (user_id, created_at, etc...).
How do i do it through Varien_Object ?

 public function postAction()
{
    $paths = 'RonisBT_Feedback_Model_Source_Paths';

    $post = $this->getRequest()->getPost();
    if ($post) {

        $name = $this->getRequest()->getPost('name');
        $email = $this->getRequest()->getPost('email');
        $user_agent = Mage::helper('core/http')->getHttpUserAgent();
        $remote_ip = Mage::helper('core/http')->getRemoteAddr();
        $subject = $this->getRequest()->getPost('subject');
        $other_subject = $this->getRequest()->getPost('other');
        $message = $this->getRequest()->getPost('message');
        $created_at = Mage::getModel('core/date')->date('Y-m-d H:i:s');

        $translate = Mage::getSingleton('core/translate');
        /* @var $translate Mage_Core_Model_Translate */
        $translate->setTranslateInline(false);
        try {
            $validate = Mage::getModel('feedback/validation')->validation_form($name, $message, $subject, $email);
            if ($validate === true) {
                $captcha = Mage::getModel('feedback/captcha')->check_captcha();
                if ($captcha === true) {
            $data = array(
                'user_agent' => $user_agent,
                'remote_ip' => $remote_ip,
                'created_at' => $created_at,
            );
            $post = array_merge($post, $data);
            $postObject = Mage::getModel('feedback/block');
            $postObject->setData($post);
            $postObject->save();

As you think it is normal that you used array merge?

Ressource model

<?php
class RonisBT_Feedback_Model_Resource_Block extends Mage_Core_Model_Mysql4_Abstract{
    public function _construct()
    {
        $this->_init('feedback/block', 'feedback_id');
    }
}


texts:
Got the below error while updating the catalog configuration.

  Something went wrong while saving this configuration: SQLSTATE[42S02]:
  Base table or view not found: 1146 Table 'dbname.url_rewrite' doesn't
  exist, query was: UPDATE url_rewrite SET request_path = ? WHERE
  (url_rewrite_id = 62)

One thing I noticed is the table shown in the error doesn't have the table prefix. This is a migrated website from Magento 1.9.1.0 and we use table prefix.

Am I doing something wrong? or is this a core issue?

Update: I guess it is a bug.  I just removed the prefix for url_rewrite table alone and the save works great.  But after save it throws a similar error for SELECT.

Steps I followed

Login to admin back-end
Click on Stores -> Configuration
click on Catalog -> Catalog
Open Search Engine Optimization
Remove the .html suffix for both product and category
hit Save
I see the above error

What I did next

I login to my phpMyAdmin
Renamed the table by removing the mag_ prefix for url_rewrite table
I flushed the cache in another browser and hit save in the current browser
Now the save works but when the page refreshed it shows the table mag_url_rewite doesn't exist.

It looks clearly a bug for me... Sorry if I might be wrong...


texts: Magento enabling compilation error : need permanent solution

texts:
i was tried to enable compilation and got error. And admin & frontend was not accessable.

its happens with me many time on different site. and then i disable compiler from code.

i made comment below given code in path 'includes/config.php'

#define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src');

But its look ilke temporary solution. want to know why its happen. i mean what if i want to enable compiler. ?

error was

magento Fatal error: require_once(): Failed opening required public_html/medomain/includes/src/../lib/vendor/autoload.php

Even i am not enabling it directly just tried to compile it getting this error.

https://www.dropbox.com/s/gjij44tmrcfff01/Screenshot%202016-10-03%2017.24.52.png?dl=0


texts: magento 2.3.2 - tab not showing in product page because override Magento_PageBuilder

texts: magento 2.3.2 tab not showing in product page , because override Magento_PageBuilder. page layout . how to fix this ?