texts:
On site sometime we face issue with mySql connection timeout

We are using Amazon RDS

Complete error Was

a:5:{i:0;s:43:"SQLSTATE[HY000] [2002] Connection timed out";i:1;s:1765:"#0 /documentRoot/lib/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /documentRoot/lib/Varien/Db/Adapter/Pdo/Mysql.php(396): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /documentRoot/lib/Zend/Db/Adapter/Abstract.php(460): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 /documentRoot/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 /documentRoot/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 /documentRoot/app/code/core/Mage/Core/Model/Resource.php(179): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 /documentRoot/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Array)
#7 /documentRoot/app/code/core/Mage/Core/Model/Resource/Setup.php(141): Mage_Core_Model_Resource->getConnection('core_setup')
#8 /documentRoot/app/code/core/Mage/Core/Model/Resource/Setup.php(234): Mage_Core_Model_Resource_Setup->__construct('core_setup')
#9 /documentRoot/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#10 /documentRoot/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#11 /documentRoot/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#12 /documentRoot/index.php(125): Mage::run('', 'store')
#13 {main}";s:3:"url";s:100:"/index.php/admin/cache/index/key/516a20d7aac66e35e5c768dce2be889fa303154ebe30b84c046e178f46b01cfd/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

I am trying to re-create issue but no luck

can any one tell me where is the issue or how can i re create it


texts: Add Company Name from shipping address in sales order grid

texts:
I have following code in Observer.php, which basically adds "company name" from billing address to sales order grid.

I would like to add also "name" (Account Name/Surname) and "shipping_company" (Company Name from shipping address).

Columns appears just fine, but I get no data/values.

I guess I need to add a couple of join for the database but I have no idea on how to do this.

Any help is appreciated. Here is my code:

public function addColumnsToSalesOrderGrid(Varien_Event_Observer $observer)
{
    $event = $observer->getEvent();
    $this->_grid = $event->getBlock();
    if ($this->_grid instanceof Mage_Adminhtml_Block_Sales_Order_Grid) {
        $this->_collection = $this->_grid->getCollection();
        $this->_collection->getSelect()->join(Mage::getSingleton('core/resource')->getTableName('sales/order_address'), "main_table.entity_id = ".Mage::getSingleton('core/resource')->getTableName('sales/order_address').".parent_id",array('company') )->where(Mage::getSingleton('core/resource')->getTableName('sales/order_address').".address_type =  'billing'");

        $columnData = array(
            'header' => 'Company Name',
            'index'  => 'company', // Company Name from billing address
            'type' => 'text',
        );

        $this->_grid->addColumnAfter('company', $columnData, 'created_at');
        $this->_grid->sortColumnsByOrder();

        $columnData = array(
            'header' => 'Name',
            'index'  => 'name', // Account Name/Surname
            'type' => 'text'
        );

        $this->_grid->addColumnAfter('name', $columnData, 'company');
        $this->_grid->sortColumnsByOrder();

        $columnData = array(
            'header' => 'Ship to',
            'index'  => 'shipping_company', // Company Name from shipping address
            'type' => 'text'
        );

        $this->_grid->addColumnAfter('shipping_company', $columnData, 'name');
        $this->_grid->sortColumnsByOrder();

        // rebuild the filters
        $filter = $this->_grid->getParam($this->_grid->getVarNameFilter(), null);
        if (is_null($filter)) {
            $this->_collection->load();
        }
        $this->_collection->clear();
        if (is_string($filter)) {
            $data = $this->_grid->helper('adminhtml')->prepareFilterString($filter);
            $this->_setFilterValues($data);
        } else {
            if ($filter && is_array($filter)) {
                $this->_setFilterValues($filter);
            }
        }
        // force a reload of the collection
        $this->_collection->load();
    }
}


texts: Magento2 - after installation: Setup starts again

texts:
Today is my big Magento2 day and I run from one error into the next.
After some hours I was able to install Magento completly.

In the last step, it comes to "go to backend" "go to frontend".
1) Instead of my chosen URL m2.docker/ it has screwed my URL to m2.dockerL/
This is pretty strange.
2) The more worst problem: If I go to frontend, the installation mode comes up again!

It installed 100% with success page but I canÄt reach backend nor frontend because installation page comes up.

Any suggestions please?

Thank you!


texts: How to not allow special characters to be entered in the address field when a customer is filling out there billing or shipping information

texts: Would my edit have to be in the phtml files? All I want to do is add more to the validation process of the address field.


texts: Magento2: Add date-from validation for dob (date of birth) field in customer creation

texts:
I want to limit the dob field in account creation form to be not less than 01/01/1900.

I thought 2 way:
- limit the calendar widget (but maybe someone could input the date directly)
- add a validation to the dob field

The first way seems not to be secure, so i decide to follow the second one.

I found there is a validation class "validate-date-range" which seems to do what i need, but i can't find how to use it (how can i pass the initial date parameter?)

Moreover, I don't know how to add the validation to the dob field in the account create form.

I try to modify the file
vendor/magento/module-customer/view/base/ui_component/customer_form.xml
but i can't see change in the frontend code.

Any help?!?


texts: Magento 2 product list quantity increment buttons

texts:
I have implemented the quantity increment buttons from https://magenticians.com/quantity-increment-decrement-magento-2/ and is working fine on product page. So I decided to implement it to list.phtml and buttons are displayed correctly but when I update quantity from a product all other quantities are updated too. Anyone knows how to update quantity for the item from I clicked the increment button?

I'm using the same code as Magenticians.
Thank you!


texts: Who thinks they can decode this encryped PHP file?

texts:
http://pastebin.com/7jP67T2V

I have decoded the first part($e = base64_decode) but after that I get stuck.

I haven't seen a shell like this before and can't find any similar ones to see how they were encoded.


texts: How to get ordered product's color and size in magento1

texts:
I want to get the color and size of ordered product on sales_order_save_after

i have write this code

$product = Mage::getModel('catalog/product')->load($item->getProductId());
$color = $product->getAttributeText('color');

config.xml event

<events>
    <sales_order_save_after>
        <observers>
            <Piyush_orderexport_order_save_after>
                <type>singleton</type>
                <class>Piyush_OrderExport_Model_Observer</class>
                <method>exportOrder</method>
            </Piyush_orderexport_order_save_after>
        </observers>
    </sales_order_save_after>
</events>

but no value found


texts: Magento 2 Please update innodb_buffer_pool_size or decrease batch size value

texts:
After installing Magento 2.2.2 when I check my error log I get this warning.

  Memory size allocated for the temporary table is more than 20% of
  innodb_buffer_pool_size. Please update innodb_buffer_pool_size or
  decrease batch size value (which decreases memory usages for the
  temporary table). Current batch size: 100000; Allocated memory size:
  50000000 bytes; InnoDB buffer pool size: 134217728 bytes.

Where the error is saying memory size allocated for the temporary table is more than 20%. Which temporary table is it referencing to? How should I resolve it?


texts:
I'm trying to add a simple product to the cart, but addProduct() is failing.

For what it's worth, I'm running the code from inside the checkout_cart_product_add_after event.

$cart = Mage::getSingleton('checkout/cart');
$cart->init();

//exit('a'); // when uncommented, this does get outputted
$cart->addProduct($secondaryProductId, $primaryProductQty);
//exit('b'); // when uncommented, this does not get outputted.

The $secondaryProductId variable is type integer and is value 103, a simple product with that ID exists and the product is enabled.

The $primaryProductQty variable is type integer and is value 1


texts: Layered navigation filter toolbar not opened on click in mobile


texts: Error while saving product in admin panel

texts:
All of a sudden i am getting this error in admin panel while saving a change in products.

  Warning:
  include(/chroot/home/shireeni/shireeninc.com/html/osc/lib/Zend/Log.php):
  failed to open stream: Too many open files  in
  /chroot/home/shireeni/shireeninc.com/html/osc/lib/Varien/Autoload.php
  on line 94

  #0 ///html/osc/lib/Varien/Autoload.php(94): mageCoreErrorHandler(2,
  'include(/chroot...', '/chroot/home/sh...', 94, Array)  #1
  /html/osc/lib/Varien/Autoload.php(94): Varien_Autoload::autoload()  #2
  [internal function]: Varien_Autoload->autoload('Zend_Log')  #3
  /html/osc/app/Mage.php(859): spl_autoload_call('Zend_Log')  #4
  /html/osc/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(741):
  Mage::logException(Object(Exception))  #5
  /html/osc/app/code/core/Mage/Core/Controller/Varien/Action.php(418):
  Mage_Adminhtml_Catalog_ProductController->saveAction()

  #6/html/osc/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254):
  Mage_Core_Controller_Varien_Action->dispatch('save')  #7
  /html/osc/app/code/core/Mage/Core/Controller/Varien/Front.php(172):
  Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
   #8 /html/osc/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()  #9
  /html/osc/app/Mage.php(684): Mage_Core_Model_App->run(Array)  #10
  html/osc/index.php(83): Mage::run('', 'store')  #11 {main}

  Fatal error: Uncaught exception 'Exception' with message 'Warning:
  include(  html/osc/lib/Zend/Search/Lucene/Exception.php): failed to
  open stream: Too many open files in
  html/osc/app/code/core/Mage/Core/functions.php on line 68' in
  html/osc/app/code/core/Mage/Core/functions.php:245 Stack trace: #0
  html/osc/app/code/core/Mage/Core/functions.php(68):
  mageCoreErrorHandler(2, 'include(/chroot...', '/chroot/home/sh...',
  68, Array) #1   html/osc/app/code/core/Mage/Core/functions.php(68):
  __autoload() #2 [internal function]: __autoload('Zend_Search_Luc...') #3   html/osc/lib/Zend/Search/Lucene/Storage/File/Filesystem.php(67): spl_autoload_call('Zend_Search_Luc...') #4
  html/osc/lib/Zend/Search/Lucene/Storage/Directory/Filesystem.php(186):
  Zend_Search_Lucene_Storage_File_Filesyste in
  html/osc/app/code/core/Mage/Core/functions.php on line 245

How to fix this error?


texts: How to create AJAX action for POST requests in Magento 2.3?

texts:
How to create a controller action that can be requested by POST properly in own custom payment module in Magento 2.3? How to create a parent class that will be extended by classes corresponding to controller actions which can be requested by POST properly in this version of Magento? I have created such a parent class:

<?php
namespace Billon\Payment\Controller;
/**
 * Ajax source
 */
