texts: Which strategy for fixing: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '25061-1' for key

texts:
I've a problem with my product import extension that is returned the "classic" violation integrity error:

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
  '25061-1' for key
  'UNQ_CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID'

I'm using Magento CE 1.7.0.2.

There are multiple topics about that issue on stackoverflow, magento forums with different technical approaches like below:

Someone recommends to download and use the dbtools repairs provided by Magento, **.
Some are providing db tables list to truncate** "with no major risk".
An another proposal is to identify with precision the data and remove it from the related db table.

What is the pragmatic way to identify and fix that issue?


texts: "sales_order_place_after" event not working in magento2

texts:
I first used sales_model_service_quote_submit_before then used event sales_order_place_after but secound event is not working..any idea? scope is global.

ex- Company/Vendors/etc/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_order_place_after">
        <observer name="sales_order_grid_vendors_customer" instance="Company\Vendors\Observer\AddVendorOrders" />
    </event>
</config>

Observer/AddVendorOrders.php

<?php
namespace Company\Vendors\Observer;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
class AddVendorOrders implements ObserverInterface
{
  public function execute(Observer $observer)
      {
        die('testing);
      }
}


texts: How to change the checkoutProvider name in magento2

texts:
where we need to change the 'checkoutProvider' name for passing custom countries list in magento2 checkout page. I tried to change in checkout_index_index.xml file but not working.
how to display in frontend checkout page.

$jsLayout['components']['checkoutProviderShip']['dictionaries'] = [
                    'country_id' => $this->getShipCountryOptions(),
                    'region_id' => $this->getRegionOptions(),
                ];

Thanks in Advance.


texts: Magento 2 Category Tree in admin and able to select and save in attribute as comma seperated

texts:
I am looking for solution where in admin I have Created a custom attribute and in this custom attribute I want to display all categories tree so that when select some categories it should save in database as comma separated.
If anyone have idea about it,please share me.
Thanks,


texts: Unchecked checkbox when another is checked in magento2 checkout page

texts:
I created two checkboxes i magento checkout in billing address section. Checkboxes name "Firma" and "Osoba prywatna". My custom module allow me to create only checkboxes but I would like to uncheck "firma" checkbox when i check "osoba prywatna" checkbox and the other way too.

I was trying use jquery code but it's not working.
    jQuery(document).ready( function() {
        $('[name="custom_attributes[faktura_os_prywatna]"]').prop('checked', true);
            $('[name="custom_attributes[is_business_account]"], [name="custom_attributes[faktura_os_prywatna]"]').on('change', function() {
                $('[name="custom_attributes[is_business_account]"], [name="custom_attributes[faktura_os_prywatna]"]').not(this).prop('checked', false);
            });
        });
    });

Do you have any ideas?


texts:
If FPC is enabled and you perform some admin activities, the one or more cache is likely to be invalidated.

What's the effect of this cache invalidation in performance?
Can I safely disable the cache invalidation method? We are refreshing cache daily at mid-night btw.


texts:
sorry for my language...
I have a little problem with magento 2.3 . I use product catalog rules to create discounts for groups of users. once every day or two, there is no specific time or in any case I cannot understand why, the product rules no longer work. If I connect with a user who is associated with a group with rules, I do not see any product discounts. The only solution is to "reindex" and "flush" magento from terminal.
I created a cron job that reindexes and flushes cache every day, but that's not enough.
Every time I have to receive messages from my customers who do not see the discounts and at that moment I have to reindex.
Do you know which event triggers the loss of the rules ?? how can i solve?
Thanks for all.


texts: How to add a custom block after product info in product view page magento2?

texts:
How to add a custom block in product view page after product info.
I have created a custom block via admin and its id is category-block-1
I have a custom them and i tried override catalog_product_view.xml.

Magento_Catalog/layout/catalog_product_view.xml

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="product.info.details">
      <block class="Magento\Catalog\Block\Product\View" name="product.block" template="Magento_Catalog::category-block.phtml" >
      </block>
    </referenceBlock>
</body>
</page>

Magento_Catalog/template/category-block.phtml

<?php
  echo $this->getLayout()
          ->createBlock('Magento\Cms\Block\Block')
          ->setBlockId('category-block-1')
          ->toHtml();
?>


texts: Can I add minicart functionality to a custom block (thats a modal), using RWD child theme? Magento 1.9.2.4

texts:
I have added a custom block in my header and inside it is a button called Get a Quote. I've integrated Foundation into my RWD child theme, so when hovered over, a modal appears.

What I'd like to happen, is that the modal will act almost like the minicart. So when the customer adds a product it goes into the "minicart/modal" and shows just the image, qty, price per product.
Plus the subtotal(quote amount) and go to checkout/clear buttons of the standard minicart.

So far I can add the product details, but I'm sure Im doing it wrong.

<?php $session = Mage::getSingleton('checkout/session'); $items = $session->getQuote()->getAllItems(); ?>

<?php if(count($items)): ?>

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

<?php $isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();?>

<?php $product = $_item->getProduct(); ?>

<a href="<?php echo $product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($product, 'small_image')->resize(50, 50); ?>" width="50" height="50" alt="<?php echo $this->stripTags($this->getImageLabel($product, 'small_image'), null, true) ?>" />

<?php echo $_item->getName();?>

<?php echo $_item->getQty();?>

<?php echo $_item->getPrice();?>

<?php endforeach; ?>

This will add the product details to the modal, but I can remove it or get a subtotal for all products.


texts: How to add the MAGE_INDEXER_THREADS_COUNT environment variable to env.php?

texts:
In Magento 2.2.6 you can take advantage of Multi-threading for the indexers as stated in release notes here:

  https://devdocs.magento.com/guides/v2.2/release-notes/ReleaseNotes2.2.6EE.html

This states that I need to add a MAGE_INDEXER_THREADS_COUNT variable to env.php. I'm just not sure where to add the variable properly and would like an example of this variable within the env.php file?


texts: Magento2: How to pass data from model file to knockout.js?

texts:
I want to pass the data from model file to knockout.js in Magento2.

My Code:

Model file:

<?php
namespace Amy\MyPackage\Model\Total\Quote;
/**
* Class Custom
* @package Mageplaza\HelloWorld\Model\Total\Quote
*/
class Package extends \Magento\Quote\Model\Quote\Address\Total\AbstractTotal
{
   /**
    * @var \Magento\Framework\Pricing\PriceCurrencyInterface
    */
   protected $_priceCurrency;
   /**
    * Custom constructor.
    * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
    */
   public function __construct(
       \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
   ){
       $this->_priceCurrency = $priceCurrency;
   }
   /**
    * @param \Magento\Quote\Model\Quote $quote
    * @param \Magento\Quote\Api\Data\ShippingAssignmentInterface $shippingAssignment
    * @param \Magento\Quote\Model\Quote\Address\Total $total
    * @return $this|bool
    */
   public function collect(
       \Magento\Quote\Model\Quote $quote,
       \Magento\Quote\Api\Data\ShippingAssignmentInterface $shippingAssignment,
       \Magento\Quote\Model\Quote\Address\Total $total
   )
   {
       parent::collect($quote, $shippingAssignment, $total);

          $objectManager      = \Magento\Framework\App\ObjectManager::getInstance();
          $customerSession    = $objectManager->get('\Magento\Customer\Model\Session');
          $customerId         = $customerSession->getCustomer()->getId();
          $customerPackageId  = $customerSession->getCustomer()->getPackagePercentage();

          return $customerPackageId;

   }
}

js file:

define(
   [
       'jquery',
       'Magento_Checkout/js/view/summary/abstract-total'
   ],
   function ($,Component) {
       "use strict";
       return Component.extend({
           defaults: {
               template: 'Amy_MyPackage/checkout/summary/discount'
           },
           isDisplayedDiscount : function(){
               return true;
           },
           getDiscount : function(){
               return customerPackageId;
           }
       });
   }
);

HTML file:(binding the data)

As I am new to knockoutjs, please help me

Any help would be appreciated.


texts: Upsell Products not visible if it's category and products category are different

texts:
Hi i'm having below categories

Camera
 - DSLR
 - Digital Camers

Accessories
 - Lenses
 - Memory cards

I've added a product from lenses category as a upsell to a product from Digital cameras. but it's not displaying in frontend.

It can be view able only if i add dslr as one more category for lens product.

Is there any way to show upsell products from entirely different category?


texts:
I need to create a new website using Magento 2, somehow like eBay, for that I need these features:

possibility to create a store with an administration panel for other sellers to sell their products
using one domain, the sellers' stores are listed under mysite.com/store1, mysite.com/store2 ...
each seller has access to manage his store, products, price promotions, orders, shipments, check payements ...
on the Magento admin, it is necessary to have the possibility to manage the sellers's accounts, enable, disable, view the statistics, orders, products, promotions, shipments, transactions etc., with the possibility to modify and to delete. .
my site will get a percentage on all other store sales based on the store's product category

What is the best way to do this using Magento 2.

Thank you


texts: How remove "All" in menu responsive Magento 2.3?

texts:
On file:

vendor/magento/magento2-base/lib/web/mage/menu.js

I modify the line 463:

this.categoryLink = $('<a>')
.attr('href', categoryUrl)
.text($.mage.__('All %1').replace('%1', category));

By :

this.categoryLink = $('<a>')
.attr('href', categoryUrl)
.text(category);

And I launched :

php bin/magento setup:upgrade
php bin/magento cache:flush
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento setup:di:compile

But that doesn't change anything, what do you recommend ?


texts: Magento2 Add to Cart from homepage not working

texts:
I've set up a Magento v2.0.6 installation Running Luma theme. I've created a own template based on the Luma with some minor changes (removing links, adding custom CSS etc.) at least nothing big.

I'm only encounter the following issue on the homepage with the following options(that I tried): 'catalog product widget list, and the 'catalog new product widget list.

The widget itself appears normally, only when pressing the 'add to cart' button, the button doesn't change and the page refreshes. You do get the Magento Message that the product has been added to the cart. (despite the fact that the cart still shows as empty).

When going to a product page and adding an other product to the cart, you see the 'add to cart' button state changing to 'adding', and the cart is being updated. (Only now suddenly two products appear, the one that has been added from the homepage appears only when adding an other product from the category/product pages).

