texts:
I have created the custom column from sales/order_item and sales/quote_item table. But when I have set the values it's not saving. I don't know what happening. There is no Error logs also.

My code is

mysql4-installer-1.0.0.php

<?php

$installer = $this;
$installer->startSetup();

$this->_conn->addColumn($this->getTable('sales_flat_quote_item'), 'vendor', 'text');
$this->_conn->addColumn($this->getTable('sales_flat_order_item'), 'vendor', 'text');

$installer->endSetup();

?>

config.xml file

<events>

            <sales_order_save_before>
                <observers>
                    <save_before>
                        <type>model</type>
                        <class>vendor/observer</class>
                        <method>SaveBefore</method>
                    </save_before>
                </observers>
            </sales_order_save_before>
            <sales_quote_save_before>
                <observers>
                    <save_quote_before>
                        <type>model</type>
                        <class>vendor/observer</class>
                        <method>SaveQuoteBefore</method>
                    </save_quote_before>
                </observers>
            </sales_quote_save_before>
        </events>

Observer.php file

<?php
    class Easylife_Vendor_Model_Observer
    {

        public function SaveBefore(Varien_Event_Observer $observer){
            $order = $observer->getEvent()->getOrder();

            $order_item = $order->getAllVisibleItems();
            foreach($order_item as $order_items){
                $product= Mage::getModel('catalog/product')->load($order_items->getProductId());
                $product->setVendor('Admin');

            }

        }

        public function SaveQuoteBefore(Varien_Event_Observer $observer){
            $quote = $observer->getEvent()->getQuote();
            foreach($quote->getAllItems() as $item){
                $Product = $item->getProduct();
                $Product->setVendor('Admin');
                $Product->save();
            }
        }

    }

Is this method is correct or wrong?

Suggest me how to save this value to those tables..

Thanks.


texts: Access global messages after redirect to referrer

texts:
I have a save address function in my checkout and after the validation in the controller takes place if there is an error the following gets rendered.

if(isset($result['error']) && $result['error']){

    foreach($result['message'] as $msg){

        Mage::getSingleton('checkout/session')->addError($msg);
        $this->_message[] = $msg;
    }

    return $this->_redirectUrl($this->_getRefererUrl());
}

The referrer is a method belonging to the same controller so I assumed setting the variable $this->_message would mean I can access the message from the referrer method but it seems as though the class gets re-instantiated because if I do a var_dump($this->_message); in the referrer method it is null. I know there are messages getting set because if I don't redirect back to the referrer Mage::getSingleton('checkout/session')->addError($msg); works - aka it displays which fields need to be filled in on the form.

How can I make the messages available to the referrer method?


texts: Magento2 How to get configurable option and its price?

texts:
I am trying to pull configurable products option and price on product detail page on seprate section. on radio button. I've used below code to get detail of options but i can retrive price of options.

$blockObj = $block->getLayout()->createBlock('Magento\ConfigurableProduct\Block\Product\View\Type\Configurable');

$_attributes = $blockObj->decorateArray($blockObj->getAllowAttributes());

 foreach ($_attributes as $_attribute): ?>

    <?php foreach ($_attribute->getData('options') as $option):    ?>
        // option detail here
     <?php endforeach; ?>
 <?php endforeach; ?>

I've also try to get product id of options but i can get in above data. anyone have idea. how to get it?
Note: I've used objectmanager for testing now. I'll use class to use once my code will be ready


texts: Error: Call to a member function getUrl() on null PHP UNIT Test Cases Magento 2.X

texts:
Please check below PHP Unit Test Case code:

Error Error: Call to a member function getUrl() on null while generating code coverage.
 <?php

    namespace Vendor\Module\Test\Unit\Block;
    use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
    use Vendor\Module\Block\Customer;
    use Magento\Framework\UrlInterface;

    class CustomerTest extends \PHPUnit\Framework\TestCase
    {
        private $objectManager;

        protected $urlBuilderMock;

        private $customer;

        protected $context;

        protected function setUp(): void
        {
            $this->objectManager = new ObjectManager($this);

            $this->context = $this->createPartialMock(\Magento\Framework\View\Element\Template\Context::class);

            $this->urlBuilderMock = $this->getMockBuilder(UrlInterface::class)
                ->getMockForAbstractClass();

            $this->customer = $this->objectManager->getObject(Customer::class, [
                'context' => $this->context,
                "urlBuilder" => $this->urlBuilderMock
            ]);

        }

         public function testGetBaseUrl()
         {
              $url = "testurl";
              $validateData = "test....";
              $this->urlBuilderMock->expects($this->once())->method('getUrl')->with($validateData)->willReturn($url);
              $this->assertEquals($url, $this->customer->getBaseUrl());
         }

    }

If anyone understand the issue please reply, Thanks.


texts: Add attribute to custom tab at product edit page in admin panel

texts:
I added a module for custom product relations with the following how to: http://inchoo.net/magento/how-to-add-custom-product-relations-in-magento/. For that relations, a custom tab is added at the product edit page in the admin panel. Everything works fine, but now I would like to have a custom attribute, which is also generated via the installer script of the module, to that tab above the product relation grid. Is it possible to do that?

Thanks in advance!


texts: Magento 2 - How to move email field in checkout page?

texts: I Want to Move the Email Field below the phone number.


texts: Is it possible to change the starting date of all the data shown in the magento dashbaord?

texts: I want to show the information from a particular date not from the start/when i install the magento. Is it possible to modify the dashboard to show all the data (most searched, most viewed, favourite etc) from a particular date ?


texts: How Does Magento Pick Which Module File To Execute?

texts:
Having a hard time understanding this.

I have a nested block like this:

<block type="catalog/product_list" name="itemsShoes" module="MINE" template="slider/shoes.phtml"></block>

In my local.xml

The MINE module is defined in app/etc/modules and is in magento/app/code/MINE but I only have one PHP file in there.

My question is, as I add more php files how can I direct the block to pick which module PHP file it should execute?

Do I do this in app/etc/modules? So far it's just:

<config>
    <modules>
        <MINE>
            <active>true</active>
            <codePool>MINE</codePool>
        </MINE>
    </modules>
</config>


texts:
I need some help with some tax settings.
I've created a tax rule with 19% tax rate for Germany. It applies for retail customer tax class.
Not logged in customers are set to retail customer tax class.

Shipping origin is set to Germany.

I want to display both prices without and with taxes.
But no matter what settings I try... and I am trying and researching for hours already... I don't get it right. It always either looks like:
- Both prices are the same, showing the catalog price (which I enter including taxes due to German law)
- The price without taxes shows the catalog price, the price with taxes shows the price plus 19%.

What it needs to look like is: The price without taxes should show the catalog price -19% and the price with taxes should show the catalog price.

Obviously I put my tax setting catalog price to 'including taxes', although I have tried it with and without and with all alternations in the other settings.

I also kept clearing the cache in between attempts.

I am at the end of my wits, how exactly do I make Magento calculate the price excluding tax from the price including tax which I enter in the backend?


texts: Magento 2 : Postcode / Zipcode and telephone number missing in checkout form

texts:
Have just tried to test the checkout form to ensure that my shipping methods are working and the postcode/zipcode and telephone boxes are missing in the checkout form.

After doing some research I've found that this may be due to missing information in the tables eav_form_element and customer_form_attribute but I'm unsure about how to fix this if this is the case.


texts:
Here is a working query

$connection = $this->_objectManager->create('\Magento\Framework\App\ResourceConnection');
      $conn = $connection->getConnection();
      $select = $conn->select()
          ->from(
              ['o' => 'sales_order']
          )
          ->where('o.created_at>=?', $place_date);
      $data = $conn->fetchAll($select);

Now i want to Left join with table sales_order_address

ON sales_order_address.parent_id = sales_order.entity_id

and want to select sales_order_address.street too.


texts: Override of abstract class method not working

texts:
I'm trying to override the proccessAdditionalValidation method in the Magento\Shipping\Model\Carrier\AbstractCarrierOnline class. Below is what I have done but the function is not being called.

Create: app/code/Custom/ShippingMaxWeight/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="Magento\Shipping\Model\Carrier\AbstractCarrierOnline" type="Custom\ShippingMaxWeight\Shipping\Model\Carrier\AbstractCarrierOnline" />
</config>

Create: app/code/Custom/ShippingMaxWeight/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="Custom_ShippingMaxWeight" setup_version="1.0.0" />
</config>

Create: app/code/Custom/ShippingMaxWeight/etc/registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
        \Magento\Framework\Component\ComponentRegistrar::MODULE,
        'Custom_ShippingMaxWeight',
        __DIR__
    );

Create: app/code/Custom/ShippingMaxWeight/Shipping/Model/Carrier/AbstractCarrierOnline.php

namespace Custom\ShippingMaxWeight\Shipping\Model\Carrier;

class AbstractCarrierOnline extends Magento\Shipping\Model\Carrier\AbstractCarrierOnline
{
    public function proccessAdditionalValidation(\Magento\Framework\DataObject $request) {
       //override function
    }
}

Then I ran:

magento module:enable ShippingMaxWeight
magento setup:upgrade

I verified the module is installed and enabled in admin.

The max_package_weight setting in shipping is used for two purposes, to split an order into multiple boxes, and to find if a shipping method can be used based on max weight.   I need to specify the max BOX weight of 18 lbs and still show the shipping method when an individual item is more than 18 lbs. I want to hard code 150 as the max shipping weight for the max weight check.  We only use UPS ground and until we find an open source UPS LTL quote module we won't put up products that weigh more than 150 lbs.

$maxAllowedWeight = (double)$this->getConfigData('max_package_weight');

to

$maxAllowedWeight = 150;

I must be doing something wrong.  Just don't know what.


texts:
I am currently working on a new website design and planning to upgrade our current shop. The main bases will be the old database, but on "moving day" I want to import the latest orders/stock values and /sales/customers into the new database.

I was thinking of just importing the tables(customer_*/sales_*/cataloginventory_*), or does this not work? If so, which tables need to be moved?

My first test failed with the following:

  ERROR 1217 (23000) at line 29: Cannot delete or update a parent row: a foreign key constraint fails


