texts: Magento 2 csv import : How to escape commas in additional_info?

texts:
I am importing products via .csv import.  I have an additional_attribute field that contains commas.  Commas are the delimiter within additional_attributes, and when i try to import my products, all of the additional attribute fields that contains commas get cut off after the first comma.  How can i prevent this?

I defaulted to adding a product with a comma in the additional attribute field through the admin and exported it.  It looked normal, as shown below at "the battlefield, draw".  But if i try to import that same .csv file the text will be cut off after "battlefield"
I tried a forward slash(backslash?) to no avail. I even surrounded the text in double-quotes for the import... no dice...

    color=White,magic_card_number=125,magic_cmc=4,magic_expansion=Alliances,magic_flavor_text=
coming soon
,magic_power=1,magic_rarity=Common,magic_rules_text=
Flying

When Carrier Pigeons enters the battlefield, draw a card at the beginning of the next turn's upkeep.
,magic_toughness=1,magic_type=Creature,manufacturer=Wizards of the Coast


texts: How to change product price in multishipping quote?

texts:
I am working in one module where I need to set my custom price replacing product price in multishipping quote. Price changed successfully on cart page and onepage checkout, but in multhishipping it takes default product price, how can I change price in multishipping?

Please help.


texts: Magento 2.1 Need to show popup in admin grid action with Ui Component

texts:
I have added following code. but seems it's not working

public function prepareDataSource(array $dataSource)
    {
        if (isset($dataSource['data']['items'])) {
            foreach ($dataSource['data']['items'] as &$item) {
                if (isset($item[AlertInterface::ID])) {
                    $item[$this->getData('name')] = [
                         'view' => [
                            'href' => $this->urlBuilder->getUrl('adminhtml/*/preview', ['id' => $item['id']]),
                            'popup' => true,
                            'target' => '_blank',
                            'label' => __('Preview')
                        ]
                    ];
                }
            }
        }
        return $dataSource;
    }


texts:
Home page and categories pages have different meta name ="robots" tags.

I found out my website has

<meta name="robots" content="INDEX,FOLLOW"/>

tag showing for the pages that has 1 column layout 'page-layout-1column' like home page and product pages.

But category pages shows meta tags as

<meta name="robots" content="NOINDEX,NOFOLLOW"/>

and the layout for category page 2 columns left "page-layout-2columns-left".
I need to add INDEX, FOLLOW for category pages also.
I found out it may be due to the different page layouts. But I could not locate what I need to change.

I have checked inside content->design->configuration and found out in Search Engine Robots section INDEX, FOLLOW is selected.

I need to add INDEX, FOLLOW for category pages. Please guide me What changes I need to do to achieve this?


texts:
I'm using  Magento 2.3.6-p1
In Cli commands everything  works fine.
I can ran setup:upgrade, compilation, content:deploy, etc.
But, when I go to www.mystore.com I get the following:
2 exception(s):
Exception #0 (Zend_Db_Adapter_Exception): SQLSTATE[HY000] [2002] No such file or directory
Exception #1 (PDOException): SQLSTATE[HY000] [2002] No such file or directory
Exception #0 (Zend_Db_Adapter_Exception): SQLSTATE[HY000] [2002] No such file or directory
You can view the entire error log goingo to www.infotatil.pt
I tried everything I found in Google.
Changed host from "localhohst" to "127.0.0.1" in  /app/etc/env.php,  triple checked mysql credentials, tried to connect to  mysql in commandline, everything works fine, but magento web front  continue giving this error.
Server info:
cPanel  WHm 94.08, mysql maria DB 10.3, php 7.3.27
Thank you for any help;


texts: What's your take on using a custom helper in templates?

texts:
I'm faced with a problem where I can either make a helper in my extension to do some simple task or override multiple block class functions. This is a utility function, so I would typically make a helper, but it is going to be used in templates to manipulate outputs to the screen. For simplicity's sake, let's say I just want to replace the string ABC with XYZ in some cases, and it cannot be done via translation.

Here's the dilemma, since template files are not contained in the app directory, you could potentially get fatal errors when you disable the relevant extension and leave rogue helper calls in the templates. There are multiple template files where I would need to utilize this function. I've seen rogue helper calls break pages on multiple sites.

While I can also customize each of the templates to minimize potential errors, a simple Mage::helper('myextension')->convertString($str) would reduce the amount of work significantly.

What's your take on this kind of issue? I know it's subjective, but I did not find any useful reference online, and I just have my own judgement call. It doesn't hurt to hear what others have to say!

Not completely relevant but still here's one discussion.


texts: Magento customer registration not saving selected state/region

texts:
So for some reason my Magento install (1.5) stopped saving new customers state/region name, both inside admin and outside.

Magento's registration form has a dropdown select, with a name of "region_id" and a hidden text field named "region". I guess that some javascript is supposed to get the selected name and set the "region" field, but that doesn't work.

What I did was create a jQuery line that, on form submit, gets the region name and sets the "region" field to it. That works, somewhat. There are still customers who are registering without a region name, only the id.

Anyone ever had something similar?


texts: Can't retrieve entity config: Module Sql Setup Error

texts:
In my custom module, while setting sql_setup i got this error,

Can't retrieve entity config: membership/members"

Error Report:

