texts: Upload HTTP Error in admin on file upload (Nginx)

texts:
I am getting the following error on uploading files in Magento admin.

Upload HTTP Error

I have added the following to my php.ini

upload_max_filesize = 200M
post_max_size = 200M
memory_limit = 512M

I have also added this to my nginx config

client_max_body_size 200m;

I have also toggled between https and http


texts: Magento2 API Get email of guest customers in carts endpoint

texts:
How can I get the email of a cart created by an guest customer?

In the response for guest carts I get a null in the property customer.email and also a null in the property billing_address.email but the guest user has completed the email in checkout section

Thanks


texts: Issue with wildcard preceding value converting to URL encoding

texts:
When using a wildcard at the beginning of a search query, it does not seem to work and instead tries to convert the percentage sign to a url entity when the value is an int.

Any ideas on causes/solutions?

This :

https://example.com/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=sku&searchCriteria[filter_groups][0][filters][0][value]=%102074%&searchCriteria[filter_groups][0][filters][0][condition_type]=like

{
"items": [],
"search_criteria": {
    "filter_groups": [
        {
            "filters": [
                {
                    "field": "sku",
                    "value": "\u00102074%",
                    "condition_type": "like"
                }
            ]
        }
    ]
},
"total_count": 0


texts: What is frontend when creating a product attribute

texts:
I want to know what is the use of frontend when creating a product attribute using installData or updateData.

public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
    $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
    $eavSetup->addAttribute(
        \Magento\Catalog\Model\Product::ENTITY,
        'sample_attribute',
        [
            'type' => 'int',
            'backend' => '',
            'frontend' => '',
            'label' => 'Sample Atrribute',
            'input' => '',
            'class' => '',
            'source' => '',
            'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
            'visible' => true,
            'required' => true,
            'user_defined' => false,
            'default' => '',
            'searchable' => false,
            'filterable' => false,
            'comparable' => false,
            'visible_on_front' => false,
            'used_in_product_listing' => true,
            'unique' => false,
            'apply_to' => ''
        ]
    );


texts: magento admin login starnge issue , twice login to login

texts:
i have strange issue with my admin login , i have to login twice then i am able to login , for first time it says password error next time i am able to login ,

1: url is same like abcd.com/admin
2: what could be issue how to fix it please guide me way to fix it
3: i had checked some previous answer my both url are same means non-www
4: magento version 1.9.0.1

Thanks


texts: magento installation - cannot login to backend

texts:
This is my first Magento Installation -- and after dragging all my files from my Magento CMS install-download zip file > uncompressing > and then uploading via FTP to my server, I was sure it completed successfully as the Magento install instructions resolved in my browser. After completing instructions, I thought I was complete as I was able to login and view the 'front-end' of the eCommerce Magento Installation, but when trying to log into the back-end, I was not able to do it.

www.sample.com/index.php/admin/index/login/

I saw the 'login page' via above URL and but nothing would let me 'login' - nor would any credential reset. I tried going to the mySQL DB 'phpmyadmin' and locating the table.. except the 'table' did not exist. Why would the table not be generated with my Magento Installation?

Magento Version 1.9.2

Any advice?


texts: Magento2.3.5 home page & admin panel is running very slow after doing cache: enable as well

texts: I have installed the Magento2.3.5 successfully with PHP 7.3 version. I am running magento on windows 10 laptop. When I open homepage & admin link it takes huge time to open. It keeps loading. Which is frustrating. Please suggest on this. I have done cache:enable from Magento too directory still it is slow. I have attached screenshots of homepage & admin pages.


texts: Is it possible updating our system which is now on 2.2.6 straight to version 2.4? Or is it advised / needed to upgrade in steps? Any recommended recent howto on this subject?


texts:
I want to get live rates of all shipping methods of TNT Lebanon between origin and delivery address.
Like Road Express, Overnight Express, Overnight PAYU Satchel, 9:00 Express, 10:00 Express, etc.

I am using below code.

$url = 'http://app.thenetmanager.net/pos/POSWS.asmx?op=CalculatePOSOrderPrice';

$xmlRequest = "<? xml version = "1.0" encoding = "utf-8"?>
<soap12:Envelope xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>
        <CalculatePOSOrderPrice xmlns="http://posws.org/">
            <userIdentifier>69741684-B9DA-404D-833D-1DE02F11154E</userIdentifier>
            <serviceID>70</serviceID>
            <shipperCity>LEBANON</shipperCity>
            <consigneeCountry>TRIPOLI</consigneeCountry>
            <consigneeCity>opentext</consigneeCity>
            <isDocument>false</isDocument>
            <weight>0.6</weight>
            <specialDelivery>-1</specialDelivery>
            <goodsValue>10.0</goodsValue>
            <goodsDescription>description</goodsDescription>
            <addPacking>false</addPacking>
            <addFumigation>false</addFumigation>
            <addPermit>false</addPermit>
            <addInsurance>false</addInsurance>
        </CalculatePOSOrderPrice>
    </soap12:Body>
</soap12:Envelope>";

$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/xml'));
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlRequest);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$xmlResponse = curl_exec($ch);
print_r($xmlResponse);

But gives me an empty message.


texts:
I installed magento2 on openserver
created my custom theme
developer mode is enabled
content deployed
When i try to load home page browser showed errors

in pub/static i have only wNumb.min.js and other files and server cant load them.

How can i fix it ?


texts: Uncaught ReferenceError: tinyMceWysiwygSetup is not defined

texts:
protected function _prepareLayout()
        {
            $return = parent::_prepareLayout();
            if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
                $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
            }
            return $return;
        }

I have a custom module with an admin grid. I try to use TinyMCE but it gives an error in console as described in this title. I use the following code

$fieldset->addField("preface", "editor", array(
                        "label" => Mage::helper("knowledgebase")->__("Preface"),
                        'style' => 'width:98%; height:300px;',
                        'wysiwyg' => true,
                        'config'    => Mage::getSingleton('cms/wysiwyg_config')->getConfig(),
                        "name" => "preface",
                        ));

protected function _prepareLayout()
        {
            $return = parent::_prepareLayout();
            if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
                $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
            }
            return $return;
        }


texts:
I want to load a specific block in the transactional email only when the order is shipped. I want to load the block, buy using the following code:

{{block type='core/template' area='frontend' template='email/order/invoiceemailhead.phtml' order=$order}}

I already use that template to check the paymentmethod, but using;

<?php if($this->getOrder()->getPayment()->getMethodInstance()->getCode()=='cashondelivery'):?>

How can I also check if a order is shipped? What code do I need for this?


texts:
I installed LAMP (php 7.2) on my VPS server.

When I try to install magento (debian 9) I get error extension .intl

I run command line below:

sudo apt-get install apt-transport-https lsb-release ca-certificates
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt-get update
sudo apt-get install php7.2-intl

Unfortunately, I still have this error. Does anyone know how to solve this? It gives Vote


texts: Magento 2: Hide success message after 5 seconds in mobile screen

texts: How to hide success messages after 5 seconds in Magento 2? I want to hide this message shown in the below picture after 5 seconds. it is coming from message.phtml file.


texts: When, in a custom module, you add a subitem to the top menu in the back-end, is it possible to insert in image alongside the title?

texts:
I'm trying to add in an image next to a dropdown item, alongside the title. Is this possible? I've seen it being done with items in the sidebar under System > Configuration before, but never in the top menu. Being able to do something like this would be great, for example:

<menu>
    <system>
        <children>
            <example>
                <title><img src="foo.png" />Example</title>
                <action>adminhtml/example/index</action>
            </example>
        </children>
    </system>
</menu>

Obviously that's not going to work, so any pointers would be highly appreciated. Thanks in advance!


texts: Magento 1.9.2.2 patched by SUPEE 7405 - XSS attack still possible

texts:
I installed the security patch SUPEE 7405 by shell.
The output said that the patch was successfully installed:

Checking if patch can be applied/reverted successfully...
Patch was applied/reverted successfully.

The command grep '|' app/etc/applied.patches.list shows me that the patch is installed: 2016-01-26 12:42:44 UTC | SUPEE-7405-CE-1-9-2-2 | CE_1.9.2.2 | v1 |

I also checked some PHP files that had to be patched and they were.

The cache were cleared after installing.

The problem is that the XSS attack is still possible.

magereport.com said that the patch is not installed.

Any ideas?


texts: How to Enable and Disable Custom Magento Extension?

texts: How to Enable and Disable Custom Magento Extension ?


texts: Magento 2: Authorize.Net: Transaction has been declined. Please try again later

texts:
I'm on Magento 2.3.2, Using Authorize.Net [sandbox] as my payment method, I'm unable to place order because I'm getting an error Transaction has been declined. Please try again later., I see my payment.log i got this.

[2019-10-03 15:32:01] main.DEBUG: array (
  'request' =>
  array (
    'payload_type' => 'createTransactionRequest',
    'merchantAuthentication' =>
    array (
      'name' => '8RxFRSXd70A',
      'transactionKey' => '4469UffsC425Oc5A',
    ),
    'transactionRequest' =>
    array (
      'transactionType' => 'authOnlyTransaction',
      'amount' => '34.00',
      'payment' =>
      array (
        'opaqueData' =>
        array (
          'dataDescriptor' => NULL,
          'dataValue' => NULL,
        ),
      ),
      'solution' =>
      array (
        'id' => 'HHH102003',
      ),
      'order' =>
      array (
        'invoiceNumber' => '000002288',
      ),
      'poNumber' => NULL,
      'customer' =>
      array (
        'id' => '532',
        'email' => 'qamar@noname.com',
      ),
      'billTo' =>
      array (
        'firstName' => 'NoName',
        'lastName' => 'Test',
        'company' => 'NoName',
        'address' => '62 Chelsea Piers   ',
        'city' => 'New York',
        'state' => 'NY',
        'zip' => '10011',
        'country' => 'US',
      ),
      'shipTo' =>
      array (
        'firstName' => 'NoName',
        'lastName' => 'Test',
        'company' => 'NoName',
        'address' => '62 Chelsea Piers   ',
        'city' => 'New York',
        'state' => 'NY',
        'zip' => '10011',
        'country' => 'US',
      ),
      'customerIP' => '127.43.456.21',
      'userFields' =>
      array (
        'userField' =>
        array (
          0 =>
          array (
            'name' => 'transactionType',
            'value' => 'authOnlyTransaction',
          ),
        ),
      ),
    ),
  ),
  'response' => '{"transactionResponse":{"SupplementalDataQualificationIndicator":0},"messages":{"resultCode":"Error","message":[{"code":"E00076","text":"dataDescriptor contains invalid value."},{"code":"E00076","text":"dataValue contains invalid value."}]}}',
) [] []