class AjaxAction extends \Magento\Framework\App\Action\Action
{
    public function __construct(\Magento\Framework\App\Action\Context $context)
    {
        return parent::__construct($context);
    }
    public function execute()
    {
        //(...)
    }
}

The classes of the controller actions looks like this:

<?php
namespace Billon\Payment\Controller\Multishipping;
/**
 * Ajax source that initiate payment in multishipping checkout
 */
class Initiation extends \Billon\Payment\Controller\AjaxAction
{
    /**
     * Initiates the payment in multishipping checkout
     */
    public function execute()
    {
        parent::execute();
        //(...)
    }
}

Such actions can be request in Magento 2.0 - 2.2 by POST (above action by '(store address)/billon/multishipping/initiation'). However I can send only GET request properly to my controller actions in Magento 2.3. After I send POST request to my action, the action redirects to the referrer with HTTP code 302. I found a ugly solution in the parent class:

<?php
namespace Billon\Payment\Controller;
/**
 * Ajax source
 */
class AjaxAction extends \Magento\Framework\App\Action\Action
{
    public function __construct()
    {
        $this->execute();
        die();
    }
    public function execute()
    {
        //(...)
    }
}

This solution disables the translation with a function '__'. How to resolve this problem? How to disable the redirection of POST requests from the controller actions to the referrers in Magento 2.3 in proper way? How should I change my action classes to receive POST request? Could you help me?


texts: How to load product on button click in HTML table using KnockoutJS in magento 2?

texts: Basically i want to load product on button click using KnockoutJS.


texts: Checkout: remove item from quote but keep in cart?

texts:
I want to remove certain items when customer place an order but keep them in cart.
I'm able to remove the item by override the saveOrder() method in checkout/type_onepage model, but the items are also removed from the cart. Any pointer as to how to keep the items in the cart? Thanks


texts: Image upload in wysiwyg custom module gives 404

texts:
I am using below code in a custom module but when I want to use the Insert/Edit image --> Browse then I get a popup with a 404 of my frontend site.

    $configSettings = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
        array(
        'add_widgets' => false,
        'add_variables' => false,
        'add_images' => false,
        'files_browser_window_url'=> $this->getBaseUrl().'admin/cms_wysiwyg_images/index/',
    ));

    $fieldset->addField('kb_article_content', 'editor', array(
        'label'     => Mage::helper('support')->__('Article Content'),
        'title'     => Mage::helper('support')->__('Article Content'),
        'required'  => true,
        'name'      => 'kb_article_content',
        'style'     => 'width:700px; height:500px;',
        'wysiwyg'   => true,
        'config'        => $configSettings,
    ));


texts: Magento 2: how to use the collection walk iterator?

texts:
Back in Magento 1, it was possible to use the collection iterator to walk through the results and avoid looping through them.

It was a huge improvement in terms of performance when dealing with massive collections.

Here is some sample code of what could be done.

$customers = Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect(array('firstname'), 'inner');
// call iterator walk method with collection query string and callback method as parameters
Mage::getSingleton('core/resource_iterator')->walk($customers->getSelect(), array(array($this, 'customerCallback')));

Then you could define a callback function customerCallback to process the results one by one.

Is that still possible in Magento 2? If so how can I achieve that?


texts: The SHIPPING AND HANDLING CHARGES section is not showing on the backend?

texts:
The SHIPPING AND HANDLING CHARGES section is not showing on the backend while editing the order.
What may be the problem?


texts: How to update one input text box value based on another input textfield in magento2 checkout page?

texts: In Magento 2 checkout, I need to update the last name text field automatically while I type the first name.


texts: Inconsistency in `Varien_Object` exporting methods

texts:
I've been studying the source code of Magento recently, and I came across this snippet in Varien_Object, which is puzzling me:

/**
 * Convert object attributes to array
 *
 * @param  array $arrAttributes array of required attributes
 * @return array
 */
public function __toArray(array $arrAttributes = array())
{
    if (empty($arrAttributes)) {
        return $this->_data;
    }

    $arrRes = array();
    foreach ($arrAttributes as $attribute) {
        if (isset($this->_data[$attribute])) {
            $arrRes[$attribute] = $this->_data[$attribute];
        }
        else {
            $arrRes[$attribute] = null;
        }
    }
    return $arrRes;
}

/**
 * Public wrapper for __toArray
 *
 * @param array $arrAttributes
 * @return array
 */
public function toArray(array $arrAttributes = array())
{
    return $this->__toArray($arrAttributes);
}

My understanding is that if I wanted an array of the data within a Varien_Object, I would call the toArray() method. But the impression I get from this code is that __toArray() should be private. Yet it is public.

Can anybody tell me if this is an oversight, or if __toArray is used somewhere else in the Magento codebase?

I thought that perhaps it is a legacy thing, but if that were true, wouldn't there be a note saying so?

Update

This inconsistency gets stranger still. Varien_Object has many methods to export the data:

toArray()
toXml()
toJson()
toString()

Of these four, only toArray() has a corresponding public __toArray() method. toXml() and toJson() have protected ones, and toString() has none, except a commented out one, which was public.

On a separate note, Magento seems to use a public wrapper function quite a lot. toHtml() and _toHtml() spring to mind. Why is this? What advantage does using such a function provide when creating a subclass?


texts: Web Setup Wizard - CronJob Setup - Magento 2 Error Update

texts:
I'm getting this error and I can't figure out what I"m doing wrong.

Check Cron Scripts
Cron script readiness check failed. Hide detail

Error from Setup Application Cron Script:
Cron job has not been configured yet
Other checks will fail as a result (PHP version, PHP settings, and PHP extensions)

I can run crontab -e and it says "Ran jobs by schedule." in the terminal but when I check the log files I'm getting this message below.

bin/magento must be run as a CLI application
X-Powered-By: PHP/5.6.27
Content-type: text/html; charset=UTF-8

I installed magento onto shared hosting at godaddy and all is fine I just can't use the "web setup wizard" to update the application and I wanted to make sure all is working. I'm getting errors running that damn thing can anyone explain what's going on?


texts:
I'm getting this
ERR (3): Notice: Array to string conversion /lib/Varien/Db/Adapter/Pdo/Mysql.php on line 2976
in my system.log
I observed it on Magento 1.9.0.1 and after upgrade to 1.9.1.0

How to fix it or - is this a big problem ?

Thanks
T


texts: How to change the Scope of a product system attribute like Status from website to global - Magento 2.2.5?

texts: In my Magento 2.2.5 store, how can I change the scope of one of the product system attributes e.g. Status. There is a is_global field in the table catalog_eav_attribute. Do I have to change is_global field value, or there is any other work around possible for this?.


texts:
I'm getting a blank page (without content, sidebars etc exists) on customer/address/new action using an custom theme.

What I want to do is to implement that new page under customer/address/new, that's the standard action when customer has no addresses.

So I've created an xml customer_address_new.xml in which I've specified an template file (and other stuff copied from the edit action), but it doesn't work, I've got same effect as without my layout and template files.

The layout file: <theme>/Magento_Customer/layout/customer_address_new.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">
    <update handle="customer_account" />
    <body>
        <referenceBlock name="head.components">
            <block class="Magento\Framework\View\Element\Js\Components" name="customer_page_head_components" template="Magento_Customer::js/components.phtml" />
        </referenceBlock>
        <referenceBlock name="customer-account-navigation-address-link">
            <arguments>
                <argument name="is_highlighted" xsi:type="boolean">true</argument>
            </arguments>
        </referenceBlock>
        <referenceContainer name="content">
            <block class="Magento\Customer\Block\Address\Edit" name="customer_address_new" template="address/new.phtml" cacheable="true" />
        </referenceContainer>
    </body>
</page>

What's going on?


texts: Generate invoice and shipping automatically on order status update to "processing"

texts:
If order-status is changed to "processing" the system should auto-generate invoice, shipping AND send the default mails for that to the customer!

Does anybody know an extension that can do that for Magento 1.0.7.2?

Thx in forward.


texts:
<img class="swatch-img current" src="IMAGEURL" alt="XXX " title="XXX ">this is source line.

if class = current onclick it should be changed to class=""

I wanna change do it in javascript.


texts: Magento 2 How to send data to Controller with Ajax from a template?

texts:
I'm trying to send some data to my Controller from a template.html using Ajax, so my checkout page does not refresh when I send a custom form, but I don't get anything, the information is an extra field for the sales order, and the fields are empty.
This is my code from the template. This code is just after the </form>

<script type="text/javascript">
require([
    "jquery",
    "mage/mage"
],function($) {
    $(document).ready(function() {

        $('#co-shipping-form').mage(
            'validation',
            {
                submitHandler: function(form) {
                    $.ajax({
                        url: "http://(my server IP)/(folder name)/checkout/Ordercomment/index",
                        data: {comments: 'Test comment from Ajax '},
                        type: 'POST',
                        dataType: 'json',
                        beforeSend: function() {
                            // show some loading icon
                        },
                        success: function(data, status, xhr) {
                            // data contains your controller response
                        },
                        error: function (xhr, status, errorThrown) {
                            console.log('Error happens. Try again.');
                            console.log(errorThrown);
                        }
                    });
                }
            }
        );
    });
});
</script>

Then this is the part of the controller where I'm trying to receive the data.

namespace Vsourz\Ordercomment\Controller\Ordercomment;
use Magento\Framework\Controller\ResultFactory;