a:5:{i:0;s:163:"Error in file: "C:\xampp\htdocs\ems\app\code\local\Att\Membership\sql\membership_setup\mysql4-install-1.0.0.php" - Can't retrieve entity config: membership/members";i:1;s:908:"#0 C:\xampp\htdocs\ems\app\code\core\Mage\Core\Model\Resource\Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
1 C:\xampp\htdocs\ems\app\code\core\Mage\Core\Model\Resource\Setup.php(421):
Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.0.0')
2 C:\xampp\htdocs\ems\app\code\core\Mage\Core\Model\Resource\Setup.php(327):
Mage_Core_Model_Resource_Setup->_installResourceDb('1.0.0')
3 C:\xampp\htdocs\ems\app\code\core\Mage\Core\Model\Resource\Setup.php(235):
Mage_Core_Model_Resource_Setup->applyUpdates()
4 C:\xampp\htdocs\ems\app\code\core\Mage\Core\Model\App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
5 C:\xampp\htdocs\ems\app\code\core\Mage\Core\Model\App.php(343): Mage_Core_Model_App->_initModules()
6 C:\xampp\htdocs\ems\app\Mage.php(683): Mage_Core_Model_App->run(Array)
7 C:\xampp\htdocs\ems\index.php(93): Mage::run('', 'store')
8 {main}";s:3:"url";s:5:"/ems/";s:11:"script_name";s:14:"/ems/index.php";s:4:"skin";s:7:"default";}

config file:

 <models>
        <membership>
            <class>Att_Membership_Model</class>
            <resoursemodel>membership_mysql4</resoursemodel>
        </membership>
        <membership_mysql4>
             <class>Att_Membership_Model_Mysql4</class>
             <entities>
                 <members>

membership

                 </members>
              </entities>
        </membership_mysql4>
    </models>
    <resources>
        <membership_setup>
            <setup>
                <module>Att_Membership</module>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </membership_setup>
        <membership_write>
            <connection>
                <use>core_write</use>
            </connection>
        </membership_write>
        <membership_read>
            <connection>
                <use>core_read</use>
            </connection>
        </membership_read>
    </resources>

controller file:

 class Att_Membership_indexController extends
 Mage_Core_Controller_Front_Action{

 public function viewAction(){
 $params = $this->getRequest()->getParams();
 $prefs = Mage::getModel('membership/members');
 echo ("Loading the blogpost with an Id of " . $params['id']);
 $prefs->load($params['id']);
 $data = $prefs->getData();
 var_dump($data);
 } }

mysql setup file : mysql4-install-1.0.0.php

$installer = $this;
$installer->startSetup();
$installer->run("
DROP TABLE IF EXISTS {$installer->getTable('membership/members')};
CREATE TABLE {$installer->getTable('membership/members')} (
memberid int(11) NOT NULL auto_increment,
name text,
type text,
date datetime default NULL,
timestamp timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (memberid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ");
$installer->endSetup();

models file:

class Att_Membership_Model_Members extends Mage_Core_Model_Abstract{
public function _construct(){
$this->_init('membership/members');
} }

class Att_Membership_Model_Mysql4_Members extends Mage_Core_Model_Mysql4_Abstract{
public function _construct(){
$this->_init('membership/members','memberid');
} }


texts: Category URL path is a 404 when using category name in URL path

texts:
My Magento store is setup with my product category titled 'Technology'.
There are several subcategories that display static blocks only. The URL path to the subcategories should be /technology/subcat1/subcat2.
However, this URL is a 404.  If I use /products/subcat1/subcat2 it works.
Essentially, when I use a subcategory in the 'Technology' category, I cannot use technology in the URL or links. The only path that will work is 'products'.
When debugging the url_path for my categories contains products even though the category in the admin is titled 'technology'.

I've tried clearing cache, indexes (even though url_rewrite indexes are handled differently in M2), adding URL rewrites in the admin, etc. Nothing seems to be working.
The 'Use Web Server Rewrites' config setting is set to 'Yes'.


texts:
I have truble with observer, don't know how to solve it!

Here is part of the config.xml and Observer.php files

Mycompany/Mymodule/etc/config.xml

<?xml version="1.0"?>
<global>
        <models>
            <mymodule>
                <class>Mycompany_Mymodule_Model</class>
                <resourceModel>mymodule_mysql4</resourceModel>
            </mymodule>
            <mymodule_mysql4>
                <class>Mycompany_Mymodule_Model_Mysql4</class>
                <entities>
                    <mymodule>

mymodule

                    </mymodule>
                </entities>
            </mymodule_mysql4>
        </models>
        <events>
            <checkout_type_onepage_save_order_after>
                <observers>
                    <mycompany_mymodule_order_complete>
                        <class>mymodule/observer</class>
                        <method>mymoduleCompleteOrder</method>
                    </mycompany_mymodule_order_complete>
                </observers>
            </checkout_type_onepage_save_order_after>
       </events>
 </global>

Mycompany/Mymodule/Model/Observer.php

class Mycompany_Mymodule_Model_Observer
{
    protected $_config;

    protected function _construct()
    {
        $this->_config = Mage::getModel('mymodule/config');
    }

    public function mymoduleCompleteOrder($observer)
    {...
      ....
    }


texts: Magento2 : How to restrict new categories assignment while importing products via CSV

texts:
When I import product from CSV file with new categories then magento2 create new categories.

But magento assign these categories to all stores, I want to restrict this and want that these categories will be enabled only on default store.

How can I achieve this?
Should I add any event in custom module which disabled back these categories to sub store views?


texts: Magento 2: Show each time different comment depends on Field option value in system.xml

texts:
Currently, using the below code in the system.xml

Does anyone have a more efficient way (using only one Field or some other way) to do this?

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>

            Name of Module
            <tab>tabname</tab>
            <resource>Namespace_ModuleName::method</resource>
            <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                General
                <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    Enable
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>
            <group id="connection" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                Connection
                <field id="ssl" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                    Check
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="comment1" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                    &nbsp;
                    <comment>If Yes Selected from Field ssl this comment should show.</comment>
                    <depends>
                        <field id="vendor/connection/ssl">1</field>
                    </depends>
                </field>
                <field id="comment2" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                    &nbsp;
                    <comment>If No Selected from Field ssl this comment should show.</comment>
                    <depends>
                        <field id="vendor/connection/ssl">0</field>
                    </depends>
                </field>
            </group>

    </system>
</config>

Using the above code(Separated Fields for each comment) seems to be working as different fields are involved.


texts: Declaring observer from xml for review form submit issue

texts:
Hey I am trying to declare an observer from xml but it doesn't work. This is my xml:

<config>
<global>
            <events>
                <review_save_after>
                    <observers>
                        <mynamespace_mymodule_review_save_after>
                            <type>singleton</type>
                            <class>Mynamespace_Mymodule_Model_Observers_Review</class>
                            <method>redirectSuccess</method>
                        </mynamespace_mymodule_review_save_after>
                    </observers>
                </review_save_after>
            </events>
</global>
</config>

I put an  exit in my redirectSuccess function, but it doesn't go there. I guess something is wrong with my xml. Can you help me ? thx


texts: I've updated an attribute massively, it's OK in the frontend, but in backend the value don't change

texts:
I've updated an attribute using Mage Code, when I check the product View page, the attribute value is updated correctly. But in the admin area, the attribute is not updated, I've cleared cache, but the value attribute in the admin area is the same and in the product view is the new value.

I've installed Magento 1.8.0 CE

This is the pseudo script

$_product = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku[$i]);
  $productIds[$i] = $_product->getId(); // get the product Id
  $attrData[$i] = array("tiempo_entrega" => $tiempo[$i]); // the attribute to update


texts: magento 1.9.3 Unknown cipher in list: TLSv1 even can't find keyword'TLSv1'

texts:
I find answer in

  Magento 1.9.2 Unknown cipher in list: TLSv1

But i can't find code like
$this->curlOption(CURLOPT_SSL_CIPHER_LIST, 'TLSv1');in my Curl.php

Couldn't even find the keyword 'TLSv1'.

What should I do?


texts: Security Patch SUPEE-10415 - Possible Issues?

texts:
New Magento 1 patch has been released, SUPEE-10415.

  This patch provides protection against several types of security-related issues

Info page: https://magento.com/security/patches/supee-10415
Download page: https://magento.com/tech-resources/download

What are the possible issues to watch out?

Also, please share all the bugs and problems that you have found after patch install.

Issue with applying SUPEE-10415 on vanilla 1.9.1.1, shows cannot be applied due to hunk error message at Image.php.
EDIT: As of Dec 7, 2017 fix is provided in SUPEE-10497
Must have 8788 Versions 2 installed, otherwise will see "Unsupported data type" errors. More info.
"404: Page Not Found" error from the errors/ directory after upgrading to SUPEE-10415. This issue occurs only in Magento installations that run certain third-party extensions.
Workaround: Confirm that there are no PHP warnings generated by any of the extensions or customizations.


texts: override includes: getModuleDir() or relative path?

texts:
Mage::getModuleDir seems to be a widely-used way to build requires (for example, for overriding a controller). But Magento itself seems to use relative paths, relying on the opening lines of Mage.php:

/**
 * Set include path
 */
$paths = array();
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'local';
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'community';
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'core';
$paths[] = BP . DS . 'lib';

$appPath = implode(PS, $paths);
set_include_path($appPath . PS . Mage::registry('original_include_path'));

As long as the code I'm overriding is in 'local', 'community', 'core' or 'lib', what need is there to use getModuleDir? For example, I might write:

require_once(Mage::getModuleDir('controllers', 'Mage_Customer') . DS . 'AccountController.php');
class My_Customer_AccountController extends Mage_Customer_AccountController
{}

Or I could just write

require_once('Mage/Customer/controllers/AccountController.php');
class My_Customer_AccountController extends Mage_Customer_AccountController
{}

What is better about one or the other?


texts: Can't find customer attribute source model

texts:
I have a module:

Model/SelectType.php

class NAME_CustomField_Model_SelectType
{
  public function toOptionArray()
  {
    return array(
      array('value' => '1', 'label' => '1'),
      array('value' => '2', 'label' => '2'),
      array('value' => '3', 'label' => '3'),
    );
  }
}

in my etc/config.xml I have:

<config>
    <modules>
        <NAME_CustomField>
            <version>0.1.1</version>
        </NAME_CustomField>
    </modules>
    <global>
        <models>
            <customfield>
                <class>NAME_CustomField_Model</class>
            </customfield>
        </models>
    </global>
...

Now, if I set in the DB (table: eav_attribute) source_model to: customfield/selectType it gives an error: Source model "customfield/selectType" not found.

UPDATE:
I've moved my file to: "code/core/Mage/Customer/Model/Customer/Attribute/Source" (for testing ofcourse) and changed the resource model to: customer/customer_attribute_source_selecttype
This works, so I think there is something in my /etc/*.xml that is wrong, but I can't seem to find what it would be... :-S


texts: How to unset default notification manually Magento

texts:
In magento 1.9, i want to unset notification manually. For example on adding product to cart we got message "xyz added to cart successfully". I want to unset that type of message/notification manually.
Please anybody can suggest me, where may be file about it.


texts: Cannot get cron.php /cron.sh to run via cronjob

texts:
I'm really struggling with the below cron job and any help would be appreciated. I'm running Magento and I'm trying to run cron.php every minute through a cron job. I now understand that you should use cron.sh which I've also tested below.

I can log into SSH and run any of the following commands and they all work as they should, forgot password emails sent / new products created from an import etc:

/usr/bin/sh /home/thefootb/public_html/cron.sh cron.php --mode=always
/usr/bin/sh /home/thefootb/public_html/cron.sh cron.php --mode=default
/usr/bin/php /home/thefootb/public_html/cron.php

But when I but these into a cron job (logging into SSH and using crontab -e) nothing happens. Here's my crontab file:

SHELL="/bin/bash"
* * * * * /usr/bin/sh /home/thefootb/public_html/cron.sh cron.php --mode=always
* * * * * /usr/bin/sh /home/thefootb/public_html/cron.sh cron.php --mode=default
* * * * * /usr/bin/php /home/thefootb/public_html/cron.php

I've also tried:

* * * * * /usr/local/bin/php /home/thefootb/public_html/cron.php

As I this is what my host advised me.

I'm really stuck with this - it should be so simple but it just won't work.

Thanks in advance
Chris


texts: How to remove TEXT of checkout/Order Review page in magento?

texts: how to add custom text in layout page in magento ?


texts: Magento 2 - Rest API - How to get the text of a custom attribute that is a drop-down menu

texts:
I have a custom attribute that is a drop-down with the brands of my products.
If I query
$query = 'https://example.com/rest/V1/products?'.
"fields=items[id,sku,name,custom_attributes[Brand]]".
'&searchCriteria[pageSize]=1';

I get
{
    "items": [
        {
            "id": 577,
            "sku": "TAC_520UT",
            "name": "Tacometro 520mm Ultra Tunne",
            "custom_attributes": {
                "1": {
                    "attribute_code": "Brand",
                    "value": "415"
                }
            }
        }
    ]
}

The brand is giving me  415, while at the interface that is not a number, is the text "Kamoha"
How can I query for the text of Brand 415 and get "Kamoha" as a Rest API call?
Thanks in advance.


texts: Magento swf XSS vulnerability - How to address it?

texts:
Per the SWF / Flash vulnerability listed at:
http://appcheck-ng.com/unpatched-vulnerabilites-in-magento-e-commerce-platform/

which I've verified does still exist in Magento 1.9.1.0, what is the best method to address this? Any issues with blocking or restricting access to these swf files?


texts: "Invalid Factory for nonexistent class" (setup:di:compile error)

texts:
I get the following error when running bin/magento setup:di:compile:

Errors during configuration scanning:
        IntegerNet\SolrSuggest\Implementor\Factory\AppFactory
                Invalid Factory for nonexistent class IntegerNet\SolrSuggest\Implementor\Factory\App in file [...]/vendor/integer-net/solr-magento2/src/Model/Cache.php

The AppFactory is actually a real interface from a library, it should not be generated by Magento. As far as I understood the generation, factories are only generated if the class does not exist. I double checked that the file exists and the directory is registered in vendor/composer/autoload_psr4.php.

This is how the class that depends on the factory looks like:

Cache.php

<?php
namespace IntegerNet\Solr\Model;
use IntegerNet\SolrSuggest\Implementor\Factory\AppFactory;
class Cache
{
    /**
     * @var AppFactory
     */
    private $appFactory;
    public function __construct(AppFactory $appFactory)
    {
        $this->appFactory = $appFactory;
    }
}

And this is the factory:

AppFactory.php

<?php
namespace IntegerNet\SolrSuggest\Implementor\Factory;
use IntegerNet\SolrSuggest\Implementor\Factory\CacheWriterFactory;
use IntegerNet\SolrSuggest\Implementor\Factory\ConfigFactory;
interface AppFactory extends ConfigFactory, CacheWriterFactory
{
}

I defined a preference for the interface in di.xml:

<preference for="IntegerNet\SolrSuggest\Implementor\Factory\AppFactory" type="IntegerNet\Solr\Model\Bridge\AppFactory" />

Any idea what I can do about these messages?

Observation

In developer mode where I don't explicitly run the compile command, I don't get any errors. And although I get these error messages, compilation runs through and everything works - which proves that the factory classes can be used.


texts: magento 1.7.0.2 Update to 1.9.1.0 - content in the backend is missing

texts:
magento 1.7.0.2 Update to 1.9.1.0 - content (products/cms) in the backend is missing.

The navigation is displayed completely. The configuration is also there.

In front are all present. There is a copy on the localhost and Xampp

First = New version installed:
Second = I used this guide: http://www.fol9000.de/magento/magento-update-1-7-0-2-nach-1-8-0-0/

I'm still Magento beginners :)

could this been the problem (single shop)???


texts: Mgento 2.3.6 Paypal payment button is not showing

texts: Successfully add Paypal to Magento with a Sandbox account. but the button to pay with Paypal on the page is not shown


texts: Migration from CS-Cart 2.2.x to Magento 1.9 CE

texts:
I try to migrate from CS-Cart 2.2.x Multivendor Edition to Magento 1.9 CE. First I try to move the category data. I try to create dummy category (Fashion) in Magento. I try to look at mysql but I can't find where the data stored. Can Someone tell me which table contained category data?
Thanks


texts:
I wanted to delete a wrong credit memo so I deleted the wrong credit memo entry from sales_creditmemo and sales_creditmemo_grid. The listing of grid and credit memo is gone but when I view my order I could see refunded amount and comments about refund and the status of some product can also be seen as refunded .

So can someone explain what else I have to delete to completely get rid of credit memo information and also what is magento way of deleting a credit memo, does even magento provide a way to delete credit memo?


texts: I'm trying to override gallery.html in <magento-root>/lib/web/mage/gallery/gallery.html by placing the file in my theme located in <magento-root>/app/design/frontend/<vendor>/<theme>/web/mage/gallery/gallery.html.  Whatever edits I'm making to the file in my theme are not reflected on the frontend.  I've also tried deploying the static content with no luck.


texts: Magento 2 - how to update customer Info?

texts:
How to update the customer information in Magento 2 (Code to set data for customer).
Example: Update email_backup column of customer_entity table.


texts: Create a Magento shopping voucher code, first 3 products to be free and thereafter 10% off on rest

texts:
I'm having a giveaway soon, so will be making several codes

But I can't figure out how to make a voucher to have first 3 products free and thereafter at %10 percent off + p&p its going to be valid for a specific category

Any suggestions?


texts:
In my Codozan I have use an Image slider and in image I have use something like that in image caption

WHAT'S YOUR STORY?

A reminder of your very special place

         WATCH NOW

In my phtml file i have use Jquery for popup when click then link code like below

after changes I have flush cache but not working what did I do wrong


texts: Magento 2.1.9 Change Shipping method label

texts:
I am trying to update the shipping method label for UPS using the following code , but i am getting Recoverable Error: Object of class could not be converted to string

di.xml

<?xml version="1.0"?><config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\Quote\Model\Quote\Address\RateResult\Method">
    <plugin name="pluginChangeLables" type="Test\UpsLabels\Model\Quote\Address\RateResult\Method" sortOrder="10" disabled="false"/>
</type></config>

Method.php

 namespace Test\UpsLabels\Model\Quote\Address\RateResult;
 class Method {
 public function afterSetPrice($subject)
    {
      if ($subject->$this->getMethodTitle() === "UPS Ground") {
        $subject->setMethodTitle("3-5 days");
    }

    return null;
    }
}


texts: Create dynamic field with Drag-able feature in system configuration in magento 2

texts: I want to implement a dynamic field with a drag-able feature in a system configuration in Magento 2. Can I implement this feature or not?


texts: How to display payment methods on a phtml Magento 2?

texts:
How can I display all available payment methods on a phtml via layout file?

I have created a custom payment page and I want to show all available payments method there so user can select one and when he can click continue button, it will continue with selected payment method...

Please guide me how to achieve this with some code snippets or examples.

Thanks.


texts: Product weight is not allowed in my custom shipping method in French language in magento 2

texts:
I have two stores one is en_US and fr_FR. In en_US store my shipping is fetching data with out any issues. But in fr_FR store my shipping is not working. It shows error like below,

[2018-04-10 05:32:02] main.CRITICAL: exception 'Zend_Locale_Exception' with message 'No localized value in 0.1750 found, or the given number does not match the localized format' in /home/Sites/magento/vendor/magento/zendframework1/library/Zend/Locale/Format.php:255

I checked the reference the number format is not allowed in french language. For english Weight format is 0.1750 it's working. But for french the Weight format is 0,1750 I can't able to change in backend because weight attribute is Global. If I change to Store view  means no use it's not working. Please tell me how to fix this using language package or tell me any other way to fix this.


texts:
I have added a custom extension attribute following this guide.
However, I am struggling to understand it's purpose. By what I can see they are setting their extension attribute on the order every time the order is requested. However, they are also saving the data to a custom table using their own custom model.
So what is the point in adding an extension attribute? If you can just get that data using the model/repository?


texts: Add attribute group to only 1 attribute set

texts:
I use this code to add attribute group 'test1' into attribute set 'test'. But it always add to all attribute sets.

$attributeSetId = $model->getAttributeSetId('catalog_product','test');

$installer->addAttributeGroup('catalog_product',$attributeSetId,'test1');


texts:
I am using google analytics for event tracking in magento 2.

I have set up all event data layer in respective page like product page, listing page, checkout page.
All are reflected in Google tag manger preview with data layer. I didn't understand why this is not reflecting in google analytics/ event Overview.
I think this due secured or unsecured url.

Please guide me how control url as by default URL is unsecured with https://test.decure.in/

if i remove s from https: database i get 500 internal server error on click on every link.


texts: Get magento shipping amount from each ordered item

texts:
I am trying to get shipping and handling amount. I tried the below snippet code but its not working.

echo $item->getShippingAmount();

but if i try with

echo $order->getShippingAmount();

It works but that shows total of shipping amount of all order but i want to show for each item.

item ordered * quantity

can any one tell me how to do that?


texts: Trouble disabling top navigation drop down menu

texts: I'm attempting to disable the navigation drop down menu on a store. Using the maximal depth setting in the stores configuration works however its a global setting which effects stores I would like to keep the menu active on. I also thought changing the expanded variable under topmenu.phtml to false would disable the feature but that has not worked either. Any help is appreciated.


texts: Submitting magento 2 module to market place

texts:
I have developed a custom shipping module for Magento 2 and have submitted in https://developer.magento.com portal.

My component got approval after business approval after 3 days and now its status have changed to 'v.1.0.0 - Approved after Business Review'

Its been 3 days but I did not get any responses after that.

What I should do after this?


texts: How to add Google Recaptcha to a custom newsletter subscribe form (which uses subscribe.phtml) on a CMS Page?

texts:
I have a CMS Page which loads the newsletter subscription form like so:

<div class="newsletter-wrapper clearer">
    {{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}
</div>

and on my Page's Layout Update XML I have these:

<reference name="head">
    <block type="core/text" name="google.recaptcha.api">
            <action method="setText"><text><![CDATA[<script type="text/javascript" src="//www.google.com/recaptcha/api.js"></script>]]></text></action>
     </block>
</reference>

This works fine.. When I load the page on the frontend (ie: when I visit the page, the captcha loads and its alright)..

But the problem is I don't know how to do the server side verification of the recaptcha.. So basically the captcha is there visually but its not functioning yet.. I am unsure of which php file i need to look into to add the google recaptcha verification.. I would appreciate if anyone with the knowdlege/know how to help me out on this..

I've tried looking at the file located at:

/app/code/core/Mage/Newsletter/controllers/SubscriberController.php

But I don't know if that is the place where I should be placing the verification codes there...

Thanks!


texts: Magento 2: check customer logged in by javascript use model

texts:
Just wanna to check if customer logged in by javascript use

  Magento_Customer/js/model/customer.

I've included following js file in module:

define([
    "jquery",
    'Magento_Customer/js/model/customer',
], function($, customer) {

    'use strict';

    $.widget('conv.bolPrices', {
        _init: function init() {
            console.log('customer', customer);
            console.log('Logged in', customer.isLoggedIn()); //getting undefined
        },

    });

    return $.conv.bolPrices;
});

After login, every time when I am loading page I am getting undefined value, instead true/false.

I wanna to do it use model/customer. I cleared cache, removed generated/*, etc, read a lot of topics about this theme, but had no success.

I very appreciate any help and advice. Thanks.


texts: Magento 2.2 Random frontend display issues and 500 error reports

texts:
We are running a large Magento site (17 store views) with several custom modules installed.

Most of the time the sites are stable and performing well, however, we do get some random issues where the skinning on the sites fail to apply in the frontend and have seen occasions where backend can lose formatting, or even return 500 error.

When these happen, cache cleaning usually solves the problem. Does anyone know of potential causes, and preventative measures?

We are using the in-built caching, rather than Varnish.


texts: Magento 2 Discount Rule does not show Default Rule Label

texts:
I set up a Cart Price Rule that gives 30% discount. The 30% discount is given to the order, however, it displays "Discount" instead of the Default Rule Label specified.

Cart Price Rule Setup

The following is details to the Rule I added:

Frontend

Even though the labels were set, it shows Discount in the front end

Edit:

With more research I saw that the variable "Discount" is passed to the Knockout JS discount.html template instead of the Discount Description.

module-sales-rule/view/frontend/layout/checkout_cart_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.cart.totals">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="block-totals" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="before_grandtotal" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="discount" xsi:type="array">
                                            <item name="component"  xsi:type="string">Magento_SalesRule/js/view/cart/totals/discount</item>
                                            <item name="config" xsi:type="array">
                                                <item name="title" xsi:type="string" translate="true">Discount</item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>


texts:
I have the following .phtml file, but I am having trouble making it work.

look at the rendered script block, there is nothing after the equals.
http://screencast.com/t/zJ2DTnLF

and the code is this:

<?php
class ThePrinterDepo_Commissionjunction_Helper_Data extends Mage_Core_Helper_Abstract
{

    /**
     * Get SKU, quantity, price and discount amount for each product in a given order
     * @param object $order
     * @return array
     */
    private function _getOrderProductsList($order)
    {
        $orderItems = $order->getAllItems();
        $purchasedSkus = array();
        $count_orderItems = count($orderItems);
        for($i = 0; $i < $count_orderItems; $i++) {
            $purchasedSkus[$i] = array(
                'ITEM' => $orderItems[$i]['sku'],
                'QTY' => number_format($orderItems[$i]['qty_ordered'],0), // no decimals
                'AMT' => number_format($orderItems[$i]['price'],2), // 2 decimal places
                'DCNT' => number_format(abs($orderItems[$i]['discount_amount']),2)
            );
        }

        return $purchasedSkus;
    }

    /**
     * Get the Universal Data (JSON) Object for Commission Junction.
     * This object contains the order details passed on to Commission Junction for reporting purposes
     * on the Checkout Success / Order Confirmation page.
     * Notes:
     *  - CID, TYPE AND CURRENCY are hard coded
     * @param string $orderId
     * @return JSON object Universal Data Object for Commission Junction $json_masterTmsUdp
     */
    public function getCommissionJunctionUdo($orderId)
    {
        $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
        $udo = array();
        $udo['CID'] = 'XXXX';
        $udo['TYPE'] = 'XXXX';
        $udo['CURRENCY'] = 'USD';
        $udo['OID'] = $orderId;
        $udo['DISCOUNT'] = number_format(abs($order->discount_amount),2);

        $order_coupon_code = $order->coupon_code;
        if(!is_null($order_coupon_code) && !empty($order_coupon_code))
        {
            $udo['COUPON'] = $order_coupon_code;
        }

        $udo['PRODUCTLIST'] = self::_getOrderProductsList($order);

        if(Mage::getModel('core/cookie')->get('aff_commissionjunction') == 'cjafflx')
        {
            $udo['FIRECJ'] = "TRUE";
        }
        else
        {
            $udo['FIRECJ'] = "FALSE";
        }

        $masterTmsUdo['CJ'] = $udo;
        $json_masterTmsUdo = json_encode($masterTmsUdo);

        return $json_masterTmsUdo;

    }

}

?>

<script>var MasterTmsUdo = <?php echo $this->getCommissionJunctionUdo($this->getOrderId()); ?></script>
<script>/*DO NOT ALTER *** Th/(function(e){var t="1340",n=document,r,i,s={http:"http://cdn.mplxtms.com/s/MasterTMS.min.js",https:"https://secure-cdn.mplxtms.com/s/MasterTMS.min.js"},o=s[/\w+/.exec(window.location.protocol)[0]];i=n.createElement("script"),i.type="text/javascript",i.async=!0,i.src=o+"#"+t,r=n.getElementsByTagName("script")[0],r.parentNode.insertBefore(i,r),i.readyState?i.onreadystatechange=function(){if(i.readyState==="loaded"||i.readyState==="complete")i.onreadystatechange=null}:i.onload=function(){try{e()}catch(t){}}})(function(){});</script>


texts: Customer detail Problem when FPC is enable

texts:
I have custom page where i have to display current login customer name,email,etc..

i logged in to one customer and go to my custom page it shows correct data than i log out and logged in with another customer and go to my custom page it shows wrong data(last logged in customer data) when FPC is enable

my block file code

$customerSession = $this->_objectManager->create('Magento\Customer\Model\Session');
if ($customerSession->isLoggedIn()) {
   $custId = $customerSession->getCustomerId();
   $billingId =  $customerSession->getCustomer()->getDefaultBilling();
   $address = $this->_objectManager->create('Magento\Customer\Model\Address')->load($billingId);
   $customer = $this->_objectManager->create('Magento\Customer\Model\Customer')->load($custId);
   $custInfo['groupId'] = $customer->getGroupId();
   $custInfo['name'] = $customer->getName();
   $custInfo['email'] = $customer->getEmail();
}

How to solve this problem when FPC is enable


texts: Custom product attribute source model and Flat tables

texts: How to create new product attribute with custom source model (related to custom table), which will be built in Product flat table like normal Source attribute?


texts: M2 - How to find the google my business api account id and location id?

texts: I want to get my google reviews, how to find google my business api account id and location id?


texts:
I am trying to disable Magento 2.2.5 core module output, such as Magento_Backup.

I have followed the official documentation, and that works, but it requires modifying core files under the vendor directory.

I was hoping to extend the config.xml using an override.

I created app/code/[Company]/[Module]/Magento_Backend/etc/config.xml, with

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <advanced>
            <modules_disable_output>
                <Magento_Backup>1</Magento_Backup>
            </modules_disable_output>
        </advanced>
    </default>
</config>

But this does not seem to work. What am I doing wrong?


texts: Add custom row to Order View on Frontend Magento 2

texts:
I have my own custom discount, and on checkout I can use it. When I place the order, I see that grand total is changed, but me need to show discount.
I want to paste it between subtotal and shipping.


texts: Layered Navigation: Make some of the block collapsed by default

texts:
How to make some block (filters) of my choice collapsed by default? I have one attribute with a lot of values and it looks ugly.
Or, if this is not possible - maybe it's possible to make all of them collapsed by default?

Note :  Now all is expanded by default.


texts: using sql queries is good practice in magento 2

texts:
using SQL queries is good practice in Magento 2

  over ORM

  which is best one to while

  customizing

1)Security
2)Speed

ORM vs SQL queries

which one giving
Security and speed

while working with the database magento 2.

anyone explain

Thanks in advance.


texts: Magento add dynamic text in Shipping Method Progress block in checkout page

texts:
I want to show dynamic text into shipping method progress block
when I select something in shipping method it will show on progress block into shipping method.


texts: Export Category name in xml feed Magento 1.9.2

texts:
I have the script below for exporting product xml feed for magento 1.9.2
The problem is that I cannot export the category name for each product

The scipt is:

require 'app/Mage.php';
Mage::app();
$storename = 'default';
$file = "products-top10.xml";
if (file_exists($file)) {
    unlink($file);
}
try {
    $products = Mage::getModel('catalog/product')
        ->getCollection()
        ->addAttributeToSelect('*')
        ->setPageSize(200)
        ->setCurPage(1)
        ->setOrder('id', 'ASC')
        ->addAttributeToFilter('status', array('eq' => '1'));
    $doc = new DOMDocument();
    $doc->encoding = 'utf-8';
    $doc->formatOutput = true;
    $root = $doc->createElement("root");
    $doc->appendChild($root);
    $productsX = $doc->createElement("catalog");
    $root->appendChild($productsX);
     foreach ($products as $_product) {
            $product = $doc->createElement("product");
            $id = $doc->createElement("id");
            $id->appendChild(
                $doc->createTextNode($_product->getId())
            );
            $product->appendChild($id);
            $url = $doc->createElement("url");
            $url->appendChild(
                $doc->createTextNode(trim($_product->getData('url_key')))
            );
            $product->appendChild($imageURL);
            $imageURL = $doc->createElement("image");
            $imageURL->appendChild(
                $doc->createTextNode($_product->getImageURL())
            );
            $product->appendChild($url);
            $urlPath = $doc->createElement("url_path");
            $urlPath->appendChild(
                $doc->createTextNode(trim($_product->getProductUrl()))
            );
            $product->appendChild($urlPath);
            $title = $doc->createElement("title");
            $title->appendChild(
                $doc->createTextNode(trim($_product->getName()))
            );
            $product->appendChild($description);
            $description = $doc->createElement("description");
            $description->appendChild(
                $doc->createTextNode(trim($_product->getDescription()))
            );
            $product->appendChild($category);
            $category = $doc->createElement("category");
            $category->appendChild(
                $doc->createTextNode(trim($_product->getCategoryName()))
            );
            $product->appendChild($title);
            $sku = $doc->createElement("sku");
            $sku->appendChild(
                $doc->createTextNode($_product->getSku())
            );
            $product->appendChild($sku);
            $formatedpriceprice = $doc->createElement("price");
            $formatedpriceprice->appendChild(
                $doc->createTextNode(trim((int)$_product->getFormattedPrice()))
            );
            $product->appendChild($price);
            $formatedprice = $doc->createElement("price_with_vat");
            $formattedPrice = Mage::helper('core')->currency($_product->getPrice(), true, false);
            $formatedprice->appendChild(
                $doc->createTextNode(trim($formattedPrice))
            );
            $product->appendChild($formatedprice);
            $productsX->appendChild($product);
    }
    file_put_contents($file, $doc->saveXML(), FILE_APPEND);
} catch (Exception $e) {
    echo 'Eroror : - ';
    echo $e->getMessage();
}


texts: multistore customer login and add to cart fails

texts:
We have following situation on Magento 1.9.2.2 installation (ultimo theme) with multistore setup as websites in subfolders, e.g. domain.com/en-ca, etc..

Add to cart works when on the default website (domain.com) but not when using a website in the subfolder, e.g. domain.com/en-ca/

-Add to cart works when a user is logged in.
-Same problem on staging and live domain (same hosting environment)
-Share customer accounts set to global.

No erros are reported in system log. Cookie setting as follows:

Cookie Lifetime: 86400
Cookie Path: /
Cookie domain: staging.domain.com
Http only: yes  Cookie restriction mode: No

Frontend session cookies are carried over when trying to add something to the cart, but cart remains empty. If leaving Cookie Path and Cookie domain field empty: Cookie is set in path /en-ca when checking browser dev tools.

Form-key validation should not cause this because it works on default website?
I suspect it is due to the multi-store setup as it works on default site. However, all else on multistore seems to work.


texts:
I need to change cart qty via js while on the /checkout page(not in /checkout/cart). Then start the checkout process again with new data.
Is this possible?


texts:
I am getting this error in during installation of Magento 2.4.0 on Live server.
Please help if you can.
Current version of RDBMS is not supported. Used Version: 5.6.49-cll-lve. Su
pported versions: MySQL-8, MySQL-5.7, MariaDB-(10.2-10.4)
Please check screenshot.

Thanks


texts: Add Minus Sign in Invoice PDF Totals Block

texts:
I have added a custom discount block when I print my Invoice PDF. It looks something like below

In my config.xml, I am using below code to add totals in PDF

<pdf>
            <totals>
                <mymodule translate ="title">
                    <title>Discount</title>
                    <source_field>mymodule_amount</source_field>
                    <font_size>7</font_size>
                    <display_zero>0</display_zero>
                    <sort_order>650</sort_order>
                </mymodule>
            </totals>
        </pdf>

How can I add a MINUS sign in front of discounted price ?

Thanks


texts: Magento Royal Mail Click and Collect type delivery option

texts: Royal Mail offer a local collect service that I would like to put in as a shipping option so customers can choose a local collection point (a post office location) during checkout after searching for one (postcode lookup). I was hoping there would be an extension that connects the local collect service with Magento in terms of the post office locations available, or something of that nature. :)


texts: Magento 2 - Change style for search mini.form

texts:
I created a custom theme for my store and I want to overwrite input and search button

For example: I want to remove the search button magnifier icon with other icon and  add a background on that button.

What is the best way to do this?

Thank you


texts: How to remove a product attribute for products in a certain category

texts:
I have a category in which for some reason some 32 products from 149 have the wrong attribute. At sometime in the past the attribute 'groesse_bekleidung' had it's option '38-FR40' set as default and must have been added to the set of one of the product types in that category.

It has since been removed, so from the backend this attribute can no longer be removed from those 32 products.

I'd like to remove that attribute from the 32 Products in that category, but I am unsure how to.


texts: How to prevent cart empty after checkout payment failure in magento 2.2.5?

texts:
In Magento 2.2.5, after payment failure cart is going empty. I want to keep this, that if payment failed cart will not be empty, that will show last cart items.

I'm using the PayUMoney Payment Method. How can I do this?

I get a lot of example of this problem on Magento 1.9 version but didn't get any suitable solution for Magento 2.2.5.

Please help me, how I solve this issue.

Thank you


texts: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry while indexing

texts:
When I run

php bin/magento indexer:reindex

It gives below result

Customer Grid index has been rebuilt successfully in 00:00:32
Design Config Grid index has been rebuilt successfully in 00:00:00
Category Products index has been rebuilt successfully in 00:00:03
Product Categories index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:02
Product EAV index has been rebuilt successfully in 00:00:01
Stock index has been rebuilt successfully in 00:00:00
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3-1496275200-1498867199-1-2-2477-0' for key 'IDX_EAA51B56FF092A0DCB795D1CEF812B7B', query was: INSERT INTO `catalogrule_product` (`rule_id`,`from_time`,`to_time`,`website_id`,`customer_group_id`,`product_id`,`action_operator`,`action_amount`,`action_stop`,`sort_order`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Catalog Product Rule index has been rebuilt successfully in 00:00:20
Catalog Search index has been rebuilt successfully in 00:00:07

How to solve

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
  '3-1496275200-1498867199-1-2-2477-0' for key
  'IDX_EAA51B56FF092A0DCB795D1CEF812B7B', query was: INSERT INTO
  catalogrule_product
  (rule_id,from_time,to_time,website_id,customer_group_id,product_id,action_operator,action_amount,action_stop,sort_order)
  VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)


texts: Watching Add to Cart Event - quote item id is empty

texts:
I am trying to catch the event that fires once an item is added to the cart. I'm currently watching the following event: checkout_cart_product_add_after

According to magento source this event is fired after everything is done to the Quote. but when i access the cart id and the quote id the values are empty:

$quoteItem = $observer->getQuoteItem();
$quote_item_id = $quoteItem->getItemId();
$cart = Mage::getSingleton('checkout/session');
$quote_id= $cart->getQuoteId();

The above returns empty for both ids when there are no items in the cart, if the cart already has an item the cart id has value but the quote_item_id doesn't.

Notice this has been asked before, but the question was never resolved, and the discussion ended up straying from this issue. I need the quote_item_id.


texts:
I have a problem with product images. Although they're displaying correctly in the admin panel and on product page, for some reason they fail to load on category page. It looks like Magento can't generate an image in pub/media/catalog/product/cache - but has no problem with that on product pages.

Does anyone have any idea why it may be happening? I already tried setting 777 permissions on pub/media/catalog/product/cache, but that didn't solve the problem.


texts: How to "reload" a custom module after code changes

texts:
I've made several custom modules for i.e. adding attributes to categories.
This is all the first time for me, so I set up the module the first time, enabled it and all is fine so far.

But when I go back to make changes in the code, I don't see them happening (and I'm talking about changing the text in a label, so it should be visible). I figured it has to do something with the way the module is implemented, so I tried;

Disabling/Enabling the module
Clearing cache / var/ folder
Running setup:static-content:deploy
Running setup:upgrade
Running setup:db-schema:upgrade and setup:db-data:upgrade
Changing the module version in module.xml from 1.0.0 to 1.0.1
Running indexer:reindex

But still I don't see my changes in the module. What must I do to 'apply' the changes in a module?
For the creation of an attribute, I use a Setup/InstallData.php file. Could it be the data is setup once, and doesn't get "refreshed" with an edit? What would be the best way to go around this (maybe changing the name, deleting in the DB)?

edit: I've now also changed the field-id and redid all steps above, still to no avail :/

update:
this is the tutorial I used to get where I am; http://www.ibnab.com/en/blog/magento-2/magento-2-add-custom-eav-attribute-to-category-or-customer

And to test it, at first I created a text-field as attribute. That works, now I want to change it to a media-field (like a second category image field). This is the (part of) code in question ( Setup/InstallData.php ):

    $categorySetup->removeAttribute(\Magento\Catalog\Model\Category::ENTITY, 'cat_bgimg1');
    $categorySetup->addAttribute(
    \Magento\Catalog\Model\Category::ENTITY, 'cat_bgimg1', [
         'type' => 'file',
         'label' => 'Category backgroundimage',
         'input' => 'file',
         'source' => '',
         'visible_on_front' => true,
         'required' => false,
         'sort_order' => 100,
         'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
         'group' => 'General Information',
    ]

Update
To try to force the changes I disabled the module, I updated module.xml to 1.0.1 <module name="MyModule" setup_version="1.0.1"> and re-enabled the module, ran setup:upgrade etc. In the database table setup_module the new version was added, but the changes in code weren't applied. Maybe this is due me only having an InstallData script, and no updatescript.

Update 3
lord_of_strings gave me the right info on how this works and why it works like this. I ended up just clearing everything out and adding it again.


texts: Notice: unserialize(); Error at offset in Magento 2.2

texts:
This code not working in Magento 2.2, But it's working in Magento 2.1. I am facing this error

  Notice: unserialize(); Error at offset 0 of 168 bytes in /var/www/html/M2/app/code/Vendor/Module/Block/MyBlock.php

$infoRequest = $item->getOptionByCode('info_all')->getValue();
$addtoCartreqest = unserialize($infoRequest);


texts:
I want to use xcache as my cache backend system. All I do is add the following to local.xml:

<cache>
    <backend>xcache</backend>
    <prefix>username_</prefix>
</cache>

Is that it? I checked the file system. The cache is still stored over under /var/cache. I also found that the cache "Blocks HTML output" became invalid more easily.

Running Magento 1.9.1.


texts: Is there away to programatically remove a store's product's attribute value without loading the whole product or using raw sql?

texts:
The slow way that works:

Mage::getModel('catalog/product')
            ->load($productId)
            ->setStoreId($storeId)
            ->setData($code , null)
            ->save();

I've seen:

Mage::getModel('catalog/product')
            ->addAttributeUpdate($code, null , $storeId);

This however deletes the default value as well. (possible bug ?)

Other examples I have seen are raw mysql delete queries.

I though that this would be something native to Magento.

Any thoughts on this?


texts: How to modify logo and css style for emails templates in magento 2?

texts: I need to set a new logo and make some css adjustments for emails like "password-reset" in magento 2.


texts: Magento 2 : Check if method exist in class

texts:
I am getting below error
Magento 2 : Call to a member function getCustomerIsGuest() on null error

on Magento\CustomerBalance\Model\Balance class
In local environment
on protected function _ensureCustomer() method i get order data by $this->getOrder()
but in live it causes error, i am not sure if $this->getOrder() method exist for this class and in _ensureCustomer() method.
Any advice or thoughts ?


texts:
I tried creating my own folder for product image size. but in my case by default it is creating "70x" folder. I want my own folder for different image size. I aso want to know that from where magento is creating different product image size folder.

does anyone know how to do this.? Please help me out.

--edit--

i want that particular resize value for e.g."1200x1200" should be saved in my own folder e.g "p1/c:/images/img1.jpg". I m trying my best. but no results.

any solution for this.?


texts: B2B / Wholesale and Product Options Price

texts:
I am currently setting up a Magento site that both serves B2B and B2C, everything is absolutely fine as I am using the Advanced Pricing to set our wholesale pricing structures. However I cannot find any way to change the customisation options pricing.

For example, we have product A that retails out at £100, but wholesales for £40, which is absolutely fine. But we offer Gift Wrapping to retail customers for an extra £10, but for wholesale we offer it to them for £4.50 - I cannot find any way to allow anyone on the Wholesale customer group to only pay £4.50 for selecting this product option?

I have also searched through the app store for anything that might be able to resolve this, but have not found anything. The only apps I have found are ones that create a pricing matrix and are very overkill for what we're trying to achieve.

One thing I have considered that I've seen people ask before is to create a Catalogue Price rule or a Customer Group Price Rule, and basically mark everything down by 50% for example, the problem is that the prices we're offering to wholesale isn't a straight "percentage" off, it's a completely different calculated price.

If anyone knows of any apps that could help me out, or any ideas how I could resolve this, it'd be much appreciated.

We're using Magento CE 2 v.2.2.1


texts: Import of images is stuck at "In progress" since 3 days

texts: I uploaded 3000 images 3 days ago but image processing is still in progress. Can someone give me a fix or tell me why is it so slow?


texts:
we have web-store running on Joomla platform , now we want to change it to Magento platform , but we faced some problems !

In Joomla! we could change an order's items statuses , which we couldnt find solution for that in Magento.

-Can we have control over the orders statuses in Magento , EX : we want to change order status from Pending to processing without printing invoice ?

Can we change an order's items statuses in Magento ?

Thank you all :)


texts: add product filter to listing magento 1.9

texts:
I'm trying to add a filter to the list of products.

product attribute = 'composition' in my list of products with infinite scroll is the following code

$category_query = Mage::getModel('catalog/category')->load($category_id);
Mage::register('current_category', $category_query);
$return = $this->_getReturnContent();

I've tried in a number of ways
example

$collection = Mage::getResourceModel('catalog/product_collection')
    ->addFieldToFilter('composition' => $composition);

And does not anyone have any tips?
thanks


texts:
I have multiple websites running under different domains from a single Magento installation.

The first website is a broad scope store selling everything the business offers and two additional websites sell limited specialised products of different categories.

When I create a sitemap for website2 or website3 it contains a complete list of the catalog under the new URL.

This isn't ideal as I don't want Google to associate those domains with every product that website 1 sells, I only want it to generate items that are actually for sale (i.e. categorised into the root category for that store / store view).

Is this possible? Because otherwise the functionality seems a little pointless if it just changes the baseURL then lists the entire Catalog URL list.


texts: Magento 2 : Add custom array in multiselect UI dropdown in custom UI form

texts:
In Magento 2, I want to add multiselect UI dropdown with custom my custom array.

I take reference from product edit form "Categories" field and also find out from where UI multiselect tree option added.

  vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php

From this file, customizeCategoriesField() function set UI multiselect dropdown by $this->getCategoriesTree() this line.

But, how can I implement in my custom form?

Any help would be appriciated.


texts: Lets say someone searches for "item a" , and 20 items show up, is there a way to control which item shows up first and which item shows up second and so on?


texts: magento override billing and shipping last name

texts:
I dont want to show last name from billing and shipping name everywhere like invoice , sales order , how can i do same with out changing from database please help me with same .
i am  new to magento and do want want to change core files for it , any over to override last name to null ?


texts: Problem with importing from Cludes ERP System to Magento backend

texts: I  am importing products from Cludes  ERP System,  but Product base image is not set in Magento backend:


texts: How to get all product SKUs in foreach loop on checkout success page?

texts:
I am trying to add some tracking and conversion codes which require all skus from an order to be listed in the HTML tag on the checkout success page.

So far I have been able to get the QTY, Order Amount and SKU but I need to show ALL SKUs from the order not just one so need to loop but I'm doing it wrong.

Here is what I have:

<?php // Get Order info
$products = array();
$lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$_order = Mage::getSingleton('sales/order')->load($lastOrderId);

/* @var $item Mage_Sales_Model_Order */
foreach ($_order->getAllItems() as $item) {
    $info['sku'] = trim($item->getSku());
    $info['qty'] = $item->getQtyOrdered();
    $info['price'] = $item->getPrice();

    $products[] = $info;
}

$config['productInfos'] = $products;
$config['cartTotal'] = $_order->getGrandTotal();
$config['currency'] = Mage::app()->getBaseCurrencyCode();
?>

One I have the order info I need to populate the following HTML TAGS

PURCHASE

<?php echo $this->getOrderId(); ?>

Custom

//Here is where I need to loop to get all the SKUS
<?php foreach(); ?>

        <?php echo $this->getSku(); ?>

<?php endforeach(); ?>

<?php echo $_order->getGrandTotal(); ?>

I've been searching for a few hours but haven't found a good tutorial on how to get the SKUs in a foreach so could do with some assistance if possible please...


texts:
I'm creating a custom Grid in Adminhtml which is to list all of the items sold in the past 30 days.

I have the Grid setup, with basic product data being filled. However, I need data such as current stock level and custom attributes etc.

I'm a little new to Magento collections and not sure how to use joins etc to build up my desired collection.

Can anyone assist?

protected function _prepareCollection() {

    $collection = Mage::getResourceModel('sales/order_item_collection')
    ->addAttributeToSelect('*')
    ->join('order', 'order_id=entity_id');

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


texts:
I'm using native magento zip validation where its form is as follows: 99999999.

I wanted to change this validation mask, only added a "dash" to it, thus getting it this way: 99999-999.


texts: How to edit customer account confirmation link in email

texts:
Can anyone tell me how to edit customer account confirmation link in magento?

It is from the account controller AccountController.php and Action confirmAction

URL in template is as follows.

{{store url="customer/account/confirm/" _query_id=$customer.id _query_key=$customer.confirmation _query_back_url=$back_url}}

I need to redirect my customer to the url that they had visited before coming to the registration page. If they dint visit any other page then I need to redirect them to the home page. Account confirmation should also happen.

By default, customer is redirected to My Account Dashboard once the account confirmation link is clicked. My requirement was to change this URL and redirect to Home Page for the time being.


texts: How to switch to https in the database? Hosting messed up and now Admin is text-only non-functional

texts:
Magento 1.9.1
Porto theme

We just had an outage caused by the hosting company where all customers coming to our site were getting the "This is not safe" type of an Error message and where not actually seeing the Magento website.

When the site was down, I managed to login into the Admin panel and switched the unsecure URL and the secure URL to just http://www.oursite.com
The hosting company then fixed whatever problem it was and now the front end loads but when going to the URL for the Admin - it is text only. After I manage to login, it still shows as text only. I tried to modify things back to https in the text only version of the Admin panel but the "Save Config"button does not really work...Can I change the unsecure and secure URL back to https in the database? I have cPanel with phpMyAdmin.


texts: magento language pack installation doesn't work

texts:
I am trying to install the language pack for magento 2.3.1, these are steps:

wget https://github.com/mageplaza/magento-2-italian-language-pack/raw/master/it_IT.csv
php bin/magento i18n:pack -m replace it_IT.csv it_IT
php bin/magento setup:static-content:deploy -f it_IT
php bin/magento cache:flush

I am in developer mode so I need -f to deploy.
The i18n directory is not created, nothing happens.

I tried manually to insert the directories but it still doesn't work, language is not installed.


texts: Some js doesn't work as they should when I have cloudflare on

texts: I'm using magento 2.0.7, and I know is not a magento issue, but when I turn cloudflare on, some of the js doesn't well as they should, for example in the backend I can't save any product, and in frontend, the cart doesn't display the items.


texts: Product image disappears on product page when using a custom page layout

texts:
I'm creating a custom theme on Magento 2.1. I create a custom layout for the product page in app/design/frontend/<theme_name>/base/Magento_Catalog/layout/catalog_product_view.xml, here it is:

<?xml version="1.0"?>

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

  <body>
  </body>

</page>

where layout-1 is placed in app/design/frontend/<theme_name>/base/Magento_Theme/page_layout/layout-1.xml and is

<?xml version="1.0"?>

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

  <update handle="1column"/>

</layout>

The problem is that when I navigate to a product page the product image/gallery is not displayed.

If I set catalog_product_view.xml with layout="1column" all works right.

I don't get where is the problem, please help!

Below some screenshots:

With layout 1column ==> Product image is showed

With layout layout-1 ==> Product image is missing


texts: How can create custom cart price rule for Custom Module in Magento 2?

texts:
I have a need for cart price rules in my custom module..anyone knows that how to add code in Form.php?

Look Like That.


texts: On customer address save, get origin data

texts:
I'm working on an observer of the customer_address_save_before event. On customer address saving, i've to check if there's changes before doing some actions.

I did something similar for the customer/customer model with some natives methods such as hasDataChanges(), dataHasChangedFor($key) and getOrigData() from the Varien_Object class.

However, when i tried to do it for the customer/address model, i figured out that the _origData property is null. This happens only when the customer address is updated in the front-end. When i update the customer address in the back-end, i do have the correct _origData.

Do you know why does this happen and how to fix or bypass this ?


texts: Magento customer recognition problem - Group prices are show although not logged in

texts:
Magento 2.3.2

Customer is logged in and sees the group prices.
If the customer does not log out, but the same customer visits the store again the next day. The group prices appear again although he is not logged in.

This confuses the customers and causes problems with the order handling.
Is this a bug or standard functionality?
How and where could I solve this?


texts: Adding a favicon in magento 2.3.0 manually - it just appears in firefox

texts:
According to devdocs of magento 2.3.0 I tried to add a favicon manually.

https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/favicon.html

Attempt 1:

/magento2/app/design/frontend/Magento GJ/theme-GJ/Magento_Theme/layout
=> here goes the default_head_blocks.xml file

<?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">
    <head>
        <link src="Magento_Theme::favicon_32x32.png" rel="icon" type="image/x-icon" sizes="32x32"/>
    </head>
</page>

/magento2/app/design/frontend/Magento GJ/theme-GJ/Magento_Theme/web
=> here goes the favicon_32x32.png file

=> This works only in Firefox!

Attempt 2:

Then I tried just for fun to add in the root directory my own favicon.ico.

/magento2/app/design/frontend/Magento GJ/theme-GJ/Magento_Theme/

=> This works for Safari, Chrome and Edge. The IE does not work.

Attempt 3:

According to the magento 2.3.0 bug to add a favicon over the backend I solved this issue also:

Magento 2.3 favicon and logo upload does not take hold

Then I tried to upload my favicon.
=> All browsers can handle the favicon.

I want to know why the first attempt does not work for all browsers? - I am at a loss :/


texts: How to randomise and limit related products?

texts:
I have been working on my own theme from the default RWD on 1.9.2.1.

I would like to limit the related products to show only 8 products instead of all of the say 139 I have currently for a single product.

Also, I would like to randomise so pick at random 8 from all of the related products.

I am aware that I could simply add a break in the loop so when it has iterated 8 times it'll stop, but this I believe can be waste of resources.

I have gathered that the code below is responsible for creating the collection of related products. So, how would I amend this in the correct way to limit to 8 products and choose at random?

    $product = Mage::registry('product');
        /* @var $product Mage_Catalog_Model_Product */

        $this->_itemCollection = $product->getRelatedProductCollection()
            ->addAttributeToSelect('required_options')
            ->setPositionOrder()
            ->addStoreFilter()
        ;

        if (Mage::helper('catalog')->isModuleEnabled('Mage_Checkout')) {
            Mage::getResourceSingleton('checkout/cart')->addExcludeProductFilter($this->_itemCollection,
                Mage::getSingleton('checkout/session')->getQuoteId()
            );
            $this->_addProductAttributesAndPrices($this->_itemCollection);
        }
//        Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_itemCollection);
        Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection);

        $this->_itemCollection->load();

        foreach ($this->_itemCollection as $product) {
            $product->setDoNotUseCategoryId(true);
        }

        return $this;


texts: How to make checkbox mandatory on register page in Magento 2

texts:
I added a extra checkbox on register page, for terms and conditions, and i want to make it mandatory/required when i press on "create account" button.

this is my code:

        Do you agree?terms
        <input type="checkbox" class="checkbox required-entry" id="register-input-custom" />

I already added this class for checkbox : checkbox required-entry but it's not working.

Does anyone have any idea how to make this checkbox mandatory?


texts:
I can't do a interceptor on CustomerData/Cart.php and I don't know why.
Check my di.xml

<config>
    <type name="Magento\Checkout\CustomerData\Cart">
        <plugin name="newValues" type="Vendor\MinicartValues\Plugin\CustomerData" sortOrder="1"/>
    </type>
</config>

My Class:

<?php
namespace Vendor\MinicartValues\Plugin;

class CustomerData {

      public function afterGetSectionData(\Magento\Checkout\CustomerData\Cart $subject, $result)
      {
        $totals = $subject->getQuote()->getTotals();
        $fp = fopen('/src/www/var/log/log.txt','a+');
        fwrite($fp, var_export($totals,true));
        fclose($fp);
        $result['grandtotal'] = isset($totals['grand_total'])
        ? $this->checkoutHelper->formatPrice($totals['grand_total']->getValue())
        : 0;
        $result['shipping'] = isset($totals['shipping'])
        ? $this->checkoutHelper->formatPrice($totals['shipping']->getValue())
        : 0;
        return $result;
      }
  }

I simply can't figure out why that won't work. I put a log on the original class

vendor/magento/module-checkout/CustomerData/Cart.php

and always go into this never go to my interceptor.
My magento version is "2.1.8".

Any help will be appreciated.


texts: Magento : customer place order and not subscribe to newsletter subscription

texts:
Using event and observer i have make auto subscription for customer but i want to do if customer has more than 2 order then customer should not auto subscribe to newsletter subscription.

Help me if you have any better suggestion.

Thanks.


texts: Magento 2.4.1: Can elasticsearch be installed post upgrading to Magento 2.4.1?

texts: Upgrade to Magento 2.4.1 from 2.3.1 was successful. However, I find the following error message on running upgrade command. If one can enable/install elasticsearch as search engine now, please guide me as to what needs to be done.


texts: Is it possible to disable module from theme.xml?

texts:
I have a frontend theme that is being loaded through an module, so that im not able to do any changes to it when it comes to enabling and disabling other modules as you usually do in different store views.
So what i have been wondering is whether or not it is possible to disable / skip some modules when that frontend theme is being used?

I know it is possible on Magento 1.9 with command like this in theme.xml:

<config>
    <modules>
        <[Your_Module_Name]>
            <active>false</active>
        </[Your_Module_Name]>
    </modules>
</config>

However i dont know how to do it in Magento 2, and i cannot seem to find any information on it..

Stian


texts: How to remove or change Magento copyright section from admin login

texts: I am trying to remove a Magento copyright text from admin login area, but I am not sure How I can do this.


texts:
I've uploaded all the files from aoe profiler git to my store root folder and then i've edited the var/aoe_profiler.xml to <trigger>always</trigger> but when i load my front page i don't see any profiling being made.

Clearly i'm missing something X_X. Can somebody please help me figure it out? Thanks! :D

P.S I have Magento 1.9.2.4 installed


texts: Magneto 2.3.1 'Quantity source' becomes null when create product with the same name

texts:
I have Magento 2.3.1 setup and multiple products,

When I am trying to create a new product with the same name, it is allowed me to create the product with the same name but the 'Inventory Sources' become blank.

after saving the same name product it removes the 'Inventory Sources' which are assigned to product on the product add form.

==> One more thing I found " If I use different SKU on product save then it will save the Inventory Sources as well ".

==> But if we use the same SKU for the product it will save the product and change the SKU by itself with adding '-1' after SKU but this way it won't save the Inventory Sources.

Is anyone have the same issue?


texts: Magento 2.3 Error When Accessing Products From Admin Panel

texts:
Receiving the following error when trying to access/edit Products through the admin panel using Magento 2.3.3:

  [DOM] Found 2 elements with non-unique id #fulltext

The page times out and does not display products - only a blank grid. This has occurred after an Akeneo import. There are no errors in the Apache log or Magento system log. Please see attached image for the full error.


texts: Programmatically removing product custom options

texts:
I have custom option called stitching for 500 products.

I am looking for ways to remove it. I don't want to delete them via backend as I would like to retain them if I would like to enable them in future. Is hiding via css display:none the right thing to do?


texts:
I'm trying to display the images of products on each order item, so far I have the image pulling through but it's only one of 3 product images.

It's also displaying them on every order in the order history, but they should only display the correct images per order.

Below is my code, any help is much appreciated.

<?php $_orders = $block->getOrders(); ?>
  <?php if ($_orders && count($_orders)): ?>

My Orders

          <?php foreach ($_orders as $_order): ?>
            <?php
              $orderId = $_order->getId();
               $order = $objectManager->create('\Magento\Sales\Model\Order')->load($orderId);
               $items = $order->getAllItems();
               foreach ($items as $itemId => $_item){
                 $_item->getProductId();
                 $_item->getName();
                 $_item->getPrice();
                 $_item->getSku();
                 $_item->getQtyToInvoice();
                 $_product = $_item->getProduct($_item->getProductId());
                 $imageBlock =  $block->getLayout()->createBlock('Magento\Catalog\Block\Product\ListProduct');
                 $productImages[] = $imageBlock->getImage($_product, 'category_page_grid');
               }
             ?>

<?= /* @escapeNotVerified */ $block->formatDate($_order->getCreatedAt()) ?>

<?= /* @escapeNotVerified */ $_order->getRealOrderId() ?>

<?= /* @escapeNotVerified */ $_order->getStatusLabel() ?>

                  <?php foreach($productImages as $productImage): ?>
                    <a href="<?php echo $_product->getProductUrl(); ?>"><?php echo $productImage->toHtml()  ?>
                  <?php endforeach; ?>

            <?php endforeach; ?>

    <?php endif; ?>

EDIT

After following one of the solutions on this post I've now got all images pulling through but they are being duplicated on each orders.

See screenshot:

Kind of hard to see I know but the second order in the order history also has the first orders product images which don't exist in that order, so therefore should not be displaying.


texts: how i update the order status in controller in magento 2?

texts:
<?php
namespace Vendor\Module\Controller\Index;

use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Magento\Framework\App\ResponseInterface;class Index extends Action
{
/**
    * @var \Magento\Framework\Controller\Result\JsonFactory
    */
   protected $resultJsonFactory;    public function __construct(
       Context $context,
       \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
   ) {
       parent::__construct($context);
       $this->resultJsonFactory = $resultJsonFactory;
   }    /**
    * Dispatch request
    *
    * @return \Magento\Framework\Controller\ResultInterface|ResponseInterface
    * @throws \Magento\Framework\Exception\NotFoundException
    */
   public function execute()
   {
                        $data = json_decode(file_get_contents('php://input'), true);
                        // $gff = $data['events'];
                         // print_r($gff);
                         $orderId = $data['id'];
                         $events = $data['events'];
                         $array = array();
                         foreach($events as $key => $value){
                         //print_r($value['id']);
                             $array[$key] = $value['code'];
                        //      if($value['code'] == "246")
                        // {
                        //     // print_r($value);
                        //         $orderId = $orderId;
                        //         $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                        //         $order = $objectManager->create('Magento/Sales/Model/Order')
                        //                    ->load('1372072');
                        //         $order->setState("pending")->setStatus("pending");
                        //         $order->save();
                        // }
                         }
                         print_r($array);
   }
}


texts:
I have created a custom module but it's not working, I am unable to see any menu in cms menu.here is my code:-
1.config.xml

<?xml version="1.0"?>
<config>
  <modules>
    <Paras_Missingmeta>
      <version>0.1.0</version>
    </Paras_Missingmeta>
  </modules>
  <global>
    <helpers>
      <paras_missingmeta>
        <class>Paras_Missingmeta_Helper</class>
      </paras_missingmeta>
    </helpers>
    <blocks>
      <missingmeta>
        <class>Paras_Missingmeta_Block</class>
      </missingmeta>
    </blocks>
  </global>
  <admin>
    <routers>
      <missingmeta>
        <use>admin</use>
        <args>
          <module>Paras_Missingmeta</module>
          <frontName>admin_missingmeta</frontName>
        </args>
      </missingmeta>
    </routers>
  </admin>
  <adminhtml>
    <layout>
      <updates>
        <missingmeta>
          <file>missingmeta.xml</file>
        </missingmeta>
      </updates>
    </layout>
  </adminhtml>
</config>

2.adminhtml.xml

<?xml version="1.0" ?>
<config>
    <menu>
      <cms>
        <children>
         <paras_missingmeta module="paras_missingmeta">
        <title>Missing meta keys</title>
        <sort_order>100</sort_order>
        <children>
          <missingproduct module="paras_missingmeta">
            <title>Product Meta Keys</title>
            <sort_order>0</sort_order>
            <action>admin_missingmeta/adminhtml_index</action>
          </missingproduct>
           <missingcat module="paras_missingmeta">
            <title>Category Meta Keys</title>
            <sort_order>10</sort_order>
            <action>admin_missingmeta/adminhtml_cat</action>
          </missingcat>
            <missingcms module="paras_missingmeta">
            <title>CMS Meta Keys</title>
            <sort_order>20</sort_order>
            <action>admin_missingmeta/adminhtml_cms</action>
          </missingcms>
        </children>
      </paras_missingmeta>
        </children>
      </cms>
    </menu>
    <acl>
      <resources>
        <all>
          <title>Allow Everything</title>
        </all>
        <admin>
          <children>
            <missingmeta translate="title" module="missingmeta">
              <title>Missingmeta</title>
              <sort_order>1000</sort_order>
              <children>
          <missingmetabackend translate="title">
            <title>Backend Page Title</title>
          </missingmetabackend>
              </children>
            </missingmeta>
          </children>
        </admin>
      </resources>
    </acl>
 </config>

If need any other files then i can post here.
both files are being loaded i have checked it.


texts: Magento 2.1: Show available Configurable Product Super Attributes/Configurations on Category Page

texts:
I want to display all available configurations of my configurable product on list.phtml (app/design/frontend/Vendor_Name/Theme_Name/Magento_Catalog/templates/product/list.phtml) next to the product name.

How do I achieve this?

This is how I can show any attribute but not my "super attributes":

<?php /* @escapeNotVerified */ echo $_helper->productAttribute($_product, $_product->getAttributeName(), 'attribute_code'); ?>


texts: Is the timestamp not saved when someone subscribes to the newsletter?

texts: There is a field change_status_at which is a TIMESTAMP in the newsletter_subscriber table.  However it doesn't appear to be getting populated when newsletter subscriptions happen, or even when the subscription status changes.


texts: Magento 1.9.x: How to add an extra fee to order while adding item to cart programmatically?

texts:
I am adding item programmatically into cart (code below) and want to add an extra fee to order. I found a lot of results here also but unable to follow as I am new in magento. Can anyone please share where to create file (observer, config.xml etc with path) and what should be the name of the file? Below code is adding item to cart successfully but I am unable to add fee to complete order.

Any help will be really appreciable.

Thanks in advance.
My code is:

$productId = 13114;
$price_extra = 50.00;
$product_model = Mage::getModel('catalog/product');
$code = Mage::app()->getStore()->getCode();
$_product = Mage::getModel('catalog/product')->load($productId);
$_product->setMinimalPrice($price_extra);

$cart = Mage::getSingleton('checkout/cart');
$cart->init();
$params = array(
    'product' => $productId,
    'related_product' => null,
    'qty' => 1,
    'options' => array(
        2 => array('7', '8', '9', '10', '11', '12'),
        1 => array('1', '2', '3', '4', '5', '6'),
    )
);
$customer = Mage::getSingleton('customer/session')->getCustomer();
$storeId = $customer->getStoreId();

$cart->addProduct($_product, $params);
$cart->save();
Mage::getSingleton('checkout/session')->setCartWasUpdated(true);


texts:
I have a cms page, where custom collection is displayed. I want to add filter to this page.

Magento version: EE 1.14.2.4

contents of my cms page:

{{block type="catalog/product_list" template="template.phtml"}}

in a template.phtml tried this code

$filter = new Enterprise_Search_Block_Catalog_Layer_View();
echo $filter->setTemplate('catalog/layer/view.phtml')->toHtml();

but getting error

Varien_Exception: Invalid method Mage_Catalog_Model_Layer::toHtml(Array())

How can I add filter to my cms page?

I need a page, where a custom collection and a filter will be shown.


texts: How to identity configurable product in magento frontend ?


texts: Problems with Monolog version(s) installing Data Migration Tool 2.1.7

texts:
OSX Sierra
php 7.1.5
apache/httpd 2.4

I have installed Magento 2 into my localhost Sites folder OK, set up the database etc.
now trying to install data migration tool from github.

This step (1) went OK |composer config repositories.data-migration-tool git https://github.com/magento/data-migration-tool
This step (2) "composer require magento/data-migration-tool:2.1.7"
gave me errors about monolog 1.16 & minimum stability.
I set m/s to "dev", still no joy, so I used
composer to install monolog 1.16 manually - that seemed to go ok.
Then I reran step (2) and now get this error message

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

Problem 1
    - Can only install one of: monolog/monolog[1.16.0, 1.22.1].
    - Can only install one of: monolog/monolog[1.22.1, 1.16.0].
    - Can only install one of: monolog/monolog[1.16.0, 1.22.1].
    - magento/data-migration-tool 2.1.7 requires monolog/monolog ~1.16.0 -> satisfiable by monolog/monolog[1.16.0].
    - Installation request for magento/data-migration-tool 2.1.7 -> satisfiable by magento/data-migration-tool[2.1.7].
    - Installation request for monolog/monolog (locked at 1.22.1, required as ^1.16) -> satisfiable by monolog/monolog[1.22.1].

Installation failed

What do I do to get around this issue? Maybe I already have monolog 1.22 on my Mac from working with the SLIM framework?

Help please


texts: Magento 2 multiple countries setup multi store or multi website?

texts:
I want to setup magento 2 instance with below requirements in Magento 2.3 CE

1) Multiple countries option with country switcher

UAE/Dubai (default)
KSA/Saudi Arabia (This will further have below regions)

KSA Dammam
KSA Jeddah
KSA Riyadh

Kuwait

2) Multiple languages with language switcher

English (default)
Arabic

3) Multiple currency