texts: Apply discount for For every $X spent Programatically in magento 2

texts:
I want to apply the discount on every $X spent amount.
For example,

if $5 discount for every $10,
and my cart total is $34 then,
I will get the discount of $15.

Is it possible by programmatically in magento 2?


texts: Magento 1.9.2.4 - Activate different payment method for some customers

texts:
I was looking for a Magento method for activating a different method of payment for customers who make more than three orders.

For example, if the customer makes three orders on the site normally pay with credit card. Instead, if the customer has made a quarter order is activated as payment method the money order.

It is already possible to activate this from back end of Magento or it's necessary enter in the code PHP?


texts: Translating Currency Symbol in Transactional Emails

texts: Is it possible to translate the currency symbol within transactional emails? For example I want to change USD to US.


texts:
I'm new to Magento and I have just installed my first webshop.

The problem I'm having is that the installations doesn't send out any emails.
Not if an order is made or even when a user doesn't remember his/her password.

The installation is in demo-mode and I have tried to see if the mail() function is active on my server, it is (I have send an email).


texts: How to Create Custom Customer Attribute with only Registration time. Magento 2

texts:
I want to Create Custom Customer attribute for magento 2.

Which include in admin side at Customer creation time only.

After customer Create we want to just display it on customer Edit page as in disable state. admin can't edit it after first insert just readonly mode.

How to do that?

My custom Customer attribute code:

            $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

        $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, 'custom_attr', [
            'type' => 'varchar',
            'label' => 'Customer Position',
            'input' => 'text',
            'source' => '',
            'required' => false,
            'visible' => true,
            'position' => 999,
            'system' => false,
            'backend' => ''
        ]);
        $attribute = $customerSetup->getEavConfig()->getAttribute('customer', 'custom_attr')
            ->addData(['used_in_forms' => [
                'adminhtml_customer'
            ]]);
        $attribute->save();


texts: M1.9x How can I reset 1 multiselect attribute for *all* products

texts:
I want to reset 1 multiselect attribute for all products.

So remove any value (set to null) for all products and save

Ideally targetting the products that have a value set ... it makes no sense to unset data that is not set

So the logic would be
- find all products with at least some data set for 1 multiselect attribute
- unset the data
- save

question: how can this be done?

thanks


texts: Maximum number of categories in Magento CE, and potential performance problems

texts:
Is there a magic number, or some guide as to what is a realistic limit for the number of categories a Magento catalog can contain?

A project I'm working on will need to feature some 9000 or so categories - is this an achievable number in Magento Community Edition?

I know there are concerns with large product catalogs, but I can't find any information around large category sets.


texts: Cannot upload product images after upgrade

texts:
So a client came on board with a Magento site that hadn't been upgraded for years and were experiencing security issues. So we cleaned up their site and upgraded them to 1.9.2.4.

As I've been testing their system I've noticed that I cannot upload any new product images. All folder permissions are correct. When I try to upload the image it says "Upload complete" but the new image does not appear in the list. This affects new or current products.

So I did some digging. There is nothing in the server or Magento logs that would explain the issue. I went through the code step by step trying to figure out where it's falling down. So far I've discovered that the file is being uploaded to the /tmp directory. It is then correctly moved to the magento/media/tmp folder. After that nothing appears to happen.

Has anybody had this issue before? Any ideas what is going wrong?

NB. This doesn't appear to affect any other image upload such as wysiwyg.

Thanks


texts: How to unchecked Return to Stock checkbox of new credit memo in magento 1.9?

texts:
I am working on Magento 1.9.2

The problem I am facing is when we create new credit memo there is the list of ordered items in the list where you can tick on the product to make it return to stock or not.

How to uncheck this checkbox by default??


texts: Tax only on item price, not on shipping price

texts:
How can i apply tax only on Item price not on Shipping price ?
I have setup tax rate 7.25 %
Any help would be appreciate.


texts:
I would like to ask you, if you heard or know, how to reach this:
I have product, which I am selling from 1.10.2014 00:00 till 18.10.2014 23:59.
Is it possible to set it, or shall I do it manually?
...may be some extension or so, but I can not find, I just found counter, but I did not get answer, if it can disable selling, or product, or set out of stock...

Thank you for advice PeterB


texts: Set max execution time for a magento php command

texts:
I've implemented some custom php commands for magento 2.3 and I've found a weird issue.
The scripts doesn't seem to reset the max_execution time, I've set both from inside the script ( ini_set ) and outside the script ( -d max_execution_time ).
I think there is an ini_set('max_execution_time', 0) somewhere from a Db class, so my settings are overridden.
Has anyone faced a similar issue?


texts: Magento2: Is Magento Community provide a Cloud?

texts:
Like Magento EE support Cloud.
In the same way, Does Magento CE give us Cloud?

And what is the benefit if I choose Magento EE with Cloud. And What if not go with cloud?

Can anyone please help


texts:
Does anyone know how to add an extra column for data in the wishlist table?

It appears the columns and titles are populated maybe in the core files. It is not built like the shopping cart where you can easily add and remove columns in the phtml files.

Any help would be great!


texts: Magento 2.1: how to create category Attribute programmatically?

texts:
The custom extension in which I am working is working correctly till 2.0.7, but not in 2.1. So my question is, how to create category attribute programmatically?

Below code was working in 2.0.7, but it is not working in 2.1.

$eavSetup->addAttribute(
            \Magento\Catalog\Model\Category::ENTITY,
            'customattribute',
   [
     'group' => 'Custom Group',
                 'type' => 'varchar',
                 'label' => 'Custom Group',
                 'input' => 'textarea',
     'source' => '',
                 'required' => false,
                 'sort_order' => 49,
                 'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
     'wysiwyg_enabled' => true,
                 'is_used_in_grid' => true,
                 'is_visible_in_grid' => false,
                 'is_filterable_in_grid' => true
            ]
        );


texts:
I got this file:

  module-sales/Block/Adminhtml/Order/Create/Shipping/Method/Form.php

I want to override this in a custom module.

How can I do that?
Thanks!


texts: Exporting customer addresses messes up CSV

texts:
I have been trying to export customer addresses from magento, but I have a issue with the 2nd line off the street address.  No matter what way i export it ( magentos dataflow or directly from the database) when the CSV is created it seems the 2nd line of the address is creates a new line.  So when I export instead of having a line for each record, I some times have 2 lines (if there is a 2nd line in the address) which messes up the formatting:

So what i get is:

Customer name, "Address line 1
address line 2", more customer details

instead off:

Customer name, "Address line 1 address line 2", more customer details

There must be a "next line" for the 2nd line of the address, how can I get around this, so I can have the correct formatting?


texts:
I set up a new Magento System and Migrated Data from the old Shop into the new system.

My problem now is that when i edit a product the save button is without function.

I checked the dev tools in Chrome it shows no error not even a event under network. I tried multiple other browsers. Cleared the caches.

I would greatly appreciate any Help.

Thanks in advance.


texts: How to upgrade Magento 1.5 to latest 1.9 version. 3 years old store?

texts:
My website is developed in magento version 1.5. I Need to upgrade to version 1.9.

Below are the current asserts on my website:

Db size Approx. 9 GB
Total Products Approx. 50,000
Total Orders 20,000
Total customers 23,000

I have followed below steps to achieve this but no luck.

Created new instance for the same.
Upgraded using Magento connect.
Its upgraded successfully version is updated.
But when i clear the cache and hit the url its infinite redirect loop.

2nd Approach:

Created new instance for the same.
Merge the latest version core files and other js, lib etc.. files.
Same when i hit the url its infinite loop.

3rd Approach:

Created new instance version 1.6
And merge the theme and skin files and others that are required to run the theme.
Configured the original db instance with this 1.6 version for upgrading the db.
Made changes on Db as required.
No luck again its loading and loading..

Please suggest. How can i upgrade my store?

Thanks In Advance!!


texts:
After Saving category from admin side,Successfully saved Category. But in the exception.log file I got following error.

"exception":"[object] (Magento\\Framework\\Exception\\LocalizedException(code: 0): Something went wrong while saving the file(s). at /opt/lampp/htdocs/m2/vendor/magento/module-catalog/Model/ImageUploader.php:215)"

Any Help will be Appreciated. My magento version :2.3.1.


texts: I am new to Magento. I wish to do the search functionality to check the whole string given in the search box. But, the products with one of the words in the strings in it also coming as result. Please help me in achieve this.


texts: where to define customemail_email_template in magento2 to send mail to admin

texts: hello everyone I am getting error Email template 'customemail_email_template' is not defined. where to define it


texts: Magento 2 offline payment method new order status

texts:
I've created a new offline payment module using this generator http://cedcommerce.com/magento-2-module-creator/payment-module

config.xml

....
   <order_status>pending_payment</order_status>
....

system.xml

<field id="order_status" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0">
<label>New Order Status</label><source_model>PackageName\ModuleName\Model\Config\Source\Order\Status\Pendingpayment</source_model>
 </field>

I'want to set new order status to pending or pending_payment, but it set to processing when creating a order every time.


texts: Magento Dataflow Advance Profile To Export Customer in Google Contact Format

texts:
I have difficulty to find any guide relating to this subject.
Basically, I want to export all customer using magento dataflow profile export to csv, in a way so I can just import the csv to the google contact directly. Below are fields that needed by google contacts:

Given Name
Family Name
E-mail 1 - Type
E-mail 1 - Value
Phone 1 - Type
Phone 1 - Value

Number 1,2,4,6 is using data from field mapping.
The question is, how can I fill number 3 and 5

Number 3 should filled by "* Work"
Number 5 should filled by "Mobile"