class Index extends \Vsourz\Ordercomment\Controller\Index
{
    public function execute()
    {

        $response = $this->resultFactory
            ->create(\Magento\Framework\Controller\ResultFactory::TYPE_JSON)
            ->setData([
                'status'  => "ok",
                'message' => "form submitted correctly"
        ]);

            return $response;

        //This is the field where I want to store the data that comes from Ajax
 $Ordercomments = $this->getRequest()->getPost('comments');

I hope someone can help me! Thank you!


texts: Telr Payment send order mails before going to payment gateway

texts: When Magento redirects to Telr Payment gateway, The system sends order confirmation emails to customers. This is my issue and  I want the flow like when the system return from payment gateway then the order mail will be sent.


texts: How I can hide SKU from product page in Magento 2

texts: Can anybody please tell me how I can hide the SKU from the product page in Magento 2?


texts: Magento 2: How I can use category DataProvider in Admin Grid

texts:
I am trying to add Category Grid in Magento 2

I created A grid and add Dataprovider

  Magento\Catalog\Model\Category\DataProvider

Here is Code of My DataProvider

<dataSource name="vendor_module_categoryimages_listing">
        <argument name="dataProvider" xsi:type="configurableObject">
            <argument name="class" xsi:type="string">Magento\Catalog\Model\Category\DataProvider</argument>
            <argument name="name" xsi:type="string">vendor_module_categoryimages_listing_data_source</argument>
            <argument name="primaryFieldName" xsi:type="string">entity_id</argument>
            <argument name="requestFieldName" xsi:type="string">id</argument>
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
                    <item name="update_url" xsi:type="url" path="mui/index/render"/>
                    <item name="storageConfig" xsi:type="array">
                        <item name="indexField" xsi:type="string">entity_id</item>
                    </item>
                </item>
            </argument>
        </argument>
    </dataSource>

I am getting an Error as Follows

  The "componentType" configuration parameter is required for the
  "general" component.


texts: Controller action not working with external callback

texts: I have a custom payment module where I need a controller for callback to get notified about the payment, but the payment service only gives me the error that the response contains html. Also, in the controller action I log every request and there aren't any requests from the callback service coming in. When I cann the exact same URL manually in the browser, everything works as expected and the callback also works fine with a simple test php file, only with Magento controllers it doesn't. I just don't understand why I don't get the request. Any ideas?


texts: I'm having a crazy issue where I'm trying to copy over CMS content and it seems that when there are certain words, the content does not save.  It just refreshes the admin page and brings me back to the main list of pages without any messaging saying that the content was saved.  So far, "from" is the only word it's having trouble with, even though that word appears twice before.  I think this is an issue in Magento 1 as well.  This is absolutely the craziest thing I've ever seen in magento.  I tailed for errors and there are none.  I'm open to any and all suggestions.


texts: CMS page with article list showing all articles from category without toolbar or pager

texts:
I'm almost there, but still have an issue with the display in the frontend.

I want to show some special products on the homepage which are linked to a certain category. These products will change regularly, i.e. monthly. Their order must be set by the option you have when calling the category in the administration and clicking the "products in this category" tab.

The reason for this is, that I don't wand to show them by the default order which is set in the frontend by the toolbar and pager of the "list.phtml".

What I have is this block call from a CMS page:

{{block type="catalog/product_list" display_type="all_products" column_count="15" category_id="52" template="catalog/product/list-start.phtml"}}

That template "list-start.phtml" is a derivate from the list.phtml - I have deleted the toolbar, the pager and the list view as well from it. So it basically is reduced to the grid view.

So far, so good.

The problem with this is, that I still have the default numer of articles shown in the frontend as anywhere else in the shop. Or, if I change 'my' numer of articles per page to, say, 20, that value is kept for my list-start.phtml, too, although there's no toolbar or pager anymore.

I recon, that this could be some JS issue or something saved in some cookie. What I'm looking for now, is something to override that default information and have all my 44 or 60 special articles nicely displayed in the grid and sorted by "position" which can be set in the list of articles in the category.

As it doesn't work with display_type="all_products" or column_count="15", I hope there's another option to get this done?

Any help ist greatly apprechiated!!


texts: there is ./back directory in my home directory of 1.9.3.4 Do I need it?

texts:
there is ./back directory in my public_html directory of 1.9.3.4 Do I need it?
Inside there is .back/app/Mage.php which is still old 1.8 version. Besides, the /back directory contains bunch of magento package files like skin, shell, app, media, defaults etc. I don't remember how this directory got there. Can I just delete the /back and everything inside? Is it just a simple worthless duplicate? Or does it carry any function?
It bothers me because it's contains still some old insecure 1.8 version files.
Thank you,
Maks


texts: Navigation menu not working for the new cms pages added?

texts:
Website is already been done right now while I am adding new cms page and linking it to menu it is working fine in desktop when I open it in mobile and when I open that new page then navigation bar is not working for rest of the pages which are already been done for that pages navigation bar is working.

Should I include any permission to make navigation work?


texts: Feed : Uncaught exception 'Exception' with message 'Item (Mage_Catalog_Model_Product) with the same id "171"

texts:
I'm trying to generate a feed and the code [CODE] is working like a charm on store1 but generates an error [ERROR] on store2. When I skip the SKIPPING PART (see source) it works fine but I can't select catgeories anymore and all products are used

[ERROR]

Fatal error: Uncaught exception 'Exception' with message 'Item (Mage_Catalog_Model_Product) with the same id "171" already exist' in /home/huisent/public_html/staging/lib/Varien/Data/Collection.php:373 Stack trace: #0 /home/huisent/public_html/staging/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(265): Varien_Data_Collection->addItem(Object(Mage_Catalog_Model_Product)) #1 /home/huisent/public_html/staging/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1055): Mage_Eav_Model_Entity_Collection_Abstract->addItem(Object(Mage_Catalog_Model_Product)) #2 /home/huisent/public_html/staging/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(871): Mage_Eav_Model_Entity_Collection_Abstract->_loadEntities(false, false) #3 /home/huisent/public_html/staging/lib/Varien/Data/Collection.php(741): Mage_Eav_Model_Entity_Collection_Abstract->load() #4 /home/huisent/public_html/staging/advertentieFeed/removeLF.php(94): Varien_Data_Collection->getIterator() #5 {main} thrown in /home/huisent/public_html/staging/lib/Varien/Data/Collection.php on line 373

[CODE]

require '../app/Mage.php';
Mage::app("default");

$products = Mage::getModel('catalog/product')->getCollection();
$products->joinField(
'qty',
'cataloginventory/stock_item',
'qty',
'product_id=entity_id',
'{{table}}.stock_id=1',
'left'
);

  //Id;Extra;Description;Price;Title;Image1;Image2;Image3;Image4;Image5;Image6;Image7;Image8;Url
$products->addAttributeToFilter('status', 1);
$products->addAttributeToFilter('visibility', 4);
$products->addAttributeToSelect('id');
$products->addAttributeToSelect('description');
$products->addAttributeToSelect('price');
$products->addAttributeToSelect('name');
$products->addAttributeToSelect('image');
$products->addAttributeToSelect('url');
$products->addAttributeToSelect('sku');
$products->addAttributeToSelect('media_gallery');

****/* SKIPPING PART BEGIN
*/****
 $products->joinField('category_id',
'catalog/category_product',
'category_id',
'product_id=entity_id',
null,
'left'
);
*** END SKIPINNG PART ***

/* Selection of wanted categories */
$products->addAttributeToFilter('category_id', array('in' => array($CAT_ID1,$CAT_ID2,$CAT_ID3,$CAT_ID4,$CAT_ID5)));


texts: Magento 2 "Add to Cart" button appear on category pages for "Out of Stock" products

texts:
Magento 2.3.5
Add to cart button will not show on the category page. It shows instead of "out of stock"
Also, there is an issue on Magento GitHub - https://github.com/magento/magento2/issues/26942
How to remove the "add to cart" button from the category page when the product is out of stock?


texts: How To Add Additional Options In Magento 2 Cart

texts:
I used this to Add Additional Options In Magento 2 Cart

  https://livesubwpcache.cloudways.com/blog/add-additional-options-in-magento-2/

But this is working only with Simple product.

For configurable products, I did the following change

$item->addOption(array(
    'product_id' => $item->getProductId(),
    'code' => 'additional_options',
    'value' => serialize($additionalOptions)
));

After that, the additional_options going to the cart. But it is not getting saved when complete the order.

seems because of this ….

//filter out config/bundle etc product
if(!$item->getParentItemId() && $item->getProductType() == \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE)
{
    $this->quoteItems[$item->getId()] = $item;
}

How can I fix it ? I need this functionality for configurable products.


texts:
Is there any extension or plugin that can help viewers or customers to report a product from front end to help notify admin that the product has issues.

We are hosting products that are customized and do not wish to list products with copyrights issue on our platform.

Any guidance or if there is any extension that we can modify or use as guide to make this addon will be helpful


texts: Fatal error: Uncaught Error: Cannot instantiate abstract class in Index.php in magento 2

texts:
This is my Controller file Index.php

<?php

namespace OX\HomeSlider\Controller\Adminhtml\Post;

abstract class Index extends \Magento\Backend\App\Action
{

    protected $_resultPage;
    protected $_resultPageFactory = false;

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

    public function execute()
    {
        //Call page factory to render layout and page content
        $this->_setPageData();
        return $this->getResultPage();
    }

    /*
     * Check permission via ACL resource
     */

    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('OX_HomeSlider::post_manage');
    }

    public function getResultPage()
    {
        if (is_null($this->_resultPage)) {
            $this->_resultPage = $this->_resultPageFactory->create();
        }
        return $this->_resultPage;
    }

    protected function _setPageData()
    {
        $resultPage = $this->getResultPage();
        $resultPage->setActiveMenu('OX_HomeSlider::post');
        $resultPage->getConfig()->getTitle()->prepend((__('Posts')));

        //Add bread crumb
        $resultPage->addBreadcrumb(__('OX'), __('OX'));
        $resultPage->addBreadcrumb(__('Home Slider'), __('Manage Blogs'));

        return $this;
    }

}

I have got below error

Please suggest a solution


texts: Magento 2 Products missing in category pages post Migration

texts:
I've recenty attempted to Migrate my products and categories from Magento 1 to Magento 2 via Ubertheme and run across a strange issue.

I have two categories, "Brands" and "Type", which have a number Sub-categories, these appear to be displaying correctly when hovered over (drop down menu):

The other two categories are "Discounted Products" and "Back in Stock", these should just be links which go straight to the category pages where all the products are displayed in grids.

On "Discounted products" there are some products displayed but there are also blank pages, in particular, when I go to a Blank page the options for Pagination (navigate to a different page, display number of products etc), are missing, also if I choose "all" from the products dropdown it goes to a blank page.

"Back in stock shows no items in the category main page whatsoever despite the fact that if I create a new category and add the exact same products it shows them on the category home page.


texts: Magento2 : Show Three Products on Checkout page in Order Summary section

texts:
I have added 8 products in the cart and now I would like to show three products on Order Summary section on Checkout page with a Load More button. And, if we click on Load More button, it will show some other products.

See the example demo : https://jsfiddle.net/z9f35ha1/3/

Please review the attached screenshot. It hides all li

Kindly suggest a solution.


texts: Renamed Product still showing old name in Catalog and on Store

texts:
Using Magento 2.2.5
After renaming a product and saving, the catalog still shows the old name. Edit the same product again and the change is there but the catalog listing doesn't seem to want to recognize it. Checking the actual store shows the old name as well.
I have run the reindexer and updated the cache repeatedly after trying different changes in hopes to make it recognize the new name.
Had this happen before and ended up deleting the product then recreating it. This one has order history we'd rather not lose so trying to find the correct way to get Magento 2 to recognize the new name.


texts: Is it possible to set Tier Prices on Downloadable products?

texts:
I'm new to Magento, Im developing a digital music store, I will be selling albums. I want to sell an album at a discounted price if the customer decides to buy the whole album or all songs. Example let's say a song is $1, the album has 14 tracks, the whole album should be $10.

How may I achieve this because I'm struggling?

Is it possible to achieve functionality like this with Magento 1.7? http://www.junodownload.com/products/sven-weisemann-inner-motions/2290949-02/


texts: Email newsletter not working on homepage footer

texts:
I used a custom static block to put newsletter subscribe at homepage footer:

   {{block type="core/template" template="newsletter/subscribe.phtml"}}

After entering a email address and press submit it just redirects to homepage. No entry is added to Newsletter Subscribers. Any ideas what the issue is and how to fix?

Any help is much appreciated.


texts:
I am quite new to magento 2 and am trying to get my head around less and scss (new to this too). At the moment I just want to change the orange border at the bottom of the active Magento navigation items. Before when modifying CSS i would just go into developer mode in chrome or whichever browser view the rules and the line within the CSS file and modify this.

I want to know the best way to find where these LESS rules are stored before they are compiled but cannot find an easy way to do it, they seem to be all over the place and that particular one i am looking for i cannot see referenced in navigation.less. I have tried searching for the rules with grep using SSH however this is not working too well for me either.

I have created my own theme based on the luma theme and have been overiding files which i want changed by copying them into this theme in the same location. However for the below rule i cannot find what is creating it. I have searched the design and code folders for .level-top but cannot find anything relating to the border or border color.

@media (min-width: 768px), print
styles-l.css:630
.navigation .level0.active > .level-top, .navigation .level0.has-active > .level-top {
    border-color: #ff5501;
    border-style: solid;
    border-width: 0 0 3px;
    color: #333333;
    text-decoration: none;
    display: inline-block;
}

Is there a way anyone can recommend for me to find this?


texts: Customer Associated with the Admin Store

texts:
Is there a use case for associating a customer with the admin store in Magento's backend?  Or is this one of those UI bugs that's never been fixed?

When you create a customer object via the Customers -> Manage Customers section of the Admin, Magento allows you to choose which store the customer's associated with.  The admin store is included in this list.

Why does Magento let you do this?  An admin customer account would (seem to?) be useless.  Is there a legitimate use case for this, or can this be classified as UI/UX bug?


texts: Creating new attribute using addAttribute() in installation scripts

texts:
I'm writing an installation script in an extension that adds some new attributes. I'm using the following. I'm following and old tutorial (http://blog.chapagain.com.np/magento-adding-attribute-from-mysql-setup-file/), but it's no longer up-to-date because Mage_Eav_Model_Entity_Setup::addAttribute does not include any of the "Frontend Properties" mapping, denoted by // X. Is it possible to set these properties with addAttribute()? If not, how should I go about installing a new attribute with frontend properties?

$setup->addAttribute('catalog_product', 'testatt', array(
    'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'input' => 'select',
    'type' => 'int',
    'backend' => '',    // backend_model
    'frontend' => '',   // fronted_model
    'label' => 'ATT NAME HERE',
    'class' => '',  ,
    'user_defined' => true,
    'required' => false,

    // Frontend Properties start here
    'visible' => true, // X
    'filterable' => true,    // X

);

On EE 1.13.

Update:
See benmarks' answer!


texts:
Hello I'm trying to use magento 2 Rest and Soap integrations when I try to activate my integration I get the error Unable to post data to consumer due to an unexpected error

these are my current settings.

When I change callback url to https://www.google.com
then I recieve a message Please setup or sign in into your 3rd party account to complete setup of this integration.


texts:
Steps to reproduce

Go to Admin->Marketing->Newsletter Template
Select Queue Newsletter from right dropdown
Select a Queue Date Start and try to save it

Expected Result

Saved

Actual result

DateTime::__construct(): Failed to parse time string (29/giu/2016 01:22:19) at position 0 (2): Unexpected character


texts:
Hi i successfuly managed to make my base photo have zoom but when i change my image the zoom is still refering to the base image how can i fix this ..
i tried with attribute gallery but its not working

My code to change product image through thumbnails

<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/easy-slider.js');?>"></script>
  <script type="text/javascript">
      // <![CDATA[
      (function($){
          $(document).ready(function($){
              $(".more-views").easySlider({
                  mainImg: "p.product-image-zoom img",
                  btnNext: ".jm-product-lemmon .next",
                  btnPrev: ".jm-product-lemmon .prev",
                  animate: true,
                  loop: true,
                  speed: 300,
                  width: 100,
                  width_img: 78,
                  start: <?php echo $start?>
              });
          });
      })(jQuery);
      // ]]>
  </script>

my code for zoom

<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/jquery.elevatezoom.js');?>"></script>
<script type="text/javascript">// <![CDATA[
    (function($) {
        $("#image").elevateZoom({
            scrollZoom: false,
            borderColour: "#eee",
            tintColour: "#eee",
            zoomWindowWidth: 450,
            zoomWindowHeight: 450,
            gallery: 'jm-product-lemmon',
            galleryActiveClass: 'active'
        });
    })(jQuery);
    // ]]>
</script>


texts:
If I copy the file default.phtml from design/frontend/base/default/template/checkout/total/ to my theme folder (design/frontend/my_package/my_theme/template/checkout/total/default.phtml) everything is fine, my changes are applied and I can see them on the front end. But what I want to do is different. I need this default.phtml file to be in a module that can be easily switched off when not needed; to achieve this I need to override the template file but here I got stuck because I couldn't find any reference to this template in checkout.xml

I also tried to modify the renderTotal() function in Mage/Checkout/Block/Cart/Totals.php (I copied the file in my module, didn't altered the core files) and I was able to apply some changes (I needed a colspan=2 instead of 1) but not all of them (the second cell is still being displayed when the colspan is set to 2 while I want only the cell with the colspan=2 to be shown). So the only way I can achieve what I need is to modify the default.phtml file.

So my question is: how can i override the dedault.phtml?


texts: Executing a module when the user opens the page

texts:
I have a module that records the user's IP on the debug log when he visits the page "example.com/iplog/index/test".

My module is located in the app/code/IpLog folder and contains the modules.xml, registration.php, routes.xml and controller files.

Ip log example:

[2019-05-13 21:53:03] main.DEBUG: 127.0.0.1 05/13/2019 09:53:03 pm [] []

I want this action (IP logging) to happen when the user enters the main page on the site "example.com". How can I execute the module this way?


texts: Magento 2 composer "module-wishlist" error

texts:
I'm trying to update my magento version to 2.2 (from 2.1.7) but had a "Content Dependency" error, but have narrowed down the issue a module, the "module-wishlist-sample-data" magento module.

When I try to update composer I get the following error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - magento/module-wishlist-sample-data 100.1.1 requires magento/module-wishlist 100.1.* -> satisfiable by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.0-rc1 requires magento/module-wishlist 100.1.* -> satisfiable by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.0-rc2 requires magento/module-wishlist 100.1.* -> satisfiable by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.0-rc3 requires magento/module-wishlist 100.1.* -> satisfiable by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.0 requires magento/module-wishlist 100.1.* -> satisfiable by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.1 requires magento/module-wishlist 100.1.* -> satisfiable by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.5, 100.1.6].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.4].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.0-rc1].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.0-rc2].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.0-rc3].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.0].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.1].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.2].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.3].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.4].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.5].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.6].
    - magento/product-community-edition 2.2.0 requires magento/module-wishlist 101.0.0 -> satisfiable by magento/module-wishlist[101.0.0].
    - Installation request for magento/product-community-edition 2.2.0 -> satisfiable by magento/product-community-edition[2.2.0].
    - Installation request for magento/module-wishlist-sample-data 100.1.* -> satisfiable by magento/module-wishlist-sample-data[100.1.1, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0].

Any ideas on how to solve this?


texts: How can I add a button under Additional Cache Management?

texts:
Magento's cache page (accessible via System → Cache Management) has a section titled Additional Cache Management.

Is there a way that I can add my own button to this page without creating a copy of that template file & customizing it? In other words - can it be done programmatically somehow?


texts:
I created a custom form in homepage of magento as shown in this screenshot.

I created new table new_name_details in magento DB, I want name and age to be stored in that table.
How to do it?


texts: Change product price and stock in product view page when cache is enabled in Magento 2

texts: I have tried to update the custom price and change stock for products by event/observer when the cache is enabled. But none of the events will work on full page cache in product view page.


texts: is it possible to revert a order from "invoiced" to "not invoiced" programmatically?

texts:
Once i click the submit invoice button, a invoice will be created and i saw there are something has been changed in database, is it possible to revert a order into "not invoiced", so i can recreate the invoice again?

And i tested even if i delete a invoice in database, but i still can't to create a invoice for that order

--update--

ini_set('display_errors', 1);

$mageFilename = 'app/Mage.php';
require_once $mageFilename;
Varien_Profiler::enable();
Mage::setIsDeveloperMode(true);

umask(0);
Mage::app('default');
//Mage::register('isSecureArea', 1);
//$invoiceId = $_GET['invoiceid'];          //put your invoice id - the autoincrement one not the long one.
//Mage::getModel('sales/order_invoice')->load($invoiceId)->delete();

  $orderId = 100000049; // this is an example
  $order = Mage::getModel('sales/order')->load($orderId);
  $invoices = $order->getInvoiceCollection();
  var_dump($invoices);
  foreach ($invoices as $invoice){
        $invoice->delete();
  }


texts: Removing Product Review but retain the Product Rating

texts:
is there a way of disabling Product Review but retain Product rating?

I already disabled the Product Review in the backend but in the frontend the ratings will not be displayed.

I would like to get rid of the review but the ratings will remain by asking the user to login first before they can rate, then after login they can give a 1-5 star for the rating to the Product. Is this achievable? Any insights? solutions? Thanks


texts:
I installed fresh Magento but there are no styles or js. Files are in pub folder , but if open in browser I'm getting Internal Server Error. Please help. This is localhost, wamp. Thank you!
(I tried clear cache and remove directories in var and pub)

