texts: Why my admin page not loading a blank page?

texts:
I generally try and solve problems without soliciting help, but in this case, I'm starting to go around in circles. A lifeline would be appreciated.
I'm installing Mag24 in a VM with Debian10, Apache2.4, PHP 7.4, MariaDB10.4.
For reference, I successfully set up Mag23 in a similar VM. It was not without its challenges, but I was able to work through those. I verified ElasticSearch works. I set up a Magento24 directory under /var/www, and changed the owner to mike (with group www-data). I use sudo -u mike bin/magento to install. After multiple attempts, I'm still getting a blank admin page.
I'm really stuck here, so a lifeline would be appreciated. Thanks.


texts: I have installed Magento 1.9.1.0 with RWD theme with sample data. But only a menu item (Tags) have disappeared from the Catalog menu in the admin panel.


texts: Different PHP-FPM Pools for frontend and backend using Apache2

texts:
I found this article teaching how to create two different php-fpm pools from magento frontend and backend using nginx.

My question is: is it possible to do this using Apache2?

Thanks in advance.


texts:
I have field in dynamicRows:
<field name="on" component="Magento_Catalog/js/form/element/checkbox" sortOrder="0" formElement="checkbox">
                    <argument name="data" xsi:type="array">
                        <item name="config" xsi:type="array">
                            <item name="prefixElementName" xsi:type="string">option_</item>
                            <item name="inputCheckBoxName" xsi:type="string">default</item>
                            <item name="isMultiple" xsi:type="boolean">true</item>
                            <item name="value" xsi:type="string">1</item>
                            <item name="columnsHeaderClasses" xsi:type="string">control-table-options-th</item>
                            <item name="modules" xsi:type="array">
                                <item name="rows" xsi:type="string">ns = ${ $.ns }, index = options</item>
                            </item>
                        </item>
                    </argument>
                    <settings>
                        <additionalClasses>
                            <class name="control-table-options-cell">true</class>
                        </additionalClasses>
                        <dataType>boolean</dataType>
                        <label translate="true">Is Enable?</label>
                    </settings>
                </field>

How I can set unique value?
ty for answer


texts: Connect Manager shows no update, how to upgrade manually?

texts:
I want to upgrade my Magento installation from 1.9.2.4 to 1.9.3.2, and all online resources tell me it should be done through the Connect Manager. But the Connect Manager doesn't show an update on Mage_All_Latest. And documentation on how to upgrade using the bzip2 package I cannot find.

Any help on either fixing the Connect Manager, or installing 1.9.3.2 manually?


texts: How can I remove all the url rewrites in Magento 2 and then re-create them? Can I empty the table and then re-import the product url's via default product import? Is that safe?


texts: Magento 2 : Expected HIT on the second page load after product price update while Marketplace submission