Below is my Actions XML:

    <action type="customer/convert_adapter_customer" method="load">
        <var name="store"><![CDATA[2]]></var>
        <var name="filter/email"><![CDATA[fara]]></var>
        <var name="filter/group"><![CDATA[4]]></var>
        <var name="filter/adressType"><![CDATA[default_billing]]></var>
    </action>

    <action type="customer/convert_parser_customer" method="unparse">
        <var name="store"><![CDATA[2]]></var>
        <var name="url_field"><![CDATA[0]]></var>
    </action>

    <action type="dataflow/convert_mapper_column" method="map">
        <var name="map">
            <map name="firstname"><![CDATA[Given Name]]></map>
            <map name="lastname"><![CDATA[Family Name]]></map>
            <map name="email"><![CDATA[E-mail 1 - Value]]></map>
            <map name="shipping_telephone"><![CDATA[Phone 1 - Value]]></map>
        </var>
        <var name="_only_specified">true</var>
    </action>

    <action type="dataflow/convert_parser_csv" method="unparse">
        <var name="delimiter"><![CDATA[,]]></var>
        <var name="enclose"><![CDATA["]]></var>
        <var name="fieldnames">true</var>
    </action>

    <action type="dataflow/convert_adapter_io" method="save">
        <var name="type">file</var>
        <var name="path">var/export</var>
        <var name="filename"><![CDATA[test.csv]]></var>
    </action>

This is the output:

However, below is the expected output

How can I achieve that?
Thank you


texts: Order Confirmation Email Not Sending Magento 2

texts:
New order confirmation emails are not being sent out when an order is processed.
If I add a comment to the order and click 'notify customer by email' that will send the update to your order notification, but if I click the 'Send Sales Email' but
The contact us form will also send without any issue.
Even though the back-end says: Order # 000000183 (The order confirmation email was sent)
There is most definitely no order confirmation being sent out.

The Cron is running as intended
I don't seem to be receiving any errors in the logs related to the issue at hand.
I attempted to temporarily fix the issue by utilising the third-party Magento2-GmailSMTP-App but this didn't make any difference.
Emails can definitely be sent from the external SMTP server.
Payment methods currently being used are PayPal and Finance, the results is the same for both processes.

Any suggestions?


texts: How can I use native product csv import magento 2

texts:
I am trying to use magento 2 native csv import in my custom module. I am using following step to achieve requirement after some R&D but not working for me. I place csv file with sample data at location self::PATH_FILENAME and it works.

Getting issues

1) Unable to create configurable product variations. But when I try same csv from admin it works.

2) Observer event not working catalog_product_import_bunch_save_after. But when I try same csv from admin it works.

public function _importProducts($rowData){
    $csvModel = $this->csvFactory->create(['destination' => self::PATH_FILENAME]);
    $csvModel->writeRow($rowData);

    $importModel = $this->importModelFactory->create();

    $importModel->setData([
                "entity"=>"catalog_product",
                "behavior"=>"append",
                "validation_strategy"=>"validation-stop-on-errors",
                "allowed_error_count"=>"10",
                "_import_field_separator"=>",",
                "_import_multiple_value_separator"=>",",
                "import_images_file_dir"=>self::PATH_IMAGES
            ]);

    $sourceModel = \Magento\ImportExport\Model\Import\Adapter::findAdapterFor(
                    self::PATH_FILENAME,
                    $this->objectManager->create(\Magento\Framework\Filesystem::class)
                                        ->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::ROOT),
                    $importModel->getData(\Magento\ImportExport\Model\Import::FIELD_FIELD_SEPARATOR)
            );

    $isValid = $importModel->validateSource($sourceModel);
    if ($importModel->getProcessedRowsCount() === 0 ||
        !$isValid ||
        $importModel->getErrorAggregator()->getErrorsCount()
    ) {
        var_dump($importModel->getErrorAggregator()->getAllErrors());
        exit;
    }

    try {
        $importModel->importSource();
    } catch (\Exception $e) {
        throw new \Exception($e->getMessage());
    }
}

Note : I am using command line 'php bin/magento custom:import' for execute.

If you guys have any Idea please share

Any help will be appreciated


texts: Magento 1.8.1 Frontend incredibly slow on OSX

texts:
I have an OSX development environment in which I ported a Magento db that is working fine in production.

My dev environment is using:

Magento 1.8.1.0
MySql 5.7.11
PHP 5.5.30
Apache/2.4.16 (Unix)

The backend is working fine, however the frontend is incredibly slow (2.5 minutes to load the index.html).

Do you have any idea of what is going wrong?

This are the first lines of my profiler output ordered by time (I am sorry for the pretty bad table format):

Memory usage: real: 54001664, emalloc: 43746624
Code Profiler   Time    Cnt Emalloc RealMem
mage    292.1082    1   0   0
mage::dispatch::routers_match   291.498 1   0   0
mage::dispatch::controller::action::predispatch 164.4863    1   4,474,112   4,718,592
CORE::create_object_of::Mage_Core_Model_Session 164.4522    2   279,216 262,144
Mage_Core_Model_Session_Abstract_Varien::start/start    164.4475    1   91,096  262,144
mage::dispatch::controller::action::cms_index_index 127.0072    1   0   0
mage::dispatch::controller::action::cms_index_index::layout_render  126.8173    1   0   0
frontend/mascagni/mt_colinus/template/page/1column.phtml    126.7907    1   13,076,656  22,806,528
__EAV_COLLECTION_LOAD_ENT__ 120.2808    26  4,635,184   4,194,304
frontend/mascagni/mt_colinus/template/page/html/header.phtml    118.4312    1   3,421,056   3,670,016
frontend/mascagni/mt_colinus/template/magenthemes/navigation/top.phtml  118.3935    1   2,132,200   2,359,296
frontend/mascagni/mt_colinus/template/magenthemes/productsscroller/productsscroller.phtml   5.1881  1   4,959,856   15,728,640
frontend/mascagni/mt_colinus/template/magenthemes/productslist/productslist.phtml   2.6763  1   709,760 0
frontend/mascagni/mt_colinus/template/magenthemes/productslist/products.phtml   2.6632  1   491,480 0
__EAV_LOAD_MODEL__  2.3984  208 11,420,360  3,932,160
__EAV_COLLECTION_AFTER_LOAD__   1.9576  26  3,239,952   2,883,584
__EAV_LOAD_MODEL_AFTER_LOAD__   1.0366  208 3,548,504   2,883,584
__EAV_LOAD_MODEL_ATTRIBUTES__   0.9912  208 14,450,832  0
frontend/mascagni/mt_colinus/template/catalog/product/price.phtml   0.6862  22  1,891,032   0
mage::dispatch::db_url_rewrite  0.5266  1   61,168  0
__EAV_COLLECTION_LOAD_ATTR__    0.4639  26  420,704 262,144
DISPATCH EVENT:catalog_block_product_list_collection    0.3955  2   1,787,800   1,572,864
OBSERVER: review    0.3952  2   1,784,992   1,572,864
OBSERVER: inventory 0.288   66  2,675,256   1,835,008
DISPATCH EVENT:catalog_product_collection_load_after    0.2378  22  3,206,024   2,883,584
mage::dispatch::controller::action::cms_index_index::layout_generate_blocks 0.1612  1   15,425,136  15,204,352
DISPATCH EVENT:catalog_product_load_after   0.0974  44  548,240 0
BLOCK ACTION: checkout_cart_link -> addCartLink 0.0566  1   5,490,824   5,505,024
BLOCK: bestseller   0.0411  1   2,938,944   2,883,584
mage::app::init::stores 0.0344  1   3,654,376   3,670,016


texts: Highlight {{var shipping}} if text is UPS

texts:
Using a pdf generator for my invoices and I somehow need to highlight the shipping method if its "UPS"

The code is below for that portion

        {{var payment}}
        {{var shipping}}


texts: How to pass added custom "key=>value" into getCollection()?

texts:
On product lisitng page i want to get one more parameter "latitude" for all product,how can i achieve?

Here is my code:-

public function setCollection($collection)
    {

        $this->_collection = $collection;

        $mpJoinConditions = 'marketplace_product.mageproduct_id = e.entity_id';

       $this->_collection->getSelect()->join(
                $this->_collection->getTable('marketplace_product'),
                $mpJoinConditions,
                []
            )->columns("marketplace_product.seller_id")->where ("marketplace_product.store_id = '0'");

             echo "<pre>" ; print_r($this->_collection->getData()) ; exit;
}

Note:-As per my requirement,i don't need to create product custom attribute OR use joins.

I tried to use addData and setData() but didn't get success.

After print_r(),added custom "key=>value" must be there for each product.

Update:-

By doing following i'm able to do set Latitude seprately and getting the same on phtml file:-

  foreach($this->_collection as $key=>$prod_data){

     $prod_data->setData('latitude',$prod_data->getId());

}

I've to sort(DESC) the product based on latitude value,but when i'm printing

        echo "<pre>" ; print_r($this->_collection->getData()) ; exit;

then not getting 'latitude' parameter $this->_collection->getData() here due to which i can't apply setOrder().on phtml file by using $product->getLatitude() it's showing so please help me to resolve this issue.


texts: Magento 2 :- how to get the subcategories from main category url

texts:
I want to get the subcategories of a main category using main category url.

I tried in this way in a function in my block.

$category = $this->_categoryFactory->create()->getCollection()
    ->addAttributeToFilter('url_key',$url_key);

but i cannot get any thing.


texts: Path hints not displaying in frontend and admin in Magento 2.2.4?

texts:
I don't know how to implement this task. In admin page, I have stores->Configuration->Advanced->developer

I have to choose to Enabled Template Path Hints for Storefront "yes".
I have to choose to Enabled Template Path Hints for Admin "yes".

But in Front-end and admin not display path hints.


texts: Magento2 different between Object Manager get and create method

texts:
In magento2, we have use object manager:

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

and  use get() and create() method

  $cookieManager = $objectManager->get('{MyClassName}')

  $cookieManager = $objectManager->create({MyClassName})

Now, i want to know

what is different between this two methods?
When and where we need to use this two methods?


texts: Images display in backend and frontend thumbnails, but nowhere else

texts:
I've tried every fix I can searching Google, such as permissions, owner, etc and I just cannot get images to display properly again.

This was working fine up until recently and I have no idea what has triggered it...

Here is a few images of the problem:

When I right click the image and open it on the product page, I get the following:

skin/frontend/default/default/images/catalog/product/placeholder/image.jpg

While the thumbnails are showing:

media/catalog/product/cache/1/thumbnail/56x/9df78eab33525d08d6e5fb8d27136e95/t/e/temple-haze-w_1_.jpg

And the backend is showing:

media/catalog/product/t/e/temple-haze-w_1_.jpg


texts: Unable to edit the store, the scope or scope ID is invalid. Verify both and try again error while trying to edit the store

texts:
I created 2 stores and their views programmatically and I'm unable to edit them from Design > Configuration.
I created the stores using GroupFactory and store views using StoreFactory. After that, I inserted groups to "store_group" table and the store views to "store" table into the database using resource models.
This is the result:

However, when trying to edit one of these stores from Design/Configuration:

I'm getting this error:
1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): The scope or scope ID is invalid. Verify both and try again.

Exception #0 (Magento\Framework\Exception\LocalizedException): The scope or scope ID is invalid. Verify both and try again.

After this, I checked the "core_config_data" table to see if there any scope or scope_ids for the avaiable stores, but I can't see any. Any kind of help would be appreciated.


texts:
We are in the process of developing a heavily customized Magento store which needs to support muti website, and multi stores, the mobile app will also need to easily switch from one store to another. What is the best option for the API selection? XMLConnect seems pretty efficient, but it seems only attached to one store and lacking documentation; REST API is in complete; SOAP API is too heavy...

Why Magento doesn't provide a complete set of REST API as the SOAP API?


texts: Finding the number of links associated with a downloadable product

texts:
I am working on a Magento CE 1.7.0.2 site that contains Downloadable Products, all of which should only contain one link. It seems that some of these products contain two or more links and I need some way of finding out which products have this problem. Ideally this would be in the form of a spreadsheet with SKU against the number of links, but if I could even find out where this information is stored in the database that would be helpful!

I tried exporting Downloadable Products via System...Import/Export...Dataflow Profiles but I can only export links_exist, links_purchased_separately and links_title, none of which enable me to find the number of links for a product.

Many thanks for any help.


texts: Create configurable products programatically Magento

texts:
Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity
  constraint violation: 1452 Cannot add or update a child row: a foreign
  key constraint fails (`m1937`.`catalog_product_entity`, CONSTRAINT
  `FK_CAT_PRD_ENTT_ATTR_SET_ID_EAV_ATTR_SET_ATTR_SET_ID` FOREIGN KEY
  (`attribute_set_id`) REFERENCES `eav_attribute_set`
  (`attribute_set_id`) ON DELE)


texts: After upgrade from Magento 2.2.x to 2.3.x getting "No linked stock found" on multistore

texts:
We upgraded to 2.3.1 and get on product list pages of several stores an error:

No linked stock found


texts: Magento 2: Theme change field is missing in Design Tab

texts:
I created a new theme but when i tried to change the theme from

stores -> configuration -> design Tab  I found that theme change field is missing from design tab. Please look at screen-shot below. Can anyone tell me why theme change field is not coming. I am using  Magento ver. 2.1.5.


texts: Magento load checkout/cart from the quoteId : indexAction()

texts:
if(isset($quoteId) && $quoteId!="" && is_numeric($quoteId)){
    $quote = Mage::getModel('sales/quote')->load($quoteId);
    Mage::getSingleton('checkout/session')->setQuote($quote);
    Mage::getModel('sales/quote_item')->setQuote($quote);
    $cart = Mage::getSingleton('checkout/cart')->setQuote($quote)->getQuote();
} else {
    $cart = $this->_getCart();
}

if ($cart->getQuote()->getItemsCount()) {
    $cart->init();
    $cart->save();
    if (!$this->_getQuote()->validateMinimumAmount()) {
        $minimumAmount = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())
            ->toCurrency(Mage::getStoreConfig('sales/minimum_order/amount'));
        $warning = Mage::getStoreConfig('sales/minimum_order/description')
            ? Mage::getStoreConfig('sales/minimum_order/description')
            : Mage::helper('checkout')->__('Minimum order amount is %s', $minimumAmount);
        $cart->getCheckoutSession()->addNotice($warning);
    }
}


texts: How to Display the Most viewed Products with images in Magento 1.9.2?

texts:
I have use this code, products are coming but images are not showing. anyone can correct this code. thanks

  <?php
$totalPerPage =4;
$storeId = Mage::app()->getStore()->getId();
$_productCollection = Mage::getResourceModel('reports/product_collection')
    ->addAttributeToSelect('*')
    ->setStoreId($storeId)
    ->addStoreFilter($storeId)
    ->addViewsCount()
    ->setPageSize($totalPerPage);
?>
<?php $_collectionSize = $_productCollection->count(); ?>

<?php if ($_collectionSize) { ?>

Most Viewed Products

        <?php
        foreach ($_productCollection as $_product):
        $image_url = $this->helper('catalog/image')->init($_product, 'small_image')->resize(300,300);
        $alt = $this->htmlEscape($this->stripTags($this->getImageLabel($_product, 'small_image'), null, true));
        ?>

            <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
                <img src="<?php echo $image_url; ?>" alt="<?php echo trim($alt)? $alt: $this->htmlEscape($this->stripTags($_product->getName())); ?>" />

                    <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
                        <?php echo trim($alt)? $alt: $this->htmlEscape($this->stripTags($_product->getName())); ?>

        <?php endforeach; ?>

<?php } ?>


texts: Layered navigation for custom product collection

texts:
Our website is setup so you can browse by category or by brand.  The layered navigation on the left works great when viewing by category (has the ability to filter by Colour / Size / Price / Brand).  However, when viewing by brand the layered navigation includes every colour, size category available in the root category rather than being applicable to the list of products.  It doesn't work to filter the products on the page.  We'd like it to only display the available filters for the products on the page.

Hope that makes sense!  I'm keen to get this resolved and happy to pay for someones time if they know a fix for it!


texts: Magento 2 - "Undefined constant 'Product\SizeChart\Helper\Data'" while using helper

texts:
If anyone have idea then please share with me.
I am going to stuck in this error:

Uncaught Error: Undefined constant 'Product\SizeChart\Helper\Data' in
/opt/lampp/htdocs/M2/app/code/Product/SizeChart/view/frontend/templates/size.phtml:48
Stack trace: #0
/opt/lampp/htdocs/M2/vendor/magento/framework/View/TemplateEngine/Php.php(59):
include() #1
/opt/lampp/htdocs/M2/vendor/magento/framework/Interception/Interceptor.php(58):
Magento\Framework\View\TemplateEngine\Php->render(Object(Product\SizeChart\Block\Display),
'/opt/lampp/htdo...', Array) #2
/opt/lampp/htdocs/M2/vendor/magento/framework/Interception/Interceptor.php(138):
Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent('render',
Array) #3
/opt/lampp/htdocs/M2/vendor/magento/framework/Interception/Interceptor.php(153):
Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception{closure}(Object(Product\SizeChart\Block\Display),
'/opt/lampp/htdo...', Array) #4
/opt/lampp/htdocs/M2/generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php(26):
Magento\Framework\View\TemplateEngine\ in
/opt/lampp/htdocs/M2/app/code/Product/SizeChart/view/frontend/templates/size.phtml
on line 48

here is my helper code:
<?php namespace Product\SizeChart\Helper;

use \Magento\Framework\App\Action\Context;
use \Product\SizeChart\Model\CurdFactory;

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
    protected $curdFactory;

    public function __construct(
        Context $context,
        CurdFactory $curdFactory,
        $data = []
    )     {
        $this->curdFactory = $curdFactory;
        parent::__construct($context, $data);
    }

    public function getCollection()
    {
        return $this->curdFactory->create()->getCollection();
    }
}

Thank you in Advance.


texts: Magento 1.9.2 Configurable product- single product order has 2 items with price zero

texts:
I'm following configurable product structure in my magento store. If i order and item it shown normally on magento panel. But when accessing through SOAP or 3rd party plugins it has duplicate order with price zero.

Example:

How do i solve this?


texts:
I am creating one module. But in the controller getting following error.

Fatal error: Class HK\Faq\Controller\Faqs contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Magento\Framework\App\ActionInterface::execute) in \app\code\HK\Faq\Controller\Faqs.php on line 12

Here is the Faqs.php file I am not getting what is wrong in this file.

<?php

namespace HK\Faq\Controller;

use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\View\Result\PageFactory;
//use HK\Faq\Helper\Data;
use HK\Faq\Model\FaqFactory;

class Faqs extends Action
{
   /**
    * @var \Magento\Framework\View\Result\PageFactory
    */
   protected $_pageFactory;

   protected $_dataHelper;

   protected $_faqFactory;

   /**
    * @param Context $context
    * @param PageFactory $pageFactory
    * @param Data $dataHelper
    * @param NewsFactory $faqsFactory
    */
   public function __construct(
      Context $context,
      PageFactory $pageFactory,
      //Data $dataHelper,
      FaqFactory $faqFactory
   ) {
      parent::__construct($context);
      $this->_pageFactory = $pageFactory;
      //$this->_dataHelper = $dataHelper;
      $this->_faqFactory = $faqFactory;
   }

   /**
     * Dispatch request
     *
     * @param RequestInterface $request
     * @return \Magento\Framework\App\ResponseInterface
     */
    public function dispatch(RequestInterface $request)
    {
       // Check this module is enabled in frontend
       $result = parent::dispatch($request);
        return $result;

      /*if ($this->_dataHelper->isEnabledInFrontend()) {
         $result = parent::dispatch($request);
          return $result;
      } else {
         $this->_forward('noroute');
      }*/
    }
}


texts: Magento 1: $productCollection->getData() vs foreach ($productCollection as $product)

texts:
I have Magento product collection with some filters.
when i call $productCollection->getData() I have right result, but foreach($productCollection as $product) gives wrong products.
why its happening?


texts: How to delete custom child theme in magento2

texts: I clone my theme to set child theme. I deleted child theme folders in app/design/frontend/ and app/code//ThemeOptions/fixtures but in admin backend it's not removed. I flush cache , Please let me know how to remove my custom child theme.


texts: How to have multiple origin address for shipping in Magento 1.7.0.2