I found the answer here: https://magento.stackexchange.com/a/208638/34234


texts: Multiple File upload on customizable product not working in magento 2.4

texts:
It is working with single file upload option.

It is not working with multiplefile upload option.


texts:
I have created a custom module, in that I have created the interface.

As I am learning magento, I have seen in demo videos that for ex:-

This is my custom interface name AffiliateMemberInterface.

Now when I am injecting it into plugin, I have to use it as AffiliateMemberFactory.

So my question is, how I can get an idea that when i have to add "Factory" word with my interface name during use.

I am getting confused in it. So if anyone can help me out with this confusion then it will be good for me.

Thanks


texts: Orders not moved with customer store transfer

texts:
Hi I ran a MySQL query to move some customers by changing their website and store id.

They have now moved however their old orders are still in the old store and not linked to their accounts!

If I click into an order there is no link on the customer so they are not linked up!

How can I relink them?


texts: How to delete particular item form cart pop up

texts:
I just want to remove a single item from the Cart pop up.Here is my code to display the product image, name, Quantity, price and Remove icon in cart pop up.

<?php foreach($items as $_item): ?>
<?php $isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();?>
<?php $product = $_item->getProduct(); ?>
<?php echo "

"; ?>
<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 $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
<?php $_item = $this->getItem();
$url=$this->getUrl('checkout/cart/delete', array('id' => $_item->getProductId())); ?>
<a href="<?php echo $url ?>" title="<?php echo $this->__('Remove This Item') ?>" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>');" class="btn-remove"><?php echo $this->__('Remove This Item') ?>
<?php echo "

" ?>
<?php endforeach; ?>

When I add the product to the cart everything is going blank. When I remove the three lines of code written for removing the item from the cart pop up,everything is displayed perfectly but the remove icon is not working & the product is not getting removed.The page is refreshed and nothing happens.

This is that three lines of code snippet from above code for removing an item from cart pop up:

<?php $_item = $this->getItem();
$url=$this->getUrl('checkout/cart/delete', array('id' => $_item->getProductId())); ?>
<a href="<?php echo $url ?>" title="<?php echo $this->__('Remove This Item') ?>" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>');" class="btn-remove"><?php echo $this->__('Remove This Item') ?>

please someone tell me where I went wrong?


texts: Magento 2.3 Custom Product Grid in custom module

texts: I want to show  a Product grid based on the specific attribute filter in my custom module , how to achieve this , i have tried with extending the product_listing.xml, nothing worked , new to magento 2.3 , kindly help me


texts: Is it possible to set default checked for selected Product Categories?

texts:
In magento2 - For some specific requirements, I want to have some of the categories for the products selected by default,

How I can achieve this?


texts: Negation in the imports link (UI component)

texts:
I've got the fieldset component in my custom UI-form:

<fieldset name="default">
    <settings>
        <label>Default</label>
        <collapsible>true</collapsible>
        <level>1</level>
        <imports>
            <link name="visible">${ $.parentName}.general.specific_limits:checked</link>
        </imports>
    </settings>
//....

but I can't understand how to convert the link condition (visible) in the imports part. I need a condition like "checkbox is not checked", but if I add something like ${ $.parentName}.general.specific_limits:checked == false script does not work at all: any checkbox state converting to true. How to convert this kind of data using standard js operators?


texts: Remove customer_account_navigation-reports block for specific customer group in magento 2

texts:
I want to remove customer_account_navigation-reports block from customer account on the frontend for specific customer group i.e. Distributor

How can I do this?


texts:
I have looked at various tutorials and they all say that to get form validation working in magento is as simple as setting the correct class in the input boxes and adding the form name to the VarienForm() function.

I am not getting anything with this method:

<form name="regform" id="regform" action="<?php echo Mage::getUrl('*/*/save') ?>" method="post">

            <?php echo $this->getMessagesBlock()->getGroupedHtml(); ?>

                <?php echo $this->__('First name') ?>*
                <input type="text" name="f_name" id="f_name" value="<?php echo $this->getRequest()->getParam('f_name') ?>" class="input-text required-entry">

                <?php echo $this->__('Last Name') ?>*
                <input type="text" name="l_name" id="l_name" value="<?php echo $this->getRequest()->getParam('l_name') ?>" class="input-text required-entry">

</form>

My javascript is very weak, so I have been blindly following tutorials, I have gone taken some time to learn more Javascript but my limited time spent understanding the language leaves me thinking this should work. Where am I going wrong?

===EDIT===

In the console, I get the following message

Uncaught TypeError: Object [object Object] has no method 'attachEvent' prototype.js:5653
Uncaught TypeError: Object [object Object] has no method 'attachEvent' prototype.js:5653
Uncaught TypeError: Object [object Object] has no method 'attachEvent' prototype.js:5653
Uncaught TypeError: Object [object Object] has no method 'dispatchEvent' prototype.js:5734


texts: How to we move current applied filter state to center of the page just beside the sortby

texts:
In the category page layered navigation, I want to move the current applied filter state just beside the sort by or center of the page.
Can anyone please help me out?


texts: Magento 2.1.9 Community Edition Catalog Search page not displaying results

texts:
Magento 2.1.9 Version Community Edition. My Catalog search page is not displaying any results as show below.

So far what has been done as testing.But still not working.

Re indexed still not displaying.
Removed the custom theme and applied Magento Luma theme still not displaying.
Installed ElasticSearch and module still search page not displaying the products.
Disabled plugins then also not displaying.
The Quantity is greater than 0 for at least more 50 products.
In Stock option is checked for products for whom the quantity number is greater than 0.
Display in catalog search is checked for product name and sku attributes.

Can please any one help. Had couple of days on this issue still not able to resolve.

URL string is xxx.xxx.com/catalogsearch/result/?q=revo

Any help is appreciated.


texts: Issue with Authorized.net with Magento2.2.5

texts:
I am using Magento2.2.5 and payment gateway on my site is Authorized.net
I created a sandbox account of Authorized.net and put the required information in the admin panel.

Having Following issues:

The order is created with cancel status.
I received this mail as a merchant: https://prnt.sc/lusbbw , Where Transaction Id and Auth Code is 0

3.When Checkout Order created in the backend but no success page or error on the checkout page, Everything is displaying as they are and the cart is cleared.

Got this error in Exception log:  main.CRITICAL: Please enter a transaction ID to authorize this payment. {"exception":"[object] (Magento\\Framework\\Exception\\LocalizedException(code: 0): Please enter a transaction ID to authorize this payment. at /var/www/html/vendor/magento/module-authorizenet/Model/Directpost.php:654)"} []
Even I tried with sandbox gateway URL By replacing Production as below:

Sandbox URLs:
https://test.authorize.net/gateway/transact.dll - gateway

https://apitest.authorize.net/xml/v1/request.api - transaction details

Production URLs:
https://secure.authorize.net/gateway/transact.dll - gateway

https://api.authorize.net/xml/v1/request.api - transaction details

but nothing helps.

Payment Log:

main.DEBUG: array (   'response' =>    array (
    'x_response_code' => '1',
    'x_response_reason_code' => '1',
    'x_response_reason_text' => '(TESTMODE) This transaction has been approved.',
    'x_avs_code' => 'P',
    'x_auth_code' => '000000',
    'x_trans_id' => '0',
    'x_method' => 'CC',
    'x_card_type' => 'Visa',
    'x_account_number' => 'XXXX1111',
    'x_first_name' => 'Neha',
    'x_last_name' => 'Vyas',
    'x_company' => '',
    'x_address' => '695  Atha Drive',
    'x_city' => 'New Orleans',
    'x_state' => 'North Carolina',
    'x_zip' => '70122',
    'x_country' => 'US',
    'x_phone' => '504-919-7848',
    'x_fax' => '',
    'x_email' => 'nehav23@mailinator.com',
    'x_invoice_num' => '000000021',
    'x_description' => '',
    'x_type' => 'auth_capture',
    'x_cust_id' => '',
    'x_ship_to_first_name' => 'Neha',
    'x_ship_to_last_name' => 'Vyas',
    'x_ship_to_company' => '',
    'x_ship_to_address' => '695  Atha Drive',
    'x_ship_to_city' => 'New Orleans',
    'x_ship_to_state' => 'North Carolina',
    'x_ship_to_zip' => '70122',
    'x_ship_to_country' => 'US',
    'x_amount' => '23.00',
    'x_tax' => '0.00',
    'x_duty' => '0.00',
    'x_freight' => '20.00',
    'x_tax_exempt' => 'FALSE',
    'x_po_num' => '',
    'x_MD5_Hash' => '30A3673E1EF476628D99886A87683A17',
    'x_SHA2_Hash' => '',
    'x_cvv2_resp_code' => '',
    'x_cavv_response' => '',
    'x_test_request' => 'true',
    'controller_action_name' => 'directpost_payment',
    'is_secure' => '1',   ), ) [] []

Suggestion how to fix it.


texts: Catalog search show all products - Magento 1.9

texts: When I do a search it does not give me a result based on my input but it shows me the whole catalog. Which is a problem because my catalog contains over 85,000 products, and it takes a lot of time to load the search result. How can I adjust the search?


texts: All payment options disappear when processing Recurring Profiles

texts:
I'm having issues with the processing Recurring Profiles in Mangeto.

I have Paypal Payments Standard and Authorize.net as payment methods.

Authorize.net has an add on service called "Automated Recurring Billing" which is a tool for submitting and managing recurring, or subscription-based, transactions. Which I also have enabled on Authorize.net end.

Whenever I try and checkout with a product with a Recurring Profile all payment methods disappear. This happens on the frontend and the backend.

Does anyone know why this is or what I am doing wrong?


texts: Product custom attributes not displaying the Magento2 order details page

texts:
I need to display the product custom attribute values in magento2 order details page but not display. Attributes having values in admin side.
I tried both codes.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->get('Magento\Catalog\Model\Product')->load('4');
echo '<pre>'; print_r($product->getata());

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->create('\Magento\Catalog\Api\Data\ProductInterface');
$product->get('4');
echo '<pre>'; print_r($product->getData());


texts: What is the recommended method of overriding protected methods?

texts:
I was going to create a plugin so that I could extend Magento\Eav\Model\ResourceModel\Entity\Attribute::_processAttributeOptions(). However, because this method is protected, I am unable to do so.