texts:
I am trying to submit an extension to Magento marketplace but Magento team reported below issue in their test report:

  Expected HIT on the second page load. Expected HIT on the second page
  load after product price update.

  {"command":"Varnish PageCache Test","output":{"Expected HIT on the
  second page load.":["http://magento.local/simple-product-1.html
  page doesn't contain HIT in cache
  header.","http://magento.local/simple-product-2.html page doesn't
  contain HIT in cache
  header.","http://magento.local/simple-product-3.html page doesn't
  contain HIT in cache header.","http://magento.local/category-1.html
  page doesn't contain HIT in cache
  header.","http://magento.local/category-2.html page doesn't contain
  HIT in cache header.","http://magento.local/ page doesn't contain
  HIT in cache header."],"Expected HIT on the second page load after
  product price update.":["http://magento.local/simple-product-1.html
  page doesn't contain HIT in cache
  header.","http://magento.local/simple-product-3.html page doesn't
  contain HIT in cache header."]}

I checked for similar issues, tried their solutions and confirmed that I am not using cacheable="false" in xml and $this->_isScopePrivate = true anywhere in my code/Blocks.

I am not sure what exactly to add to get the package be successfully validated at Magento Marketplace. Please help me if someone have any idea on it.


texts:
I am wondering if it is safe to change a magento database collation
  from utf-8 general_ci to utf-8 unicode_ci.

I can do it from phpmyadmin or directly in mysql...
I just don't know if it is safe for magento. Will it work after or will create problems?

The reason I want to do this is that I am having some strange problems.

For example after migration from magento 1 I noticed that some attributes didn't appeared in layered navigation although they was filtered with results.

With further examination in database the attributes were fine and set in the products. But magento in frond end returned them empty so empty filter not appears in layered.

I am using two different store views. Two languages. So when I resaved a product in admin without changing anything then filters with attributes appeared in layered. This didn't happened with all filters. Just with those which didn't worked.

This happened with magento 2.3 version. Fixed with a script I made and resaved all products in all store views...This fixed the whole catalog filters.

But now when upgrade to 2.3.1 I lost in frontend from some products the custom options. All products in admin had custom option but in frontend didn't appeared.

When resaved the products everything came up again.

So I don't have a clue why this is happening and I thinking to change database collation.

Anybody has ideas please?


texts: Magento 2 How to remove billing address?

texts: My site does not need billing address. How to remove the billing address fields around the Magento? Thanks.


texts: I have following problem: In my case i have to override my grouped.phtml file BUT not for every group product. Is it possible to have multiple grouped.phtml files and that i can choose witch of them should be loaded for witch site?


texts: Magento 2: Inline edit in a Grid showing 503 error

texts:
Working on inline edit showing 503 error, can't find it out.

in view/adminhtml/ui_component/product_index_listing.xml file for inline edit added below code

<item name="editorConfig" xsi:type="array">
    <item name="selectProvider" xsi:type="string">product_index_listing.product_index_listing.product_columns.ids</item>
    <item name="enabled" xsi:type="boolean">true</item>
    <item name="indexField" xsi:type="string">product_id</item>
    <item name="clientConfig" xsi:type="array">
        <item name="saveUrl" xsi:type="url" path="product/index/inlineEdit"/>
        <item name="validateBeforeSave" xsi:type="boolean">false</item>
    </item>
</item>


texts: Magento 2 : Order status getting Suspected froud using paytm

texts:
I getting response txn_failure. but when i use stating credentials it's working fine.
i am using Magento 2.3.2 with varnish and PHP 7.1 version ..


texts:
I used flexslider for product image gallery

Issue: mobile scroll is not working over the image  but scroll is working in empty space or below the image

below code is sample html


texts: How to remove **A** sign in price of australia currency in Magento 2

texts: I want to remove A sign before dollar sign.I setup Australian Dollar currency in Magento2


texts: How to insert data in `catalog_category_product`?

texts: I want to insert from magento Controller values to catalog_category_product. How do I get the model?


texts:
What is the best way to Collection of all configurable products (which has children) with sku using script?

How to do that?


texts: I have product or a collection of around 18000 products who are assigned to different stores. I need to unset some of them(not too less), from 1 or 2 of these stores. Is there a way I can make a script to unset Store id programmatically.


texts: How to load Custom Block .phml file from an Overrided admin controller?

texts:
I have override an adminhtml controller Mage_Adminhtml_System_ConfigController.
I am trying to load a .phtml file from one of my Custom module as like below

$block = Mage::app()->getLayout()->createBlock('custommodule/blockname')->setTemplate('custommodule/file.phtml');

$html = $block->getHtml();

But since i am in an Admin controller, the system tries to setTemplate in under

adminhtml/default/default/template/custommodule/file.phtml

But the file i want to load is under

frontend/default/default/template/custommodule/file.phtml

The system throws error like, the template path does not exists.
I am aware that this is happening since we are in an admin controller, and
the system tries to load the admin layout file. Trying to see the possibility
of doing this.

Suggest me a solution.

Note : This code works well when i call it from a front end controller.

Thanks


texts: HTTP ERROR 500 when using require(_once) app/Mage.php

texts:
(Edit: The first line went missing, just the greetings)
Hello guys!
I'm both new to Stack Exchange and relatively new to Magento.

What I want to do:

Use a self-written JQuery Script to get the ID of a currently selected Simple Product (which is the child of a Configurable Product), call a PHP-File to load the stock-quantity of this product and read it into JQuery again.

However, when trying to call the PHP-File, I get a Internal server error - when trying to open the file directly, I get the HTTP Error 500 (both should be the same as far as I know).

What I have

My current JQuery (the part using Ajax) (update.js):

function getQuantity(productId){
    if (productId === null)
    {
        Qty = 0;
    }
    else
    {
        var simpleIdJSON = '[{"simpleIdJSON":"' + productId + '"}]';
        $j.ajax({
            url: '/js/stock/qty.php',
            type: "POST",
            dataType: 'json',
            data: simpleIdJSON,
            success: function(data){
                alert(data)
            },
            failure: function(msg){
                alert(msg)
            },
            error: function(xhr, status, error) {
                alert(error);
            }
        });
    }
}

My current PHP (qty.php):

<?php
    //load and build up Mage
    require_once 'app/Mage.php';
    umask(0);
    Mage::app('default');
    Mage::setIsDeveloperMode(true);
    Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

    //get the data of the chosen product
    $model = Mage::getModel('catalog/product');
    $productId = $_POST['simpleIdJSON'];
    $_product = $model->load($productId);

    //get the quantity of the chosen product and return it
    $qty = (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();
    echo json_encode($qty);
?>

I don't receive any Error when I delete every content from qty.php, while the errors are already comming up when using both require_once 'app/Mage.php' or require 'app/Mage.php' and also tried altering the path using /app.., ../app.., /../app.. and ../../app... The path to the JQuery and PHP files is: ROOT/js/stock/.
I do not think it has anything to do with the Path itself, but rather the way I try to get the Classes.
If anyone could tell me what (possibly stupid) mistake I'm making, I would be very happy. Criticism, especially about this post (which I would then edit), are welcomed.


texts: Special price product in product collection magento2

texts: How do I get products with special price rule (for logged in customer group as well as overall) in product collection?


texts: Magento vs Constant Contact for Email marketing

texts: Are there any disadvantage in using Magento to send my newsletter and other emails to my list vs contant contact?


texts: Hello How to Override pub/errors/default/503.phtml into my custom module Magento Version 2.1.10


texts: Replacement of Zend_Barcode in Magento 2.3.x

texts:
I have upgraded my Magento from Magento 2.2.7 to Magento 2.3.2 version. In my custom module, I used:

\Zend_Barcode::factory() function, but as per https://devdocs.magento.com/guides/v2.3/release-notes/backward-incompatible-changes/, the library Zend_Barcode has been removed.

Can anyone help me to find replacement of this library?

Thanks in advance.


texts:
I try to reindex my Magento Cloud and caught below error. Anyone whats wrong with the ElasticSuite

web@mymagento.0:~$ php bin/magento indexer:reindex
Design Config Grid index has been rebuilt successfully in 00:00:01
Customer Grid index has been rebuilt successfully in 00:00:01
Category Products index has been rebuilt successfully in 00:00:03
Product Categories index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:01
Product EAV index has been rebuilt successfully in 00:00:04
Stock index has been rebuilt successfully in 00:00:01
Inventory index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Product/Target Rule index has been rebuilt successfully in 00:00:00
Target Rule/Product index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:05
Google Product Removal Feed index has been rebuilt successfully in 00:00:00
Google Product Feed index has been rebuilt successfully in 00:00:00
Sales Rule index has been rebuilt successfully in 00:00:00
PHP Fatal error:  Uncaught Error: Wrong parameters for Elasticsearch\Common\Exce     ptions\ServerErrorResponseException([string $message [, long $code [, Throwable      $previous = NULL]]]) in /app/vendor/elasticsearch/elasticsearch/src/Elasticsearc     h/Connections/Connection.php:682
Stack trace:
#0 /app/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connect     ion.php(682): Exception->__construct(NULL, 503)
#1 /app/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connect     ion.php(298): Elasticsearch\Connections\Connection->process5xxError(Array, Array     , Array)
#2 /app/vendor/react/promise/src/FulfilledPromise.php(25): Elasticsearch\Connect     ions\Connection->Elasticsearch\Connections\{closure}(Array)
#3 /app/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React     \Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)
#4 /app/vendor/guzzlehttp/ringphp/src/Core.php(341): GuzzleHttp\Ring\Future\Comp     letedFutureValue->then(Object(Closure), NULL, NULL)
#5 /app/vendor/elasticsearch/elasticsearch/src in /app/vendor/elasticsearch/elas     ticsearch/src/Elasticsearch/Connections/Connection.php on line 682

Fatal error: Uncaught Error: Wrong parameters for Elasticsearch\Common\Exception     s\ServerErrorResponseException([string $message [, long $code [, Throwable $prev     ious = NULL]]]) in /app/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Con     nections/Connection.php:682
Stack trace:
#0 /app/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connect     ion.php(682): Exception->__construct(NULL, 503)
#1 /app/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connect     ion.php(298): Elasticsearch\Connections\Connection->process5xxError(Array, Array     , Array)
#2 /app/vendor/react/promise/src/FulfilledPromise.php(25): Elasticsearch\Connect     ions\Connection->Elasticsearch\Connections\{closure}(Array)
#3 /app/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React     \Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)
#4 /app/vendor/guzzlehttp/ringphp/src/Core.php(341): GuzzleHttp\Ring\Future\Comp     letedFutureValue->then(Object(Closure), NULL, NULL)
#5 /app/vendor/elasticsearch/elasticsearch/src in /app/vendor/elasticsearch/elas     ticsearch/src/Elasticsearch/Connections/Connection.php on line 682
web@mymagento.0:~$


texts:
I have created a custom theme and a custom module. The documentation does not explain enough detail about whether I need a theme or a module or both.

Does a custom theme need a custom module? Do I need both? Can I have a custom module and store the custom theme within the custom modules directory? If I have a custom module does the Magento functions/tools for cart etc. need to be stored within the modules directory?

Any clarification would help as I feel like I am going in circles.


texts: Magento 1 to Magento 2 Data Migration - migrate:data General error: 1419

texts:
I've got a problem with migrating data from Magento 1.9.4.2 to Magento 2.3.2 in migrate:data.

In step: Stage I've got General error 1419 and I don't know how to fix it.


texts:
In my project, what I did is copied all the layouts and template files of base/default to my new theme folder default/efk.

After that, I made many changes in some layout and template files as needed.

My project is somewhat different from the default magento. In my project, I have configurable products in which each consists of 3 types of simple products.

Now, if any of the single simple product is out of stock, then I need to show "Sign up to get notified when this product is back in stock" as shown in default magento.

When I did some research I figured it out that this link is coming from the phtml line

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

I added the same line in my project in template/catalog/product/view.phtml, but I can't see the "Sign up to get notified when this product is back in stock".

PS: The reference of the block "alert_urls" are not changed. They are same as they are in default magento but in my theme folder instead.

EDIT:

The flow as I understand magento is as follows:

layout/catalog.xml (the block location)

    <catalog_product_view translate="label">
        <reference name="content">
            <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
                <block type="core/text_list" name="alert.urls" as="alert_urls" translate="label">
                Alert Urls
                </block>

         //some other blocks

layout/productalert.xml (the block reference location)

<layout version="0.1.0">
    <catalog_product_view>
        <reference name="content">
            <reference name="product.info">
                <reference name="alert.urls">
                    <block type="productalert/product_view" name="productalert.price" as="productalert_price" template="productalert/product/view.phtml">
                        <action method="preparePriceAlertData"/>
                        <action method="setHtmlClass"><value>alert-price link-price-alert</value></action>
                        <action method="setSignupLabel" translate="value"><value>Sign up for price alert</value></action>
                    </block>
                    <block type="productalert/product_view" name="productalert.stock" as="productalert_stock" template="productalert/product/view.phtml">
                        <action method="prepareStockAlertData"/>
                        <action method="setHtmlClass"><value>alert-stock link-stock-alert</value></action>
                        <action method="setSignupLabel" translate="value"><value>Sign up to get notified when this product is back in stock</value></action>
                    </block>
                </reference>
            </reference>
        </reference>
    </catalog_product_view>
</layout>

productalert/product/view.phtml (the block's template -- Stock)

<?php /* @var $this Mage_ProductAlert_Block_Product_View */?>

Hello

<p class="<?php echo $this->getHtmlClass() ?>">
    <a href="<?php echo $this->escapeHtml($this->getSignupUrl()) ?>" title="<?php echo $this->escapeHtml($this->__($this->getSignupLabel())); ?>"><?php echo $this->escapeHtml($this->__($this->getSignupLabel())); ?>

Here is the screenshot:


texts: How i can create custom filter grid in front end magento 2

texts:
i want to create custom filter in front end

how can copy the back end grid and filter for  front end

with working like back end filter ???

how i can code this

any ideas.....


texts: In magento 2, How to use inbuild PHPunit testing tool for jenkins

texts: I am working on magento 2 project. I am using Jenkins as continuous integration tool. How can I use Jenkins for PHP unit testing for Magento 2. I know Magento 2 has inbuilt tool for unit testing. How can I use this inbuilt testing tool with jerkins.


texts: Observer\DOMDocument' not found when use new DOMDocument() in Obeserver

texts:
I am calling api in the Obeserver file. After this load xml data of response i am using

$doc = new DOMDocument();
$doc->loadXML($response);

But i am getting Fatal Error: Class 'PackageName\ModuleName\Observer\DOMDocument' not found in

Please provide me some solution.


texts: Creating Product Programtically results empty Product name

texts:
If Registered user click on button, we are creating Product Programatically. but when guest user click on button , its creating product with empty product name

button :

<button  onclick="return setproductlogin(\'<?php echo
Mage::registry("current_product")->getId()?>\',
event);setrequestlogin();"
id="submit-editorApply-{{rand}}" >SAVE DESIGN</button>

controllers

protected function _createProduct($type, $doSave=true, $originalProduct, $newImagePath="")
{
        $product = Mage::getModel('catalog/product');

        $product->setName($originalProduct->getName());
        $product->setDescription('what ever you need here');

        $customerId = Mage::getSingleton('customer/session')->getCustomerId();
        $product->setCreatedByCustomerId($customerId);

        if ($doSave)
            $product->save();

        return $product;
    }

I tried below code, but didt worked for me

if($_category instanceof Mage_Catalog_Model_Category && $_category->getId()):

        $product->setName($originalProduct->getName());

        endif;

full controllers : https://pastebin.com/Gn6iMwug

Edit

when Registered user upload image or text and click on "Save Design" button in link , than Product creating with "Product Name".

When Guest user upload image or text and click on "Save Design" button in link , it will ask to login, once Guest login/register , Product is creating with empty Product name

After clicking save design, it redirect to another page :


texts: Add caption or helper text to admin filter in magento 2

texts:
I added a filter in my admin panel. But i want to add a helper text before or after the input field.
Like the 'more information about...' in this screenshot:

Right now the field config I have is below, but neither caption or placeholder are showing:
I can't find any config options for adding a filter like this. Is this possible?
<column name="country_id" class="IWD\StoreLocator\Ui\Component\Listing\Column\Country">
            <argument name="data" xsi:type="array">
                <item name="js_config" xsi:type="array">
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
                </item>
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="align" xsi:type="string">left</item>
                    <item name="label" xsi:type="string" translate="true">Country</item>
                    <item name="caption" xsi:type="string" translate="true">US, GB, BE, FR ...</item>
                    <item name="placeholder" xsi:type="string">US, GB, BE, FR ...</item>
                </item>
            </argument>
        </column>


texts:
I want to make api calls from a c# script but i have no idea where to start. Can somebody please help me?
I searched and found this: https://github.com/nickvane/Magento-RestApi but i dont think it works with magento 2.


texts: how to exclude some image from product gallery on front end

texts:
I am getting all the product images programmatically to create a banner slider from all of them, right now it is showing all the images that are uploaded from the admin to the specific product.

<?php $galleryData = $product->getData('media_gallery');
       $galleries = $galleryData['images'];
         $_media = Mage::getBaseUrl('media');
             foreach($galleries as $gal_images){ ?>
                <?php echo $all_I_mages =  $_media.'catalog/product'.$gal_images['file']; ?>
                    <div style="background-image:url(<?php echo $all_I_mages ?>);  background-position: center center;  background-repeat: no-repeat;
background-size: auto auto; background-color: #efefef; " >
                    </div>
             <?php   } ?>

Now i want to exclude some of the images from this array for example i dont want to include "small image" , "thumbnail" , and "base image"

can anyone guide what check i need to apply to solve this issue


texts: Magento Bundle Product Price Different in Product View Page and Search Result Page

texts:
I have search the bundle product in my site.

That bundle product shown price is "As low as: £783.00" in that search result page.

Then I clicked that bundle product it goes to the product view page.

That page shown price is "As low as: £461.25".

I have enabled the path hintes both page the product price render below Block and Template :

  Block : Mage_Bundle_Block_Catalog_Product_Price

  Template : frontend/[XXX]/[YYY]/template/bundle/catalog/product/price.phtml

Why is the price shown differently?

Screen Shot - 1 : Product View Page :

Screen Shot - 2 : Search Result Page :


texts: Update Mini Cart After Free Product Add Magento 2

texts:
I made a module for free product like if Cart Subtotal is above $600 then a product programmatically add to cart, for this I made an event called checkout_cart_add_product_complete, so when I add product in cart it check if Cart Subtotal is greater then $600 then a free product is added to the cart BUT the problem is that when I add product, Mini Cart count display it as only 1 item in cart but inside mini cart there are 2 item...

Here is how I'm adding free product:
<?php

namespace Hotairtools\RequestPricing\Observer;

class UpdateFreeProduct implements \Magento\Framework\Event\ObserverInterface
{
    protected $_productRepository;
    protected $_cart;
    protected $_formKey;
    protected $_scopeConfig;
    protected $_checkoutSession;

    public function __construct(
        \Magento\Catalog\Model\ProductRepository $productRepository,
        \Magento\Checkout\Model\Cart $cart,
        \Magento\Framework\Data\Form\FormKey $formKey,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Magento\Checkout\Model\Session $checkoutSession,
        \Magento\Quote\Model\QuoteRepository $quoteRepository
    ) {
        $this->_productRepository = $productRepository;
        $this->_cart              = $cart;
        $this->_scopeConfig       = $scopeConfig;
        $this->_checkoutSession   = $checkoutSession;
        $this->_formKey           = $formKey;
        $this->_quoteRepository   = $quoteRepository;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;
        //$item = $observer->getEvent()->getData('quote_item');
        $enableSetting =  $this->_scopeConfig->getValue('freesetting/freesetting/enable');
        $freeProductIds =  $this->_scopeConfig->getValue('freesetting/freesetting/productid', $storeScope);
        $amount =  $this->_scopeConfig->getValue('freesetting/freesetting/amount', $storeScope);
        // $product = $observer->getEvent()->getData();
        //if($product){
        $cartItems = $this->_cart->getQuote()->getAllItems();
        $cartProductIds = [];
        foreach ($cartItems as $cartItem) {
            $cartProductIds[] = $cartItem->getProduct()->getId();
        }
        $subTotal = $this->_checkoutSession->getQuote()->getSubtotal();

        if ($subTotal > $amount && $enableSetting == '1') {
            if (!in_array($freeProductIds, $cartProductIds)) {
                $params = [
                    'form_key' => $this->_formKey->getFormKey(),
                    'product' => $freeProductIds,
                    'qty' => 1
                ];
                $_product = $this->_productRepository->getById($freeProductIds);
                //echo "<pre/>"; print_r($_product->getData()); exit;
                $_product->setPrice(0);
                $this->_cart->addProduct($_product, $params);
                $this->_cart->saveQuote();
                $this->_cart->save();
            }

            /* update price */
            $quote = $this->_checkoutSession->getQuote();
            foreach ($quote->getAllVisibleItems() as $itemq) {
                if ($itemq->getProduct()->getId() == $freeProductIds) {
                        $itemq->setQty(0);
                        $itemq->setCustomPrice(0);
                        $itemq->setOriginalCustomPrice(0);
                        $itemq->setRowTotal(0);
                        $itemq->getProduct()->setIsSuperMode(true);
                        $itemq->save();
                }
            }
            $quote->save();
        /* updtae price over */
        }


texts:
I'm new to magento, I'm rewrite the Mage_Shipping_Model_Carrier_Abstract class. But it's not calling?

my code is:

config.xml

....
 <models>
<shipping>
                <rewrite>
                    <carrier_abstract>Easylife_ThirdParty_Model_Carrier_Abstract</carrier_abstract>
                </rewrite>
            </shipping>
 </models>
..

//abstract.php

<?php

class Easylife_ThirdParty_Model_Carrier_Abstract extends Mage_Shipping_Model_Carrier_Abstract
{
    public function collectRates(Mage_Shipping_Model_Rate_Request $request){
        Mage::log('Collect Rates');
        return parent::collectRates($request);
    }

    public function getMethodPrice($cost, $method = '')
    {
        //get the session
        Mage::log('get Method Price');
        return $method == $this->getConfigData($this->_freeMethod)
        && $this->getConfigFlag('free_shipping_enable')
        && $this->getConfigData('free_shipping_subtotal') <= $this->_rawRequest->getBaseSubtotalInclTax()
            ? '0.00'
            : $this->getFinalPriceWithHandlingFee($cost);
    }

}

It's not calling. Is this Correct/Not?
If not how can I rewrite?

Thanks.


texts:
Here is a major problem we've had from Magento 1.4 that is still a problem in Magento CE 1.8.1.

If you search for a product the results that come back are not what you'd expect.

For example if I search for Canon 6D then the top search result is Canon EOS Rebel SL1 (Body Only), even though there is a product whose title is exactly "Canon 6D".

Then if I search for only 6D then the top search result is Nikon AF Nikkor 70-300 f/4-5.6D ED Telephoto Zoom Lens... because, I guess, it has the two characters "6D" next to each other somewhere in the title? Below that is Nikon D800 36.3 MP CMOS FX-Format Digital SLR Camera (Body Only) which doesn't even have the characters "6D" found together anywhere in the title at all.

When I have done some research into this, I keep finding people who are saying that it's just how Magento is, and the only way to fix it is either override the core code with some hack or another, or, use an extension.

I found a free extension that uses Apache SOLR, but it requires the installation of SOLR first, which is fairly complicated, and I'm not even sure our hosting provider would allow that, since it runs in Java and I don't know if our server has the right version of JRE etc.  So this solution is very much not ideal.

Then there are some very expensive paid extensions, and I'm sure I can't get approval for that.

It just makes me wonder if there might be something corrupt about our particular Magento installation, and if so, what might it be? What would cause this? Maybe we have some old extension hidden somewhere, screwing things up, or maybe our database is corrupted. What do you think?

I'm don't want to believe that this is just how Magento is, even though I've seen plenty of posts on the Magento forums that complain of this same issue. I know there are several old bugs that keep not getting fixed in Magento CE, but surely the developers of Magento would fix search if it was broken, since it's arguably the most important feature of an e-commerce site.

So what's the deal? Please help. Thanks.


texts: Assigning products to categories, advanced search operators / regex?

texts:
In Magento I'm trying to find a fast way to assign products to categories from the Manage Categories section. After I select a category and click on Category Products I'm wondering if there's a way to make the Name field searchable through Regex or at least to use a wildcard.

Example: entering nike * shoes in the name field would return results for nike running shoes and nike shoes

Screenshot: http://goo.gl/DM0s2g


texts: Alert in the mini cart if the minimum order is not reached (after clicking the checkout button)

texts:
At the moment Magento 2 after clicking the checkout button redirecting to editing cart page if minimum order is not reached. Is it possible to just give an alert message without redirecting?
Thanks in advance!


texts: How to obtain customer attribute in sales order grid?

texts:
I have made a customer attribute as 'sales_executive' and it is displayed in add new customer form in admin. It is also displayed in customer grid by adding a add column and but now I want to display the same column in sales order grid also. So What I want to ask is Do I need to make another 'sales' attribute for it. Or How to do it?

How to obtain collection in Sales Order grid? Any logic change? Or what to write in _prepareCollection() ?


texts: Assign Multiple Filter to Single FilterGroup in magento 2

texts:
I am working on to get product from custom attributes using search criteria. i need  to assign multiple filter to single filter group.

what i did:

$cus Query:

{"area":["320","321","322"],"city":"342","size":""}

My code to get a product:

           foreach($cusQuery as $key => $value)
            {

      // create multiple filter for single attribute based on  multiselect(advanced search):

                $filter= '';

                echo $key ."\n";
                if($key =='city' || 'area')
                {
                    if(is_array($value))
                    {
                        foreach($value as $siglevalue)
                        {

                            $filter[$filter_loop] = $this->_filterBuilder->create()->setField($key)->setConditionType('finset')->setValue($siglevalue);
                            $filter_loop++;
                        }
                    }else{
                        if(strlen($value) != 0) {
                            $filter[$filter_loop] = $this->_filterBuilder->create()->setField($key)->setConditionType('finset')->setValue($value);
                        }
                    }

//create filter Group:

                   if(!empty($filter))
                   {
                       foreach($filter as $fil)
                       {

                           $filter_group[$filter_group_loop] = $this->_filterGroupBuilder->addFilter($fil)->create();
                           $filter_group_loop++;
                       }
                   }

                }
                $filter_loop++;
            }

            $search_criteria = $this->_searchCriteriaBuilder->create()->setFilterGroups($filter_group);
            $productdata = $this->_productModelRepository->getList($search_criteria)->getItems();
            echo "Product Count" .count($productdata);

I know following way to  assign multi-filter to single filter group:

 $filter_group = $this->_filterGroupBuilder
            ->addFilter($filter[0])
            ->addFilter($filter[1])
            ->addFilter($filter[2])
            ->addFilter($filter[4])
            ->create();

But, I have filters in array  so, i can't choose these way.

Suggest me, How to assign multiple filter in single filter group for my way or any other way to do this.


texts:
please visit this  configurable product

you can see color : "choose an option "

please change to "grey" , discounts are displaying in decimal numbers.

once you refresh the page, its working fine.

we are using following code :

var discountAmount = ((price - finalPrice) / price) * 100;
jQuery('.you_save_price').text(discountAmount + '%');


texts: Magento2 Override Contact Post Controller

texts:
how to Override contact controller in custom module?

venoder/magento/module-contact/Controller/Index.php


texts:
As magento storing data in multiple tables is quiet difficult to get all the data required using pure SQL. Found some examples but none actually getting details I need about the order.
What I would like to get based on order number is all information about payment and payment status, total amount but no products or quantities using only SQL.
How to do it ?
Or is it possible to use Magento then display whole query in SQL ?

I tried this:

    $torders = Mage::getModel('sales/order')
        ->getCollection()
        ->addAttributeToSelect('*')
        ->addAttributeToSort('increment_id', 'DESC')
        ->addAttributeToFilter('main_table.created_at', array('from' => $from,'to' => $now))
        ->addAttributeToFilter('status', 'processing')
        ->join(array('payment' => 'sales/order_payment'),'main_table.entity_id=payment.parent_id',array('payment_method' =>'payment.method'))
        //->addAttributeToSort('increment_id', 'DESC')
        ->addAttributeToFilter('main_table.created_at', array('from' => $from,'to' => $now))
        ;

------ I commented out some lines because if enabled getting 500 error ------

    echo $torders->getSelect()->__toString(); <--- this

gives me a nice SQL query but how to add all the details about payment method ? how to JOIN payment details into "collection" and filter by selected payment method (ex: paypal) ?

I think I got it, don't know yet why it won't work with array "    $torders = Mage::getModel('sales/order')
        ->getCollection()
        ->addAttributeToSelect('*')
        ->addAttributeToSort('increment_id', 'DESC')
        ->addAttributeToFilter('main_table.created_at', array('from' => $from,'to' => $now))
        //->addAttributeToFilter('status', array('nin' => array('canceled'))"

because i need all the orders except cancelled but ... eventually I can use a conditions in a foreach loop later.

Final version (working):

$torders = Mage::getModel('sales/order')
        ->getCollection()
        ->addAttributeToSelect('*')
        ->addAttributeToSort('increment_id', 'DESC')
        ->addAttributeToFilter('main_table.created_at', array('from' =>
          $from,'to' => $now))
        ->addFieldToFilter('payment.method', array('eq' =>
          'customercredit'))
        ->addFieldToFilter('state', 'processing')
        //->addAttributeToFilter('status', array('nin' => array('canceled'))
        ->join(array('payment' => 'sales/order_payment'),
        'main_table.entity_id=payment.parent_id', array('payment_method'
         =>'payment.method'))
        ->addAttributeToSort('increment_id', 'DESC')
        ->addAttributeToFilter('main_table.created_at', array('from' =>
         $from,'to' => $now))
        ;


texts:
I'm trying to set a template for all CMS pages on my site
but I can't manage to do it, though the layout handle is detected :

<cms_page>
    <reference name="root">
        <action method="setTemplate"><template>page/cms_page.phtml</template></action>
        <action method="addBodyClass"><class>test-class</class></action>
        <remove name="birdietown_homepage_mini_slider_our_brands"/>
        <remove name="birdietown_homepage_mini_slider_our_products"/>
        <remove name="birdietown_homepage_daclub"/>
    </reference>
</cms_page>

this layout XML node is detected, because the test-class is added to my page output, but the template is still 1column.phtml. This handle is in local.xml


texts:
I see quite a few questions about emails not being sent, I think what I'm experiencing is somewhat different than the majority of the problems out there.

Typically my transactional emails (orders, invoices, shipments) are successfully sent but some % of them never get sent.  I've noticed that with both automatically generated emails and also manually 'resent' emails from admin interface.  Sometimes I have to manually resend multiple times.

My practice is to BCC all outgoing emails to an email account so I have a record of exactly what emails are sent.   But a good % of transactional emails are never received by customer or my BCC account.

I don't see any relevant errors in logs, Magento or PHP.   Any suggestions for tracking this down?


texts: Prevent place order using observer in magento 2

texts:
Hi I'm trying to prevent placing order with the help of observer i have already trigger the event "sales_order_place_before" with this i got all the details of the order like products in cart ,shipping address etc.. so here i check some condition based on that i need to prevent the order from placing

can any one help me to do this


texts: Missing directory separator for image source

texts: I just finished installing magento 2 using composer and run it under apache virtual host mymagento.com. When I open the homepage the product images are not loaded and when I check on my console, There is a separator error in the image path. A separator is missing between the product and cache directory. Can anyone suggest a fix for this problem ?


texts: Magento2.3: Where to check the controller output?

texts:
I want to export the customer details as a CSV file. I have referred the below link for that:

https://magecomp.com/blog/export-data-csv-file-programmatically-magento-2/

I have put the code which is in the mentioned link to one of my custom module but where I have to check the controller output.

where the CSV file will be stored?

Any help will be appreciated!


texts: I know how to go about exporting all of my products into a CSV but I noticed that it only has MSRP, Price and Special price but does not have Group Prices that I have gone in and manually set. Where do I go to export this price for individiual products? Is there a way to do this? and perhaps import the group pricing later on?


texts: Magento 2: Insert and select operation (without model) in custom module

texts: Please give me any example or link for insert and select process without using model in custom module of Magento 2.


texts:
I'm new to Magento (using v2.1.0) and I own a videogame store in Reno, Nevada.

I love how M2 looks, the multitude of extensions and the great forums for support.  I have a question which I'm hoping someone here can help me with...

Let's say I have a product, "SUPER MARIO BROS. 3" for the Nintendo.  For each of my videogame products, I can have up to 4 different choices.  They are: NEW, COMPLETE, BOXED, GAMEONLY.  What I'd like to do is have each game show up on the website to customers with the title and a dropdown box to choose which variation they want to purchase and price per each.

Example:

SUPER MARIO BROS 3

(These are the drop down options.)

-> NEW ($199.99)

-> COMPLETE ($24.99)

-> BOXED ($22.99)

-> GAMEONLY ($19.99)

So when the customer chooses to buy the game, she clicks on the dropdown box to choose which variation and price the customer would like to pay.  Assuming all 4 are in-stock, she could choose the variation and price.

I've imported a listing for each individual game for each system, set up all the categories and now I'm stuck.  I have in inventory 1 of each (all named GAMEONLY).

I see Attribute Sets and all the examples I see out there are T-Shirts and colors.  I'm pretty much a newb to Magento (have been using Zen Cart for 5 years).

Can someone point me in the right direction (about to watch https://www.youtube.com/watch?v=RMP-eUOdrs4 so that might explain things well enough)?

I've searched the forums for some help but jeeze... there's so many questions I couldn't find one that was like mine (though 100s of pages there probably is).

Thanks in advance for any help.  In the Zen Cart forums, I always had an answer back within a day.  I think Magento is more popular and useful... though this is my first question :) -Jake


texts:
How to remove ACCOUNT from top right of page?

I want to remove it only from the top of the page.


texts:
Can anyone explain how the product qty in the input field in view/frontend/templates/cart/item/configure/updatecart.phtml is being pulled. This phtml file is used when you're trying to edit a product that is added to your cart. Below is the content of the said file.
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/** @var $block \Magento\Catalog\Block\Product\View */
?>
<?php $_product = $block->getProduct(); ?>
<?php $buttonTitle = __('Update Cart'); ?>
<?php if ($_product->isSaleable()) :?>

        <fieldset class="fieldset">
            <?php if ($block->shouldRenderQuantity()) :?>

                <?= $block->escapeHtml(__('Qty')) ?>

                    <input type="number"
                           name="qty"
                           id="qty"
                           min="0"
                           value=""
                           title="<?= $block->escapeHtmlAttr(__('Qty')) ?>"
                           class="input-text qty"
                           data-validate="<?= $block->escapeHtmlAttr(json_encode($block->getQuantityValidators())) ?>"/>

            <?php endif; ?>

                <button type="submit"
                        title="<?= $block->escapeHtmlAttr($buttonTitle) ?>"
                        class="action primary tocart"
                        id="product-updatecart-button">
                    <?= $block->escapeHtml($buttonTitle) ?>
                </button>
                <?= $block->getChildHtml('', true) ?>

        </fieldset>

<?php endif; ?>

I can't see any scripts used to get the value or any PHP functions.


texts: What do I need to do to get Onepage to stop validating the CC number I'm entering?

texts:
I've setup a new instance of our development server on localhost, checked out the latest working copy, and was given a copy of a database backup to use with it. After getting all of this setup and working, I went through a demo transaction to make sure my checkout was working after reverting to the working copy.

It looks as though the checkout is actually trying to process my transaction on the development server now though, as it's declining the card with:

Error Code: 10544: Please use another payment card

I've set the System->Configuration->Payment Methods->Authorize.Net->Test to yes, but it's still trying to process my card it seems.


texts: Is it possible to lock the design configuration in env.php?

texts:
In production, the meta robots on my website is configured to be "INDEX,FOLLOW".
In staging, I run an sql query to insert or update it in the core_config_data table to be "NOINDEX,NOFOLLOW".
However, when I try to set it and lock it in the env.php file, Magento tell me that's not possible :
xxx@yyy[19/08/20 15:42:42]:~/xxx/$ php bin/magento config:set --lock-env design/search_engine_robots/default_robots "NOINDEX,NOFOLLOW"
The "design/search_engine_robots/default_robots" path doesn't exist. Verify and try again.

And magento is right : the config design/search_engine_robots/default_robots does not exists in a system.xml file but in vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml
Is there any way to lock the magento design configuration values in the env.php file ?
In my opinion, it would be very convenient to set it in the file as the value is stored in core_config_data, like all the other configurations.


texts:
I would like the search box to the left position next to the user account. I have created a local.xml with the following content :

<layout version="0.1.0">
<default>
<reference name="header">
<action method="unsetChild">
<name>topSearch</name>
</action>
</reference>

<reference name="header">
<block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
</reference>
</default>
</layout>

Here the search field end up back at the same place . How do I position correct?
Many thanks for the help


texts: How To add import button in custom grid?

texts:
I have to use this link for add import button in custom grid.

How to add Upload Button for importing a csv file in the Custom Admin Grid Container?

but I don't know how to add its action?

it is my makemodel.php file

<?php

class Sigmasolve_Makemodel_Block_Adminhtml_Makemodel extends Mage_Adminhtml_Block_Widget_Grid_Container
{
    public function __construct()
    {
        $this->_controller = 'adminhtml_makemodel';
        $this->_blockGroup = 'makemodel';
        $this->_headerText = Mage::helper('makemodel')->__('Item Manager');
        $this->_addButtonLabel = Mage::helper('makemodel')->__('Add Item');
        parent::__construct();

        $this->_addButton("Import", array(
            "label" => Mage::helper("core")->__("Import"),
            "onclick" => "location.href = '" . $this->getUrl('makemodel/adminhtml_import') . "';",
            "class" => "btn btn-danger",
        ));
    }
}


texts: Programatically login admin into admin panel possible or not

texts: I am working on the script for the login of admin panel automatically into the admin panel. Here is code link which is used for automatically login admin user into the admin panel. But it is not working when I run simple code then it says authenticated but it is not login into admin area when I open admin then it lands to login page only. I also googled script and find this code see an image. In the block, I get my conditions but as I move to Magento page then again login page is present. Is this process is possible or not with customization.


texts:
In Magento Backend, when looking at an invoice details, it is possible to get a pdf version in clicking the "print" button.

Is there a way to get this pdf invoice using a php script?


texts: Magento 2 - Show product options and attributes in categories

texts:
I need some help to display products custom options and attributes in category view, I can't find any guide to do this.

What I want to do is that if a simple product has custom options to display a list with those in the category view.
Also I'd like to show the products attributes there too, not all attributes but ones I've selected in the template with attribute codes.


texts: Display Stock Quantity on grouped product

texts:
I need to display Stock Quantity on grouped products.

Grouped product detail are displaying by grouped.phtml

(Core module: module-grouped-product/view/frontend/templates/product/view/type/grouped.phtml).

I have extended this module and i need to display Quantity there.

Update: This is foreach loop that display products and I need to display Stock qty in for-each loop.

I am not sure If i can display from function reference of stock.

Line 34 - 82:

<?php foreach ($_associatedProducts as $_item): ?>

            <td data-th="<?php echo $block->escapeHtml(__('Product Name')); ?>" class="col item">
                <?php echo $block->escapeHtml($_item->getName()) ?>
                <?php if ($block->getCanShowProductPrice($_product)): ?>
                    <?php if ($block->getCanShowProductPrice($_item)): ?>
                        <?php /* @escapeNotVerified */ echo $block->getProductPrice($_item) ?>
                    <?php endif; ?>
                 <?php endif; ?>

            <?php if ($_product->isSaleable()): ?>
            <td data-th="<?php echo $block->escapeHtml(__('Qty')); ?>" class="col qty">
            <?php if ($_item->isSaleable()) : ?>

                    <input type="number" name="super_group[<?php /* @escapeNotVerified */ echo $_item->getId() ?>]"
                           data-selector="super_group[<?php /* @escapeNotVerified */ echo $_item->getId() ?>]"
                           maxlength="12"
                           value="<?php /* @escapeNotVerified */ echo $_item->getQty() * 1 ?>"
                           title="<?php /* @escapeNotVerified */ echo __('Qty') ?>"
                           class="input-text qty"
                           data-validate="{'validate-grouped-qty':'#super-product-table'}"
                           data-errors-message-box="#validation-message-box"/>

            <?php else: ?>
                <div class="stock unavailable" title="<?php /* @escapeNotVerified */ echo __('Availability') ?>">
                    <?php /* @escapeNotVerified */ echo __('Out of stock') ?>

            <?php endif; ?>

            <?php endif; ?>

        <?php if ($block->getCanShowProductPrice($_product)
            && $block->getCanShowProductPrice($_item)
            && trim($block->getProductPriceHtml(
                $_item,
                \Magento\Catalog\Pricing\Price\TierPrice::PRICE_CODE
            ))): ?>

                    <?php echo $block->getProductPriceHtml(
                        $_item,
                        \Magento\Catalog\Pricing\Price\TierPrice::PRICE_CODE
                    ) ?>

        <?php endif; ?>

    <?php endforeach; ?>


texts: Magento 2 provide default Slider js rather than use third party slider js ? Because I do want to increase js size of Magento 2 Store. I tried to search,but I could not find any slider js.


texts: Notice: Undefined index after migration from magento 1.7.0.2 to magento 2.3.4

texts:
Notice: Undefined index:  in /home/tbnet/public_html/m2.3/vendor/magento/module-developer/Model/View/Page/Config/RendererFactory.php on line 70
how to solve this error? cannot access m2.3.4 backend


texts: Issue in displaying products : «holes» in my list

texts:
I experience an irritating issue with my products «display» on frontend.
It's not rare that I see «holes» in my products lists pages.

I've placed all my products in correct position in «manage categories» but I still have those white places instead of showing the proper product.

For instance : you'll see in the two next screenshots that there's obviously a displaying problem.

What I did is that I've tried to identify the problematic position : seems to be the 13 on this page. I've then put the product on line 333 (the last line of the list obviously). Problem solved...

Ok, that's good for this one, but  1) I'd like to show this product up in the list and not at the end of the page
2) I encounter this problem in many of my pages.

I use Magento ver. 1.9.2.4
Display settings are the following

And products' positions are here

Could you help me solving this problem or at least giving me a direction to look for... I feel lonely here ! :)

Thanks in advance,


texts:
As i'm new to module development within Magento this is propably going to be a stupid question.

But i'm trying to add a quantity selector to each product on the catalog pages. So customers can select how much they want to order and then add it to the cart.

I don't have much and its already breaking my website :

/etc/frontend/event.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="catalog_product_collection_load_after">
        <observer name="Designit_QuickQuantity_Quantity" instance="Designit\QuickQuantity\Observer\AddQuantityToCollectionObserver"/>
    </event>
</config>

/observer/AddQuantityToCollectionObserver.php

<?php

namespace Designit\QuickQuantity\Observer;

class AddQuantityToCollectionObserver implements ObserverInterface
{
    /**
     * Add information about product Quantity to collection
     * Used for product collection after load
     *
     * @param EventObserver $observer
     * @return void
     */
    public function execute(EventObserver $observer)
    {
    }
}
?>

I bought a module to see how they were doing it (i want to code it myself to learn from it) but even with that code i'm just not getting it.

They don't even use events or observers.


texts: Magento 2 - How to get data from customerRepository API?

texts:
I can get customer data using API repository:

$customer = $this->customerRepository->getById($customerId);

How do I get the attribute data of the $customer object?


texts: Magento 2 : Module is disabled, shows in disabled list, but the functionality in admin remains

texts:
I have a module that I disabled that adds background patterns to individual product pages. We want to remove the functionality. So I ran the CLI command to disable the module. I listed the modules in the CLI and it shows up now in the list of disabled modules. I did the setup:upgrade command. Then I cleared caches. It's functionality still shows in the admin.
List of commands run after disabling:
magento setup:upgrade
magento cache:clean
magento cache:flush
magento indexer:reindex

rm -rf generated/code/*
rm -rf generated/metadata/*
rm -rf pub/static/*
rm -rf var/cache/*
rm -rf var/composer_home/*
rm -rf var/page_cache/*
rm -rf var/view_preprocessed/*

A rather vigorous clearing of caches. It still shows up in the admin on product edit pages with the fields to fill in.
What am I doing wrong?


texts: "Invalid Form Key. Please refresh the page." error on Contact us page

texts:
The error "Invalid Form Key. Please refresh the page." appears when submitting the contact form.
I just don't know how to handle this. :( In my opinion, this must not even be supposed to happen.
How can I get rid of this error?


texts: Add a custom field in checkout and registration page in magento 1.9.2.4

texts:
I need to add a custom field "Mobile" in registration and checkout pages.I have tried few methods but no luck. How can I achieve this?

  config.xml

<?xml version="1.0"?>
<config>
  <modules>
    <Mobilenum_Cusmobile>
      <version>0.0.1</version>
    </Mobilenum_Cusmobile>
  </modules>
  <global>
       <fieldsets>
     <checkout_onepage_quote>
         <customer_mobile_reg>
            <to_customer>mobile_reg</to_customer>
          </customer_mobile_reg>
     </checkout_onepage_quote>
    <checkout_onepage_billing>
        <mobile_reg>
            <to_customer>*</to_customer>
        </mobile_reg>
    </checkout_onepage_billing>
    <customer_account>
        <mobile_reg>
           <to_quote>customer_mobile_reg</to_quote>
         </mobile_reg>
     </customer_account>
    <sales_convert_order>
        <customer_mobile_reg>
          <to_quote>*</to_quote>
        </customer_mobile_reg>
    </sales_convert_order>
</fieldsets>
        <helpers>
      <cusmobile>
        <class>Mobilenum_Cusmobile_Helper</class>
      </cusmobile>
    </helpers>
    <models>
      <cusmobile>
        <class>Mobilenum_Cusmobile_Model</class>
        <resourceModel>cusmobile_mysql4</resourceModel>
      </cusmobile>
    </models>
    <resources>
      <customerattribute1486024557_setup>
        <setup>
          <module>Mobilenum_Cusmobile</module>
          <class>Mage_Customer_Model_Entity_Setup</class>
        </setup>
        <connection>
          <use>core_setup</use>
        </connection>
      </customerattribute1486024557_setup>
      <customerattribute1486024557_write>
        <connection>
          <use>core_write</use>
        </connection>
      </customerattribute1486024557_write>
      <customerattribute1486024557_read>
        <connection>
          <use>core_read</use>
        </connection>
      </customerattribute1486024557_read>
    </resources>
  </global>
</config>

  app/code/local/Mobilenum/Cusmobile/sql/customerattribute1486024557_setup/mysql4-install-0.0.1.php

<?php
$installer = $this;
$installer->startSetup();

$installer->addAttribute("customer", "mobile_reg",  array(
    "type"     => "varchar",
    "backend"  => "",
    "label"    => "Mobile Number",
    "input"    => "text",
    "source"   => "",
    "visible"  => true,
    "required" => true,
    "default" => "",
    "frontend" => "",
    "unique"     => false,
    "note"       => ""

    ));

        $attribute   = Mage::getSingleton("eav/config")->getAttribute("customer", "mobile_reg");

$used_in_forms=array();

$used_in_forms[]="adminhtml_customer";
$used_in_forms[]="checkout_register";
$used_in_forms[]="customer_account_create";
$used_in_forms[]="customer_account_edit";
$used_in_forms[]="adminhtml_checkout";
        $attribute->setData("used_in_forms", $used_in_forms)
        ->setData("is_used_for_customer_segment", true)
        ->setData("is_system", 0)
        ->setData("is_user_defined", 1)
        ->setData("is_visible", 1)
        ->setData("sort_order", 100)
        ;
        $attribute->save();
$installer->endSetup();


texts: Can I create grid view programmatically in magento 2?

texts: As the tittle, I want to create these in my code.


texts: Magento 2 How to decrease product qty from source same as "Product Salable qty" after orderd placed to make product out of stock?

texts:
As Magento 2.3 have default behavior that it decreases the qty from "Product Salable Quantity" after order placed not the "Source inventory". The main qty(source inventory) of a product is decreased after the order is completed.

I have multiple stores in my setup and I am using multisource inventory.

I have created 2 stocks from "Stores => Stocks" with
- default
- demo stocks

Created 3 sources as well from "Stores => Sources".
- Src1
- Src2
- Src3

i.e. If we have a product name XYZ and it has qty 1. when an order is placed then "Product Salable Quantity" is decreased and it is 0 but the "Source inventory" still showing qty 1 and out of stock.

in this case, the product is showing on the category page as "In Stock" but when we go to the product page it is showing "Out of Stock".

How can we update the qty(source inventory) for a product so it will become "out of stock" and don't display on the category page?

Or how can we disable this kind of products from category pages?

If anyone has an idea please let us know?


texts: Theme installation using Magento connect

texts:
I have purchased theme in theme link

i need to install the theme using magento connect


texts: How to get admin side base url in magento 2?

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

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

echo $storeManager->getStore()->getBaseUrl();exit;

This only gives the frontend base URL. How to get admin side URL?


texts: Display Out of Stock Simple Products swatches in configurable product

texts:
Configurable product should display all simple products, also the simple products which are out of stock.

For example an item has the sizes S, M, L, XL. And M is out of stock.

At this moment it only shows S L XL.

I need Magento to show also the size M (with an "out of stock" css class added to it).

How can I fix this for Magento 2.3(!) ?


texts:
I am Filter the Order Collection. Code give as

protected function searchResultToOutput(SearchResultInterface $searchResult)
{
    $arrItems = [];
    $arrItems['items'] = [];
    foreach ($searchResult->getItems() as $item) {
        $itemData = [];
        foreach ($item->getCustomAttributes() as $attribute) {
            $itemData[$attribute->getAttributeCode()] = $attribute->getValue();
        }
        $arrItems['items'][] = $itemData;
        $arrItems['totalRecords'] = $searchResult->getTotalCount();
    }

    //$sellerId = "25";
    $currentUser=$this->getCurrentUserId();
    $arr= array_filter($arrItems['items'], function($e) use ($currentUser) {
        return in_array($currentUser, explode(",", $e["current_seller_id"]));
    });
    $arrItems['items']=$arr;
    return $arrItems;
}

This code return the filtered array as i mention in snapshot But it not set on Grid.
Actually this collection is filter for the sake of current_seller can see own orders.
Data is not set in grid.
Guid me why not data is set  in Grid Even Collection .


texts: After successful installation when i run the admin url it's giving me this. I'm not sure what's happening. So if anyone have any solution for this it will be great help.


texts: I tested my website performance with Gtmetrix. I found that my website performance seems to be good, but the number of “Requests” is very large. I want to know if the impact of this problem is big? If there is a big impact on website performance, how can I solve this situation?


texts: Magento transfer problem on another server> show page "shop updating"

texts:
I tried to transfer my e-commerce on another server, following the normal way:

1) I moved all the files and folder on the new server
2) I did the backup of the database, create a new database on the new server and restored beckup
3) I updated references to new databese on file local.xml
4) I pointed the new domain to the root of Magento

However when I try to access the site from the new domain or if I try to access to the admin area, the site gives me just the update page of the site ("we are updating the store ...").

What's wrong? What should I do?


texts:
I have put my site under maintenance mode. But the site is becoming live and the maintenance.flag file is getting deleted automatically. I didn't change anything and I have no idea how this is happening.

Someone kindly help me to resolve this issue.


texts: How to print custom text in login page ? Magento 2

texts:
This code checks whether the customer status is suspended, then the customer cannot log in and returns to the login page, but I need to print his status or any text after or before login form or everywhere in login page , can you help me?

namespace CustomerLogin\CheckStatus\Plugin;

use Magento\Customer\Api\CustomerRepositoryInterface;
use Magento\Framework\Exception\InvalidEmailOrPasswordException;
use Magento\Framework\Exception\EmailNotConfirmedException;

class AccountManagement {
    /**
     * @var CustomerRepositoryInterface
     */
    private $customerRepository;

    public function __construct(
        CustomerRepositoryInterface $customerRepository
    )
    {
        $this->customerRepository = $customerRepository;
    }
    public function aroundAuthenticate(
        \Magento\Customer\Model\AccountManagement $subject,
        $proceed,
        $username,
        $password
    )
    {
        try {
            $customer = $this->customerRepository->get($username);
        } catch (NoSuchEntityException $e) {
            throw new InvalidEmailOrPasswordException(__('Invalid login or password.'));
        }

        $CustomerfieldValue= $customer->getCustomAttribute('customer_status')
            ? $customer->getCustomAttribute('customer_status')->getValue()
            :154;
        // Condition match throw error for prevent log
        if($CustomerfieldValue == 154)
        {
            throw new InvalidEmailOrPasswordException(__('Access is locked'));
            // access prevent
            // throw new EmailNotConfirmedException(__('Access is locked'));
        }
        // Call original Method

       return  $proceed($username,$password);

    }
}


texts: I can add google recaptcha to phtml without any problems but on the checkout page I have form as a HTML template with paymyment method. How can I add recaptcha to HTML template?


texts: Add a disable checkbox to Magento Product Custom Option

texts:
I want to add a checkbox to each product custom option to disable/enable that custom option.
i know that i can remove custom options which i don't need. but some times i need to remove a custom option and add it again in the future and do this several times. i think its sensible to have this kind of disable/enable option for product custom options.


texts: Magento2: Can we customize the FedEx shipping price?

texts:
Can we customize the FedEx shipping price?

My Magento v2.0.17


texts: Choosing the right Magento CE version considering the budget

texts:
I am looking to to develop a small scale e-commerce solution using Magento CE with drastic budget constraints.

I don't need much functionality either, just listing of products, invoice generation, integration with PayPal. So i am assuming i will have to utilize maximum free extensions.

So my question is Which CE version has most free extensions available, so i can progress through without spending much. If its not an hindrance than i would like to use latest 2.1 build. But if it has less numbers of free extensions then i will have to re-consider using older builds.


texts: How to get custom attributes from customer via SOAP API?

texts: I have a few custom attributes to extend the customer with bank account information. The attributes are stored in mage_eav_attribute table. How can I get them via the SOAP API?


texts: Append extra param for my Magento 2 entire site dynamically

texts:
my requirement is like one magento site with having some query params.
By starting website with www.abc.com/?id=1-2-3 like this i want carry this query param my entire site can any one how can achieve this like i want add query param when they click on every link i need to show this query param. it's difficult to place url params in every link so any one have any idea to add one place it will append every link


texts: Not able to create shipment programmatically

texts:
Below is a snippet from my code. I get the following error when I try and create a shipment and track info for the order.

Uncaught exception 'Mage_Core_Exception' with message 'Cannot create an empty   shipment.' in /var/www/app/Mage.php:595
Stack trace:
#0 /var/www/app/code/core/Mage/Sales/Model/Order/Shipment.php(556):   Mage::throwException('Cannot create a...')
#1 /var/www/app/code/core/Mage/Core/Model/Abstract.php(316): Mage_Sales_Model_Order_Shipment->_beforeSave()
#2 /var/www/app/code/core/Mage/Core/Model/Resource/Transaction.php(151): Mage_Core_Model_Abstract->save()
#3 /var/dataimporters/updateorder.php(197): Mage_Core_Model_Resource_Transaction->save()
#4 {main}
thrown in /var/www/app/Mage.php on line 595

Any recommendation as to why my script is resulting in an empty shipment?

    if ($shipping['shipper'] == 'UPS') {
    $title = 'United Parcel Service';
    }
    if ($shipping['shipper'] == 'USPS') {
    $title = 'United States Postal Service';
    }
    if ($shipping['shipper'] == 'custom') {
    $title = 'Custom Value';
    }

     Mage::init();
    $comment = null;
    $email = false;
    $includeComment = false;
    $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
    $convertor = Mage::getModel('sales/convert_order');
    $shipment = $convertor->toShipment($order);

    foreach ($order->getAllItems() as $orderItem)
    {
        if (!$orderItem->getQtyToShip()) {
            continue;
        }
        if ($orderItem->getIsVirtual()) {
            continue;
        }
        $item = $convertor->itemToShipmentItem($orderItem);
        $qty = $orderItem->getQtyToShip();
        $item->setQty($qty);
        $shipment->addItem($item);
    }

    $trackdata = array();
    $trackdata['carrier_code'] = $carrier;
    $trackdata['title'] = $title;
    $trackdata['number'] = $trackInfo;

    $track = Mage::getModel('sales/order_shipment_track')->addData($trackdata);
    $shipment->addTrack($track);
    //echo "<pre>"; print_r($shipment);echo "<pre>"; exit;

    Mage::register('current_shipment', $shipment);

    $shipment->register();
    $shipment->addComment($comment, $email && $includeComment);
    $shipment->setEmailSent(true);
    $shipment->getOrder()->setIsInProcess(true);

    $transactionSave = Mage::getModel('core/resource_transaction')
        ->addObject($shipment)
        ->addObject($shipment->getOrder())
        ->save();

    $shipment->sendEmail($email, ($includeComment ? $comment : ''));
}


texts: My admin url is not working. Im using the same url that is in the env.php file.


texts:
I am getting error in log. error is

  The language 'nb_NO' has to be added before it can be used. in
  /public_html/lib/Zend/Translate/Adapter.php on line 430

Translations for nb_NO are not working.

Please let me know how to fix it.


texts: Magento2 | Add select-box with search/filter option | Auto suggestor

texts:
I am try to add a search bar to the product custom dropdown attribute.
I am able to add it using xml and data is also getting saved, but after loading the product again, it is not showing in admin.
Can some please help
I am following this link as well
Magento 2 Add select-box with search/filter option
Here is my xml code
<field name="xxnmi_project">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">XYZ\ImportProjectData\Model\Attribute\Source\Project</item>
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Project</item>
                    <item name="componentType" xsi:type="string">field</item>
                    <item name="formElement" xsi:type="string">select</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
                    <item name="elementTmpl" xsi:type="string">ui/grid/filters/elements/ui-select</item>
                    <item name="dataScope" xsi:type="string">xxnmi_project</item>
                    <item name="filterOptions" xsi:type="boolean">true</item>
                    <item name="showCheckbox" xsi:type="boolean">true</item>
                    <item name="chipsEnabled" xsi:type="boolean">false</item>
                    <item name="disableLabel" xsi:type="boolean">false</item>
                    <item name="multiple" xsi:type="boolean">false</item>
                    <item name="sortOrder" xsi:type="number">70</item>
                    <item name="listens" xsi:type="array">
                        <item name="newOption" xsi:type="string">toggleOptionSelected</item>
                    </item>
                    <item name="required" xsi:type="boolean">false</item>
                    <item name="source" xsi:type="string">conditions</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">false</item>
                    </item>
                </item>
            </argument>
        </field>


texts: Composer make my web dead after installation

texts:
today i installed Composer to my SSH. But after installation my web died.
I got this error

Warning: require(/var/www/clients/client1/web1/web/vendor/composer/../zendframework/zend-mvc/src/autoload.php): failed to open stream: No such file or directory in /var/www/clients/client1/web1/web/vendor/composer/autoload_real.php on line 70

Fatal error: require(): Failed opening required '/var/www/clients/client1/web1/web/vendor/composer/../zendframework/zend-mvc/src/autoload.php' (include_path='/var/www/clients/client1/web1/web/vendor/magento/zendframework1/library:.:/usr/share/php') in /var/www/clients/client1/web1/web/vendor/composer/autoload_real.php on line 70


texts:
Advance reporting is working fine but suddenly it is showing empty and on store views it's showing only all store views.

Thanks


texts: Is it possible to search another storeview product name if current language store view is no result?

texts:
My website have two store view which are in different language.
I use keyword "Clothes" to search in dutch store. It should be no result in magento since there are no product name in dutch contain "Clothes". Is it possible to search another language store view if current language store view do not have result ?


texts: Stop simple product images overriding main product gallery after clicking swatches

texts:
I've upgraded from 2.1.9 to 2.2.3. Now on a configurable product page when a swatch is selected the product page gallery images get overridden by the simple product image for each swatch.

This didn't used to happen and I can't find a way to stop this behaviour. I only want the configurable product images to show as in the past. I actually only have thumbnails associated with simple products to show at the checkout.


texts: Magento 2: Errors after installation on xampp

texts:
I have installed magento 2 on xampp but i have errors on admin and front page

Any idea?


texts: customer group restriction and price management

texts: How can i set different prices for customer group also a retailer should be able to see only his price but the dealer should be able to see the dealer price as well as the retailer price.


texts:
On my Magento version 2.1.4, I have added language file nl_NL.csv under app/design/frontend/Vendor/Themename/i18n folder. It's working fine for strings added in php code like this

But the translations not showing for string added in KO JS like this

Can anyone tell me what could be the issue? OR how can I create js translations?
I understand there is a file js-translation.json generated in pub/static/frontend/Hyp/deboomhut/nl_NL directory which is responsible for js translations. But don't know how it's generated and from where it pulls the tralsations. So any help will be appreciated.


texts: Magento 2 Cloning an order and modifying few things

texts:
All I'm asking here is the right direction on how to accomplish this,

I'm basically trying to clone an order and modify the following:

increment_id
remove some line items
on any line item:

modify name/title
set price to zero

remove payment data

Thanks in advance.


texts: Error on Magento 1.9.2.2 running with Redis cache

texts:
I tried to migrate the pacmall.net server to my local WAMP machine because I installed the Redis server on my Windows 8 system and Redis client extensions on the WAMP.

I was able to see the frontend home page and backend.

When I clicked any link on the home page, I got the following error message:

The requested URL /apparel-shoe-jewelry/jewelry-watches/watches was not found on the server.

Does any of you know what cause the above problem.


texts:
I want to know if it's possible to add a global variable all through the site (so that if I need to change it, I would only need to do it once).

It's for an URL.


texts: Magento 2: Catalog Rule Collection -> filter by store

texts:
I have the following block of code that gets all active catalog rules:

$catalog_rule_collection = $objectManager
                         ->create('\Magento\CatalogRule\Model\RuleFactory')
                         ->create()
                         ->getCollection()
                         ->addFieldToFilter('simple_action', 'by_percent')
                         ->addIsActiveFilter(1);

->addFieldToFilter('simple_action', 'by_percent') filters results to catalog rules with a percentage discount.

->addIsActiveFilter(1) filters results to only activated catalog rules.

This simply retrieves table data from the catalogrule table. The following SQL query would achieve the same result:

SELECT discount_amount
FROM catalogrule
WHERE simple_action = 'by_percent' AND is_active = 1

How do I filter results by store-ID-specific catalog rules? So if a catalog rule affects store 1 but not store 2, how can I express the following:

->addStoreFilter(1) //pseudocode

Consider that the catalogrule table does not have a store column, nor is the store ID specified in the conditions_serialized or actions_serialized tables. Yet in Magento 2, catalog rules can be set uniquely by store.


texts: Can't find where this HTML is generated from

texts:
On this page, at the very bottom left, is a footer link to the privacy policy generated by HTML:

Privacy Policy

I have downloaded a backup of the live site, and have performed a search on every file/folder for privacypolicy or Privacy Policy and found no search results.

I have looked in CMS > Static Blocks & CMS > Widgets, and this code is not present there.

What possible other locations could this code be generated from?

Thanks.


texts: how to capture cybersource echeck programtically

texts:
i have credit limits payment method.

first user can place an orders with credit limit payment method.
later i'm trying to create an interface in my account section to pay  all invoice dues at once.

can u give me some solution to capture through cybersource echeck progrmatically.

update:

I placed an order with cybersource echeck. Now it is authorized successfully.
(module default payment action is authorize )
I'm trying to create an invoice. Invoice created successfully. But it is not contacting to cybersource gateway to capture the authorized amount.

3.Now i changed vendor/module-echeck/etc/config.xml file :

<can_capture>0</can_capture> to  <can_capture>1</can_capture>
4. Again I placed an order with cybersource echeck & authorized successfully.

Now i'm trying to create invoice, this time it is trying to contact cybersource gateway but its throwing below error.

  report.CRITICAL: Warning: Illegal offset type in isset or empty in
  vendor/magento/zendframework1/library/Zend/Http/Client.php on line 555
  {"exception":"[object] (Exception(code: 0): Warning: Illegal offset
  type in isset or empty in
  vendor/magento/zendframework1/library/Zend/Http/Client.php on line 555
  at vendor/magento/framework/App/ErrorHandler.php:61)"} []


texts: When is the `` tag needed in Magento 2 layout XML?

texts:
When is the <body> tag needed in layout XML, particularly when extending existing layouts?

The documentation provides examples where tags like <referenceBlock> are contained inside <body>, but it seems to work just as well when they are included directly under the root.

Documented style:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="something">
        ...
        </referenceBlock>
    </body>
</page>

Also seems to work:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceBlock name="something">
    ...
    </referenceBlock>
</page>

Per the XSD, only the former is allowed, but maybe Magento's logic just isn't strict about that?


texts: Magento 2.4.1: We can't find products matching this selection indexer issue

texts: This error message keeps displaying across the category pages of our Magento 2.4.1 site. Indexer status is below. Not sure what is the cause of this recurrent issue.


texts: Magento 1.9 recaptcha validation failed error

texts:
We have a module which enables reaptcha.I have it running on my magento 1.9.
The form works fine generated form the module. but some of the customer says they get "RECAPTCHA VALIDATION FAILED" error.
I dont know what must be the cause. there are no logs.


texts: How to set loaders in products image based on image loading in magento 2.2.5

texts: Is it possible to set Image loaders for all products while delaying to load images in magento 2.2.5


texts: products show up on category page but not in collection

texts:
I created a featured products slider on the home page. It was inserted via the following code:

{{block type="catalog/product_list" category_id="563" template="catalog/product/featured-products.phtml"}}

There are 24 products in the given category. They are showing up on the front end when you navigate to the featured-products.html category, but they are not all showing up for the static block on the home page. It seems they are not all in the collection. When I echo the following variable I get a 9, not a 24. I have reindexed and cleared cache. Any ideas?

<?php $_collectionSize = $_productCollection->count() ?>


texts:
I have a form in the store -> configuration what I've created in my system.xml.

Before save I want to validate it. When an error happens, I want to inform the user what field was not valid.

How can I read out the label of the field from a Magento\Framework\App\Config\Value in the beforeSave method?

Now I can read out like this:

$label = $this->getData('field_config')['label'];

But is this the proper way to get the label? Isn't there a method or cleaner way to do it?


texts: Magento Transactional email template header and footer not loading

texts:
In Magento 1.9.1 the email setup/building process was changed and the email templates are responsive.

In my case, my template email was not working, it was neither loading header nor footer, just appears that:

{{template config_path="design/email/header"}}
{{inlinecss file="email-inline.css"}}
{{template config_path="design/email/footer"}}

Then I updated my Magento store and it was working, but appeared many bugs in my Magento store so I replaced some updated folders and files with some old ones, then my Magento store worked again but the email template didn't load the header and footer, somebody knows what it can be?


texts:
I'm getting crazy with product image format in the gallery. I have some images that are 1280x1920 px that magento reduces to 800x1200 px.
The i set the view.xml file, i cleared the pub cached image folder, gave the command  php bin/magento catalog:image:resize and  php bin/magento cache:clean, but the image in the gallery is alway 400x700 px and has white borders in the fotorama stage. How can in fix it?


texts: I want to know that can't I make different auto meta template for different products in different category. For example I've two categories sofa and table now I want a different meta for sofa products and different meta for table product.


texts:
Just a quick question in regards to version control using github + modman. I understand how both work and can use both independently fine. However my query is the following:-

We version control every version of our sites into a private github repo, we want to start using modman to control our in-house built modules into our builds, what is the best approach to version controlling the website content so we can use github to deploy vs version controlling our modules seperately so they can be used and improved in multiple projects

Any advice in and around developing complete magento stores using this kind of approach would be appreciated. So would any advice into better ways or more efficient wants to manage this.

Ideally I want to get to the point where another one of our developers can pick up the project from github, clone onto a vanilla enterprise install and be able to update and deploy any modules modman has included.

EDIT The trouble I am having also is grasping how to actually get the files for a submodule when cloning from a repo. I have read other similar questions to this and they do not make total sense to me


texts: How to change the sort order of payment method Amazon in magento 2

texts:
I want to change the sort order of the Amazon payment method.

By default, it comes to the first place. I need to display it in third place.


texts:
we would like to upgrade our Magento 1.7.0.2 installation to 1.8 with around 40000 products and 25 store views.

In the past, we had bad experience upgrading our system. Our first installation was Magento version 0.8.

So we would like to test the upgrade risks before.

What is the best way for upgrading?

Making a new Magento 1.8 installation, and then connect them to the old 1.7 database?
Or set up a developer system and start upgrade process? How to set up a developer system for 25 store views?

Setting up and testing the new system might take a while.
During this time, we might get orders in the old Magento installation.
How can we get this orders sync with the new system?


texts: How to replace a content in checkout magento 2


texts: sales_order_place_before Observer Event not working in Magento 2

texts:
I have created an event sales_order_place_before. But it's not working.

You can see my code here :

app/code/Test/Inquiry/etc/frontend/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
   <event name="sales_order_place_before">
      <observer name="Test_Inquiry_sales_order_place_before"
           instance="Test\Inquiry\Observer\OrderPlacebefore"/>
   </event>
</config>

Here is observer code:

app/code/Test/Inquiry/Observer/OrderPlacebefore.php

namespace Test\Inquiry\Observer;

use Magento\Framework\Event\ObserverInterface;

class OrderPlacebefore implements ObserverInterface
{
 protected $_objectManager;

  public function __construct(
    \Magento\Framework\ObjectManagerInterface $objectManager
  ) {
      $this->_objectManager = $objectManager;
  }

  public function execute(\Magento\Framework\Event\Observer $observer)
  {
       echo  "Hello Testing ";die();
  }
}

Can you please help me to resolve the issue ?


texts: Uncaught TypeError: Cannot set property 'swipe' of undefined while loading PDP and keep on loading

texts:
I have used a custom theme in Magento 2.4.1
I am facing a console error while loading PDP & Page kept loading as well.
gallery.js:189 Uncaught TypeError: Cannot set property 'swipe' of undefined
at UiClass.initFullscreenSettings (gallery.js:189)
at UiClass.initialize (gallery.js:142)
at UiClass.initialize (wrapper.js:109)
at UiClass (class.js:49)

(New to Magento)


texts: How to use XML with condition in Magento 1?

texts:
This is my XML from layout:
<customer_account_index>
    <reference name="content">
        <block type="name_module/customer_account_welcome" name="customer_account_dashboard" before="-" template="name_module/customer/account/welcome.phtml"/>
    </reference>
</customer_account_index>
<customer_account_index>
    <update handle="customer_account_dashboard" />
    <reference name="content">
        <block type="cms/block" name="customer_account_dashboard_welcome" before="-">
            <action method="setBlockId"><block_id>succes-startkit</block_id></action>
        </block>
    </reference>
</customer_account_index>

This is the content of my template:
<?php if ($this->shouldDisplayWelcome()):?>
    <div class="welcome-msg">
        <?php echo $this->getChildHtml('customer_account_dashboard_welcome') ?>
    </div>
<?php endif;?>

and my function from my block:
public function shouldDisplayWelcome()
{
        $session = Mage::getSingleton('core/session');
        $welcome = $session->getShowWelcomeMessage();

        if ($welcome === true) {
            $session->setShowWelcomeMessage(false);

            return true;
        }

        return false;
}

Depends on what my function returns I want to display my static block or not. What am I  doing wrong from the layout?
Thanks
[UPDATE]
Right now this version of the XML doesn't work:
 <customer_account_index>
        <reference name="content">
            <block type="cms/block" name="customer_account_dashboard_welcome" before="-">
                <action method="setBlockId" helper="mynamespace_mymodule/customer/shouldDisplayWelcome">
                    <block_id>succes-startkit</block_id>
                </action>
            </block>
        </reference>
    </customer_account_index>

If i make a syntax error in my helper, I got the error message, but no matter what i return true or false in my function my static block is still displayed.


texts: Magento 2: New Customers not showing in backend

texts: I cannot see new customers in my M2 backend customers list and I figure out it's happening because my "Customer Grid" is not reindexed(Reindex required), Here is manual method to re-index CLI: php bin/magento indexer:reindex but how to make reindex automatically? like cronjob?


texts: Adding Meta tags to the head of a CMS page Magento 2.3.6

texts:
In order to add the following meta tags to the home page I have done the followings:
<meta property="og:image" content="https://example.com/media/wysiwyg/abc.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="512">
<meta property="og:image:height" content="512">
<meta name="title" property="og:title" content="My title">

I have created cms_index_index_selectable_home_Image.xmland cms_page_view_selectable_home_Image.xml under app/design/frontend/<them_vendor>/<theme_dir>/Magento_Cms/layout/
These are the contents of the XML files:

<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="head">
        <block name="facebookmeta" template="facebookmeta.phtml"/>
    </referenceContainer>
   </page>

I have created facebookmeta.phtml under app/design/frontend/<them_vendor>/<theme_dir>/Magento_Cms/templates/ and these are the contents:

<meta property="og:image" content="https://example.com/media/wysiwyg/abc.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="512">
<meta property="og:image:height" content="512">
<meta name="title" property="og:title" content="My title">

Under Content > Settings > Pages I have selected the home page and in the Design tab, in the Custom Layout Update field I have chosen Image.

I am using the Facebook Sharing Debugger Tool but the thumbnail image for the home page is not the one specified.


texts: Get order in observer after placing order

texts:
I have created an observer to capture the order after placing it for event checkout_onepage_controller_success_action as follows:

<?php
namespace Magento\SamplePaymentGateway\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Store\Model\StoreManagerInterface;

class ProcessGatewayRedirect implements ObserverInterface
{
    private $storeManager;
    protected $_checkoutSession;

    public function __construct(
        StoreManagerInterface $storeManager,
        \Magento\Checkout\Model\Session $checkoutSession
    ) {
        $this->storeManager = $storeManager;
        $this->_checkoutSession = $checkoutSession;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $orderId = $observer->getEvent()->getOrderIds();
        $base_url = $this->storeManager->getStore()->getBaseUrl();
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $order = $objectManager->create('\Magento\Sales\Model\Order') ->load($orderId[0]);
        $payment = $order->getPayment();

        $method = $payment->getMethodInstance();
        $methodTitle = $method->getTitle();

        $order_data= $order->getData();
        $status = $this->_checkoutSession->getLastOrderStatus();

        $increment_id = $order_data['increment_id'];
        $redirect = $objectManager->get('\Magento\Framework\App\Response\Http');
        $redirect->setRedirect($base_url.'custompayment/index/redirect/id/'.$increment_id.'');
        echo 'oid' ;var_dump($orderId);
        var_dump($base_url);
        echo 'method' ;var_dump($method);
        echo 'mettitle' ;var_dump($methodTitle);
        echo 'status' ;var_dump($status);
        return;

    }
}

I'm getting all the real data except order id. For example, orderId dumped by this code is 31 whereas the order id as seen in backend is 45. I ran the test for second time and orderId dumped is 32 and in the backend it is 46. What is happening here? How to get the actual order id?


texts: Where is the extensions attribute magento 2 actually save in Database?

texts:
For example, I've added an extension attribute to order
<!-- etc/extension_attributes.xml -->
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Sales\Api\Data\OrderInterface">
    <attribute code="tigren_attribute" type="Tigren\Example\Api\Data\TigrenAttributeInterface" />
    </extension_attributes>
</config>

after an order is saved , where can i find the ext attr in Db?


texts: Magento 2 : Expandable Column component - how to read data by row?

texts:
I need to use Expandable Column component in grid.
I used code from documentation
<column name="last_comment" class="ModuleCore\Order\Ui\Component\Listing\Column\LastComment">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/expandable</item>
                    <item name="tooltipTitle" xsi:type="string">Tooltip Title</item>
                    <item name="visibeItemsLimit" xsi:type="number">1</item>
                    <item name="options" xsi:type="array">
                        <item name="0" xsi:type="array">
                            <item name="value" xsi:type="number">1</item>
                            <item name="label" xsi:type="string" translate="true">Option #1</item>
                        </item>
                        <item name="1" xsi:type="array">
                            <item name="value" xsi:type="number">2</item>
                            <item name="label" xsi:type="string" translate="true">Option #2</item>
                        </item>
                    </item>
                </item>
            </argument>
            <settings>
                <label translate="true">Expandable Column Component Example</label>
            </settings>
        </column>

But I need to read data to options per row. How to customize that ?