Can anyone suggest where the issue may lie ? I haven't changed anything in the files regarding these files (not even remotely).


texts: Can't close accordion after update from 2.3.1 to 2.3.5-p1

texts:
tl;dr After upgrading from Magento 2.3.1 to Magento 2.3.5-p1 our custom JavaScript, part of our custom theme, stopped working. I'm receiving the following error when trying to close the accordion using the Magento Accordion widget like so: $('#accordion').accordion('deactivate');

jquery.js:2 Uncaught Error: cannot call methods on accordion prior to initialization; attempted to call method 'deactivate'

Full error

I'm using the native Magento Accordion Widget in my custom theme. The file contains a single #accordion, with a #readmore and #readless button.
Both are loaded into the DOM, however, the #readless button has the default styling: display: none
Block code

Lorum Ipsum

Read More...

Lorum Ipsum

Lorum Ipsum

Read Less...

Javascript code
The JS code has always worked, the functionality is as follows:

On #readmore click

Toggle the #readless button
Toggle fade-active class (Pure styling, used as kind of overlay)

On #readless click

Toggle #readmore button
Hide accordion using Magento's .accordion('deactivate') function.

   require([
        'jquery'
        ], function($) {
        'use strict';

        $(function() {

            // Accordion readmore
            $("#readmore").on("click", function () {
                $('#readmore').hide();
                $('#accordion').toggleClass('fade-active');
            });

            // Accordion readless
            $('#readless').on('click', function () {
                $('#readmore').show();
                $('#accordion').accordion('deactivate');
                $('#accordion').toggleClass('fade-active');
            });
        });
    });

The issue
After the update the block, pressing the #readless button triggers the error. I guess the accordion function changed, or my JavaSript file isn't loaded in the correct order.
Any advice is welcome


texts: Different price for product added to cart as simple product or as part of a bundle product?

texts:
let’s say I have a simple product named “Pentium i7” with the price §300 that can be added to the cart as a simple product. Also, the “Pentium i7” product can be chosen as an option for a bundle product.

Is it possible to use a different price when added to the cart as part of a bundle product than being added to the cart as a simple product?

What I already did is to create a custom module overriding the price_model for bundled products:

<config>
...
<global>
    <catalog>
        <product>
            <type>
                <bundle translate="label" module="catalog">
                    <price_model>**_Functions_Bundle_Model_Product_Price</price_model>
                </bundle>
            </type>
        </product>
    </catalog>
</global>
</config>

Am I on the right track? Any help would be appreciated!

Oliver


texts:
I am not much familiar with webservices or SOAP/REST, but i have been trying to figure out why xml file wont load with the following url (which i found in error log),

example.com/index.php/api/v2_soap

which says

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>WSDL</faultcode>
<faultstring>
SOAP-ERROR: Parsing WSDL: Couldn't load from 'example.com/index.php/api/v2_soap/index/?wsdl=1' : failed to load external entity "example.com/index.php/api/v2_soap/index/?wsdl=1"
</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

and after searching forms and magento SE, i found to test my url like the following, and it worked

 example.com/index.php/api/v2_soap?wsdl=1

i am confused, as of why the first url will throw error, and second url will load. I also see in the error and second url the placement of /index right before ?wsdl=1 whereas on the second url, it doesn't have.

What is the best place to learn all about SOAP and API related to magento?


texts:
I import all my orders from Magento 1.9 to Magento 2.2, the orders are in the store but when I press on View button, I have the following error:

1 exception(s):
Exception #0 (Exception): Warning: Invalid argument supplied for foreach() in /home/magento/vendor/magento/module-weee/Helper/Data.php on line 533

Exception #0 (Exception): Warning: Invalid argument supplied for foreach() in /home/magento/vendor/magento/module-weee/Helper/Data.php on line 533
#0 /home/magento/vendor/magento/module-weee/Helper/Data.php(533): Magento\Framework\App\ErrorHandler->handler(2, 'Invalid argumen...', '/home/magento/...', 533, Array)
#1 /home/magento/vendor/magento/module-weee/Block/Item/Price/Renderer.php(448): Magento\Weee\Helper\Data->getBaseRowWeeeTaxInclTax(Object(Magento\Sales\Model\Order\Item\Interceptor))
#2 /home/magento/vendor/magento/module-weee/Block/Adminhtml/Items/Price/Renderer.php(185): Magento\Weee\Block\Item\Price\Renderer->getBaseTotalAmount(Object(Magento\Sales\Model\Order\Item\Interceptor))
#3 /home/magento/vendor/magento/module-weee/view/adminhtml/templates/items/price/total.phtml(16): Magento\Weee\Block\Adminhtml\Items\Price\Renderer->getBaseTotalAmount(Object(Magento\Sales\Model\Order\Item\Interceptor))

What does this mean? Is there any way to fix this?

I add here the entire error:

https://paste.ofcode.org/ZU3EJ5GrGkfQ28L4z3fkKT

EDIT:

At line 533 in the file vendor/magento/module-weee/Helper/Data.php on line 533, I have the following code, I try to add a var_dump but is not work.

foreach ($weeeTaxAppliedAmounts as $weeeTaxAppliedAmount => $test) {
    var_dump($test);
    $totalWeeeTaxIncTaxApplied += max($weeeTaxAppliedAmount['base_row_amount_incl_tax'], 0);
}

Thank you


texts:
I have some cronjob that sometime get stuck in running status.

That make me think that for some reason they produce and error but I cannot find any related log. ( the column messages in cron_schedule is empty )

How can I be sure cron execution produce log in case of errors ?
How can I proceed to debug this issue, any advice ?

UPDATE
It looks my question is not clear, so I'm adding some more content ( I am not sure it gonna help because most of the people seem to read the title and guess the question ... )

I know how cron works
I know how to check if a cronjobs run or not
My cronjobs correctly run

The problem is some of the cronjobs do not end.

To be more clear: Mage_Cron_Model_Observer::_processJob()

  $schedule
        ->setExecutedAt(strftime('%Y-%m-%d %H:%M:%S', time()))
        ->save();

    call_user_func_array($callback, $arguments);

    $schedule
        ->setStatus(Mage_Cron_Model_Schedule::STATUS_SUCCESS)
        ->setFinishedAt(strftime('%Y-%m-%d %H:%M:%S', time()));

The setStatus is never reached for some cron, that is the problem.

Please avoid give random answer or just the first result google provide ( I know how to use google, I did my research ... )

If the answer is not clear, just let me know.
If you wanna help you are more the welcome if you just want waste my and your time you are not. ( this site is meant for quality answers, it is not a forum where everybody says his opinion ... posting not related answer will not help other people with same issue ... but will just create confusion )


texts: Display static block data in controller method

texts:
Hello,

I have created one static block.
I want to display data from that static block in my controller method.

Here is my controller method:

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

If I write following line in controller method:

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('block_identifier')->toHtml(); ?>

then static block data is displaying above the header.

I want to show that static block content should come after header part.


texts: Magento 1.8 Newsletter subscriber name does not show

texts:
can anybody tell why my {{var subscriber.CustomerFirstname}} does not work in my newsletter? If I try {{var subscriber.CustomerLastname}} does also not show any name in the newsletter. Am I doing something wrong here?

Thanks for any hint.


texts: Magento 2 : Event Observer For Shipping Address Selection

texts:
I am working on custom extension and need to execute my code when the customer clicks on "Next" button available in checkout.

I need an event observer in which, used shipping and billing address selected or added by customer.

See screenshot.


texts: A frontend_type for html code in admin config?

texts:
my module is for changes frontend design footer with options in admin config. I read the options default for frontend_types, like as http://www.magentocommerce.com/wiki/5_-_modules_and_development/admin/xml_structure_for_admin_configurations#frontend_type_types . But i cant find a correct option for insert html code in field for change the area in the image.

Yes, the area is comprised of some .phtml files, however I need to insert content in html in some areas by entering the admin option, how should I do this?


texts: M2 integration with PowerReviews Enterprise edition

texts: I have to implement integration between M2 and PowerReviews Enterp. Edition and online resources are just about non-existed. Short of the official PR docs, are there any other resources that would be helpful in getting started with this?


texts: M2 - Configurable product stock is 10, max to order is 6

texts:
I have multiple configurable products on my webshop and the quantity is set to 10, but if I want to order 7 items, I get a message "The specified number is not available". And if I order 6 items, it's good...

Does someone know how that is possible?

Regards,


texts: Magento 2.2.6 : How to solve this error " Validate class not found from basename 'Magento\Framework\Validator\EmailAddress' "

texts:
How to solve this error ?

  "Validate class not found from basename 'Magento\Framework\Validator\EmailAddress'"


texts: Magento2 sample custom admin module showing blank page

texts:
I am trying to display something when click on a link from admin menu. So i created a simple module and when i click from the admin menu it redirect to mydomain/secure-manage/helloworld/index/index/key/... with status 200 but the page is blank.

In devtool i can see the css and js are loaded but nothing inside the body tag.

1.folder structure

Inchoo
 Helloworld

  -Block
    -Adminhtml
      Helloworld.php

  -Controller
    -Adminhtml
      -Index
        Index.php

  -etc
    -module.xml
    -adminhtml
      -menu.xml
      -routes.xml

  -view
     adminhtml
      layout
       -helloworld_index_index.xml
      templates
       -helloworld.phtml

  registration.php

2.Block/Adminhtml/Helloworld.php

<?php
 namespace Inchoo\Helloworld\Block;
 class Helloworld extends \Magento\Framework\View\Element\Template
 {
   public function getHelloWorldTxt()
   {
    return 'Hello world!';
   }
 }

3.Controller/Adminhtml/Index/Index.php

<?php

 namespace Inchoo\Helloworld\Controller\Adminhtml\Index;

 use Magento\Framework\App\Action\Context;

 class Index extends \Magento\Framework\App\Action\Action
 {
   protected $_resultPageFactory;

   public function __construct(Context $context,
   \Magento\Framework\View\Result\PageFactory $resultPageFactory)
   {
     $this->_resultPageFactory = $resultPageFactory;
     parent::__construct($context);
   }

   public function execute()
   {
     $resultPage = $this->_resultPageFactory->create();
     // print_r($resultPage);exit;
     return $resultPage;
    }
 }

