texts: How to get the original referrer url on success?

texts:
I have a code that its executed only on the head tag of the success page.  This code is to track if the buyer is coming from Comission Junction.

I need to set a variable to true if the original referrer comes from commission junction affiliate links which looks like this:

http://www.jdoqocy.com/click-1245-2342423?SID=TrackingTest

is there an easy way to do this?

I was thinking about referral url but I guess that variable changes each time you go from page to page: add to cart -> billing address -> shipping address -> payment -> overview -> success

My code is

    public function getCommissionJunctionUdo($orderId) {
            $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
            $udo = array();
            $udo['CID'] = 'XXXX';
            $udo['TYPE'] = 'XXXX';
            $udo['CURRENCY'] = 'USD';
            $udo['OID'] = $orderId;
            $udo['DISCOUNT'] = number_format(abs($order->discount_amount),2);

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

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

            if(referral url come from CJ)
{
                $udo['FIRECJ'] = "TRUE";
            }
            else {
                $udo['FIRECJ'] = "FALSE";
            }

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

            return $json_masterTmsUdo;

        }

Thanks


texts:
I am getting the session id and i am trying to fetch salesOrderList in my android application .I am using Ksoap2 android library to query my magento host But unfortunately i am getting this following error .

and this is link of github where i have exported .Please help me
https://github.com/sudhirbelagali/InchooSoap

SoapFault - faultcode: 'SOAP-ENV:Server' faultstring: 'Procedure 'salesOrderList' not present' faultactor: 'null' detail: null

Please help me


texts: How to change the type of validation used in fields on Magento 2 forms and where to find the list? [Q&A]

texts: Say I wanted to validate my contact form to only accept UK phone numbers and a valid amount of currency, how would I do this in Magento 2? I want to change my contact form so it allows my users to put in how much they'd like to donate towards a charity as well as another input field for their UK phone number.


texts: Return order by Ecom express shipping method Magento2

texts:
In Magento 2, I am using Ecom express shipping method and it working fine.
But I have to use same shipping method for return order as well.
Please anybody have worked on it or have any useful document or any idea ?
Thank you,


texts: Magento 2.3.5 how to add canonical links for cms pages having slash at the end of url-key

texts:
I am using magento 2.3.5p1 community edition.
I want to add canonical links in cms pages.
As in 2.3.5 magento we have to create a separate layout update file as cms_page_view_selectable_[cms-url-key]_[custom-layout-name].xml .
But the issue is I have url keys of my cms pages with trailing slash as example-key/ saved in admin for all cms pages because I wanted to generate cms page urls with slash in sitemap.
But with these urls I am unable to create the given layout update file.
Please provide a solution.
Thanks !


texts: Magento 2.3.4: How to address "Resources are blocking the first paint of your page. Consider delivering critical JS/CSS inline

texts: Google's web.dev is penalizing the site by displaying this error. Can anyone please suggest what can be done to eliminate these render-blocking resources?


texts: How to add a custom text block in shopping cart in magento 2?


texts: Magento 2 : How to disable/enable shipping method based on Region/State

texts:
I am working on magento 2.1.3. I need to disable or enable one or more shipping method based on State/Region.

Is there any possibility without purchasing a 3rd party plugin.?


texts: Magento 2 CRUD Models: Create and Update Time

texts:
I've created a Magento 2 CRUD/Abstract model that updates the following MySQL table.

CREATE TABLE `pulsestorm_commercebug_log` (
  `pulsestorm_commercebug_log_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `json_log` mediumtext NOT NULL COMMENT 'Demo Title',
  `creation_time` timestamp NULL DEFAULT NULL COMMENT 'Creation Time',
  `update_time` timestamp NULL DEFAULT NULL COMMENT 'Modification Time',
  `is_active` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Is Active',
  PRIMARY KEY (`pulsestorm_commercebug_log_id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='pulsestorm_commercebug_log';

I can successfully use the model's save method to add data to this table.  However, the creation_time and update_time columns are not updated.  Their initial values are NULL.

Do I need to do something special with my models to get these creation and update times columns working?  Does anyone that's run into similar problems know of a solution?

If not -- does anyone know where in Magento 2's code base the ORM normally populate these values? (so I can debug what's wrong with my Models there)


texts: Magento 1.9.0.1 upload svg files as product image

texts:
I tried the observer creating method for allow svg upload. It doesn't work for this version(1.9.0.1). I found that allowed image types are hard coded in these files,

Mage/Catalog/Model/Product/Attribute/Backend/Media.php
Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php

I added svg to those files. But still no success. Am I missing something?


texts:
When selecting a custom options on the productpage, that increases the price. The default price on the page auto updates and increases.

But I display the price of the product on the productpage on 2 places. The default place and a custom place, on the buttom of the page.

The only problem is that the price on the bottom is not updated automatically when selecting the option. I load the price by the same way as the default page.

How can I auto update this price also?

Custom code:

                <?php echo $this->getChildHtml('product_type_data') ?>
                <?php echo $this->getTierPriceHtml() ?>


texts:
I'd like to add a custom input field to checkout when a customer selects a flat shipping rate, which is compulsory.

Any idea how this can be done?


texts: Display the Search Query Along With the Breadcrumbs

texts:
In my site I need to display breadcrumbs like this.

  Home / Search results for: 'laptop' / Lenova G50 Laptop

I am searching any products (like above "laptop") in site.

After get result I click any products in search result page.

That clicked product view page I need above type of breadcrumbs.

  When I click that " Search results for: 'laptop' ",  go to that search
  result page.

How can i do this ?

Any one help me.


texts:
In my current magento shop project each product has a single validity_date as additional attribute, which will get set while product creation.

As a customer you can fill in your cart with different products and when you want to buy them, it should create not a single order with all products. It should create an order for each day.

I would like to know now what event is best to cancel the order and create instead of it several ones. Also how can I delete the old order? And is there a way to duplicate the order object and just change the products of it?


texts: Call Magento\Catalog\Model\Product::getData() returns null

texts:
On a custom template I try to do the following calls:

    $a = $this->getProduct()->getData('short_description');
    $b = $this->getProduct()->getData()['short_description'];
    $c = $this->getProduct()->getAttributeText('short_description');
    $d = $this->getProduct()getShortDescription();

All of them return null, $this->getProduct() being a instance of Magento\Catalog\Model\Product. It works with other arguments though.

On the database, this argument has properties is_visible and is_visibile_on_front set to 1.

Additionally I tried setting the following block on the layout without using a custom template.

 <block after="-" class="Magento\Catalog\Block\Product\View\Description" name="product.info.short_description" template="Magento_Catalog::product/view/attribute.phtml">
    <arguments>
        <argument name="at_call" xsi:type="string">getShortDescription</argument>
        <argument name="at_code" xsi:type="string">short_description</argument>
    </arguments>
</block>

Also tried to do a var_dump($this->getProduct()->getData())).
Short description was in place along other attributes and properties.

How to get the short description?


texts: How to preselected the default shipping address in magento 2?

texts:
Please help..I'm new in magento 2 code.
If the shipping address is the default shipping address, how to preselected it without ticking the radio button or any button under Magento 2


texts: APPSEC-1057 How to add variables or blocks to the white list tables

texts:
APPSEC-1057 (part of SUPEE-6788) states

  Magento now includes a whitelist of allowed blocks or directives. If a module or anyone uses variables like {{config path=”web/unsecure/base_url”}} and
  {{block type=rss/order_new}} in CMS pages or emails, and the directives are not on this list, you will need to add them with your database installation script.

  Extensions or custom code that handles content (like blog extensions) might be affected. If your code uses some config variables or blocks, you need to create a data update script that adds variables or blocks to the white list tables:

How do you whitelist custom variables and blocks?


texts: How to add number of input fields on change another input field value?

texts:
I have 3 rows and 3 columns in the table. Quantity field is input field.

I want to add new input fields in another column when anyone changes input field value.

Now, I am using below code:

When I use above code, It is adding the number of fields multiply with the number of rows(2*3=6 fields) in each row. But I want to add the input fields only in the same row.

for example: If I add quantity 2, then 2*3=6 input fields add all 3 rows. But I want to add these 2 input fields only that row.
see screenshot: http://nimb.ws/RmKGg2

How can I achieve?


texts:
I saw that tablerates can depend of the weight or the price.
But depend on the destination, the shipping price must not be calculated following the same parameter.
For example, for France, the shipping price is based on the total price of the cart and for others countries, is based on the weight.

Is it possible to establish a tablerate like that without using and extension ? If yes, how ?

I found this extension but I prefered to not use it if it's possible.


texts: Is there a public status for https://repo.magento.com/

texts:
Is there a status for https://repo.magento.com/  to check if everything is working fine and decide if it is a local issue or not?

It seems that this morning the repo is not responding and information is loaded from cache with no 2.1:

The "https://repo.magento.com/packages.json" file could not be downloaded: Failed to enable crypto
failed to open stream: operation failed
https://repo.magento.com could not be fully loaded, package information was loaded from the local cache and may be out of date
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package magento/product-community-edition 2.1.0 exists as magento/product-community-edition[2.0.4, 0.42.0-beta7, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.5, 2.0.6, 2.0.7, 2.1.0-rc1] but these are rejected by your constraint.


texts: "[ErrorException] chmod(): Operation not permitted" running "composer update"

texts:
I'm running Magento 2.4.2 and I'm using Composer v2.0.11. 2 days ago, after running, as usual, composer update, I suddenly received this error:
[ErrorException]
chmod(): Operation not permitted

You can see composer update -v output down below:

What I tried

I tried to apply chmod -R 777 . and chown -R www-data:www-data .
I tried to apply chmod u+x bin/magento

Any ideas?


texts: magento 2 : Special price not showing properly in simple product

texts:
I have created simple products with special price in magento 2. It shows perfect in product detail page http://prntscr.com/mq5ll2, But when product shown on list page it shows price in range http://prntscr.com/mq5kln I want to show them same like this http://prntscr.com/mq5q86

My Backend :
Step1 : http://prntscr.com/mq5rb7
Step2 : http://prntscr.com/mq5rh9

Please suggest me if anyone know the solution


texts: Can a custom grid be populated with custom data in Magento 2?

texts:
I've created a Magento 2 extension containing two custom grids. The first reads directly from a custom table in the database. I want the second to display data retrieved with a specific query using other tables. Is this possible?

Can a custom grid be populated with data from a query instead of reading data from it's "mainTable?"


texts:
How to implement HSTS in magento?

