texts: Event observer not working or event not firing

texts:
I have an almost empty magento 1.9.3 project, caches disabled, with 4 custom modules and I want to make an observer in one of them. I made observers before in other projects and they worked, but in this project the observer is not doing anything.

The code is:

//App/Code/Local/Feliu/Promos/etc/config.xml

<config>
    <modules>
        <Feliu_Promos>
            <version>0.1.0</version>
        </Feliu_Promos>
    </modules>
    <global>
        <models>
            <feliu_promos>
                <class>Feliu_Promos_Model</class>
                <resourceModel>feliu_promos_resource</resourceModel>
            </feliu_promos>
            <feliu_promos_resource>
                <class>Feliu_Promos_Model_Resource</class>
                <entities>
                    <promos>

feliu_promos

                    </promos>
                </entities>
            </feliu_promos_resource>
        </models>
        <blocks>
            <feliu_promos>
                <class>Feliu_Promos_Block</class>
            </feliu_promos>
        </blocks>
        <helpers>
            <feliu_promos>
                <class>Feliu_Promos_Helper</class>
            </feliu_promos>
        </helpers>
        <resources>
            <feliu_promos_setup>
                <setup>
                    <module>Feliu_Promos</module>
                </setup>
            </feliu_promos_setup>
        </resources>
        <events>
            <controller_front_init_routers>
                <observers>
                    <feliu_promos_model_observer>
                        <type>singleton</type>
                        <class>>Feliu_Promos_Model_Observer</class>
                        <method>interceptMethod</method>
                    </feliu_promos_model_observer>
                </observers>
            </controller_front_init_routers>
        </events>
    </global>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <Feliu_Promos before="-">Feliu_Promos_Adminhtml_Promos</Feliu_Promos>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>
    <frontend>
    <routers>
        <promotions>
            <use>standard</use>
                <args>
                    <module>Feliu_Promos_Frontend_Promos</module>
                    <frontName>promotions</frontName>
                </args>
            </promotions>
        </routers>
    </frontend>
</config>

and the observer:

//App/Code/Local/Feliu/Promos/Model/Observer.php

class Feliu_Promos_Model_Observer
{
    public function interceptMethod($observer) {

        $event = $observer->getEvent()->getControllerAction()->getFullActionName();
        Mage::log('**** EVENT FIRED ****' . $event );
        exit(__METHOD__);

    }
}

I can't see where is the error, everything seems ok, I read all the previous questions about 'event observer not firing' that I found, but I still can't see the error, maybe it's obvious but I can't see it and the rest of the module is working fine.

PD: I tried to replace the class of the event observer in config.xml from Feliu_Promos_Model_Observer to feliu_promos/observer but nothing changes.


texts: Magento 2 - How to suspend customer by admin or them self?

texts: In Magento 2, How to suspend customer by admin or them self ?, I need solution and how to do that? Thanks!