texts:
I am using Magento1.7.0.2. I want to have more than one shipping origin address for my site since ordered items are sent from different Warehouses depends upon the products.Please suggest if there is any extension which solves my problem.
Thanks in Advance!.


texts: Magento patch SUPEE-10266-CE issue in product upload section missing

texts:
We have applied SUPEE-10266-CE-1.8.1.0 Magento patch, but we getting issue in product edit page, on the product edit section product image upload section is missing.

We checked the system log, it gives error message like

  Not valid template
  file:adminhtml/base/default/template/media/uploader.phtml

Please give valid feed back as soon as possible.


texts: Error While saving quote programmatically

texts:
Notice: Array to string conversion  in
  D:\Projects\magento\lib\Varien\Db\Adapter\Pdo\Mysql.php on line 3074


texts: How to set HTTP Response Code in Custom REST API

texts:
Hi Guys for a project i try to extend the Magento REST API.
I have some problems with my error handling. I don't know how to send the right Http Response Code. I tried it with something like this:

    $this->_errorMessage($e->getMessage(), Mage_Api2_Model_Server::HTTP_BAD_REQUEST, array(
         'item' => $data
    ));
    return;

I get the right message as a response but the status code is always 207.


texts: Product Collections: Get ALL products even though "Show products that are out of stock" set to NO?

texts:
I’d like to list products using Product Collections that list ALL products regardless is_salable or in_stock are false. Is there a way I can disable all is_salable or in_stock checks for Mage::getResourceModel('catalog/product_collection') ?

Getting the product collection is done using:

$selections = Mage::getResourceModel('catalog/product_collection')
  ->addAttributeToSelect('*')
  ->addMinimalPrice()
  ->addFinalPrice()
  ->addTaxPercents()
  ->addStoreFilter()
  ->addIdFilter($selection_ids, false)
  ->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);

  $selections->load();

but because "Show products that are out of stock" ist set to NO it automatically wipes all products that are not in stock.

Is there a way to bypass the "show_out_of_stock" check? Thanks for any assistance!


texts:
In trying to solve this issue Ive read a few different articles, and ended up trying to output the Recently Viewed Products file in a variety of ways, and none of them seem to be working.

Here is the relevant bits in local.xml:

<catalog_product_view>
    <reference name="content">
        <reference name="product.info">
            <block type="reports/product_viewed" name="reports.product.viewed" template="reports/product_viewed.phtml"/>
            <block type="core/template" name="reports.product.viewed2" template="reports/product_viewed.phtml"/>
        </reference>
    </reference>
</catalog_product_view>

I have these lines at the very top of reports/product_viewed.phtml:

hello

<?php if ($_products = $this->getRecentlyViewedProducts()): ?>

This is how I am trying to output the recently viewed products in catalog/product/view.phtml

<?php echo $this->getChildHtml('reports.product.viewed'); ?>

<?php echo $this->getChildHtml('reports.product.viewed2'); ?>

<?php echo $this->getLayout()->createBlock('reports/product_viewed')->setTemplate('reports/product_viewed.phtml')->toHtml(); ?>

All of this outputs the following:

hello

Basically, the product_viewed file only outputs anything when it is inserted as a core/template block, but obviously it wont work properly unless its inserted as a reports/product_viewed block. However the product_viewed file wont render at all if its inserted as a reports/product_viewed block.

This is the same if I have logged into an account or if I am viewing the site as a guest.

Refreshing the statistics in the Admin Panel made no difference.

This is in Magento 1.9.2.2.

Does anyone have and ideas as to why my reports/product_viewed block wont render at all?


texts: How to add text under the logo of print order PDF on success page

texts: I need to add text under the logo of print order PDF on success page in magento 2


texts: Magento 2 - Admin panel product image uploading gives error

texts:
I am receiving below error while uploading any image for product.

  Notice: A non well formed numeric value encountered in
  /var/www/sitename.com/vendor/magento/framework/Image/Adapter/Gd2.php
  on line 344

Is there anyone who receives same error?


texts: New language doesn't show up in the menu

texts:
I have a german/english store.

I wanted to add the dutch language for Netherlands.

I installed it with composer from this site

Then I changed the language in the store config as following :

But it doesnt show up in my language menu which still show only English and German:

But I can see the changed in the admin login page :

Am I missing something ???


texts: Magento2 : How to get when page content load

texts:
I want to add some custom script on checkout page content, but my script is executing before content load.

require([
        'jquery',
    ], function ($) {
        $(window).load(function(){
            // my script here
        });
    });

How to add script which run just after all page content load.


texts: How to add a custom product attribute to PDF Invoice Magento 2

texts:
Solved this myself, but was a pain so thought I'd share the knowledge,

In vendor/magento/module-sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php

in public function draw()

under lines[];

add :

$id = $item->getProductid();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->get('Magento\Catalog\Model\Product')->load($id);
$brand = $product->getAttributeText('manufacturer');

Change manufacturer to whatever custom attribute code you want.

Quick and dirty - yes I know its a mod of core code and will translate to my own module now it's working, but hope this makes others life easier.


texts: Calling PHP block or Controller from AJAX from just a .JS file in Magento2

texts:
In other magento2 modules i have used AJAX to call a block from a PHTML file but for this specific task i am needing to make an ajax call to a controller file from a .js file but i am getting 404 on my index file.
Here is my ajax request in bos2.js
$.ajax({
    url: url.build('bos_route/frontend/ajaxcontroller'),
    type: 'POST',
    dataType: 'json',
    data: {
        form_key: window.FORM_KEY
    },
    showLoader: true,
    complete: function(response) {
        var status = response.responseJSON.status;
        if (status == "success") {
            //there is a response from index.php
        }
    },
    error: function(xhr, status, errorThrown) {
        console.log('Error happens. Try again. error : ' + errorThrown);
    }
});

in my Vendor/module/etc/frontend/routes.xml i have
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="bos_route" frontName="bos_route">
            <module name="Vendor_Module" />
        </route>
    </router>
</config>

and then i have a php file in Controller/frontend/Ajaxcontroller/index.php
this file should just export to the log file but im getting 404 not found

XX.XX.XX.co.uk/bos_route/frontend/ajaxcontroller


texts:
I want to add icon to payment method to be like this http://prntscr.com/hvj56n

this is the code from app/design/frontend/package/theme/template/checkout/onepage/payment/methods.phtml

<label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>

Thank you.


texts: Magento dataflow import (stop indexing on the fly)

texts:
There are, basically,  two ways when importing product via csv file in Magento.
a) import
b) dataflow import

a) option, works faster, I assume that is because this option want index all the data on the fly, you have to do that after the import is done.

is there a way i can stop dataflow import to stop indexing on the fly. I think this will speed up the process of importation. Very important.


texts: simple redirects using Marketing > URL REWRITES not working properly

texts:
Sometimes when people click on a search result that has a broken URL like https://www.example.com/catalogsearch/result/ or https://www.example.com/catalogsearch/result/?q= they will get taken to a 404 or 503 page.
Sometimes it will show the Maintenance page like so:
We’ll be back soon!
This website is currently undergoing scheduled maintenance and will be back online shortly. Thank you for your patience.
I just want to redirect these type of broken search links back to the homepage but the URL Rewrites don't seem to work in this case.
Request Path  = /catalogsearch/result/
Target Path   = https://www.example.com
Redirect Type = Permanent (301)
Any ideas why it's not working? Any help would be greatly appreciated.
Magento 2.3.3-p1 Commerce Cloud


texts:
I have created a custom login module which loads a page to be used by a particular customer group with its own URL trade/account/login. However, I've noticed that if a user tries to login with an incorrect username and password the page redirects back to the default customer/account/login URL.

Is there a way I can keep the customer on the same page if they enter the wrong login details?

I would like to keep them on
trade/account/login instead of redirecting to the customer account login customer/account/login

So far I only have this in my controller which loads the customer login page and form this works fine but doesn't keep the user on the same page if they enter the wrong username or password

<?php

class Namespace_Customlogin_AccountController extends Mage_Core_Controller_Front_Action{

    public function LoginAction() {

      $this->loadLayout();
      $this->renderLayout();

    }
}

I'm looking into the AccountController.php but I cannot see where the redirect happens so would like to ask if anyone knows where I can override it in my module please?


texts:
By default the breadcrumbs look like: homepage > category > product.

I would like to change the greater than (>) symbol.
The code that generates it is in

vendor/magento/magento2-base/lib/web/css/source/lib/_breadcrumbs.less

and looks like this:

.lib-breadcrumbs(
    ...

    //  Breadcrumbs separating symbol
    @_breadcrumbs-separator-symbol: @breadcrumbs-separator__symbol,
    ...

    & when not (@_breadcrumbs-separator-symbol = '') and not (@_breadcrumbs-separator-symbol = false) { // Insert separating symbol to "content"
    .item:not(:last-child) {
        &:after {
            .lib-css(color, @_breadcrumbs-separator-color);
            .lib-css(content, @_breadcrumbs-separator-symbol);
        }
    }
}

The only place I found a definition for @breadcrumbs-separator__symbol is in

vendor/magento/magento2-base/lib/web/css/source/lib/variables/_breadcrumbs.less

where it is defined as false

@breadcrumbs-separator__symbol: false;

Overriding the @breadcrumbs-separator__symbol resulted in a weird symbol:

instead of the symbol I chose.

To make things even more confusing, in the generated html, I see the content of the symbol is '\e608' and it looks like it comes from _icons.less file.

Can anyone explain what's going on here and how to go about changing it?

Any help is appreciated!


texts: Magento shows one price in store view and another in checkout/cart

texts:
Magento shows the customer one price in at the product level. And then, when added to cart, a different price. The configurable product as well as the other connected product also has a price of 299 SEK. So it's only at checkout and at cart 349 SEK is.
There isn't or hasn't been any special prices on this product. It's only on this product.

Please help me!


texts: Syntax error in helper data trying to assign a model to a outside variable

texts:
class Custom_Catalog_Helper_Data extends Mage_Catalog_Helper_Data
{
    private $promo = Mage::getModel('module/promo')->load(1);
    public function test(){
       // this function uses $promo
    }
}

I'm not that aware of syntax's in magento and i tried doing like this because my test function gets called many times and each time i don't want to create a new model object instead use the same existing one. (Something like singleton) If this is not the proper way how can i achieve it.

When the data class loads i need the model object to be assigned as well.


texts: If I remove an attribute from an attribute set, I notice that data is still contained in the product. How do I remove all this old data?


texts:
Current version is Magento 2.1.3. Installed from dist. Many admin pages are looking broken like this.

Although CSS seems to be loaded like following:

I tried clearing/flushing cache, deleting pub/static contents and rebuilding them and compiled less/sass again. Nothing helped so far.

Any help would be appreciated. Thank you.


texts: magento 1.9 sample data download problems

texts: MageStackDayNeedsYou, do you also have the link for the sample data(for magento 1.9.0.1) as well ? i would really appreciate if you can put the link on here, thanks –


texts: How to search product programatically in magento 2?

texts:
I want to search product in custom page so how search products programmatically in custom controller ?

Below Magento 1.x search programmatically

$queryText = Mage::helper('catalogSearch')->getQueryText();
$collection = Mage::getResourceModel('catalogsearch/query_collection')
    ->setStoreId($storeId)
    ->setQueryFilter($queryText);

this type of search code available in magento 2 ?


texts: How to pull the number of customers that have signed up and registered

texts:
I am looking to pull the customer's actual data who have manually signed up and registered on website.

In admin when i clicked on the menu item customers > manage customers,

it gives me a number that seems like a lot. I believe this is the customer data of everyone who's ever purchased anything, including guests.

I would like to know the number of just registered accounts.


texts: Changing configurable products attributes default option name

texts:
I want to change "Choose an Option..." text. I think it's related to app/design/frontend/base/default/template/catalog/product/view/type/options/configurable.phtml file.

Everyone know this code but I want to put in here anyway.

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

    <?php foreach($_attributes as $_attribute): ?>

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

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

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

    <?php endforeach; ?>

<?php endif;?>

I changed <option><?php echo $this->__('Choose an Option...') ?></option> line to <option>Test</option> for testing, but nothing has changed.


texts: Initiate paypal refund online in magento

texts: is it possible to initiate paypal refund online in magento community? if yes, please let me know how can i achieve this.


texts:
Basically i have a magento collection list which i am converting to xml output.

When i try to validate the XML/page output if fails because the first line is just white space, and for XML to be valid in needs to be the start of the document.

Line 1 :
line 2 :<!DOCTYPE html>
line 3 :<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
line 4 :<head>
line 5 :<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
line 6 :<title>Seak Ecommerce Group</title>
     etc...

Further validation (HTML)(page source) of general pages etc this seems to be magento wide and also includes the last line as well.

Has anyone else seen this and/or know how this can be fixed

cheers


texts: How to create block in magento and return output to template file

texts:
I need to create a block for product filtering...on base of category id....
But i dont,t know how to return block code to html template ....

I just want to know that what is the best way to create ...block and return that output to html template..

my block code is

protected function getLoadedProductCollection() {

        $products = Mage::getModel('catalog/product')->getCollection();
        $products->joinField(
                'qty', 'cataloginventory/stock_item', 'qty', 'product_id=entity_id', '{{table}}.stock_id=1', 'left'
        );
        $products->addAttributeToFilter('qty', array('neq' => 0));
        $products->addAttributeToFilter('type_id', 'simple');
        $products->addAttributeToFilter('status', 1);
        $products->addAttributeToFilter('visibility', 4);
        $products->addAttributeToSelect('*');

        $products->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id=entity_id', null, 'left'
        );
        $products->addAttributeToFilter('category_id', array('in' => array(7)));

        $this->setProductCollection($products);

        return $products;

    }


texts: Installation path exposed in welcome email

texts:
Just playing with Magento for the first time and creating a few test customer accounts.  I have discovered that if you view full headers of the welcome email, you will see the following:

X-Source-Args: /usr/bin/php /home/ACCOUNT NAME/public_html/index.php

There are lots of other instances in this welcome email's headers where the name of the cPanel account (which is the same as the installation directory on the server) is exposed.  I thought it wasn't the best practice for PHP scripts to expose the installation path?  Is it?

Edit:  including code inside the email template as requested by Yorrd in the comments

{{template config_path="design/email/header"}}
{{inlinecss file="email-inline.css"}}

Welcome to {{var store.getFrontendName()}}

To log in when visiting our site just click Login or My Account at the top of every page, and then enter your email address and password.

                Use the following values when prompted to log in:

                Email: {{var customer.email}}

                Password: {{htmlescape var=$customer.password}}

When you log in to your account, you will be able to do the following:

Proceed through checkout faster when making a purchase

Check the status of orders

View past orders

Make changes to your account information

Change your password

Store alternative addresses (for shipping to multiple family members and friends!)

                If you have any questions, please feel free to contact us via our Support page.
                {{depend store_phone}} or by phone at {{var store_phone}}{{/depend}}

{{template config_path="design/email/footer"}}


texts: Remove cacheable="false" form Block in Layout file

texts:
In my multiple layout file has many block which have cacheable="false" attribute

<block class="Block\Class" name="blockname" cacheable="false" />

if cacheable="false" is not add there have many problems rise like current customer data not get, i update data but show only last added data, all data come from cache not new data come, etc.

so what is alternative way ?


texts: Magento 2.2 - Unable to unserialize value, when editing categories

texts:
The following actions produce the results listed below each action.

If a category has more than 50 items it seems to always happen, categories with less than 50 items will usually work, but will still sometimes trigger the same issue. I had thought perhaps it had to do with the particular items in the category, but I can perform the same actions over and over, and a category which worked previously will then fail, so I don't suspect that individual items are at fault.

When attempting to move a category, does not seem to matter if it has subcategories or not.

There was a category move error.
main.CRITICAL: Unable to unserialize value. {"exception":"[object] (InvalidArgumentException(code: 0): Unable to unserialize value. at /home/___/public_html/vendor/magento/framework/Serialize/Serializer/Json.php:39)"} []

When attempting to change anchor on a category.

Something went wrong while saving the category.
main.CRITICAL: Unable to unserialize value. {"exception":"[object] (InvalidArgumentException(code: 0): Unable to unserialize value. at /home/___/public_html/vendor/magento/framework/Serialize/Serializer/Json.php:39)"} []

If I had just previously tried editing a category, and it failed, changing anchor value will also fail, unless first navigating to another category, and then returning to change anchor.

Something went wrong while saving the category.
main.CRITICAL: Unable to unserialize value. {"exception":"[object] (InvalidArgumentException(code: 0): Unable to unserialize value. at /home/___/public_html/vendor/magento/framework/Serialize/Serializer/Json.php:39)"} []

I've verified that this occurs with all 3rd party extensions disabled.

I recently had another serialization issue, which turned out to be a permissions issue, Magento 2.2: Unable to unserialize value?, but that solution did not have any impact on this issue.


texts: Can anyone share FastSpring Integration details or code with Magento2?

texts: I need to integrate FastSpring with Magento2. If anyone has done that or has ideas/steps to get that done, Please share. I know how to integrate PG in Magento but this one specifically for Fastspring. Anyhelp will be appreciated.


texts: Persistence Lifetime not working in Magento 2

texts:
I have configured Persistence Lifetime on Magento 2 but it's not working as expected. I have configured 60 seconds cookie lifetime but it's not affecting the same. I have checked with default Magento 2 version 2.1.5 but no luck.

Can anyone help me with this?


texts: Unable to override Helper Class in Magento2

texts:
I have used below code to override helper class.

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="Magento\CatalogInventory\Helper\Stock" type="Vendor\Module\Helper\Stock" />
</config>

Then Vendor\Module\Helper\Stock.php

<?php
namespace Vendor\Module\Helper;
class Stock extends \Magento\CatalogInventory\Helper\Stock
{

public function addIsInStockFilterToCollection($collection)
{
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $category = $objectManager->get('Magento\Framework\Registry')
                              ->registry('current_category');//get current category
     $categoryId = $category->getId();
     $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/testlog.log');
     $logger = new \Zend\Log\Logger();
     $logger->addWriter($writer);
    $logger->info('Category Id: '.$categoryId);
    $parentCategoryId =  $category->getParentCategory()->getId();
    if(!is_null($category))
    {
        $stockFlag = 'has_stock_status_filter';

        if (!$collection->hasFlag($stockFlag)) {
            $isShowOutOfStock = $this->scopeConfig->getValue(
                \Magento\CatalogInventory\Model\Configuration::XML_PATH_SHOW_OUT_OF_STOCK,
                \Magento\Store\Model\ScopeInterface::SCOPE_STORE
            );
            $resource = $this->getStockStatusResource();
            /* $resource->addStockDataToCollection(
                $collection,
                !$isShowOutOfStock
            ); */
            if($categoryId == 108 || $parentCategoryId == 108)
            {
               //show display out of stock products for particular category
               $resource->addStockDataToCollection(
                    $collection,
                    false
                );
            }else{
                $resource->addStockDataToCollection(
                    $collection,
                    $isShowOutOfStock
                );
            }
            $collection->setFlag($stockFlag, true);
        }

      }
   }
}

This is not overriding the mentioned helper class, Can anyone help me where i am wrong in the above code please. Thanks!!


texts:
I understand that category sidebar navigation display the categories you have created in Magento Admin Panel.

In my current scenario, i am facing one issue with categories. I am using the traditional way of creating menus.

For e.g. Home, Link1, Link2, Men  --> All this are categories

Link1 ==> Its just normal navigation link like for example a contact us page.
Link2 ==> same as above
Link3 ==> Watch

In the extension that i used, it simply loop through all the categories that i have in my category folder.

My point here is that i want to display Men category only --> Since its contain all sub categories and items inside.

For e.g.

Men
  --> Shirts
  --> Pants

Currently, my sidebar navigation shows:

Link1
Link2

Men
  --> Shirts
  --> Pants


texts: get Quote Item ID from event checkout_cart_product_add_after not working