I have just moved from http to https, and I read that HSTS should be implemented to reduce latency and improve security, so how do I go about it?


texts: Multilanguage Home meta description not showing properly on search engine

texts:
I have 3 stores, one in Japanese and the others in English.
I have set the meta description for each home CMS page properly.
However, on the search engine, home meta description is showing the meta description of English home, instead of Japanese home.
But when I check on Firebug, I see the correct meta description in Japanese.

Why...???


texts: Show prices with tax but don't charge tax

texts: how can I show prices with tax but not charge it on checkout page?


texts:
From them image above you can see the first record does not have name.

I want all the record which have name should be displayed and which doesn't have should not be listed in grid.

I know how to use addFieldToFilter in php file but don't know how to use in UI Grid.

        $collection =$this->MainOr->create()
            ->addFieldToFilter("parent_id", array("neq" => 0));


texts: Magento 2.2.3 Internal Server Error: Read timed out after 10 seconds

texts:
I have a magento 2.2.3 shop that is throwing me an internal server error every time I try to edit or create a new product. When I click save, it loads for about 10 seconds this shows internal server error. Try again later. I checked the system.log file and it shows the following error:

[2018-04-09 21:36:38] main.CRITICAL: Read timed out after 10 seconds  {"method":"POST","url":"https://custombuttons97.com/admin_cfytnh/catalog/product/save/id/5/type/simple/store/0/set/12/key/923d4f492fbf22029126adee53137102bd09deee49d3bdb1f83885e9ca3c4853/back/edit","invalidateInfo":{"server":"[object] (Zend\\Uri\\Uri: http://127.0.0.1:6082/)","tagsPattern":"((^|,)cat_p_5(,|$))"}} []

What would cause this issue and how can I fix it?

UPDATE:

I modified the file vendor/magento/module-cache-invalidate/Model/PurgeCache.php I changed the timeout to 90 seconds and I am now getting an error of timed out after 90 seconds. See below:

[2018-04-10 18:45:11] main.CRITICAL: Read timed out after 90 seconds {"method":"POST","url":"https://custombuttons97.com/admin_cfytnh/catalog/product/save/id/5/type/simple/store/0/set/12/key/8937840148454054d5ff7ae2ff947a60b2b477567a535f0c1b649b69c06bdc23/back/edit","invalidateInfo":{"server":"[object] (Zend\\Uri\\Uri: http://127.0.0.1:6082/)","tagsPattern":"((^|,)cat_p_5(,|$))"}} []
[2018-04-10 18:45:18] main.CRITICAL: A valid response status line was not found in the provided string {"method":"POST","url":"https://custombuttons97.com/admin_cfytnh/catalog/product/save/id/5/type/simple/store/0/set/12/key/8937840148454054d5ff7ae2ff947a60b2b477567a535f0c1b649b69c06bdc23/back/edit","invalidateInfo":{"server":"[object] (Zend\\Uri\\Uri: http://127.0.0.1:6082/)","tagsPattern":"((^|,)cat_p_5(,|$))"}} []
[2018-04-10 18:45:22] main.INFO: Broken reference: the 'product.reviews' element cannot be added as child to 'product_tabs', because the latter doesn't exist [] []


texts: Are there any affordable resources to learn Magento Cloud?

texts:
I am trying to learn Magento cloud to build docker image and deploy to cloud, I can't find resources to learn, I checked Adobe learning but the course is expensive $2700
any recommendations?


texts: Force HTTP on all URLs except what required like checkout, admin

texts:
We are using Magento ver. 1.9.2.4 with Nginx, what we need is to always make sure and force that pages are served HTTP(non-ssl) and only checkout, admin, account and others which required HTTPS(ssl) should work with SSL, otherwise for any other page like frontend or other URL's even if someone deliberately types in https:// it should be forced to http://

We have following settings in Magento backend,

  System -> Configuration -> General -> Web -> Unsecure -> Base URL =
  http://www.example.com/

  System -> Configuration -> General -> Web -> Secure -> Base URL =
  https://www.example.com/ Use Secure URLs in Frontend = Yes Use Secure
  URLs in Admin = Yes

With this setting, everything is working fine like checkout and other secure pages are going to forcibly SSL but pages like homepage and other are browseable by both HTTP & HTTPS.

We tried to follow this Redirect all https requests to http except for checkout making our

  Use Secure URLs in Frontend = No

But even then if someone types in https://www.example.com/ he/she is not redirected to non-ssl.

I have also tried some settings to do via Nginx but that most of the times causing redirect loop as I am discussing here without much luck https://serverfault.com/questions/814563/redirecting-all-traffic-to-http-except-one-url/814597

Is there any way we can achieve it with just admin panel, or may be combination of both admin and nginx...?


texts: Bundled product pricing/configuration confusion

texts:
It has been a while since I had the (dis)pleasure of working with bundled products in Magento but a current project we are working on, which has been migrated over from Opencart, is proving to be quite problematic with the default bundled product functionality.

All the products in the catalog had been imported over as simple products (many previous instances of failings when set up in Opencart). With quite a complex and in-depth catalog, we faced the task of converting products to configurable products and then selecting numerous other products as the associated products under the configurable (no problem with this).

Many other products contained optional extras which needed to be tied to actual physical products in the store (thus ruling out Magento's 'Custom Options). We decided to use 'Bundled Products' for this but upon converting the main product that contains said options to a bundled product and then adding the bundled items as the associated products, we discover that the default price just displays as the lowest price from the bundled items only.

I believe we need to have them set up as 'dynamic' pricing so that the prices change when different options (bundled items) are selected.