AED (default)
SAR
KWD

4) Catalog different for each country, but there may be few common products

5) Catalog data will be uploaded for each language

6) Inventory will not be shared among countries

7) Customers will be shared across countries

8) URL should be as below

https://www.domain.com/uae/

https://www.domain.com/saudi/

9) If customers are shared, how will the cart and order process behave if the catalog is different in different countries

10) Auto redirection to country website with GeoIP redirection

With a bit of research I found that we can create multi website with same domain by creating a subfolder under root directory. Below are some of the links:

Magento 2: How to configure Nginx to use multiple websites with sub-folder
- It is giving 404 error for category, product pages

https://gist.github.com/thagxt/0f605f0a8a95c79302db0d2f04383788

But I doubt if all the above requirements can be achieved?

Can this be achieved with multi-website OR multi-store configurations?

Kindly suggest the best approach possible and if above can be achieved with some 3rd party modules.


texts:
I have an option where the client will pay an order after internal validation.

The client places the order with a custom payment method and then I restore the order for the client to pay.

What I'm trying to achieve is in this cases redirect the client to the final step of payment. here is the code.

$this->quoteRepository->save($new_quote);
$this->checkoutSession->replaceQuote($new_quote);
$this->checkoutSession->setQuoteId($new_quote->getid());
$this->cart->save();