texts:
I'm adding product to cart programatically in magento 2

  $this->cart->addProduct($product, ['product' => $product->getId(),
  'qty' => '1']);

I want to get quote item_id using event checkout_cart_product_add_after But always return null.

My events.xml file here.

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="checkout_cart_product_add_after">
        <observer name="addCustomerOption" instance="Ciklum\CustomerAuth\Observer\CheckoutCartProductAddAfterObserver" />
    </event>
</config>

And Observer Class.

public function execute(EventObserver $observer)
{
    /* @var \Magento\Quote\Model\Quote\Item $item */
    $item = $observer->getQuoteItem();

    $product = $observer->getProduct();

    echo $item->getId();exit; // always return null

}

Note I'm adding product programatically. Not from Controller.


texts:
where is getMessagesBlock() method located (Magento 1.9)

I want to know where is the code of getMessagesBlock() method,

which is called in template:- persistent/customer/form/register.phtml

I want to customize the method and the messages


texts: Magento 2 Invite friend via email with custom template in Myaccount dashboard Section

texts:
I have added a link in my account dashboard section, but i would like insert Invite email field with custom template.

Thanks


texts: Promotion being applied multiple times automatically

texts:
I have a promo code where users can get $10 off $20+. The code applies correctly for 1 item. But it also applies for every $20 in your cart. $40 in your cart means $20 discount, etc.
Do I have something configured incorrectly?

I'm running CE 1.9.2.1


texts: Upgraded to1.9.2.2 and now user registration not working

texts:
update to 1.9.2.2 users are unable to register on the site.

How can I solve this issue?

Thanks


texts: How to define methods inside of Plugin in Magento 2

texts:
I try to overwrite get_url() function located in item.php from this path \vendor\magento\module-catalog\Model\Layer\Filter\Item.php

For this, i created a PLUGIN, and my code it's this one:

<?php

namespace mysite\CartNotification\Plugin;

class CategoryPlugin {

    public function aftergetUrl(\Magento\Catalog\Model\Layer\Filter\Item $item)
        {
            //this code change the category links name to a freandly SEO Llinks
            if($this->getFilter()->getRequestVar() =="cat"){

                $_objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                $object_manager = $_objectManager->create('Magento\Catalog\Model\Category')->load($this->getValue())->getUrl();
                $return = $object_manager;

                $request = $this->_url->getUrl('*/*/*', ['_current' => true, '_use_rewrite' => true]);

                if(strpos($request,'?') !== false ){
                    $query_string = substr($request,strpos($request,'?'));
                }
                else{
                    $query_string = '';
                }
                if(!empty($query_string)){
                    $return .= $query_string;
                }
                return $return;
            }
            else{

                $query = [
                $this->getFilter()->getRequestVar() => $this->getValue(),
                // exclude current page from urls
                $this->_htmlPagerBlock->getPageVarName() => null,
                ];

                 return $this->_url->getUrl('*/*/*', ['_current' => true, '_use_rewrite' => true, '_query' => $query]);

                }

        }
}

But i have an issue with the methods that are used in this file.
When i run this code, i get err for each methods used here with this message:  Fatal error: Uncaught Error: Call to undefined method Sitename\CartNotification\Plugin\CategoryPlugin::getFilter() in...

So my funciton are not define. Does anyone know how to solve this problem. and define my methods?


texts: Update a custom option value from cart page magento2

texts:
I want to update the text field custom option programatically from the cart page. On the cart page I have a dropdown aside of each product. What I am trying to achieve is when I change the value of dropdown the respective value should be saved on that custom text field of that product.

What I did till now?

Created the text field custom option on the products.
Added the dropdown on the cart page

Can some one show how can I achieve this in Magento 2.


texts: My cron task catalogrule/observer::dailyCatalogUpdate triggers invalidated Page blocks HTML cache

texts: I'm having little problem with my cron task catalogrule/observer::dailyCatalogUpdate (catalogrule_apply_all) which is triggering invalidated Page blocks HTML cache. I'm running my magento 1.9.1 on CentOS VPS with php 5.5 (with opcache enabled) and mysql 5.6. Anyone have an idea, what could possible be wrong?


texts: How to display certain info of logged in user in phtml file?

texts: How do I display any of the customer_entity table info anywhere, say some random phtml file? For example I added a field to customer_entity now I want to display it on product.phtml or something, how do I access customer_entity table and get that field?


texts:
how can i get group price of a product via api ? i can get special price via api Product info API

is it possible to get group price ? thanks


texts: WordPress Fishpig get select type value associated for each post

texts:
I need to get the selected post type of a post in wordpress.

I am using Fishpig module, so wp default way of getting the article type wont work.

I am following this:
https://fishpig.co.uk/magento/wordpress-integration/code-examples/

But not able to get the post type.

Im trying by this:

UPDATED:

If i try with this below line, i get custom fields values

addMetaFieldToFilter('type', array('Articles','Artists & Makers','Videos'))

But if i use it with $collection, i wont get other details related to posts like post author, post title etc

<?php $collection = Mage::getResourceModel('wordpress/post_collection')
    ->setOrderByPostDate()
    ->addIsViewableFilter()
    ->addPostTypeFilter(array('post')) // Add any post types here
    ->setPageSize(9) // Limits to 9 posts. Remove from all posts
    ->load();
?>
    <?php if (count($collection) > 0): ?>

        <?php foreach($collection as $post):
            echo '
';echo 'POSTS---';   print_r($post)
            ?>

                <a href="<?php echo $post->getPermalink() ?>"><?php echo $post->getPostTitle() ?>

        <?php endforeach; ?>

<?php endif; ?>

