texts:
I tried the below solution found over google but it doesn't gave me the required output.
I have edited the file as follows,
app/design/frontend/[template]/[package]/template/catalog/product/view/addtocart.phtml

<?php
$_product = $this->getProduct();
$buttonTitle = $this->__('Add to Cart');

if(Mage::helper('customer')->isLoggedIn() ):
    if($_product->isSaleable()):
?>

        <?php if(!$_product->isGrouped()): ?>
        <?php echo $this->__('Qty:') ?>
        <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
        <?php endif; ?>
        <button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><?php echo $buttonTitle ?></button>
        <?php echo $this->getChildHtml('', true, true) ?>

<?php
    endif;
else:
?>

<?php echo $this->__('Please login to buy this product', Mage::getUrl('customer/account'));?>

<?php
endif;
?>

Let me know, what I am missing here.


texts: Magento 2.4.1 - Category anchor not saved scope view

texts:
We have a problem in our Magento 2.4.1 install with the category anchor saving.
In the All Store Views scope the category is set to Anchor No.
When we change the scope to the only store view we have, then this category has Anchor set to Yes.
When we change it in that scope to No and save the category, the value is not saved and the category remains Anchor.
On the frontend the category is anchor, so the value of the website store view is applied.
How can we change/solve this?
Or is there a way to change the value directly into the DB of a specific category?


texts: Create new coupon for specific User and SKU in magento 2.2

texts: How to create a new coupon for a specific User and SKU using magento 2.2?


texts: How to get output from helper for path argument in layout?

texts:
<block class="Magento\Framework\View\Element\Html\Link\Current" ifconfig="custommodule/general/enable_footer_link" name="custommodule-link">
<arguments>
    <argument name="label" xsi:type="string">Custom Module</argument>
    <argument name="path" xsi:type="string" helper="NS\CustomModule\Helper\Data::getFrontName()"/>
</arguments>
</block>

I'm trying this in default.xml. how can i get a string from helper action for the path argument?


texts: Magento 2 : Only show products that is uploaded by specific admin user

texts:
I have created an admin user and i only want to display those products that is uploaded by him in backend but here all the products is displaying which other users have added instead of his products.

Please suggest a solution.


texts:
I am using an extension called GTspeed for image optimization; however it is not working because it is asking to give images wrtie permission.
I am using magento and ultimo theme if that will help in asnwering this question.
Thank You!


texts: Is it possible / what is the recommended approach to add a new custom binding to knockout in Magento 2?

texts:
I understand Magento 2 registers a number of custom knockout bindings in the Magento_Ui module, specifically through the initialize script in:

vendor/magento/module-ui/view/base/web/js/lib/ko/initialize.js

What's not yet clear to me is how I should go about registering my own custom binding from my own module.

Are there any other examples of custom bindings I could use for reference or any other documentation on the recommended approach to this in Magento 2?


texts:
I have added an extra column, by using custom module (upgradeScheme), into the table quote. How can I save my custom value into this column when quote is created? The value I want to add to this extra column can I get from the session. I just don't know how I can save this value into the quote. Please give a step by step instruction.

If I sum up my situation, it would be,

I have added an extra column in the table quote.
I can get the value I want to add to the custom column from session.
I know how to convert/copy data from Quote to Order.
I don't know how to save my custom value to the extra column I created in Quote.


texts: log_url_info logs the visitor's first url, regardless of page visited

texts:
The log_url_info table should ideally log every url visited. It seems to work by logging the "request_uri" in the session data for the user. "request_uri" in the session data is not updated, even after adding products to cart. The result is a new duplicate entry into "log_url_info" with every page load for that session.

Has anyone figured out how to fix the url logger so that it logs every url a visitor loads, not just the first?

Each of these url's should be different:

UPDATE:
I tried this in an ultra vanilla install of 1.9.3.0, with the only change being a switch from "Visitors only" to "Yes" in System -> Configuration -> System -> Log -> Enable Log same issue! Which confirms it's either a misconfiguration or a Magento bug.


texts: Get the number of rows in cart in Magento

texts:
I found places online that show how to get the number of items in the cart but how can I get the number of rows?

For example, if there are two different items in the cart there will be two rows, if there are three different items in the cart there will be three rows, but if three items in the cart but two are the same item then there will be only two rows and three items.

I need to get the number of rows in the cart?


texts: how to set "add new" button path which created by block file

texts:
I want to set "Add New" button path in custom Blog file.Please Help me out in this.

class Post extends \Magento\Backend\Block\Widget\Grid\Container
{

    protected function _construct()
    {
        $this->_controller = 'adminhtml_post';
        $this->_blockGroup = 'blockgroupnamew';
        $this->_headerText = __('Posts');
        $this->_addButtonLabel = __('Create New post');

        parent::_construct();
    }
}


texts: jQuery returning undefined for value in billing step on checkout

texts:
I use an extension, with which I broke down the checkout to 3/4 steps (logged in/ not logged in):
1. billing 2. payment method 3. order review

In billing the customer is asked for the first name & last name, email, street, region from a custom dropdown and phone number. Those are the things I need to know. In order to get paypal to work, I need to send more information which is required from paypal, otherwise it won't work. So I have the mentioned form (which are all custom attributes from the extension) and I have the default fields from the magento form, which I want to hide. When the customer clicks on continue in billing step, I create that address information on the fly and paste them into the required, hidden magento fields.

Here is a simple fiddle to see what I mean. In this fiddle everything works fine.

But in magento this doesn't work. This is my function

function checkFields(event) {
//returns undefined
// var company = jQuery('input#billing\\:aitoc_checkout_967').val();
var company = 'LW';  // working

//returns undefined
// var address = jQuery('#billing\\:aitoc_checkout_968').val();
var address = 'Street1';  // working

//working!?! this is a select, not an input field like the others
var bezirk = getNameFromId(jQuery('#billing\\:aitoc_checkout_966').val());
var city = 'MyCity' + bezirk;

var region = 80   // working
var country = 'DE'  // working
var postcode = '12345';  // working

//returns undefined
// var tel = jQuery('#billing\\:aitoc_checkout_969').val();
var tel = '654654';  // working

// writing the values into the hidden fields
jQuery('#billing\\:company').val(company);
jQuery('#billing\\:street1').val(address);
jQuery('#billing\\:city').val(city);
jQuery('#billing\\:region_id').val(region);
jQuery('#billing\\:country_id').val(country);
jQuery('#billing\\:postcode').val(postcode);
jQuery('#billing\\:telephone').val(tel);
}

When I hardcode the values for telephone, address and company and click continue the fields are filled and customer is forwarded to next step. If I want to get the values for the inputfields via jQuery jQuery('#billing\\:aitoc_checkout_969').val() console alsways returns undefined. No matter what I write into that inputfield it's always undefined. It is working for select element though. The line var bezirk = getNameFromId(jQuery('#billing\\:aitoc_checkout_966').val()); gives me the right option value and writes it correctly into the hidden fields...

I'm out of ideas. What could cause this behaviour?


texts: Best Way to Add JS file in Magento 2 Theme

texts:
I have created custom theme. I have to use bootstrap in my theme. So i am adding JS file as follows :

In theme directory /Magento_Theme/requirejs-config.js file.

var config = {
 paths:{
"jquery.bootstrap":"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min"
},
shim:{
'jquery.bootstrap':{
    'deps':['jquery']
}
}
};

But it's not working.

I have try with this in default_head_blocks.xml. JS file in theme/web/js directory

<script src="js/bootstrap.min.js"/>

but getting error Mismatched anonymous define() module


texts:
I've created a custom module in order to use a custom layout for the homepage of website. I've selected the custom layout from the dropdown view in pages/cms but for some reason I am getting a blank screen...

Here is my modules config.xml file

<?xml version="1.0"?>
<config>
  <modules>
    <My_Layout>
      <version>0.1.0</version>
    </My_Layout>
  </modules>
    <global>
        <page>
            <layouts>
                <one_column_home module="page" translate="label">
                    One Column Home
                    <template>page/1column-home.phtml</template>
                    <layout_handle>1 Column Home</layout_handle>
                </one_column_home>
            </layouts>
        </page>
    </global>
    <frontend>
        <layout>
            <updates>
                <my_layout>
                    <file>layout.xml</file>
                </my_layout>
            </updates>
        </layout>
    </frontend>
</config>

My layout.xml file

<?xml version="1.0"?>
<layout>
    <layout translate="label">
        1 Column Home
        <reference name="root">
            <action method="setTemplate"><template>page/1column-home.phtml</template></action>
        </reference>
    </layout>
</layout>

and the 1column-home.phtml I've removed the CSS in order to customise it!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">

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

<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
<?php echo $this->getChildHtml('after_body_start') ?>

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

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

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

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

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

<?php echo $this->getAbsoluteFooter() ?>

Module XML app/etc/modules

<?xml version="1.0"?>
<config>
  <modules>
    <My_Layout>
      <active>true</active>
      <codePool>local</codePool>
      <version>0.1.0</version>
        <depends>
            <Mage_Page />
        </depends>
    </My_Layout>
  </modules>
</config>

Anyone able to spot what I've done wrong please give me the heads up!


texts: Filter the attribute value of advanced search in according to the category dropdown selector option attribute in magento

texts: I have a 6 attribute(category, length, diameter, material, package, straight)  which is assign in advance search. I want when category dropdown is change the other attribute value dropdown will be change in according to the category attached product attribute, i.e. show other five attribute(length, diameter, material, package, straight) based on the selected category product attribute only.


texts: Custom Module disappear when cache is on

texts:
Help please,  I'm really stuck!

I have a custom module (ObserverInterface) to construct all my menu. When de Cache is on, you can see this module only in few pages.


texts: My update.log in /var/log is 64 GB. Can I delete this file or is there another way to prevent the file becoming this big?


texts: How to Install the AddThis Tools on Magento 2

texts:
vendor http://www.addthis.com/academy/how-to-install-the-addthis-tools-to-magento don't have Magento-2 integration guide on their site I tried to add that way in Magento-2 ( script link to paste ) but that didn't work and script is there as normal HTML tag.

<div class="addthis_toolbox addthis_default_style ">
    <script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=xa-5054e6c6502d114f" async="async"></script>
</div>


texts: Magento 2:Checkout phone number field should accept numbers plus special character like (-)?

texts:
In magento 2.1.X version checkout phone number should accept special character like (-) and should limit to 15 characters but currently it is accepting 10 characters only?
I did searched the core but could able to restrict and accept the special characters.