But whilst the bundled product is set to 'dynamic' pricing, we cannot see the base price (which would only appear if we changed to 'fixed' pricing.

Looking at a demo bundled product in Magento 1.9.x, I can see that the main product is included as an option within the bundled product's associated products as per below:-

As per my above scenario, I haven't got the main product listed as a bundled item/associated product within the bundled product, it is in fact the actual product that I converted to a bundled product...

I am unsure how best to go about fixing this to be honest:-

Should I be looking at coming up with a way of adding the main product to the bundled items even though it is the actual product that is the bundled product?
Is there a way I can display fetch and display the original 'fixed' price as the base price for the bundled product? This would be a preferred option...

To help better explain, please view the below as a live example of the issue:-

Please excuse the styling but you will see that:-

£36.00 is showing as the default ex VAT price.
£43.20 is showing as the default inc VAT price.

Both of these are taken from the price of the bundled item, the checkbox you can see at the bottom of the image.

The actual price of the product is £3,196.00 (ex VAT) and £3,835.20 (inc VAT) which I need to be displaying as the default base price and then when the bundled item(s) are checked, the prices of these are then added on to the base default price.

The only way I can see to get the £3k prices to display is by setting the pricing to 'fixed' pricing but then we can't dynamically change the priced depending on the selected options.

Help! What should I do?


texts:
I need to change the currency label(symbol) on the last checkout page,
I need to change it from KR to DKK ( i'm from Denmark ) and only on the totals

I don't know anything about magento so please help


texts: magento2 : minicart not updates after add products to cart

texts:
when submit form
Only first product price was display and other product price shows 0
sections.xml created

<?xml version="1.0"?>
     <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Customer:etc/sections.xsd">
          <action name="frontname/controller/action">
             <section name="cart"/>
          </action>
      </config>

controller file

 foreach ($pid as $value) {

            if (isset($value)) {
           $this->addCartProduct($value);
        }
         $this->_cart->save();

        }

public function addCartProduct($productID){
$product = $this->_productFactory->create()->load($productID);
$info = new \Magento\Framework\DataObject(
    [
        'form_key' => $this->formKey->getFormKey(),
        'product_id' => $productID,
        // 'price' => $product->setPrice($price),
         //'qty' => 1,
        // 'price' => 100,

    ]
);
return $this->_cart->addProduct($product, $info);
}

Note : I also tried to pass price and qty in function.


texts: magento 1.9 how to show product of category

texts:
I need show product of categry in home page

I test this code

{{block type="catalog/product_list" name="home.catalog.product.list" category_id="55" template="catalog/product/list.phtml"}}

but not showing the product of category in home page
thanks


texts: how to one product two types tax include?

texts:
How to one product two types tax (VAT and CST) include on order edit page - admin panel.

Actually I have one product add on VAT and CST tax but admin panel not showing on two type taxes.


texts:
I have a sample CSV file and want to send it to another server using FTP. I have successfully connected FTP but couldn't able to send the file.

In the FTP where I want to send, there are 2 folders named Import and Export. I have checked those folders but I can't see the file which I sent. I didn't get any error as well. So, I'm not sure, where am I wrong.

In order to send the file using FTP, I have followed the below link:

https://www.magestore.com/magento-2-tutorial/how-to-upload-file-to-ftp-server-by-coding-in-magento-2/

Would anyone please help me to resolve this issue?

Code:

<?php
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';

$bootstrap = Bootstrap::create(BP, $_SERVER);

$objectManager = $bootstrap->getObjectManager();

$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

$sftp = $objectManager->create('Magento\Framework\Filesystem\Io\Sftp');
$open =  $sftp->open(
                    array(
                        'host' => 'hostname',
                        'username' => 'xyz',
                        'password' => 'pwd',
                        'port' =>22,
                        'passive' => true
                    )
                );

if ($open) {
      $fileName = ‘sample.csv’;
      $content = file_get_contents(DirectoryList::VAR_DIR . '/' . $fileName);
      $this->ftp->write(self::FILE_NAME_ON_FTP, $content);
      $this->ftp->close();
 }

 if(is_null($connection)){
      echo "true";
      //Here is code ....
 }else{
      echo "false";
 }


texts: How can I put a product_list and a product_view on the same page?

texts:
I want customers to choose among a bunch of product options, then present them with like an upsell. But that upsell is a configurable product and I want some rather complex response based on what the customer chooses.

Anyway, I created a custom module and either the product_list works or the product_view work, but they do not work together. I have tried a view different ways, but I can't get around rendering the layout in my controller.

This works for the product_list:

public function indexAction(){
  $this->loadLayout();
  $this->renderLayout();
}

And this works for the product_view:

public function indexAction(){
  $viewHelper = Mage::helper('catalog/product_view');
  $viewHelper->prepareAndRender(8, $this); // my product_id = 8
}

I feel like I'm way off on a good approach. Please help! I could not find anyone else trying to combine both these things into a single page, so any parrallel example is helpful, too.


texts: How to add style in order email template in magento 2.3?

texts: Once I do order from Magento site then I can see in email template "Payment Method" and it is not style well. So I wan to add some CSS style. Can you please let me know where I can add it?


texts:
This is an extract of Magento 2's email template order_new.html

<!--@subject {{trans "Your %store_name order confirmation" store_name=$store.getFrontendName()}} @-->
<!--@vars {
"var formattedBillingAddress|raw":"Billing Address",
"var order.getEmailCustomerNote()":"Email Order Note",
"var order.increment_id":"Order Id",
"layout handle=\"sales_email_order_items\" order=$order area=\"frontend\"":"Order Items Grid",
"var payment_html|raw":"Payment Details",
"var formattedShippingAddress|raw":"Shipping Address",
"var order.getShippingDescription()":"Shipping Description",
"var shipping_msg":"Shipping message"
} @-->

and

{{trans "Thank you for your order from %store_name." store_name=$store.getFrontendName()}}

My questions are:

What scripting language is this?
What do the double curly brackets stand for?
How can I access arrays? For instance customerdata['name'] does not work.


texts:
So I've manage to create a Database backup no problem.
But when I tried to a System backup, it would show the little spinning icon then after a few minutes it would dissappear, leaving no create system backup.

When I look at the backend via Dreamweaver, it showed a 'temp' file.

Is there something I should be doing?


texts: Add new column in sales order grid table in admin magento

texts:
I want to add new column 'Item list' in sales order grid table in admin where it will show all the names of ordered items.
I updated in /app/code/core/Mage/Adminhtml/Block/Sales/Order/Grip.php page and it will show the correct output but the pagination and number of records  shows incorrect as per the data.
Please see the code that i changed in Grid.php page

protected function _prepareCollection()
    {
        $collection = Mage::getResourceModel($this->_getCollectionClass());
        $collection->getSelect()->join('sales_flat_order_item', '`sales_flat_order_item`.order_id=`main_table`.entity_id', array('name'  => new Zend_Db_Expr('group_concat(`sales_flat_order_item`.name SEPARATOR ", ")')));
 $collection->getSelect()->group('entity_id');
    $collection->getSelect()->joinLeft(
                array('cev' => 'customer_entity_varchar'),
                '(main_table.customer_id = cev.entity_id AND cev.attribute_id = 141 AND main_table.customer_id IS NOT NULL)',
                array(
                    'admin_number' => 'cev.value',
                )
            );
        $this->setCollection($collection);
        return parent::_prepareCollection();
    }

and for adding column

$this->addColumn('name', array(
        'header'    => Mage::helper('Sales')->__('Item List'),
        'width'     => '200px',
        'index'     => 'name',
        'type'        => 'text',

    ));

when i removed the above code then everything is working fine. Please check it and tell me where i am doing mistake.
Thanks


texts: Magento 2 Change price for configurable product using plugin

texts:
I need to change price of products using plugin. I used following method for it.

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Model\Product">
        <plugin name="change_price" type="Namespace\Module\Plugin\Price" />
    </type>
</config>

Created following plugin class:

namespace Namespace\Module\Plugin;

    class Price
    {
        public function afterGetPrice(\Magento\Catalog\Model\Product $subject, $result){

            return $result;
        }
    }

This is working perfectly for simple product but this is not working with configurable product. I need to carry all type of products.


texts:
I see this error on the product pages only.

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.status' in 'where clause', query was: SELECT count(DISTINCT e.entity_id) FROM `report_event` AS `report_table_views`
 INNER JOIN `catalog_product_entity` AS `e` ON e.entity_id = report_table_views.object_id AND e.entity_type_id = 4
 INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id='1' AND cat_index.category_id = '393' AND cat_index.is_parent=1 WHERE (report_table_views.event_type_id = 1) AND (logged_at >= '2015-07-09 07:19:10') AND (logged_at <= '2015-07-09 08:19:10') AND (((e.status = '1'))) AND (e.entity_id NOT IN('9846')) AND (e.entity_id NOT IN((SELECT `sales_flat_quote_item`.`product_id` FROM `sales_flat_quote_item` WHERE (quote_id = ''))))

I already tried reindexall and cleared the cache but the error still shows. Any idea on how to fix this?


texts: Magento 2 - Add custom block to admin order create form

texts:
I need to add new block to admin order create form (in totals section). First I tried to do it by adding sales_order_create_index.xml to my module and adding my block to

<referenceBlock name="data">

but it did not work and it's because all child blocks of "data" block are called in data.phtml with $block->getChildHtml() method.

UPDATE

Now I decited to use plugins instead, I added plugin to Magento\Sales\Block\Adminhtml\Order\Create\Data like this

class DataPlugin
{
    public function beforegetChildHtml($subject, $alias = '', $useCache = true){

       if($alias=='totals'){
          echo 'test';
       }

    }
}

And it's works. But how I can insert my block here instead of printing text


texts: Owl Carousel is working in magento 2 luma theme but other functions like dots, next and prev not displaying?

texts:
The owl carousel slider is working fine as drag. But I can't able to see any dots or next, prev icons. Please tell me how to display that?

autoplay: true, dots: true are not working.


texts:
I tried to find a solution on Google, but I could not find this specific question.
I am setting up Magento for a takeaway store that sells only in one city and I would like to know how to do that as by default you can restrict the list of the countries for the shipment but you cannot restrict the shipment to a single city. I am using Magento Community Edition 1.9

Thank you in advance for your help.

Regards,
Deviad


texts: "Last Logged in: Never (Offline)" for customers who have logged in but not recently

texts:
This shows in Customer View for any customer who hasn't logged in recently but who has actually logged in (e.g. last week or a few days a go). So it is definitely not "Never" and one would expect to see the actual last login date-time.

How do I fix that?


texts:
im having some issues using Magento2 search engine.
Im using Magento 2.3.4 and have setup only the name (weight 10), meta-title (weight 5) and sku (Weight 1) as searchable.
Im having for example products with the names:

Johana
Joahna Absent
Johana Regular

When i search for "Johana Absent", all the Johana products appear before the Johana Absent.
Can someone plese help me understand and solve this.
Regards


texts: Magento2 Undefined class constant 'CONFIG_MODULE_PATH' in UiComponent.php

texts:
Tried installing a theme for a Magento2 based website and after I installed it and tried to login into the admin panel I got the below error after typing in my admin user/pass.
Now I manually removed the theme including removing all the theme related entries in the setup_module database table and also the theme from the theme table. I then ran compile and deploy and flushed cache. However I still get this error when trying to login to the admin panel
Fatal error: Method Magento\Ui\TemplateEngine\Xhtml\Result::__toString() must not throw an exception, caught Error: Undefined class constant 'CONFIG_MODULE_PATH' in /var/www/vendor/magento/module-ui/Component/Wrapper/UiComponent.php on line 0

I am not sure what to do to correct it. Suggestions?


texts:
Is anyone else here using cleaning docker (or similar) with PHPStorm?  If so, could you please point me in the direction of a few guides to help with getting PHPStorm configured to work?  Clean-docker is setup and working perfectly

Clean-docker link for reference


texts: How can i remove the block which is present in some other module

texts: I want to remove "my product reviews" which is in magento_review module. The whole sider is in magento_customer. I am override magento_customer's customer_account.xml layout in my custom module. How can i remove it?


texts: Order confirmation receiving twice in magento2

texts:
I am facing same issue in Magento2, After the order gets confirmation we receiving the order confirmation mail twice. We using External plugin JccPaymentGateway , by using that plugin if we do order it sends one mail. But if we select inbuilt magento2 payment option like (Cash on Delivery, Cheque) option sends order confirmation mail twice.

Magento Version : 2.2.6

If you know the solution please reply as soon as possible


texts: Error processing request: Maximum length of attribute code must be less then 30 symbols

texts:
after I installed the CustomerOrderComment extension this happenned. Any opinions how to resolve the problem?

a:5:{i:0;s:223:"Error in file: "/home/dopestoc/public_html/magento/app/code/community/Biebersdorf/CustomerOrderComment/sql/customerordercomment_setup/mysql4-install-0.0.3.php"
- Maximum length of attribute code must be less then 30 symbols";i:1;s:1028:"#0 /home/dopestoc/public_html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/dopestoc/public_html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '0.1.5')
#2 /home/dopestoc/public_html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('0.1.5')
#3 /home/dopestoc/public_html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/dopestoc/public_html/magento/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/dopestoc/public_html/magento/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /home/dopestoc/public_html/magento/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /home/dopestoc/public_html/magento/index.php(87): Mage::run('', 'store')
#8 {main}";s:3:"url";s:9:"/magento/";s:11:"script_name";s:18:"/magento/index.php";s:4:"skin";s:7:"default";}


texts: The layered navigation on my current project is not displaying on the catalog pages. It is configured in the admin panel, but i am afraid some css may be wrong causing it not to show.


texts: Is there any tool to Convert magento 1 Product import csv file to magento 2

texts:
I have Magento 1 Product Import CSV file, I need to convert Magento 2 Product Import CSV Format.

Is there any tool out there?.         If not there means,

Suggest me How to Convert it.  Because

Magento 1 Product Import file have More Columns form magento 2 product import csv file.
I need clarification about fields, which magento 1 Product import file field is equal to Magento 2. and what are the fields are need in magento 2 from magento 1.


texts:
I'm trying to disable a cron job that's scheduled in a Core file (for reasons), but I haven't been able to find any information about that on the manual or the Internet.

I found that the job I want to disable will leave under config > crontab> jobs > job_key config node, I was planning to overwrite the schedule > cron_expr within that node and set its value to null in my module.

Anyone with any experience in doing this? Any alternative solution?


texts: Magento 2 hide button Search from Grid(Created using block)

texts:
I want to hide Search button from admin grid which is created using blocks and not ui component,
How should do I that?


texts: How to get defined Tax rate percent prgramatically?

texts:
We have created tax rates in
sales->Taxes->Zone&Rates with Rate Percent of xx.xx,
Can we fetch this fetch this details programmatically before placing order for using it API.


texts: Get store name corresponding to a quote object created: Magento 2

texts:
I have a custom module that works with the default Magento quote factory. Here, I am fetching the quote data using the,

  \Magento\Quote\Model\QuoteFactory $quoteFactory

and in my block I am getting the store name as

public function getStoreName() {
    return $this->_storeManager->getStore()->getName();
}

However, when there are multiple store views, the above code always displays the store as Default Store View.
Is there anyway we can get the store name according to the quote object that was created?

Please can anyone help?


texts: Troubleshooting a Magento / Solr connectivity issue

texts:
Working with Magento EE 1.14.2.4 running on CentOS LAMP stack. Attempting to utilize Solr Search.

I'm creating a staging site. The codebase and server configuration are essentially mirrors of production. Everything seems configured correctly but when I attempt to run Test Connection of Solr from System > Config > Catalog > Catalog > Catalog Search I get "Connection failed! Test again?".

I know I'm running Solr, I'm starting it up with this command which is taken from the Magento 1.x / Solr doc:

java -jar /root/solr/apache-solr-3.6.2/example/start.jar

Dev Document: http://devdocs.magento.com/guides/m1x/other/ht_magento-solr.html

To rule out any firewalls or security rules, I monitored incoming traffic to Solr's default port (i.e. 8983):

tcpdump -i eth0 port 8983

Ran the test from Magento's admin, no incoming traffic/packets.

I then ran the following command to ensure the port was open and receiving:

wget mysstagingsite.com:8983

404, but at least a server response and a visible request in my tcpdump.

Also to be clear: My codebase, database and Solr instance are all hosted on a single environment, so the request Solr would be making would be to 127.0.0.1:8983, so I tested this command as well:

wget 127.0.0.1:8983

Same result, packets and request visible.

For whatever reason, the Solr connectivity test in the admin isn't actually requesting anything - it seems. So what could be wrong? Solr was part of Magento EE, all I did was install according to the dev docs provided by Magento and it worked on my production site. How do I proceed with debugging as there isn't necessarily a Magento extension to reinstall?


texts: cms and newsletter preserving formatting

texts:
we use html code view to enter templates in Magento through the CMS. Everytime we do this, we notice that after saving all formatting is lost. making it difficult to read back what we made (and rather useless).

For example, we enter:

Goedendag {{var customer_name}},

and it ends up like

Goedendag {{var customer_name}},

all on one line.

Question: what can we do about this? Its a shame we loose all formatting

This is not what I would expect.

Also - isnt the CMS editor in Magento already quite old?

Thanks, Sean


texts: Add entity_id column and filter in sales order grid magento 2

texts: I want to add entity_id column and filter for its search in sales_order_grid in magento 2.3 admin. Any one have any idea?


texts: How to remove telephone number as required field in billing and shipping on admin side?

texts:
How to change telephone number to not being required on the admin side billing and shipping information?

Could this be done with some SQL query?


texts: trying to export products give 500 internal server error

texts: Trying to export All products but it gives me 500 Internal server error. i have set max execution time and max input time to 9000 also input memory 256MB on my cpanel and htaccess file. everything is fine from some post i see directory permissions are also correct and on another post i try change if condition in product.php but still problem is same please any one who faced and solved suggest me thanks in advance


texts: Copy XML nodes from layout files of another action in Magento2

texts:
My use case is, that I copied parts of the Magento checkout to the bundle's product's page. i.e. I copied parts from app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml to app/design/frontend/Example/default/Magento_Bundle/layout/override/base/catalog_product_view_type_bundle.xml. (which is used in catalog_product_view action)

But I also had to search in other checkout_cart_index.xml files for parts to copy. Especially the payment method renderers, as found for example in app/code/Magento/Paypal/view/frontend/layout/checkout_index_index.xml.

Is there a smarter way than copying this manually, for example by a layout  <move> statement? But I guess I can retrieve layout information from other actions? Is there a trick to do so?


texts: Magento 2 How to remove personal information fields(first name, last name) from customer account create page?

texts: Please help me to solve it. I have attached the screen short here


texts: Add to cart takes too much of time in magento2.2.4?

texts:
Actually, I tried to add the product to cart but it takes so much of time.

I have disabled the cache while i am in the developing this website.

How to rectify this time delaying issue?


texts: Customer custom attributes not saved in admin using soap API magento1.9.2.4

texts:
I have created customer custom attributes.But those custom attributes not saved in the admin using the API.

I have created one file in the root.When I run this file only email , firstname , lastname saved but my custom attribute not saving.
Please help me as soon as possible.

<?php
    ini_set('display_errors', 1);

    $client = new SoapClient('http://hauserph.nextmp.net/api/v2_soap/?wsdl');

    $session = $client->login('hausertest', 'nvKTbozp8B');

    $result = $client->customerCustomerCreate($session,
    array(
    'email' => 'customer-mail@example.org',
    'firstname' => 'Dough',
     'lastname' => 'Deeks',
     'fcc_consent' => 'dfgfdgsdfg',
     'password' => 'password',
      'website_id' => 1,
       'store_id' => 1,
       'group_id' => 1,
       'rp_token' => 'gfhfhfghf',
       'rp_token_created_at' => 'fgdgd',
       'state_license_num' => 'dfgffd',
       'dea_license' => 'dfgfsdgdf',
       'dea_expiredate' => 'fgsdfgdf',
       'state_expiredate' => 'gsdfgsdf'
       )

    );

    echo '<pre>';
    print_r($result);

    ?>


texts: how to get all configurable product attribute in SOAP API v2

texts:
how to get all configurable product attribute like color,size,brand,shipping etc in soap api V2, I am totally new in this field.
Thanks in advance.
Here is my code where i have to fetch all the configurable attribute with label to my android application.
I tried to copy the description module same in color module but its return the numeric digit rather than color text.

<?php
// Get products in category
require_once('../app/Mage.php');//Path to Magento umask(0);

if(isset($_GET["categoryId"])){
  $categoryId=$_GET["categoryId"];
    $proxy = new SoapClient('http://www.prash.com/index.php/api/v2_soap/?wsdl'); // TODO : change url
    $sessionId = $proxy->login('prash', 'prash123@'); // TODO : change login and pwd if necessary

    $products= $proxy->catalogCategoryAssignedProducts($sessionId,$categoryId);

    $itemDetails=array();
    Mage::app();

  foreach ($products as $item) {

    $product2 = Mage::getModel('catalog/product')->load($item->product_id);
    $productMediaConfig = Mage::getModel('catalog/product_media_config');
    $baseImageUrl = $productMediaConfig->getMediaUrl($product2->getImage());
    $price2=0;
    $price2=$product2->getFinalPrice();
    if($price2==0){
    $price2=$product2->getPrice();
    }

    $desc=$product2->getDescription();
           if($desc==""){
            $desc="blank";
           }
            $color=$product2->getColor();
           if($color==""){
            $color="blank";
           }

           $baseImageUrl = $productMediaConfig->getMediaUrl($product2->getImage());
           if($baseImageUrl=="http://www.prash.com/media/catalog/product/"){
            $baseImageUrl="http://www.prash.com/customApi/icon.png";
           }

           //"desc"=>$desc,

           $statusp=$product2->getStatus();
    $statusen= Mage_Catalog_Model_Product_Status::STATUS_ENABLED;

    if($statusp==$statusen){
         $itemDetails[]=array(
      "productId"=>$item->product_id,
      "name"=>$product2->getName(),
      "price"=>$product2->getPrice(),
      "spprice"=>$price2,
      "desc"=>$desc,
      "color"=>$color,
      "imageurl"=>$baseImageUrl,
      );
    }

  }
  //return array of products
  //echo "<pre>";
  //print_r($itemDetails);
  //echo "</pre>";
  echo json_encode($itemDetails);
  exit();
}else{
  echo "error";
  exit();
}
?>


texts: Error When Adding Attribute: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 1

texts:
I am trying to add a new attribute, but seem to have a problem with what I think is the increment IDs of the primary key of the table eav_attribute, which is attribute_id.

Every time I try to add a new attribute I get this error:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 1

I have tried re-indexing, clearing the cache and have truncated all log tables to no effect. A category attribute has been successfully added in a MySQL setup file which I think may have caused the auto increment to come out of sync?

Has anybody experienced this error before?


texts:
I've followed the dev docs on setting up varnish, and increased the http_resp_size and http_resp_hdr_len when the daemon starts. Most of the time it's fine, but every once in a while I will get a backend fetch failed. (probably one every few thousand requests, very hard to replicate)

Checked using varnishlog -d -q "BerespStatus == 503"

There doesn't seem to be much indication of an actual problem other than the error I'm seeing:

FetchError     HTC status -1

One such failure is as follows:

<< BeReq    >> 426839
Begin          bereq 426838 pass
Timestamp      Start: 1534283980.206907 0.000000 0.000000
BereqMethod    GET
BereqURL       /
BereqProtocol  HTTP/1.1
BereqHeader    Host: <omitted>
BereqHeader    Pragma: no-cache
BereqHeader    Cache-Control: no-cache
BereqHeader    Upgrade-Insecure-Requests: 1
BereqHeader    User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
BereqHeader    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
BereqHeader    Accept-Encoding: gzip, deflate
BereqHeader    Accept-Language: en-US,en;q=0.9
BereqHeader    Cookie: mage-translation-storage=%7B%7D; mage-translation-file-version=%7B%7D; form_key=cm37N1pWTHh0CP1o; mage-cache-storage=%7B%7D; mage-cache-storage-section-invalidation=%7B%7D; mage-cache-sessid=true; mage-messages=; recently_viewed_product=%7B%7D; r
BereqHeader    X-Forwarded-For: <omitted>
BereqHeader    X-Varnish: 426839
VCL_call       BACKEND_FETCH
VCL_return     fetch
BackendOpen    25 boot.default 127.0.0.1 8080 127.0.0.1 55734
BackendStart   127.0.0.1 8080
Timestamp      Bereq: 1534283980.207162 0.000255 0.000255
FetchError     HTC status -1
BackendClose   25 boot.default
Timestamp      Beresp: 1534283980.224352 0.017445 0.017190
Timestamp      Error: 1534283980.224370 0.017463 0.000018
BerespProtocol HTTP/1.1
BerespStatus   503
BerespReason   Service Unavailable
BerespReason   Backend fetch failed
BerespHeader   Date: Tue, 14 Aug 2018 21:59:40 GMT
BerespHeader   Server: Varnish
VCL_call       BACKEND_ERROR
BerespHeader   Content-Type: text/html; charset=utf-8
BerespHeader   Retry-After: 5
VCL_return     deliver
Storage        malloc Transient
ObjProtocol    HTTP/1.1
ObjStatus      503
ObjReason      Backend fetch failed
ObjHeader      Date: Tue, 14 Aug 2018 21:59:40 GMT
ObjHeader      Server: Varnish
ObjHeader      Content-Type: text/html; charset=utf-8
ObjHeader      Retry-After: 5
Length         283
BereqAcct      881 0 881 0 0 0
End


texts:
I'm looking for a way to add 1 to count in the model. Something like:

$model = Mage::getModel('mymodule/mytable');
$model->setData(array('date'=>$myDate,'hour'=>$myTime,'count'=>'count + 1???'));
$model->save();

The problem is that the record might not exist yet, so I guess that I can't load the model before creating and use it like:

$model->setCount(($model->getCount() == null ? 1 : ($model->getCount() + 1));

Should I try to load the model first and then if it doesn't exist use:

$model->setData(array('date'=>$myDate,'hour'=>$myTime,'count'=>'1'));

otherwise use:

$model->setCount($model->getCount() + 1);

or there is a better way to do that? These are two db queries and in raw MySQL I could use only one (INSERT ... ON DUPLICATE KEY UPDATE) to solve my problem.


texts: Magento 2 and Varnish - Does it cache prices?

texts:
One thing I don't understand about Varnish for M2 is how it will work with prices. Especially since M2 is meant for B2B, there could be customer groups with different prices. So when user 1 (customer group A) visits the page he will get $10 for product A but user 2 (customer group B) will get $20 for product A.

Is the price block automatically hole punched with Varnish for M2?


texts: Magento 2 StoreManagerInterface already exists in context object in compilation

texts:
I am getting this error in my extension.

  PackageName\ModuleName\Block\Enhanced
  Incorrect dependency in class PackageName\ModuleName\Block\Enhanced in
                  /var/www/html/app/code/PackageName/ModuleName/Block/Enhanced.php
  \Magento\Store\Model\StoreManagerInterface already exists in context object

 public function __construct(
    \Magento\Framework\View\Element\Template\Context $context,
    \Magento\Catalog\Model\Session $catalogSession,
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    array $data = []

)
{
    parent::__construct($context, $data);
    $this->_catalogSession = $catalogSession;
    $this->_storeManager = $storeManager;
}


texts: Mageto1.9 How to find out the classification name and image of the classification of the top 6 items of the sales volume and the attribute name and picture of the attribute


texts: Increase and decrease button in addtocart.phtml

texts:
This is my file:

<?php $_product = $this->getProduct(); ?>
<?php $buttonTitle = $this->__('Add to Cart'); ?>
<?php if($_product->isSaleable()): ?>

        <?php echo $this->__('This product is available for purchase in increments of %s only.', /**$this->getProductName(),*/ $this->getProductDefaultQty()) ?>

        <?php if(!$_product->isGrouped()): ?>

                <?php echo $this->__('Qty:') ?>

                <input id="qty" class="input-text qty" type="text" title="Qty" value="<?php echo $this->getProductDefaultQty() * 1 ?>" maxlength="12" name="qty" />

        <?php endif; ?>
        <button type="button" title="<?php echo $buttonTitle ?>" id="product-addtocart-button" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><?php echo $buttonTitle ?></button>
        <?php echo $this->getChildHtml('', true, true) ?>

<?php endif; ?>

This is the result.

But it increment-decrement vaule by only 1.

My question is:
Can I increase or decrease the quantity of the qty_increments value set in the inventory of the product?

In this case I need to increase or decrease by 500.

Thanks and your suggestions


texts: Magento 2: Send email based on timezone selected by customer

texts:
I am developing extension in which I need to send email on base of selected Timezone by the customer.

I have set a cron which is working fine, however, I confused about to send email on the base of Timezone.

Could you help me to achieve this?

Thank you in advanced.


texts: How to show "custom message" in payment section when COD disable for particular product Magento 2?

texts:
I followed the steps in the below link to disable COD for a particular product.

magento 2 payment methods hide by code.

But I need to show a custom message(some of the items in the cart are not eligible for COD) in the payment section, when COD gets disabled. How can achieve this?


texts: How to update billing state when I select country with Chosen.js

texts:
I have chosen.js used in magento. Problem is that when I select country, like Germany, state is not updated with german states. Anyone know how to fire that change.

http://i.stack.imgur.com/o3qE6.jpg


texts: How can I add a form in the thank you page in which the user won't have to resubmit the email address

texts:
I want to add a form in the thank you page (the page that's displayed after the order has been placed which contains the order details), however, I don't the user to resubmit the personal details as it has already been input during the order process. The only fields the user would need to write on were the message itself.

At the moment I've created the form (which required name, email, etc) and added to the thank you page through a template. I'm thinking about capturing the user details with jQuery and resubmit a custom form via ajax, however, I'd prefer to do it natively via PHP. Any suggestions on how?


texts: How to execute block functions multiple times in Magento 2.1

texts:
I have an xml file containing one parent block "P" and inside that a child block "C".
"P" is referring to template "T1" and "C" is referring to template "T2".
Now in "T1" I have a for loop which executes "P" functions and also calls $block->getChildHtml("C") multiple times. "T2" has some html code along with calling functions to "C" block.
But the functions in "T2" are executed only once whereas functions in "T1" are executed multiple times as per the loop.
How do I make the functions of "T2" run multiple times.

The functions in both templates accept parameters due to which I get different result from "T1" template but same result from "T2" template


texts: get CustomAttribute Value "No" in magento 2

texts:
I have create custom attribute for product, I  try to get productCollection via, its throwing some value NO

What I did:

    <?php

    namespace Vendor\Module\Cron;

    class RelativeProduct
    {

        protected $_productCollectionFactory;

        protected $storeManager;
         protected $_objectManager;

        public function __construct(
            \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
            \Magento\Store\Model\StoreManagerInterface $storeManager,
            \Magento\Framework\ObjectManagerInterface $objectManager)
        {
            $this->_productCollectionFactory = $productCollectionFactory;
            $this->storeManager =$storeManager;
             $this->_objectManager = $objectManager;
        }

        public function execute()
        {
            $storeID = $this->storeManager->getStore()->getStoreId();
            $store = $this->storeManager->getStore($storeID);
            $currentStoreID = $this->storeManager->setCurrentStore($store->getCode());
            echo $currentStoreID;

            $collections = $this->_productCollectionFactory->create()->addAttributeToSelect(array('*'))->load();

            foreach ($collections as $product) {
               echo $product->getResource()->getAttribute('brand')->getFrontend()->getValue($product);
               echo $product->getResource()->getAttribute('brand')->setStoreId(0)->getFrontend()->getValue($product);
               echo $product->getResource()->getAttribute('brand')->setStoreId(1)->getFrontend()->getValue($product);
               echo " 1 ";
               echo  $product->getAttributeText('brand');
               echo " 2 ";
               echo $product->getResource()->getAttributeRawValue($product->getId(),'brand',$this->storeManager->getStore()->getId());
               echo " 3 ";
               echo "  ";
           exit();

        }

    }

If I tried:

               echo $product->getResource()->getAttribute('brand')->getFrontend()->getValue($product);
               echo $product->getResource()->getAttribute('brand')->setStoreId(0)->getFrontend()->getValue($product);
               echo $product->getResource()->getAttribute('brand')->setStoreId(1)->getFrontend()->getValue($product);

It throws: No Value.

If I use:

echo $product->getAttributeText('brand');

echo $product->getResource()->getAttributeRawValue($product->getId(), 'brand', $this->storeManager->getStore()->getId());

This doesn't get any value.

But, Each product have this custom attribute value.

Suggest Me how to get Custom Attribute value.


texts: Creating shipments programmatically from order collection issue

texts:
This is my code:
foreach ($orders as $order) {
    if (!$order->canShip()) {
        continue;
    }
    // \Magento\Sales\Model\Order\ShipmentFactory
    $shipment = $this->shipmentFactory->create($order);
    try {
        //\Magento\Sales\Model\Order\ShipmentRepository
        $this->shipmentRepository->save($shipment);
    } catch (Exception $error) {
        var_dump($error->getMessage());
    }
}

In my exception I am receiving this error message: We cannot create an empty shipment. from \Magento\Sales\Model\ResourceModel\Order\Shipment::_beforeSave
My goal is to create a shipment for each order from my order collection.
Any clue why my script is not working ? I found similar posts like: https://magento.stackexchange.com/a/322459/6204 to create a shipment, but they are using deprecated methods. I would like to avoid that since I am running Magento 2.3.4
Thanks


texts:
I'm trying to find out where the /sales/guest/form/ submits to.

Is it an email address that this goes to or does it search for a particular order?


texts: Magento 2 Get Full Category Path for product

texts:
How to get full category path in Magento 2?

For example

  Home > Women > Dresses > Maxi Dresses

I am developing script for Google Shopping Feed and there is a node product_type which is require product category in above format

This node should be in below format:

<g:product_type><![CDATA[Home > Women > Dresses > Maxi Dresses]]></g:product_type>

I have searched on forum but didn't found any solution for Magento 2.

If anyone any idea then please share me.


texts: Allowing for a negative order, with Grand Total less than 0

texts:
One of our clients has asked for the ability for its order entry personnel to submit orders with a negative order total. The application already allows negative line items, which works fine as long as the rest of the order makes a positive Grand Total.

It seems that Magento tries very hard to not have a negative order total. Looking at the collected totals shows that Magento will apply a gift card for the inverse amount. If I disable the gift card, then it applies Store Credit (even if credit does not exist). I suspect this is just a quirk (and possibly a red herring).

Can anyone help pinpoint where Magento forces 0 as its maximum Grand Total amount, and how we might go about fulfilling the request? I don't want to simply force-set the total, as I want Magento to calculate everything normally, just with the allowance of a negative Grand Total.

The spirit of the question is the technical feasibility, but once that is addressed, I'm interested in any 'gotchas' or thoughts that might dissuade the use of negative order totals from a non-technical standpoint.


texts: Magento 2 default bootstrap not applied on custom theme

texts:
I am using magento 2.4.1 open source, i am using custom theme inherit from blank theme, for home page design i have created static block and insert as widgets in CMS page as my home page. I am using bootstrap design on my home page but its not working, after added bootstrap cdn to my
\app\design\frontend\zero_theme\mytheme\Magento_Theme\layout\default_head_blocks.xml
<css src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"  src_type="url" rel="stylesheet" type="text/css" />

then itsworking, magento have default bootstrap right, why its working.
Note : After declare bootstrap my PLP & PDP some of the alignment collapsed.
How to handle bootstrap in custom theme?


texts: 503 Service Unavailable on /checkout/onepage/saveOrder/ and redirect to Cart

texts:
I am getting redirected to Cart after selecting shipping method. In the console log I saw checkout/onepage/saveShippingMethod/ 503 (Service Unavailable) and I don't see anything in the error.log.

I tried the solution

  Magento onepage checkout saveOrder 302 redirect

but the solution provided is already implemented.

I am using Magento 1.9.


texts:
I have a custom module in which i want to change folder structure...how to change default folder structure for image upload..i want to upload and fetch images from newly created folder for e.g "r->small_img->img1.jpg"....whenever i try to fetch or upload images it creates "catalog->product" folder. Is it possible to change the default folder structure.??? I want my product images to store in other newly created folder and fetch from it??? Is this possible????........

Please help me out

--edit--

I want my images to be uploaded from another server and fetch from there only and whenever i m trying to do that it automatically creates "catalog->product" folder and do fetching and uploading process from it......I want that it should fetch from newly created folder and upload to it only... any solution for this –


texts: Magento 2 remove mini-cart content in cart page

texts: How can I remove Magento 2.3.1 minicart content in checkout_cart_index (cart page), but keeping cart header link and counter?


texts: Is there any extension, that can compress the images while uploading as  the product image. I have written codes that is used to add products from front end and also using CSV. The users have option upload the images. We would like to compress theses images without loosing quality. I have saw some php codes that can compress the images. But i would like to know if there are any good extensions that can compress product images.


texts: Magento 2 remove subtotal from Invoice PDF

texts:
I've been trying to remove subtotal from the invoice pdf.
I have override vendor/magento/module-sales/etc/pdf.xml from my custom module but didn't work. I have just commented on the subtoal. but it not working.
Does anyone have an idea how to do it in a perfect and standard way?


texts: VAT always 0% even though settings seem to be correct

texts:
I setup a new store and added my tax classes and everything. I opened the product, set the tax class and saved, reindexed, emptied caches but the VAT on the product page or list page is always 0%.

I also set the country of origin and set the prices to include tax on the frontend. PLease also take a look at the tax settings here: https://screenshots.firefox.com/0y6mBZZmGz6SFtYe/www.alltagsflucht.de

Any ideas what else might be missing?

Magento 2.2.5 with sample data


texts: How modify UI Component Option values in custom modules

texts:
I have a base module which defines a UI Select component like so:
      <field name="type" formElement="select">
        <settings>
            <dataType>text</dataType>
            <notice>Make a Selection</notice>
            Custom Select
            <dataScope>type</dataScope>
        </settings>
        <formElements>
            <select>
                <settings>
                    <options>
                        <option name="option1" xsi:type="array">
                            <item name="value" xsi:type="string">1</item>
                            <item name="label" xsi:type="string">Option 1</item>
                        </option>
                        <option name="option2" xsi:type="array">
                            <item name="value" xsi:type="string">2</item>
                            <item name="label" xsi:type="string">Option 2</item>
                        </option>
                    </options>
                </settings>
            </select>
        </formElements>
    </field>

This works great and makes a beautiful select like this:

Now, I want to add possible options in dependent modules. So in the dependent module I would like to add and option:
    <field name="type">
        <settings>
            <notice>Choose Your Option please</notice>
            Modifed Select
        </settings>
        <formElements>
            <select>
                <settings>
                    <options>
                        <option name="option3" xsi:type="array">
                            <item name="value" xsi:type="string">3</item>
                            <item name="label" xsi:type="string">Option 3</item>
                        </option>
                    </options>
                </settings>
            </select>
        </formElements>
    </field>

And the result is this:

So clearly I can see that two of my modifications were accepted in the dependent module as the label as well as the hint/notice are updated. However the option was not added.
Is it not possible to do this via XML? What are my other choices, given that I want other modules to be able to extend mine in this fashion?


texts:
Having two select fields in template file

     <select id="ab" class="required-entry" name="abc" title="abc" >
      <option value="">-----</option>
        <option value="1">A </option>
         <option value="2">B </option>
       </select>
    <select id="dc" class="required-entry" name="dc" title="dc">
     <option value="">-----</option>
      <option value="3">C </option>
      <option value="4">D </option>
     </select>

     //<![CDATA[
   var brochureform = new VarienForm('form', true);

    //]]>

This code asks for two fileds madatory but I need to set only one is mandatory


texts: Magento 2: how to change Category page design

texts:
I have a theme installed on my Magento V2.2.3 site and now i would like to change the category page design with requirements

new custom fields for category
option on each category if this category will be visible with new design or not
if yes, then i need category custom fields which will have slider image and text box which i need to put above product list.

Can someone tell how i can achieve this
Thank you in advance!


texts: Magento2 : Product Import not working properly

texts:
I have imported two product into magento2 via CSV. After import it said "imported successfully", two products created but no product name, price, images etc updated with product.
Even earlier import was working properly.

I didn't figure out what causing this issue.

Please suggest?


texts: Magento 2.3: How can I add PayPal Express Checkout integration on custom page?

texts:
I'm new to magento.I'm working on magento 2 custom checkout module due to integration with client ERP system.

All of my checkout process are using custom table like custom_order_table and custom_order_items_table.

My question is how can I add PayPal Checkout button on my custom page and when click the button retrieve data from my custom table etc .. grand_total,currency,item_detils and submit to PayPal to complete payment process.

Please help me.
Thank You.


texts: How do I filter the sales grid in admin panel?

texts:
This is my code:

  class Mage_Adminhtml_Block_Sales_Order_Grid extends

        Mage_Adminhtml_Block_Widget_Grid
        {

            public function __construct()
            {
                parent::__construct();
                $this->setId('sales_order_grid');
                $this->setUseAjax(true);
                $this->setDefaultSort('created_at');
                $this->setDefaultDir('DESC');
                $this->setSaveParametersInSession(true);
            }
protected function _prepareCollection()
    {
        $collection = Mage::getResourceModel($this->_getCollectionClass());
        $collection->getSelect()->join('sales_flat_order', 'main_table.entity_id = sales_flat_order.entity_id',array('data_expeditie','moneda_comanda'));

        $collection->addFieldToFilter('created_at', array('created_at'=>'30.06.2015 21:41:02'));

        $this->setCollection($collection);
        return parent::_prepareCollection();
    }
 protected function _prepareColumns()
    {
  $this->addColumn('created_at', array(
            'header' => Mage::helper('sales')->__('Purchased On'),
            'index' => 'created_at',
            'filter_index'=>'main_table.created_at',
            'type' => 'datetime',
            'width' => '100px',
        ));
}
    }

I want my grid to show the last 30 days sales.
This is the controller:

class Adminhtml_Sales_OrderController extends Mage_Adminhtml_Controller_Action
{

    /**
     * Orders grid
     */
    public function indexAction()
    {
            $this->_title($this->__('Sales'))->_title($this->__('Orders'));

            $from = date("Y-m-d", strtotime('-60 day'));
            $to = date("Y-m-d", strtotime('0 day'));
            $locale = Mage::app()->getLocale()->getLocaleCode();

            Mage::register('preparedFilter', array(
                //'store_id' => '1',
                //'status' => 'processing',
                'created_at' => array(
                    'from'=> new Zend_Date($from, null, $locale),
                    'to'=> new Zend_Date($to, null, $locale),
                    'locale' => $locale,
                    'orig_to' => Mage::helper('core')->formatDate($to),
                    'orig_from' => Mage::helper('core')->formatDate($from),
                    'datetime' => true
                )
            ));
        $this->_initAction()->renderLayout();
    }
}

how can i do that ?


texts:
Is it possible to import the star ratings in a CSV import on Magento?
I know I can import/export the reviews, but these exports do not include the star rating (Detailed Rating)

Can someone point me in the direction of a Data Profile that will allow for the import and export of reviews including the ratings please.


texts: Magmi error: “SQLSTATE[HY000] [2002] No such file or directory -”

texts:
When I try to update pricing for a group of products with an existing .csv in my Magento store Magmi display this error:

How to debug and fix this? There's only one php version


texts:
I was wondering if there is a mechanism to set the order of Magento extension installations. I created a custom module which has an install script. That install script checks default's store category, but the problem is that Magento tries to install this custom extension before Catalog. Is there a way to set the installation order? I tried with <depends><Mage_Catalog/><Mage_Core/></depends> in extension xml file but that didn't work.
One option is to install clean Magento first, and then my custom extension by setting <active>true</active>, but I would like to make it automatically.
Thanks...


texts: Magento footer links not removed in custom theme

texts:
I create a custom theme based on Luma, with the path like:

/app/design/frontend/Theme1/custom/

Now I want to remove the footer links and edit the following file:

/app/design/frontend/Theme1/custom/Magento_Theme/layout/default.xml

Inside the file I added <referenceBlock name="footer_links" remove="true"/> after <body>

The strange thing is that it's not working. When I change the default Luma theme from the /vendor folder, it works well.

My custom Theme1 is enabled from Content -> Design in the backend.

What am I missing here?


texts: How to input and return data from bootstrap Magento 2 test.php script?

texts:
I need to pull product data out of Magento 2 via an external PHP command line script.

I am using the example here: How can I bootstrap Magento 2 in a test.php script?

In the run method, I extract my product collection and parse my product data into a new array without any problem.

public function run()
{
   // create collection

   // parse collection

   // build $_products data array

    return ['data' => $_products];

}

If I dump or echo $_products out in run() I can see the product data ok, I need to return the product data to the calling function but cannot see how to retrieve the data. I am initiating my app with

$app = $bootstrap->createApplication('Getapp');
$bootstrap->run($app);

How can I access the data returned from Getapp and how can I pass variables into Getapp?


texts:
In Magento2, how to sort Quote Items?

The code I have is her:

<?php
require __DIR__ . '/app/bootstrap.php';
use Magento\Framework\Api\SearchCriteriaInterface;
use Magento\Framework\Api\SortOrder;
class TestApp
    extends \Magento\Framework\App\Http
    implements Magento\Framework\Api\SearchCriteriaInterface, \Magento\Framework\AppInterface{
    public function __construct(
            \Magento\Framework\App\State $state,
            SortOrder $sortOrder,
            SearchCriteriaInterface $searchCriteriaInterface
    ){
        $state->setAreaCode('frontend'); // or 'adminhtml', depending on your needs
        $this->_sortOrder = $sortOrder;
        $this->_searchCriteriaInterface = $searchCriteriaInterface;
    }
    public function getCurrentPage(){}
    public function setCurrentPage($currentPage){}
    public function getFilterGroups(){}
    public function setFilterGroups(array $filterGroups = NULL){}
    public function getSortOrders(){}
    public function setSortOrders(array $sortOrders = NULL){}
    public function getPageSize(){}
    public function setPageSize($currentPage){}
    protected function getSearchCriteria(){
        $searchcriteriaint = $this->_searchCriteriaInterface;
        $searchcriteriaint->setSortOrders(array($this->getSortOrder()));
        return $searchcriteriaint;
    }
    protected function getSortOrder(){
        $sortorder = $this->_sortOrder;
        $sortorder->setField('color')->setDirection(SortOrder::SORT_ASC);
        return $sortorder;
    }
    public function launch(){
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $cart = $objectManager->get('\Magento\Checkout\Model\Cart');
        // // get quote items collection
        // $itemsCollection = $cart->getQuote()->getItemsCollection();
        // // get array of all items what can be display directly
        $items = $cart->getQuote()->getAllVisibleItems($this->getSearchCriteria());
        foreach($items as $key => $item) {
            $productId = $item->getProductId();
            $_product = $item->getProduct();
            $product = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
            echo 'Type: '.$item->getProductType().'
';
            echo 'ID: '.$item->getProductId().'
';
            echo 'Name: '.$item->getName().'
';
            echo 'Sku: '.$item->getSku().'
';
            echo 'Quantity: '.$item->getQty().'
';
            echo 'Price: '.$item->getPrice().'
';
            echo "
";
        }
        // return $this->_response;
    }
    public function catchException(\Magento\Framework\App\Bootstrap $bootstrap, \Exception $exception)
    {
        return false;
    }
}
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
/** @var \Magento\Framework\App\Http $app */
$app = $bootstrap->createApplication('TestApp');
$bootstrap->run($app);

Thanks!


texts: How to update custom product multiselect attibute in magento 2.3.3

texts: I have an existing product with a multi-select attribute and I need to update that multi-select attribute update programmatically. So how can I Update that option selected through programmatically? In a below ImageI need to make Label 1 option selected through an update.


texts:
How do you execute a cron to run at 9 am, 1 pm and 3.30 pm

My code is

<crontab>
    <jobs>
        <dotsquareexportcron>
            <schedule>
                <cron_expr>*/60 * * * *</cron_expr>
            </schedule>
            <run>
                <model>export/observer::setStatus</model>
            </run>
        </dotsquareexportcron>
    </jobs>
</crontab>

Currently it is working per 60 mintues

Please suggest how it will work


texts: How to put NOINDEX,FOLLOW to login and registration page Magento2.x

texts:
I am having trouble in putting meta robots in selective page. I wanted to Noindex and Follow on login and registration page only and rest of page will have Index and Follow.

I have put <meta name="robots" content="NOINDEX,FOLLOW"/> in /vendor/magento/module-customer/view/frontend/layout/default.xml file but it causes to appear on whole site.

The block I have put in above file for reference.

// Path- /vendor/magento/module-customer/view/frontend/layout/default.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <meta name="robots" content="INDEX,FOLLOW"/>
    </head>
    <body>
        ...
    </body>
</page>

Is there any way so I can put some condition here or any other best way to do it.

I am using Magento ver.2.2.6

Thanks


texts: Bannerslider-Magento2 gives compilation error

texts:
I downloaded the plugin form here : https://github.com/Magestore/Bannerslider-Magento2

When i compile  the code using command

bin/magento setup:di:compile

I got following compilation error:

Compilation was started.
Proxies code generation... 0/7 [>---------------------------]   0% 1 sec 42.0
MiProxies code generation... 1/7 [====>-----------------------]  14% 1 sec 46.0
MiRepositories code generation... 1/7 [====>-----------------------]  14% 1 sec 46.0 MiBPHP Fatal error:
Class 'Magestore\BannerSlider\Model\ResourceModel\Report\Collection' not found in /var/xxx/xxx/magento2/app/code/Magestore/Bannerslider/Model/ResourceModel/Report/Grid/Collection.php on line 13


texts:
I'm trying to bulk import my product from a .csv. Here is my code so far:

include_once "../app/Mage.php";
include_once "../downloader/Maged/Controller.php";

Mage::init();

// Set the store id
//$app = Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$app = Mage::app('default');
$row = 0;

$categories = array(
    'Category 1' => 3,
    'Category 2' => 4,
    'Category 3' => 5,
    'Category 4' => 6,
);

if(($handle = fopen("import.csv", "r")) !== FALSE){
    while(($data = fgetcsv($handle, 1000, ';')) !== FALSE){
        $simpleProduct->setSku($data[2]);
        etc
    }
}

The problem is when I save the product the variable is a random string of numbers. Here's my csv.

http://imgur.com/CCkMKOM


texts: Why can't magento support unicode encoded urls for downloadable links?

texts:
I'm running the latest magento1.9.x

I am attempting to use a webservice call to create a downloadable link to a url similar to http://dev-nffiles.somesite.org/folder/Temp/9781554132_NurseMgr%27sBookForSaleStuff.mobi

Anytime I pass a url with percent encoding, I get a response "url_not_valid".

Assume I have xdebug and phpstorm, and I have a pretty good understanding of the zend framework, but i'm not going to step through magento core code for an hour.  I feel like magento should support unicode percent encoding.

Can anyone recommend how I can get this to work?  Its honestly out of the question to get the department creating the links to not do things like use apostrophes or spaces in the filenames.


texts: Catalog Search: If only one result, show product view page insted of list view

texts:
My goal is to achieve the following modification in the Magento catalog search.

When I search for a product and only one product is returned in the result collection, I want to display to product view page instead of the product list page.

Can you give me an advice how and where I should start searching to do this modification?

At the moment I'm really lost in this whole lot of code.

Using Magento 1.9.0.1


texts: Orders and Customer Migration in order items for "Bundle Products" not displaying

texts:
Hi here I migrated data from Magento 1.9.1.0 to Magento 2.3, I migrated Only Products, Orders & Customers.
Migration is successful but after migration in Orders page not able to see the "Ordered Items". How can get the Bundle Products in order page
here is my config.xml file
<steps mode="data">
        <step title="Customer Attributes Step">
            <integrity>Migration\Step\Customer\Integrity</integrity>
            <data>Migration\Step\Customer\Data</data>
            <volume>Migration\Step\Customer\Volume</volume>
        </step>
        <step title="Map Step">
            <integrity>Migration\Step\Map\Integrity</integrity>
            <data>Migration\Step\Map\Data</data>
            <volume>Migration\Step\Map\Volume</volume>
        </step>
        <step title="ConfigurablePrices step">
            <integrity>Migration\Step\ConfigurablePrices\Integrity</integrity>
            <data>Migration\Step\ConfigurablePrices\Data</data>
            <volume>Migration\Step\ConfigurablePrices\Volume</volume>
        </step>
        <step title="OrderGrids Step">
            <integrity>Migration\Step\OrderGrids\Integrity</integrity>
            <data>Migration\Step\OrderGrids\Data</data>
            <volume>Migration\Step\OrderGrids\Volume</volume>
        </step>
        <step title="SalesIncrement Step">
            <integrity>Migration\Step\SalesIncrement\Integrity</integrity>
            <data>Migration\Step\SalesIncrement\Data</data>
            <volume>Migration\Step\SalesIncrement\Volume</volume>
        </step>
  </steps>

Order display page

After migration I ran following commands
php bin/magento setup:di:compile
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush

Where I am doing wrong, Can I get some Help?. Thanks in advance


texts: magento1.9 add 5% tax to subtotal and shipping price

texts:
I have added a new rule 5%(on product and shipping) for customers who are UAE.

Please find the below screenshots

Tax Rule:

And Tax settings:

Note: All products in the site Tax class is: Shipping

Frontend issue is:

Product price is AED 1400

Product 5% tax is AED 70

Shipping price is AED 22.20

Shipping 5% tax is AED 1.11

Total should be AED 1493.31

But tax is adding double and result is AED 1,564.42

Please help me how to fix this issue

thanks


texts: Why is my Layout XML update nor working?

texts:
I'm going completely mad here. I have the following in "Layout Update XML" in one of my categories:

<referenceContainer name="content">
    <block class="Us\Tastemakers\Block\Tastemakers" name="category.tastemakers" template="Us_Tastemakers::tastemakers.phtml" before="-"/>
</referenceContainer>

I then have the following files:

app/code/Us/Tastemakers/Block:

<?php
namespace Us\Tastemakers\Block;
class Tastemakers extends \Magento\Framework\View\Element\Template
{
    protected $_productCollectionFactory;

    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
        array $data = []
    )
    {
        $this->_productCollectionFactory = $productCollectionFactory;
        parent::__construct($context, $data);
    }

    public function getProductCollection()
    {
        $collection = $this->_productCollectionFactory->create();
        $collection->addAttributeToSelect('*');
        $collection->setPageSize(3); // fetching only 3 products
        return $collection;
    }
}

And app/code/Us/Tastemakers/view/frontend/templates/tastemakers.phtml

<?php

/* *
 * @var \Us\Tastemakers\Block\Tastemakers $block
 */

 echo 'Hi there. I\'m here. I\'m a tastemaker';

// $productCollection = $block->getProductCollection();
// foreach ($productCollection as $product) {
//     echo "Inside view
";
//     print_r($product->getData());
//     echo "

";
// }

But none of my text gets displayed anywhere. I have done a complete cache:flush for good measure.

I'm completely going mad here. I must be missing something. Please put me out of my misery!

Update

I have the impression that something is stopping the admin's layout update xml from doing anything at all:

I have now added the same XML block to the catalog_category_view.xml and it works fine.

However, no layout update xml in the admin backend have any effect.

Here are two I have tried:

<referenceContainer name="content">
            <referenceBlock name="category.tastemakers">
                <arguments>
                    <argument name="skus" xsi:type="string">1,2,3</argument>
                </arguments>
            </referenceBlock>
</referenceContainer>

<referenceContainer name="content">
        <referenceBlock name="category.tastemakers"  remove="true"/>
</referenceContainer>

It literally doesn't do anything.


texts: Magento 1 admin order column check if item got catalog price rule

texts:
I want to edit the following file, that I copied to a local folder, and show a line if the product got a catalog price rule applied.

/app/design/adminhtml/default/default/template/sales/items/column/name.phtml

I already tried this, but that does not show any message, when it is applied. Because this gets the shopping cart price rule, instead of the catalog price rule. How can I get the catalog price rule id?

<?php if ($_item = $this->getItem()): ?>

<span id="order_item_<?php echo $_item->getId() ?>_title"><?php echo $this->escapeHtml($_item->getName()) ?>

    <?php if($_item->getAppliedRuleIds() == '63'):?>
        <?php echo $this->helper('sales')->__('CUSTOM MESSAGE') ?>
    <?php endif; ?>
<?php endif; ?>


texts:
Now I am create Magento new reCaptcha module. Some where I have read to use this below code in config.xml.

<adminhtml>
        <acl>
            <resources>
                <all>
                    <title>Allow Everything</title>
                </all>
                <admin>
                    <children>
                        <system>
                            <children>
                                <config>
                                    <children>
                                        <namespace_module>
                                            <title>Recaptcha</title>
                                        </namespace_module>
                                    </children>
                                </config>
                            </children>
                        </system>
                    </children>
                </admin>
            </resources>
        </acl>
    </adminhtml>

Is anyone who can explain me the meaning of these tags please.
Thanks


texts:
Magento 1.6.2.0.

When exporting Orders from the grid view in magento, as CSV, the name of the file downloaded is appended with -, attachment. This seems at the minute to be only happening in Chrome.

I've looked at where this download is triggered in Mage_Core_Controller_Varien_Action;

protected function _prepareDownloadResponse(
    $fileName,
    $content,
    $contentType = 'application/octet-stream',
    $contentLength = null)
{
    $session = Mage::getSingleton('admin/session');
    if ($session->isFirstPageAfterLogin()) {
        $this->_redirect($session->getUser()->getStartupPageUrl());
        return $this;
    }

    $isFile = false;
    $file   = null;
    if (is_array($content)) {
        if (!isset($content['type']) || !isset($content['value'])) {
            return $this;
        }
        if ($content['type'] == 'filename') {
            $isFile         = true;
            $file           = $content['value'];
            $contentLength  = filesize($file);
        }
    }

    $this->getResponse()
        ->setHttpResponseCode(200)
        ->setHeader('Pragma', 'public', true)
        ->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true)
        ->setHeader('Content-type', $contentType, true)
        ->setHeader('Content-Length', is_null($contentLength) ? strlen($content) : $contentLength)
        ->setHeader('Content-Disposition', 'attachment; filename="'.$fileName.'"')
        ->setHeader('Last-Modified', date('r'));

    if (!is_null($content)) {
        if ($isFile) {
            $this->getResponse()->clearBody();
            $this->getResponse()->sendHeaders();

            $ioAdapter = new Varien_Io_File();
            $ioAdapter->open(array('path' => $ioAdapter->dirname($file)));
            $ioAdapter->streamOpen($file, 'r');
            while ($buffer = $ioAdapter->streamRead()) {
                print $buffer;
            }
            $ioAdapter->streamClose();
            if (!empty($content['rm'])) {
                $ioAdapter->rm($file);
            }
        } else {
            $this->getResponse()->setBody($content);
        }
    }
    return $this;
}

Playing about with this file a little, if I remove attachment; from the line ->setHeader('Content-Disposition', 'attachment; filename="'.$fileName.'"') then the filename becomes orders.csv-, filename=-orders.csv.

It seems to be that Chrome isn't using the headers correctly, but can anyone shed any light on what can be done to solve this?

Edit

After being referred to the following SO question;

https://stackoverflow.com/questions/19834828/chrome-adds-attachment-to-downloaded-file

...adding the semicolon as so fixes the issue.

            ->setHeader('Content-Disposition', 'attachment; filename="'.$fileName.'";')

However editing this file is not a permanent solution. I've tested the issue in 1.8.1.0 and the download works fine. Examining the same line, its apparent that they've fixed the issue by adding the true parameter to replace the existing header;

            ->setHeader('Content-Disposition', 'attachment; filename="'.$fileName.'"', true)

In the meantime though, what's the best way to circumvent the issue on 1.6.2.0? I'm not going to edit the core file, and I don't really want to overwrite that abstract class either.


texts: After upgrading to php 7 bin/magento CLI commands not working Magento 2.0.2 CE

texts:
I've upgraded the php version of the apache2.4 server from 5.6 to 7.0.
OS version Ubuntu 14.04 LTS.
After this update, despite the fact that I've installed php7.0-cli, when i try to run

php7.0 bin/magento list command

I get the fallowing output:

Content-type: text/html; charset=UTF-8

bin/magento must be run as a CLI application

Output when I run sudo apt-get install php7.0-cli:

php7.0-cli is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

When I go to the bin directory and try to run the command :

magento list

I get the output:

magento: command not found

Any help would be appreciated!


texts: How can i quick update of qty and stock and all inventory fields in Magento

texts:
I want quick update of product on MAGENTO C.E 1.7

I know about the quick update of product attribute value  using

below code: getResource()->saveAttribute()

just like

     $product=Mage::getModel('catalog/product')->load($id);
     $product->getName();
     $product->setSpecialFromDate('2010-10-28');
    $product->setSpecialFromDateIsFormated(true);
    $product->setSpecialToDate();
    $product->setSpecialToDateIsFormated(true);
   /* quick save */
    $product->getResource()->saveAttribute($product, 'special_from_date');

    $product->getResource()->saveAttribute($product, 'special_to_date');

But i want  know how can update product inventory quickly just like  above product attribute update

and i have optimized my below code

// call product model and create product object
$product    = Mage::getModel('catalog/product');
// Load product using product id
$product->load($product_id);

$stockData['qty'] = $v;
if($v>0){
$stockData['is_in_stock'] = 1;
}else{
$stockData['is_in_stock'] = 0;
}

$product->setStockData($stockData);
$product->save();

I want to update inventory quickly.Can anyone help me


texts: how to display Google map on magento 2 admin side

texts:
actually, I want to use google map to get latitude and longitude of a place using google map so I need to use google map on backend using UI component form
thanks.


texts: magento 2 get product collection with custom filter on product listing page

texts:
I want to apply my custom attribute filter in category product collection?

Can any one inform me for that ,i need to override which file ?


texts: Error 500 when no version item is in stock

texts: I created a item that has multiple variants to chose from. But when all options are out of stock I get error 500. The error stops when when one of the options gets there stock refilled. Is there a way to stop this from happening?


texts: how to change SKU validation message in order by sku tab in magento 2.1

texts:
I want to change SKU error message:

  Please enter valid SKU key

To

  Please enter a valid SKU key

in magento 2.1 , can anyone help me please.

Thank you


texts: Magento2.3.5 home page & admin panel is running very slow

texts: I have installed the Magento2.3.5 successfully with PHP 7.3 version. I am running magento on windows 10 laptop. When I open homepage & admin link it takes 5-6 mins to open. I dont know why it is taking too much time. I have used Varnish cache, cleared Magento cache & used this command "php bin/magento cache:enable" but no success. Please tell me how to fix.


texts: magento upgrade 1.9.0.1 to 1.9.3.8 using admin panel

texts:
I am working currently magento 1.9.0.1.
how to update magento 1.9.0.1 to 1.9.3.8 ?


texts: How to hide the categories menu on an extra check-out step I added?

texts:
Magento 1.9.1
Porto theme

I have added an extra step in the check-out where I plan to present up-sell products but the menu on the top with all the categories is taking way too much real estate - I would like the customers to only see the up-sell products here....

How can I hide the categories menu and the entire header on that particular step of the check-out?

Here are the screenshots:

How it is on my website now (the up-sell/cross-sell products are showing up at the very bottom next to the test item):

Here is a picture from another website - this is how I would like it to look (no menu or header at the top):


texts: Fatal error: Class 'Altima_Lookbook_Helper_Data' not found in /home/offerbea/public_html/app/Mage.php on line 547

texts:
I have installed it from magento connect,  and now in my back-end it displayed as it.
Please somebody help me how to fix it.
I gues it causing by i was put the compliation mode in on.
Thank you


texts: Which one step checkout type extensions honour original layout handle?

texts:
One of my extensions uses the below layout xml instruction to add a common block for three payment methods to the checkout

<checkout_onepage_paymentmethod>
    <reference name="root">
        <block type="core/text_list" name="additional" as="additional">
            <block type="foomandpspro/pxpostrebill_ccSave" name="fooman_ccsave" as="fooman_ccsave"
                   template="fooman/dpspro/onePageCheckout.phtml"/>
        </block>
    </reference>
</checkout_onepage_paymentmethod>

This works without a problem on the default checkout.

The problem: A lot of my users are using one of the myriads of one step checkouts which are not honoring this. The layout handle is simply not loaded and subsequently the block is not added to the page. So far I have encountered MW_Onestepcheckout and GoMage_Checkout.

Have you come across any custom checkout extensions that actually handle this correctly? Or is this a case where I need to accept that the checkout layout handles have been retired and I need to start repeating myself?


texts: "Circular dependency" error when running cronjob from CLI using n98-magerun

texts:
I'm running my cronjob using n98-magerun (for testing purposes):
./n98-magerun2.phar sys:cron:run my_cron_job

However, the job is not running, and the following error occurs:

[LogicException]
Circular dependency: Magento\Backend\Model\Auth\Session depends on Magento\Backend\Model\Authorization\RoleLocator and vice versa.

I've flushed caches & var/generation, so it's not that. Has anyone come across this issue?


texts: Checkout "Return to Shipping Method" link

texts:
I'd like to add a "Return to Shipping Method" link, before "Place Order" button in checkout page.

How can I do that?


texts: All Transaction Emails Getting Sent Only from 'postmaster@example.com'

texts: In spite of configuring all the Sales Email to a particular ID, example sales@example.com, all the Sales related emails are being sent from postmaster@example.com


texts: Magento 2 get Layered Navigation By Product Collection

texts:
I need Layered Navigation Attribute Collection Based on Product Collection.

I have used Following Method it give Attribute List.

$filterableAttributes = $om->get(\Magento\Catalog\Model\Layer\Category\FilterableAttributeList::class);
$appState = $om->get(\Magento\Framework\App\State::class);
$layerResolver = $om->get(\Magento\Catalog\Model\Layer\Resolver::class);
$filterList = $om->create(
\Magento\Catalog\Model\Layer\FilterList::class,
    [
        'filterableAttributes' => $filterableAttributes
    ]
);

$category = 4;

$layer = $layerResolver->get();
$productCollection = $layer->getProductCollection();
$productCollection->addFieldToFilter('application',11);

$layer->setCurrentCategory($category);
$layer->setProductCollection($productCollection);
$filters = $filterList->getFilters($layer);


texts: How to display all product reviews on index page

texts: I want to display all approved products reviews programmatically on home page.