I've added a column to the table eav_attribute_option_value called api_attribute_id and I need it to be updated when _saveOptions() triggers _processAttributeOptions().

Is the only way for me to rewrite this method for me to use <preference> and provide a class that extends it?


texts: Magento 2 : Error on running magento command

texts:
I'm new on Magento 2. (2.2.5, nginx, linux, MySQL 5.7.22, PHP 7.1.21) I was setting the configuration of store and when I refreshed the store page I get diamond question marks, also in admin console, I tried to clean and flush but I get several errors (I heard beeps in my console) and finally I get following error ;

  Fatal error: Class Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\DefaultPrice'
  not found in
  /var/www/magento2/vendor/magento/module-bundle/Model/ResourceModel/Indexer/Price.php
  on line 15

I've already delete delete pub/static/* and var/generation

(forgive my poor English)


texts:
I've found tutorials discussing the creation of a new customer attribute, and they include this:

Mage::getSingleton('eav/config')
    ->getAttribute('customer_address', 'building_entry_code')
    ->setData('used_in_forms', array('adminhtml_customer_address'))
    ->save();

Two questions:

Where does this value get stored in the database?
Is the customer module the only one that uses this, or are there possible values for other modules like Sales (order attributes.)


texts: Magento 2.3.3: Install with composer fails without show any motivation

texts:
I'm trying to install magento 2.3.3 with composer over Ubuntu 18.04

 composer -vvv create-project --repository=https://repo.magento.com/ magento/project-community-edition magento
Installing magento/project-community-edition (2.3.3)
  - Installing magento/project-community-edition (2.3.3): Downloading (100%)
Created project in magento
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 437 installs, 0 updates, 0 removals
  - Installing magento/magento-composer-installer (0.1.13): Downloading (100%)
Plugin installation failed, rolling back
  - Removing magento/magento-composer-installer (0.1.13)

  [RuntimeException]
  Could not delete /vagrant/tiendafetichista.ovh/magento/vendor/magento/magento-composer-installer/src/MagentoHackathon:

Exception trace:
 () at phar:///usr/bin/composer/src/Composer/Util/Filesystem.php:217
 Composer\Util\Filesystem->unlink() at phar:///usr/bin/composer/src/Composer/Util/Filesystem.php:170
 Composer\Util\Filesystem->removeDirectoryPhp() at phar:///usr/bin/composer/src/Composer/Util/Filesystem.php:137
 Composer\Util\Filesystem->removeDirectory() at phar:///usr/bin/composer/src/Composer/Downloader/FileDownloader.php:238
 Composer\Downloader\FileDownloader->remove() at phar:///usr/bin/composer/src/Composer/Downloader/DownloadManager.php:299
 Composer\Downloader\DownloadManager->remove() at phar:///usr/bin/composer/src/Composer/Installer/LibraryInstaller.php:224
 Composer\Installer\LibraryInstaller->removeCode() at phar:///usr/bin/composer/src/Composer/Installer/LibraryInstaller.php:137
 Composer\Installer\LibraryInstaller->uninstall() at phar:///usr/bin/composer/src/Composer/Installer/PluginInstaller.php:66
 Composer\Installer\PluginInstaller->install() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:173
 Composer\Installer\InstallationManager->install() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:160
 Composer\Installer\InstallationManager->execute() at phar:///usr/bin/composer/src/Composer/Installer.php:597
 Composer\Installer->doInstall() at phar:///usr/bin/composer/src/Composer/Installer.php:229
 Composer\Installer->run() at phar:///usr/bin/composer/src/Composer/Command/UpdateCommand.php:163
 Composer\Command\UpdateCommand->execute() at phar:///usr/bin/composer/vendor/symfony/console/Command/Command.php:245
 Symfony\Component\Console\Command\Command->run() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:835
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:185
 Symfony\Component\Console\Application->doRun() at phar:///usr/bin/composer/src/Composer/Console/Application.php:267
 Composer\Console\Application->doRun() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at phar:///usr/bin/composer/src/Composer/Console/Application.php:106
 Composer\Console\Application->run() at phar:///usr/bin/composer/bin/composer:61
 require() at /usr/bin/composer:24

Only see plugin installation failed, rolling back and also see that installer try to remove installation and it can't remove

I work with composer in several project (not magento) and it is the first time I see this question with composer

On google not too much literature about problem

Composer version 1.9.0
php 7.2 with requirements on official page of Magento 2

I'm lost


texts: Where in Magento 2's Backend Can you Change the Expiration Time for an oAuth Token Request?

texts:
As per Magento's developer documentation site

  This is the first step in the 2-legged Oauth handshake. However, you must use these credentials to get an access token in fewer than three minutes or the credentials are disabled for security reasons. The credentials expiry can be changed from backend by the administrator. As stated previously, it's defaulted to three minutes.

it sounds like you can change the expiration time for an OAuth token request somewhere in the backend.

Where is this somewhere?


texts: Magento Extension read/write permissions

texts: When publishing Shopify or Bigcommerce Apps, I had to specify the read/write permissions I wanted for my app (eg. read products, read/write orders...). I am now developing a Magento Extension and wondering where and how I would specify my desired permissions. I took a look in the Connect Marketplace and when downloading extensions, there doesn't seem to be a step, where you agree to any permissions. Am I missing something?


texts: can not delete products in magento admin panel

texts:
I am using magento 1.9.2 ,In that When i am trying to delete products it will show error like below

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'mageproductid ' in 'where clause', query was: SELECT main_table.* FROM marketplace_product AS main_table WHERE (mageproductid = '208')


texts: Remove Roll over for preview from image in magento admin

texts: When i view product images in admin then i have to roll over on image  thumbnail to see the image i want to get it removed and show images directly  so that i don't have to roll over the image


texts: Magento 2 get image for Subcategory Collection

texts:
I'm trying to get image for category in magento 2

\Magento\Framework\View\Element\Template\Context $context,
\Magento\Catalog\Model\Layer\Resolver $layerResolver,

public function getCurrentCategory()
{
    return $this->_catalogLayer->getCurrentCategory();
}

public function getCurrentChildCategories()
{
    $categories = $this->_catalogLayer->getCurrentCategory()->getChildrenCategories();
    return $categories;
}

public function getCurrentChildSubCategories($cat)
{
    $subcategories = $cat->getChildrenCategories();
    return $subcategories;
}

and phtml:

<?php $_categories = $block->getCurrentChildCategories(); ?>
<?php
foreach ($_categories as $category):
    echo ("
".$category->getName());
    $_subcategories = $block->getCurrentChildSubCategories($category);
    foreach ($_subcategories as $subcategory):
        echo ("
_".$subcategory->getName());
    endforeach;
endforeach;
?>

but there are no image href column name in category collection. How can I get image in category collection or how can i get image by entity_id in magento 2 correctly? Any suggestions will be helpful.


texts: Magento Community 1.7.0.2: Credit Memo for a bundle product only returns 1 simple product to inventory

texts:
I'm trying to sell case quantities of our simple products for wholesale customers.

So. I create a bundle product, which is 12x of the simple product.

Customer buys the bundle product and inventory reduces the simple product by 12x.  OK, good.

However, the customer returns the case of 12 and wants a refund.

I try to do a credit memo, but it only adds 1x of the simple product back into inventory, instead of 12x.  I cannot change the qty on the credit memo page because it's the bundle product SKU.

Is this normal Magento behavior?  Am I missing something?

Thanks,
Dave


texts: Magento 2 how to get Postcode from billing address in observer?

texts:
I cannot get the postcode from Users's billing Address,this is my code, everything works fine except for the postcode, which i'm not able to pull.

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

        $customer = $observer->getEvent()->getCustomer();
        $customer_email=$customer->getEmail();
        $first_name= $customer->getFirstname();
        $last_name= $customer->getLastname();
        $taxVat = $customer->getTaxvat();

        //Billing Address variables

        $billingID = $customer->getDefaultBilling();
        $billingAddress = $objectManager->create('Magento\Customer\Model\Address')->load($billingID);
        $billingCompany = $billingAddress->getCompany();
        $billingZipcode = $billingAddress->getPostCode();
        $billingCity = $billingAddress->getCity();
        $billingState = $billingAddress->getRegion();
        $billingStreet = $billingAddress->getStreet();
        $billingStreet1 = $billingStreet[0];
        $billingStreet2 = $billingStreet[1];
        $billingTelephone = $billingAddress->getTelephone();

Greetings!


texts: Order emails not sending, magento 1.9.2.2, Cron heartbeat task error

texts:
I have a problem with the Order Confirmation emails not sending, all the others appear to be sending just not the Order confirmation ones.

I've installed AOE scheduler, and it's indicating that there is No Heartbeat task found and asks that I edit my cronab

sudo crontab -u new2magento -e

and add the following configuration

    * * * * * ! test -e /home/new2magento/public_html/maintenance.flag && /bin/bash /home/new2magento/public_html/scheduler_cron.sh --mode always
* * * * * ! test -e /home/new2magento/public_html/maintenance.flag && /bin/bash /home/new2magento/public_html/scheduler_cron.sh --mode default

as my user name suggests I'm fairly new to magento and could really do with some help finding exactly where I have to add the configuration


texts: Recalculate taxes if customer is B2B customer

texts:
In my magento website I have products prices are including tax of 12.5%.
If the customer is B2B (will come to know if he selects he has c form in the onepagecheckout) then I want to recalculate tax as follows:

reduce the 12.5% from the product price. i.e. if my product price is 50000 then reduce 12.5% from the 50000
and then add the 2% on the price after reduction of 12.5%

For example:

Product Price : 50000
Base Price: 50000 - 12.5% of Product Price
CST (2%): 2% of the Base Price
Total: Base Price + CST

Please guide me.


texts: Cannot add foreign key constraint When Upgrade 1.9.2.3 from 1.4.0.1

texts:
Try to upgrade a magento system from 1.4.0.1 to lastest 1.9.2.3.

Getting error to Mage_Customer module's at upgrade installer file mysql4-upgrade-1.4.0.0.7-1.4.0.0.8.php

Throwing error:

a:5:{i:0;s:199:"Error in file: "app/code/core/Mage/Customer/sql/
customer_setup/mysql4-upgrade-1.4.0.0.7-1.4.0.0.8.php" - SQLSTATE[HY000]:
General error: 1215 Cannot add foreign key constraint";i:1;s:970:"
#0 app/code/core/Mage/Core/Model/Resource/Setup.php(644): Mage::exception('Mage_Core', 'Error in file: ...')

How to resolve this.
What is reason for error;


texts:
I've run community/Mage_All_Latest in magentoconnect manager and the module changed to 1.9.0.1 version, however when i go back to admin-panel the magento version at the bottom of the page still says 1.8.0.1.
Also if i "check for upgrades" in magentoconnect it seems all has been already upgraded.
What is missing?, why the upgrade didn't work.
Already clean cache, log-out, then log-in, etc, etc.-


texts: successful admin login redirects to login page

texts:
I've imported a copy of the live db to my new dev site using sequel pro. I've had to use this tool as the db has some errors in (duplicate SKU's) and we're trying to fix them, but not on the live server!

I'm not sure what the issue is, but the symptoms are as follows.

http://sitename:8888/admin for the admin login. fill out the username and password. hit login. and it redirects me straight back to the login page.

If I intentionally get the password wrong, it gives me the red error box. So I know I'm geting the password right, because there is no error box. However the admin section doesn't load. Is there an admin setting somewhere in the config stored in the db that I need to reset?.


texts: Magento 2.3 Module 'Magento_GoogleShoppingAds': Upgrading data... takes much time

texts:
While upgrading Magento from Magento 2.2 to Magento 2.3 or Installing Magento 2.3.4 version, Module name Magento_GoogleShoppingAds taking much time to install.

Is this expected?

Does any one faced this issue? Any tip to remove module from installation?


texts: Invoice doesn't show in Magento Sales > Invoices

texts:
When an order is created and handled the invoice is generated.
The order has his invoice and I can see the invoice at orders > SPECIFIC ORDER > invoices.
However, I can't see this order back in Sales > invoice, the order is completed.

Anybody an idea how to solve this?


texts: Can we transfer Magento Enterprise license to another company?

texts: We have signed a three-year contract with Magento Enterprise edition. At the end of the first year, we had stopped operating the Magento website. Can we transfer the remaining Magento Enterprise license (Magento Commerce - M2 ) to another company?


texts: Catalogsearch encodes query string for sort/limit in toolbar

texts:
If my search contains special chars like ü, ä they are encoded to %C3%BC for example.

The strange thing is, it does work correctly in one template, but not in another one.

Template 1: simple links ... works without encoding

<?php foreach ($this->getAvailableLimit() as  $_key=>$_limit): ?>
    <a href="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> class="active"<?php endif; ?>><?php echo $_limit ?>
<?php endforeach; ?>

Template 2: dropdown ... values are encoded

<select class="select--wd select--wd--sm"  onchange="setLocation(this.value)">
    <?php foreach ($this->getAvailableLimit() as  $_key=>$_limit): ?>
        <option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif; ?>>
            <?php echo $_limit ?>
        </option>
    <?php endforeach; ?>
</select>

toolbar block is not rewritten, it's still Mage_Catalog_Block_Product_List_Toolbar.
it's the same server, just another website with another template

I've solved this with using urldecode(), but i still want to know where the different behavoir comes from.


texts: Bug : Product image has PNG background in black on Magento 1.9.3.3

texts: I installed Magento 1.9.3.3 and get a bug, the PNG transparency doesn't work and it makes background black. How to fix it?


texts: Magento 2 - multi database - multi websites

texts:
Is it possible to configure a single installation of Magento 2 with different websites and different domains on different databases?

eg.:

www.domain.com - magento 2 installation on database1 - website1
www.domain2.com on database2 - website2
www.domain3.com on database3 - website3


texts: Create New Customer Account - Shop Required Error

texts:
I'm developing a new theme for Magento 2.1.3. When trying to create a new account, I'm getting an error saying "Shop Type" is a required value. Nothing in the logs sheds any light on this.

I'm overriding the default register template but the issue remains even when I'm not.

FYI, I am running a database that was migrated from 1.9

Thanks in advance!


texts: The proper way to add/remove features from admin order page?

texts:
I'm about to migrate my current platform (osCommerce) to magento and on the current platform I have a lot of customizations on the order page where you see all the order statuses, billing address, what the customer purchased etc.

I wanna make sure that on Magento the customizations gonna be on external files so in case there is an upgrade the customizations will not be overwritten...

What is the proper way to achieve that?


texts: Placing an order with configurable product weird issue

texts:
When placing an order with configurable product, Some products ordered twice. For example,

Configurable product sku is fst (full sleeve top)

And its associated product skus are fst_s,fst_m,fst_l (small,medium,large)

I have ordered fst_s with quantity 2 and fst_m with quantity 1 products. After placed an order, Order total amount being wrong. When i inspect an order details, I got following information

In admin, sales order view page, I have only 3 quantity.But, if i get order details via code, I got quantity 5.

Type: configurable
Item Name: Full Sleeve Top
Item Id: 3483
Item Sku: fst_s
Item Qty: 2.0000
Item Price: 20.0000

Type: simple
Item Name: Full Sleeve Top
Item Id: 3484
Item Sku: fst_s
Item Qty: 1.0000
Item Price: 20.0000

Type: configurable
Item Name: Full Sleeve Top
Item Id: 3483
Item Sku: fst_m
Item Qty: 1.0000
Item Price: 20.0000

Type: simple
Item Name: Full Sleeve Top
Item Id: 3485
Item Sku: fst_m
Item Qty: 1.0000
Item Price: 20.0000

Simple product added again with 1 quantity. I don't have an idea, why its happening like this. In admin area, Its showing fine Except order total ($100). In Order invoice, Its showing correct amount- $60(exclude repeated simple product amount). I have placed my code what i have checked below

$order = Mage::getModel('sales/order')->loadByIncrementId(100000003);
$orderItems = $order->getItemsCollection()
        ->addAttributeToSelect('*')
        ->load();
        foreach($orderItems as $sItem) {
            if($sItem->getPrice()==0){continue;}
            echo "Type: ".$sItem->getProductType()."
";
            echo "Item Name: ".$sItem->getName()."
";
            echo "Item Id: ".$sItem->getProductId()."
";
             echo "Item Sku: ".$sItem->getSku()."
";
             echo "Item Qty: ".$sItem->getQtyOrdered()."
";
             echo "Item Price: ".$sItem->getPrice()."
";
        }
//print_r($order->getData());

Eagarly awaiting for your response!


texts: Which is the supported version of rabitmq for magento 2.3 ce?

texts:
I followed the official magento documentation and installed Rabitmq 3.5.6.
However i was reading this document https://www.rabbitmq.com/which-erlang.html
and i found that Rabitmq 3.5.6 version is older version and it is  strongly discourage to use it.
PlEASE GUIDE ..


texts: Move Static Block created from admin panel to above the Breadcrumb in magento 2

texts:
If the question was not understandable. I want to move the a block (which contains 2 images) , which was called in a catalog page. The block and catalog page were created in admin panel. i think a move command in "Layout Update XML" field in catalog page should do the job. But i dont know what to give in it.
This was the code that i gave

<move element="category.cms" destination="page.top" before="breadcrumbs">

But that didn't work

Basically change from this to this


texts:
I want to get my header part as html and I will use this in some other site with API call. For that I am trying to render using Magento\Theme\Block\Html\Header block and the following code:

$this->_view->getLayout()
    ->createBlock('Magento\Theme\Block\Html\Header')
    ->setTemplate('Magento_Theme::html/header.phtml')
    ->toHtml();

But it is not working. Can someone please suggest how to correct this or some other method to implement.


texts: Show product attribute on product page magento 2.4

texts:
i need to show an attribute to product page under the name of the product. The attribute is text and the code is plustile
I try to load it to a shopbybrand extension that has a block in the wanted area with the code
<?php
// check attribute exists (Where 'dimension' is the attribute code for your attribute)
if ($attribute = $this->getProduct()->getResource()->getAttribute('flooring_width')): ?>
    <?php
    // get label for the current store (in case you have multiple stores and languages)
    $_attribute_label = $attribute->getStoreLabel(Mage::app()->getStore()->getName());
    // get the attribute value (for other attributes change getDimension to getName where name is the name of your attribute );
    $_attribute_value = $this->getProduct()->getFlooringWidth();
    ?>
    <?php
    // check there is a value for the attribute
    if (isset($_attribute_value)): ?>

            <?php echo $_attribute_label . ': ' . $_attribute_value; ?>

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

or
<?php
$_product = $block->getProduct();
$attrData = $_product->getData('plustitle');
$blockTitle = $this->getData('title');
if (trim($attrData) !== "") : ?>

<?= $blockTitle; ?>

        <?php echo $attrData; ?>
        <?php echo 'mplampla';?>

<?php endif; ?>

i get
Error: Call to a member function getResource() on null in
i try to make an extension  like
https://www.dckap.com/blog/display-custom-attribute-value-product-viewlist-page-magento-2/
but with no success
Can you advise for the correct way to do it or
Do you know any extension to do this?
Thank you


texts: Magento: Unable to set Limit to Custom Collection of Admin Grid

texts:
I have created a custom module to show the data in admin grid

protected function _prepareCollection()
{
    $collection = Mage::getResourceModel('test_testing/order_collection');
    $collection->setProductFilter($this->_product->getId())->setParentItemIdFilter();
    $coreResource = Mage::getSingleton('core/resource');
    $collection->getSelect()
               ->joinLeft(array('billing_address' => $coreResource->getTableName('sales_flat_order_address')),
                    '`sales_order`.`billing_address_id` = `billing_address`.`entity_id`',
                    array('customer_firstname'  =>  'billing_address.firstname',
                        'customer_lastname'     =>  'billing_address.lastname',
                        'customer_email'        =>  'billing_address.email',
                    ));

    $collection->getSelect()->limit(2);
    $this->setCollection($collection);
    return parent::_prepareCollection();
}

Instead of 2 produts, It return's 4 products in admin grid.

I tried to print the query echo $collection->getSelect()->__toString();  and if i run the sql query it returns the correct record (i.e. 2)

I tried with ->setPage(1, 1); but still unable to resolve this issue.

It's Simple thing but still don't know what is missing.
Please help.


texts: Magento 2.4 - Catalog Search index exception: The attribute with a "" attributeCode doesn't exist. Verify the attribute and try again

texts:
I have the following error when I try to reindex catalogsearch_fulltext :
Catalog Search index exception: The attribute with a "" attributeCode doesn't exist. Verify the attribute and try again.
I have found similar subjects, but in my case, the attributeCode is empty...
Here is my elasticsearch configuration, I don't know if it could be a version compatibility issue :
  "name" : "2835d9d85e2a2447de632d011ca49709",
  "cluster_name" : "624881917840:www-preprod24",
  "cluster_uuid" : "8ab5vT1FQmOsRQPosHPKkg",
  "version" : {
    "number" : "7.7.0",
    "build_flavor" : "oss",
    "build_type" : "tar",
    "build_hash" : "unknown",
    "build_date" : "2020-11-03T09:21:16.688092Z",
    "build_snapshot" : false,
    "lucene_version" : "8.5.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

Thanks for your help !


texts: Removing index.php from product pages results in 404 error

texts:
I have been trying to figure out how I can get rid of index.php before my product URLs. The home page is ok but when I click products it throws up 404. I have changed the config with seo url rewrites to yes.
www.robsteele.co.uk/clickdev


texts: how to use subdirectories in the url-key

texts:
I need to save a subdirectory within the url-key for products and categories but the rewrite rule from Magento still converts the "/" into a "-".

Has anyone a idea to solve this "problem"?


texts: Custom category attribute load issue in admin

texts:
I am using Magento 2.3.2. I have created custom dropdown attribute for category. All is good until I enter admin category page. Spinner keeps spinning and in console there is error "TypeError: value.map is not a function" (file-uploader.js:79:27).
There is something with mapping, but I can't figure out what is wrong. Did all from examples, but nothing helps. Attribute is loaded and values in dropdown also loaded. I can remove spinner from html and I can select from dropdown, even save. Issue is that spinner not removed and previously saved value is not preselected. Any ideas?

  category_form.xml:

<fieldset name="display_settings">
    <field name="category_icon">
        <argument name="data" xsi:type="array">
            <item name="options" xsi:type="object">Module\Vendor\Model\Category\Attribute\Source\Icons</item>
            <item name="config" xsi:type="array">
                <item name="sortOrder" xsi:type="number">1</item>
                <item name="dataType" xsi:type="string">string</item>
                <item name="formElement" xsi:type="string">select</item>
                <item name="label" xsi:type="string" translate="true">Category Icon</item>
            </item>
        </argument>
    </field>
</fieldset>

  Icons.php

class Icons extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource{
protected $fontAwesome;

public function __construct(
    \Awps\FontAwesome $fontAwesome
)
{
    $this->fontAwesome = $fontAwesome;
}

/**
 * @return array
 */
public function getAllOptions()
{
    if (!$this->_options) {
        $fonts = $this->fontAwesome->getAllData();
        $options = [];
        foreach ($fonts as $font)
        {
             $options[] = ['value' => $font['class'], 'label' => $font['name']];
        }
        $this->_options = $options;
    }
    return $this->_options;
}

public function getOptionText($value)
{
    foreach ($this->getAllOptions() as $option) {
        if ($option['value'] == $value) {
            return $option['label'];
        }
    }
    return false;
}

  InstallData.php

class InstallData implements InstallDataInterface{
    private $eavSetupFactory;

    public function __construct(EavSetupFactory $eavSetupFactory) {
        $this->eavSetupFactory = $eavSetupFactory;
    }

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(\Magento\Catalog\Model\Category::ENTITY, 'category_icon', [
            'type'     => 'varchar',
            'label'    => 'Category Icon',
            'input'    => 'select',
            'source'   => 'Module\Vendor\Model\Category\Attribute\Source\Icons',
            'visible'  => true,
            'required' => false,
            'global'   => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
            'group'    => 'Display Settings',
        ]);
    }}


texts: Magento 2.2 - custom product sorting issue

texts:
I have override toolbar.php for custom sorting attribute.

<?php
    namespace Vendor\Module\Block\Product\ProductList;
    class Toolbar extends \Magento\Catalog\Block\Product\ProductList\Toolbar
    {
        protected $_template = 'Magento_Catalog::product/list/toolbar.phtml';

        public function setCollection($collection)
        {
            $this->_collection = $collection;

            $this->_collection->setCurPage($this->getCurrentPage());

            $limit = (int) $this->getLimit();
            if ($limit) {
                $this->_collection->setPageSize($limit);
            }
            if ($this->getCurrentOrder()) {
                if ($this->getCurrentOrder() == 'stock') {
                    $this->_collection->getSelect()
                        ->joinLeft(
                                'cataloginventory_stock_item AS csi',
                                'e.entity_id = csi.product_id',
                                'csi.qty AS quantity'
                        )
                    ->group('e.entity_id')
                    ->order('quantity ' .$this->getCurrentDirectionReverse());
                } elseif ($this->getCurrentOrder() == 'created_at') {
                    $this->_collection
                       ->setOrder(
                            $this->getCurrentOrder(),
                            $this->getCurrentDirectionReverse()
                    );
               } else {
                    $this->_collection
                         ->setOrder(
                               $this->getCurrentOrder(),
                               $this->getCurrentDirection()
                         );
                }
            }
            return $this->_collection;
        }
    }

Select created_at attribute in frontend, it display good result.

But after select stock attribute, it display below error.

[2017-11-17 04:28:36] main.CRITICAL: You cannot define a correlation name 'csi' more than once [] []

I noticed that it is because of join query. In magento 2.1.x, it was good. Issue is occuring in Magento 2.2.

Other point:

In Magento 2.2, product listing page is reloads twice by default. I have tried it by echo and it display 2 times. So I hope it may be issue.

Please help!


texts: Replace referenceContainer or referenceBlock

texts:
When my custom product type displays, I want a whole new layout/view. I have the content area being removed by nothing shows when I add it back. Can someone tell me what I'm doing wrong?

<referenceContainer name="content" remove="true" />
<referenceContainer name="content">
    <block class="Magento\Framework\View\Element\Template" name="customproductform" template="CustomProductForm::customproductform.phtml"></block>
</referenceContainer>


texts: ko template: getTemplate() after AJAX not working(DOM append)

texts:
Page  with products has loading by ajax(infinity scroll loading), response with products are Html page, from  which new products search by class(Jqury) and appended to existing page, as a result is a problem, that some components(that are inside of a products, like counter products in basket) not working after that, because <!-- ko template: getTemplate() --><!-- /ko --> are not working and needed template wasn't loaded, i tried .trigger('contentUpdate') and applyBindings(), but thats not working.
How to make knockout reinitialize himself after apending new DOM elements to existing page?


texts: Magento 2 How to call a ajax function in x-magento-init type javascript?

texts:
It seems cannot use jquery lib inside the x-magento-init type javascript.
How to call a ajax function in x-magento-init type javascript?
Thanks


texts: How to add extra price in product base price?

texts:
I want to add extra price on product base price and all Magento default calculation working on this.
Like the product, price is $100 and add extra price $20 then tax, catalog rule calculation will work on $120 instead of $100 in frontend.

I have also used plugin this but it is not working on catalog rule.
 <type name="Magento\Catalog\Model\Product">
         <plugin name="add_design_price" type="Vendor\Customize\Plugin\Product" sortOrder="1"/>
      </type>

Thank you.


texts: Suddenly I'm getting error on my front page and backend pages


texts: How to remove simple product form cart in magento 2.1

texts:
I need to remove simple product from cart.

Remove item option available only for configurable product

<a href="#"
   title="<?php echo $block->escapeHtml(__('Remove item')); ?>"
   class="action action-delete btn-remove btn-remove2 remove-btn"
   data-post='<?php /* @escapeNotVerified */ echo $block->getDeletePostJson(); ?>'>

    <?php /*
        <?php /* @escapeNotVerified * / echo __('Remove item')?>
     */ ?>

Above code is working for configurable product

How to remove simple product from cart?


texts: Magento 2: How to get an event after shipping address form?

texts:
There is an event triggered after filling the form of the first checkout phase?

If there is an event is possible to capture the information from the form?

Thanks in advance for any suggestions.


texts: SUPEE-9767 Magento CE 1.9.3.3 Onestep Checkout not working with Form Key Validation On Checkout enabled

texts:
After upgrading to Magento CE 1.9.3.3, when I enable Form Key Validation on Checkout as recommended by SUPEE-9767 onestep checkout stops working.

After selecting a payment method, when I click Continue Payment the one step process does not continue. I do not see any server response or logged error messages.

When I disable Form Key Validation on Checkout, the checkout process functions as expected.

This is a default Magento installation with no extended theme.

Update1

This seems to be associated with SUPEE-9767 Patch/CE 1.9.3.3 - One Page Checkout - Customer Registration issue where the ajax savepayment method call is returning null even though template files are patched and formkeys are present,

I could not replicate this on a clean 1933 install.

Update2

Here is the cause of my problem

<input name="form_key" type="hidden" value="SLLU234jmligBYb9" disabled="" autocomplete="off">

CSS is adding the disabled selector to the form_key. This means the form_key value is not submitted to the one step checkout controller causing the controller to return null. To test this, remove the disabled selector in your browser inspector.

This problem was caused by Paypal Plus which dynamically replaces the contents of fieldset at the onestep checkout payment method. See my answer below.


texts:
magento 2 site updated to version 2.3.5-p1, checking with the chrome browser console, I encountered an error that I did not understand.
In particular, the error refers to a link that I had never seen before:

[Report Only] Refused to load the script 'https://data1.moiziq.com/scripts/js?k=5c9f3a89f3c82d08658b4568&s=d3d3LmZvcm5hY2ViZXNhbnphLml0' because it violates the following Content Security Policy directive: "script-src assets.adobedtm.com geostag.cardinalcommerce.com 1eafstag.cardinalcommerce.com geoapi.cardinalcommerce.com 1eafapi.cardinalcommerce.com songbird.cardinalcommerce.com includestest.ccdc02.com www.googleadservices.com www.google-analytics.com secure.authorize.net test.authorize.net www.paypal.com www.sandbox.paypal.com www.paypalobjects.com t.paypal.com s.ytimg.com video.google.com vimeo.com www.vimeo.com js.authorize.net jstest.authorize.net js.braintreegateway.com cdn-scripts.signifyd.com www.youtube.com *.googleapis.com google.com *.gstatic.com cdn.ampproject.org connect.facebook.net www.googletagmanager.com googletagmanager.com *.kxcdn.com platform.twitter.com 'self' 'unsafe-inline' 'unsafe-eval'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

Can you help me understand what it is and if anything solve it?

Thanks


texts:
How to detect customer account years old?

example:

Customer Account has created at 2018-05-17 15:20:35,I want to add text "Anniversary" if the account has been 1 year.