Getting NULL value

      'payment' =>
      array (
        'opaqueData' =>
        array (
          'dataDescriptor' => NULL,
          'dataValue' => NULL,
        ),
      ),

Response

'response' =>
    '{"transactionResponse":{"SupplementalDataQualificationIndicator":0},
    "messages":{"resultCode":"Error","message":[
    {"code":"E00076","text":"dataDescriptor contains invalid value."},
    {"code":"E00076","text":"dataValue contains invalid value."}]}}',

Also i'm getting these in my Network


texts: Magento 2 Community Edition Installation Issue - General error: 1025 Error on rename (errno: 13 "Permission denied")

texts: [ERROR] exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1025 Error on rename of '.\magento12#sql-29a8_39' to '.\magento12\catalog_product_entity_media_gallery_value' (errno: 13 "Permission denied")' in D:\xampp\htdocs\Magento12\vendor\magento\zendframework1\library\Zend\Db\Statement\Pdo.php:228 Stack trace: #0


texts: Magento2.3: Product detail page is not working

texts:
I have tried installing the social share extension but getting the below error when I try to open the product detail page.

  1 exception(s): Exception #0
  (Magento\Framework\Config\Dom\ValidationException): Element
  'referenceBlock', attribute 'as': The attribute 'as' is not allowed.
  Line: 1778

How can I resolve this?


texts: Making one of two attributes not required to buy in configurable product

texts:
I'm making a shoe store. Different shoe types have different conversions between sizes - Running shoe size US 8 is 26 cm and Wrestling shoe size US 8 is 25 cm.
I'm using two attributes for each shoe type - one with option "US ..." and one with "US ... / ... cm".

The idea is to use the first attribute to filter  the results in the layered navigation so it looks like

US 8
US 9
US 10

and not like

US 8 / 26 cm
US 8 / 25 cm
US 9 / 26.5 cm
US 9 / 25.5 cm
US 10 / 27 cm
US 10 / 26 cm

I need to use the second attribute on the Product page so the user can select the right size.

The problem is that both attributes are required to add the product to the cart.

How can be done only the second attribute to be required and the first attribute be used only for filtering? Am I on the right way?


texts: How to add dynamic multi-select list drop-down in admin edit.php file

texts:
I have create Model/Source

But I want to add this in admin multiselect dropdown list

Like:

$fieldset->addField(
        'special',
        'multiselect',
        [
            'label' => __('Special'),
            'title' => __('Special'),
            'name' => 'special[]',
            'values' => // How to call here ?

That is my option value coming like this

Array
(
    [0] => Array
        (
            [label] =>
            [value] =>
        )

    [1] => Array
        (
            [label] => A
            [value] => 1
        )

    [2] => Array
        (
            [label] => B
            [value] => 2
        )

    [3] => Array
        (
            [label] => C
            [value] => 3
        )

        )


texts: How to update attribute field value using mysql query?

texts:
I have to update attribute "search_sku". I have to update this attribute using sku. I have do this job using mysql. But I am not getting that how can I get this query?

Please help me.
Thanks in advanced!


texts: Sorting a custom collection with a pager

texts:
I'm currently hacking the Advanced Testimonial Manager plugin to achieve what I need on the website I'm working on. It's a pretty good module but I required pagination rather than all testimonials being dumped onto one page:

public function __construct()
{
  parent::__construct();
  $collection = Mage::getModel('testimonialmanager/testimonialmanager')->getCollection();
  $this->setCollection($collection);
}

protected function _prepareLayout()
  {
    parent::_prepareLayout();
    $pager = $this->getLayout()->createBlock('page/html_pager', 'custom.pager');
    $pager->setAvailableLimit(array(10=>10,20=>20,'all'=>'all'));
    $pager->setCollection($this->getCollection());
    $this->setChild('pager', $pager);
    $this->getCollection()->load();
    return $this;
}

public function getPagerHtml()
{
    return $this->getChildHtml('pager');
}

protected function _getCollection()
{
  $collection = Mage::getModel("testimonialmanager/testimonialmanager")->getCollection()
  ->addFieldToFilter('status', '2')
  ->setOrder('testimonial_id', 'DESC')
  ->load();
  return $collection;
}

This doesn't sort the collection by testimonial ID. If I revert the code back to the original (without the pagination toolbar), it does sort correctly. Any help would be greatly appreciated!


texts: Tools to Scan Magento Code for Malicious Content

texts:
We have a client who is very concerned with Malicious code being introduced in third party modules, especially modules that are coming from Magento Connect (Or any free module) They would like to use one of these modules but want to be assured that the module does not contain code that would allow a hacker to get access to different parts of their Magento site.

My question is this: Is there a tool that we could use to scan code for content?
Something like this but maybe more in depth.

function check($contents,$file) {
        $this->scanned_files[] = $file;
        if(preg_match('/eval\((base64|eval|\$_|\$\$|\$[A-Za-z_0-9\{]*(\(|\{|\[))/i',$contents)) {
            $this->infected_files[] = $file;
        }
}

Even a service that can be run on the web server.

Ideally if there was a service that would scan each commit before code got into the repo would be ideal.


texts: Using PHP to get the last inserted customer email

texts:
I have a script that loads Customers/Addresses into Magento, but sometimes it fails.
I would like to pick up were I left of (I am transforming data from one DB to Magento).
What is a cheap way to get the last inserted customers email?

SELECT email FROM customer_entity ORDER BY entity_id DESC LIMIT 1;

Is that a safe/sane way to do this?


texts: What is the risk of not using Magento's "getSubmitUrl" function?

texts:
This produces a URL that includes some encryption. If I want to create a custom "Add to Cart" button and use my own link:

"/checkout/cart/add?qty=1&product=2" that does not have this encryption, what is the risk? If it's important, I'm only dealing with simple products.

To be clear, the getSubmitUrl($_product) that I'm referring looks like:

/checkout/cart/add/uenc/aHR0cDovLzEyNy4wLjAuMS9mcmFasdfasdfasdfasdfadsfadsfh0bWw,/product/18/


texts: Magento 2.3 : How to attach csv file in email?

texts:
How do we send email with attachments in magento 2 ?
And file type be like .csv

Previously it was working when we were in 2.2x but after been upgrading to 2.3 it causing issues in attachments. And we did tried this extension  as well but they are writing in a text file.

Expected Result :
               Load the file from the local path from module directory  and attach it with email in M2.3


texts:
In this mail template I can't able to get Customer Name & Store Title

public function updatecustomerAction(){

    $sellerData = Mage::getSingleton('customer/session')->getCustomer();
    $sellerId = $sellerData->getId();
    $seller_mail = $sellerData->getEmail();

        $collection = Mage::getModel('followup/followup')->getCollection()
                            ->addFieldToFilter('seller_id', $sellerId)
                            ->addFieldToFilter('seller_email', $seller_mail);

    foreach($collection as $item){
        $mycustomer_email =  $item->getCustomerEmail();
        $mycustomer_name = $item->getCustomerName();
        //return $mycustomer;
        $template_id = 'customer_update';
                     $email_to = $mycustomer_email;
                     $seller_store = $sellerData->getStoreTitle();

                     $custom_variable = $mycustomer_name;
                     $custom_variable1 = $seller_store;

                     $email_template  = Mage::getModel('core/email_template')->loadDefault($template_id);
                     $email_template_variables = array(
                        'custom_variable' => $custom_variable,
                        'custom_variable1' => $custom_variable1);

                     $sender_name = Mage::getStoreConfig(Mage_Core_Model_Store::XML_PATH_STORE_STORE_NAME);
                     $sender_email = Mage::getStoreConfig('trans_email/ident_general/email');
                     $email_template->setSenderName($sender_name);
                     $email_template->setSenderEmail($sender_email);
                     $email_template->send($email_to, $email_template_variables);
    }

                     $this->_redirectReferer();
        Mage::getSingleton('core/session')->addSuccess('Done');

}

What is the Problem on this?


texts:
I'm trying to make the functionality on my eCommerce web site, so the users can shop by brands. I'm trying to accomplish this without using any extension and the brands are suppose to be displayed on my view.phtml page.

What exactly I need to do is to tell the Magento, if one attribute (brand) is being used on view page, to hide (not to display) ALL other attributes (brands).

I have the following code, which I use.

<a class="acer-<?php echo $_product->getData("lp_brand"); ?>" title="Acer" href="http://www.domain.com/category?lp_brand=78"

<a class="toshiba-<?php echo $_product->getData("lp_brand"); ?>" title="Toshiba" href="http://www.domain.com/categorylp_?brand=79"

<a class="dell-<?php echo $_product->getData("lp_brand"); ?>" title="Dell" href="http://www.domain.com/category?lp_brand=80"


texts: Why is my product's custom attribute not available during this event?

texts:
I have a product with a custom attribute, which works fine almost everywhere I use it.

However, when I try to get this attribute's value during the  catalog_product_get_final_price event, I get null returned. Also, when I print the product's data, this attribute is not shown.

Is there a logical reason for this? How can I retrieve the value of this attribute?

I suspect that because this event is fired during the create/update of a quote item, not the original product data is used, but a (partial) snapshot of it's data. If that is the case; how might I make my attribute available in this snapshot as well?

config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <My_Module>
            <version>1.0.0</version>
        </My_Module>
    </modules>
    <global>
        <events>
            <catalog_product_get_final_price>
                <observers>
                    <my_observer>
                        <class>My_Module_Model_Observer</class>
                        <method>calculateItemPrice</method>
                    </my_observer>
                </observers>
            </catalog_product_get_final_price>
        </events>
    </global>
</config>

Observer

<?php
class My_Module_Model_Observer
{
    /**
     *
     * @param  Varien_Event_Observer $observer
     * @return void
     */
    public function calculateItemPrice( Varien_Event_Observer $observer )
    {
        $event   = $observer->getEvent();
        $product = $event->getProduct();

        // folowing returns NULL
        $product->getMyCustromAttribute()
    }
}

UPDATE

When I debug the $observer object in the event observer, I get the following data;

Varien_Event_Observer (
    [_data:protected] => Array
        (
            [event] => Varien_Event(...)
            [product] => Mage_Catalog_Model_Product(...)
            [qty] => 1
        )
    [_hasDataChanges:protected] => TRUE
    [_origData:protected] => NULL
    [_idFieldName:protected] => NULL
    [_underscoreCache:static:protected] => Array(...)
    [_isDeleted:protected] => FALSE
    [_oldFieldsMap:protected] => Array()
    [_syncFieldsMap:protected] => Array()
)


texts: How to redirect to new page on maintenance mode?

texts:
I think I'm missing something. I attempted to do this the "proper" magento 1.x way:

Copied rootDir/errors/default to rootDir/errors/janitor
Changed <skin>default</skin> to <skin>janitor</skin>
Updated code in rootDir/errors/janitor/503.phtml as needed.

This kind of works. The problem is the edits to 503.phtml basically make it a new page. It sends headers, it has a full <html> .. </html> structure etc.

Obviously what ends up happening is page.phtml renders first, with the contents of 503.phtml inside that page as the body.

I COULD completely change page.html but I would like to keep using the default for every other error (404, etc.)

The 503/maintenance page is a separate entity with its own markup, styles, logo and so forth.

Right now the solution is simply to bypass all this by changing the logic in rootDir/index.php to load my custom maintenance page rather than go through the standard magento error processing/rendering of 503.phtml.


texts:
On clicking home page link to category page, the page shows the following error.

Fatal error: Call to a member function getId() on a non-object in xxxxxxxxxxxxxxx\app\code\core\Mage\Review\Block\Product\View\List.php on line 40

Can anyone help me to fix it?


texts:
What is the replacement of Mage_Catalog_Model_Product_Api() in magento 2.

        $mc = new Mage_Catalog_Model_Product_Api();
        $sku = 'testsku';
        if ($product)
            $productId = $product->getId();

        if ($this->validId($productId))
        {
            if ($product->getTypeId() != $type)
                $productData["type_id"] = $type;

            $product->save();
            $mc->update($productId, $productData); //Save the information in the array.
        }
        else
        {
            $mc->create($type, $setId, $stockCode, $productData);
            $product = $this->product->loadByAttribute('sku', $sku);
            $productId = $product->getId();
        }


texts: installing magento sample data on vagrant

texts:
I'm setting up a local Magento 1.9.1 install, using vagrant and scotch box which I've done multiple times before.

This time however, I've decided to use the sample data package, downloaded from the Magento site.

The sample package includes media and skin folders, which obviously go straight into my Magento directory, and an sql file which I need to import.
The problem I'm having is that I have no idea where in my local file structure I should be placing the sample sql file in order to be able access it from inside my vagrant box. I've tried placing it in ~/my-project-folder/scotch-box/.vagrant but when I 'vagrant ssh' and have a look around I can't see any relation between that folder and the file structure inside the vagrant box. I'm running Linux Mint on my local machine, if that's relevant.

I guess my question could be shortened down to "where on my local machine do the files that make up my vagrant box live, and where do I have to place files on my local machine in order to be able to see them from inside my vagrant box?"


texts: How to override already override class in magento 2

texts:
Hii we need to override Magento\Catalog\Model\ResourceModel\Product\Collection class for our customisation. To do this we added

<preference for="Magento\Catalog\Model\ResourceModel\Product\Collection" type="Abc\Cde\Model\ResourceModel\Product\Collection"/>

in di.xml. This override works in home page but in plp page it is not working because in plp page one of amasty module uses

<virtualType name="Magento\CatalogSearch\Model\ResourceModel\Fulltext\CollectionFactory"
            type="Magento\Catalog\Model\ResourceModel\Product\CollectionFactory">
        <arguments>
            <argument name="instanceName" xsi:type="string">Amasty\Shopby\Model\ResourceModel\Fulltext\Collection</argument>
        </arguments>
    </virtualType>

both are extending magento collection.How can i ovveride the code that my function needs to work.


texts:
I'm using the RWD theme and am trying to make the search bar permanent (rather than clicking the search icon and having it appear). I'm still a newbie and am poking through the template files looking for some Javascript that will make this happen, as well as looking through the SCSS to see if I can find something acting on the id or class (seems to be either #header-search or .skip-links), but I can't seem to find anything.

Any hints on where to go next?


texts: is the print shipping label option by default in magento?

texts:
I want to print shipping label of an order. Print Shipping Label option is available in the Actions on the admin order grid. But when I print the label it displays an error.

  "There are no shipping labels related to selected orders."

I have followed the tutorial:

http://docs.magento.com/m1/ce/user_guide/shipping/shipping-labels-create.html

according to this:

  "In the lower-right corner, select the Create Shipping Label
  checkbox."

but I didn't find this option. Can anyone suggest the solution?


texts: Magento 2.3 aroundCreate() of \Magento\Catalog\Block\Product\ImageBuilder not called

texts:
I have create a plugin to change image object and call image url directly from AWS S3 instead of magento.
Function should be call on any page where product image will be loaded.
di.xml
<type name="Magento\Catalog\Block\Product\ImageBuilder">
      <plugin name="add_product_object_to_image_data_array_new" type="<vendor>\<module>\Plugin\Block\Catalog\Product\ImageBuilder" sortOrder="100" disabled="false"/>
</type>

File: vendor\module\Plugin\Block\Catalog\Product\ImageBuilder.php
<?php

namespace <vendor>\<module>\Plugin\Block\Catalog\Product;

use Magento\Catalog\Model\Product;

class ImageBuilder
{
    /**
     * @param \Magento\Catalog\Block\Product\ImageBuilder $subject
     * @param callable $proceed
     *
     * @return mixed
     */
    public function aroundCreate(
        \Magento\Catalog\Block\Product\ImageBuilder $subject,
        callable $proceed
    ) {
        echo "<pre>";
        print_r("test");
        exit;

        return $proceed();
    }
}

I tried to call plugin but nothing happening and it's calling core function only.
I tried :

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

still nothing works. Any help would be appreciated.


texts:
I'm going crazy. I've read a lot of tutorials and marked "as solved" topics on override template on sales email.
I'm trying to customize the sales_email_order_items, so I've created a file in [ModuleDir]/view/frontend/layout/sales_email_order_items.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="items">
            <block class="Magento\Sales\Block\Order\Email\Items"  template="Vendor_Module::email/items.phtml"/>
        </referenceBlock>
    </body>
</page>

and created my custom template in [ModuleDir]/view/frontend/templates/email/items.phtml
cleared cache and compiled, but nothing has changed.

Someone can help me?


texts: How to use Python 3.7 Code inside Custom Module for Magetno 2?

texts:
I need to create a custom Module for Magento-2 which also has a Python code.

so how to integrate python + Magento into Custom Module.

I mean to say that Magento 2, Custom Module and Python Code need to run on the same platform.


texts:
Good morning,
We are unable to set the Freeshipping rule correctly.
We have a shipment for € 8.90 until reaching € 30, after which Free shipping should start.
Unfortunately magento continues to reason by taking as a reference "price - VAT" price as a consequence the rule does not trigger correctly, should use "cost + VAT" to trigger the rule but this does not happen, can someone help? thank you
Magento 2 latest release.
Thank you


texts: When we set magento 1.9 store the gst include in product but show other tax in order review time

texts:
When we add GST  in the magento store but the checkout time in the order review include show other tax. The product tax class none  but show tax in Place order
 .


texts:
Is MySQL 5.6 mandatory for Magento 2.0 or will it work with MySQL 5.5 itself?
If so, how to skip the mysql detection step?

P.S. My hosting provider supports only MySQL 5.5


texts: Magento 2: Remove account element only for certain store views?

texts:
After much fighting with my layouts to add a link to my customer account page in a way that matches the design I finally succeeded in making the link show up and link to an actual page that also matches the design.
Of course, now I need to remove the link, but only on certain store views.
I've found this question but that removes it from all stores.
Initially, I tried using an observer as so:
<?php

namespace Vendor\Module\Observer;

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

class RemoveBlockForNonWholeSale implements ObserverInterface
{
    protected $logger;
    protected $store;

    public function __construct(
        \Magento\Store\Model\StoreManagerInterface $storeManager
    )
    {
        $this->_storeManager = $storeManager;
    }

    public function execute(Observer $observer)
    {
        $layout = $observer->getLayout();
        $store_code = $this->_storeManager->getStore()->getCode();

        $wh_stores = array('wh','wh_b2b');
        if (!in_array($store_code, $wh_stores))
        {
            $layout->unsetElement('customer_account_dashboard_b2b_status');
        }
    }
}

Here I am attempting to only show the link on the wh and wh_b2b store/account views.
The link still shows up though. If there is a better way to do this let me know, copied below is my layout xml.
<?xml version="1.0"?>
<page layout = "2column-left" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation = "urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="customer_account"/>
    <body>
        <referenceBlock name="customer_account_navigation">
            <block class="Magento\Customer\Block\Account\SortLinkInterface" name="customer-account-navigation-b2b-order-status-link">
                <arguments>
                    <argument name="path" xsi:type="string">b2b/status</argument>
                    <argument name="label" xsi:type="string" translate="true">Check Order Status</argument>
                    <argument name="sortOrder" xsi:type="number">45</argument>
                </arguments>
            </block>
        </referenceBlock>
    </body>
</page>


texts: Upgraded to Magento 2.3.2 and get this error main.CRITICAL: Payment Error: The authenticity of the gateway response could not be verified. [] []

texts: I ran a test via Authorize.Net and the charge went through but on the client side it says  "The authenticity of the gateway response could not be verified" and does not accept the order. Any idea why?


texts: How to get full image url from Custom option with image uploaded from frontend in magento 2?

texts:
Custom option with image

I'm new in magento 2. I'm trying to fetch custom options uploaded image.

I have created image upload from customizable options.
Here is object that i have printed. I wanted to full image url.

stdClass Object
(
    [type] => image/jpeg
    [title] => sample_image.jpg
    [quote_path] => custom_options/quote/s/a/aKuwRrgMN9Mku3J9QkI5aJfJN9i3p9q4
    [order_path] => custom_options/order/s/a/aKuwRrgMN9Mku3J9QkI5aJfJN9i3p9q4
    [fullpath] => /xampp/htdocs/pub/media/custom_options/quote/s/a/aKuwRrgMN9Mku3J9QkI5aJfJN9i3p9q4
    [size] => 8462
    [width] => 275
    [height] => 183
    [secret_key] => f41cc17e392062a9c669
    [url] => stdClass Object
        (
            [route] => sales/download/downloadCustomOption
            [params] => stdClass Object
                (
                    [id] => 2298
                    [key] => f41cc17e392062a9c669
                )

        )

)

How can we get 'sample_image.jpg' full path?
anyone can help ?


texts: Send different transactional emails specific to cetain products

texts: I would like to send confirmation emails that are different depending on which product (not product type) is purchased. I sell a small sampling of products online - currently 5... 3 are simple, 2 are downloadable. Aside from varying different content/verbiage in the line items sections of the confirmation email, I would like to send completely different confirmation email templates if product A is bought versus product B. Different styles, different layout, etc. Has anyone done something like this before?


texts: Mobile-friendly test: Couldn't load 36 page resources?

texts:
Google's mobile-friendly test on my new site says it is mobile friendly, but there were "Page load issues." It returned:

https://search.google.com/search-console/mobile-friendly?id=OWamZS02QnHWnNeP6njbIQ&view=fetch-info

Page partially loaded
Not all page resources could be loaded. This can affect how Google sees and understands your page. Fix availability problems for any resources that can affect how Google understands your page.

Then it lists 36 resources that apparently didn't load, things like:
http://www.googlecommerce.com/trustedstores/api/js - Script - Other error
http://www.example.com/js/lightboxes/fancybox/blank.gif - Image -Other error
http://www.example.com/js/lightboxes/fancybox/fancybox.png - Image - Other error
http://www.example.com/skin/frontend/my_theme/default/fonts/cutive-regular-webfont.ttf  - Font - Other error


texts: Magento 2 how to add a Javascript addeventlistener to element

texts:
I am trying to add an event listener to an element, but no matter what I try, it won't work. Here is what I have so far (this is in the html web templates page):

window.addEventListener('load',function(){
        document.getElementById('authnetcim-submit').addEventListener("click", function(){
            alert('Alert Message');
        });
    });

Everyone keeps saying that the listener needs to be wrapped in window.addEventListener('load'), as you need to wait for the page to load before you can add the listeners, but that still won't work for me either. There are no errors and nothing logs to the console. The Id is correct and it's the only id of that name used on the page.

Any help is appreciated.


texts:
Can't translate text in cookie popup in magento 2

I tryed add this text to de_DE.csv, but it not translate

"We use cookies to make your experience better.","Wir verwenden Cookies, um Ihre Erfahrungen besser machen.",module,Magento_Cookie
"We use cookies to make your experience better.","Wir verwenden Cookies, um Ihnen ein besseres Erlebnis zu ermöglichen."
"To comply with the new e-Privacy directive, we need to ask for your consent to set the cookies.","Um der neuen e-Privacy-Richtlinie zu entsprechen, müssen wir um Ihre Zustimmung bitten, die Cookies zu setzen.",module,Magento_Cookie
"Learn more."," Erfahren Sie mehr.",module,Magento_Cookie
"Allow Cookies","Cookies setzen erlauben",module,Magento_Cookie

My cookie

UPDATE

I tryed create a file notices.phtml in custom theme but it not apply in popup

<?php if ($this->helper(\Magento\Cookie\Helper\Cookie::class)->isCookieRestrictionModeEnabled()): ?>

                <?= $block->escapeHtml(__('We use cookies to make your experience better...')) ?>
                <?= $block->escapeHtml(__('To comply with the new e-Privacy directive, we need to ask for your consent to set the cookies.')) ?>
                <?= $block->escapeHtml(__('Learn more.', $block->getPrivacyPolicyLink()), ['a']) ?>

                <button id="btn-cookie-allow" class="action allow primary">
                    <?= $block->escapeHtml(__('Allow Cookies')) ?>
                </button>

<?php endif; ?>


texts: How to translate message: Welcome, Name_User!

texts:
Magento Version: 2.0.7,
Parents Theme: Luma.

I'm trying to translate the welcome message when a client has been identified at the store: Welcome, Name of the Client!

I found strings for translation here:

"Welcome,% 1!", "Welcome,% 1!" Module, Magento_Persistent
"Welcome,% 1!", "Welcome,% 1!" Module, Magento_Theme.

The dictionary file is located at app/i18n/mytema/es_es

But translation is not displayed and continues to display the message in English.
I've also tried with the CSV file that is within the custom theme that I created, ie: app/design/frontend/My_Tema/my_theme/i18n. In this file I paste the chain and I have translated .... but nothing.

With layout files Magento_costumer not only translate but also alter the functionality when I create the default.xml file.
Does anyone know anything about it?


texts: How to create custom Add to cart button and functionality

texts:
I'm working with magento2. I have created popup  and display cart product of related products. Now I want create custom Add to cart button for related products. So after add to cart product  I want manage at my end and redirect on checkout page. I want added cart of data. And redirect on custom url.
It is possible with without observer in magento2.


texts: Magento 2 module "Object domdocument should be created" error

texts:
I am getting above error when I run my module in browser as:
192.168.0.106/magento-2/module1/index/index

Below is my Controller code:

<?php
namespace Company1\Module1\Controller\Index;
class Index extends \Magento\Framework\App\Action\Action
{
    protected $resultPageFactory;
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    )
    {
        ## parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }
    public function execute()
    {
        return $this->resultPageFactory->create();
    }
}

Here is the routes.xml:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
    <router id="standard">
        <route id="module1" frontName="module1">
            <module name="Company1_Module1"/>
        </route>
    </router>
</config>

Module.xml

<?xml version="1.0"?>
<!--<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
  <module name="Company1_Module1" schema_version="1.0.0" setup_version="1.0.0"/>
</config>

And Block file:

<?php

namespace Company1\Module1\Block;

class Module1 extends \Magento\Framework\View\Element\Template
{
    public function _prepareLayout()
    {
        return parent::_prepareLayout();
    }
}

Layout file:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd" layout="3columns">
    <head>
        <title>Module1 Text !!!</title>
    </head>
  <body>
    <referenceContainer name="content">
      <block class="Company1\Module1\Block\Module1" name="module1" template="Company1_Module1::default.phtml"></block>
    </referenceContainer>
  </body>
</page>


texts:
i have tried to change my theme and when i did i get following error

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Could not   read config file

Exception #0 (Magento\Framework\Exception\LocalizedException): Could not   read config file
#0 C:\xampp\apps\magento\htdocs\vendor\magento\framework\Config\Reader\Filesystem.p hp(123): Magento\Framework\Config\FileResolver->get('view.xml', 'global')
#1 C:\xampp\apps\magento\htdocs\vendor\magento\framework\Config\View.php(233): Magento\Framework\Config\Reader\Filesystem->read('global')
#2 C:\xampp\apps\magento\htdocs\vendor\magento\framework\Config\View.php(213): Magento\Framework\Config\View->read()
#3 C:\xampp\apps\magento\htdocs\vendor\magento\framework\Config\View.php(90): Magento\Framework\Config\View->initData()
#4 C:\xampp\apps\magento\htdocs\vendor\magento\module-catalog\Helper\Image.php(833): Magento\Framework\Config\View->getVarValue('Magento_Catalog', 'product_image_w...')
#5 C:\xampp\apps\magento\htdocs\vendor\magento\module-checkout\Block\Cart\Sidebar.php(81): Magento\Catalog\Helper\Image->getFrame()
#6 C:\xampp\apps\magento\htdocs\var\generation\Magento\Checkout\Block\Cart\Sidebar\Interceptor.php(37): Magento\Checkout\Block\Cart\Sidebar->getImageHtmlTemplate()
#7 C:\xampp\apps\magento\htdocs\vendor\magento\module-checkout\Block\Cart\Sidebar.php(70): Magento\Checkout\Block\Cart\Sidebar\Interceptor->getImageHtmlTemplate()
#8 C:\xampp\apps\magento\htdocs\vendor\magento\framework\Interception\Interceptor.php(146): Magento\Checkout\Block\Cart\Sidebar->getConfig()
#9 C:\xampp\apps\magento\htdocs\var\generation\Magento\Checkout\Block\Cart\Sidebar\Interceptor.php(26): Magento\Checkout\Block\Cart\Sidebar\Interceptor->___callPlugins('getConfig', Array, Array)
#10 C:\xampp\apps\magento\htdocs\vendor\magento\module-checkout\view\frontend\templates\cart\minicart.phtml(46): Magento\Checkout\Block\Cart\Sidebar\Interceptor->getConfig()
#11 C:\xampp\apps\magento\htdocs\vendor\magento\framework\View\TemplateEngine\Php.php(59): include('C:\\xampp\\apps\\m...')
#12 C:\xampp\apps\magento\htdocs\vendor\magento\framework\View\Element\Template.php(255): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Checkout\Block\Cart\Sidebar\Interceptor), 'C:/xampp/apps/m...', Array)


texts: Magento 1 OR 2 : Set custom product weight in quote

texts:
I have a dynamic product which is based on user size input. On the basis of user size input I am calculating product price and weight.

I already set the product calculated price in custom price field of quote and set additional_options with all user input as custom option.

I also have to calculate the weight of the product based on user input and want to use it for shipping calculation.

I am trying to set product calculated weight in quote item as weight, but it get changed when quote refreshed or any extra activity on quote.

  How do I set product custom weight in quote and used it in shipping method ?


texts: Magento 1.8 How to add comments to ship emails

texts:
I'm trying to add comments to the ship email I sent, but the checkbox "Append Comments" is disabled.
Does anyone know why this is happening?


texts:
This http://www.magentocommerce.com/translations says

  The community translation tool is offline as of August 27, 2014. We
  will be providing a new and improved community-sourced translation
  tool in the future. If you would like to assist with translating
  Magento please send an email to community@magento.com.

What now? Does anyone have an idea where I can get the language packs I need?
For this particular case, I need a ro_RO language pack for CE-1.9. (yes, I know, I'm Romanian and I don't have a ro_RO language pack yet. I'm ashamed, but that's the situation).
And as a general question, where should people go get their language packs until the "new and improved community-sourced translation" is finished?


texts: Magento 2 How to do gzip compression and minify js, css files for optimization?

texts:
I have made some changes in .htaccess file present at root directory
Default:

<IfModule mod_deflate.c>

############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip

# Insert filter on all content
###SetOutputFilter DEFLATE
# Insert filter on selected content types only
#AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
text/javascript application/javascript application/x-javascript
application/json image/svg+xml

# Netscape 4.x has some problems...
#BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
#BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# Don't compress images
#SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
#Header append Vary User-Agent env=!dont-vary

</IfModule>

Updated:

<IfModule mod_deflate.c>

############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip

# Insert filter on all content
SetOutputFilter DEFLATE
# Insert filter on selected content types only
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
text/javascript   application/javascript application/x-javascript
application/json image/svg+xml
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

</IfModule>

Also I have set minify js and css it is also not working.

But then also it showing as not complete in google page speed as well as
gtmetrix

How should I resolve these issues?
Thanks


texts: How to make different product listing view only for a single category products

texts:
now as a default the product listing page gives me a layout structure(design). And all categories products use this same layout.

Now i'm tyring to differentiate one special category products in different layout(designs).

Below are the two wirframe that illustrates what I'm looking for.

Default

Desired product listing of one special category products lisiting layout

Edited :
My local.xml

<?xml version="1.0"?>

<layout version="0.1.0">
<default>
    <CATEGORY_496>
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
    </CATEGORY_496>

</default>
</layout>


texts:
In Magento CE 1.9.1.0 I get this message in system.log right when the purchase is completed and the customer is taken to checkout/onepage/success/ (Payment via PayPal in sandbox mode, in case this matters):

ERR (3): Notice: Undefined offset: 1  in app/code/core/Mage/Sales/Model/Order.php on line 1258

Looking at the code in question I see

list($carrierCode, $method) = explode('_', $shippingMethod, 2);
return new Varien_Object(array(
            'carrier_code' => $carrierCode,
            'method'       => $method
        ));

How can I fix that?


texts: 403 on Onepage Checkout after custom ajax request

texts:
I've added a custom block to the payment step of the onepage checkout. I need to modify something in the cart without the onepage process being interrupted or anything refreshing/redirecting.

I added a form and button above the payment methods, which calls this function onclick :

        function submitPartial(){
            //console.log("worked");
            var url = '<?php echo Mage::getUrl('',array('_secure'=>true)).'checkout/cart/index' ?>';
            var data = jQuery('#wholecart_partialpayment_form').serialize();
            jQuery.ajax({
                type: "POST",
                url: url,
                data: data,
                complete: function(data){
                    return false;
                }
            });
        }

And this works, If I open the cart page it's been updated, but if I then try to continue the onepage process by clicking "continue" the console throws a

Failed to load resource: the server responded with a status of 403 (Forbidden) : /index.php/checkout/onepage/savePayment/

If I don't click on my button and do my custom ajax request, the onepage process works normally.

I'm assuming my ajax call interrupts something in the form submitting of the onepage checkout, maybe it requires some kind of validation and my ajax call breaks it (hence the 403)? I'm honestly a bit lost, the onepage is pretty complicated.


texts:
As far as I understand, Magento has a JSON encode function by using zend framework. And my question, is there an option to force that function always return JSON object, not JSON array?

Mage::helper('core')->jsonEncode($array);

In native PHP (version 5.3.0 or above), I can achieve it by passing this constant "JSON_FORCE_OBJECT" into the second parameter of json_encode() function. Any help would be greatly appreciated.


texts: Magento 2: Details and More Information tabs

texts:
On one of the sample data products, it shows a More Information tab which, unsurprisingly, displays more information for the product. I've looked at the same product in the Admin area, but can't see where to add in the additional information for the tabs.

Anyone know where this information is added for each product?


texts: Magento 2 Order Status - Pending Payment

texts:
I have a Magento 2 website.  Payments through PayPal Pro but when the customer makes an order and successful payment the order status is still 'Pending Payment'

I have spoken to PayPal and Pay IPN are being successfully received by listener, but the order status is not updating from 'Pending Payment'

Does anyone know how to possibly fix this?  Thanks


texts:
From last 2 weeks a hacker / brute forces are attacking on our Magento website. First they have changed our emails, password may be for any kind of information because every time when we change passwords of server or admin panel we receive an email. Then they have changed the email (PayPal) for payments. I have searched for that on internet and i have deleted the extension (mag pleasure) because i haven't installed that extension then deleted also some strange folders. Now they unable to change the email but i think they are trying because every morning i see that somebody changes the permissions of these folders /media/css and csssecure and js. And in the history of customers i see these strange urls.
www.domainname.org/enable-cookies and www.domainname.org/robots.txt -
Anybody can give me suggestions?


texts: Using magento 1.9 to translate between two custom (not website) languages

texts:
I'm looking for solution to use magento underlying translation system to translate a default text from English to any custom language (not being store default language). Is it even possible?

In my scenario i would like to use translation module to set certain properties (store dependent) in product while creating it in code. Product can be created in two stores, and will be available for both, but default values must be always in one language, and store-specific values must be obviously in other language.

I want to use translation system because its convenient for editing. Unless its of course not possible.


texts:
I have installed magento 2 using composer by follow this commands:- https://www.simicart.com/blog/magento-2-composer/

My magento set up done without any error but with this set up, my new installed magento front end is working but admin link not working.

Can anyone please help me with this? I have tried by clear cache and removed folder of var and pub/static but still same.

Sorry might be my questions will be silly, i am in learning phase so hope you guys can understand.

Thanks


texts: Magento2: Lock wait timeout exceeded - catalog_product_entity - loading products

texts:
I am experiencing locks on the catalog_product_entity table when uploading a lot of products in a short period.

Error:

  SQLSTATE[HY000]:General error: 1205 Lock wait timeout
  exceeded; try restarting transaction. query was:
  UPDATE catalot_product_entity SET row_id=? ...etc

We've traced it back to a previous job running which updates a particular product, and then another job with the same product runs at the same time that scheduled indexing is running (and obviously refreshing indexes for previous load - It looks like the indexer might lock a series of rows while updating, haven't looked in to how it works).

I've confirmed that products that are in the current job have been recently updated in a previous job - although at times 10 minutes earlier.

Has anyone found a solution or workaround for this issue, or anyone have any suggestions?


texts: Is changing to canonical urls a bad idea if you have an established website with thousands of backlinks?

texts:
I have a magento website with thousands of backlinks. I just realized that the categorical structure is negatively affecting my seo. Will switching to canonical break many backlinks? Is it a bad idea? Any suggestions to deal with the duplicate issue without breaking backlinks forever?
Thanks,


texts: Magento 1.9 RWD responsive menu problem (Not rendering correctly)

texts:
Before I explain my problem I just want to confirm I still get this issue after I disable all plugins and disable all theme/skin modifications.

When the mobile menu displays (below 770px) the categories do not display correctly and render as if they have no children and do not dropdown when clicked but still have arrows as you can see below....

After inspecting the code can see that the incorrect classes are being applied to these parent categories as you can see in the screenshot below.

When I compare my nav code to demo sites such as Madison Island I can see some odd differences...

I can't seem to find where or why 'level-top' class is being applied or what significance it has anywhere. Another thing I noticed is the '< a>' tag only contains the class 'level-top' whereas the classes should be 'level0 has-children' which if I apply these the menu renders correctly (Even though clicking them still doesn't drop them down).

My topmenu/renderer.phtml file is not modified and I cannot see anything wrong with it.

LOST!


texts: How to add cms static block to category description programmatically

texts: Instead of directly add cms block to category description, how to add programmatically?


texts: Custom Form with WYSIWYG Element: No content update and "Show / Hide Editor" Button does not work

texts:
I have a problem with enabling the WYSIWYG editor in a custom admin form. With a normal textarea, everything works:

    $fieldset->addField('slider_content', 'textarea', array(
        'name' => 'content',
        'label' => $helper->__('Content text'),
    ));

Now I change it to WYSIWYG:

    $fieldset->addField('slider_content', 'editor', array(
        'name' => 'content',
        'label' => $helper->__('Content text'),
        'wysiwyg' => true,
        'config' => Mage::getSingleton('cms/wysiwyg_config'),
    ));

And this is the layout update to include necessary JS:

    <reference name="head">
        <action method="setCanLoadExtJs"><flag>1</flag></action>
        <action method="setCanLoadTinyMce"><flag>1</flag></action>
        <action method="addJs"><script>mage/adminhtml/variables.js</script></action>
        <action method="addJs"><script>mage/adminhtml/wysiwyg/widget.js</script></action>
        <action method="addJs"><script>prototype/window.js</script></action>
        <action method="addJs"><script>prototype/prototype.js</script></action>
        <action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
    </reference>

Result:

The button does not do anything visible. The hidden textarea exists and the highlighting in Firebug suggests that it is updated on click, but it stays hidden. Also it does not update its content when I make changes in the editor, so that when I save, nothing changes.

Any idea what the reason for this might be? There are no errors in the JavaScript console.


texts: How to check billing and shipping address are same

texts: I am using magento 2.0.7 and i want to know how the checkout page works and how to display the shipping and billing address. Where is checking the shipping and billing address are same or not for logged in users


texts: How to enhance template with additional .phtml file?

texts:
my .phtml file which lists 3 products in a row is:

frontend/default/ves_fashion/template/catalog/product/list.phtml

This file includes also the following .phtml files to include more information.

frontend/default/ves_fashion/template/catalog/product/price.phtml
frontend/base/default/template/germansetup/price_info.phtml

I now want to include a custom attribute between these two files price.phtml and price_info.phtml. How can I kind of "hook" into it and include another .phtml file? I know that this works with a XML file - but where/how can I find the correct XML file and how I can include my own .phtml file there?

Would be great if anybody can help me. Thanks


texts: Magento 1.9 Recently Viewd Products shows for guests

texts:
I'm using default magento Recently Viewed Products block on a CMS page

{{block type="reports/product_viewed" template="reports/product_viewed.phtml"}}

But default magento Recently Viewed Products block only support for logged in users, so it only show when i logged in

I checked the file

/public_html/app/code/core/Mage/Reports/Block/Product/Abstract.php

and It's line number 138 function set a customer id for product collection for filter the results.

But i think normal site visitors not have that kind of id.

if ($this->getCustomerId()) {
                       $this->_collection->setCustomerId($this->getCustomerId());
 }

Anyone know how to get recently viewed products by setting an id to above or by using another way.

i also tried this answer but it didn't work at all

https://stackoverflow.com/questions/15682483/how-to-get-recently-view-product-for-guest-user-in-magento


texts: How to load product image gallery of the selected products inside div using jquery?

texts: I have custom module which consist of product listing with radio buttons.I want to display the image gallery of the selected products inside particular div using jquery.


texts: Magento2: How to get product collection which cart rules apply on this?

texts:
I have added cart rules on some product. I want to display the message on the free product which has rules applied.

How to get product collection which cart rules apply on this?

My Magento version is 2.0


texts:
I'm joining the admin_role table to the main table to display information.

I'm having a hard time joining a table to itself in Magento's syntax.
I currently have

protected function _prepareCollection()
    {
        $collection = Mage::getResourceModel('admin/user_collection');
        $collection->getSelect()->join(
            array('ar' =>'admin_role'),
            'ar.user_id = main_table.user_id',
            array('parent_id')
        );

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

And below that I have

protected function _prepareColumns()
    {
       $this->addColumn('Role', array(
            'header'    => Mage::helper('adminhtml')->__('Role'),
            'index'     => 'parent_id'
        ));
     ));

Here is a picture of my database table:

I want to join the admin_role table with itself so the people that have a parent_id of 35 match up with the role_id and display the name "Merchant".

I've always been bad at explaining database problems so let me know if you need any clarification!


texts: How to change UPS shipping method codes in Magento 1.9

texts:
Is there a way to change default UPS shipping method codes?

For example: app/code/local/Mage/Usa/Model/Shipping/Carrier.ups.php -
in an array bellow if I wanted to assign 'NextDayAir' => 'Next Day Air' instead of '01' etc.
however if I change it in array its not showing up on the front page during the checkout.

'01' => 'Next Day Air',
'02' => 'Second Day Air',
'03' => 'Ground',
'07' => 'Express',
'08' => 'Expedited',
'11' => 'Standard',


texts: Add custom field in onepage check out,order,invoice,sales

texts:
I am new in Magento development I have created the custom module to insert field MOBILE in Customer Account Registration form
but
(1) now I want to add this field in everywhere like one-page checkout, order page, sales page, shipping page, invoice detail page..likewise...so it is possible in my one custom module??
(2)  or should I create this functionality in one module or i have to create the different module for each other any help should be appreciable?


texts:
I want to display the current stock of a specific product in a theme. How can I do that?

getStock() does not seem to work.


texts: What are the possible ways through which all caches can be disabled?

texts:
In one of our project website started loading very slow and I found out all caches were disabled which I have enabled earlier.

I can figure out the following ways through which caches can get disabled:

When someone runs php bin/magento cache:disable command.
When someone modifies app/etc/env.php and disables caches from there.
Under certain circumstances a file .regenerate is written in the var folder (either at setup upgrade or composer install / upgrade) and if that file is present when running php bin/magento setup:di:compile the cache is disabled and re-enabled when the compilation process is finished. For some reason, sometimes the cache is not re-enabled. (Referenced from here)

What are the other possibilities through which

Someone having code/db access can disable it ?
Automatically it can get disabled ?


texts:
A customer with the same email already exists in an associated
  website.

I got this error-message after logging the customer.
Please can anyone can help me?


texts: In Magento 1 if i try to delete over 50 products the site crashes

texts: Is there anyway to solve this rather annoying issue?


texts: Broken PHP files of my extension after installation

texts:
I created my extension for Magento 1.9.

It works on my localhost.

Packed it using Magento Package Extensions.

Uploaded it to Magento Connect.

Created new empty shop with Magento 1.9.

Install module.

And get these errors:

Warning: Unexpected character in input: ' in /Users/noff/Sites/magento2.dm/app/code/community/Rees46/Personalization/Helper/Data.php on line 63

Warning: Unexpected character in input: ' in /Users/noff/Sites/magento2.dm/app/code/community/Rees46/Personalization/Helper/Data.php on line 63

Warning: Unexpected character in input: ' in /Users/noff/Sites/magento2.dm/app/code/community/Rees46/Personalization/Helper/Data.php on line 63

Warning: Unexpected character in input: ' in /Users/noff/Sites/magento2.dm/app/code/community/Rees46/Personalization/Helper/Data.php on line 63

Warning: Unexpected character in input: ' in /Users/noff/Sites/magento2.dm/app/code/community/Rees46/Personalization/Helper/Data.php on line 63

Warning: Unexpected character in input: ' in /Users/noff/Sites/magento2.dm/app/code/community/Rees46/Personalization/Helper/Data.php on line 63

Warning: Unexpected character in input: ' in /Users/noff/Sites/magento2.dm/app/code/community/Rees46/Personalization/Helper/Data.php on line 63

Warning: Unexpected character in input: ' in /Users/noff/Sites/magento2.dm/app/code/community/Rees46/Personalization/Helper/Data.php on line 63

Parse error: syntax error, unexpected end of file in /Users/noff/Sites/magento2.dm/app/code/community/Rees46/Personalization/Helper/Data.php on line 63

When I open file Data.php using Sublime Editor on new Magento installation, I see this string at the end of file:

So, question is: what is it and how it happens in my file? Original file hasn't this symbols before installation of extension. When I untar file tarred by Extension Package tool - file is OK.


texts:
We got a hacked Magento website that is on update 1.9.2.4.

The files that are hacked are:

api.php
indexs.php: hackscript
postfix.php: hackscript
skin/adminhtml/default/default/filesystem/css/loader.php
js/editarea/plugins/charmap/jscripts/ajax.php

The hacker used our server to bounce mail Gmail sites to find existing mail addresses. In the mail attachment, he used another hacked Magento site to host other files.

How can an updated Magento site get hacked? What can we do about it?


texts: Magento 2 : Category name filter in product grid in custom module

texts:
I want to filter by category name in this product grid. How to do that?

My prepare collection code :

/**
     * [prepareCollection for grid]
     * @return collection
     */
    protected function _prepareCollection() {
        $store = $this->_getStore();
        $collection = $this->productFactory->create()->getCollection()->addAttributeToSelect(
            'sku'
        )->addAttributeToSelect(
            'name'
        )->addAttributeToSelect(
            'attribute_set_id'
        )->addAttributeToSelect(
            'type_id'
        )->setStore(
            $store
        );

        if ($this->moduleManager->isEnabled('Magento_CatalogInventory')) {
            $collection->joinField(
                'qty',
                'cataloginventory_stock_item',
                'qty',
                'product_id=entity_id',
                '{{table}}.stock_id=1',
                'left'
            );
        }
        if ($store->getId()) {
            $collection->setStoreId($store->getId());
            $collection->addStoreFilter($store);
            $collection->joinAttribute(
                'name',
                'catalog_product/name',
                'entity_id',
                null,
                'inner',
                Store::DEFAULT_STORE_ID
            );
            $collection->joinAttribute(
                'status',
                'catalog_product/status',
                'entity_id',
                null,
                'inner',
                $store->getId()
            );
            $collection->joinAttribute(
                'visibility',
                'catalog_product/visibility',
                'entity_id',
                null,
                'inner',
                $store->getId()
            );
            $collection->joinAttribute('price', 'catalog_product/price', 'entity_id', null, 'left', $store->getId());
        } else {
            $collection->addAttributeToSelect('price');
            $collection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner');
            $collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner');
        }

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

Any help would be appriciated.

Thanks.


texts: Hi I'm facing trouble in uploading the logo image in the transaction email section using admin back-end, it is still showing the previous one but with some block and the resolution showed "x". May I know the cause of this and how can I solve it?


texts: create 3 web-forms for each group registration containing custom fields

texts:
I want to create 3 custom forms for the registration.

I have find /frontend/base/default/template/persistent/customer/form/
 - register.phtml
 - login.phtml

the groups i want to have custom forms is: company in EU, General, company outside EU

I have 3 select on the registration page.
But i don´t now how to create the forms so i can sign them to the right group.

Hope someone can help me.

uppdate:

I follow this tutorial, but all i see is a blank page.
https://midpart.wordpress.com/2011/02/17/a-new-registration-form-for-wholesale-customer/

I use Magento 1.9.0.1


texts: Magento2: Product page is very slow (compared to other page types on the website)

texts:
I'm working on speed optimization for a Magento 2 website.
So far we did a lot of things, including:

Enabling all the related built-in stuff (merged/bundled js/csc/html, cache, flat tables, etc...).
Production mode enabled.
Redis, Memcached, Varnish.
CDN on media & static content.
Lazy load on most of the images.
Cache Warmer extension.
Using GTM for external scripts like virtual chat.
ElasticSearch
Pretty strong VPS.

The results are great for most of the pages (HomPage & Categories are very fast), but the client is still unhappy with the product page performance & he is right. I checked & although it's OK compared to other websites, it's still significantly slow compared to other page types on the same website.
*If it makes any difference, it's worth mentioning that this website has almost 50,000 products.

-- Any idea what might be the reason for that or what can we do about it?


texts: Magento 2 PWA and Which Magento version is necessary?

texts:
Which PWA better for Magento 2?

Magento 2 PWA Studio? or vue storefront PWA?

Also If we use Magento 2 PWA Studio then it's only work on garter 3.0 Magento 2 version?

Thanks in advance.


texts: Magento Listing Product Attributes on Invoice PDF for Bundle Products

texts:
I am listing three product attributes (mfg_pn, oem_pn, & physical_location) for each child product of a bundle product by using the following code after line 253 in:

app\code\local\Mage\Bundle\Model\Sales\Order\Pdf\Items\Abstract.php

           //Custom attributes
       $intProductId = $item->getProductId();
       $arrSpecProduct = Mage::getModel('catalog/product')->load($intProductId);
       $strManufacturerPartNumber = '';
       if(count($arrSpecProduct) && isset($arrSpecProduct['mfg_pn']))
       {
            $strManufacturerPartNumber = "(".$arrSpecProduct['oem_pn'].", ".$arrSpecProduct['mfg_pn'].", ".$arrSpecProduct['physical_location'].")";
       }
        if ($attributes) {
            $result =  sprintf('%d', $attributes['qty']) . ' x ' . $result.' '.$strManufacturerPartNumber;
        }
    }

The attributes get listed but I am getting the following error in system.log every time we generate a PDF invoice. We are running Magento 1.9.4.3 and PHP 7.2.22. What am I doing wrong?

2019-10-23T13:36:34+00:00 ERR (3): Warning: count(): Parameter must be an array or an object that implements Countable  in /chroot/home/user/domain.com/html/includes/src/Mage_Bundle_Model_Sales_Order_Pdf_Items_Abstract.php on line 258


texts: Magento 2 mftf Could not parse any test in xml

texts:
I have followed the steps written in the devdocs for MFTF tetsing, but when i come to the step where i have to run-
vendor/bin/mftf generate:tests

This error shows up-

  Could not parse any test in xml. in
  C:\xampp\htdocs\magento\magecom\vendor\magento\magento2-functional-testing-framework\src\Magento\FunctionalTestingFramework\Test\Handlers\TestObjectHandler.php
  on line 137

Any idea on how i could solve this problem?

In windows xampp environment


texts: Magento 2 Commerce : How to get the customer segments associated with current customer?

texts: How do I get the customer segments associated with current logged in customer.


texts: In Setup upgrade and cache clear i get an error SQLSTATE[HY000] [2002] No such file or directory

texts:
I got some errors in my system (ubuntu 18.6) when I clean my cache and setup upgrade. and I am not localhost in URL I am using IP address.

In Cache clean


texts: Error while installing sampledata Magento 2.4

texts:
I have setup the Magento 2.4 on Windows 10.
I have run these commands to install the sampledata:
php bin/magento sampledata:deploy   - Working
php bin/magento setup:upgrade   - Error

Error: Unable to apply data patch Magento\CatalogSampleData\Setup\Patch\Data\InstallCatalogSampleData for module Magento_CatalogSampleData. Original exception message: Rolled back transaction has not been completed correctly.
For clarification see attached screenshot:

Note- I am getting this error only in Magento2.4 version


texts: Searchresults shows filters, category pages does not

texts:
I found the bugs in my previous question. So, now I have the filters for my custom attribute... But that is only on the search results pages. Not on the category pages.

On the category pages there are no attributes at all, no shop by price or whatever... Just the categories :(


texts:
I'm looking for a working example of a PHP script for authentication using OAuth.

I have followed the testing instructions here (http://www.magentocommerce.com/api/rest/testing_rest_resources.html) using the REST client on Firefox.

I already have created a consumer so I have the Consumer Key and Consumer Secret.  But, according to the website I also need an Access Token and an Access Token Secret. I'm not entirely sure how to get those.  I've googled other examples for different APIs (e.g., Twitter), but I cannot port the knowledge over to Magento.

Any help is appreciated.


texts: Magento 2 - Custom Product Attribute Category Model

texts:
Upgrading an M1 site that uses the following function to output a link to a custom product attribute collection.  Can someone help me with the proper way to do this in M2?  Thanks!
$cats = $_product->getCategoryIds();

addSeriesLinkToMsg($cats);

/**
 * @param $cats
 *
 * @return string
 */
function addSeriesLinkToMsg($cats)
{
    if (in_array(SERIES_CAT, $cats))
    {
        //Loop through all categories and find the furthest down
        $series_cat = Mage::getModel('catalog/category')->load(SERIES_CAT);
        foreach ($cats as $cat)
        {
            $my_cat = Mage::getModel('catalog/category')->load($cat);

            if (stristr($my_cat->getPath(), "/" . SERIES_CAT . "/") && $my_cat->getLevel() > $series_cat->getLevel())
            {
                $series_cat = $my_cat;
            }

        }

        //Only display the message if the series category isn't the root
        if ($series_cat->getId() != SERIES_CAT)
        {
            return "Series: getUrl() . "\">" . $series_cat->getName() . "";
        }
    }
    return '';
}


texts: How to sort bill me later under the Paypal

texts: is there any way to sort PayPal and Bill me later methods in Magento, all i want is to have this order in the checkout page 1 .Paypal and 2. Bill me later. Now i have first Bill me later.


texts: Bad performance looping through all products

texts:
I need to loop through all products to build a xml - file but my script ceeps running for hours, and with every loop it seems getting slower. What can i do to speed it up ? First i loop through the category tree, when i find a "leaf" (endpoint) of a category, i try to get all of it's products with the following script:

$collection = Mage::getModel('catalog/category')
        ->load($catId)
        ->getProductCollection()
        ->addAttributeToSelect('*')
        ->addAttributeToFilter('category_id', $catId)
        ->addAttributeToFilter('type_id', 'simple')
        ->addAttributeToFilter('status', 1)->load();

Consideration Nr. 1:
Mage::getModel('catalog/product') in the foreach-loop:

      foreach($collection as $col) {
$prod = Mage::getModel('catalog/product')->load($col->getId());
    }

But the performance is horrible

Consideration Nr. 2:
ceeping the Mage::getModel('...') out of the loop by just loading a new id inside the loop

$prod = Mage::getModel('catalog/product');
foreach($collection as $col) {
$prod->load($col->getId());
}

The performance is much better but some product values are alway the same so i think this solution wound't work ?

The best way would be using the $collection data itself but i'miss some important data in the $collection.

How can i get all attributest of a product in a collection when i try to get all attributes by using the $collection i get this:

foreach($collection as $col) {
    echo "<pre>";

    print_r(getAttributes($col));

    echo "</pre>";

    exit;
}

function getAttributes($prod) {
    $attributes = $prod->getAttributes();

    foreach ($attributes as $attribute) {
        if ($attribute->getIsVisibleOnFront()) {
            $value = $attribute->getFrontend()->getValue($prod);
            echo "The Value " . $value;
            if($value=='keine Angabe' || !$value)
                continue;
            if ($attribute->getFrontendInput() == 'price' && is_string($value)) {
                $value = Mage::app()->getStore()->convertPrice($value, true);
            }

            if (is_string($value) && strlen($value)) {
                $data[$attribute->getAttributeCode()] = array(
                    'label' => $attribute->getStoreLabel(),
                    'value' => $value,
                    'code'  => $attribute->getAttributeCode()
                );
            }
        }
    }
    return $data;
}

8
  [color] => Array
        (
            [label] => color
            [value] => No
            [code] => color
        )

But when i use the getModel i get the correct value

$_product = Mage::getModel('catalog/product')->load($col->getId());
print_r(getAttributes($_product));

[color] => Array
        (
            [label] => color
            [value] => white
            [code] => color
        )

Is there any way to get all attributest by using the collection ?

Thx


texts:
how to include library in magento 2 using helper as below is the class for magento 1 that is Mage::getBaseDir ,

 <?php

  namespace vendor\Module\Model;

   require_once(Mage::getBaseDir('lib') '/vendor/libname/class.php');


texts:
I have trouble with SEO optimization on Magento.
I have one website, one store and 2 store views: one for uk and one for fr.

I am trying to improve the SEO but for the moment on google.fr for instance the description and title that are returned is the english version while i was expecting the french version.

I have configured my store to have the right description depending on the store view (in configuration -> Design -> HTML Head). Though it looks like google does not pick this.

I am not sure how i should configure the information for the

  Default configuration, the default website, the Store and the Store Views

Or maybe there are some other elements to configure

Thanks a lot


texts: Magento 2 Get sub category of parent by object Manager in phtml

texts:
I want to get the sub category objects of parent category.

Thanks


texts: Display Color swatch option in product listing page in magento 2

texts:
I want to display color images on product listing page https://prnt.sc/sush2z.
I have made color attribute and selected swatch option. Assigned color images too. https://nimb.ws/Sw9mEN

Did Visible on product listing as yes https://nimb.ws/ux3R5y

Still it does not show on product listing page.
Can anybody help?


texts: adminhtml redirection pb from controller

texts:
In a module I created a new file type product option. The goal was to add a "file is valid" parameter.

With this option, I can define in the admin panel the option "is valid" state from the order detail view page and a button permits to submit the state change via a controller.

I would like after submission to be redirected to the order detail view page.

I tried $this->_redirect('*/*'); but get 404 error

my option phtml
(app/design/adminhtml/default/default/template/custoptiontypev6/options/customview/xfile.phtml)

    ...

        <FORM id="xfile_state_sel" method="post" style="margin: 0px 5px 0px 15px;" action="<?php echo Mage::helper("adminhtml")->getUrl("custoptiontypev6/xfile/update");?>">
            <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
            <input name="order_id" type="hidden" value="<?php echo $_order_id ?>" />
            <input name="item_id" type="hidden" value="<?php echo $_item_id ?>" />
            <input name="option_id" type="hidden" value="<?php echo $_optionid ?>" />
            <input name="option_label" type="hidden" value="<?php echo $_label ?>" />
            <INPUT type= "radio" name="<?php echo 'Xfile_option_'.$_optionid.'_'.$_label;?>" value="Checking" <?php echo $_checked_verif;?>> Being verified
            <INPUT type= "radio" name="<?php echo 'Xfile_option_'.$_optionid.'_'.$_label;?>" value="Files_OK" <?php echo $_checked_ok;?>> Files OK
            <INPUT type= "radio" name="<?php echo 'Xfile_option_'.$_optionid.'_'.$_label;?>" value="Files_not_OK" <?php echo $_checked_notok;?>> Files not OK
            <button type="submit" style="margin: 0px 5px 0px 15px;">Update state</button>
        </FORM>

The controller :

<?php
class Mine_Custoptiontypev6_XfileController extends Mage_Adminhtml_Controller_Action
{
    public function updateAction()
    {
        $post = $this->getRequest()->getPost();
        try {
            if (empty($post)) {
                //echo 'Invalid form data.';
            }

            /******* form processing *******/

    ...

        $this->_redirect('*/*');
    }
}
?>

Thank you for your help,


texts:
I configured Varnish. And Everything works fine. But some blocks are cached (but they shouldn't). I use Turpentine extension.
For example in my layout:
     <reference name="left">
            <block type="catalog/product_compare_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
     </reference>

In turpentine_esi.xml I have:
    <reference name="catalog.compare.sidebar">
        <action method="setEsiOptions">
            <params>
                <access>private</access>
                <flush_events>
                    <catalog_product_compare_add_product/>
                    <catalog_product_compare_remove_product/>
                    <catalog_product_compare_item_collection_clear/>
                </flush_events>
            </params>
        </action>
    </reference>

But when I add product to compare(via ajax) the compare block's info didn't flush.
Also, if I restart varnish, compared product appeared.


texts: After upgrade to 1.9 configurable product options not displaying

texts:
I upgraded from 1.7 to 1.9, and the drop down menu to select a shirt size is not showing on the product view page. I've disabled all extensions and set the site the default theme/package, and it still does not show. I've traced it back to the following line of code in gear/app/design/frontend/base/default/template/catalog/product/view/options.phtml

$_options = Mage::helper('core')->decorateArray($this->getOptions())

Basically $this->getOptions is returning an empty array. I can't figure out why. Has anyone experienced something similar? Bundle products work, I can choose options there, its just Configurable products that are not working.


texts:
I'm starting to learn Magento 2 and I read some instructions to create Controller.
There are the index.php. on Magento 2 _ development cookbook and another on website.
/** @var \Magento\Framework\View\Result\PageFactory  */
       protected $resultPageFactory;
public function __construct( \Magento\Framework\App\Action\Context $context,
           \Magento\Framework\View\Result\PageFactory
$resultPageFactory ){
$this->resultPageFactory = $resultPageFactory;
           parent::__construct($context);
       }
       public function execute()
       {
$resultPage = $this->resultPageFactory->create();
           return $resultPage;
       }

and the another code that I read.
 class Index extends Action
{
    public function execute()
    {
        $this->_view->loadLayout();
        $this->_view->renderLayout();`

I saw that, two codes are show same layout page Magento. So what does the different between that ?`


texts: Magento 2 - How to increase % match of search term?

texts: I want to increase the percentage (%) match of search term so that the most relevant matching product will show on top. From where should I do that? I tried finding it in Smile Elastic Suite setting but didn't get it.


texts: Need some brief difference about interfaces and model?

texts:
As we know save method by using modelfactory is deprecated i just want to know what is the alternative and how it is implemented because i tried API interfaces but at save i got stuck so kindly anyone give some details about what is the alternative for modelfactory and its use.
thanks in advance


texts: Magento 2 custom quote and order item attributes based on user input in add to cart reqeust

texts:
What I am trying to achieve is displaying a input field inside a bundle product where I give an option to the user to set a name for that bundle product. I am trying to transfer this user input to quote item which is create after the bundle is added to cart and later to order item. I need to display this data in the cart and in order details.

In my custom module I am creating two observers. One for writing the custom attribute in the product from the request and one for transferring it from the product to the quoteItem. I have events.xml to register the events, fields.xml to define the mapping (I am not sure is this the correct way for magento 2) and two observer classes.
Here is my code:

events.xml

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd">
    <event name="checkout_cart_add_product_complete">
        <observer name="CustomModules_AddProductCompleteObserver" instance="CustomModules\Bundle\Model\AddProductCompleteObserver" />
    </event>
    <event name="sales_quote_item_set_product">
        <observer name="CustomModules_QuoteItemObserver" instance="CustomModules\Bundle\Model\QuoteItemObserver" />
    </event>
</config>

fields.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd">
    <scope id="global">
        <fieldset id="sales_convert_quote_item">
            <field name="bundle_product_name">
                <aspect name="to_order_item" />
                <aspect name="to_invoice_item" />
                <aspect name="to_shipment_item" />
                <aspect name="to_cm_item" />
            </field>
        </fieldset>
        <fieldset id="sales_convert_order_item">
            <field name="bundle_product_name">
                <aspect name="to_quote_item" />
                <aspect name="to_invoice_item" />
                <aspect name="to_shipment_item" />
                <aspect name="to_cm_item" />
            </field>
        </fieldset>
    </scope>
</config>

AddProductCompleteObserver.php

...
    public function execute(\Magento\Framework\Event\Observer $observer)
{
    $product = $observer->getEvent()->getProduct();
    $reqeust = $observer->getEvent()->getRequest();
    //bundle_product_name is send by the submit form
    $bundleProductName = $reqeust->getParam('bundle_product_name');
    if(empty($bundleProductName)){
        $bundleProductName = 'No name';
    }
    $product->setBundleProductName($bundleProductName);
}
...

QuoteItemObserver.php

...
public function execute(\Magento\Framework\Event\Observer $observer)
{
    $product = $observer->getProduct();
    $quoteItem = $observer->getQuoteItem();
    $quoteItem->setBundleProductName($product->setBundleProductName());
}
...

After that I am trying to display the quotedItem in the cart by changing Magento_Checkout/templates/cart/item/default.html in my custom theme

default.html

...
<?php echo $block->escapeHtml($_item->getBundleProductName()) ?>
...

but the printed value is empty. I tried to debug the flow and what I have found is that AddProductCompleteObserver.php correctly sets the product attribute, but it is cleared out when the next event occurs.

I will appreciate any help on that.


texts: Which Magento 1 caches should be cleared after installing an extension?

texts: As a rule of thumb, which Magento 1 caches should be cleared after installing an extension?


texts: Magento 2: Display "Call For Price" instead of $0 or $0.00

texts:
I have searched and found several options for Magento 1 but the only option so far for Magento 2 is an extension and it displays Free instead of Call for Price.

I have seen a couple of options that may be for Magento 2 but no idea which files they are editing.

Does anyone know which file & location of said file to edit and with what?

Additionally, since there is no price I would prefer to disable the add to cart button for these items if this is possible.

Thank you in advance!


texts:
So I found that you are able to add any script to the head tag of your Magento 2 site via the Magento 2 interface content->configuration->html head-> scripts and sheets.

I've added a:

 <script type="text/javascript" src="site/js/scripts.js"></script>

Is this Ok ? Any downsides etc ?


texts:
I've disabled the weight attribute in the database (is_required=0) because we didn't need it, so we didn't have to fill it in at every product. Quite stupid, because now we want to enable table rate shipping weight vs destination. Obviously this doesn't work, because it can't do anything with the weight attribute because it didn't recognize it anymore.

Yesterday I've changed is_required to 1, restored the defaults but that was messing up my products, the attribute sets were gone, 404 when opening a product in frontend. Restored it with my DB backup.

Do you guys have any idea how to fix this, or a workaround so I can use the weight vs destination shipping?


texts: Magento 2: Get Product URL in Shipment Email

texts:
I was trying to link the product name in the shipment mail to the product on our page, so the customer can click on the product name in the shipment mail.

I have tried with

  $_item->getProduct()->getProductUrl()

but getProduct() returns null.
The same code worked for the order confirmation mail.

Does anybody know how I can get the product URL?

Thanks


texts:
I would like to create a coupon with following conditions:
 - There are special products for which the coupon is valid
 - For the first article, you get 10%
 - If you buy the second article you get additionally 5% on the whole cart
 - And if you buy a third article or more you get additionally 5% on the cart, so the maximum discount is 20%
 - For this, the quantity of the article doesn't matter

Is this possible?


texts:
I want to track how many times customer logged in.

So as output it will be like report. From this to this day X day logged in X times.


texts:
I have a static block in which content I have this code: something
The url of the project is dns/my_installation/..., so my point is that when I click on the block link it will direct me to dns/my_installation/de/sale, but instead it gives me error 404 and the url of the page looks like this: dns/de/sale, so basically the /my_installation/ part is cut off.

Any idea why would that happen?


texts: Customer custom attribute not showing in admin form

texts:
I successfully add customer custom attribute for magento 2.2.5 like this:

$setup->startSetup();

$insertArray = array(
            'profile_picture' => array("type" => "varchar", "label" => "Profile Picture"),
            'security_question_1' => array("type" => "int", "label" => "Security Question 1"),
            'security_question_2' => array("type" => "int", "label" => "Security Question 2"),
            'security_answer_1' => array("type" => "varchar", "label" => "Security Answer 1"),
            'security_answer_2' => array("type" => "varchar", "label" => "Security Answer 2")
          );

          foreach ($insertArray as $key => $data) {
            $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

            $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
            $attributeSetId = $customerEntity->getDefaultAttributeSetId();

            /** @var $attributeSet AttributeSet */
            $attributeSet = $this->attributeSetFactory->create();
            $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

            $customerSetup->addAttribute(Customer::ENTITY, $key, [
                'type' => $data['type'],
                'label' => $data['label'],
                'input' => 'text',
                'required' => false,
                'visible' => true,
                'user_defined' => true,
                'sort_order' => 1000,
                'position' => 1000,
                'system' => 0,
            ]);

            $attribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, $key)
            ->addData([
                'attribute_set_id' => $attributeSetId,
                'attribute_group_id' => $attributeGroupId,
                'used_in_forms' => ['adminhtml_customer'],
            ]);

            $attribute->save();
          }
            $setup->endSetup();

I can retrieve and set the value programmatically, but the problem is when i edit customer in backend and go to account information tab, it doesn't load the input field for my custom attribute? if there is something missing, how can i update the customer custom attribute?


texts:
I have a Magento 2 site that is set up to sell books.  I have attributes Author and Publisher that are both set to "Use in Search" and
"Visible in Advanced Search".

The issue is when searching Author for say "James Patterson" I get every item
that has either "James" or "Patterson" in the Author attribute,
and exact matches are scattered through out the results, especially when searching with other attributes.

I've already created a module and edited

  app/code/vendor/extension/etc/search_request.xml by changing

<queryReference clause="should" ref="search" />
to
<queryReference clause="must" ref="search" />

This helps the quick search but has no effect on advanced search.

Is there a way to force advanced search do an exact match,
even on if it is on certain attributes?