4.etc/module.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/
module.xsd">
  <module name="Inchoo_Helloworld" setup_version="1.0.0">
  </module>
</config>

5.etc/adminhtml/menu.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc
/menu.xsd">
  <menu>
    <add id="Inchoo_Helloworld::first_pincollect_pincheck"
         title="Greetings"
         module="Inchoo_Helloworld"
         sortOrder="50"
         dependsOnModule="Inchoo_Helloworld"
         resource="Magento_Backend::content" />

    <add id="Inchoo_Helloworld::second_pincollect_pincheck"
         title="Manage Pincodes"
         module="Inchoo_Helloworld"
         sortOrder="0"
         action="helloworld/index"
         parent="Inchoo_Helloworld::first_pincollect_pincheck"
         resource="Magento_Backend::content" />
  </menu>
</config>

6.etc/adminhtml/routes.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc
/routes.xsd">
  <router id="admin">
    <route id="helloworld" frontName="helloworld">
        <module name="Inchoo_Helloworld" />
    </route>
  </router>
</config>

7.view/adminhtml/layout/helloworld_index_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../lib/
internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"
layout="1column">

    <referenceContainer name="content">
        <block class="Inchoo\Helloworld\Block\Adminhtml\Helloworld"
        name="helloworld" template="helloworld.phtml" />
    </referenceContainer>

</page>

8.view/adminhtml/templates/helloworld.phtml

Hello World!

how can i debug this, please help me guys.

Thanks in advance.


texts: Programmatically Assign Attributes to Products in Magento 1.9

texts:
I am performing a mass product import and have automation scripts to handle all aspects of imports besides attribute assignments. I've spent many hours looking for resources for a solution and can't seem to find one, even through programming my own. So far I am successfully altering the product object but it's not actually saving or retaining the changes. It seems I'm finding a lot of contradicting information out there on how to go about it as well. Has anyone successfully written a script to accomplish this?

// This is my latest attempt. All variables are populated ($attributeName for example)

$product = Mage::getModel('catalog/product');
$product = Mage::getModel('catalog/product')->setCurrentStore(1)->load($product->getIdBySku($sku));
$product->getResource()->addAttributeUpdate($attributeName, $value, 0);

$product->getResource()->addAttributeUpdate($attributeName, $value, 0);
$product->save();

I've also been trying the following, once having the product and attribute objects similar to how I instantiated them earlier:

$product->addAttributeUpdate($attributeName, $value, 0);

$product->setData('diameter', '10.5');
$product->getResource()->saveAttribute($product, 'diameter', '2');

I'm really quite baffled at this point. Anyone with any suggestions? They'd be much appreciated. Thanks for your time!


texts: Magento 2 - Admin module - how to SELECT data from database to display in Admin page

texts:
I'm building out an Admin module that's intended to SELECT data from a specific table in magento database and display that data on page, it's a custom table called "commission_sales".  At this point I just want to SELECT * (all data) from table and display on page.

The following code does work, i've tested on the order success page and data does pull through.  I just can't seem to do the same for the admin page:

Note: I've also tried to trigger this code in events.xml with no luck

<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 *
 */
namespace MyCompany\ExampleAdminNewPage\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;

class commission_data implements ObserverInterface
{
    /**
     * @param Observer $observer
     * @return void
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $resource = $objectManager->get('Magento\Framework\App\ResourceConnection');
        $connection = $resource->getConnection();
        $tableName = $resource->getTableName('commission_sales');

        $sql = "SELECT * FROM " . $tableName;
        $result = $connection->fetchAll($sql);
        echo '
 Data currently saved to commission_sales table

'; echo ($result); echo '
';
    }
}
?>

How would you incorporate the above SELECT request and then display that data in an admin page/module?

Current files for the admin module so far:

   MyCompany
    `-- ExampleAdminNewPage
        |
        |-- Controller
        |   |-- Adminhtml
        |       |-- HelloWorld
        |           `-- Index.php
        |-- etc
        |   |-- adminhtml
        |   |   |-- menu.xml
        |   |   `-- routes.xml
        |   |   `-- events.xml
        |   `-- module.xml
        |-- view
        |   |-- adminhtml
        |       |-- layout
        |       |    `-- exampleadminnewpage_helloworld_index.xml
        |       `-- templates
        |           `-- helloworld.phtml
        |-- composer.json
        `-- registration.php

Appreciate any help!

Thanks,
Chris


texts: Symlinking images so that I dont need redundant copies of images

texts:
I have 2 instances of a Magento Store.

One is our production system and has the path:
/home/user/public_html/

another one is our Staging-System and has the path:
/home/user/stage/

I want to symlink all images from production-/media to stage-/media.

I've tried it with enabeling Symlinks and simply set a symlink in the respective folder, but this does not seem to be enough.

What is needed to setup a working symlink with Magento?


texts: How to add different font style in different store view Magento2

texts:
I have two store view in my magento2 store

1.English Language
2.Dutch Language

I want to add the different font in Dutch Store view. Could anybody please help me with that.


texts: Maximum price not appearing in layered navigation

texts:
I can't get a "£100 and above" to display in my layered navigation. It's currently set to Automatic (by price range) but it's a poor experience and is happening to a variety of categories.I don't know if Automatic (by product count) would solve it, but I can't try because when I set it to that the filters disappear altogether.
The Magento documentation shows the functionality here but I just cannot find a way of getting that maximum price bracket. It would need to be different per category too.
Any ideas?
Thank you!


texts: M2 Edit mobile menu - remove 'All' keyword

texts: In my mobile menu the first says "All Info" - see screenshot. How can I change this to simply "Info" and have the same font as "Sub Category 2" ?


texts: change error message under shipping method

texts:
under shipping method we are getiing error message

  Sorry, no quotes are available for this order at this time.

we have to chnage this error message.

please help me where we can edit this message


texts:
I'm working on a magento project that's created by another firm. In a template file (app/design/frontend/companytheme/default/template/catalog/product/featured.phtml) they have:

$pdo = new PDO('mysql:host=localhost;dbname=dbname;'.$storeId,
    'dbusername',
    'dbpassword',
    array(
        PDO::MYSQL_ATTR_INIT_COMMAND    =>  "SET NAMES utf8",
        PDO::ATTR_ERRMODE               =>  PDO::ERRMODE_WARNING,
        PDO::ATTR_CASE                  =>  PDO::CASE_LOWER
        )
    );

But when I push this to my staging environment the database settings aren't equal. How can I create a config xml in app/etc and use these database settings in the specific template?


texts: What is the entire folder structure to create magento 2 admin grid?

texts:
What is the entire folder structure to create a custom admin grid?

example -

vendor_name : Ayakil

module_name : Rewardpoints

I am expecting like this.

Why i am asking this question is , i am unable to figure out what is my issue during custom grid developing.

And here why we are using di.xml

Kindly notice that my entire module code is inside the vendor_name folder.


texts: Some Issue while creating order with bundle product

texts:
I Find this script to create order in Magento programmatically, it works for a sample product and not for a bundle product .

when i launch this script the order has created, but with out price product and total price order !
Here is the script:

 $productids=array(2732);
 $email="mustaphanak@gmailcom";
 $websiteId = Mage::app()->getWebsite()->getId();
 $store = Mage::app()->getStore();
 // Start New Sales Order Quote
 $quote = Mage::getModel('sales/quote')->setStoreId($store->getId());

 // Set Sales Order Quote Currency
 $quote->setCurrency($order->AdjustmentAmount->currencyID);
 $customer = Mage::getModel('customer/customer')
             ->setWebsiteId($websiteId)
             ->loadByEmail($email);
 if($customer->getId()==""){
     $customer = Mage::getModel('customer/customer');
     $customer->setWebsiteId($websiteId)
             ->setStore($store)
             ->setFirstname('Jhon')
             ->setLastname('Deo')
             ->setEmail($email)
             ->setPassword("password");
     $customer->save();
 }

 // Assign Customer To Sales Order Quote
 $quote->assignCustomer($customer);

     // Configure Notification
 $quote->setSendCconfirmation(1);
 foreach($productids as $id){
     $product=Mage::getModel('catalog/product')->load($id);
     $quote->addProduct($product,new Varien_Object(array('qty'   => 1)));
 }

 // Set Sales Order Billing Address
 $billingAddress = $quote->getBillingAddress()->addData(array(
     'customer_address_id' => '',
     'prefix' => '',
     'firstname' => 'john',
     'middlename' => '',
     'lastname' =>'Deo',
     'suffix' => '',
     'company' =>'',
     'street' => array(
             '0' => 'Noida',
             '1' => 'Sector 64'
         ),
     'city' => 'Noida',
     'country_id' => 'IN',
     'region' => 'UP',
     'postcode' => '201301',
     'telephone' => '78676789',
     'fax' => 'gghlhu',
     'vat_id' => '',
     'save_in_address_book' => 1
 ));

 // Set Sales Order Shipping Address
$shippingAddress = $quote->getShippingAddress()->addData(array(
     'customer_address_id' => '',
     'prefix' => '',
     'firstname' => 'john',
     'middlename' => '',
     'lastname' =>'Deo',
     'suffix' => '',
     'company' =>'',
     'street' => array(
             '0' => 'Noida',
             '1' => 'Sector 64'
         ),
     'city' => 'Noida',
     'country_id' => 'IN',
     'region' => 'UP',
     'postcode' => '201301',
     'telephone' => '78676789',
     'fax' => 'gghlhu',
     'vat_id' => '',
     'save_in_address_book' => 1
 ));
 if($shipprice==0){
     $shipmethod='freeshipping_freeshipping';
 }

 $quote->setData('overstock_shipping_total', 0);

$quote->setData('overstock_carrier', "UPS");
$quote->setData('overstock_shipmethod', "Ground");

$shippingAddress->setCollectShippingRates(true)->setShippingMethod('overstockshippingrate_overstockshippingrate')->collectShippingRates();
$shippingAddress->setPaymentMethod('overstock');
 $quote->getPayment()->importData(array('method' => 'overstock'));

 // Collect Totals & Save Quote
 $quote->collectTotals()->save();

 // Create Order From Quote
 $service = Mage::getModel('sales/service_quote', $quote);
 $service->submitAll();
 $increment_id = $service->getOrder()->getRealOrderId();

 // Resource Clean-Up
 $quote = $customer = $service = null;
 echo $increment_id;
 // Finished
 return $increment_id;


texts: M2.1 include block template in .phtml file

texts:
I followed this solution to add the user login and user create form in my template file but this not work. Can you notice when I did an error ? (I have my block showed bu not the content of the 2 login and register form).

First, I create this block :

<?php
namespace Test\Account\Block\Form;

class MyAccount extends \Magento\Framework\View\Element\Template
{
    /**
    * @var \Magento\Customer\Model\Session
    */
    protected $_sessionManager;