$cartUrl        = $this->url->getUrl('checkout/#payment/');
$resultRedirect = $this->resultRedirectFactory->create();
$resultRedirect->setUrl($cartUrl);
return $resultRedirect;

This will redirect to the payment step but then redirects me to a noroute page, can anybody help?

Thanks in advance !


texts: How to put group prices instead of regular prices

texts:
I want to show my group prices. Magento doesnt show my group prices if they are bigger than regular price.

I have differents prices for differents groups of customer, we are a wholesaler. So I only want show the group price that correspond at the customer group.

For example:

  regular price (for regular customer group): 1€.
  wholesale 1 (for wholesale 1 group): 0.90€.
  wholesale 2 for wholesale 2 group): 1.20€.

Is it possible to not show regular price anymore?


texts: I have downloaded magento2.4 using composer into my ubuntu 18.4 machine. But when I try to access the web interface for the installation it throws out a blank page. I have tried everything like permission,.htaccess configuration etc. but still the issue persists. Interestingly the log says that Application is not installed yet and there is no further information. If anybody have previous experience of this sort of problem can please tell me what could be the cause of this type of error?


texts: Make changes in \vendor\magento\module-cookie\Block\Html\Notices.php

texts:
I want do do changes in the following file:

\vendor\magento\module-cookie\Block\Html\Notices.php