texts:
I am trying to find a way to add $6.95 to orders shipping to Canada (we're in the US.) The $6.95 amount represents prepaid duties. If the site does not prepay the duties, the cost of the duties can triple, and the customer may refuse the shipment.
I've seen add-ons for entire packages like Zonos and Alavera, but I only need this one particular prepaid duty.
Thank you
Jeff


texts:
I've create an install schema for a custom module. The problem is, that I put a field as foreign key but later it turned out I connected it to the wrong foreign field and table.

I've made the correct changes to the InstallSchema file and i want to run it again, but as iunderstand, the InstallSchema file only runs once. What is the best way to act in this situation ?


texts: Range filter for custom attribute in magento

texts:
I need range filter for custom attribute (weight) like price range filter

i used below url for price range filter

domain/rings?&price=20000-30000 - working

same like that i used for weight range filter

domain/rings?&weight=-400-500 - not working

how can i solve this issue?

Please suggest any idea to filter weight range


texts: Custom drop down menu in responsive navigation

texts:
We utilized a XML snippet in order to load a specific block into the Topnavi.

Now, when in responsive mode we are having all topmenu items as a normal list in the menu.

Normal:

Responsive view:

I do want to have "Sales Partners", "Electronic Components", ... in a specific Submenu, like I have it for the Menu items:

How can I do this? In my default.xml I have something like this:

<referenceContainer name="header.panel">
      <block class="Magento\Cms\Block\Block" name="top-navigation">
                <arguments>
                    <argument name="block_id" xsi:type="string">top-navigation</argument>
                    <argument name="css_class" xsi:type="string">header links</argument>
                </arguments>
            </block>
        </referenceContainer>

This loads the desired block which is a block due to the translation problems we have for multilingual pages.

This loads the block top-navigation which holds this content:

        &Uuml;ber uns

News

Rochester Electronics

OSRAM OS

End-Of-Life Management

Zertifizierte Qualit&auml;t

Mein Konto

Anmelden

Warenkorb

Kontakt

What can I do in order to get this stuff working?


texts:
I'm using Magento2.3 and when I am running composer update command, I got following error message:

  Could not apply patch! Skipping. The error was: Cannot apply patch
  patches/PRODSECBUG-2198-2.2-CE.composer-2019-03-27-06-12-19.patch

It always shows composer trying to remove magento/module-catalog and failed to apply patches.


texts:
I'm new in Magento.
I try to set up a configurable product by using this link

https://popatkaran.wordpress.com/2015/07/24/create-configurable-products-programatically-magento/

but when I try to run the file, I get this error

  Fatal error: Uncaught Error: Call to a member function getId() on null
  in
  C:\xampp\htdocs\magento\app\code\core\Mage\Catalog\Model\Product\Type\Configurable.php:284
  Stack trace: #0

can someone help me, please?
thanks!


texts: What are some good hosting strategies for hosting multiple, connected magento websites in multiple locations?

texts:
I'm asking this question in the Magento stack because I feel that it is directly related to the Magento setup.

We are using Magento, and we currently have a development environment and a production environment each set up on their own Amazon AWS instances. Any changes on dev can be pushed to production using git and a deploy script we have made.

We would like to create an additional 'website' for customers in the U.K. within Magento, but we would like to host it in Europe, instead of in the U.S. The codebase of the U.K. website will be the same, and any changes from dev should go to both the U.S. and U.K. versions of the website. Our data is stored in Amazon RDS.

What would you suggest we do in order to separate the websites into different locations?
One option that I have thought of implementing is to create an additional 'website' within Magento and then duplicate the AWS instance, placing the new instance in Europe. Code from dev will then need to be pushed to both instances every time. Data will be accessed and stored in the same RDS as the U.S. website.

Does this seem like a good idea, or are there better ways of doing this?


texts: Get shipping address county in Magento 2 observer

texts:
Hi I have a custom module . I want to get shipping country inside
public function execute(\Magento\Framework\Event\Observer $observer)
    {

Please let me know how can i get this?
I have seen this code for postcode , but i am not sure this is working or not
  $postCode = $this->_checkoutSession->getQuote()-getShippingAddress()->getPostcode();

I need shipping address country name in public function execute. Please help .


texts: Bulk product import error SKU not defined

texts: I have a product sheet with some 200 odd products. When I am trying to import these product I get an error saying "Skipping import row, required field SKU not defined", even  though all the SKUs are present. It happens with most of the products but some products do get imported. Don't understand the difference. My SKUs are four digit numbers only in general excel formate. can someone pls tell me what i am doing wrong?


texts:
I'm having an issue with magento not sending any emails. I've already tested some solutions and it's not worked.

I'm using a SMTP extension and Magento 2.2.6: https://github.com/mageplaza/magento-2-smtp
And always getting an error when testing the extensions configs:

I also checked var/log and no errors were found.


texts: Hi am trying to install magento 2 over linux mint just to explore and for knowledge but i am getting lot difficulties in permissions sometimes commands does not run do anyone knows a best tutorial that i could follow in order to install


texts: Different server for each country/domain but the same admin

texts: I need to put front end for each country to own domain and server. But admin should be the same for all countries. Is possible to accomplish that?


texts: Prepend block to Mage Head Block using controller_action_postdispatch event observer

texts:
I am trying to use a custom event observer to observe the controller_action_postdispatch event and modify the response body directly by replacing opening head tag with  + my custom block content.  It is important that I make sure that it is an actual HTML page response, and not JSON or partial HTML in the case of an AJAX request.  I would like to use the controller_action_layout_render_before event to determine that the head block is present, set a flag, which the previously mentioned observer method will check before modifying the response.

The use case is to safely prepend my custom block inside the head tag of every page, taking priority order over other head content such as meta tags, and script tags.

This is where I am at right now (not far, got a little lost)...

config.xml

<?xml version="1.0"?>
<config>
    ...
    <global>
        ...
        <events>
            <controller_action_postdispatch>
                <observers>
                    <intercept_response>
                        <class>module/observer</class>
                        <method>interceptResponse</method>
                    </intercept_response>
                </observers>
            </controller_action_postdispatch>
            <controller_action_layout_render_before>
                <observers>
                    <check_response>
                        <class>module/observer</class>
                        <method>checkResponse</method>
                    </check_response>
                </observers>
            </controller_action_layout_render_before>
        </events>
    </global>
    ...
</config>

Model/Observer.php

class My_Module_Model_Observer {

    protected $_isHead = FALSE;

    public function checkResponse() {
        if ( Mage::app()->getLayout()->getBlock('head')) {
            $_isHead = true;
        }
    }

    public function interceptResponse(Varien_Event_Observer $observer) {
        $block = $observer->getBlock();
    }

}


texts: Price Rules stopped working recently, reset every 48 hours, cron is running

texts: We have run this magento store for many years now on magento 1.4.x. We have an actual cron daemon run the cron.sh script every 5 minutes as is expected. the customer setup price rules that have been in place since the start. In the last few weeks we have run into an issue where the rules reset once every 48 hours at around midnight. This would tend to lead me to the cron, but it seems to be running. I tried changing it so it runs cron.php with the php binary, but that didn't seem to help it at all either. I am not sure why this has stopped working and i was wondering if anyone had any ideas as to how to track it down? I cannot find any errors in cron log, or messages log...I also looked into the magento exceptions and systems logs also, nothing there. Thanks for the assistance!


texts: I am building a Magento 2 store. The Cart is saved for one hour only, it get deleted after one hour of inactivity. Is there any setting on Magento that allow a longer (may be a week or so) cart session time. Or some coding changes are need to archive this?


texts: Magento2 store not running on localhost .htaccess file problem

texts:
I have a magento2.4 store running on server. I installed it on localhost but it give 404 error.

It has a strange .htaccess file contents.
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/pub/
RewriteCond %{REQUEST_URI} !^/setup/
RewriteCond %{REQUEST_URI} !^/update/
RewriteCond %{REQUEST_URI} !^/dev/
RewriteRule .* /pub/$0 [L]
DirectoryIndex index.php

If i change the .htaccess file content to a standard M2 .htaccess than it gives directory content.

Can you suggest some solution to this problem?


texts: Magento 2 - Cant use product factory in plugin

texts:
I try to add a new product in a afterSave plugin for Magento\Quote\Api\CartItemRepositoryInterface, but I get:

Type Error occurred when creating object:
Company\Quote\Plugin\RalSpecialColorPriceSurcharge, Argument 3 passed
to Company\Quote\Plugin\RalSpecialColorPriceSurcharge::__construct()
must be an instance of Magento\Catalog\Model\ProductFactory, instance
of Magento\Framework\App\Config given, called

app\code\Company\Quote\etc\di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Quote\Api\CartItemRepositoryInterface">
        <plugin name="company_quote_ral_specialcolor_price_surcharge"
                type="Company\Quote\Plugin\RalSpecialColorPriceSurcharge"
                sortOrder="10"/>
    </type>
</config>

app\code\Company\Quote\Plugin\RalSpecialColorPriceSurcharge.php
<?php

namespace Company\Quote\Plugin;

use \Magento\Catalog\Model\ProductFactory;

class RalSpecialColorPriceSurcharge
{
    /**
     * @var Company\Quote\Model\Config\Settings
     */
    private $settings;

    public function __construct(
        \Magento\Catalog\Model\ProductFactory $productFactory,
    ) {
        $this->productFactory = $productFactory;
    }

   ...


texts:
I was trying to replace magento 2 core javascript file for Swatches render which is located at app/code/Magento/Swatches/view/frontend/web/js/SwatchRenderer.js . And I followed official guide for this - http://devdocs.magento.com/guides/v2.0/javascript-dev-guide/javascript/custom_js.html , but it did not work.

I have uploaded my module on GIT. Can someone check and tell me what is the issue ? Here is the GIT Link for the module created - https://github.com/chamalC/magento-2-replace-javascript/tree/master/app/code/Muaw/CustomSwatches


texts: How did Magento know language was installed?

texts:
I just installed this language pack:

http://imaginaerum.github.io/magento2-language-fr-fr/en.html#section-installation

The way I installed it was like this:
1. create folder via ftp in app/i18n/imaginaerum/fr_fr/  unzip file here
2. create store view and change language to french (france).I used language code "fr"

it works.

I'm curious how Magento knew to use that folder as a language pack. It seems to me I did nothing to really connect the language choice with that pack. And while it is doing exactly what I want I don't know how/why so I am kind of curious as I am just starting to learn how magento works.


texts: How to use select menu instead of links for layered navigation?

texts:
So I have attributes that I want customers to be able to use in Magento's layered navigation. The problem is I will have many Fabrics, Brands, Materials, etc. and I don't want it to show too many links. My theme includes a custom menu to replace the Category in layered navigation but not other attributes. How can I replace these links with a select menu? Or some other method that can condense all of the options?

I'm also open to an extension (hopefully a responsive one) that addresses this.

Here is an image of how it looks right now:

http://linenwoods.com/Capture.JPG


texts: Magento 2 how to get html from admin/sales/order/view

texts:
I am trying to figure out that how can I get the html that would be rendered on below page:

  "www.mysite.com/admin/sales/order/view/order_id/12345/"

But I am not able to figure it out. I am trying to get it within my own custom module, apply some styling changes to it, and convert it into a PDF. I have all the other stuff figured out, I just need to get the raw html that would output to this page. I don't even know where to start with this.


texts: Create new order status and make it visible on frontend

texts:
I have created a new order status and assign it to processing state:

UpgradeSchema.php

namespace Vendor\Module\Setup;

use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;

class UpgradeSchema implements UpgradeSchemaInterface
{

    public function upgrade(
        SchemaSetupInterface $setup,
        ModuleContextInterface $context
    ) {
        $installer = $setup;
        $installer->startSetup();

        if (version_compare($context->getVersion(), "1.0.1", "<")) {
          $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
          $status = $objectManager->create('Magento\Sales\Model\Order\Status');
          $status->setData('status', 'delivery_pending')->setData('label', 'Delivery Pending')->save();
          $status->assignState(\Magento\Sales\Model\Order::STATE_PROCESSING, true);
        }
        $setup->endSetup();
    }
}

The problem is when the order of my new order status won't show at frontend and when I check at admin page in order status configuration, the new order status is not visible on storefront


texts: Magento2: php bin/magento setup:di:compile issue

texts:
When I run this command php bin/magento setup:di:compile got the error below:

[ReflectionException]
Class Magento\Catalog\Model\Product\Link\Resolver does not exist.


texts: How can i update order status from checkout with custom payment module?

texts:
I have payment processing on the checkout page on click of place order.
I get the payment response on the same page.
Now, I need to update the order status after the checkout form submission in the custom payment module. Does anyone know how to do it? Thanks in advance.

OR

Can I process the checkout form submission in the Controller
Controller\Index\Index.php


texts: Magento 2.4 MSI : How to programmatically set Notify Stock Level on Source and SKU

texts:
I would like to set Notify Qty from a script that reads a CSV file with Source, SKU and NotifyQty. It would probably need to enable notify qty for the products as well.
I can do it with SQL query to inventory_low_stock_notification_configuration.notify_stock_qty, but that's probably not the right way.


texts: When Create Invoice Give error Like "Transaction has been declined. Please try again later." In Magento 2

texts:
I have to configure the Amazone pay Payment Method then place an order using amazon-pay successfully after the admin side creates an invoice but gives an error like "Transaction has been declined. Please try again later" .

also, the check-in log file gives an error

<Error>
    <Type>Sender</Type>
    InvalidAuthorizationStatus
    <Message>Authorization xxxxxx is currently in Closed state. Capture can only be requested in Open state.</Message>
  </Error>


texts: Cannot checkout error. Please agree to all the terms and conditions before placing the order

texts:
Hi we recently saw this error on Magento 1.9.0.1. And no idea why. And especially where to look on how to debug.

T&C haas been enabled in backend. And 1 agreement was set (ID=1). It does not matter if we uncheck or check the agreement. The error is always.

Please agree to all the terms and conditions before placing the order

We see however that AJAX traffic is running and that this is server side related. Which makes it even more interesting.

The response is
{"success":false,"error":true,"error_messages":"Please agree to all the terms and conditions before placing the order."}

I see this message comes from $this->_getCheckoutSession()->addError($this->__('Please agree to all Terms and Conditions before placing the order.')); in OnepageController.php (function: overviewPostAction()) ... there is a diff ... but no idea why it is not succesfull. WHat I did see however is that it is submitted as name="agreement[<?php echo $_a->getId()?>]"and processed using $postedAgreements = array_keys($this->getRequest()->getPost('agreement', array()));

UPDATE: It seems the agreement variable is sent in POST as agreement[2]:1 but I don't think $this->getRequest()->getPost('agreement', array()) will then capture it's value.

Question: Is this a known error? and if yes is there a method to fix?

Appreciate any tips ;P


texts: Overwrite review template and review list block magento

texts:
This is my layout:

    <catalog_product_view>
        <reference name="product.info">
            <block type="namespace_module/review_product_view_list" name="review_productaa" template="namespace_module/product/view/list.phtml"/>
        </reference>
    </catalog_product_view>

in the etc.xml I managed to rewrite my block:

<rewrite>
     <product_view_list>Namespace_Module_Block_Review_Product_View_List</product_view_list>
</rewrite>

My block:

  class Namespace_Module_Block_Review_Product_View_List extends Mage_Review_Block_Product_View_List
  {
     public function addNewProductReviewLink(){

        return "test";
    }
  }

My problem is with my template. Why I got invalid method if i call the addNewProductReviewLink function in my template,like echo $this->addNewProductReviewLink(); ?


texts: Payment make a request how to translation to other page

texts:
public function placeRequest(TransferInterface $transferObject)
   {

    //make a request
    $tranferBody  = $transferObject->getBody();
    $postData['appid']      = 'wxd678a7b9c9cea774';
    $postData['key']        = '1235142d77e4a3a244f0072c4f92d2ed';
    $postData['mch_id']     = '123456';
    $postData['orderName']  = '454ds';

    $outTradeNo             = $tranferBody['INVOICE'];
    $totalFee               = $tranferBody['AMOUNT'];

    //post data
    $postDataXml            = $this->createOrderData($postData,'http://www.baidu.com',$outTradeNo,$totalFee);
    $this->logger->debug(['xml'=>$postDataXml]);
    $this->curl->post($transferObject->getUri(),$postDataXml);

    $response   = $this->curl->getBody();//response data


texts: How to assign class to checkbox field in form

texts:
In module I have Form.php . I have added Checkbox code which is as follows.

$fieldset->addField('title', 'checkboxes', array(
    'label'     => Mage::helper('custommodule')->__('Title'),
    'class'   => 'validate-one-required-by-name',
    'required'  => true,
    'name'      => 'title[]',
    'values' => array(
        array('value'=>'aaa','label'=>'Checkbox1'),
        array('value'=>'bbb','label'=>'Checkbox2'),
        array('value'=>'ccc','label'=>'Checkbox3'),
    ),
    'onclick' => "",
    'onchange' => "",
    'disabled' => false,
    'tabindex' => 1
));

I have added class field in it. 'class'     => 'validate-one-required-by-name', but it doesnt applied to output. If you have any other way to apply class to checkbox through JQuery. Please let me know.


texts: 404 Error Page not found error on extension admin route update Installing SUPEE - 6788

texts:
I have installed supee 6788 patch in my store. I have several extensions in my store.

I have just updated admin route as per magento APPSEC-1034, addressing bypassing custom admin URL but it gives me 404 page not found error in my third party extensions.

I have changed config.xml from

<admin>
        <routers>
            <orderseraser>
                <use>admin</use>
                <args>
                    <module>Wyomind_Orderseraser</module>
                    <frontName>orderseraser</frontName>
                </args>
            </orderseraser>
        </routers>
    </admin>

to

<admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <orderseraser after="Mage_Adminhtml">Wyomind_Orderseraser_Adminhtml</orderseraser>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>

but it gives admin url 404.

I have tried in several extensions but its giving me same error in all other extensions.


texts: When creating products with POST, images Roles are not enabled (base/small/thumb/swatch), even after a following PUT

texts:
When I add a product via the Magento 2 API and then add an image, the image is added and shows up under the "Images and Videos" tab, associated with the correct product.  However, none of the Image Roles (Base/Small/Thumbnail/Swatch) are selected, so the image does not show up on the site or the search results in the Magento admin.

I am sending a POST request to:

CURLOPT_URL => $URL . "/rest/default/V1/products/".$sku."/media"

$image_post_data = [
                "entry"=> [
                    "media_type"=>"image",
                    "label"=> "Image".$sku,
                    "position"=> 0,
                    "disabled"=> "false",
                    "types"=> [
                        "image","small_image","thumbnail","swatch_image"
                    ],
                    "content"=> [
                        "base64EncodedData"=> $image64,
                        "type"=> "image/jpeg",
                        "name"=> $sku."jpg"
                    ]
                ]
            ];

Thinking that it might be an issue with the POST command, I then try a PUT afterwards:

$requestUrl = 'http://MYSTORE.com/index.php/rest/V1/products/'.$sku.'/media/'.$imageid;

$put_data = [
    "entry"=> [
        "id"=> $imageid,
        "media_type"=>"image",
        "label"=>$sku,
        "position"=> 1,
        "types"=> ["image", "small_image", "thumbnail", "swatch_image"]
    ]
];

This also does not enable the image roles/types.  I'm not getting an error back and everything looks fine.  I can update the position and label using the PUT code successfully.

Any idea what I'm missing?


texts: Magento csv export and then to MySQL database

texts:
I am trying to export the products to a csv file. System-Import/Export-Dataflow profiles- Export All Products, The data transfer method is set Local/Remote Server, the type is Local Server, Path is var/export. Then I go to Run Profile and click on Run Profile in Popup, the execution starts and everything has a green tick mark with the last row saying Saved successfully:"export_all_products.csv", then Finished profile execution. But when I go and enter the EC2 instance either through FileZilla or just SSH into it and look into the path for the file, there is no file. Could anyone help me out?

I am running a Magento EC2 instance on AWS (1.9.2.2-1 on Ubuntu 14.04.1)


texts: Proper way to implement grid filtering and sorting on a custom column

texts:
I have a custom grid with products. It shows price and special_pirce. Now I want to add another colum which is discount percentage.

I have added the column discount with a custom render. The renderer just does a calculation based on both prices and returns the dicount. So far so good.

Add column:

$this->addColumn('discount', array(
            'header'        => $helper->__('Discount'),
            'type'          => 'number',
            'align'         => 'right',
            'index'         => 'discount',
            'renderer'      => 'AM_Grid_Block_Adminhtml_Purchased_Renderer_Discount',
            'filter_condition_callback' => array($this, '_discountFilter'),
));

Renderer:

function render(Varien_Object $row)
{
    $price = $row->getData('price');
    $specialPrice = $row->getData('special_price');

    if(isset($specialPrice)) {
        return $discount = round(($specialPrice / $price) * 100, 0);
    }
}

Now I am struggeling with the proper way to implement filtering and sorting on this column. I found plenty of examples which just do filtering based on normal column values using mySQL operaters or such. The problem is my value needs to be calculated first so I can't use mySQL operators.

I know I need to use filter_condition_callback for filtering. How should this method look? Is there a best practice how this works in conjunction with a renderer?
How do I implement sorting?


texts:
We have magento 2.2.6 site running.Recently the site was migrated from one server to another server,we are getting following issue:

when we login into admin and leave that page as it is for some time and refresh the page,it is redirecting to home page Also in the frontend,it is redirecting to home page randomly

Can anyone guide me on this issue


texts: New order status staying "pending" instead of processing in Magento 2

texts:
We are using the Multisafepay payment methods and all our incoming orders get the status pending in our Magento2 webshop.

Is there a setting we have to put in to get the orders to processing? It also looks like I can only choose by Multisafepay between pending and pending payment.


texts:
How to get product Attribute options in Magento 2 in custom module, I need to sort them in alphabetical order.

I have a helper thats called from controller and my helper class is like this

<?php
namespace xxx;

class Admin extends \Magento\Framework\App\Helper\AbstractHelper
{
    /**
     * @var \Magento\Framework\ObjectManagerInterface
     */
    protected $_objectManager;
    protected $_logger;
    protected $directory_list;

    public function __construct(
        \Magento\Framework\App\Helper\Context $context,
        \Magento\Framework\App\Filesystem\DirectoryList $directory_list)
    {
        parent::__construct($context);
        $this->_objectManager = $context->getObjectManager();
        $this->_logger = $context->getLogger();
        $this->directory_list = $directory_list;
    }

    /**
     * @param string $_attr_code
     * @param bool|false $is_numeric
     */
    public function sortAttributeFilterOptions($_attr_code = '', $is_numeric = false)
    {
        $model = $this->_objectManager->create('Magento\Catalog\Model\ResourceModel\Eav\Attribute')->setEntityTypeId(4);
        //$model->load($id);
    }
}


texts:
i have installed a fresh installation of magento via the FTP client, i have no SSH access to my hosting.

After transfering my data to the server, i ran the setup on my url and everything ran without any issues. Afterwards when i'm trying to open my Home page and Admin page, it looks like this:

What did I do wrong? Is there a step i have missed?

Thanks in advance.. :)


texts: Magento 2 - Updating Product list page Layout

texts:
So, I'm trying to update the product list page to my own custom layout inside of Magento 2.

Files I've made inside of my theme are as follows:

  /app/design/frontend/Theme/default/Magento_Catalog/layout/catalog_category_view.xml

and I've created the following:

  /app/design/frontend/Theme/default/Magento_Theme/page_layout/2columns-cat.xml

Inside of my catalog_category_view.xml, which i know is the correct handle i've added the following:

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

I know its using this handle, because i can cause an error by editing this xml file.

I have also updated and added it into the * layouts.xml* like so:

<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
<layout id="2columns-cat">
    <label translate="true">2 Column left Cat</label>
</layout>

And here is my 2columns-cat xml:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-cat" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="page.main.title" destination="content" before="-"/>
    </body>
</page>

But it isn't updating the layout. It remains a 2column-left and doesn't use the 2column-cat. Am i doing something wrong? All caches are flushed - cleared the gen folder - cleared the cache folder, nothing.

Can't think of what might not be causing the layout change.


texts: How to assign a group to a user based on their email domain in Magento 2.3

texts:
I want during registration process to assign a different group to users that has a specific domain e-mail:

So user with:
abc@domain.com
123@domain.com
…@domain.com
will be assigned to a specific group all others will be assigned to default group.

I searched a lot, but I found only solutions for Magento 1.

Thank you

I'm trying to make it work, but it's not working.
I create events.xml in **app\code\Sieu\Extension\etc** with this code:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="customer_register_success">
        <observer name="vendor_extension_customer_register_success" instance="Sieu\Extension\Observer\Customer\RegisterSuccessObserver" />
    </event>
</config>

next I created file RegisterSuccessObserver.php here.
**app\code\Sieu\Extension\Observer\Customer** with this code:

<?php
namespace Sieu\Extension\Observer\Customer;

use Magento\Framework\Event\ObserverInterface;

class RegisterSuccessObserver implements ObserverInterface
{
    public function __construct() { }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $customer = $observer->getEvent()->getCustomer();
        $DiscountGroup=4;
        $GuestGroupId=1;
        list($user, $domain) = explode('@',$customer->getEmail());

        if ($domain == 'mydomain.com'):
            /* set Customer group as DiscountedGroup*/
            $customer->setData('group_id',$DiscountGroup);
        else:
            $customer->setData('group_id',$GuestGroupId);
        endif;
    }
    $customer->save();
}


texts: Upgrading from 2.4.1 to 2.4.2 broken API

texts:
Since upgrading from Magento 2.4.1 to 2.4.2 a simple PUT to set a value in a custom attribute now fails with a 500 error.
{"entity":{"entity_id":26481,"extension_attributes":{"mycustom_order_code":"15278"}}}

{
"message": "Internal Error. Details are available in Magento log file. Report ID: webapi-605148ca4bfb6"
}

[2021-03-17] main.CRITICAL: Report ID: webapi-605148ca4bfb6; Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE (entity_id=26481)' at line 1, query was: UPDATE `sales_order` SET  WHERE (entity_id=26481) {"exception":"[object] (Exception(code: 42000): Report ID: webapi-605148ca4bfb6; Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE (entity_id=26481)' at line 1, query was: UPDATE `sales_order` SET  WHERE (entity_id=26481) at /var/www/html/vendor/magento/framework/Webapi/ErrorProcessor.php:208, Zend_Db_Statement_Exception(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE (entity_id=26481)' at line 1, query was: UPDATE `sales_order` SET  WHERE (entity_id=26481) at /var/www/html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:110, PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE (entity_id=26481)' at line 1 at /var/www/html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:91)"} []

This worked perfectly when using Magento 2.4.1 any ideas on how to get round this issue would be greatly appreciated.
Edit: After some searching I have found the issue which has been reported  https://github.com/magento/magento2/issues/32202
Noting the breaking code change commit...
https://github.com/magento/magento2/commit/bd087ecd950024190fef4e5cb6fe5aa6bb27d2eb


texts: What is the command to create a Magento crontab in Magento CLI 2.3?

texts:
I am using Magento 2.3 inside an UBUNTU 16.04 OS. I am trying to setup the cronjobs.
In the documentation official site the suggestion is php bin/magento cron:install [--force]. But as we can see in the picture the Magento CLI 2.3 the only available command is setup:cron:run. .

What is the actual command in order to create the crontabs in this Magento CLI 2.3?


texts: Magento 2 - rewrite checkout and account url

texts:
What would be the proper way to rewrite/translate Magento 2 checkout and user account URL's to make them localized for my language?

1. Checkout

Current checkout URL's are:

domain.com/checkout

domain.com/checkout/#shipping

domain.com/checkout/#payment

2. User account

Current user account url's are:

domain.com/customer

domain.com/checkout/account/login

domain.com/checkout/account/edit

other similar user account URL's...


texts: Magento 2 How to get Custom Attribute Value Of Order Using Rest API

texts:
I have created one attribute for order named "custom_fee" and it is showing okay in magento orders frontend as well  as backend but when I tries to access order data
with rest API , I am not able to see my custom fee.
Can you please someone suggest me how I can get order custom attributes using rest API.
Here is the url that I am using for get order details

-- http://127.0.0.1/magento240/rest/default/V1/orders?searchCriteria[currentPage]=0&searchCriteria[filterGroups][0][filters][0][value]=000000005


texts:
I'd like to know what are the function of the each button, exclude and remove.

I guess that exclude remove from the media folder, Am I right?

Thanks


texts:
I have started integrating PWA in Magento 2.3.3 in my local server which is non-secure and now wanted to build PWA apps.
I have followed this link: http://mageguides.com/magento-pwa-tutorial/
I am not sure about how to move further to build apps.
Can anyone suggest to me?


texts: Magento2: Create customers programmatically and associate to multiple websites

texts:
I have written a customer import which works just fine.
Now the requirement has changed .. the Magento instance runs now multiple stores / websites and i need to change the customer import so that the imported customers will get access to all stores.

What would be the best way to achieve that?
Do I really need to loop through all websites and create a separate customer for each of them? Or is it somehow possible to create global customers?


texts:
I am facing issue of TypeError: settings.$elementF.fotorama is not a function sometime on product details page.

This question is duplicate of : Adding to cart breaks fotorama on page reload , Magento 2 : settings.$elementF.fotorama is not a function etc

This question is asked before but still not found any proper solution for this. Please let me know answer if anyone solved this.


texts: Bundle_option_qty not working, with programmatically add bundle product to cart (magento 2.3.2)

texts:
I would like to add a bundle product to cart programmatically, however i'm experiencing a problem with the bundle_option_qty.
I can change the selection of the bundle option, however the code is somehow not responding to bundle_option_qty. Please find below my code. in this code you can see the definition of $params, in this array I'm setting the bundle_option_qty with 1=>10 and 2 =>20. So I'm expecting the code to add 10 pieces of bundle_option 1871 and 20 pieces of bundle_option 1873, But it is always adding the default quantity as set in the admin section of the bundle product.

 <?php
namespace Mageplaza\HelloWorld\Controller\Test;

use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Magento\Framework\Data\Form\FormKey;
use Magento\Checkout\Model\Cart;
use Magento\Catalog\Model\Product;

class View extends Action
{
    protected $formKey;
    protected $cart;
    protected $product;
    public function __construct(
        Context $context,
        FormKey $formKey,
        Cart $cart,
        Product $product) {
            $this->formKey = $formKey;
            $this->cart = $cart;
            $this->product = $product;
            parent::__construct($context);
    }
    public function execute()
     {
     //$aantal =  $this->getRequest()->getParam('aantal');
        $aantal = 1;
       $productId =649;
        $params = array(
                    'form_key' => $this->formKey->getFormKey(),
                    'product' => $productId,

                    'bundle_option' => [1=>1871,2=>1873],
                    'bundle_option_qty' => [1=>10,2=>20],
                    'qty'   =>$aantal,

                );
        $product = $this->product->load($productId);
        $this->cart->addProduct($product, $params);
        $this->cart->save();

     }
}

Can anybody help me, by showing what i'm doing wrong or give a different solution of how to add a bundle product with bundle option qty.

Thank you in advance.


texts: Magento2, Crontab can have more than one group?

texts:
I create two cronjobs, on same Module, but they should run separeted.
On my crontab.xml I have:

<group id="price_update">
    <job name="price_update_cron" instance="Namespace\ModuleName\Cron\PricesCron" method="execute">
        <schedule>* * * * *</schedule>
    </job>
</group>
<group id="stock_update">
    <job name="stock_update_cron" instance="Namespace\ModuleName\Cron\StockCron" method="execute">
        <schedule>* * * * *</schedule>
    </job>
</group>

Some how the first group price_update is running, but the second group stock_update is not running.
Do anyone knows why? Can I have more that one cronjob running in a crontbab.xml?


texts: magento 1 , how block bad bots on htaccess file

texts:
my site is constantly visited by bots and very often
I would like to block them

because of them, the load on php-fpm

on log apache files i have this


texts:
How can I change "VAT" with another text in the sales email? Magento 2.2.2.
Thanks.


texts: CSS changes are not being applied in frontend

texts:
We would like to enter the text "Want more? Call Today 02089110265" in a box.

We have added css to the override.css,  but when we uploaded the file the changes not showing in the website.

Can anybody help us and let u know where we done something wrong.


texts: Attribute show in Associated Product section in magento1?

texts: I want to display xyz attribute in a column on the Products -> Associated Products section how?


texts:
I can't run setup:di:compiler, the error are:

Class Magento\Checkout\Model\DefaultConfigProvider\Interceptor generation error: The requested class did not g
  enerate properly, because the 'generated' directory permission is read-only

What i try:

1) Set 777 to generated folder (chmod -R 777 generated/* )
2) Create a user (named "permisos" with a group named "permisos"), assing it on apache 2 evn, restart apache, do sudo permissions to that user, and try the command again
3) run command, put again 777 permisions to generated, run command
4) Delete all caches with c:c and folders in cache at var.

As i see, wen i run command with ROOT user, the 777 permisions change and toe owner of generated/code change to root:root, if i run with "permisos" user i get same error, but users are permisos:permisos

Have any idea on how to solved it?

Extra info: Magento 2.3, Apache server, Google Cloud (all are for test pruposes)

Thanks.


texts: Run a php script everytime admin login happens from within a module

texts:
I have written a custom module.

I need to execute a local php script everytime an admin login occours, using code within the custom module.

How can I do that?


texts:
We've been using FPC for a while now and it seems to be doing the trick, we've just had this error start appearing with regards to the fpc log cron.

Next Zend_Db_Statement_Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5524522' for key 'PRIMARY', query was: INSERT INTO m_fpc_log

Has anyone had this issue before? Should I just truncate this table?


texts: Mandatory Helper class for module admin panel settings

texts:
Why its mandatory to define a helper class for adding configuration to the admin panel ?

i.e: I want to add some admin panel configuration to my module, So that when a user installed my module he/she can change some parameters via System >> Configuration >> MyTestModule.

So I need to create a system.xml and add my settings there, which is ok.

But why I need to create an empty helper class to make it work ?

<global>
        <helpers>
            <test>
                <class>Namespace_Test_Helper</class>
            </test>
        </helpers>
</global>

If I don't define the helper class it'll throw an error:

failed to open stream: No such file or directory  in /Applications/MAMP/htdocs/test/lib/Varien/Autoload.php on line 93

The useless class I'm talking about is in Data.php and is something like this:

class Namespace_Test_Helper_Data extends Mage_Core_Helper_Abstract
{

}

Isn't it some kind of stupid to create an empty class if I never using it ? What's the point ? Its completely useless to create an empty Helper class in my opinion. What I missed here ? Why its mandatory? Why it throws error when we don't create it. What's the use of helper class in here ?

Any help ?


texts: My Layout Handle carries through to all pages

texts:
I've created a Layout Handle, which is updated by an observer. When the conditions are true (so that the handle is applied) that handle remains regardless of whether it should pass the test again.

My code is as follows

class Karl_CustomHandles_Model_Observer
{
public function addCustomHandles($observer){

    //Need + Works
    $update = Mage::getSingleton("core/layout")->getUpdate();
    $currentCategory = Mage::registry("current_category");

    if (!$currentCategory instanceof Mage_Catalog_Model_Category) {
        return;
    }

    $defaultCategory = Mage::getModel('catalog/category')->load(2);
    $isChild = false;

    Mage::log($defaultCategory->getChildren() . " - excerpt end.");

    foreach(explode(",", $defaultCategory->getChildren()) as $child) {

        if ($child == $currentCategory->getId()) {
            $isChild = true;
        }

    }

    //Not works
    //Seems to apply the layouthandle to every page
    $allHandles = $update->getHandles();
    $update->resetHandles();

    if ($isChild == true) {
        foreach ($allHandles as $singleHandle){
            $update->addHandle($singleHandle);
        }
        $update->addHandle("child_is_true");
    }
}
}


texts: How to change scope from Global to Store view for Price Attributes (By Default)

texts: I want to change the scope of price attributes which is Global by default. .actually i need to change different price for same products in different store views. Is it possible to change scope from Global to Store view for Price Attributes.


texts: Limiting FREE coupon so it doesn't get passed around!

texts:
We have set up a promo code for a FREE item and FREE shipping that we send to winners of contests or for raffle drawings, etc.  We are concerned that if this promo code gets passed around, we won't be able to control the redemptions.  I have already set it at a max redemption, but is there some other way to ensure that it is only being used once per user - and then not passed on to a friend?

Current rules
- must create an account
- must only have single item in cart
- max redemption per user 1
- max redemption total = 25
- Expires 12/31/17


texts: How I will get lacks of dummy customers for Magento test site?

texts:
As I am working on "Improve Magento site Performance". I want to load lots of data in my test site.

Is there any place where I can get such big data to import into Magento system.


texts: Magento 2 - Add programmatically created attribute of custom module to category page after product name

texts: I have created a custom module, which creating a product attribute, now I need to display this attribute on category page,after the product name. How to do this? Thanks everyone!


texts:
I am new to Magento. I build a new site (currently is live in Joomla and the reason that I change that my products will be more than 500.000. now is at 350.000 in Joomla) I am in Magento in localhost. I have imported 35.000 products so far and I tried to index. The problem is that it stucks on index.

  info@LAPTOP-5SEJ1RGM c:\xampp\htdocs\gigaparts

 php bin/magento indexer:reindex

Design Config Grid index has been rebuilt successfully in 00:00:00

Customer Grid index has been rebuilt successfully in 00:00:00

This is the result after 9 hours and this is what I see on admin.

    Design Config Grid  Rebuild design config grid index    Update on Save  Ready Sep 5, 2019, 12:12:11 AM

    Customer Grid   Rebuild Customer grid index     Update on Save  Ready   Sep 5, 2019, 12:12:12 AM

    Category Products   Indexed category/products association   Update on Save  Ready   Sep 5, 2019, 1:58:30 AM

    Product Categories  Indexed product/categories association  Update on Save  Ready   Sep 5, 2019, 1:58:30 AM

    Catalog Rule Product    Indexed rule/product association    Update on Save  Ready   Sep 5, 2019, 8:57:07 AM

    Product EAV     Index
 product EAV   Update on Save  Ready   Sep 5, 2019, 8:57:20 AM

    Stock   Index stock     Update on Save  Ready   Sep 5, 2019, 8:57:24 AM

    Inventory   Inventory index (MSI)   Update on Save  Ready   Sep 5, 2019, 8:57:24 AM

    Catalog Product Rule    Indexed product/rule association    Update on Save  Ready   Sep 4, 2019, 2:02:49 PM

    Product Price   Index product prices    Update on Save  Processing  Sep 5, 2019, 8:57:24 AM

    Catalog Search  Rebuild Catalog product fulltext search index   Update on Save  Reindex required    Sep 4, 2019, 4:32:51 PM

Obviously something is wrong. Does it need 9 hours for 35.000? What if I reach 500.000?

Please help...


texts: Magento 2 How to create a slide-out panel containing product grid?

texts:
I have displayed my one custom product table in a grid format and there is a button "Add Featured Products".

How can I make the button to display a slide-out panel containing another grid?
It's just like the functionality in "Edit Product" -> "Configuration" -> "Add Products Manually"

Any help would be highly appreciated. Thank you.


texts: How to add Gmail goto action script to new shipment email?

texts:
I'm added a tracking link to New Shipment Email which will take customer to order tracking url. But I now have a requirement to utilize the Google's goto action for this purpose, so that customer could straight away goto the order tracking url without openeing the email.
How could I add the JavaScript

or Microdata

    <meta itemprop="streetAddress" content="24 Willie Mays Plaza"/>
    <meta itemprop="addressLocality" content="San Francisco"/>
    <meta itemprop="addressRegion" content="CA"/>
    <meta itemprop="addressCountry" content="US"/>
    <meta itemprop="postalCode" content="94107"/>

  <meta itemprop="expectedArrivalUntil" content="2013-03-12T12:00:00-08:00"/>

    <meta itemprop="name" content="FedEx"/>

    <meta itemprop="name" content="iPod Mini"/>

    <meta itemprop="orderNumber" content="176057"/>

      <meta itemprop="name" content="Bob Dole"/>

  <link itemprop="trackingUrl" href="http://www.my-site.in/ordertracker/"/>

I deployed it using google app script with my own email (sender and receiver), it works fine

note:
I am aware the sender email should be authenticated by SPF/DKIM
I use my own gmail Id as sender (configured it with XAMPP (localhost))
receiver is the same gmail id.


texts: After rewrite Magento\Customer\Model\AccountManagement giving me fatal error

texts:
I have successfully rewrite Magento\Customer\Model\AccountManagement using preference but after enabling paypal express its giving me error like below, on checkout and cart page.

<?xml version="1.0" encoding="UTF-8"?>
   <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
       <preference for="Magento\Customer\Model\AccountManagement" type="Vendor\Module\Model\AccountManagement" />
   </config>

  PHP Fatal error:  Uncaught TypeError: Argument 21 passed to
  Magento\Paypal\Model\Express\Checkout::__construct() must be an
  instance of Magento\Customer\Model\AccountManagement, instance of
  Vendor\Module\Model\AccountManagement given in

  /var/www/html/magento/vendor/magento/module-paypal/Model/Express/Checkout.php:300\nStack
  trace:\n#0 [internal function]: Magento\Paypal\Model\Express\Checkout->__construct(Object(Magento\Framework\Logger\Monolog),

  Object(Magento\Customer\Model\Url),
  Object(Magento\Tax\Helper\Data),
  Object(Magento\Checkout\Helper\Data),
  Object(Magento\Customer\Model\Session), Object(Magento\Framework\App\Cache\Type\Config),
  Object(Magento\Framework\Locale\Resolver),
  Object(Magento\Paypal\Model\Info), Object(Magento\Store\Model\StoreManager),
  Object(Magento\Framework\Url),
  Object(Magento\Paypal\Model\CartFactory),
  Object(Magento\Checkout\Model\Type\OnepageFactory),
  Object(Magento\Quote\Model\QuoteManagement), Object(Magento\Paypal\Model\Billing\AgreementFactory), Object(Magento\Paypal\Model\Api\Type\Fact in

  /var/www/html/magento/vendor/magento/module-paypal/Model/Express/Checkout.php
  on line 300, referer:

EDIT

My files Constructor

 public function __construct(
    CustomerFactory $customerFactory,
    ManagerInterface $eventManager,
    StoreManagerInterface $storeManager,
    Random $mathRandom,
    Validator $validator,
    ValidationResultsInterfaceFactory $validationResultsDataFactory,
    AddressRepositoryInterface $addressRepository,
    CustomerMetadataInterface $customerMetadataService,
    CustomerRegistry $customerRegistry,
    PsrLogger $logger,
    Encryptor $encryptor,
    ConfigShare $configShare,
    StringHelper $stringHelper,
    CustomerRepositoryInterface $customerRepository,
    ScopeConfigInterface $scopeConfig,
    TransportBuilder $transportBuilder,
    DataObjectProcessor $dataProcessor,
    Registry $registry,
    CustomerViewHelper $customerViewHelper,
    DateTime $dateTime,
    CustomerModel $customerModel,
    ObjectFactory $objectFactory,
    ExtensibleDataObjectConverter $extensibleDataObjectConverter
) {
    $this->customerFactory = $customerFactory;
    $this->eventManager = $eventManager;
    $this->storeManager = $storeManager;
    $this->mathRandom = $mathRandom;
    $this->validator = $validator;
    $this->validationResultsDataFactory = $validationResultsDataFactory;
    $this->addressRepository = $addressRepository;
    $this->customerMetadataService = $customerMetadataService;
    $this->customerRegistry = $customerRegistry;
    $this->logger = $logger;
    $this->encryptor = $encryptor;
    $this->configShare = $configShare;
    $this->stringHelper = $stringHelper;
    $this->customerRepository = $customerRepository;
    $this->scopeConfig = $scopeConfig;
    $this->transportBuilder = $transportBuilder;
    $this->dataProcessor = $dataProcessor;
    $this->registry = $registry;
    $this->customerViewHelper = $customerViewHelper;
    $this->dateTime = $dateTime;
    $this->customerModel = $customerModel;
    $this->objectFactory = $objectFactory;
    $this->extensibleDataObjectConverter = $extensibleDataObjectConverter;
    $this->objectManager = ObjectManager::getInstance();
}

please suggest me ASAP.


texts: Magento 2: How to make new billing address form shows up in popup in checkout just like new shipping address form?

texts: In magento 2 checkout page there will be a pop up form when we add new address instead of using current shipping address, but for billing address the new billing address form is below the dropdown, is there a way to make the new billing address form shows up in pop up just like new address form?


texts: Magento styles not loading for phtml file

texts:
i have created a custom module called Custom_AvailableOrders in which customers can add multiple items to cart, For this i had created a form for the customers to enter multiple products and when this form is submited its values is posted to indexcontroller.php and then i am filtering this products based on their stockavailablity and displaying them in display.phtml file as a new table.

$block = $this->getLayout()->createBlock('core/template')
    ->setData('products_notavailable',$Not_available_products)
    ->setData('products_available',$available_products)
    ->setData('quantity',$submit_qty)
    ->setTemplate('availableorders/display.phtml');
$this->renderLayout();
$this->getResponse()->setBody( $block->toHtml());


texts: addFieldToFilter to column from joined table in EAV Table

texts:
I am trying to filter columns from a joined table using addFieldTofilter. I have tried the code below but throws an exception.

$collection->getSelect()
    ->joinInner(array('customerphotos' => $collection->getTable('myphotos/customerphotos')),
    'e.entity_id = customerphotos.customer_id',
    array(
        'customerphotos.entity_id as entity_id',
        'customerphotos.customer_id',
    ));
$collection->addFieldToFilter('customerphotos_created_at', $condition);

I have tried $collection->addFilterToMap('customerphotos_created_at', 'customerphotos.created_at'); but it only works on non EAV table.


texts: Magento 2.3 On mass action how can I refresh listing grid using ajax (without page refresh)

texts:
As I see by default once magento2 mass action applied, default logic is to refresh the page. I would like to have grid refreshing without actual page reload but rather from js once massaction completed. I have successfully refershed grid once I add new item with my custom scripts using js, however I can't find way easy way to call js for massaction and as far as I see for massaction magento2 just doing redirect to the actual controller page there action happen.
Here's part of my listing grid for massdelete (working just fine but with page refresh)
            <action name="massdelete">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">massdelete</item>
                        <item name="label" xsi:type="string" translate="true">Delete</item>
                        <item name="url" xsi:type="url" path="electroidlab/connect_ui/massDelete"/>
                        <item name="confirm" xsi:type="array">
                            <item name="title" xsi:type="string" translate="true">Attention</item>
                            <item name="message" xsi:type="string" translate="true">Are you sure want to delete?</item>
                        </item>
                    </item>
                </argument>

Here's part of the controller with redirect. If I comment redirect part, then it will be just white page with controller path in url
                    public function execute()
    {
...
                    $collection = $this->filter
                                        ->getCollection(
                                            $this->collectionFactory->create()
                                        );
                    $catRecordDeleted = 0;
                    foreach ($collection as $category) {
                        $category->setId($category->getEntityId());
                        $category->delete();
                        ++$catRecordDeleted;
                    }
                    $this->messageManager->addSuccess(
                        __("A total of %1 record(s) have been deleted.", $catRecordDeleted)
                    );

                    return $this->resultRedirectFactory->create()->setPath(
                        'electroidlab/connect/edit',
                        [
                        'id'=>$this->getRequest()->getParam('id'),
                        '_secure' => $this->getRequest()->isSecure()
                        ]
                    );

            ...

    }

Is there a way to make default massaction without actual page refresh? Thanks!


texts:
I am trying to insert a dropdown next to minicart in M2.3 using the example in Magento 2.4 dev guide:
    <button type="button" class="action" data-trigger="trigger">

    </button>

        Here is our content

```
I want the dropdown to open on hover and also am concerned that it might impact the mini-cart which is right next to it.
How can I modify my code to accomplish this?

Thanks


texts:
I wonder if someone could help.
I have a fresh install of Magento 2.3.6. I am trying to implement google recaptcha v3. I have filled out the correct details on the recaptcha site, and also added my keys into Magento dashboard. However, I am getting the following error in console,
Refused to load https://www.google.com/recaptcha/api.js?onload=globalOnRecaptchaOnLoadCallback&render=explicit&hl=en-GB because it does not appear in the script-src directive of the Content Security Policy.
I have no idea at all how to solve this, I have Googled like a crazy man for 2 days now, so I turn to you good people for help.
TIA
Bob


texts: Magento 1.9 stuck after step 4 i.e shipping option

texts: I'm using Magento 1.9.3.9 version and onepage checkout stuck at shipping method's section i.e. option 4.


texts: Magento How to Export/Import all products from all store in a single fetch/dump?

texts:
How can be able to import products CSV to all store from admin back end in a single shot. Also Export all products of all store in a single shot in admin back end.

If any extension available or if not means how we can achieve this using coding?

Consider I have three stores in a sites like this

www.store1.example.com
www.store2.example.com
www.store3.example.com

So will admin user able to export all products in this three domain in to single csv also import it to at a time in all domain?


texts: Is there a default cookie or way of identifying guests, Magento 2?

texts:
I want to write a module that would work similarly to the guest checkout, I need to know the identity of guests.

Preferably I want to use the default way of doing this / accessing the value already there if that exists?


texts: How do i eliminate render blocking css and js in magento 2

texts: In google page-speed test it shows best opportunity to speed up is eliminate blocking resource. So is there anyone who can guide me to do this?


texts: Indexer Re-index goes to suspend in Magento 2?

texts:
I have 60 million products in my magento 2 store.
I have started indexer:reindex so it will struck on catalog_category_product it shows processing in this and on schedule status it shows suspended in this what's the issue in this ?

I have reset the indexer for all and for this data also but on again starting it shows suspended .
Any help is appriciated.


texts: Another prototype jquery conflict issue I think

texts:
I am working within the configurable options block on the product page and inserting some javascript right in the bottom of it. I wasn't having any issues but suddenly I'm getting an error in console: "Uncaught TypeError: Cannot read property 'config' of undefined ". I assume its a conflict error. I have been moving around the initialization of the prototype object and commenting things out to no avail. Can you see what is wrong with my javscript at the bottom?

<?php
$_product    = $this->getProduct();
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
?>

<?php if ($_product->isSaleable() && count($_attributes)):?>

    <?php foreach($_attributes as $_attribute){ ?>
                <div id="<?php echo $_attribute->getLabel() ?>Box" class="attributeBox">

*<?php echo $_attribute->getLabel() ?>

                    <dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>

                            <select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
                                <option><?php echo $this->__('Choose an Option...') ?></option>
                              </select>

    <?php }?>
    Show Vendors

<?php endif;?>


texts: {M1) Product collection sort order by views for Most Viewed Products

texts:
Does anyone know how to order by views (ascending/descending) a product collection when working with most viewed products?

I am using this following code:

$_productCollection = Mage::getResourceModel('reports/product_collection')
        ->addViewsCount($from, $to)
        ->addAttributeToFilter('entity_id', $productIds)
    ;

I am getting the most viewed product in a time range but always the collection is ordered descending mainly because method addViewsCount() orders collection views descending.

In file /app/code/core/Mage/Reports/Model/Product/Collection.php (line 375)

    ->order('views ' . self::SORT_ORDER_DESC)

I would like to order my collection by views, ascending and descending, but views is not an attribute to use in setOrder() method.


texts: Setting specific shipping rates for Canadian provinces

texts:
I am trying to set different shipping rates for different Canadian provinces (using Magento 1.6.0.0). I have tried uploading several different versions of the tablerates.csv file but so far none have worked.

I get no error messagees when I upload it, but afterwards, either the system reads a single Canada-wide rate and applies it to all orders, or it doesn't recognize any of the rates.

Here's (part of) the relevant section of my most recent tablerates.csv:

CAN,*,*,0.0000,18.0000
CAN,BC,*,0.0000,16.0000
CAN,BC,*,100.0000,12.0000
CAN,BC,*,200.0000,8.0000
CAN,BC,*,250.0000,4.0000
CAN,BC,*,300.0000,0.0000
CAN,AB,*,0.0000,16.0000
CAN,AB,*,100.0000,12.0000
CAN,AB,*,200.0000,8.0000
CAN,AB,*,250.0000,4.0000
CAN,AB,*,300.0000,0.0000
CAN,ON,*,0.0000,18.0000
CAN,ON,*,100.0000,14.0000
CAN,ON,*,200.0000,10.0000
CAN,ON,*,250.0000,6.0000
CAN,ON,*,300.0000,0.0000
CAN,QC,*,0.0000,18.0000
CAN,QC,*,100.0000,14.0000
CAN,QC,*,200.0000,10.0000
CAN,QC,*,250.0000,6.0000
CAN,QC,*,300.0000,0.0000

...ETC

Rates are set for all provinces and territories, not copied here because that would make for a very long list.
I've also tried this without the "default" Canada-wide rate line at the top -- when I use the example I pasted in, only the "default" Canada-wide rate is used; when I use this file with the "default" line removed, no rates are recognized.

Any advice would be greatly appreciated!!

Thank you.


texts:
I have to update website for some items and price.
I do it in the loop and fetch data from csv file.

I did it this way:

    $productCollection = Mage::getModel('catalog/product')->getCollection()
            ->addAttributeToFilter('name', $name)
            ->addAttributeToSelect('*')
            ->setPageSize(1)
            ->getFirstItem();
        $product->setWebsiteIds($websiteID);
        $product->setPrice($price);
        $product->setSku($sku);
        $product->getResource()->saveAttribute($product, "price");
        $product->getResource()->saveAttribute($product, "sku");
        $product->getResource()->saveAttribute($product, "website_id");

The price is updated but I have problem with website_id and sku. I got exception.

in SKU case:

  Column not found: 1054 Unknown column 'catalog_product_entity.value_id' in 'field list' in /var/www/html/cisco/lib/Zend/Db/Statement/Pdo.php on line 228

in Website case:

  Call to a member function getBackend() on boolean in
  /var/www/html/cisco/app/code/core/Mage/Eav/Model/Entity/Abstract.php
  on line 1548

If I use save() instead of saveAttribute() it works fine but because of the performance I must do it another way.

Could you tell me guys how could I fix it?


texts: How to send Mails from localhost using gmail and SMTP Pro Magento

texts:
I am using Magento version 1.9 on localhost. In project I want to send email on register. I have installed SMTP Pro. And configured my Gmail Account to send mail. But I am missing somewhere so I am failing to send mail.
Anybody know about it please let me know.

Using magento 1.9 on localhost.
Installed SMTP Pro from ASchroder.com
Using Gmail Account to SMTP.


texts: How am I suppose to access product purchase variables?

texts:
I need to send an mail to customer on purchase.I am customizing the Invoice template.I need to show the product that he/she purchased when the email is sent.
Whenever a customer purchases a product from my store, system send sends an invoice mail to customer.However I need to customize the the default email template such that it also displays the product image in Invoice.In order to access the product id or image of a product from specific purchase I probably need a variable(as magento has variables which can be accessed in HTML) of a product.


texts: /web/template-files cannot be copied to own theme in order to modify them

texts:
If you try to translate the strings in /vendor/magento/module-checkout/view/frontend/web/template/... you need to modify them in the core directly. I do not want that.

Copying them is not a solution, since magento ignores the HTML files in the corresponding /Magento_Checkout/web/template-Folder.

Edit: it seems that the question is a little unclear for some. We want to modify the HTML-files in /vendor/magento/module-checkout/view/frontend/web/template/. Therefore we duplicate them into our own theme. Those changes are non-functional. Why and how can we fix it?


texts: How to develop theme using twitter bootstrap in magento 2?

texts: Do we have any step by step instruction for creating twitter bootstrap theme for magento 2 or a scratch that was build for the latest release of magento 2. Can anyone suggest good method to start over.


texts:
How can i get last 3 added products of cart in magento.

I am using $session->getQuote()->getAllVisibleItems() for that.

Please Provide me if any other feasible solution


texts: How to hold an order right after the payment was received

texts:
We have orders that have to be approved by another party after ordering and receiving the payment.

So I want to set it onHold after payment and unHold it via an API call I have to implement as well.

This question is about the first part:

I tried to hook an $order->hold() into the event sales_order_place_after, but the order still switches to PROCESSING.

Also I saw that in the admin interface I cannot set an PROCESSING order to hold is not working:

I am getting

  No order(s) were put on hold.

EDIT1

Debugging: Setting to Processing is happening here:

\Magento\Sales\Model\Order\Payment\State\RegisterCaptureNotificationCommand::execute


texts:
I've seen this question a couple of times, but i wasn't able to solve my problem.
My checkout page loads fine but the "loader" gif doesn't go away and I can't interact. Usually refreshing the page solves the problem.
At first I thought the problem was with an extension i had installed, but even after disabling it nothing has changed.
I can see some error when the page is stuck, i'll attach them. I don't know JS, so i don't truly understand what they mean.


texts: How to add the reCaptcha for newsletter in magento 2?

texts: I am trying to add reCaptcha for the newsletter in magento 2.1. Is there any way to add it?


texts: How can I know where a specific element of my website is at?

texts: So I bought a template for Magento store and now there is a menu which I want to edit. Is there a way that I can find out in which file is a code for that menu so I can edit it?


texts: Magento2.3.3: How do I share product images between products?

texts:
Making configurations is duplicating images 8 times. I would like to share one image across the configuration products.

I read I should look here: pixelpaul.net/magento-share-images-on-more-products
But the link is broken.

I can't believe a simple product with 11 color photos, 4 different sizes, and one other option is going to take up 500MB for each product.


texts: how to fix Notice: Undefined offset: 0 in magento 2?

texts:
Exception #0 (Exception): Notice: Undefined offset: 0 in /var/www/clients/client0/web2/web/app/code/Mirasvit/Search/Block/Result.php

 * @return IndexInterface
 */
public function getFirstMatchedIndex()
{
    foreach ($this->getIndices() as $index) {
        if (($index->getData('store_id') == false
            || $index->getData('store_id') == $this->getCurrentStore()->getId())
        ) {
            return $index;
        }
    }

    return $this->getIndices()[0];
}


texts: Magento 2 - What's the purpose of Formkey Validator?

texts: I want to know what does the formkey validator do : Magento\Framework\Data\Form\FormKey\Validator


texts:
I have created an observer but it does not seem to ever fire - I need to replicate sales_order_place_after from an old Magento 1.9.X module into the one I am refactoring for Magento2

So far I have \MyVendor\Order\etc\events.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="checkout_onepage_controller_success_action">
        <observer name="MyObserver" instance="MyVendor\Order\Observer\OrderObserver" />
    </event>
</config>

And also OrderObserver.php which is:

<?php

namespace MyVendor\Order\Observer;

use \Magento\Framework\Event\ObserverInterface;
use \Psr\Log\LoggerInterface;

class OrderObserver implements ObserverInterface
{
    protected $logger;

    public function __construct(LoggerInterface $logger)
    {
        $this->logger = $logger;
        parent::_construct();
        //Observer initialization code...
        //You can use dependency injection to get any class this observer may need.
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        //Observer execution code...
        $this->logger->debug('Order Observer');
    }
}

I've tried moving the events.xml into a sub folder of etc for frontend, but I seem unable to reach my debug log. What have I done that needs amending to get this observer to fire?


texts: Magento 2 adminhtml - custom block gives blank page

texts:
I am creating a backend magento 2 module and when I specify in the layout file a custom block, it will show a blank page with this being added to the system.log

  [2016-10-19 07:35:35] main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_32fdcd7fcff058e6f791ea5b6050bd6b5 and handles default, widget_selectwidget_index: Please correct the XML data and try again.  [] []
  [2016-10-19 07:35:35] main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_3a2e4822a98337283e39f7b60acf85ec9 and handles empty: Please correct the XML data and try again.  [] []
  [2016-10-19 07:35:35] main.CRITICAL: Broken reference: the 'logo' element cannot be added as child to 'header', because the latter doesn't exist [] []
  [2016-10-19 07:35:35] main.CRITICAL: Broken reference: the 'global.search' element cannot be added as child to 'header', because the latter doesn't exist [] []
  [2016-10-19 07:35:35] main.CRITICAL: Broken reference: the 'user' element cannot be added as child to 'header', because the latter doesn't exist [] []

.... etc etc etc ....

  [2016-10-19 07:35:35] main.CRITICAL: Broken reference: the 'header.inner.right' tries to reorder itself towards 'header.inner.left', but their parents are different: 'header' and '' respectively. [] []
  [2016-10-19 07:35:35] main.CRITICAL: Broken reference: the 'global.search' tries to reorder itself towards 'notification.messages', but their parents are different: 'header.inner.right' and '' respectively. [] []
  [2016-10-19 07:35:35] main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_36f1b068ec7ccf4878f9284dd1137afd1 and handles catalog_product_prices: Please correct the XML data and try again.  [] []

If I specify my block class as class="Magento\Backend\Block\Template" then it will show the page with the correct template which leads me to think that there is no problem with the template or the rest of the module.

Here is the block (app/code/Vendor/Widget/Block/Adminhtml/SelectWidgetBlock.php) :

namespace Vendor\Widget\Block\Adminhtml;
use Magento\Backend\Block\Template;

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

    public function greet()
    {
        return 'Hello world';
    }
}

This is the layout file (app/code/Vendor/Widget/view/adminhtml/layout/widget_selectwidget_index.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" layout="empty">

    <title>
        Widget
    </title>

    <referenceContainer name="content">
        <block class="Vendor\Widget\Block\Adminhtml\SelectWidgetBlock" name="vendor_widget.select" template="Vendor_Widget::selectwidget.phtml"/>
    </referenceContainer>

Now the phtml (app/code/Vendor/Widget/view/adminhtml/templates/selectwidget.phtml) :

Here is the phtml file

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

Here is the controller just in case (app/code/Vendor/Widget/Controller/Adminhtml/SelectWidget/Index.php) :

namespace Vendor\Widget\Controller\Adminhtml\SelectWidget;

class Index extends \Magento\Backend\App\Action
{
    protected $resultPageFactory;

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

    public function execute()
    {
        return  $resultPage = $this->resultPageFactory->create();
    }
}

If you have any idea, please !


texts: collect phrases and lang pack command line different from official doc - Magento 2.0.1

texts:
I use magento version 2.0.1, I am trying to add new language package, I have followed the instruction from official doc, that commands are not working
command syntax mentioned in official doc
magento i18n:collect-phrases -o "/var/www/html/magento2/xx_YY.csv" -m

magento i18n:pack [-m|--mode={merge|replace}] [-d|--allow-duplicates] <source> <locale>

example mentioned in official doc
magento i18n:collect-phrases -o "/var/www/html/magento2/xx_YY.csv" -m

magento i18n:pack /var/www/html/magento2/xx_YY.csv -d xx_YY

when I run  this command I got error Not enough arguments. and give suggestion like
i18n:collect-phrases [-o|--output="..."] [-m|--magento] directory

i18n:pack [-m|--mode="..."] [-d|--allow-duplicates] source pack locale

I have tried this
Collect Phrases
bin/magento i18n:collect-phrases -o "/var/www/html/magento2/app/i18n/test/te_te/te_TE.csv" -m "/var/www/html/magento2/"

I got success message like this
Dictionary successfully processed.

Language Pack
bin/magento i18n:pack -d app/i18n/test/te_te/te_TE.csv te_te te_TE

I got success message like this
Successfully saved te_TE language package.

but my new language not listed in new store view in admin so I am get confused whether the command is correct or not.
pub/static/* folder contains only en_US
Thanks.


texts: Add Newsletter Modal popup to CMS home page

texts:
I made a popup like this

<?php
    $newsletterHtml = $block->getChildHtml('subscribe');
?>

JOIN THE PARTY

GET 15% OFF YOUR FIRST ORDER*

Subscribers only discounts, first look at new products, and cutting-edges tips

            <?php echo $newsletterHtml; ?>

*Promo code will be emailed to the address you enter, New subscribers only

        <img src='<?php echo $this->getUrl('pub/media/').'cms/image-email.gif'; ?>' />

Now I want to add this on home page. I didnt have idea how can I add it . using block ? then I dont know how to assign this code to block .


texts: How to allow increments in decimals in magento

texts: I am building a site for a client who sells fabric. She'd like to allow her customers to order in decimals. Does anyone know if this is possible?


texts: Add new action to existing module, routing

texts:
I am trying to add a new action to the existing module Magento_Customer.

My module has the following namespace Custom_AccountReferral

I need to add a new action customer/account/referral/

I have create a custom module and it works.

Create a new controller inside my module directory AccountReferral/Controller/Account the file with name Referral.php
Create the routes.xml file inside etc/frontend/ directory

With the following content

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

Also tried to add the following line to the di.xml file

preference for="Magento\Customer\Controller\Account\Referral" type="Custom\AccountReferral\Controller\Account\Referral"/>

But unfortunately it still gives me the 404 page

Whoops, our bad...

Please suggest how to add a new action to existing module routes.

Thanks.

UPDATE

The content of the Referral file

namespace Custom\AccountReferral\Controller\Account;
class Referral extends \Magento\Customer\Controller\AbstractAccount {

    protected $customerRepository;

    protected $dataObjectHelper;
    protected $session;

    protected $resultPageFactory;
    public function __construct(
        Context $context,
        Session $customerSession,
        PageFactory $resultPageFactory,
        CustomerRepositoryInterface $customerRepository,
        DataObjectHelper $dataObjectHelper
    ) {
        $this->session            = $customerSession;
        $this->resultPageFactory  = $resultPageFactory;
        $this->customerRepository = $customerRepository;
        $this->dataObjectHelper   = $dataObjectHelper;
        parent::__construct( $context );
    }

    public function execute() {
        $resultPage = $this->resultPageFactory->create();

        $block = $resultPage->getLayout()->getBlock( 'customer_account_dashboard_referral_edit' );
        if ( $block ) {
            $block->setRefererUrl( $this->_redirect->getRefererUrl() );
        }

        $data               = $this->session->getCustomerFormData( true );
        $customerId         = $this->session->getCustomerId();
        $customerDataObject = $this->customerRepository->getById( $customerId );
        if ( ! empty( $data ) ) {
            $this->dataObjectHelper->populateWithArray(
                $customerDataObject,
                $data,
                \Magento\Customer\Api\Data\CustomerInterface::class
            );
        }
        $resultPage->getConfig()->getTitle()->set( __( 'Referral Settings' ) );

        return $resultPage;
    }
}

This is just an example, I haven't added any logic yet, because it is not accessible.


texts:
I am currently trying to install Magento 2 on my hosting package (shared), and have some trouble here with Chmod.
On Magento Webpage it is being said, that you have to change Chmod permissions pre-installation:
https://devdocs.magento.com/guides/v2.4/install-gde/prereq/file-system-perms.html
So, I log in via PuTTy, use the user-name I was given by hosting provider (+ password) and try to run the commands, but what I get are two issues:
a) Algthough I am in the root folder of my website, I get the message:
Folder (...) not found - Why?
I installed and unzipped all into the root folder, so it must be there.
Also when I search for it via Is command, I get something like: No data
b) Still he runs the commands;
what I then get is the message: Not Owner
And this is strange.
I have used the main username given to me, But I am still not the owner of the content?!
Any clues?
Thanks very much.


texts:
I need to get order item inside the order loop , how to achieve this,
here is my code

      $orderCollection = Mage::getModel("sales/order")->getCollection();

    foreach ($orderCollection as $order) {
        $orders['orders'][] = array(
            'id'            => $order->getIncrementId(),
            'store'         => 'magento',
            'status'        => $order->getStatus(),
            'name'          => $order->getCustomerName(),
            'email'         => $order->getCustomerEmail(),
            'telephone'     => $order->getShippingAddress()->getTelephone(),
            'street'        => $order->getShippingAddress()->getStreet(),
            'pincode'       => $order->getShippingAddress()->getPostcode(),
            'city'          => $order->getShippingAddress()->getCity(),
            'weight'        => $order->getWeight(),

        );

     foreach ($order->getAllItems() as $item) {
        $orders['items'][] = array(
            'id'            => $order->getIncrementId(),
            'name'          => $item->getName(),
            'sku'           => $item->getSku(),
            'Price'         => $item->getPrice(),
            'Ordered Qty'   => $item->getQtyOrdered(),

        );

     }

    }
    return $orders;
}

I need to combine these two in a single array with order and order item displayed in the same array.


texts: I am going to host 5 magento websites which include about 1000 products max each, about 25k visits per month each(max). I don't want to buy a server and waste its resources, either struggle so looking for suggestion on whats the best number of cores/RAM for a package like this?


texts: Magento 1.6 and PayPal standard triggers PayPal error 3005

texts:
I've been tasked with looking at a Magento CE 1.6 site that has PayPal standard Payments as the payment method.  When a customer goes to pay for an order the PayPal redirect works but the customer gets an error page on PayPal with error code 3005 and a message saying that PayPal is experiencing temporary difficulties which means the order gets left in 'Pending Payment' in Magento.  I've pointed a local install of the site at the PayPal sandbox and orders go through fine.  I also do not have access to the live PayPal account.

Now, I'm presuming that PayPal isn't actually having any issues as such so if anyone can help as to what may be happening and how to fix it that would be great.


texts: How to add custom visibility option in visibility attribute in products in magento

texts:
I want to have custom visibility option in visibility attribute in products in magento. Can anyone please tell how can I do this?

I want to add "Pending" visibility to products - Those products will not be visible in site, regardless of simple type or configurable or bundle or whatever.

I referred these posts but they do not suggest/not related with what I actually want :-

  Custom visibility on products
  Options values of attribute "visibility"
  How to get Product url and show in detail page even it is non visibility mode?


texts: In the product listings of our site, the dropdown text for customers has a typo - it reads, "Select options below for price and avilability."  So the word "avilability" needs to be edited to "availability."  Not sure how to do that.


texts:
I'm using Magento 2.2.2 & Redis, I have others language store in my Magento.

I edited the app/fronted/(theme) .phtml file and then ran php bin/magento setup:static-content:deploy or php bin/magento -f setup:static-content:deploy en_US, but no update.

I already deleted it, but that didn't work either.

rm -rf var/*
rm -rf pub/static/frontend
rm -rf pub/static/_cache
rm -rf pub/static/adminhtml
rm -rf pub/static/deployed_version.txt

How can I update it?


texts:
Why only flatrate_flatrate in array shipping Method?

I set the customer and address is successfully.

Array
(
    [0] => Array
        (
            [carrier] => flatrate
            [carrier_title] => Flat Rate
            [code] => flatrate_flatrate
            [method] => flatrate
            [method_description] =>
            [price] => 5.0000
            [error_message] =>
            [method_title] => Fixed
            [carrierName] => Flat Rate
        )

)

Shipping method: flatrate_flatrate

  Fatal error:  Uncaught SoapFault exception: [1062] Shipping
  method is not available in /var/www/html/market/mboh.php:118
      Stack trace:
      #0 /var/www/html/market/mboh.php(118): SoapClient->__call('call', Array)
      #1 /var/www/html/market/mboh.php(118): SoapClient->call('65d0a95484ac4eb...', 'cart_shipping.m...', Array)
      #2 {main}
        thrown in /var/www/html/market/mboh.php on line 118


texts:
I have admin form in which I have image upload option,
everything is working fine, but I am not able to figure out, how to display preview of uploaded image.

It will be great help if someone can help me with this.
thanks


texts: How to apply the schedule for the themes?

texts:
I'm new for magento 2.

Anyone let me know how can I apply the schedule for the different themes.


texts: What I must do to activate my site by Magento

texts: When I go to my site it shows "Sorry, your Website is in work". My question is how I can do that this is not there and all can see my site.


texts: I am trying to show new_grid.phtml info under media.phtml or in other words i want to show qty. and dropdown e.g attributes under the image of the product. How should i do that? I am looking at view.phtml and i am lost. any help?


texts: Porto theme product page is not working on php 7.2 / Magento 2

texts:
Hello I get the following error on the products pages with PHP 7.2 , Magento 2.33

Exception #0 (Exception): Warning: count(): Parameter must be an array or an object that implements Countable in /chroot/home/ae393a83/xxxxxxxx.com/app/code/Smartwave/Porto/Helper/Customtabs.php on line 74

Thanks
Martin


texts: How to Disable Inventory Management In Magento 2.x

texts:
It may be necessary to disable Inventory Management modules to:

Speed up the upgrade process for merchants migrating from 2.0.x, 2.1.x, or 2.2.x to 2.3.x.
Use custom or third party inventory and order management modules.
Use Magento Order Management for inventory and order management. The current Order Management connector does not support Inventory Management interfaces.

I am attempting to follow the official Magento instructions to disable inventory management modules. I have disabled modules from the command line previously and I am comfortable doing that. However, the instructions are not clear to me. They say,

"To disable Inventory Management, see the instructions for Enable or disable modules."

I understand the generic steps. I need the specific steps. Can I use the inventory-composer-metapackage to uninstall? If so, a specific example would help.

Even though it seemed wrong, I contemplated this:

bin/magento module:disable inventory-composer-metapackage

But I checked first and that is clearly wrong because:

bin/magento module:status inventory-composer-metapackage
Module does not exist

I'm running Magento 2.3.3 on CentOS 7.


texts: When I am trying to login in Magento project in my local server downloaded from live server, then I am getting 404 error on the Dashboard page.Its working fine on Live server.


texts: How to add new field to invoice and save its value from Rest API call and get its value in API Call

texts:
I want to add new field to invoice table, I have created custom module for that and added new field to invoice table.
Now I want to save the value in this field using Rest API, when I create invoice using API, how to pass the value for this field in API call and what changes should be done to save its value.
I also want to load the value of this field in API response means when I call API to load the invoice data, this field should be there in the response data.


texts: How to send email after registration in external script?

texts:
I wrote external script to add Customer in magento 1.9

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
include_once '../app/Mage.php';
umask(0);
Mage::app();
Mage::setIsDeveloperMode(true);
Mage::getSingleton('core/session', array('name' => 'frontend'));
$customer = Mage::getModel('customer/customer');
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$customer->loadByEmail($_GET['email']);
if($customer->getId()) {
  $res = array("EX");
  echo json_encode($res, JSON_PRETTY_PRINT);
} else {send
    $websiteId = Mage::app()->getWebsite()->getId();
    $store = Mage::app()->getStore();
    $customer = Mage::getModel("customer/customer");
    $customer   ->setWebsiteId($websiteId)
                ->setStore($store)
                ->setFirstname($_GET['firstname'])
                ->setLastname($_GET['lastname'])
                ->setEmail($_GET['email'])
                ->setPassword($_GET['password']);
    try{
        $customer->save();
        $customer->setConfirmation(null);
        $customer->save();
        //Make a "login" of new customer
        Mage::getSingleton('customer/session')->loginById($customer->getId());
        echo json_encode(array("Oke"), JSON_PRETTY_PRINT);
    }
    catch (Exception $e) {
        Zend_Debug::dump($e->getMessage());
    }
}
?>

and was successful in inserting customer data.
How to send email after registering customer with external script?


texts: Getting all orders from the database which have at least one product with a certain attribute set?

texts:
Is there a way to get all orders from the database which have items with attribute set "X"? I know there is sales_flat_order_item and this might be a good point to start, but somehow I am stuck here.

Thanks for helping!


texts:
I'm attempting to patch SUPEE 6285v2. I have successfully applied the other patches prior to it and 6285v1. I reverted v1 and tried to apply v2, and received this error.

can't find file to patch at input line 907
The text leading up to this was:
--------------------------
|diff --git app/design/frontend/rwd/default/template/checkout/cart.phtml app/design/frontend/rwd/default/template/checkout/cart.phtml
|index 7bceece..88753c3 100644
|--- app/design/frontend/rwd/default/template/checkout/cart.phtml
|+++ app/design/frontend/rwd/default/template/checkout/cart.phtml`

This is a custom template and there is no cart.phtml in that directory. I went ahead and copied the cart.phtml from the modern template to that directory, then I received this error:

Hunk #1 FAILED at 115.
1 out of 1 hunk FAILED -- saving rejects to file app/design/frontend/rwd/default/template/checkout/cart.phtml.rej

I checked and it did not save a reject file. Unsure of how to proceed at this point. I'm running magento version 1.9.0.1.


texts: How to save custom attribute in quote_item using api / rest

texts:
I'm creating a module where I add a new field in the quote_item and order_item table (not necessary in the product).
The columns were created, and when I look at the items in the cart, I fear the value of the new field correctly.
Which event should I use to add the product to the cart using the api / rest in Post  /V1/carts/{quoteId}/items?
{
  "cartItem": {
    "sku": "0281",
    "qty": 1,
    "quote_id": "20897",
    "extension_attributes": {
      "ordem_servico": "33333333"
    }
  }
}

I'm using:
events.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_quote_load_after">
        <observer name="photocolor_customos_sales_quote_load_after" instance="Photocolor\CustomOs\Observer\ProductInterface" />
    </event>
</config>

extension_attributes.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
  <extension_attributes for="Magento\Quote\Api\Data\CartItemInterface">
      <attribute code="ordem_servico" type="string" />
  </extension_attributes>
</config>

ProductInterface.php (retrieve all attributes of the item in the cart)
<?php

namespace Photocolor\CustomOs\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Quote\Api\Data\CartItemExtensionFactory;

class ProductInterface implements ObserverInterface
{
    /**
     * @var ObjectManagerInterface
     */
    protected $_objectManager;

    /**
     * @var CartItemExtensionFactory
     */
    protected $extensionFactory;

    /**
     * @param \Magento\Framework\ObjectManagerInterface $objectManager
     * @param CartItemExtensionFactory $extensionFactory
     */
    public function __construct(
        \Magento\Framework\ObjectManagerInterface $objectManager,
        CartItemExtensionFactory $extensionFactory
    ) {
        $this->_objectManager = $objectManager;
        $this->extensionFactory = $extensionFactory;
    }

    public function execute(\Magento\Framework\Event\Observer $observer, string $ordemServico = NULL)
    {
        $quote = $observer->getQuote();

        foreach ($quote->getAllItems() as $quoteItem) {

            $itemExtAttr = $quoteItem->getExtensionAttributes();

            if ($itemExtAttr === null) {
                $itemExtAttr = $this->extensionFactory->create();
            }
            $os = $quoteItem->getOrdemServico();

            $itemExtAttr->setOrdemServico($os);
            $quoteItem->setExtensionAttributes($itemExtAttr);
        }
        return;
    }
}

I am starting now with Magento and I am confused with plugin / events. I created the Plugin and get the value passed by the custom attribute api, but I didn't understand how to save it in the quote_item table. Any idea?
<?php

namespace Photocolor\CustomOs\Plugin;

use Psr\Log\LoggerInterface;

class QuoteItemRepository
{

    public function beforeSave(
        \Magento\Quote\Model\Quote\Item\Repository\Interceptor $subject, $cartItem
    )
    {
        $writer = new \Zend\Log\Writer\Stream(BP.'/var/log/ordem_servico.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);

        $extensionAttr = $cartItem->getExtensionAttributes();

        if($extensionAttr !== null) {

            $ordemServico = $extensionAttr->getOrdemServico();

            if($ordemServico !== null) {
                $logger->info("ordem_servico -> " . $ordemServico);
            }
        }
    }
}


texts: Currently only LOGIN AND Checkout pages are HTTPS, others are HTTP. How to convert all website pages to open in HTTPS?