texts: Shipping and Payment Filters does not appear

texts: I have installed Shipping and Payment Filters using Magento Connect's installer. According to last reviews the module works with 1.7.0.2 CE but it does not appear on "Promotions" > "Checkout Rules" even after refreshing the cache and log out & log in again. I have also tried to re-install it. Can I do something else?


texts: Magento Catalog Search not display current store products only

texts:
I have one website - multiple stores

Store 1 : Sports Store (sports.mydomain.com)
Store 2 : Music Store  (music.mydomain.com)

My problem is when i search from any of store, products displayed from both stores. I want only products from current store.


texts: Building multi stores with multi domains but get 500

texts:
I am developing multi stores based on multi domains, I have strictly followed the tutorial online:

  http://devdocs.magento.com/guides/v2.0/config-guide/multi-site/ms_websites.html;
  http://devdocs.magento.com/guides/v2.0/config-guide/multi-site/ms_apache.html.

I have created three websites, three stores, and three store views, finished configuration about url at admin;
And then added the following to httpd.conf:

<VirtualHost 104.245.74.42:80>
  ServerName domain2.com
  ServerAlias mail.domain2.com www.domain2.com
  DocumentRoot /home/domain1/public_html
  SetEnv MAGE_RUN_CODE "domain2"
  SetEnv MAGE_RUN_TYPE "website"

  ServerAdmin webmaster@domain1.com
  UseCanonicalName Off
  CustomLog /etc/apache2/logs/domlogs/domain2.com combined
  <IfModule log_config_module>
    <IfModule logio_module>
      CustomLog /etc/apache2/logs/domlogs/domain2.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    </IfModule>
  </IfModule>
  <IfModule include_module>
    <Directory "/home/domain1/public_html">
      SSILegacyExprParser On
    </Directory>
  </IfModule>
  <IfModule alias_module>
    ScriptAlias /cgi-bin/ /home/domain1/public_html/cgi-bin/
  </IfModule>
</VirtualHost>

And the following to index.php

switch($_SERVER['HTTP_HOST']) {
    case 'domain1.com':
        $mageRunCode = 'base';
        $mageRunType = 'website';
    break;
    case 'domain2.com':
        $mageRunCode = 'domain2';
        $mageRunType = 'website';
    break;
}
$params = $_SERVER;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = $mageRunCode;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = $mageRunType;
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);

Basically domain1 is our primary domain, domain2 is the second domain. My boss also installed the cPanel to the domain2, and asked me to copy and paste the same index.php and .htaccess files from domain1 to domain2 root. And then use symbolic links under domain2 root directory to create links pointed to the app, web, var and pub folders from domain1.

But now the domain2.com shows 500, I have checked the error_log under root of domain2, and it says

  [06-Dec-2017 17:53:08 UTC] PHP Warning:
  require(/home/domain2/public_html/app/bootstrap.php): failed to open
  stream: No such file or directory in
  /home/domain2/public_html/index.php on line 22

  [06-Dec-2017 17:53:08 UTC] PHP Fatal error:  require(): Failed opening
  required '/home/domain2/public_html/app/bootstrap.php'
  (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in
  /home/domain2/public_html/index.php on line 22

, which seems that the symbolic links do not work.
Can anyone help me with it? Should we install the cPanel on domain2 (since it is not in the document)?

Thanks for any advises!


texts: Magento 2 what is the use of indexer backlogs?

texts:
When we run the php bin/magento index:status command it throws the complete view of the indexer.

In Below screenshot you can see the backlogs are way higher. I am trying to understand what is the use of it.  Does it mean those indexes are showing errors? Or will process those items later?

What does it indicate?  If it is related to errors then where do i see those errors?  Is there any specific log file?

Any help would be appreciated!


texts: Add custom block on success checkout page on Magento 1.7

texts:
I am trying to add a product list on checkout success page.
I edited the file: app\design\frontend\default\MY_THEME\layout\checkout.xml

I changed

<checkout_onepage_success translate="label">
    One Page Checkout Success
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="breadcrumbs">
            <action method="addCrumb"><crumbName>home</crumbName><crumbInfo>Home<title>Home</title></crumbInfo></action>
            <action method="addCrumb"><crumbName>checkout</crumbName><crumbInfo>Checkout<title>Checkout</title></crumbInfo></action>
    </reference>
    <reference name="content">
        <reference name="checkout.success">
            <action method="setTemplate"><template>checkout/success.phtml</template></action>
        </reference>
        <block type="catalog/product_list" name="product_list" template="catalog/product/list-limit.phtml">
            <action method="setColumnCount"><count>4</count></action>
        </block>
    </reference>
</checkout_onepage_success>

to

<checkout_onepage_success translate="label">
    One Page Checkout Success
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="breadcrumbs">
            <action method="addCrumb"><crumbName>home</crumbName><crumbInfo>Home<title>Home</title></crumbInfo></action>
            <action method="addCrumb"><crumbName>checkout</crumbName><crumbInfo>Checkout<title>Checkout</title></crumbInfo></action>
    </reference>
    <reference name="content">
        <reference name="checkout.success">
            <action method="setTemplate"><template>checkout/success.phtml</template></action>
        </reference>
        <block type="catalog/product_list" name="product_list" template="catalog/product/list-limit.phtml">
            <action method="setColumnCount"><count>4</count></action>
        </block>
    </reference>
</checkout_onepage_success>

But this hid the success.phtml page and show the product list.

I tried several other ways but not loaded anything.

Somebody can help me?


texts:
Is there a way to limit the maximum amount for a order only for some countrys and with different amount per country?

So e.g. Orders from Germany can be 500€ at max. excluding shipping, but orders from switzerland can be 800€ and for other countrys there is no limit?


texts: How to show url link in magento grid column

texts:
I want to add url in magento grid.If i click on that link then it takes me to desire page.
Similar to that image

I am making columns in grid like this.

<column name="product_name" class="Vendor\Module\Ui\Component\Listing\Column\Products\Product">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">textRange</item>

                <item name="label" xsi:type="string" translate="true">Product Name</item>
                <item name="sortOrder" xsi:type="number">10</item>
            </item>
        </argument>

    </column>

    <column name="sku" class="Vendor\Module\Ui\Component\Listing\Column\Products\Product">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">textRange</item>

                <item name="label" xsi:type="string" translate="true">SKU</item>
                <item name="sortOrder" xsi:type="number">20</item>
            </item>
        </argument>
    </column>


texts:
Ok, this is the follow up to a other question of mine. I just can't figure out the last detail.
I created a custom extension to set a order status to "Ready for Pickup". The button shows and is clickable but does not generate the correct action.
/app/code/local/Mymodule/Pickup/etc/config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
    <Mymodule_Pickup>
        <version>0.0.1</version>
    </Mymodule_Pickup>
</modules>
<global>
    <blocks>
         <adminhtml>
            <rewrite>
                <sales_order_view>Mymodule_Pickup_Block_Adminhtml_Sales_Order_View</sales_order_view>
            </rewrite>
        </adminhtml>
    </blocks>
</global>
</config>

/app/code/local/Mymodule/Pickup/controllers/Adminhtml/IndexController.php
<?php
class Mymodule_Pickup_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action

public function pickupAction()
{
  $orderId = $this->getRequest()->getParam('order_id');
  $order = Mage::getModel('sales/order')->load($orderId);
  $order->setStatus("pickup_ready");
  $order->save();
  // redirect to your sales order view page back
}
?>

/app/code/local/Mymodule/Pickup/Block/Adminhtml/Sales/Order/View.php
<?
class Mymodule_Pickup_Block_Adminhtml_Sales_Order_View extends Mage_Adminhtml_Block_Sales_Order_View
{
public function  __construct() {

parent::__construct();

$order = $this->getOrder();

    $this->_addButton('inform_pickup', array(
        'label'     => Mage::helper('sales')->__('Custom Pickup Button'),
        'onclick'   => 'setLocation(\'' . $this->getPickupUrl($order) . '\')',
    ));
}

public function getPickupUrl($order)
{
   return $this->getUrl('pickup/adminhtml_index/pickup', array('order_id' => $order->getId()));
}
}
?>

The problem is that my
return $this->getUrl('pickup/adminhtml_index/pickup', array('order_id' => $order->getId()));

is not working. It redirects me to a front page 404. What am I doing wrong in this Url?
UPDATE
Added /app/code/local/Mymodule/Pickup/etc/adminhtml.xml
<?xml version="1.0"?>
<config>
<acl>
    <resources>
        <admin>
            <children>
                <system>
                    <children>
                        <config>
                            <children>
                                <pickup translate="title" module="pickup">
                                    <title>Pickup</title>
                                    <sort_order>100</sort_order>
                                </pickup>
                            </children>
                        </config>
                    </children>
                </system>
            </children>
        </admin>
    </resources>
</acl>
</config>


texts: I want to get the all products and make changes in these product showing on the homepage


texts: How to Set Product First image as base Image programmatically

texts: How to set product first image as base image programmatically


texts:
My customer has a working Magento installation, where they are taking regular sales.  We have created them a new installation in a sub-directory of the working site.  It is a completely different site, new artwork, CSS pages, everything.  I need to know the best way to move the new site onto the root directory, and migrate all sales, customer, products, images, everything.

What I tried first, is to, change the database connection in the local.xml to the current database, and everything seemed to look fine from the back end, but when I went to the site it now showed the original pages.  I changed the base URL in the Web section of the admin, and now I have a conglomeration of both sites.  So, I put everything back as it was for the moment, till I can get a better solution.

Thank you in advance.


texts:
Hello i cant to translate this one http://prntscr.com/kt3mrb

my code is

        <?= $block->getChildHtml('state') ?>

        <?php if ($block->getLayer()->getState()->getFilters()): ?>

                <a href="<?= /* @escapeNotVerified */ $block->getClearUrl() ?>" class="action clear filter-clear"><?= /* @escapeNotVerified */ __('Clear All') ?>

        <?php endif; ?>
        <?php $wrapOptions = false; ?>
        <?php foreach ($block->getFilters() as $filter): ?>
            <?php if (!$wrapOptions): ?>
                <?= /* @escapeNotVerified */ __('Shopping Options') ?>

            <?php $wrapOptions = true; endif; ?>
                <?php if ($filter->getItemsCount()): ?>

<?= $block->escapeHtml(__($filter->getName())) ?>

<?= /* @escapeNotVerified */ $block->getChildBlock('renderer')->render($filter) ?>

                <?php endif; ?>
        <?php endforeach; ?>
        <?php if ($wrapOptions): ?>

        <?php endif; ?>

and my translate is

"Filter","Φιλτράρετε με",module,Magento_Catalog

any suggest?


texts: Prevent cart empty before connecting to payment

texts:
Currently in Magrnto 2 before connecting to payment gateway, the in the quote table the is_active status is becoming zero and a new dummy record is created in the same table. So, if the customer not completing the order, and left right from the payment page, the cart becomes empty on his next visit.
I would like to prevent this. hence, I have added a plugin in di.xml as below,
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Sales\Api\OrderManagementInterface">
        <plugin name="ucs_making_the_cart_alive" type="Ucs\ActiveCart\Plugin\OrderServicePlugin" sortOrder="5"/>
    </type>
</config>

And in the plugin added a afterPlace method as below,
<?php

namespace Ucs\ActiveCart\Plugin;

use Magento\Sales\Api\Data\OrderInterface;
use Magento\Sales\Api\OrderManagementInterface;
use Magento\Sales\Api\OrderRepositoryInterface;

class OrderServicePlugin
{
    protected $_orderRepository;
    protected $_quoteRepository;

    protected $_quoteFactory;
    protected $_quoteModel;

    public function __construct(
        OrderRepositoryInterface $OrderRepositoryInterface,
        \Magento\Quote\Model\QuoteRepository $quoteRepository,

        \Magento\Quote\Model\QuoteFactory $quoteFactory,
        \Magento\Quote\Model\ResourceModel\Quote $quoteModel,

        \Magento\Framework\App\Action\Context $context
    )
    {
        $this->_orderRepository = $OrderRepositoryInterface;
        $this->_quoteRepository = $quoteRepository;

        $this->_quoteFactory = $quoteFactory;
        $this->_quoteModel=$quoteModel;

    }
    public function afterPlace(
        OrderManagementInterface $subject,
        OrderInterface $result
    ) {
        //$return = $proceed($order);

        $order_increment_id = $result->getIncrementId();
        $order_id = $result->getEntityId();

        //$order_id = $order->getEntityId();

        $log_date = date('d-m-Y');

        /* START : BELOW LOG IS USED TO CAPTUE THE RECEIVED AND RESPONDED DATE */
        $log_file = '/var/log/plugin-cart-active-'.$log_date.'.log';
        $writer = new \Zend\Log\Writer\Stream(BP . $log_file);
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);

        $logger->info($order_increment_id);
        $logger->info($order_id);
        /* END : BELOW LOG IS USED TO CAPTUE THE RECEIVED AND RESPONDED DATE */

        try {

            $order = $this->_orderRepository->get($order_id);

            $logger->info('Making the quote process active before payment process begins for the order entity id ->'.$order_id);

            $quote_id = $order->getQuoteId();

            $logger->info('Quote ID for the order has been deducted as ->'.$quote_id);

            $quote = $this->_quoteRepository->get($quote_id); // Get quote by id
            $quote->setIsActive(1)->setReservedOrderId(null)->save();

            $quote->setData('is_payment_initiated', 1); // Fill data
            $logger->info(json_encode($quote->getData()));
            $this->_quoteRepository->save($quote); // Save quote
            $logger->info('Quote Saved');

            $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
            $_checkoutSession = $objectManager->create('\Magento\Checkout\Model\Session');
            $_checkoutSession->replaceQuote($quote);

        } catch (\Exception $e) {
            $logger->info('Error in updation process');
            $logger->info($e->getMessage());
        }

        return $result;

    }
}