How can I stop that file from being overwritten when doing upgrades in the future? Can I override it in some way, e.g. move it to the theme structure?

Thanks!


texts: Why minimum per page products (9) are not displaying in frontend Magento 2

texts:
Why does the products rendering into frontend, restricts to only few products, even though i have more than 20 products, i get only 7 products rendered.

My pager limit is set for mim of 9 products, but only 7 is displaying, but i can access the other products in next page.

Is it problem in my pager or the controller?

Cleared cache, reindexed, enabled developer mode, i dont get any logs as well!


texts:
We have upgraded Magento from 2.2.3 CE to 2.3.1 CE successfully. But we are facing few issues with the Tinymce js from admin end product edit page and cms pages etc.. when using Show/Hide Editor..

Product Edit Page from admin end.

Admin end cms page:

Please advise.


texts: Magento 2: Create a custom module for banner slider

texts:
I want to create a custom module for banner slider in Magento 2. Could anyone please guide me?

Looking forward to hearing from you.


texts: How to get and show the best selling products in magento 2

texts:
I wish to show best selling products in homepage.Please provide me a solution to get best selling products and display in home page.
Thanks


texts: How to use bundle products in configurable product?

texts: Magento default allow to create config product with simple products. Now can anyone help me to create config product with bundle products? Bundle product will be multiple simple products. Inventory will manage on simple products.Please help me