    /**
    * @param \Magento\Backend\Block\Template\Context $context
    * @param \Magento\Customer\Model\Session $sessionManager
    */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Customer\Model\Session $sessionManager,
        array $data = []
    ) {
        $this->_sessionManager = $sessionManager;
        parent::__construct($context, $data);
    }

    public function customerIsLoggedIn() {
        return $this->_sessionManager->isLoggedIn();
    }
}

Next, I checked the location of login and register html and block :

I create this .phtml

<?php echo __('MY ACCOUNT'); ?>

        x

        <?php if ($this->customerIsLoggedIn()): ?>

CUSTOMER IS LOGIN

        <?php else: ?>

CUSTOMER IS NOT LOGIN

            <?php
            echo $this->getLayout()
            ->createBlock('Magento\Customer\Block\Form\Login\Info')
            ->setTemplate('Magento_Customer::newcustomer.phtm')
            ->toHtml();
            echo $this->getLayout()
            ->createBlock('Magento\Customer\Block\Form\Login')
            ->setTemplate('Magento_Customer::form/login.phtm')
            ->toHtml();
            ?>
        <?php endif; ?>

And add my template by Test/Account/view/frontend/layout/default.xml

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

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

        <referenceContainer name="shortcut.links">
            <block class="Test\Account\Block\Form\MyAccount" name="header.account-link" template="Test_Account::form/my_account.phtml"/>
        </referenceContainer>

</page>


texts:
My Order e-mails are not being sent from Magento.

Cron Job is working, according to Aoe_Scheduler. I use SMTP. Still, I don't get a single email in my inbox. It isn't in my spambox et cetera. All the mails pile up in the table "mage_core_email_queue". What is the problem?


texts: Related products block to right sidebar in Product page In magento 1.9

texts:
I want to transfer the related products block from product detail page to right sidebar but when I try to rearrange it on the catalog.xml file, view all product catalog page is missing. is there a right way for me to do it?

I'm using RWD theme

Appreciate your response.


texts:
I created a custom extension that should fire when a purchase is successful but the Observer function is not working. Below is my config file and Model

<?xml version="1.0"?>
<config>
        <modules>
        <Net_Saver>
            <version>0.1.0</version>
        </Net_Saver>
        </modules>
        <global>
        <helpers>
            <saver>
                <class>Net_Saver_Helper</class>
            </saver>
        </helpers>
        </global>
        <models>
            <net_saver>
            <class>Net_Saver_Model</class>
            </net_saver>
        </models>
    <events>
        <checkout_onepage_controller_success_action>
        <observers>
            <net_saver>
            <class>net_saver/observer</class>
            <method>sendOrder</method>
            </net_saver>
        </observers>
        </checkout_onepage_controller_success_action>
    </events>

</config>

Here's the Model

class Net_Saver_Model_Observer
{

    public function sendOrder(Varien_Event_Observer $observer)
    {
       //details removed
     }
}

Anyone know what i am missing?


texts: Can anyone help me fix this error regarding 404 Media_URL styles.css?

texts: I am seeing this error in the error console 404 (Not Found)  %7B%7BMEDIA_URL%7D%7Dstyles.css. Can anyone offer a solution to fix this?


texts: How to set the json response in to dropdown in magento 2

texts:
I got a json response for a dropdown field from  a controller, But how to I append the options to the dropdown, Please provide me a solution. I got response like below.

{"content":[{"value":"210","label":"xxx"},{"value":"340","label":"yyy"},{"value":"211","label":"zzz"}]}

My Jquery code

 success: function (response){
   alert(response[content]);
   }

How do I loop the values and update in the dropdown Please provide me a solution

For Reference

I am trying to convert the below prototype js code to jquery code

onSuccess: function (response) {
                let options = response.responseText.evalJSON();
                let opt = "<option value=''>-- Please select --</option>";
                options.each(function (option) {
                    opt += "<option value='" + option.value + "'>" + option.label + "</option>";
                });
                document.getElementById("option_id").innerHTML = opt;
            }


texts: How to show Catalog Rule Discount in Cart/Checkout with Before and After total?

texts:
I have discount set using "Catalogue Price Rule" but there is no indication on Cart at the time of checkout that the customer has received the discount. Also, same is the issue with the Order email. There is no mention of the discount.
How can I achieve this programmatically?


texts: Add transactional variables to custom phtml file

texts:
I am trying to build a PDF417 barcode generation for Order transactional email and for that I need some information from the order to pass to custom built phtml file, so javascript there can build a barcode image.

I am including custom phtml file into transactional template like this

{{block type='core/template' area='frontend' template='email/pdf417.phtml' }}

and I would like to be able to pass things like

{{var=$order.getCustomerName()}}

to this file, or get customer name directly in phtml file.


texts:
I have attribute color_swatch which is visual swatch and it has some items with images.
In my code I can take this data:

[swatch_id] => 57
[color_swatch] => Red

[swatch_id] => 58
[color_swatch] => Blue

[swatch_id] => 59
[color_swatch] => Black

How can I get image of the swatch using this data?


texts: Override html template file in Magento 2 not working

texts:
I want to override Magento 2 html template located at

  vendor/magento/module-checkout/view/frontend/web/template/billing-address/details.html

I tried using require-config.js for frontend like this:

var config = {
    map: {
       '*': {
         'Magento_Checkout/template/billing-address/details':
             'Namespace_Module/template/billing-address/details'
    }
  }
};

and I put that file at

  Namespace/Module/view/frontend/template/billing-address/details.html

But I got the following error:

Unable to resolve the source file for 'frontend/Vendor/vendor_theme/en_US/Namespace_Module/template/billing-address/details.html' #0 /var/www/rotoki/vendor/magento/framework/App/StaticResource.php(97)

I think Magento is trying to find that file inside my theme folder instead of my module folder.


texts: Is it possible to give discount to customer who have previous purchase in magento2 cart rule?

texts:
I am trying to add a cart price rule in magento2 for giving 10% discount to item when that customer have previous purchase.

But in condition section there is no customer related options for creating rule.

Is it possible to create this rule in magento? or can i full fill this using any extension?


texts: Customer segment rule add additional condition for customer attribute

texts:
I have created customer attribute called Lottery number(Input type text). This attribute is available for customer segment as well.
There are 4 condition types are showing for this rule,  Is, is not, contain and doesn't contain. I want to set the conditions lottery number starts with  8880.  Using contains I can get the list of the customers whose lottery number contains 8880  any where.  Contains is working based on LIKE %8880%  whereas I want output based on LIKE 8880%
I have applied plugin to getDefaultOperatorInputByType()  and getDefaultOperatorOptions()  for AbstractCondition.php which is at  Magento\CustomerSegment\Model\Condition to add one more condition type Starts with.

This condition is showing properly but after saving the rule, it's not generating the match customers list in the rule. Message queue says:  160    Update matched customers segment
Sorry, something went wrong during customer segment update. Please see log for details.
In log files, I am seeing nothing related to this.
How can I generate the matched customers based on my custom condition type?
Is there are a better way to inject new condition type for custom segment? Is there any other code handling to generate the match customers?
Any help would be appreciated.


texts: how to reset or delete request params in EcomDev_PHPUnit?

texts:
How to completely reset a request params between dispatches ?

In Ecomdev_Phpunit I did an upload test, set request like this:

$this->getRequest()->setParam('upload', "");

and params becomes:

    $this->getRequest()->getParams();
    array (
      'upload' => '',
    )

Then I want to make another test, but i need that upload empty param to be deleted.

How to I get rid of these parameter in scope of single test ?


texts: Magento 2 how to use depends in menu for system configuration dependency

texts:
In magento1.x if we want to display menu depends on system configuration of our module then we use following code for ex.

<menu>
    <test translate="title">
       <depends>
           <config>section/group/field</config>
       </depends>
       <title>Test Menu</title>
    </test>
</menu>

How can we achieve this in magento 2.x


texts: How to verify if a Patch has been applied to Magento CE?

texts:
Simple question.

How to check if a patch, in my case it's SUPEE-6285, has been applied correctly by ssh.

Thanks!


texts:
I've been dealing with a problem all morning where my website is working just fine but I can't access the admin panel. It's not that I can't log in, I can't even load the admin login screen. It was working perfectly yesterday.

The resulting page when accessing the admin is a completely blank page with no HTML, just a basic response header.

To make matters worse, I'm not being able to make the Magento log work, not even through

  Mage::log("something to log")

when it's placed in Mage_Core_Controller_Varien_Front->dispatch.

PHP(apache) not throwing any errors either. Log files do work for apache.

I'm really out of ideas for this one. Any thoughts would be greatly appreciated.


texts: how to use default captcha to custom form in magento2

texts:
i have tried following code.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block class="Kensium\Catalogrequest\Block\Catalogrequest" name="catalogrequest" template="Kensium_Catalogrequest::catalogrequest.phtml" >
                <block class="Magento\Captcha\Block\Captcha\DefaultCaptcha" name="catalogreqcaptcha" />
            </block>
        </referenceContainer>
    </body>
</page>


texts: How can I display customer group id on page?