But still the is_active status is not becoming active. What happens is the logic works but only after that the dummy record creation and making the actual is_active status becoming zero process is happening.
How can I override this behavior?


texts:
My name is Mathias, I'm completely new to web-development and all of this and I would appreciate it if someone can quide me the right way to start learning the basics.

Very short part to my background:

I have a small clothing-printing studio, for that I have now two magento2 stores. The stores are set-up on a dedicated server that I am renting, and I had a development team which did all the setup work for me.

Now both stores are ready to use and run well, I can access the magento2 backend and I get along pretty well with setting up basic things like cms pages, blocks, homepage layout and that.

But I'm planning to enter a new world for me, the world of coding.
Because right now I always need to hire someone, even if it's a tiny thing like changing the wording on the product page. This is not a good solution over the long term.
I had a shopify-store in the past, and I got along very well on changing small things on product pages and so on within html.

Now I would like to be able make changes to my magento stores as well.
My dream would be to be able to install and test extensions on my own,
to create changes on the product page template and other templates on my own, to be able to troubleshoot smaller problems and so on.

In general to have a good understanding of that topic, but my main focus would be the interface/frontend part and look and feel of the stores.

But I'm completely stuck and don't even know how I can access the code of my store, or what is needed to do this and how to connect a needed editor to my server so I can enter the code.

Or how to make a duplicate of my theme to only make changes to this duplicate so I don't ruin my normal store. (This all was very easy in shopify)

Now to my final question:

Where should I start?

All toturials or learnings that I can find start with setting up magento from scratch, but I already have the store on my server.
And on my server c-panel I have a hard time finding anything.

Is there any toturial out there that can help me at my stage?
Or should I start a learning project and set up a fresh store with one of those toturials out there?

Or maybe it's super easy to set up such an editor where I can edit the code and after that I can start from there?

What would be your suggestion?
I am very happy for every word of help.

Thank you all, best regards
Mathias


texts: How to change theme programatically for specific controller?

texts:
How to change theme programatically for specific controller ?

I have to change theme for a particular controller.


texts: How we can noindex,nofollow the category-product-url?

texts:
I want to noindex,nofollow only those product urls in which category is coming in url.

For example : I have product abc.html and it is assigned to 2 categories so it can open by three ways.

1. category1/abc.html

2. category2/abc.html

3. abc.html

I want to set noindex,nofollow for only above 1 and 2 point.Means if a product contains with category url.


texts: Can't call a block on template email magento after install the security patch 6788

texts:
I have create a block on template email on magento 1.8.1

  {{block type="core/template" area="frontend" template="email/bankdetails.phtml" order=$order store=$store }}

it worked normally. But when I install a security pacth 6788, It did not work.
I checked System > Permissions > Blocks and I saw the blocks (core/template) are allowed for inclusion. How can I fix that problem?


texts: How to display all the shipping details in system.log after clicking on Place Order Button

texts:
I want to display all the shipping details on system.log when user clicks Place Order button. I used event handler to display Customer Id and Customer name, but I am unable to display other details like Product name, Order Id, Address, Price, Quantity etc. How can I display all the shipping details by using event handler?
Thanks..

The given below is my xml code:

<global>
       <models>
           <User_Tracker>
               <class>User_Tracker_Model</class>
           </User_Tracker>
       </models>
       <events>
           <sales_order_place_after>
               <observers>
                   <User_Tracker>
                       <type>singleton</type>
                       <class>User_Tracker/observer</class>
                       <method>customOrderSave</method>
                   </User_Tracker>
               </observers>
           </sales_order_place_after>
       </events>
   </global>

and the given below is my observer code:

class User_Tracker_Model_Observer extends Mage_Core_Model_Abstract
 {
    public function _construct()
    {
        parent::_construct();
        $this->_init('tracker/observer');
    }
    public function customOrderSave($observer)
     {
      $order = $observer->getEvent()->getOrder();
      $customer_name = $order->getCustomerName();
      $customer_id = $order->getCustomerId();
      Mage::log($customer_id);
      Mage::log($customer_name);
    }
}


texts: Magento 2 : Which File & Line app/etc/di.xml Config Will Load by App

texts:
I need to know, area wise config will load by application entry point files like /Magento/Framework/App/Http launch method.

But I'm not able to figure it out app/etc/di.xml config load.


texts: How can I set created_at date for dynamically created order?

texts: I'am developing order generating shell script for my developing needs, which allow to generate orders for any period. I've used this comment as template. Unfortunatelly, all orders has today created_at date. I can change this date after order was generated, but this is slow, because I need to load it first and save after. Is it possible to set created_at date before order generation?


texts: magento with nginx not found page show as defualt one with one magento html

texts:
when i type any invlaid url it shows like below

instead i want to show my website page

current setting of nginx.conf (in magento root folder)

root $MAGE_ROOT/pub;
index index.php;
autoindex off;
charset UTF-8;
error_page 404 403 = /errors/404.php;
#add_header "X-UA-Compatible" "IE=Edge";

i tried changing it and

root $MAGE_ROOT/pub;
index index.php;
autoindex off;
charset UTF-8;
error_page 404 403 = https://example.com/no-route;
#add_header "X-UA-Compatible" "IE=Edge";

then it directed me to that url , i do not want redirect it show show not found message on that url only please help me with what

Magento code base : /usr/share/nginx/html/m1

Server Nginx Setting

server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name  localhost;
        # root         /usr/share/nginx/html/m1;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        set $MAGE_ROOT /usr/share/nginx/html/m1;
        include /usr/share/nginx/html/m1/nginx.conf;

        #location / {
        #}

        # redirect server error pages to the static page /40x.html
        #
        error_page 404 /404.html;
            location = /40x.html {
        }

        # redirect server error pages to the static page /50x.html
        #
        #error_page 500 502 503 504 /50x.html;
        #    location = /50x.html {
        #}

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
            include        fastcgi_params;
        }

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }

Magento folder nginx.conf

index index.php;
autoindex off;
charset UTF-8;
error_page 404 403 = /errors/404.php;
#add_header "X-UA-Compatible" "IE=Edge";


texts: How to have “My Cart” in banner7.phtml? how to show everything same like in header My cart

texts:
i have installed magento 1.8.1 and i want to show My Cart right after banner section. i am placing the code in banner.phtml file and it seems working but problem is that it is not showing cart items and cost etc stuff. can any one please share some universal code that can be used anywhere in .phtml file. my source code is below:

        <?php $_cartQty = $this->getSummaryCount() ?>

            <?php echo $this->__('My Cart') ?>: <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>

            <?php $_items = $this->getRecentItems() ?>
            <?php if(count($_items)): ?>

                <?php foreach($_items as $_item): ?>
                    <?php echo $this->getItemHtml($_item) ?>
                <?php endforeach; ?>

            <?php else: ?>