Output:

  POSTS---Fishpig_Wordpress_Model_Post Object ( [_metaTable:protected] => wordpress/post_meta [_metaTableObjectField:protected] => post_id [_eventPrefix:protected] => wordpress_post [_eventObject:protected] => post [_metaHasPrefix:protected] => [_meta:protected] => Array ( )[_metaKeysChanged:protected] => Array ( )[_resourceName:protected] => wordpress/post [_resource:protected] => [_resourceCollectionName:protected] => wordpress/post_collection [_cacheTag:protected] => [_dataSaveAllowed:protected] => 1 [_isObjectNew:protected] => [_data:protected] => Array ( [ID] => 110258 [post_author] => 2 [post_date] => 2017-10-23 11:21:27 [post_date_gmt] => 2017-10-23 11:21:27 [post_content] =>

But if print_r the $collection , i dont get the post_type value like i have in the drop down 'articles'

There seems to no post type in this

These are my custom fields of type select with different values.

And i need to get the selected type value for each post (In this case the type selected is 'article')


texts:
In the file vendor\magento\module-theme\view\frontend\templates\Html\Header.phtml I see this code <?=$block->escapeHtml($welcomeMessage) ?> and I think PHP 4 is being used in Magento2.

                <span data-bind="text: customer().fullname ? $t('Welcome, %1!').replace('%1', customer().fullname) : '<?=$block->escapeHtml($welcomeMessage) ?>'">


texts: Magento 2 - How I can remove default extensions

texts:
I want to remove some Magento 2 components like: Magento_Analytics, Magento_Braintree ... I just want to have just a product management system. How I can remove this modules completely, files and database tables.

Thank you


texts: How to add defer to a custom JS script in magento 2.x

texts:
I need to add a custom script in my module and that script requires me to add defer in it. I have added the script in the requirejs-config.js file. But i am cannot see that script working. Although i am able to access objects from the custom script but some of the functionalities inside it are not working.

Please suggest how can i achieve the same.


texts: How to integrate couriers service in Magento 2?

texts: I want to integrate a courier service like Fedex/Bluedart in Magento 2.


texts: How to create password field for checkout page for account creation in magento 2?

texts: I have to do account creation on checkout process with password field in checkout page, Please anyone suggest a solution for this.


texts: Change the quantity of a child, the change should be applied for the other child of its parent in configuration product

texts: In other words, when I change the quantity of a child, the change should be applied for the other child of its parent in configuration product .Thank you in advance.


texts: (Magento\Ui\Model\Bookmark) with the same ID "0" already exists

texts:
I got this error when trying to access the Content >> Pages in admin panel.
Can anyone help me please.


texts: Home page stopped importing static blocks

texts:
I was happily creating some new pages in magento 1.9.1 and I happen to go back and look at the home page and noticed it had stopped displaying the static blocks.

reference name="aside"

block type="core/template" name="custom_sites" template="blaa/blaa/custom-block.phtml"

    block type="core/template" name="block-content" as="block-content" template="blaa/blaa/sites.phtml"

        action method="setBlockId" block_id sites /block_id /action
    /block
/block

block type="cms/block" name="home_bottom_content"

        action method="setBlockId" block_id home_bottom_content /block_id

/action
    /block
/reference

Neither are displaying any more, I have disabled everything I had done since I last noticed it working, but to no avail.

Has anyone encountered this issue before or have any ideas?

Thanks.

p.s. It stripped my tags so you will have to use your imagination a little. ^^


texts: Free product when 2 of a certain brand are purchased (no limit on discounted product)

texts:
Disclosure, i did search for an answer to before posting this question.  But i am new to this also.  So patience would be appreciated.

I would like to do a promotion with the following parameters in Magento:

Customer must:

1 x Free product when 2 x products from within a certain brand are purchased
no limit on free product

So long as at least 2 products within the brand are purchased
customer can purchase in multiples of 2 from within the same brand and redeem the free product for each multiple of 2
I.e. if a customer purchased 6 products within the brand, they would receive 3 x free of the free product

Hope this makes sense.  It does to me but ive been looking at it too long


texts: automatic creation of category url-key during product import

texts:
I'm trying to import 5000 products into magento 2.1 by CSV file.
The file also contains categories for the products and I aim to import categories as well.
During import when categories are being created the url-key assigned to them is blank. So when it goes to the next record and tries to create new categories,
there's the error :"Category "A/B/C/" has not been created. URL key for specified store already exists".
My understanding is that since the import mechanism is unable to create proper url-key based on category name, then a blank entry is put as url-key and the next category to import which also has a blank url-key identifies a duplicate and throws an exception.
Does anyone knows a way to set a default mechanism, to generate url-key based on category name during import process?
Thanks!


texts: Magento2 : How to add my custom template in order summary page after total

texts:
I want to add my custom template on checkout page in order summary just after Total as shown in screenshot :

In this template .phtml file I want to add some conversion depend on payment gateway just to display only to customer.

How can I do that?


texts: Product pages all have meta titles from 2 different pages combined

texts:
Running magento 1.8 with a smartwave porto theme.

We cannot figure out where our store meta title & description are coming from...they're not coming from the meta data area on the homepage & they're displaying across the whole website.

Also whatever meta data i add to product pages is just displaying on the end of this default meta title so it's causing meta titles to be very long & repetitive.

There is no "design" in system/configuration and so i can't look there.

My website is http://bit.ly/1BTBIuK

When i hover over the admin panelhen inside it has 33 keywords due to this sort of repetition....the website developer put them in initially but how can i change them myself?

Reply to comment:

When i add meta data to the area you mentioned it just adds what i put onto the end of the meta data that is already present.

Maybe the issue is not having "design" in the "configuration" area of my admin panel at all?


texts:
I create a coupon for a special product and i do these steps:

Log-in to admin
Promotions -> Shopping Cart Price Rules
Click Add New Rule
I fill Rule Information, and i set coupon100 for coupon code.
click Conditions tab
Click + button icon
Select Product attribute combination
Click + button icon
Select SKU
I see SKU is ...
I Put my product SKU over there
In action tab i set discount price.
Save rule.

Then when i buy that product when i enter the coupon code i get an error that the coupon code is not valid.

Where is the problem?

EDIT:


texts: Disable email notification for specific customers

texts:
Please can any one help me on this,
I would like to disable email notofication for customers, which have a flag  non_email_customers set to true.
I Have Try this way. i have created a  plugin for: Magento\Framework\Mailsend\TransportInterface::sendMessage()

but I don't know how to get customer object there. Getting it from customer session is not the best solution I suppose beacuse of mail from adminhtml area. Any ideas how to resolve this issue?


texts: Magento2 - language pack installation doesn't work

texts:
I installed fresh Magento 2.1.0 installation.

After the installation completed, I checked that everything works good.

Now I want to change the language of the store to my language (Hebrew)

I downloaded the language pack files from here https://crowdin.com/project/magento-2/he

And use this guide:
http://www.vanderboon.net/wiki/Install_Magento_Crowdin_Translation with the following command lines:

 cd /var/www/html
 php bin/magento setup:static-content:deploy he_IL
 php bin/magento indexer:reindex
 php bin/magento cache:clean
 php bin/magento cache:flush
 chown -R www-data. .
 find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento

In the admin panel Stores -> System -> Configuration -> General -> General -> Locale Options -> Change Local to Hebrew and save.

Also in the right side -> Account settings (admin) -> Change Inteface Locale to Hebrew and save.

I don't see any change in the store or in admin panel.

What I did wrong?

Thanks!


texts:
I am writing custom cron to send a mail in every two minutes.I am also using it with AOE Scheduler extension.

Code:

/var/www/magento2/app/code/local/Produpdates/Notify/etc/config.xml

<?xml version="1.0"?>
    <config>
        <modules>
            <Produpdates_Notify>
                <version>1.0.0</version>
            </Produpdates_Notify>
        </modules>
        <global>
            <models>
                <notify>
                   <class>Produpdates_Notify_Model</class>
                </notify>
            </models>
            <events>
                <catalog_product_save_after>
                    <observers>
                        <notify>
                            <type>singleton</type>
                            <class>notify/observer</class>
                            <method>catalog_product_save_after</method>
                        </notify>
                    </observers>
                </catalog_product_save_after>
             </events>
        </global>
       <crontab>
        <jobs>
            <send_newsletter_product_update>
                <schedule>
                    <cron_expr>*/2 * * * *</cron_expr>
                </schedule>
                <run>
                    <model>notify/observer::sendNewsletterProductUpdate</model>
                </run>
            </send_newsletter_product_update>
        </jobs>
    </crontab>
</config>

/var/www/magento2/app/code/local/Produpdates/Notify/Model/Observer.php

<?php
include 'ctmail.php';

class Produpdates_Notify_Model_Observer
{
    public function catalog_product_save_after($observer)
    {
        $product = $observer->getProduct();
    }

    public function sendNewsletterProductUpdate($schedule)
    {
        $html = 'Testing mail for CRON';
        $mail = Mage::getModel('core/email')
             ->setToName('Hiranya')
             ->setToEmail('test@example.com')
             ->setBody($html)
             ->setSubject('Sarees Images Collection')
             ->setFromEmail(Mage::getStoreConfig('trans_email/ident_general/email', $storeId))
             ->setFromName(Mage::app()->getStore()->getName())
             ->setType('html');
        try {
            $mail->send();
        } catch(Exception $error) {
            Mage::getSingleton('core/session')->addError($error->getMessage());
            return false;
        }
    }
}

Problem:
The scheduled cron is not working,only showing status as died


texts: How to keep extensions from Magento Connect up2date without connect-manager?

texts:
This is not a question about solving a technical problem, it's about getting some input how to realize my idea in the "best" way. ;)

Current situation:

I support a shop that uses a lot of extensions. Most of them are maintained at Github, so they can easily updated via modman/composer ... BUT ... there are some, that are only updated at Magento Connect.

What i have done till now - and it's really annoying - was a periodic check at magento connect, download latest version, hosted or update them on Github (or Bitbucket private repo for payed once) and deployed them via modman/composer.

Aims:

I don't need a out-of-the-box upgrade process, it would be more then enough when a get notification about new version without visiting magento connect manually and without using Magento connect manager.

Plan:

Build a simple as possible extensions that notifies me about new releases at Magento Connect.

Idea:

gather installed extension from Magentos merged XML
store them in a DB-Table (name, version, ...)
add a field to (manually) store Magento Connect-URL once
add a cronjob that looks for newer releases (1)
add a admin notification message, if an update is available

Note (1): long time planned - w/o no idea to realize - but today i found a possibility howto grab all required info. See: Download the magento connect extensions list

I still have to download lates release, update my Git/BB-Repo and deploy it, but it would save a lot of time to periodically check Magento Connect.

Question:

I assume this idea is interessting for all that rely on Magento connect-extensions and don't want to use Magento connect manager ... as long it's not necessary.

  Before i start coding, I just want to ask you for smarter ideas!

Thanks in advance for your input.


texts: How to import downlodable product on different store using csv in magento2

texts:
I want to import downloadable product in different store using csv in magento2

Can anyone help?


texts: Error with Dependency Injection in widget

texts:
I'm a new Magento 2 developer that's trying to create a widget with a picture in it and I've been following some tutorials to get started.
I'm having some trouble though with dependency injection in the Block-class.

Here is the error:

  Error filtering template: Recoverable Error: Argument 1 passed to Magento\Framework\View\Element\Template::__construct() must be an instance of Magento\Framework\View\Element\Template\Context, instance of Magento\Framework\ObjectManager\ObjectManager given, called in C:\xampp\htdocs\magento\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php on line 93 and defined in C:\xampp\htdocs\magento\vendor\magento\framework\View\Element\Template.php on line 128

The error obviously states that the constructor of the parent if acquiring the wrong information, but as far as I can tell I'm feeding it the correct data.

Here is my class:

<?php
namespace X\Y\Block\Widget;

class CustomWidget extends \Magento\Framework\View\Element\Template
implements \Magento\Widget\Block\BlockInterface
{
    public function _toHtml()
    {
        $this->setTemplate('widget/custom_widget.phtml');
    }
}

I've heard across the web though that using the _toHtml() function is bad practice and I should use the constructor instead, but that gives me the same effect. So far I've used these constructors:

protected function _construct()
{
    parent::_construct();
    $this->setTemplate('widget/custom_widget.phtml');
}

public function _construct(
    \Magento\Framework\View\Element\Template\Context $context,
    array $data = []
) {
    parent::_construct($context, $data);
    $this->setTemplate('widget/custom_widget.phtml');
}

I have also tried just setting

  protected $_template = "widget/custom_widget.phtml";

but that generates the same result.

Have anyone seen this before? I have reinstalled Magento several times and my co-workers do not have this problem, so there's definitely something weird going on here.

Any help is much appreciated!


texts:
I have a module with page url http://hostname/affiliate/account/promo/

I want to change it to http://hostname/referafriend

can anyone suggest me how to achieve it.


texts: How to associate status value to label value in "listing" ui component (Magento 2.2)

texts:
I am using an ui_component (listing) for a custom grid in magento 2.2.
I have a status colum with various value, see below:

Here is the column declaration in the "listing" component

 <column name="status">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="editor" xsi:type="array">
                    <item name="editorType" xsi:type="string">text</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                    </item>
                </item>
                <item name="label" xsi:type="string" translate="true">Sync Status</item>
            </item>
        </argument>
    </column>

How can I associate the integer value to text value.

0=> pending
1=> synced

I know how to do it in a classic grid but I can make it work with the "listing"

regards


texts: Product url with category in magento search

texts:
I want to set product url in search page with the product category. But it doesn't show category url.

  Example:-www.xxxxxx.com/maincategory/subcategory/product_name.html

But in search result, it shows
Example:-www.xxxxxx.com/product_name.html

I want to show url with a full category path like

  Example:-www.xxxxxx.com/maincategory/subcategory/product_name.html

How can I set this.


texts: Display Product Attribute Value only if db value exists - Magento

texts:
I want the following to display only if there is a value for this field in the database:

Available Colors: <?php  echo $_additional["color_spec"]["value"]; ?>

What I had attempted does not work:

<?php if ($color_spec = $_product->getcolor_spec());
if (trim($color_spec)) {
    echo 'Men / Women: ' . $this->htmlEscape($color_spec);
}


texts: Magento 2 : How to change the Availability of my off-line custom payment method?

texts:
I am developing a custom off-line payment method module in which I want to change the status of this module on certain condition. From where or which method I can change the status of my payment method ?

For example like for some zip-code and order total etc I want to show my payment method.