texts: Javascript customer data, options is undefined in Firefox

texts:
I have tis issue with the customer-data Javascript object.
Her is (a par of my code)

define([
    'jquery',
    "Magento_Customer/js/customer-data"

], function ($, customerData) {
    'use strict';

    return function (config, element) {
        customerData.reload(customerData.getExpiredSectionNames(), true).then(
            function () {
                let group = customerData.get('customer')();
                //do stuff after getting customer data
            }
        );
    }
});

I now the code can be approved by checking if the customer section needs a reload, but that is not the problem.

The code works fine in Chrome, but in Firefox I get the following error:
TypeError: options is undefined

The options get used in the getExpiredSectionNames() function on following line:

sectionLifetime = options.expirableSectionLifetime * 60

I guess this has to do with loading order of the javascript files.
So I tried moving the customer.customer.data block in de default.xml but that didn't work either.

Is there a way I can insert the options in the customer-data object from my custom js script? Or do I need to add somthing in my requirjs-config.js file?


texts: How do I display products on home page from a category

texts:
I use the following widget to display products on the home page for new products

<p>{{widget type="catalog/product_widget_new" display_type="new_products" products_count="10" template="catalog/product/widget/new/content/new_grid.phtml"}}</p>

How do I list products from a category under this?

I have tried using this:

{{block type="catalog/product_list" column_count="4" category_id="7" template="catalog/product/list.phtml"}}

but it doesn't do anything?


texts:
I want override the block file. I had given the details of the original file path and my overridden file.

My overridden file

app\code\Vendor\Module\etc\di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Sm\MegaMenu\Block\MegaMenu\View" type="Sm\MageMenuCutomize\Block\MageMenu\View" />
</config>

app\code\Vendor\Module\etc\module.xml

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

app\code\Vendor\duplicate\Block\Menu\View.php

<?php
namespace Vendor\duplicate\Block\Menu;
class View extends Template
{
    /* My Code*/
}

My Original File

app\code\Vendor\original\Block\Menu\View.php

<?php
    namespace Vendor\original\Block\Menu;
    class View extends Template
    {
        /* My Code*/
    }

I got the empty page after this processed is finished. What is the best way to over ride this.

Thanks in advance.


texts: Upgrading to Magento 2.3.3 gives a php version error

texts:
When I access my website I get the php v error

Magento supports PHP 7.1.3 or later. Please read Magento System Requirements.

But I have php 7.3.13

What am I missing?

I have checked these documentation but it didn't help.
When trying to upgrade to 2.3.2 getting a php version error

"Magento supports PHP 7.0.2, 7.0.4, and 7.0.6" error message when I have PHP 7.2.12

https://community.magento.com/t5/Installing-Magento-2-x/Magento-2-3-quot-Magento-supports-PHP-7-0-2-7-0-4-and-7-0-6-or/td-p/119379