<?php echo $this->__('You have no items in your shopping cart.') ?>

            <?php endif ?>
            <?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>

                <?php echo $this->getChildHtml('extra_actions') ?>
                <button type="button" title="<?php echo $this->__('Checkout') ?>" class="button" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')"><?php echo $this->__('Checkout') ?></button>

            <?php endif ?>


texts: Error: Mage registry key "_singleton/rkt_jscssforsb/observer" already exists

texts:
I am building a magento B2B webshop
and now I cant do anything with it because of some error

a:5:{i:0;s:69:"Mage registry key "_singleton/rkt_jscssforsb/observer" already exists";i:1;s:3637:"#0 app/Mage.php(223): Mage::throwException('Mage registry k...')
#1 app/Mage.php(477): Mage::register('_singleton/rkt_...', false)
#2 app/code/core/Mage/Core/Model/App.php(1316): Mage::getSingleton('rkt_jscssforsb/...')
#3 app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('adminhtml_block...', Array)
#4 app/code/core/Mage/Adminhtml/Block/Template.php(80): Mage::dispatchEvent('adminhtml_block...', Array)
#5 app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#6 app/code/core/Mage/Adminhtml/Block/Dashboard/Diagrams.php(55): Mage_Core_Block_Abstract->toHtml()
#7 app/code/core/Mage/Core/Block/Abstract.php(293): Mage_Adminhtml_Block_Dashboard_Diagrams->_prepareLayout()
#8 app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#9 app/code/core/Mage/Adminhtml/Block/Dashboard.php(66): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...')
#10 app/code/core/Mage/Core/Block/Abstract.php(293): Mage_Adminhtml_Block_Dashboard->_prepareLayout()
#11 app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#12 app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...', 'dashboard')
#13 app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('adminhtml/dashb...', 'dashboard')
#14 app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#15 app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#16 app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#17 app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#18 app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#19 app/code/core/Mage/Adminhtml/controllers/DashboardController.php(40): Mage_Adminhtml_Controller_Action->loadLayout()
#20 app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_DashboardController->indexAction()
#21 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#22 app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#23 app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#24 app/Mage.php(684): Mage_Core_Model_App->run(Array)
#25 index.php(87): Mage::run('', 'store')
#26 {main}";s:3:"url";s:81:"/Magento/index.php/ma_admin/dashboard/index/key/f1e58b7d15977224c929ac0010422f85/";s:11:"script_name";s:18:"/Magento/index.php";s:4:"skin";s:5:"admin";}


texts: Is it possible to disable widget without widget.xml changes?

texts:
I have extension with widget.xml file where there are 5 defined widgets. 1 of the widgets is available only to premium customers. I don't want this widget to show up inside Widget type selection in CMS->Pages when you click insert new widget icon.

Is there any way to programmatically remove widget without removing it from widget.xml?


texts: Magento 2.3.4 - Multie store 503 Service Unvailable

texts:
I tried to create a second website.

1.Created website

code: base_new

2.Created store

code: store_new

3.Create store view

code: newstorename

4.Configuration > Web > Add Store Code to Urls

Set to YES

5.Changed scope to store_new

6.Changed Base Url in that scope from http://www.myshop.com/ to http://www.myshop.com/newstorename/ (also tried https://www.myshop.com/store_new/)

7.Clear cache, flushed cache, reindex.

But I keep getting 503 Service Unavailable notices.
Due to the Add Store Code Url settings the main website is now also under a code https://www.myshop.com/mainwebsite/ there I also get a 503 warning...however..if I go to a category page https://www.myshop.com/mainwebsite/category.html there isn't any problem and the page shows up.


texts: Magento 2.1 :- CMS Page and Static Block

texts:
Here one issue in my magento 2.1.
I create one di.xml file for my own module but i got error in cms page and static block.
Check below image for cms page and static block error.

CMS Page:-

Static Block:-

And Below my di.xml code for admin panel. (Job/Test/etc/adminhtml/di.xml)

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <virtualType name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Pool" type="Magento\Ui\DataProvider\Modifier\Pool">
        <arguments>
            <argument name="modifiers" xsi:type="array">
                <item name="testtab" xsi:type="array">
                    <item name="class" xsi:type="string">Job\Test\Ui\Component\DataProvider\Product\Modifier\Testtab</item>
                    <item name="sortOrder" xsi:type="number">200</item>
                </item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Job\Test\Ui\Component\DataProvider\Product\Modifier\Testtab">
        <arguments>
            <argument name="scopeName" xsi:type="string">product_form.product_form</argument>
        </arguments>
    </type>
    <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
        <arguments>
            <argument name="collections" xsi:type="array">
                <item name="testtab_test_listing_data_source" xsi:type="string">Job\Test\Model\ResourceModel\Test\Grid\Collection</item>
                <item name="demo_index_grid_data_source" xsi:type="string">Job\Test\Model\ResourceModel\Test\Grid\Collection</item>
            </argument>
        </arguments>
    </type>
</config>


texts: PayPal Payment Not Showing Up In Magento

texts:
I'm using PayPal on a Magento 1.4.0.1 site. When a new order from a guest is placed using PayPal the order doesn't receive payment authorization.  The status remains at "pending".
This doesn't happen in all cases, we have plenty of PayPal orders that go through, so perhaps it's for users who didn't have PayPal accounts authorized or needed to add funds to them.  The customer information doesn't show up in PayPal either.
In the end we have a Magento order # with a status of pending waiting for a PayPal authorization that doesn't seem to be coming.  Any ideas?


texts: Magento2: How can I modify custom order number?

texts:
I want to modify order number 000000001 to 202000001.

Please help me in this.


texts: How to extend a Magento 1.9 model source [Solved]

texts:
I need to remove an option from original options so I extended the core model. The original file looks like this:

  app/code/core/Mage/ImportExport/Model/Source/Import/Behavior.php

class Mage_ImportExport_Model_Source_Import_Behavior
{
    /**
     * Prepare and return array of import behavior.
     *
     * @return array
     */
    public function toOptionArray()
    {
        return array(
            array(
                'value' => Mage_ImportExport_Model_Import::BEHAVIOR_APPEND,
                'label' => Mage::helper('importexport')->__('Append Complex Data')
            ),
            array(
                'value' => Mage_ImportExport_Model_Import::BEHAVIOR_REPLACE,
                'label' => Mage::helper('importexport')->__('Replace Existing Complex Data')
            ),
            array(
                'value' => Mage_ImportExport_Model_Import::BEHAVIOR_DELETE,
                'label' => Mage::helper('importexport')->__('Delete Entities')
            )
        );
    }
}

I have an extension that is used to extend all core files and the extended file below. This My_CoreExtension extension is already enabled and extending a few other core files and they are all working fine.

The problem is that my extended Bahavior.php is not called so I know my extend way is not rigtht but I don't know how to fix it.

  app/code/local/My/CoreExtension/Model/ImportExport/Source/Import/Behavior.php

class My_CoreExtension_Model_ImportExport_Source_Import_Behavior extends Mage_ImportExport_Model_Source_Import_Behavior
{
    public function toOptionArray()
    {
        return array(
            array(
                'value' => Mage_ImportExport_Model_Import::BEHAVIOR_APPEND,
                'label' => Mage::helper('importexport')->__('Append Complex Data')
            ),
            array(
                'value' => Mage_ImportExport_Model_Import::BEHAVIOR_REPLACE,
                'label' => Mage::helper('importexport')->__('Replace Existing Complex Data')
            ),
        );
    }
}

Here is the config.xml and I've removed unrelated parts.

  app/code/local/My/CoreExtension/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <My_CoreExtension>
            <version>1.0.1</version>
        </My_CoreExtension>
    </modules>
    <global>
        <models>
            <importexport>
                <rewrite>
                    <import_source_behavior>My_CoreExtension_Model_ImportExport_Source_Import_Behavior</import_source_behavior>
                </rewrite>
            </importexport>
        </models>
    </global>
</config>


texts: Magento 2 - How to make a event based module in back end?

texts:
How Can I perform this event: if some one from Magento admin delete any customer then write a log which admin user delete that customer and date and time of the action.

Any help would be appreciated.

Thanks in advance..!


texts: Magento 2.3.3 declarative schema column type json

texts:
I want to create One table model using declarative schema having one column type as json.

    <?xml version="1.0" ?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
    <table comment="levosoft_partpicker_imagetags Table" engine="innodb" name="levosoft_partpicker_imagetags" resource="default">
        <column comment="Entity Id" identity="true" name="imagetags_id" nullable="false" padding="6" unsigned="true" xsi:type="smallint"/>
        <constraint referenceId="PRIMARY" xsi:type="primary">
            <column name="imagetags_id"/>
        </constraint>
        <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
                default="0" comment="Entity ID"/>
        <column name="tags_json" nullable="true" xsi:type="json"/>
        <index referenceId="INDEX_PARTPICKER_PRODUCT" indexType="btree">
            <column name="entity_id"/>
        </index>
        <constraint xsi:type="foreign" referenceId="TEXTMIMEDI_PAARTPICKER_IMAGETAGS_CAT_PRD_ENTT_ENTT_ID"
                    table="levosoft_partpicker_imagetags" column="entity_id" referenceTable="catalog_product_entity"
                    referenceColumn="entity_id" onDelete="CASCADE"/>
    </table>
</schema>

I captured following error:-

/var/www/public_html/vendor/magento/framework/Setup/Declaration/Schema/SchemaConfig.php:82:
string(412) "The XML in file "/var/www/public_html/app/code/Levosoft/Partpicker/etc/db_schema.xml" is invalid:
Element 'column', attribute '{http://www.w3.org/2001/XMLSchema-instance}type': The QName value 'json' of the xsi:type attribute does not resolve to a type definition.
Line: 9

The error shows that yet magento had not added support for json type.

Any proper work around? Other then I `alter type later via sql`

fmi:
To check declarative schema is working properly you have to run following command:

php bin/magento setup:db-declaration:generate-whitelist --module-name=Textmimedia_Partpicker

If no error in script it will generate whitelist file else no error will be displayed & file not generated.
To check its error you have to update following code in core file (/public_html/vendor/magento/framework/Setup/Declaration/Schema/SchemaConfig.php) for testing:

public function getDeclarationConfig()
    {
        try {
        $schema = $this->schemaFactory->create();
        $data = $this->readerComposite->read(FileResolverByModule::ALL_MODULES);
        $this->declarativeSchemaBuilder->addTablesData($data['table']);
        $schema = $this->declarativeSchemaBuilder->build($schema);
        return $schema;
        } catch (\Exception $e) {
            var_dump($e->getMessage());exit;
        }
    }

SOLUTION EXPECTED IS: HOW TO ADD THIS OPTION IN MAGENTO2.3


texts: Magento : Admin Magento Connect Manager is Showing Wrong Version

texts:
I have upgraded my site from 1.8.1.0 to 1.9.3.2.

Now when I check in admin magento connect manager it show's version 1.8.1.0,
and when I click to check for upgrade it show's 1.9.3.2 version to upgrade.

How to resolve this ?


texts:
What are the equivalent classes for the below in Magento2 ?

Does Magento2 core uses these classes? If so in which class can i find them ?

Mage_Adminhtml_System_Convert_GuiController

Mage_ImportExport_Adminhtml_ImportController

Mage_Catalog_Model_Convert_Adapter_Product

Mage_Dataflow_Model_Convert_Adapter_Io

Mage_Api_Model_Resource_Abstract

Mage_Core_Model_Abstract

If not, how to extend these classes from my custom classes?


texts: How to display layered navigation inside a sticky sidebar in magento CE 1.9

texts:
All the category pages are 1column layout. i had created a sticky sidebar in the list.phtml

.....
.....

<?php endif; ?>

&nbsp;

 // need the layered navigation here

i had tried :

<?php echo $this->getLayout()->createBlock('catalog/layer_view')->setTemplate('catalog/layer/view.phtml')->toHtml() ?>

definitely this is causing some problems with

$_renderers = $this->getParentBlock()->getChild('state_renderers')->getSortedChildren();

In state.phtml

and it will display(only displays) if i assign $_renderers=null, but its clear that it will not filter any products

I had commented the left.nav block in catalog.xml file as shown below since im using a single column layout.

Catalog Category (Anchor)
    <reference name="left_first">
        <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml">
            <block type="core/text_list" name="catalog.leftnav.state.renderers" as="state_renderers" />
        </block>
    </reference>


texts: M1 to M2 data migration flat catalog differing

texts: When migrating data from M1 to M2, can you migrate with flat product data enabled on M1, but disabled on M2?


texts: Overriding invoice email template in Magento 2.3

texts:
I need to override invoice email template and add a variable (po number) in the template. I ve followed a few tutorials but they didn't help at all. I have an email template in admin panel at Marketing > email templates . I am new to Magento and don t know how to find this file and associated files in source code. Thank you
Edit: html/vendor/magento/module-sales/Model/Order/Email/Sender/InvoiceSender.php
i guess this is the file that i have to add an observer and push the data in transport object. I couldn't figure out how to do it though.


texts:
I want to extend .less values from another theme, in my theme I've added the following file "web\css\source\ _extend.less" that is containing:

/* Import: Layouts extensions */
@import '_layouts_themes_extend.less';

Because I want the changes seperated in multiple files (like told here: http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-guide/css_quick_guide_approach.html#structured_extend)

The file "web\css\source\ _layouts_themes_extend.less" contains:

.header-container{
        .top-link-container{
            .block-search{
                float: left;
                padding-left:0px;
            }
       }
 }

Now in the end I see the following in chrome developer tool:

    //themes.css
    .header-container .top-link-container .block-search {
        float: right;
        position: relative;
        display: block;
        width: auto;
        margin-left: 20px;
    }
    //styles-l.css
    .header-container .top-link-container .block-search {
        float: left;
        padding-left: 0px;
    }
    //styles-m.css
    .header-container .top-link-container .block-search {
        float: left;
        padding-left: 0px;
    }

So the themes.css overwrites my values set in the extended file... Is my structure not right?


texts: Magento2 - How to use Magento_Catalog/js/price-box to format price in template?

texts: I want to format my price in template, and I find some place told about Magento_Catalog/js/price-box, But I don't know how to use it, Anyone can help me show me how to do.


texts: Upgrade to Magento CE 1.9.1 is blocked by Lib_google_checkout

texts:
There seems to be a circular dependency problem upgrading form CE 1.9.0.1 to CE 1.9.1.0.

When I try to upgrade Mag_Core_Modules from 1.9.0.1 to 1.9.1.0, it complains:

  Checking dependencies of packages

  CONNECT ERROR: Package community/Lib_Google_Checkout 1.9.1.0 conflicts
  with: community/Mage_Core_Modules 1.9.0.1

  Checking dependencies of packages Already installed:
  community/Lib_Varien 1.9.1.0, skipping Already installed:
  community/Lib_Js_Calendar 1.51.1.1, skipping Already installed:
  community/Lib_Js_Mage 1.9.1.0, skipping Already installed:
  community/Lib_Phpseclib 1.5.0.0, skipping Already installed:
  community/Mage_Locale_en_US 1.9.1.0, skipping Already installed:
  community/Lib_Magento 1.9.1.0, skipping Already installed:
  community/Lib_Credis 1.8.0.0, skipping Already installed:
  community/Lib_Pelago 1.9.1.0, skipping Already installed:
  community/Lib_ZF 1.12.7.0, skipping Already installed:
  community/Lib_Js_Prototype 1.7.0.0.5, skipping Already installed:
  community/Lib_ZF_Locale 1.12.7.0, skipping

  CONNECT ERROR: Package community/Mage_Core_Modules 1.9.1.0 conflicts
  with: community/Aramex_Shipping_Tracking_API 2.0.1 Package
  community/Lib_Google_Checkout 1.9.1.0 conflicts with:
  community/Mage_Core_Modules 1.9.0.1 Package community/Lib_Mage
  1.9.1.0 conflicts with: community/Mage_Core_Modules 1.9.0.1

I'm not bothered by Aramex at this stage, but when I try to upgrade Lib_Google_Checkout 1.9.1.0, it can't because of the conflict with Mag_core

Could this mean that Aramex blocks the upgrade to Mage_Core_Modules 1.9.1.0, and the whole thing cascades from there?


texts: Magento 2 Add review form on custom page

texts:
I have custom module page which has products on a slider.

When I click on slider product according to that product I want to show a Review - Rating Form on custom page which can be filled once by customer who logged-In.

Here is the page where I want to show review form :

When I click on test product review form should be visible on a block.

Below form should be visible according to Product :

Updated code (I tried this in my xml):

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <update handle="review_product_form_component"/>
    <referenceContainer name="content">
            <block class="<vendor>\Review\Block\Order\Products" name="thinkideas_review_products" template="<vendor>_Review::reviewproducts.phtml">
                <block class="Magento\Review\Block\Product\Review" name="reviews.order.test" as="reviews_testorder" template="Magento_Review::review.phtml" >

                    <block class="Magento\Review\Block\Form" name="product.review.form.test" as="review_form_order"/>
                    </block>
            </block>
    </referenceContainer>
</body>

Any suggestion would be appreciated.


texts: How can I add prefix in magento 2 Category/Product URL?

texts:
This is development url : http://www.neplyn.in/mage2/

http://www.neplyn.in/mage2/best-sellers

I want to add prefix 'collection' just before the best-sellers .

I need to the same things in the product url too.

How can i do this ?


texts:
Default magento captcha i set all  configurations and added in custom form

       <?php echo $block->getChildHtml('catcaptcha');?>

In my local it was working , but in prodcution its not working.


texts: how to save checkbox values in database in magento

texts:
How to save checkbox values in database in magento ?
My code is:

$fieldset->addField('expertise', 'checkboxes', array(
    'name'      => 'expertise',
    'label'     => Mage::helper('checkout')->__('Expertise Area'),
    'required'  => true,
    'values'   =>array('Php','.Net')
));


texts: Magento2: how can we use xsd file in magento2

texts: what is role of xsd files which are located in etc (eg: etc/abc.xsd) and how can we use these files in Magento2 and also how can we relate it from magento1.*.


texts: How to insert an ui grid with related records in an ui form

texts:
I have inserted a grid in a form and I want to filter the listed records by the form id to show all related records.

Ho can I set the filter???
Please help me!!

Thats my dataprovider:
namespace Mcas\GhsCategory\Model\Ghscategory;

class DataProvider extends \Magento\Ui\DataProvider\AbstractDataProvider
{
    /**
     * Loaded data cache
     *
     * @var array
     */
    protected $loadedData;

    /**
     * Data persistor
     *
     * @var \Magento\Framework\App\Request\DataPersistorInterface
     */
    protected $dataPersistor;

    /**
     * constructor
     *
     * @param string $name
     * @param string $primaryFieldName
     * @param string $requestFieldName
     * @param \Mcas\GhsCategory\Model\ResourceModel\Ghscategory\CollectionFactory $collectionFactory
     * @param \Magento\Framework\App\Request\DataPersistorInterface $dataPersistor
     * @param array $meta
     * @param array $data
     */
    public function __construct(
        $name,
        $primaryFieldName,
        $requestFieldName,
        \Mcas\GhsCategory\Model\ResourceModel\Ghscategory\CollectionFactory $collectionFactory,
        \Magento\Framework\App\Request\DataPersistorInterface $dataPersistor,
        array $meta = [],
        array $data = []
    ) {
        $this->dataPersistor = $dataPersistor;
        parent::__construct($name, $primaryFieldName, $requestFieldName, $meta, $data);
        $this->collection = $collectionFactory->create();
    }

    /**
     * Get data
     *
     * @return array
     */
    public function getData()
    {
        if (isset($this->loadedData)) {
            return $this->loadedData;
        }
        $items = $this->collection->getItems();
        /** @var \Mcas\GhsCategory\Model\Ghscategory $ghscategory */
        foreach ($items as $ghscategory) {
            $this->loadedData[$ghscategory->getId()] = $ghscategory->getData();

        }
        $data = $this->dataPersistor->get('mcas_ghscategory_ghscategory');
        if (!empty($data)) {
            $ghscategory = $this->collection->getNewEmptyItem();
            $ghscategory->setData($data);
            $this->loadedData[$ghscategory->getId()] = $ghscategory->getData();
            $this->dataPersistor->clear('mcas_ghscategory_ghscategory');
        }
        return $this->loadedData;
    }
}


texts: can I install magento 1.9 module to magento 2

texts: I have one Magento 1.9 module, can I install to magento 2? There are any solution there? Because Folder Structure are difference in magento 1.9 and magento 2, If Migration tool can Migrate Single magento 1.9x Module to Magento 2.


texts: Some products not saving their cost price

texts:
On certain products on my Magento store it won't save the cost prices. It always re sets them to zero.

Has anyone else had this issue?
I can't see any difference between the products it is happening on. It seems to be on mainly older ones but not only as some of the older ones are working just fine. I am also not able to export the cost price when this issue happens.

Thanks.


texts: Table rates for each fixed items at a fixed shipping cost for Magento 1.8?

texts:
How can I do a table rate for each fixed items at a fixed shipping cost?

For instance, I want to charge 25€ per 6 bottles of wine, how do I do this in my tablerates.csv

Country Region/State    Zip/Postal Code #of Items (and above)   Shipping Price
FRA         *           *               1                       25
FRA         *           *               6                       50
FRA         *           *               12                      75

What I do right now is just keep adding the numbers of item and price manually, is there any way to do it better?


texts: Why does the Minify Html option in Magento 2.1.2 break my (or other's) site?

texts:
I tried to minify html as a way to increase page load speed, by recommendation of Google Page Speed.

When I minified the html code, the site broke.  Just a blank white page.

I checked Github and saw an issue regarding minification but I doubled checked the files on my install and they contain the patches which were supposedly release with Magento 2.1.2.

Does any one have any insight into why minifying html would throw a black front page?

I did do the following after setting the "Minify Html" dropdown to "Yes":

Cleared all caches.
Cleared pub/static and var directories.
Ran compile.
Deployed static content.
Refreshed caches.

The blank page is only on the front end.  Could someone point me in the direction to showing what errors are happening, or if this has happened to you as well, please do share.

**I searched and all I could find was information on the BIG minify js problem, which I have as well, but can't do anything about.

Thanks in advance.


texts:
In Magento\Catalog\Model\Indexer\Product\Flat\Action\Indexer there is one constant:

/**
 * Maximum size of attributes chunk
 */
const ATTRIBUTES_CHUNK_SIZE = 59;

reference: https://github.com/magento/magento2/blob/2.0/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Indexer.php#L26

It serves for splitting attributes into chunks during Flat table indexation process.

The question is: Why 59?


texts: How to set cookie domain for staging and production site correctly?

texts:
I have a staging site https://dev.example.com and a production site https://example.com

I don‘t want to share any cookies between those sites obviously and I want to be sure that I don‘t break anything login related.

I‘m a confused how to set the cookie domain under settings-web correctly. I read that you have to put a dot in front of the domain so it would be .dev.example.com and .example.com

Just to be sure, is this correct? Thx

Edit: And what about the option „use http only“. Do I have to set it to no?


texts: Open category filters by default in Magento 2

texts: Is it possible to open category filters in the left pane by default in Magento 2 Luma theme.


texts: Running simple Data Flow import profile deletes records

texts:
I encountered a very weird issue. I am trying to run a very basic import data flow profile (done it a hundred times before) by using selected Magento columns: sku, category_ids and status which looks like this:

My csv file looks basic too:

sku,category_ids, status <-- column headers
100001, "10, 11, 12", ENABLED
100002, "10, 11, 14", ENABLED
100003, "10, 11, 15", ENABLED

I also tried using '1' for status:

sku,category_ids, status <-- column headers
100001, "10, 11, 12", 1
100002, "10, 11, 14", 1
100003, "10, 11, 15", 1

The run gives a success message (100% imported) but when looking up the item in backend Catalog -> Manage Products I am unable to find it.
upon further check in Magento's tables I found out that the items exists in table catalog_product_entity but its record is clearly deleted from catalog_product_flat_1 (fyi: in my config settings I have enabled 'Use Flat Catalog Product')
I also tried using only two mapped columns and csv consisting of sku,category_ids only, but the same: items is deleted from catalog_product_flat_1.
Anyone able to explain this phenomenon? Also: what can I do to get the lost items back to flat catalog?
Thanks a lot


texts: How to customise category top menu navigation by custom category id in Magento 2?

texts:
By default Magento 2 showing the all store categories in top menu with a tree structure, I want to filter with custom category ids and only that filtered category need to show in category top menu navigation and rest will be removed.

Please help me to achieve this customization.


texts: How to check a zpicode in checkout cart  summary block in magento 2 like below image


texts:
I'm having trouble getting some modules to work.

I installed 2 modules on a clean magento 2.3.3 version.

The modules are a theme and an extension that switch to maintenance mode.

Whenever I do some changes to apply one of those modules, I get a 404 not found page.

I did notice that the URL in both cases shows a key like this :

https://website.com/adminpage/theme/design_config/save/key/######

https://website.com/adminpage/maintenancemode/adjustsettings/save/key/####

The numbers are different on each url.

I installed those modules with the following method :

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy -f

php bin/magento cache:clean

"Add Store Code "  is not activated (according to an other post it should be that way).

Any idea how to fix this ?


texts: Admin Observer Data after Add item to Order from Quote

texts:
admin Observer i want to get items subtotal i tried the below event on that i am getting only quote Id rest not able to get rest quote Data i checked in database quote Table data is there
can you please help me to find out how to do that or let me know the Correct observer Event name

sales_quote_item_set_product
sales_quote_add_item
sales_quote_product_add_after
adminhtml_sales_order_create_process_data

Observer.php

public function testQuote($observer) {
    $event = $observer->getEvent();
    $quote = Mage::getSingleton('adminhtml/session_quote')->getQuote();
    mage::log($quote->getData(),null,'observer.log');
}

Log data:

[entity_id] => 12121
    [store_id] => 1
    [created_at] => 2017-07-26 03:42:25
    [updated_at] => 2017-07-26 03:42:25
    [converted_at] =>
    [is_active] => 0
    [is_virtual] => 0
    [is_multi_shipping] => 0
    [items_count] => 0
    [items_qty] => 0.0000
    [orig_order_id] => 0
    [store_to_base_rate] => 1.0000
    [store_to_quote_rate] => 1.0000
    [base_currency_code] => USD
    [store_currency_code] => USD
    [quote_currency_code] => USD
    [grand_total] => 0.0000
    [base_grand_total] => 0.0000
    [checkout_method] =>


texts: How to use Ui Component in frontend magento 2?

texts: In Magento 2 i want create grid in frontend, but i don't how do it. Any suggestion?


texts: Theme layout update file is not valid after changing to developer mode

texts:
After i changed my site to developer mode, i got this error while trying to access backend module:

  1 exception(s): Exception #0
  (Magento\Framework\Config\Dom\ValidationException): Theme layout
  update file
  '/var/www/project/app/code/Namespace/Module/view/adminhtml/layout/adminhtml_system_config_edit.xml'
  is not valid. Premature end of data in tag page line 3  Line: 7

/var/www/project/app/code/Namespace/Module/view/adminhtml/layout/adminhtml_system_config_edit.xml

<?xml version="1.0" encoding="UTF-8"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<head>
    <css src="jquery/colorpicker/css/colorpicker.css"/>
</head>


texts: Use non-namespace libraries with Magento2

texts:
I am trying to use a third party library in my Magento 2 module which I include via composer:
https://packagist.org/packages/os/php-excel

This extension isn't using namespaces and it seems that it raise some autoloading conflicts with Magento 2 when I try to use it in my own module.

What I tried first:

composer require os/php-excel
tried to use a static method from this library in one of my models:
\PHPExcel_IOFactory::load($file);

Receiving the error:

Source class  "\PHPExcel_IO" for "PHPExcel_IOFactory" generation does not exist.

What I tried #2:

I have added the \PHPExcel object (which it seems that's the API object which allows you to use the features from this library ) as a parameter in my __construct():

namespace Fsu\Import\Model;

use Magento\Framework\Filesystem\Directory\ReadFactory as DirReadFactory;
use Magento\Framework\Filesystem\File\ReadFactory as FileReadFactory;

class Importer {

    /** @var  bool */
    protected $_dryRun;

    /** @var  string */
    protected $_path;

    /** @var \Magento\Framework\Filesystem\Directory\ReadFactory */
    protected $_directoryReader;

    /** @var \Magento\Framework\Filesystem\File\ReadFactory */
    protected $_fileReader;

    public function __construct(
        DirReadFactory $directoryReader,
        FileReadFactory $fileReader,
        \PHPExcel $excel //this is the object I am trying to use with DI
    )
    {
        $this->_directoryReader = $directoryReader;
        $this->_fileReader      = $fileReader;
        $this->_excelParser     = $excel;
    }

    //....
}

But I receive this error:

[ReflectionException]
Class PHPExcel does not exist

So do you think such libraries can be used with Magento 2 ? And what is the proper way to do it ?

Context:
I am writing a new cli command which to be used to import products and the import data is stored in .xsl files.

Thank you !


texts: Create thousands of configurable products programmatically that associate attributes with already created simple products

texts:
I have imported about 15k products into magento from a system that has no variations or configurable products.  These are all simple products that will eventually be used in a configurable product that has yet to be created.

What I am looking to do is to find a way to somehow programatically create 1 configurable product that has the right simple products that match the attributes in the config product.  I have the ability to bring in some sort of custom field that might be used to associate which simple products go with the right config product, but I am at a loss to know the best way to do this other than doing it one by one using the admin panel.


texts: Set custom creation timestamp or modify creation timestamp for product

texts:
Magento 2.1.1.

Is there any way to set custom created_at attribute on newly created product? I used method $product->setCreatedAt($date) before saving it. Value is set on product object, but finally when saving it into db, mysql mechanism is trigger, which sets current timestamp, not mine. I logged sql queries, and field created_at is not in insert into catalog_product_entity, so it's actually normal that mysql fills that field with default value.

Only way I could modify it was pure sql, but it is not a way to go.


texts: Add Customer Group In Order Grid (Function)

texts:
I'm using Magento 1.9.3.1.

So Far I managed to Add the column on order Grid together with a dropdown for filtering on the header column.

I'm in need of some assistance on where to adjust so that I can pull the data for customer group or what are the things I need to do.

So far, here's my code.

$groups = Mage::getResourceModel('customer/group_collection')
        ->addFieldToFilter('customer_group_id', array('gt'=> 0))
        ->load()
        ->toOptionHash();

    $this->addColumn('customer_group_id', array(
        'header'    =>  Mage::helper('customer')->__('Customer Group'),
        'width'     =>  '100',
        'index'     =>  'customer_group_id',
        'type'      =>  'options',
        'options'   =>  $groups,
    ));

Photo of what the upper code did.

What is my next Step?

Thanks for assisting me.


texts: Error Log fromHost re Magento Install How do i Fix them

texts:
I am getting a few errors in my Host Log from my Magento install.

Getting a lot of these

[141.101.99.184:48065] File not found [/home/freetime/public_html/403.shtml]
[141.101.99.184:9599] File not found [/home/freetime/public_html/403.shtml]
[141.101.99.160:47913-3#APVH_anditsgone.co.uk] File not found [/home/freetime/public_html/403.shtml]
2016-02-23 22:36:17.255
[141.101.99.160:47913-2#APVH_anditsgone.co.uk] File not found [/home/freetime/public_html/403.shtml]
[141.101.99.160:30798-2#APVH_anditsgone.co.uk] File not found [/home/freetime/public_html/403.shtml]
[141.101.99.160:47913-1#APVH_anditsgone.co.uk] File not found [/home/freetime/public_html/403.shtml]

They all seem related to the 403 error any ideas please.

Thorrrr


texts: Getting permission issue for vendor mage folder while update anything on admin

texts:
I am using magento 2.3.2 community edition. While update any setting at backend I am getting error like

  Warning:
  file_put_contents(/var/www/html/ihouzit/var/cache//mage-tags/mage---39a_MAGE): failed to open stream: Permission denied in
  /var/www/html/ihouzit/vendor/colinmollenhour/cache-backend-file/File.php
  on line 691

Sometimes to mage MysqlPDO file.
Why this happens lot of times. Always I run permission command, then it comes in normal. Any fix solution for this issue?

Same error for bellow file also

  var/cache//mage-tags/mage---39a_DB_PDO_MYSQL_DDL): failed to open
  stream

Thanks in advance.


texts: Magento 2.3 : Category names missing from breadcrumbs on the product page

texts:
I am using Magento 2.3 for my store.On the product page category and subcategory are missing from the breadcrumb.Is there any workaround to show the fullpath with category and subcategories in the breadcrumb on the product detail page?

It now only shows: Home > Current Product Name

Any help?

Thanks in advance.!!!


texts: Fetching Custom Customer Attributes Magento 2

texts:
I am trying to fetch a custom attribute value of a customer in magento 2 but I am unable to fetch it

I am using \Magento\Customer\Api\CustomerRepositoryInterface class to fetch the custom customer attribute of a customer

I have tried this

       $customers = $this->customerRepositoryInterface->getById(2);
       print_r($customers->getCustomAttributes('enable_alerts'));

This returns

Array (
    [enable_alerts] => Magento\Framework\Api\AttributeValue Object
        (
            [_data:protected] => Array
                (
                    [attribute_code] => enable_alerts
                    [value] => 1
                )

        )

)

But I need only value of enable_alerts.
What I am doing wrong here Is there any other way of fetching customers attribute value I have tried multiple codes and searched every thing!


texts: How change layered navigation filters orientation from vertical to horizontal on product page in magento 2.3

texts: How change layered navigation  filter orientation from vertical to horizontal? Now I have vertical-orientated filters, but I want to change them to horizontal.


texts: Magento 2 Numeric value out of range: 167 Out of range value for column 'value_id'

texts:
While I am trying to save the product from admin i am getting error like
SQLSTATE[22003]: Numeric value out of range: 167 Out of range value for column 'value_id' at row 1, query was: INSERT INTO `catalog_product_entity_text` (`entity_id`,`attribute_id`,`store_id`,`value`) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE `value` = VALUES(`value`)

Does anyone have an idea how to fixed it?


texts: What kind of question are asked in Magento 2 Certified Associate Developer exam?

texts:
What kind of question are asked in Magento 2 Certified Associate
  Developer exam ?

The exam is designed to validate the skills and knowledge of Magento 2 in the areas of

UI modifications
database changes
admin modifications
customizations
catalog and checkout structure
functionality changes

Then what kind of question are asked from above areas, just an idea will be enough so whoever appertaining for the exam can prepare accordingly.

Is Anyone appeared for the exam and have any idea regarding the same ?


texts:
I don't know why but my Magento store is not showing any best sellers. Isn't like that that a Magento store should show automatically all most sold products in the dashboard? I'm getting 0. And yes, I have sold for a few months now...

Anyone can give me clues/answers?


texts: Enable php extension for installation Magento2 on Xampp

texts:
I am trying to install Magento2 on Xampp and got some php extensions errors that are not enables. Please help me to enable these enable following php extensions.

PHP Extension xsl.
PHP Extension intl.
PHP Extension soap.

Thanks.


texts: How can I get SQL query from repository?

texts:
Lets asume that I have code like this:

$searchCriteria = $this->searchCriteriaBuilder
    ->addFilter('increment_id', $incrementId, 'eq')
    ->create();

$orderList = $this->orderRepository
    ->getList($searchCriteria);

Is it possible to see SQL query in a way like it was done in Magento 1 with model object:

echo Mage::getModel('module/model')->getCollection()->getSelect()->__toString();


texts: How can I set a session variable in index.php file

texts:
I am trying to create a session variable in my store index.php variable by using the following piece of code.

  Mage::getSingleton('core/session')->setRefer("access");
   $refer = Mage::getSingleton('core/session')->getRefer();

But I am getting an error saying.

  Fatal error: Call to a member function getModelInstance() on null
  can anyone kindly let me know, how I can set a session variable in index.php file in magento store.

Edit: As ram charan asked I am adding my complete index.php file code here. I am trying to find country and change the currency type based on that and at the same time I am trying to set a session inside the condition.

<?php

if (version_compare(phpversion(), '5.3.0', '<')===true) {
    echo  '

Whoops, it looks like you have an invalid PHP version.

Magento supports PHP 5.3.0 or newer.
Find out how to install
 Magento using PHP-CGI as a work-around.

';
    exit;
}
/**
 * Compilation includes configuration file
 */
define('MAGENTO_ROOT', getcwd());

$compilerConfig = MAGENTO_ROOT . '/includes/config.php';
if (file_exists($compilerConfig)) {
    include $compilerConfig;
}
/*ini_set('error_reporting', E_ERROR);
register_shutdown_function("fatal_handler");
function fatal_handler() {
    $error = error_get_last();
    echo("
");
    print_r($error);
}*/
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
$maintenanceFile = 'maintenance.flag';
if (!file_exists($mageFilename)) {
    if (is_dir('downloader')) {
        header("Location: downloader");
    } else {
        echo $mageFilename." was not found";
    }
    exit;
}
if (file_exists($maintenanceFile)) {
    include_once dirname(__FILE__) . '/errors/503.php';
    exit;
}
require MAGENTO_ROOT . '/app/bootstrap.php';
require_once $mageFilename;

#Varien_Profiler::enable();

if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Mage::setIsDeveloperMode(true);
}
#Mage::setIsDeveloperMode(true);
#ini_set('display_errors', 1);

umask(0);

/* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';

/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';

// some logic to find the ip of the user
  $country="US";
    if($country!="IN")
    {
        Mage::init();
        Mage::getSingleton('core/session')->setRefer("access");
        $refer = Mage::getSingleton('core/session')->getRefer();

       Mage::app();
       Mage::app()->getStore()->setCurrentCurrencyCode('USD');
       Mage::reset();
}

Mage::run($mageRunCode, $mageRunType);


texts:
Recently a client pointed out an issue where they couldn't upload any category images. Editing the category works fine but the image upload doesn't.

The media directory is writable, all other image uploaders seem to work and right now I'm kinda at a loss what to do next.
I've tried small and large images, types JPEG and PNG.


texts: Display custom template in home page Magento 1.9.2.4

texts:
My problem is that i cant display some custom (created by me) template in home page. Read a lot but without success. I've tried to display it in content from backend in Magento like

{{block type="catalog/product_list" category_id="5" template="catalog/product/list2.phtml"}}


texts:
I have a specific requirement where I want to allow backorders, if the product is "out of stock" but I don't want the product to be added on cart or process for checkout but just store the product backorder for the customer and notify him/her through email with the link of the product when its back on stock.

The wishlist is doing same and so I copied it to local > Mage > Wishlist and observe the withlist_add_product to add the product to product_alert_stock. It's working fine except the link contains wishlist in the url and messages. I believe, I can change the messages but I'm not sure how can I change the url part.

Can someone guide me to change the url linking of the Wishlist? Would it better to keep it as Mage > Wishlist or shall I create the module and rename something like Backorders?


texts: 'IntlDateFormatter' not found in /lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php

texts:
I got that error while open magento 2 store on online server

 Fatal error: Class 'IntlDateFormatter' not found in /var/www/html/yourParts/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php on line 111

I've installed and enabled intl extension

php version is 5.6


texts: Magento1: How to set a dependency in a system XML of new extension

texts:
I want to modify 3rd party extension and want to override its functionality with the new extension. But my main concern is what if 3rd party extension is not enabled or present in my Magento folder? I want to set dependancy using ifconfig in system.xml or config.xml but I am not sure at extension level that how to check if extension is present in folder. TIA.

EDIT :
Thanks to @Sander Mangel for dependency answer. Now let me be more clear.

I can easily set dependency using app/etc/modules/MyNameSpace_MyModule.xml but when my 3rd party extension is removed from system, error report is generated and its showing "Module "MyNameSpace_MyModule" requires module "3rdPartyExtension" and stopped further execution cause it has generated exception but what if I want to execute further without generating exception? Simply MyExtension will not take effect if 3rdpartyextension is not present without stopping magento to execute. So that's why I am asking is there any kind of facility like we did on layout files to check. NOTE ifconfig here.

<reference name="sales.order.print">
        <action method="setTemplate" ifconfig="3rdparty/config">
            <template>mytemplate.phtml</template>
        </action>
    </reference>

Second Edit :
Thanks to Zyava. I did what I want but say If I deleted my 3rd party extension for trial purpose to see what happens.. I created my system.xml as below

<config>
   <sections>
        <payment>
            <groups>
                <3rdparty extension translate="label" module="payment">
                    3rd Party
                    <frontend_type>text</frontend_type>
                    <sort_order>1</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <disallowedcustomergroups translate="label comment">
                            Disallowed Customer Groups
                            <frontend_type>multiselect</frontend_type>
                            <sort_order>120</sort_order>
                            <source_model>adminhtml/system_config_source_customer_group</source_model>
                            <config_path>mymodule/disallowed_customer_groups</config_path>
                            <comment><![CDATA[Press control and select multiple groups]]></comment>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                            <depends><active>1</active></depends>
                        </disallowedcustomergroups>
                    </fields>
                </3rdpartyextension>
            </groups>
        </payment>
    </sections>
</config>

So you can see that I have simply specified one tab based on activation of 3rd party extension. But I have deleted 3rd party extension fully from my system but still its showing other options of 3rd party extensions? Why its showing them though I have cleared my cache?


texts: Magento 2.3 Gift card rest API for add to cart

texts:
I have checked https://devdocs.magento.com/swagger/index_23.html#/giftCardAccountGiftCardAccountManagementV1
for api but it is not clear here where to pass recipient name,email.message details.

Can someone tell me about gift card purchase flow in magento 2.3 ?


texts: Error Running 'magento setup:di:compile'

texts:
I got this error while trying to run the magento setup:di:compile command

'Fatal error: Class 'Hybrid_Provider_Model_OAuth2' not found in /var/www/html/app/code/MageBig/SocialLogin/Model/Providers/Amazon.php on line 26'

After Reinstalling Hybrid Auth https://doc.magebig.com/martfury/extensions/#social-login

I then got the error

'Fatal error: Class 'Hybrid_Provider_Model_OAuth2' not found in /var/www/html/app/code/MageBig/SocialLogin/Model/Providers/Amazon.php on line 30'

What did I do wrong? Any Ideas?

Please Help.

Thank you.


texts: I am new to magento, I have a column of products on my front magento page. I want to rearrange them to my liking as an administrator so they show up on the front end. I have tried everything but nothign seems to work.


texts: Extend NewAction Controller in Magento 2 Newsletter Vendor module

texts:
I have extended the core controller of Magento_Newsletter NewAction controller. My aim is to add a thank you page after a successful subscription. and I'm having a problem because I wan't it to redirect to a cms page. Just correct me if I'm wrong.

Thanks


texts: Login to admin after second attempt only

texts:
Can't figure out a strange issue. When I access to site.com/admin and enter access credentials, Magento redirects me to the login page again.

If I refresh the page or enter login credentials again, I will be redirected to dashboard.

After some inspection, I also noticed, that after the first login, cookie contain two different variables admihntml for site.com and .site.com.

I think it's the problem, but don't understand how to solve it.

This happened in Chrome only. FF and Opera are OK.


texts:
I am using Magento 1.5.1.0 and have several shops setup.

I am trying to add framing options to the existing products in two of my stores.  I have added this successfully in Domingo Direct, see http://www.domingodirect.co.uk/index.php/deep-thoughts-no-2.html

However in Hornchurch fine art the framing options do not appear, see http://www.hornchurchfineart.co.uk/index.php/moonlite-parliament-no-1.html

If you try to add this artwork to the cart I get the error "Please specify the product required option(s)." as expected.

Does anyone know why the options are not showing?

Many thanks in advance.


texts: Magento2 Products backend keyword search is too slow after upgrade

texts: After we upgrade to magento 2.4.2, the keyword search is extremely slow on admin->catalog->products section. When we checked the DB, we could see some keys are dropped from the product tables. For example CATALOG_PRODUCT_ENTITY_TEXT_ROW_ID_ATTRIBUTE_ID_STORE_ID. Anybody has got similar issue and any recommended solution?


texts: How to show product custom attribute to invoice email in magento2.2.0?

texts:
I want to show product custom attribute below the product image and SKU to invoice email in magento2.2.0?
Any help would be appreciated.


texts: Magento 2 Site css doesnt load or going 404 when clearing admin cache each time

texts:
When I clear admin Static file cache and Css Javascript cache, the JS and CSS files is not regenerating in pub/static.

Each time I have to deploy using

php bin/magento setup:static-content:deploy


texts: When running grunt exec require.js not a function error appeared.


texts: Custom images in new Magento responsive e-mail header file

texts:
I have upgraded to Magento 1.9.1.0 and see that Magento has implemented a new way to include the header and footer of e-mails in transactional e-mails. Great!

I have succesfully included the header.phtml file with {{template config_path="design/email/header"}}. However, in header.phtml I want to add custom images. In the default file of Magento the logo is included by using {{var logo_url}}.

However, a command which I would normally use is not working:

Anyone got an idea on how to include custom images in the header of your transactional e-mails?


texts: What is the minimum product weight and its corresponding format in excel (CSV import)?

texts:
I am currently assembling a massive database.
Here are my questions,

What is the minimum recognized weight that a product can weigh in Magento?
for example we have items that weight 2 grams. So if say the minimum weight in Magento was 10 grams than if someone purchased 100 of them the shipping would be very inaccurate.

Is there a way to denote different weight types such as some products being weighed in grams and others in pounds? Or is it say all in pounds and if an item weighs 2 grams I have to do it as a decimal? I am referring to the CSV import sheet of course regarding the proper format to import some 9000 items.


texts: Google Customer Reviews form on Magento 1.9.3 not showing at Success Page

texts:
My success.phtml dir is -> /app/design/frontend/pb/default/template/checkout  (my theme's success.phtml)

I've tried to implement this code in to this success page.

    <!-- BEGIN GCR Opt-in Module Code -->
<?php
$orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$order = Mage::getModel('sales/order')->load($orderId);
?>
<script src="https://apis.google.com/js/platform.js?onload=renderOptIn" async defer></script>

<script>
    window.renderOptIn = function() {
        window.gapi.load('surveyoptin', function() {
            window.gapi.surveyoptin.render(
                {
                    "merchant_id": 112592416,
                    "order_id": "<?php echo $order->getIncrementId() ?>",
                    "email": <?php echo $order->getCustomerEmail() ?>,
                    "delivery_country":  "<?php echo $order->getShippingAddress()->getCountryId() ?>",
                    "estimated_delivery_date": "YYYY-MM-DD",

                });
        });
    }
</script>
<!-- END GCR Opt-in Module Code -->

And then I tried. The form is not showed up. I don't know how to configure estimated delivery day but it is usually in 1 day.

I'm stuck at this point and I need a hand :)

Thanks.


texts: Magento 2.1 Customer address attribute in checkout page is not saved into database

texts:
I have added new custom attributes in my custom module via InstallData.php with following install function content:

/** @var \Magento\Customer\Setup\CustomerSetup $customerSetup */
$customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

$attributesInfo = [
    'company_info' => [
        'label' => 'Company Info',
        'type' => 'static',
        'input' => 'textarea',
        'position' => 65,
        'visible' => true,
        'system' => false,
        'user_defined' => false,
        'required' => false,
        'validate_rules' => 'a:1:{s:15:"max_text_length";i:500;}'
    ],
    'telephone_secondary' => [
        'label' => 'Secondary Phone Number',
        'type' => 'static',
        'input' => 'text',
        'position' => 125,
        'visible' => true,
        'system' => false,
        'user_defined' => false,
        'required' => false,
    ]
];

$columns = [
    'company_info' => [
        'type' => Table::TYPE_TEXT,
        'nullable' => true,
        'default' => null,
        'comment' => 'Company Info',
    ],
    'telephone_secondary' => [
        'type' => Table::TYPE_TEXT,
        'nullable' => true,
        'default' => null,
        'length' => 255,
        'comment' => 'Secondary Phone Number',
    ]
];

$tableNames = [
    'customer_address_entity',
    'quote_address',
    'sales_order_address'
];

foreach ($attributesInfo as $attributeCode => $attributeParams) {
    $customerSetup->addAttribute('customer_address', $attributeCode, $attributeParams);
    $customerSetup->getEavConfig()->getAttribute('customer_address', $attributeCode)
        ->setData('attribute_set_id', AddressMetadataInterface::ATTRIBUTE_SET_ID_ADDRESS)
        ->setData('used_in_forms', [
            'customer_address_edit',
            'customer_register_address',
            'adminhtml_customer_address'
        ])
        ->save();
}

$connection = $setup->getConnection();
foreach ($tableNames as $tableName) {
    foreach ($columns as $name => $definition) {
        $connection->addColumn($tableName, $name, $definition);
    }
}

Then I went to checkout and my attributes showed there correctly. But when I went to billing step, values of my custom attributes were not saved into database. Am I doing something wrong?


texts:
I've created an extension following a few tutorials which is meant to create an observer in order to add a layout handle.

in my logs I get the following on each page load

2017-01-25T14:56:04+00:00 ERR (3): Warning: include(Karl\CustomHandles.php): failed to open stream: No such file or directory  in C:\xampp\htdocs\raanthai2\lib\Varien\Autoload.php on line 94
2017-01-25T14:56:04+00:00 ERR (3): Warning: include(): Failed opening 'Karl\CustomHandless.php' for inclusion (include_path='C:\xampp\htdocs\raanthai2\app\code\local;C:\xampp\htdocs\raanthai2\app\code\community;C:\xampp\htdocs\raanthai2\app\code\core;C:\xampp\htdocs\raanthai2\lib;C:\xampp\php\PEAR')  in C:\xampp\htdocs\raanthai2\lib\Varien\Autoload.php on line 94
2017-01-25T14:56:07+00:00 ERR (3): Warning: include(Karl\CustomHandles.php): failed to open stream: No such file or directory  in C:\xampp\htdocs\raanthai2\lib\Varien\Autoload.php on line 94
2017-01-25T14:56:07+00:00 ERR (3): Warning: include(): Failed opening 'Karl\CustomHandless.php' for inclusion (include_path='C:\xampp\htdocs\raanthai2\app\code\local;C:\xampp\htdocs\raanthai2\app\code\community;C:\xampp\htdocs\raanthai2\app\code\core;C:\xampp\htdocs\raanthai2\lib;C:\xampp\php\PEAR')  in C:\xampp\htdocs\raanthai2\lib\Varien\Autoload.php on line 94

The path to the file seems to be affected by the class tag, in Karl\CustomHandles\etc\config.xml which is

<config>
<frontend>
    <events>
        <controller_action_layout_load_before>
            <observers>
                <customhandles>
                    <class>Karl_CustomHandles</class>
                    <method>addCustomHandles</method>
                </customhandles>
            </observers>
        </controller_action_layout_load_before>
    </events>

    <layout>
        <updates>
            <karl_customhandles module="Karl_CustomHandles">
                <file>customhandles.xml</file>
            </karl_customhandles>
        </updates>
    </layout>
</frontend>


texts: Magento 2.3 - CSS changes revert after running " php bin/magento setup:static-content:deploy -f "

texts:
After edited CSS then run  php bin/magento setup:static-content:deploy -f my changes revert, all my css workout removed.

CSS Path :
pub/static/frontend/Codazon/fatest_grocery_gourmet/en_US/css/style-l.css

Best practice to edit CSS files?