texts:
I am trying to use a formula that looks at whether a customer is wholesale or not, and then discounts the price automatically for a product if they are, but on a custom priced product. (So I can't just go to advanced pricing and set a tier price). In my formula, I have a variable setup like this

squareinchcost=>('customerGroupId' == 'wholesale' ? .39 : .58);

The 'customerGroupId' is what I need to figure out. What do I need to enter to have the formula actually pull the customerGroupId so that this can equate to either .39 or .58 depending on the customer group?


texts: Why Magento Shopping Cart show wrong price and sometime not allow to add product?

texts:
I'm having a problem with my shopping cart. Few of my customer complain they have shown different in the total sum price. Another problem is they can't Add more then 2 product. Interestingly I'm receiving small amount of order from my website without any problem. But this some customer complain that fact. Even they sent screenshot.

My question is am i missing anything or any one have this kind of problem?


texts: Magento connect: Create extension package on windows(localhost)

texts:
I've created a module I want to upload on Magento Commerce. I've been developing said modules on Windows(WAMP). Now, when I try to use Magento Connect package manager to pack my module, I get an error that path to files are not right, ie:

ERR (3): Warning: md5_file(./app/code/local\frontend/base/default/layout\ No such file or directory.

The problem is, obviously, that windows and unix systems use different directory path delimiters, and, again, apparently, Magento is backing up only one side, unix. So, my question is: is there a way for me to use Create Package functionality in Magento installed on Windows web server, or there's not?


texts: Issue making static block show to specific customer groups

texts:
I'm trying to add a static block to my category pages through Custom Design>Custom Layout Update, that is only visible to a certain customer group. I've already referenced this post, but I'm stuck.

Showing static block only to specific customer group

Currently, I'm using the following in Custom Layout Update:

<reference name="left">
<block type="cms/block" name="MYCUSTOMBLOCK" before="-">
     <action method="setBlockId"><block_id>my-custom-block</block_id></action>
</block>
</reference>

On that static block, I'm then calling for a phtml file that I created:

{{block type="core/template" template="page/my-custom-file-name.phtml"}}

Here's the contents of the phtml file:

<?php if (Mage::getSingleton('customer/session')->getCustomerGroupId() <> 2) :?>
         <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId(163)->toHtml()?><?php endif;?>

With BlockID 163 being another static block that I created, which has a jpeg in it.

This isn't working for me, I know I'm doing something wrong, just not sure what. Would it be better for me to just call for the jpeg through the phtml file, instead of calling for a 2nd block? If so, how would I do that?


texts: Adding custom javascript to Magento 2 to be use in both product and category page

texts:
I am trying to add custom javascript to all product page and category page. but I don't known if to create custom magento 2 module or can edit the magento vendor module.

If I can use the two above how do i go about it


texts:
Magento 2 How to get products details with qty calling products endpoint?
I need to get the qty from the products endpoint.


texts:
Are there any good modules that facilitate vendor management?

looking for the ability to:

Allow vendors to submit new pricing, description information, key attribute information, etc..
Admin needs to approve information and "stage" to go live


texts: how do I group or Bundled the virtual product for a warranty service?

texts: I have 800 Simple electronic Products. what is the best way to implement virtual product as a warranty Service based on product price? Group Product or Bundle product doesn't seem to be a good option. it seems that I would have to do all 800 items individually, would need to change it to group or bundle configure it. doesn't seem too efficient. Am I missing something here there has to be a better way ?


texts: Child theme not loading parent theme styles | SnowdogApps blank-sass

texts:
SOLVED (Answer below)

I had to add this to themes.json that took styles.scss and print.scss from Snowdog/blank and compiled it to my Training/default:

"default-blank": {
    "src": "vendor/snowdog/theme-blank-sass",
    "dest": "pub/static/frontend/Training/default",
    "locale": ["en_US"],
    "localeOverwrites": true,
    "stylesDir": "styles"
}

And then run sudo gulp styles --theme default-blank

All pages have no styling when I change my Magento 2 theme to my own theme that has SnowdogApps blank-sass as the parent theme.

There are a few errors in console:

Failed to load resource: the server responded with a status of 404 (Not Found)
http://edu.dev/pub/static/frontend/Training/default/en_US/css/print.css

Failed to load resource: the server responded with a status of 404 (Not Found)
http://edu.dev/pub/static/frontend/Training/default/en_US/css/print.css

Failed to load resource: the server responded with a status of 404 (Not Found)
http://edu.dev/pub/static/frontend/Training/default/en_US/css/styles.css

Failed to load resource: the server responded with a status of 404 (Not Found)
http://edu.dev/pub/static/frontend/Training/default/en_US/css/print.css

My theme in themes.json:

  "default": {
    "src": "app/design/frontend/Training/default",
    "dest": "pub/static/frontend/Training/default",
    "locale": ["en_US"],
    "localeOverwrites": true,
    "parent": "blank",
    "stylesDir": "web/css/source"
  }

Am I missing something in theme structure?

Training/default
|-Magento_Cms
|    |-web
|         |-css
|              |-source
|                      |-_extend.scss
|-media
|      |-preview.jpg
|-web
|    |-css
|    |    |-source
|    |            |-_variables.scss
|    |            |-_extend.scss
|    |-images


texts: Page template is not appearing in admin front end

texts:
test.xml

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="empty"/>
    <referenceContainer name="page.wrapper">
        <container name="header.container" as="header_container" label="Page Header Container" htmlTag="header" htmlClass="page-header" before="main.content"/>
        <container name="page.top" as="page_top" label="After Page Header" after="header.container"/>
        <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer"/>
    </referenceContainer>
</layout>

layouts.xml

<?xml version="1.0" encoding="UTF-8"?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
    <layout id="test">
        <label translate="true">test layout</label>
    </layout>
</page_layouts>


texts: try to change all base images to bigger size images by importing the CSV file, but failed

texts:
I used the small size image as the base image before.  Now I tried to change all the base images from 250x250 to 800x800 by import the product CSV file. After successfully importing, the small base images are not replaced by bigger images, still remain the same.

Please help!!


texts: How to override UpgradeData.php with Factory?

texts:
I need to override the UpgradeData Class from Catalog\Setup\UpgradeData
But the constructor has factories in his arguments like
CategorySetupFactory

When I run setup:di:compile I got an error that this class does not exists.
How can I then override that class or one of its functions at least?


texts: handle conflicts when override Order Sender class in magento 2

texts:
I am overriding OrderSender class for add custom variable in order confirmation mail. This variable's value is dynamic.

but this file conflicts and give an error like

  "Type Error occurred when creating object:
  Magento\Sales\Model\OrderNotifier".

I want to add a custom variable in the order confirmation mail.

I override the class using di.xml

 <?xml version="1.0"?>
  <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  <preference for="Magento\Sales\Model\Order\Email\Sender\OrderSender" type="Vendor\Module\Model\Order\Email\Sender\OrderSender" />
 </config>

Any solution is appreciated.

Thanks in advance


texts:
In magento the html title is standard configured that it shows the name of the product when on a product page. It also shows the product name if you are on the review page of that specific product.

So it shows the image below in the browser tab both on the product page and the product review page.

I want to change the title for the product review page. I want the browser tab to say something like: 'You are reviewing a product'

Is there some way to change this only for the product review page.


texts: magento 2 rest api search results display with filter options

texts: I am new to magento 2. I have to develop Rest api search service list with categories filter option like web application. Is that possible kindly help me anyone


texts: Why is created_at (customer_entity table) set to change on update?

texts:
When looking at the structure of the customer_entity table, I noticed the created_at field has this attribute: on update CURRENT_TIMESTAMP.  So every time the row is updated, the created_at timestamp changes.

It seems like this attribute should exist on the updated_at field, not the created_at field.  I know it's rare that this table is directly modified due to the EAV structure, but it still seems wrong to ever modify the created_at field.

Is there a reason for this table structure, or is it just a bug?

Edit: I found a confirmed bug report from Magento for this.  Issue #27944.  Unfortunately, you must log in to view it.
http://www.magentocommerce.com/bug-tracking/issue?issue=13882


texts:
How can I add this part, it is a child attribute

Into email, which is sent to customers? Unfortunately now I have only the name, and sku in the email


texts:
I'd like to remove the Recent Posts and Newsletter block in the left column of category views - example of the current page at http://objectandline.co.uk/webstore/personal/sketch-note-books.html.

What's the most expedient way? Thanks, Barry


texts: Magento Observer Events - order of operations

texts:
I am attempting to inject functionality into the catalog_model_product_duplicate event. Part of this module will be to ensure that the stock status of the duplicated product is also duplicated; currently it is not.

I see that CatalogInventory observes this event and sets up some standard stock information. Can I be guaranteed that core events are resolved before my locals? Is there any order of operations here that I can rely upon?


texts: I try to install magento2.3.5-p1 by use composer, when it is finished the folder structure looks like:  Anyone knows why it is like that?


texts: Having issue with magento 1.9 with API handling

texts:
I had worked as below the steps, once after the completing the processing.
I am getting 404 error with my api request.

refer : https://devdocs.magento.com/guides/m1x/api/rest/authentication/oauth_authentication.html

step 1 : /oauth/initiate  (will get OauthToken & OauthTokenSecret)

step 2 :/bkadmin/oauth_authorize?oauth_token  (call back)

step 3 :/oauth/token (will get AccessToken & AccessTokenSecret)

upto this, working

after this using AccessToken & AccessTokenSecret can't get products

http://famara.in/shop/index.php/api/rest/products


texts: Undefined property: DOMDocument::$documentElement in Magento 2

texts:
Notice: Undefined property: DOMDocument::$documentElement in
  /var/www/html/projectnenny/vendor/magento/framework/Config/Dom.php on
  line 148

  Fatal error: Uncaught TypeError: Argument 1 passed to
  Magento\Framework\Config\Dom::_mergeNode() must be an instance of
  DOMElement, null given, called in
  /var/www/html/projectnenny/vendor/magento/framework/Config/Dom.php on
  line 148 and defined in
  /var/www/html/projectnenny/vendor/magento/framework/Config/Dom.php:164
  Stack trace: #0
  /var/www/html/projectnenny/vendor/magento/framework/Config/Dom.php(148):
  Magento\Framework\Config\Dom->_mergeNode(NULL, '') #1
  /var/www/html/projectnenny/vendor/magento/framework/Config/Reader/Filesystem.php(151):
  Magento\Framework\Config\Dom->merge('_readFiles(Object(Magento\Framework\Config\FileIterator))
  3 /var/www/html/projectnenny/generated/code/Magento/Framework/ObjectManager/Config/Reader/Dom/Proxy.php(95):
  Magento\Framework\Config\Reader\Filesystem->read('global') #4
  /var/www/html/projectnenny/vendor/magento/framework/Interception/C in
  /var/www/html/projectnenny/vendor/magento/framework/Config/Dom.php on
  line 164

Normally I use PHP 7.2 for Magento 2. Recently I received a complete
project in Magento that is not running in PHP 7.2, so I change my PHP version to 7.0 also. Install all required extensions in PHP 7.0
version

and when open my project Home page receiving this error.
after that also run all issue related commands like:-

sudo apt-get install php7.0-dom

and

sudo apt-get install php7.0-xml

but my problem is not solved.

Please help


texts: After deleting a module : "Setup version for module 'xxx' is not specified"

texts: I was learning Magento 2 by creating a simple module, and after I deleted all files I'm getting this error. I removed the row from setup_module in DB and reindexed, but I'm still getting this error.


texts: Magento 2 : How to update Quote Customer?

texts:
I want to move all cart items of a current customer with another customer(move all cart items to another customer cart items).
In other words, I want to share One Customer Cart items with another customer.
How this possible in Magento 2?

Here is my code but not working (just added one button and cart page and on click, I call below code)

<?php

namespace Vendor\MultiUserAccounts\Controller\Index;
use Magento\Framework\Controller\ResultFactory;
use Magento\Quote\Model\QuoteFactory;
class Update extends \Magento\Framework\App\Action\Action {
    protected $cart;
    protected $checkoutSession;
    protected $cartHelper;
    protected $request;
    protected $helper;
    protected $quoteFactory;
    protected $productRepository;
    protected $messageManager;
    /**/
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Checkout\Model\Session $checkoutSession,
        \Magento\Checkout\Model\Cart $cart,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory,
        \Magento\Checkout\Helper\Cart $cartHelper,
        \Magento\Framework\App\Request\Http $request,
        \Vendor\MultiUserAccounts\Helper\Data $helper,
        \Magento\Quote\Api\CartRepositoryInterface  $quoteFactory,
        \Magento\Catalog\Model\ProductRepository $productRepository,
        \Magento\Framework\Message\ManagerInterface $messageManager
    ){
        $this->checkoutSession = $checkoutSession;
        $this->cart = $cart;
        $this->resultPageFactory = $resultPageFactory;
        $this->cartHelper = $cartHelper;
        $this->request = $request;
        $this->helper=$helper;
        $this->quoteFactory = $quoteFactory;
        $this->productRepository = $productRepository;
        $this->messageManager = $messageManager;
        parent::__construct($context);
    }
    public function execute() {
        try {
            $quote_id=$this->helper->getQuoteId();
            $customer_id=$this->helper->getSubCustomerId();
            if($quote_id!='' && $customer_id!=''){
              /*Code for assign quote to another customer*/

                $current_quote = $this->checkoutSession->getQuote();
                $current_quote = $this->quoteFactory->get($current_quote->getId());
                $current_quote->setCustomerEmail('test@test.com');
                $current_quote->setCustomerFirstname('test');
                $current_quote->setCustomerLastname('test');
                $current_quote->setCustomerId($customer_id);

                //$current_quote->save();
                $this->quoteFactory->save($current_quote);
                $this->checkoutSession->clearQuote()->clearStorage();

            }
        } catch (\Exception $e) {
            $this->messageManager->addError(__("Error while update quote item ! :".$e->getMessage()));
            $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
            $resultRedirect->setPath('checkout/cart/index');
            return $resultRedirect;
        }
    }
    /**/
}


texts: how to have different order confirmation emails for different scopes?

texts:
suppose we have two or three checkouts in different stores and we want to write customized confirmation emails for them I know that I can change the template for placing order in app/locale/en_US/template/email/sales/order_new.html
is it possible to create a folder of all other templates and have different confirmation emails?


texts: differentiate customer in group based on registration email id

texts:
I got a project In which I have to make a store in which when customer registered email id yourname@yourname.com domain then he/she will be consider as premium customer and I have to assign them particular product which only Premium customer can Access and other customer registered with other domain Email id will be general customer and they can not have access to premium product

For this I follow this link
How to assign a group to user based on their email id on registration

and created an module based on code but it is not working  Here is my Code of

app\etc\modules/Xyz.xml

<?xml version="1.0"?>
<config>
  <modules>
    <Xyz_Catalog>
      <codePool>local</codePool>
      <active>true</active>
    </Xyz_Catalog>
  </modules>
</config>

Then Code for my app\code\local\Xyz\Catalog\etc/config.xml

<?xml version="1.0"?>
<config>
  <global>
    <models>
        <xyzcatalog>
             <class>Xyz_Catalog_Model</class>
        </xyzcatalog>
    </models>
    <events>
      <customer_save_after>
        <observers>
          <change_customer_group>
            <type>singleton</type>
            <class>magento63798/observer</class>
            <method>ChangeCustomerGroup</method>
          </change_customer_group>
        </observers>
      </customer_save_after>
    </events>
  </global>
</config>

And code for my observer is in app\code\local\Xyz\Catalog\Model\Observer/Observer.php

    <?php
    class Stackexchange_Magento63798_Model_Observer
    {
        public function ChangeCustomerGroup(Varien_Event_Observer $observer){

            $customer=$observer->getEvent()->getCustomer();
            Mage::log('My log entry'.$customer->getId(), null, 'Magento63798.log');

            $premiummember=4;// 4 is the id of customer group I have created
            $Guestmember=5;
            list($user, $domain) = explode('@',$customer->getEmail());

            if ($domain == 'gmail.com'):
                /* set Customer group as Stiudent */
                $customer->setData('group_id',$StudentGroup);
            // use gmail
            else:
                $customer->setData('group_id',$GuestGroupId);
            endif;
 }

But when I registered the user with email id of like of premium member it is not goes into premium member group but goes to general Group


texts: No products or too less products shown in Layered Navigation / Filter

texts:
We are using Magento 2.1.8 and believe this worked in Magento 2.1.7 (but the bug may also been introduced sometime else).

When clicking a filter in the shop category, we get the message "We can't find products matching the selection."

We already reindexed and cleared the cache.

We use the Wyomind_ElasticSearch module but already disabled it and have the same result. But after enabling it back and reindexing, we sometimes see one product (which should be more) in the filtered category. Interestingly, the product count shows "4 items", even only 1 is shown.

How can this be debugged?


texts: How to redirect to custom page after Customer Successfully register..!

texts: I need to redirect to next controller after registering page.


texts:
In magento 2.0, when I run the magento setup:di:compile command, it gives an error:

  [ErrorException]
    Declaration of Magento\Newsletter\Test\Unit\Model\Queue\TransportBuilderTes
    t::testGetTransport() should be compatible with Magento\Framework\Mail\Test
    \Unit\Template\TransportBuilderTest::testGetTransport($templateType, $messa
    geType, $bodyText, $templateNamespace)

How to solve this?


texts:
public function getItems(){
    $a=array();
    $customerId = null;
    $userType = GroupInterface::NOT_LOGGED_IN_ID;
    $isGuest = true;
    $quote = null;
    if($this->isLoggedIn()){
        $customerId = $this->userContext->getUserId();
        $isGuest = false;
        $quote = $this->cartObj->getQuote()->loadByCustomer($customerId);

    }
    else{
        $quote = $this->cartObj->getQuote();
        $quote->setCustomerGroupId(GroupInterface::NOT_LOGGED_IN_ID);
    }
    $quote->setCustomerIsGuest($isGuest);
    $items = $quote->getAllItems();
    foreach($items as $item) {
        array_push($a,$item->getData());
        /*$a[$i]['ProductId'] = $item->getProductId();*/
    }
    //array_push($a,$items);
    return $a;
}

this code returns me empty result even te cart is not empty and when I call

  $quote->getItemsCount();

it returns me 4.

why this is happening


texts: Order status showing pending instead of cancel in magento 2

texts:
Order status is not changing after order cancel still showing pending in order status grid.

For reference see screenshot url.

http://nimb.ws/n1L7qi

http://nimb.ws/W0Hmzp


texts: Error on Firstload.php in ProductFilter Module

texts:
When my page is loading it will give me the warning that :

  Notice: Undefined index: custom_template in
  /home/itnasass/public_html/app/code/Codazon/ProductFilter/Block/Product/FirstLoad.php
  on line 32


texts: Get an order's products in /sales/order/history.phtml

texts:
In Magento 1.9, the "dashboard" and "order history" pages contain table of orders with summary info (date, order #, total) but not some helpful details (product image, product name, line price, quantity).

UX would be improved by highlighting the products in each order so the list of orders is more visual.

— — — — — — — — — —

Q: how can we load the product data for each order in the loop of orders without harming performance?

— — — — — — — — — —

Relevant files:

/sales/order/history.phtml
/sales/order/recent.phtml

Relevant code:

<?php
$orders = $this->getOrders();

foreach ($orders as $order) {
    echo $order->getRealOrderId();
    echo $order->getStatusLabel();
    // [todo] get products in order (name, image, url, price paid)
}
?>

Note: I'm a frontend developer, so please bear with me. A little more detail than just override X class or use Y model is helpful.


texts:
Having issues migrating my site over and only just noticed when I try to view a products page I get this error:

Fatal error:  Call to a member function setTemplate() on a non-object in /*/app/code/core/Mage/Catalog/Block/Product/View/Tabs.php on line 60

Really don't know where to begin with fixing this, tried debugging the page to no avail. It seems to put a string in $template when doing setTemplate($template).

Any help would be much appreciated.

EDIT

Tabs.php:

<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    Mage
 * @package     Mage_Catalog
 * @copyright  Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */

/**
 * Product information tabs
 *
 * @category   Mage
 * @package    Mage_Catalog
 * @author     Magento Core Team <core@magentocommerce.com>
 */
class Mage_Catalog_Block_Product_View_Tabs extends Mage_Core_Block_Template
{
    protected $_tabs = array();

    /**
     * Add tab to the container
     *
     * @param string $title
     * @param string $block
     * @param string $template
     */
    function addTab($alias, $title, $block, $template)
    {

        if (!$title || !$block || !$template) {
            return false;
        }

        $this->_tabs[] = array(
            'alias' => $alias,
            'title' => $title
        );

//  echo $template."
";

        $this->setChild($alias,
            $this->getLayout()->createBlock($block, $alias)
                ->setTemplate($template)
            );

    }

    function getTabs()
    {
        return $this->_tabs;
    }
}

layout xml

        <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" >
            <action method="addTab" translate="title" module="catalog"><alias>description</alias><title>Product Description</title><block>catalog/product_view_description</block><template>catalog/product/view/description.phtml</template></action>
            <action method="addTab" translate="title" module="catalog"><alias>upsell_products</alias><title>We Also Recommend</title><block>catalog/product_list_upsell</block><template>catalog/product/list/upsell.phtml</template></action>
            <action method="addTab" translate="title" module="catalog"><alias>additional</alias><title>Additional Information</title><block>catalog/product_view_attributes</block><template>catalog/product/view/attributes.phtml</template></action>
            <action method="addTab" translate="title" module="catalog"><alias>downloads</alias><title>Product Downloads</title><block>catalog/product_view_download</block><template>catalog/product/view/download.phtml</template></action>
        </block>


texts:
As the title said, I want to duplicate roles programmatically and especially I will call that action from frontend.

The problem here is I don't know which file contained the action I need to call. Damn Varien.

Any help will be appreciated, I'm very new to Magento.


texts: SQL query to get products enabled, in stock without images?

texts:
I'm running a Magento 2.3 and I would like to run a query in my database to export some products data that I don't have natively via the admin panel, the attributes are:

Status
Stock
Images

How could I get it via SQL?


texts: How can I confirm the version of magento? without have ftp access?

texts:
I want to now the version of the magento of this website:

http://www.aztime.com.br/loja

its possible check it without ftp access, without admin panel access, without licence.txt, just like a visitor?


texts: Multiple stores with different catalog and customers but same admin section

texts:
How to setup multiple store in magento with following configuration requirements :

Different catalog.
Different Customers.
Different store themes and view if possible.
Same admin-user access(common admin section).

Just the extensions and modules (Complete code files) from primary store should be common between these stores.

I am using Magento 1.9


texts: extremely slow head assets rendering in magento2 on windows

texts:
I had to urgently migrate my working project from OSX machine to Windows10 box, and experienced terribly slow performance on loading magento pages (over 1 minute), with developer mode enabled.

After some debugging, I realized that timing issues came from this method

$this->pageConfigRenderer->renderHeadContent();

I had to make my changes fast and somehow continue my work so I just replaced headContent in $this->assign() method with pre-genared head contents of renderHeadContent and after that I got response time about 2-3seconds.

Did anyone struggled with similar problem before and found any workaround ?

(caching is enabled, varnish disabled)

my enviroment:

Windows 10

CPU: corei7 2.6

RAM: 6gb

SSD drive

wampserver (apache),
php7.0.10,
xdebug disabled,
opcache is not installed


texts: refresh page in magento without reloading - ajax

texts:
I want to use ajax or something that will allow my website in magento to refresh without reloading.

I am newbie so please guide me thoroughly about it.

Also, I am using Mana Filters in magento for filtering products and I want to update the page result without reloading when user checks the Filtering Options.

for example here is the checkbox code for filtering any product.

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

when checked, it will reload the page and update the url with selected item.

Kindly help me about this.

Thank you so much in advance.


texts:
I want to display the category image of the category.I have a phtml file and is called in cms home page.

<?php
$subcats = array(99,189);
$imageBlock = $block->getLayout()->createBlock('Magento\Catalog\Block\Category\ListProduct');

foreach($subcats as $cat_id){
    //echo $cat_id;
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $category = $objectManager->create('Magento\Catalog\Model\Category')->load($cat_id);
    $categoryImage = $imageBlock->getImage($category, 'category_page_list');
    echo 'dfdf'.$category->getName();
    //$productImage = $imageBlock->getImage($category);
    echo 'ssds'.$categoryImage;

}

But it is not displaying the image and getting an error.

Please help.


texts:
I am using Devilbox and these specifications :

PHP_SERVER = 7.3
MYSQL_SERVER=mysql-5.7
HTTPD_SERVER=apache-2.4

I have cloned the project and I have launched these commands

From phpmyadmin

insert into core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);

and this one

bin/magento  setup:static-content:deploy -f && bin/magento s:static-content:deploy es_ES en_US de_DE fr_FR -f

from Devilbox Shell but nothing has worked , always I got Page containing HTML without CSS
There is no CSS render and I got always this message in the console

Failed to load resource: the server responded with a status of 404 (Not Found)

That it is shown for CSS , JS and fonts resources.
I have tried also to empty the cache and nothing works
If anyone needs any other details you could ask me.

Thanks in advance


texts: How to setup Shopper Approved? I suppose to add their code to the check-out page to make their "survey" appear after the check-out process

texts:
Magento 1.9.1.0

We purchased the Shopper Approved package which basically asks the customers to leave a reference:

The first "quick survey" should appear on the CONFIRMATION page after a customer places an order and if they fill it out - it gets posted to Google, Facebook and who knows where else. If they fill out this initial survey - they will also get the
FULL survey by Email a few days later.

What I need to figure out is - How do I add the code they gave me to the page that comes up for the customer after they placed their order?

Updated on February 7th, 2019:

The path that worked for me in the end is:

  public_html/app/design/frontend/smartwave/porto/template/checkout/success.phtml


texts:
I have a situation that suits best a configurable product. The best approach to what I need is this http://www.magentocommerce.com/knowledge-base/entry/tutorial-creating-a-configurable-product.

What I need more is the system to show another piece of information when a user selects an option like this:

Is there  any possiblity I can do this from the Magento admin or would this require extra development?

Thank you in advance


texts: How to change layout of all category in magento to 1 column

texts:
i have about 100 catgory in admin, is there way to change layout of all catgory to 1column

i can do it from backend,but doing one by one will take too much time, is there way to do it quickly

i tried to do it from layout file but it is not working, below is my code of xml file , still is see products as 1 column-left

Magento_Catalog/layout/catalog_category_view.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="div.sidebar.additional">
            <block class="Magento\Cms\Block\Block" name="banner_left" after="recentproductslider">
                <arguments>
                    <argument name="block_id" xsi:type="string">banner_left</argument>
                </arguments>
           </block>
         </referenceContainer>

        <referenceContainer name="content">
            <block class="Magento\Framework\View\Element\Template" name="breadcrumbscategory" template="Magento_Theme::html/breadcrumbscategory.phtml" before="-"/>
            <block class="Magento\Framework\View\Element\Template" name="custom.text" template="Magento_Theme::html/custom-list-page.phtml" after="breadcrumbscategory"/>
        </referenceContainer>
        <referenceBlock name="catalog.leftnav" remove="true" />
          <move element="category.view.container" destination="page.top" before="-"/>
         <!-- <move element="breadcrumbs" destination="category.view.container" before="page.main.title"/> -->
         <move element="page.main.title" destination="content" before="-"/>
         <referenceContainer name="page.main.title" remove="1"/>
 <referenceContainer name="breadcrumbs" remove="true" />
    </body>
</page>


texts:
I'm trying to import my .csv file to magento using magento import (system-import).

When i choose my .csv file and click check data, it says file is valid and it gives me option to import. So i click import. After like 10 seconds, it gives me this error.

Following Error(s) has been occurred during importing process:

  Only first 100 errors are displayed here. Download full report General
  system exception happened Additional data: URL key for specified store
  already exists.

I literally have no idea what this means. I have already tried maximizing characters to 255, changing writing permissions and leaving url_key blank, even deleting it out of .csv. Nothing helps.

Any help will be appreciated!

PS: also after trying to upload when i go to dashboard, it gives me indexers are invalid which never happened before.


texts: Magento 2: Adding a new block to a child theme

texts:
Just getting to grips with Magento 2.. I have created and applied a child theme of Luma that seems to work fine. It pulls in my CSS files and things like that. But I would like to add some custom blocks to the footer.

Here are the contents of my default.xml which is in mytheme/Magento_Theme/layout/default.xml

As you can see I've tried to create a new block called footer_social, I have then created a .phtml file which sits in mtheme/Magento_Theme/html/footer_social.phtml and added a little bit of text to it to test but nothing changes. Guessing I am missing something? Any help appreciated.

    <?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="header.panel">
            <block class="Magento\Framework\View\Element\Html\Links" name="header.links">
                <arguments>
                    <argument name="css_class" xsi:type="string">header links</argument>
                </arguments>
            </block>
        </referenceContainer>
        <referenceBlock name="logo">
            <arguments>
                <argument name="logo_img_width" xsi:type="number">148</argument>
                <argument name="logo_img_height" xsi:type="number">43</argument>
            </arguments>
        </referenceBlock>
        <referenceContainer name="footer">
            <block class="Magento\Store\Block\Switcher" name="store_switcher" as="store_switcher" after="footer_links" template="switch/stores.phtml"/>
            <block class="Magento\Framework\View\Element\Template" name="footer_social" template="Magento_Theme::html/footer_social.phtml">
        </referenceContainer>
        <referenceBlock name="report.bugs" remove="true"/>
        <move element="copyright" destination="before.body.end"/>
    </body>
</page>


texts: Magento 1.9 Customer Login Stopped Working

texts:
Server: Dedicated, Apache 2.4, Nginx, Redis, CPanel/WHM, Site using FPC extension Mirasvit

We have an Magento 1.9 site with the above setup - since last week all of sudden customers are no longer to login to there accounts.

When entering the user and pass the user is returned back to the login page and no error is showing,

I have tried the suggested fixes
Magento 1.9 customer login not working

Previously there was no cookie domain however I still tried.

and form_key

https://stackoverflow.com/questions/19712499/magento-customer-login-page-redirects-to-itself-without-any-error

Also checked all directory and file permission.

I have also noticed that I am no longer able to run reindex via SSH
The cron is no longer working - it is setup correct and was working previously.

Everything was working until last week and this just happen suddenly - I am out of ideas as I think this may also be some server setting change which is not allowing server software or php to be executed on the site.

Please can anyone suggest any more fixes asap - as I am having a nightmare.
Thank You


texts:
I'm working to replace all layout <action> nodes on a M2 project. Looking at the below note on the M2 v2.2 documentation:

  The  instruction is deprecated. If the method implementation
  allows, use the  for  or  to access
  block public API

https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/layouts/xml-instructions.html

I got stuck while trying to replace the <action method="addTab">

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="{{parent_block_name}}">
            <block class="{{block_class_name}}" name="{{block_name}}"/>
            <action method="addTab">
                <argument name="name" xsi:type="string">{{section_name}}</argument>
                <argument name="block" xsi:type="string">{{block_name}}</argument>
            </action>
        </referenceBlock>
    </body>
</page>

node and the documentation is a bit unclear. This layout xml file is in the Magento admin area.

What am I missing? Any guide will be helpful.


texts:
I am working to validate W3C errors in the magento shop.It is including the css in theme's page.xml by using the code:

<action method="addCss"><stylesheet>css/styles.css</stylesheet></action>

When check at W3C validator it give error:

  Element link is missing required attribute property

I did search for this error and found a sloution here that i can use property='stylesheet' to fix the error.

Now the question is how to use property='stylesheet' here with magento css include code?


texts: Magento 2 - How to add Birthday field to Checkout

texts:
I need to add the birthday field with a validation (which is activated from admin) in the checkout shipping form.

I checked different templates in the checkout module but i cannot get it showing up.

how to display Birthday field in checkout shipping form.

Thanks.


texts: Mage::getModel() - getCollection() on non-object on staging server

texts:
I've created a custom banner module for Magento and I've tested it locally on my Vagrant/VirtualBox setup running an instance of precise32 and everything is working great.

When I pulled the code from GitHub on to a staging server the extension is not working and I'm getting the following error:

PHP Fatal error: Call to a member function getCollection() on a non-object in /var/colourbox/app/code/local/AffinityCloud/ACBanners/Block/Slider.php on line 7, referer: http://colourbox.affinitycloud.co.uk/tub-storage.html

This is while viewing the home page, so I'm not sure why it's referencing http://colourbox.affinitycloud.co.uk/tub-storage.html as the referer as this is a category page.

I've cleared the cache (is disabled anyway) and reindexed. Stil no joy. I've also tried to rename the model classes using lowercase characters and the first character uppercase with no result.

I've added the module code to GitHub below so you can see the code:

https://github.com/affinitycloud/acbanners

Any ideas why this would be working locally and not on the staging server? It's as if it can't find the model classes but has no problem fining the Slider.php class.

I'm at a loss as to what to do here.

NOTE: For brevity, I would like to add that I have logged out and back in to the admin, while also deleting the module tables and the reference in core_resource to no avail. It creates the tables fine but I still get the same issues and the module is showing as enabled in the advanced config.


texts:
I am trying to identify search result page in magento 1 js file
Any idea how to get it?

Thanks


texts: hide out of stock products from layered navigation in magento2

texts:
I have a bought extension of many around for layered navigation with Ajax, and I have an attribute size.
Show out of stock product is enable.
Now when using the filter to let's say show only product with size Small, it still show all configurable products with child small even if the small child simple product associated is out of stock.

So what I basically want is to hide out of stock product from layered navigation even when child products


texts:
I want to change the email template "New Order (Magento/luma)".
I want to remove the SKU column from order items table, and I think the following line will send me to the file where I must make the changes:
{{layout handle="sales_email_order_items" order=$order area="frontend"}}
How do I interpret that line of code?
Thank you!


texts: Replace phtml from register page magento2

texts:
I already enabled path hits in frontend view, but is not loading the "new phtml". What can i do?

edit:
magento Version is 2.1.6

My module files:
/company/CustomModule/view/frontend/layout/customer_account_create.xml :

<?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="customer_form_register">
            <block class="Magento\Customer\Block\Form\Register" template="company_CustomModule::/form/register.phtml"/>
        </referenceContainer>
    </body>
</page>

And the new phtml i changed a few things, but Does not load
 the new file, inside /company/CustomModule/view/frontend/templates/form/register.phtml

I need an assistance, thanks in advance.

i already try to run this commands:

php bin/magento setup:upgrade
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush

but not works


texts:
How to change the layout of Change Account Information page ( /customer/account/edit/ )? By default it uses 2columns-left.phtml. I tried the following in local.xml but nothing changes:

<customer_account_edit translate="label">
    <reference name="customer_edit">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
</customer_account_edit>

What did I miss?

Also, how to change the layout of the following pages ?

/customer/address/edit/
/customer/address/new/
/customer/account/edit/changepass/1/

Thanks!


texts: How to change the validation message in one page checkout - Magento 2.2

texts:
I Added some validation using a plugin to checkout shipping section telephone number field. Validation works fine like the below image.

How can I change the message "Please enter less or equal than 10 symbols" with my message?


texts: Magento 2 upload logo from admin in svg format

texts:
In Magento 2.2.2 , I want to upload header logo of svg format from admin panel. I have created a module for it

  view/adminhtml/ui_component/design_config_form.xml

with this content:

<?xml version="1.0" encoding="UTF-8"?>
 <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="other_settings">
    <fieldset name="head">
        <field name="head_shortcut_icon">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="allowedExtensions" xsi:type="string">jpg jpeg gif png svg ico</item>
                </item>
            </argument>
        </field>
    </fieldset>
</fieldset>

After that run the upgrade, deploy and cache clean command and then again upload the svg format logo from admin then it showing the message "Disallowed file type".

So please help me


texts: Magento 2 Authorize.net billing address validation

texts:
Currently in Magento 2, Authorize.Net validates the billing address after creating the order. If the billing address is wrong then it converts the order status to cancel.

I have found one link about it Magento 2 - Authorize.net - Transacation fails - Order created with Cancel Status

In that post, he has mentioned about a third-party Authorize.Net payment method, but I did not find any so far which validates the billing address before an order is created.

If anyone knows an extension or tutorial to verify the billing address with Authorize.Net before an order is placed then can you please share it with me?


texts:
we are using an payment extension that sends a POST response if the transaction was successful. For some reason the string contains some none UTF-8 characters.

The response looks like this ï»¿OK The right resposne is OK

I have the same payment extension in other shop (different customer and server) and there the extension is working perfectly.

Does anyone have any experience what could be causing this change in the response?  I talked with the developers of the extension but they say it has to be something on the server side. I checked the encoding on server and its UTF-8.

I checked the response with Chrome extension Postman and the response comes without the strange characters - "OK".

I have no idea left what could be causing this change in response string. Where could be the ï»¿ generated?

Thanks for any hints.


texts:
I have a image chooser in widget, when I click it first time, pop-up is open and I can choose image, but if I want choose another image and click on button I get a exception.

widget.xml

<parameter name="image" xsi:type="block" required="true" visible="true" sort_order="10">
     <label translate="true">Banner image</label>
     <block class="Namespace\Widget\Block\Adminhtml\Widget\ImageChooser">
         <data>
              <item name="button" xsi:type="array">
                 <item name="open" xsi:type="string">Choose Image...</item>
              </item>
         </data>
     </block>
</parameter>

ImageChooser.php

class ImageChooser extends \Magento\Backend\Block\Template
{

protected $elementFactory;

/**
 * Image Chooser construct
 *
 * @param \Magento\Backend\Block\Template\Context $context
 * @param \Magento\Framework\Data\Form\Element\Factory $elementFactory
 * @param array $data
 */
public function __construct(
    \Magento\Backend\Block\Template\Context $context,
    \Magento\Framework\Data\Form\Element\Factory $elementFactory,
    array $data = []
) {
    $this->elementFactory = $elementFactory;
    parent::__construct($context, $data);
}

/**
 * Prepare chooser element HTML
 *
 * @param \Magento\Framework\Data\Form\Element\AbstractElement $element Form Element
 * @return \Magento\Framework\Data\Form\Element\AbstractElement
 */
public function prepareElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
{
    $config = $this->_getData('config');
    $sourceUrl = $this->getUrl(
        'cms/wysiwyg_images/index',
        ['target_element_id' => $element->getId(), 'type' => 'file']
    );
    $chooser = $this->getLayout()->createBlock('Magento\Backend\Block\Widget\Button')
        ->setType('button')
        ->setClass('btn-chooser')
        ->setLabel($config['button']['open'])
        ->setOnClick('MediabrowserUtility.openDialog(\''. $sourceUrl .'\')')
        ->setDisabled($element->getReadonly());
    $input = $this->elementFactory->create("text", ['data' => $element->getData()]);
    $input->setId($element->getId());
    $input->setForm($element->getForm());
    $input->setClass("widget-option input-text admin__control-text");
    if ($element->getRequired()) {
        $input->addClass('required-entry');
    }
    $element->setData('after_element_html', $input->getElementHtml() . $chooser->toHtml());
    return $element;
}

Has anyone encountered this error?


texts:
I installed an extension and the default section selected, when System -> Configuration is clicked, is that of this extension, instead of General (section) -> General (group).

I can't seem to find what configuration is doing this. If it's not configuration, what else is it?

EE 1.13


texts: How can I set the Sales Order search to by default only display "Processing" orders? So when I view the orders page it displays "Processing" orders by default?


texts: How to test module in different Magento and PHP versions using CI?

texts:
I have an open-source module in Github and I'd like to automatically test it via CI using the Magento Coding Standard and different Magento installations in different PHP versions.
For example:

Magento Enterprise 2.3 + PHP 7.2

Magento Community 2.4 + PHP 7.3

How could I implement it?


texts: Why change the appearance of my main menu in customer page?

texts: does anyone please know why the appearance (the rules of my css file are not followed) and the behavior of the main menu changes on the page of creating a new user in Magento 2.4. My main menu is made up of product categories and submenus for product subcategories; But when entering the page to add a new user, the submenus do not appear and the menu options change their appearance and behavior, for example hover does not work. Thank you