texts: Filter Last Orders Collection on Dashboard

texts:
I am developing multi-vendor site. on Order place I save seller ids of order in sales_order table like 1,2,3 mean in this order has 3 sellers items.

Now i filtered Last Orders collection in /vendor/magento/module-reports/Model/ResourceModel/Order/Collection.php::addItemCountExpr method  with addFeildToFilter
$currentloginsellerid=2;
$this->addFieldToFilter('current_seller_id',array('finset'=>$currentloginsellerid));

It filtered. But Total Column show total of this order . But i want to total of seller items. How can be possible this ?
Can anyone guide me here please ?


texts: Clear Magento Enterprise FPC for specific product

texts:
We want to clear the full page cache for a specific product - based on the ID of the product (or the URL if needs be). I have found this line:

Mage::app()->cleanCache('catalog_product_'.$this->getId());

In app/code/core/Mage/Catalog/Model/Product.php:

public function cleanCache()
{
    Mage::app()->cleanCache('catalog_product_'.$this->getId());
    return $this;
}

I tried using this like:

Mage::app()->cleanCache('catalog_product_1234');

But it doesn't work. How can we clear the FPC just for one specific product?


texts: having problem in shopping cart pricing rule magento

texts:
I have created shopping cart rules on my site. Let me explain in detail:

My first rule is "Buy product A with 3 e-liquids and get 15 off" having highest priority.
Second rule is "Buy product B with 1 e-liquids and get 10 off" having medium priority
Third rule is "Buy 3 e-liquids and get 5 off" having low priority.

Now my basket has "Product A+ Product B + 4 e-liquids"

In this condition, all 3 rules are applying. All rules fulfill their condition. But I don't want it like this.

What I want is, in this condition only the first rule should apply and it should work like this:

Rule 1 have high priority so it will be apply on product A.
Now remaining product in the basket are product B and 1 e-liquids.
So second rule will be apply on remaining basket ("product B and 1 e-liquids") but condition for 2nd rule is not fulfill.

So, Only rule 1 will apply.


texts:
I have a very strange problem.

I need to add some common script to my website, and I use Miscellaneous Scripts for that on

  system > configuration > design > html head

everything worked fine, but suddenly after one time I saved my changes, the section of Miscellaneous Scripts disappear, and I can't see it anymore.
the scripts still being included in the site.
Does anyone know anything about it?


texts: Magento 2-Override FinalPriceBox using Preference or Plugin class of Configurable Product module

texts:
Anyone has idea how to make preference or plugin on Magento\ConfigurableProduct\Pricing\Render\FinalPriceBox class of Magento\ConfigurableProduct.

Basically, new function i wanted to add in the FinalPriceBox class and to use new function in final_price.phtml file.

I see code in the di.xml of module-configurableproduct module. But do not know how to use in new custom module?

<type name="Magento\ConfigurableProduct\Pricing\Price\FinalPrice">
        <arguments>
            <argument name="priceResolver" xsi:type="object">ConfigurableFinalPriceResolver</argument>
        </arguments>
    </type>


texts: How to make a custom discount to work correctly

texts:
I am trying to build a extension which will give discount to a customer if he/she have like the facebook like button on the site, and i am not sure where and what should i do to accomplish this task.

I have prepared this checklist for this.
1) I will get user email from Facebook some how if they clicked the like button.
2) Then match this email against the logged in user if a match is found the customer is going to get discount.

Now from here what should i do give proper discount to that particular customer only, should i create a coupon pragmatically one per customer basis and apply that for current checkout or should i email this to customer for using their discount reward later on date.

Anybody having any idea on this ??


texts: Remove shipping costs from pdf invoice (Symmetrics InvoicePdf)

texts:
I've made a custom shipping calculation, but now I need to remove the Shipping Amount on the pdf invoice.
I'm using the Symmetrics Invoice Pdf, and I've tried to copy

app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php
to
app/code/local/Mage/Sales/Model/Order/Pdf/Abstract.php

and changed

 $totalShippingChargesText = "(" . Mage::helper('sales')->__('Total Shipping Charges') . " "
            . $order->formatPriceTxt($order->getShippingAmount()) . ")";

to

 $totalShippingChargesText = " ";

but it still shows the shipping costs on the invoice pdf.
I don't have a getShippingAmount in my invoice.php (app/code/local/Symmetrics/Invoicepdf/Model/Pdf/Invoice.php).

The module can be find here: https://github.com/symmetrics/mrg_invoicepdf

So where do I have to look?


texts: Magento 2 "Area code not set" warning in 3rd party module

texts:
I have a third party extension that i'm trying to install on a Magento 2 site i'm building. When i try and run setup:upgrade i get the error:

[Magento\Framework\Exception\SessionException] Area code not set: Area code must be set before starting a session.

and

[Magento\Framework\Exception\LocalizedException] Area code is not set

But here is the tricky part, the module is not using any customer CLI commands. So i'm not sure why it's kicking this error, since all the fixes Here and Here only apply to the setting up of a customer CLI command. I found one more mention Here where p3mbo found that he was using the Object Manager to call in a class. The module does use the OM in spades, but i'm not convinced that this is cause my error.

What other way's can this error be tripped and other places i could look to figure out what's happening?


texts: Magento 2.2.6 - Attribute with ID "Manufacturer" does not exist

texts:
I updated to Magento 2.2.6 via composer this morning however when running bin/magento setup:upgrade I get the following error:

Attribute with ID "Manufacturer" does not exist

This shows after the Upgrading data part for Magento_ConfigurableProduct within the setup upgrade command. Am wondering how to fix this and or if anyone else is experiencing it?

This seems to be caused by below code within UpgradeData.php for the Configurable Product module:

    if (version_compare($context->getVersion(), '2.2.1') < 0) {
        $relatedProductTypes = $this->getRelatedProductTypes('manufacturer', $eavSetup);
        if (!in_array(Configurable::TYPE_CODE, $relatedProductTypes)) {
            $relatedProductTypes[] = Configurable::TYPE_CODE;
            $this->updateRelatedProductTypes('manufacturer', $relatedProductTypes, $eavSetup);
        }
    }

I do not have a manufacturer attribute within this instance and I'm wondering if it has been deleted. Looking at other instances however this attribute is present but not a system attribute and can be deleted from admin so am wondering if this attribute is really needed and if not this should not really cause setup:upgrade to break?


texts:
I'm helping a friend w/ a Magento installation and have hit a couple of weird things happening.

First, the original issue was that when clicking on the category names for existing categories, no edit screen appears, instead it just shows the 'new root category' panel.

Then this. In clicking through a couple of categories in the admin panel, after about 5 clicks of this working, it got stuck on the loading screen. Now suddenly I can't load the admin panel or the front end website. I even tried a ping test and had 100% packet loss.

I rebooted, rebooted the router, tried different computers and nothing works - the site is still timing out.

I went to a different wifi network and now I could get in - for about the first 5 clicks looking at the original problem before it shut me out again.

I'm not familiar with Magento; I have no access to the actual server either in this case. Does Magento have some kind of feature that would block an IP? This whole thing seems fishy and I don't even know what to try next.


texts:
I would like to have multiple Magento installation for my company, because I want to put the installations on different server in the world, but I would like to ba able to login on all installations with the same login.
Do you know how I can share the Customer Informations between multiple Magento installation?
Thanks,


texts:
I have added this observer to my module and I put event definition in events.xml

# app/code/Vendor/ModuleName/etc/frontend/events.xml

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

I have added some logic in my observer

# app/code/Vendor/Name/Observer/OrderObserver.php
namespace Vendor\ModuleName\Observer;

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

class OrderObserver implements ObserverInterface
{

    public function __construct()
    {
    }

    /**
     * @param Observer $observer
     * @return void
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $quote = $observer->getQuote();
        ...
        ...
        ...
    }
}


texts: Customise price in product collection Magento 2

texts:
I am working on Magento 2 and having issue with price.
I want to customise the product price. I did it via plugin and it's working fine on product page and list page.
As we are using a plugin, it is not overriding the price in collection with custom price. Due to this price filter is also not working according to updated product price. As we are using price slider-Min - Max price is also not correct.
I have debugged a lot and here is my findings
Min-max price is calculating from product collection by using following methods.

$productCollection->getMinPrice();
$productCollection->getMaxPrice();

Product collections we are getting on product list page is not including the customised price. I think, if we set customised price to product collection then price thing will work fine.
Here is plugin which I am using to customise price.
1.etc/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Catalog\Pricing\Price\RegularPrice">
    <plugin name="product_price_change"
            type="Namespace\Modulename\Plugin\Updateprice"
            sortOrder="1"/>
</type>
</config>

2.Plugin/Updateprice.php
<?php
namespace Namespace\Modulename\Plugin;

class Updateprice
{
    public function afterGetValue(\Magento\Catalog\Pricing\Price\RegularPrice $subject, $result) {

        return $result + $myCustomPriceCharges;

    }
}

Any suggestion would be appreciated.
Thanks


texts: Programmatically searching within category

texts:
I've been battling with this issue for quite some time but have yet to find a good solution. I am trying to programmatically search products within a certain category. I do not want to build my own search functionality and want to use the standard Magento 'catalogsearch' module. My current code looks like

$catalogSearchModel = Mage::getModel('catalogsearch/query')->setQueryText(search query);
$catalogSearchModelCollection = $catalogSearchModel->getResultCollection();
$catalogSearchModelCollection->getSelect()->limit(limit1, limit2);
$data = $catalogSearchModelCollection->getData();

$filters = array();
foreach ($data as $key => $value) {
    $filters[] = array("attribute" => "entity_id", "eq" => $value["entity_id"]);
}

$productCollection->addAttributeToFilter($filters);

I use the product collection because I need more attributes for the products then there are available in the search model.

Is there a way to add a filter field to the catalog search collection, or something like that?


texts: layered navigation / left sidebar to be floating (sticky) when you scroll the products

texts:
I want to fix the layered navigation to be like a sticky header, as in when we scroll the products the filters remain as fixed and we can browse the products
like on pepperfry.com.


texts: How to display 4 products in a row on PLP

texts:
I have a situation where I need to display 4 products in a row on the product listing page whereas by default it's 5 in a row.

I know how to achieve this by overriding simple CSS but there is a condition I do not have the authority to override the existing CSS and so I don't really option as per the CSS is concerned so is there a way I can achieve through .phtml file by some minor customization.


texts: What is the best way integrate custom html with Magento 2

texts: I have got custom HTML for Home Page,Category page,Product Page,Cart Page,Checkout Page and Other needed pages for Magento 2. I want know what is the best practice for adding using custom html with Magento 2


texts: Update all quote items with qty 1 in magento2

texts:
I am trying to update all the quote item qty as soon as we navigated to the cart page.

by using below code.

$quote = $this->checkoutSession->getQuote();
$quoteItems = $quote->getAllVisibleItems();
                foreach($quoteItems as $item) {
                        $productSku = $item->getSku();
                        $item->setQty(1);
                        $item->save();
                }

The above code working fine if we run from the script for or from any of the controller file.

I am looking for code to implement in event and observers,

Is there any event for this, once navigated to cart page i need update qty for each item as 1.

Can anyone suggest which event is worth for it.

Thanks


texts: I have a multi store Magento 2 site and I need to change the ID of one of the stores.  Is there any easy way to do this?  I tried to run an update query on the store table but I get and error because of foreign key constraints.  It seems like there is about 150 references to the store table.  Any easy way to update the store id in the store table?


texts: Display Attribute in Edit Product Back end Magento

texts:
Please help me!. I have an attribute "manufacture". How can i display this attribute into General tab in Edit Product Page ?
Thank you.


texts: Remove Item By key Using with Own attribute

texts:
I am using the Function $collection->removeItemByKey($key);

As i know that the above function remove product one by one based on the key and that key is product id,

My Question is Can we remove the product using other attribute instead of product id.

I have custom attribute called product_creator_id, Can I use this custom Attribute to remove the product from collection as removeItemByKey works.

foreach ($collection->getItems() as $key => $_product) {
       //product
       //$collection->removeItemByKey($key);
       echo $key;
       print_r($_product->getName());
}


texts: how to deduce the name of product from sku when creating a product magento 2

texts:
I have disabled the auto generated SKU so SKU is independent from name but in advance I want a new functionality when adding the sku 10014100 for example i will do a request in some table to recuperate the 1 that mean family1 and the 00 that mean business name and 14 the code of thickness and 100 the code of custom attribute so finally i will set the name as below :

family1 businessname thickness custom attribute value before saving the product so how to generate the name of product from sku after doing some request in DB what should i override  to  achieve that and thanks in advance


texts: How to "override" default Magento2 "Luma" Theme with a Custom Theme

texts:
I created a custom Theme with "Luma" as its parent.

Now I want to override .less / css stylings. (for example "header" background color)
Thats the Folder structure I have:

I did copy "_module.less" from "vendor/magento/theme-frontend-blank/Magento_Theme/web/css/source" to "Magento_Theme/web/css/source/" in my custom theme folder and changed the "_module.less" file but It didnt override styles, so it didnt apply on my webshop.

I deleted the theme files in "/pub/static" and flushed magento cache, with no results.

Does anyone know how to override ".less" / css stylings of the default / luma theme? I want to customize the luma theme, thats why I created my custom theme and now Id like to change some css styles.

Thanks alot!


texts:
If you are upgrading from 2.2.8 to 2.3.3 would it be advisable to start a fresh eg

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition myproject

and copy over any customisations (design, composer installs etc)

or is it best to go through the normal upgrade process eg

echo "Deleting vendor..."
rm -rf vendor
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf var/generation/*

echo "Insert upgraded magento version"
composer require magento/product-community-edition 2.3.3 --no-update

echo "Installing new packages"
composer update


texts:
How can I change the product availability message based upon the day that the customer is viewing (or ordering) the product?

Day of order :                            Will ship in X # of days

Sunday      :                               2

Monday         :                            1

Tuesday (before 10am)         :             0

Tuesday (after 10am)          :             2

Wednesday                      :            1

Thursday (before 10am)          :           0

Thursday (after 10am)              :        5

Friday                         :            4

Saturday                             :      3


texts: Product are not displaying on Category page after Data Migration

texts:
main.CRITICAL: {
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [shape] in order to load field data by uninverting the inverted index. Note that this can use significant memory."
      }
    ],
    "type": "search_phase_execution_exception",
    "reason": "all shards


texts: Add order status while placing order from admin Magento 1

texts:
I want to add a custom dropdown for the order status in the create an order page from admin. Admin can choose the order status while placing the order.
Please see attached screenshot!!!

Or

Can i set the custom order status from admin order save controller?


texts: Uncaught Error: Syntax error, unrecognized expression: ui/template/modal/modal-popup.html magento 2.4.0

texts:
Uncaught Error: Syntax error, unrecognized expression: ui/template/modal/modal-popup.html 2.4.0

custom.js

popupTpl: "ui/template/modal/modal-popup.html",
jquery.js:1508 Uncaught Error: Syntax error, unrecognized expression: ui/template/modal/modal-popup.html
at Function.Sizzle.error (jquery.js:1508)
at Sizzle.tokenize (jquery.js:2165)
at Sizzle.select (jquery.js:2586)
at Function.Sizzle (jquery.js:909)
at Function.jQuery.find (jquery-migrate.js:290)
at jQuery.fn.init.find (jquery.js:2832)
at jQuery.fn.init.jQuery.fn.find (jquery-migrate.js:677)
at jQuery.fn.init (jquery.js:2955)
at new jQuery.fn.init (jquery-migrate.js:241)
at jQuery (jquery.js:80)

https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/widgets/widget_modal.html#modal_popupTpl


texts: Magento2 Getting cart content programatically outside of magento itself

texts:
I'm working on several cart displays and to do this i usually (in magento 1) make a small script outside of Magento load up the magento app and fetch a collection with the data.

In magento2 this became a lot harder.
I finally managed to get the cart contents inside of a sidebar phtml block with the following code:

$helper = $this->helper('\Magento\Checkout\Helper\Cart');
$quote = $helper->getQuote();
echo $quote->getId();
$quoteitems = $quote->getAllItems();
$cart= $helper->getCart();
echo $quote->getExtShippingInfo();

$subtotal = $quote->getBaseSubtotal();

foreach ($quoteitems as $item){
  // Code to get contents per product
  $item->getName();
  $item->getQty();
  number_format($item->getPrice(),2);
}

Pretty simple, but now i made a script outside of magento (just in a subfolder of the magento installation.

I made a folder scripts and added 2 files abstract.php and getCart.php

scripts/abstract.php looks likes this:

<?php
use \Magento\Framework\AppInterface as AppInterface;
use \Magento\Framework\App\Http as Http;

use Magento\Framework\ObjectManager\ConfigLoaderInterface;
use Magento\Framework\App\Request\Http as RequestHttp;
use Magento\Framework\App\Response\Http as ResponseHttp;
use Magento\Framework\Event;
use Magento\Framework\Filesystem;
use Magento\Framework\App\AreaList as AreaList;
use Magento\Framework\App\State as State;
use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Magento\Checkout\Helper\Cart as Cart;

abstract class AbstractApp implements AppInterface
{
    var $helper;

    public function __construct(
        \Magento\Framework\ObjectManagerInterface $objectManager,
        Event\Manager $eventManager,
        AreaList $areaList,
        RequestHttp $request,
        ResponseHttp $response,
        ConfigLoaderInterface $configLoader,
        Magento\Framework\App\State $state,
        Filesystem $filesystem,
        Cart $helper,
        \Magento\Framework\Registry $registry
    ) {
        $state->setAreaCode('frontend');
        $this->_objectManager = $objectManager;
        $this->_eventManager = $eventManager;
        $this->_areaList = $areaList;
        $this->_request = $request;
        $this->_response = $response;
        $this->_configLoader = $configLoader;
        $this->_state = $state;
        $this->_filesystem = $filesystem;
        $this->registry = $registry;
    }

    public function launch()
    {
        $this->run();
        return $this->_response;
    }

    abstract public function run();

    public function catchException(\Magento\Framework\App\Bootstrap $bootstrap, \Exception $exception)
    {
        return false;
    }
}

And getCart.php looks like:

<?php
require dirname(__FILE__) . '/../app/bootstrap.php';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
require dirname(__FILE__) . '/abstract.php';

class getCart extends AbstractApp
{

    public function run()
    {

            $cart= $helper->getCart();

    }
}

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

When i run this i get errors like

Area code not set: Area code must be set before starting a session.

I can not get this to work.
The reason i did not add that to the title since i am also open for other solutions.

Adding content like: $state->setAreaCode('frontend'); in the constructor did not seem to help at all.


texts: I Have Install this (SUPEE 11086 ) Patch in Magento 1.9.0.4 but Data.php is not working?

texts:
I have Install SUPEE 11086 Patch install successfully but not work Properly in backed side?

Thanks.


texts: Load custom block in category list page magento2

texts:
I am trying to add custom template file in category list page.

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

<referenceContainer name="content">
        <block class="Magento\Framework\View\Element\Template" name="custom.block" template="Magento_Catalog::product/myCustomFile.phtml" />
    </referenceContainer>

This is loading the template in list page.

But i need to load it from my custom module.

I used below code to implement it.

app/code/Vendor/Module/view/frontend/layout/module_index_index.xml

 <referenceContainer name="content">
    <block class="Magento\Framework\View\Element\Template" name="custom.block" template="Vendor_Module::product/myCustomFile.phtml" />
</referenceContainer>

This is not loading my template in category list page. After using layout update also.

Can anyone help me on this please


texts: How to delete website, store and storeviews other than from the admin panel (Magento 1.9)

texts:
I want to delete websites, stores and store views form a Magento 1.9 store. I tried it from the admin panel on a staging environment which is a clone of the live site. It didn't go very well. After loading for a while it served a 500 error. And it still is. See below.

Is there another (better?) way to do this instead of doing it from the admin panel since this approach is very risky (losing connection, timeouts, PHP time-limits etc).

I looked in Magerun but unfortunately, it doesn't have such an option.

AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in /home/kubusk/domains/qaz35-lthbnm6754.nl/staging/app/code/core/Mage/Core/Model/App.php on line 645 and defined in /home/kubusk/domains/qaz35-lthbnm6754.nl/staging/app/code/core/Mage/Core/Model/Store.php:453\nStack trace:\n#0 /home/kubusk/domains/qaz35-lthbnm6754.nl/staging/app/code/core/Mage/Core/Model/App.php(645): Mage_Core_Model_Store->setWebsite(NULL)\n#1 /home/kubusk/domains/qaz35-lthbnm6754.nl/staging/app/code/core/Mage/Core/Model/App.php(477): Mage_Core_Model_App->_initStores()\n#2 /home/kubusk/domains/qaz35-lthbnm6754.nl/staging/app/code/core/Mage/Core/Model/App.php(360): Mage_Core_Model_App->_initCurrentStore('', 'store')\n#3 /home/kubusk/domains/qaz35-lthbnm6754.nl/staging/app/Mage.php(683): Mage_Core_Model_App->run(Array)\n#4 /home/kubusk/domains/qaz35-lthbnm6754.nl/staging/index.php(83): Mage::run('', 'store')\n#5 {main}\n  th...\n'


texts:
I am trying to get URL of small_image.

Magento 2 offers a helper helper('Magento\Catalog\Helper\Image').

I used this code to load small_image

<?php echo $this->helper('Magento\Catalog\Helper\Image')->init($block->getProductForThumbnail(), 'small_image')
        ->setImageFile($block->getProductForThumbnail()->getImage())
        ->resize(165, 165)->getUrl(); ?>

But this code throws me this error.

 Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Catalog\Model\Product\Image::loadImageInfoFromCache() must be of the type string, null given, called in /Users/suman/the-webster/vendor/magento/module-catalog/Model/Product/Image.php on line 612 and defined in /Users/suman/the-webster/vendor/magento/module-catalog/Model/Product/Image.php on line 892

How to get small_image


texts: Already created custom.css containing also adjustments for home page only

texts:
Is it possible to include in the already created custom.css adjustments that apply for the home page?
It is about changing the style for H1 en H2 tags of the homepage. But i would not like that the H1 and H2 tags on other pages would be affected.

At the beginning i thought about creating a second custom.css and call it on the local.xml, but now i heard that i should try to make it on the already created custom.css (that has also adjustments for other pages of my webshop).

Any tips, suggestions, links?

Thanks for your collaborations.


texts: How to apply Acl to UI component Form in Magento 2?

texts:
I require applying Acl to particular content inside customer_form.XML fields, Inside this XML, have UI component form fields. So, How do it in Magento 2? I have given my XML below.

customer_form.xml

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
 <fieldset name="demo">
        <settings>
            Demo
        </settings>
        <field name="description" sortOrder="4" formElement="textarea">
            <settings>
                <dataType>string</dataType>
                Name
                <visible>true</visible>
                <dataScope>name</dataScope>
            </settings>
        </field>

        <field name="current-password" sortOrder="5" formElement="input">
            <settings>
                <dataType>string</dataType>
                Description
                <visible>true</visible>
            </settings>
        </field>
 </fieldset>
</form>


texts: Magento 1.9 addAttributeToFilter: compare as numbers instead of strings

texts:
I have created an own product-attribute "height" in magento-backend. The input type is "text" (because there was no similar type like "float"). To use this attribute as a filter I wrote a small extension. In this extension I filter the products with

$this->_productCollection->addAttributeToFilter('height', array('lteq' => $height) );

When a products height is 69cm (69.00) and the filter is "<=80cm" (lteq 80.00) the filter works fine. But it doesn't work when the filter is "<=100cm" (lteq 100.00). This is because magento created the height-attribute as varchar and so the function addAttributeToFilter makes a string-compare. In string-compare "69" is greater than "100" because "6" is greater than "1".

Is there a way to tell addAttributeToFilter that it should compare the values as numbers instead of strings?

(I know the best way would be to delete the attribute and create a new one with type "float" via extension. But the shop is nearly finished and already contains products so I would like to avoid making such "big" changes in this state.)


texts: How to create mobile version of Desktop site in magento

texts:
Basically I have a website http://stylanzo.com which is responsive but on mobile i want to change that view.....basically on mobile i want to url like this m.stylanzo.com.

I don't want to change in my current theme....is it possible to run my site according to device.. like if user open on mobile then it will show m.stylanzo.com and desktop stylanzo.com.

And also I want to do this on my current site without any new installation.
I hear about multiple store ..but don't know how to do this.


texts: Magento 2: Need to Upload Module Without Disturbing Live Site

texts:
My Magento 2 Website is already live. In local, i have developed module which contains JS/CSS/Email/etc... Need to upload on Live.

But LIVE website should not affect, as there are So many users visiting Site. Would not like to make site under Maintenance.

On LIVE Website it's already in Production Mode.

How to run below commands in a background?

  php bin/magento setup:upgrade
  php bin/magento module:enable MODULE_NAME
  php bin/magento cache:flush

Is there any solution for this? It always annoying that you have to upload Module & Ur JS/CSS Changes then u have to run 4-5 commands which will affect live running website.

We can't put so many time our LIVE website under Maintenance Mode or can't face Downtime of Website.


texts: white page when i click on system-configuration

texts:
I have added a new theme, but when i clik the system-configuration, showt a white page. with this error.
(Fatal error: Call to a member function toOptionArray() on a non-object in /public_html/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php on line 463)

Thanks in advance for help


texts: Receiving checkbox status as Yes or No on a custom form to an email template

texts:
I am new to php and html and trying my hands on the below code where I have a custom form as shown in below SS and once customer submits the form I need to get the checkbox status as 'Yes' if the checkbox is checked and 'No' if it's not checked to my email,

Code for this form is under a .phtml file as below-

<input type="checkbox" placeholder="I 'd like a free trial "name="all_sizes" id="all_sizes" value="All" checked >&nbsp; I'd like a free trial

code for email template is under .html file as per below-

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

Email: {{var email}}

Organistaion: {{var organisation}}

Contact Name: {{var contact}}

Quote For: {{var productname}}

Contact Number: {{var telephone}}

Message: {{var comment}}

Free trial: {{var all_sizes}}

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

Please let me know what changes do I have to make in both the files .phtml and .html to get the checkbox statuses as Yes or No. Thanks.


texts:
We have installed Magento CE 1.9.0.1 and i am playing around with product options to do what i want it to do.

Basically its the Grouped Product that i need but i don't want to show the individual products.

Example

"Product 1"
 - "Product 1 - Box1"
 - "Product 1 - Box2"

So, i want to be able to control the stock of "Box1" and "Box2" but have all other information/prices in the main product ("Product 1") but on the front end the customer doesn't need to see the 2x boxes that are being added to the order.

Does that make sense?

Does anyone know if i can do this out of the box or if they can recommend a plugin to do this?

Maybe a new Product Type would work?

Please advise.

Regard,
Martin


texts: Magento 2: Call to a member function getEntityType() on null

texts:
I'm trying to create a new Eav Entity after this instruction post.
Then i got this issue:

  Call to a member function getEntityType() on null

I'm still new with Eav Entity, so can some one help me to figure out what the problem is?

Here is my custom module after follow the instruction: this link

Thanks.


texts: Magento 2 get cached url full path of custom attribute

texts:
I have custom media attribute for hover hover_image I would like from list.phtml to get this full path url to cached file.

e.g small_image image in list.phtml is:
http://magento2/media/catalog/product/cache/e616f7b3fa3ef730e13c0a1681a4995e/b/l/test.jpg

I need hover_image e.g:

http://magento2/media/catalog/product/cache/e616f7b3fa3ef730e13c0a1681a4995e/firt-letter/second-letter/hover_image.jpg

How can I do that? thanks.


texts: Way the Append Complex Data keeps adding (duplicate) the pictures every time I do the import. Can this been change? All other data (attributes) are not duplicated, just the images.


texts:
In our PDF we display the date of the order with this line:

<?php echo $this->getPdfHelper()->getDate()?>

public function _getDate($format = 'd-F-Y-H:i')
{
    return date($format, Mage::app()->getLocale()->storeTimeStamp());
}

Currently it is displayed as 2 Jan. 2015.

But we want to change this into Friday 2 January 2015.

What code do we need for this?


texts: Magento 2 : Change Order Status From Pending to Pending Payment

texts:
I want to change default order status from Pending to Pending Payment after customer place an order.

I have assign Pending Payment order status to Pending, and check Use Order Status As Default and Visible On Storefront.

But it's not working.


texts: Magento Call Event And Observer Only for My Custom Controller

texts:
I am Find A Solution to call event when my controller is run. I found solution but is working on every controller run

<global>
   <events>
    <controller_action_predispatch>
     <observers>
            <controller_action_before>
                <class>Mycustom_Custom_Model_Observer</class>
                <method>myFunction</method>
            </controller_action_before>
        </observers>
     </controller_action_predispatch>
   </events>
</global>

I need to run myFunction when my Module Controller is run


texts: Magento 2: Currency rates import not wokring

texts:
I have setup muticurrency store, with a base currency USD. When i try to import currency through Yahoo Finance Exchange, Fixer.io or Webservicex then it does not import all currency rates. They miss most of the currencies.

Now I need to change the base currency. After changing base currency other USD then Yahoo Finance Exchange, Fixer.io and Webservicex do not import ANY rate.

Whats wrong with it? I want to import rates with base currency other than USD.


texts: Filter a custom attribute in Sales Order Grid

texts:
Following this answer: How to join order grid collection to custom table in Magento2? I'm able to join the order custom attribute and show it in the column, the error comes with the filter when applied:

INNER JOIN mgnt_sales_order AS so ON main_table.entity_id = so.entity_id WHERE (custom_attribute LIKE '%testing the filter%')
Integrity constraint violation: 1052 Column 'custom_attribute' in where clause is ambiguous

This is because the field is actually in the sales_order table and not sales_order_grid
view/adminhtml/ui_component/sales_order_grid.xml
<columns name="sales_order_columns">
    <column name="custom_attribute">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="visible" xsi:type="boolean">true</item>
                <item name="filter" xsi:type="string">text</item>
                <item name="label" xsi:type="string" translate="true">Custom Attribute</item>
            </item>
        </argument>
    </column>
</columns>

Plugins/AddColumnsSalesOrderGridCollection.php
<?php namespace Vendor\Module\Plugins;

use Magento\Framework\Message\ManagerInterface as MessageManager;
use Magento\Sales\Model\ResourceModel\Order\Grid\Collection as SalesOrderGridCollection;

class AddColumnsSalesOrderGridCollection
{
    private $messageManager;
    private $collection;

    public function __construct(MessageManager $messageManager,
        SalesOrderGridCollection $collection
    ) {

        $this->messageManager = $messageManager;
        $this->collection = $collection;
    }

    public function aroundGetReport(
        \Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory $subject,
        \Closure $proceed,
        $requestName
    ) {
        $result = $proceed($requestName);

        $tableSalesOrder = $this->collection->getResource()->getTable('sales_order');

        if ($requestName == 'sales_order_grid_data_source') {
            if ($result instanceof $this->collection)
            {
                $select = $this->collection->getSelect();

                $select->join(
                    ["so" => $tableSalesOrder],
                    'main_table.entity_id = so.entity_id',
                    array('so.custom_attribute')
                )
                    ->distinct();
            }

        }
        return $this->collection;
    }
}

Goal: Filter the orders grid by a custom attribute of the order.
Unfortunally the solution with the plugin above creates other problems in the order view.. that's why I'm looking for other solutions


texts: Magento 1.9: How to get a list of manufactory in the current category?

texts:
Magento version: 1.9

When user open a category page and list the product of this category, I want to display a list of manufactory on the product list top not in each product.
There are many manufactory, if the product of current category are not belong to some manufactory that should not be in the manufactory list.
How to get them?


texts:
I have created a theme in which i have extended luma theme. Now in my new theme I want to add some custom css to overwrite some default css classes for that I added _extend.less inside

  test/luma/web/css/source.

Inside _extend.less i added some classes like

.logo {  display:none; }

I haven't added styles-l.less and styles-m.less inside my theme and default_head_block.xml.

Now when I run commands

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f

and then after cleaning cache

php bin/magento cache:clean

my rules are not implemented and default css breaking too.

Please suggest me the solution..


texts:
I want to show a popup window as soon as user logged into store.
I want to show that popup only for some customer (like premium).


texts: Magento customer left join not returning all column from customer table

texts:
I wrote the join query with customer table, its only returning both table matched values only,instead of returning all the left table rows.

The Query:

$collection = Mage::getModel('customer/customer')->getCollection();
$collection->getSelect()->joinLeft(array('review'=>'flrating'),'e.entity_id = review.reviewed_user_id',array('total_review'=>'COUNT(review.reviewed_user_id)'));

$collection->getSelect()->group('review.reviewed_user_id');
$collection->getSelect()->order("AVG(review.avg_rating) ASC");

Can you suggest me how to return the non-matching left table(customer) rows?

My expected result is

I am getting


texts:
we are experiencing an issue while trying to update our indexer modes.

$ php bin/magento indexer:set-mode schedule catalog_product_attribute Product EAV indexer process unknown error: Table catalog_product_attribute_cl already exist

$ php bin/magento indexer:set-mode schedule catalog_product_flat catalog_category_flat catalog_category_product catalog_product_category
Product Flat Data indexer process unknown error:

Table catalog_product_flat_cl already exist

Category Flat Data indexer process unknown error:

SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable), query was: DROP TRIGGER IF EXISTS `trg_catalog_category_entity_after_insert`

Category Products indexer process unknown error:

Table catalog_category_product_cl already exist

Product Categories indexer process unknown error:

Table catalog_product_category_cl already exist

This is our indexes settings:

$ php bin/magento indexer:show-mode
Customer Grid:                                     Update by Schedule
Product Flat Data&colon;                                 Update on Save
Category Flat Data&colon;                                Update on Save
Category Products:                                 Update on Save
Product Categories:                                Update on Save
Product Price:                                     Update on Save
Product EAV:                                       Update on Save
Stock:                                             Update on Save
Catalog Search:                                    Update on Save
Catalog Rule Product:                              Update on Save
Catalog Product Rule:                              Update on Save

Could you help, please?


texts: How hard could be to export data from Magento 1?

texts:
Is there some use case example to export main data out from Magento version 1.9.x:

users + personal account related data
product catalog
orders

Having them exported in a understandable standard format to possibly import them back to any SQL like DB

Not strictly necessary to have an automatic tool but at leas the SQL queries to be performed
to select the above without loosing related data to user/products/orders

Is it something feasible without getting crazy?

I've seen this post:
Magento ER diagram of 1.9.x

Giving a full ER diagram of the data in Magento 1.
I'm wondering if there's around already some query or tools that starting from this knowledge performs an export like describe above


texts: Auto fill the create account fields for guest, after the order has been placed

texts:
I am using Magento 2.2.6 and the option where Guest can check out and place the order is enabled, the guest gets an option on the order success page to create an account and while the option is clicked the First Name, Last Name and Email Address fields are auto-filled with the information provided at checkout.
I would like to know how this data is populated and as I have Address Information and Additional Information sections in the create account page how can they be auto-filled from the information which was provided during the checkout.


texts: Magento 2: How to get all products from category?

texts:
I want to give one link to browse the root category.
root category should load all products and with out tool bar.i found some articles for m1.
any one have idea?


texts: How do I add a static block to 1column, 2columns and 3 columns all pages?

texts:
I created a static block that I want to add in all of the 1,2,3columns pages from pages. Where should I include this xml code?

   <reference name="content">
                <block type="cms/block" name="home_banner" before="-">
                    <action method="setBlockId"><block_id>top_banner</block_id></action>
                </block>
   </reference>

This block should be editable from admin panel so I cannot use : getChildHtml function.

UPDATE. If I use this code in the 1,2,3 column phtml files

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('header_robey_banner')->toHtml(); ?>

it works. BUt can it be done by using just xml ?


texts: Magento 2, Unable to save products (Catalog rule indexing failed. See details in exception log.)

texts:
I receive the error "Catalog rule indexing failed. See details in exception log." when I try to save a product, and get the error below in the exception log.

  [2018-08-26 05:09:05] main.CRITICAL: SQLSTATE[42S02]: Base table or
  view not found: 1932 Table 'magento.catalogrule_group_website_replica'
  doesn't exist in engine, query was: DELETE FROM
  catalogrule_group_website_replica {"exception":"[object]
  (Zend_Db_Statement_Exception(code: 42): SQLSTATE[42S02]: Base table or
  view not found: 1932 Table 'magento.catalogrule_group_website_replica'
  doesn't exist in engine, query was: DELETE FROM
  catalogrule_group_website_replica at
  /public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235,
  PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not
  found: 1932 Table 'magento.catalogrule_group_website_replica' doesn't
  exist in engine at
  /public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"}
  [] [2018-08-26 05:09:05] main.CRITICAL: Catalog rule indexing failed.
  See details in exception log. {"exception":"[object]
  (Magento\Framework\Exception\LocalizedException(code: 0): Catalog
  rule indexing failed. See details in exception log. at
  /public_html/vendor/magento/module-catalog-rule/Model/Indexer/IndexBuilder.php:286)"}
  []


texts: i want create a size chart image popup with cancel(X) button on my product page in magento 1.7?

texts:
Currently it's opening in separate tab as an image file when i click on size chart on product page.

SIZE CHART


texts: How to override or how to edit core files in magento 2.2[basically i need to one more column in My Account->My orders)

texts:
Please suggest me how to edit core files in magento 2.2
I need add a one more column in My Account->My orders section [Customers order details].


texts: How to override Magento 2 framework file?

texts:
I try to override this file :

vendor/magento/framework/View/Element/Html/Link/Current.php

I create a module.xml, registration.php and di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
     <preference for="Magento\Framework\View\Element\Html\Link\Current" type="MyNamespace\MagentoFramework\Model\Framework\View\Element\Html\Link\Current" />
</config>

My override class :

namespace MyNamespace\MagentoFramework\Model\Framework\View\Element\Html\Link;

    class Current extends \Magento\Framework\View\Element\Html\Link\Current
    {
        /**
         * Get href URL
         *
         * @return string
         */
        public function getHref()
        {
            return $this->getUrl($this->getPath());
        }
    }

The module is enable but this file doesn't override the original.

Do you have any suggestions ?
Thanks !


texts: Update All Child Product Descriptions from Parent Product with Shell Script

texts:
Currently our store's configurable products have the short & long descriptions contained within the parent product. The child product description fields are blank. We're setting up a Google Shopping campaign, and need those descriptions copied from the parent product to the child.

I'm attempting this by using a PHP shell script. I've adapted the script I found here. My version is:

<?php
require_once '../app/Mage.php';

Mage::app();
$products = Mage::getModel('catalog/product')->getCollection()
    ->addAttributeToFilter('type_id', Mage_Catalog_Model_Product_Type::TYPE_SIMPLE)
    ->addAttributeToFilter('short_description','')
$products->load();

foreach($products as $product) {
    $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId());
    foreach($parentIds as $parentId) {
        $parent = Mage::getModel('catalog/product')->load($parentId);
        $product->setShortDescription($parent->getShortDescription());
        $product->save();
        continue;
    }
}

When I run this, I get a php parse error on line 8 $products->load();

Am I on the right track here?
Why am I getting that parse error?

edit: I don't necessarily have to use a shell script either. If there's a better way I'm missing, please share.


texts: Unable to get not visible products after applying category filter magento2

texts:
I am trying to get Child products from collection after applying category filter but unable to get all products (want to get all products including Not Visible Individually  products
            $category = $this->categoryFactory->create()->load($value);
            $collection->addCategoryFilter($category);
            $ids = $collection->getAllIds();

Now in $ids i get only parent products i need all products parent and there child at same time.
Child and parent products all are enabled but can't access child


texts:
I use magmi for importing images from a remote url.
The images are downloaded and placed in media/catalog/products/subfolders but none of the products have images on either front or backend.

I have tried both the "image" and "media_gallery" fields with no results.

Magmi is placed in /var/www/domain/public_html/magmifolder

My settings are like this:

CSV example:

itemid;name;quantity;price;Weight;Images
45214;"Banana";351;2;1;http://domain.com/images/image1.jpg,http://domain.com/images/image2.jpg,http://domain.com/images/image3.jpg


texts: Magento Website Crawl Issue - A description for this result is not available because of this site's robots.txt

texts:
I am working on this site and some how (I don't know why) Google stopped crawling the home page URL (http://www.indusuno.com/)

When I search for the site in Google, it shows "A description for this result is not available because of this site's robots.txt Learn more".

I'm attaching the screenshot.

And also index.php is coming in search result URLs. Earlier we have blocked index.php from robots.txt, but now allow this.

Current contents of indusunocom/robots.txt:

User-agent: *
Disallow: /checkout/
Disallow: /app/
Disallow: /lib/
Disallow: /pkginfo/
Disallow: /report/
Disallow: /var/
Disallow: /customer/
Disallow: /sendfriend/
Disallow: /review/
Disallow: /*SID=
Disallow: /catalogsearch/

Sitemap: https://www.indusuno.com/sitemap.xml


texts: How can I insert my custom checkout step form data when place order in quote table and in sales_order table in magento 2?

texts:
I create custom checkout step with my custom form in that I need to submit three extra field in quote table and sales order table.
So, how can I submit this form data in that table when order place.

I also create install script for new field in data table
how can insert that value when order place.


texts: Magento 2 - How do I programmatically remove payment method?

texts:
I've followed the guide on the selected answer here:
Payment method only admin Magento 2?

But still no luck.

What I want is to be able to show the Cash On Delivery method only to certain customers. The guide above does not remove the payment method.

Thanks all!


texts: Want to like getCustomAttributes() to my own table

texts:
I have created an admin page with a specialised ui component, which renders my custom table "galleries", which has several field "gallery_id", "colour", "background colour" etc.

When loading the table, magento correctly returns the number of rows of my data, but none of the actual values are returned because it is looking for the values in "getCustomAttributes()", not in the table which I have created.

So I get the following error:
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\magento\vendor\magento\framework\View\Element\UiComponent\DataProvider\DataProvider.php on line 252

The line throwing the error is

foreach ($item->getCustomAttributes() as $attribute)

because, while $item exists, and $searchResult->getTotalCount() returns the correct total, my items have no custom attributes.

I would like to know, if possible, how I can "link" my custom table "GALLERIES" to the custom attributes tables, which I believe are catalog_product_entity_varchar, catalog_product_entity_int etc, in order to display my values.

This is the code block in which the error is thrown, in magento\framework\View\Element\UiComponent\DataProvider\DataProvider.php

/**
 * @param SearchResultInterface $searchResult
 * @return array
 */
protected function searchResultToOutput(SearchResultInterface $searchResult)
{
    $arrItems = [];

    $arrItems['items'] = [];
    foreach ($searchResult->getItems() as $item) {
        $itemData = [];
        /* THROWS ERROR foreach ($item->getCustomAttributes() as $attribute) {
            $itemData[$attribute->getAttributeCode()] = $attribute->getValue();
        } */
        $arrItems['items'][] = $itemData;
    }

    $arrItems['totalRecords'] = $searchResult->getTotalCount();
    return $arrItems;

}


texts: How to test or style the order success page?

texts:
If I reload the checkout/onepage/success page, I am directed to the cart.

So, when debugging or styling the order success page, I always have to make a new order.

How can I do this more efficiently?


texts: Magento 2 : get custom attribute value display blank

texts:
In Magento2 , I need to get eav attribute value in category data. I used this below code. But, it's not working.

/** \Magento\Catalog\Model\CategoryFactory $categoryFactory**/
$category = $this->categoryFactory->create()->load(12); //12 is category id
$category->getData('attribute-code');

This attribute code value available in catalog_category_entity_varchar table.

M1 Array :

Array
(
    [entity_id] => 12
    [entity_type_id] => 3
    [attribute_set_id] => 3
    [parent_id] => 3
    [created_at] => 2014-04-29T00:25:55+02:00
    [updated_at] => 2017-09-20 11:40:47
    [path] => 1/2/3/12
    [position] => 2
    [level] => 3
    [children_count] => 0
    [request_path] => requestpath
    [is_active] => 1
    [name] => name
    [url_key] => url_key
    [is_anchor] => 0
    [meta_title] =>
    [display_mode] => PRODUCTS
    [custom_design] =>
    [page_layout] => one_column
    [url_path] => url
    [style] =>
    [faq_list_position] => 1
    [include_in_menu] => 1
    [landing_page] =>
    [custom_use_parent_settings] => 0
    [custom_apply_to_products] => 0
    [description] =>
    [meta_keywords] => meta
    [meta_description] => meta1
    [custom_layout_update] =>
    [available_sort_by] => Array
        (
            [0] => position
        )

    [custom_design_from] =>
    [custom_design_to] =>
    [filter_price_range] =>
)

M2 Array :

Array
(
    [entity_id] => 12
    [attribute_set_id] => 46
    [parent_id] => 3
    [created_at] => 2014-04-28 22:25:55
    [updated_at] => 2019-04-05 10:23:19
    [path] => 1/2/3/12
    [position] => 2
    [level] => 3
    [children_count] => 0
    [name] => name
    [url_key] => urlkey
    [image] =>
    [meta_title] => title
    [display_mode] => PRODUCTS
    [url_path] => urlpath
    [custom_design] =>
    [page_layout] => 1column
    [is_active] => 1
    [include_in_menu] => 1
    [landing_page] =>
    [is_anchor] => 0
    [custom_use_parent_settings] => 0
    [custom_apply_to_products] => 0
    [description] =>
    [meta_keywords] => meta
    [meta_description] => meta1
    [custom_layout_update] =>
    [available_sort_by] => Array
        (
            [0] => position
        )

    [custom_design_from] =>
    [custom_design_to] =>
)

How i get value ?

Please help me.

Thanks.


texts:
I tried a few iterations and for whatever reason I can't add cookies or even execute any code from my observer, as it's not giving anything even if my observer has dies in it. I have my module visible on the list and enabled, there are no exceptions in the exception.log.

This is my xml file where observer define

  app/code/local/MyProject/Cookie123/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <MyProject_Cookie123>
            <version>1.0.0</version>
        </MyProject_Cookie123>
    </modules>
    <global>
        <models>
            <Cookie123>
                <class>MyProject_Cookie123_Model</class>
            </Cookie123>
        </models>
        <events>
            <customer_login>
                <observers>
                    <MyProject_Cookie123>
                        <type>model</type>
                        <class>MyProject_Cookie123_Model_Observer</class>
                        <method>customerLogin</method>
                    </MyProject_Cookie123>
                </observers>
            </customer_login>
            <customer_logout>
                <observers>
                    <MyProject_Cookie123>
                        <type>model</type>
                        <class>MyProject_Cookie123_Model_Observer</class>
                        <method>customerLogout</method>
                    </MyProject_Cookie123>
                </observers>
            </customer_logout>
            <controller_front_send_response_before>
                <observers>
                    <MyProject_Cookie123>
                        <type>model</type>
                        <class>MyProject_Cookie123_Model_Observer</class>
                        <method>sendResponse</method>
                    </MyProject_Cookie123>
                </observers>
            </controller_front_send_response_before>
        </events>
    </global>
</config>

This is my Observer file:-

  app/code/local/MyProject/Cookie123/Model/Observer.php

<?php

class MyProject_Cookie123_Model_Observer
{

    public function customerLogin($observer)
    {
        Mage::getModel('core/cookie')->set('testing_auth', 1);
    }

    public function customerLogout($observer)
    {
        Mage::getModel('core/cookie')->delete('testing_auth');
    }

    public function sendResponse($observer)
    {
        Mage::getModel('core/cookie')->set('test_123', 1);

        $cartItems = Mage::helper('checkout/cart')->getItemsQty();
        if ($cartItems > 0) {
            Mage::getModel('core/cookie')->set('testing_cart', 1);
        } else {
            if (Mage::getModel('core/cookie')->get('testing_cart')) {
                Mage::getModel('core/cookie')->delete('testing_cart');
            }
        }
    }

}


texts: Magento 2 I am trying to upload CSV file for the configurable products. getting error like attribute code does not exists

texts:
I am trying to upload this CSV file for the configurable products.

Unfortunately, the error I'm facing is

  Column configurable_variations: Attribute with code "rom" does not exist or is missing from product attribute set

I've assigned to attribute code to attribute set.
However, when I checked my additional_attributes and configurable_variations attributes, it seems like I got all of the definition of the attribute there already.

Please have a look into the file and helps me with the answer. Much appreciate it.

https://docs.google.com/spreadsheets/d/16TmSdzGJD-BCQGTbI3i2GVkjAtAq6wKEXmk5JnncTy8/edit?usp=sharing


texts: How to configure Cron job in magento 2 to enable extensions through component manager?

texts:
Hello i have uploaded an extension through cpanel and now want to enable it, so whenever i enable it through component manager and start readiness check i get error msg - Error from Setup Application Cron Script:
Cron job has not been configured yet.
So now i have to add a new cron job so plz give me the command to enable module.I will add cron job through Cpanel. or let me know if there is any other way to enable extensions(have added extension through cpanel and cleared the cached but extensions can't be enabled)
"I am new to magento 2". Thanks!


texts: Possible to remove "Shipping Method" from Shopping Cart?

texts:
Is it possible to remove "Shipping Method" programmatically from Shopping Cart (Magento V 1.9)

If I disable it from Admin, it does NOT allow completion of Shopping Page Checkout.

Error Message: Your Order cannot be completed at this time as there is no Shipping Methods available.  PLs make necessary changes in your address.


texts: Changes on backend does not reflect to store

texts:
I am running Magento 2.3.2.

For about two weeks now in several parts of Magento when our team makes changes via backend it does not reflect on the website. Testing multiple stuff we found out that sometimes we have to change to store 1 view and apply the change, then it works.

Things I have to make clear to help to find a solution:

We do not run multiple stores yet, but Magento is set up for multiple stores;
Our "super technical team" (lol) makes lots of changes via Magmi (direct database) and backend and mistakes are constantly done.

I believe that some change has been done without telling me and I have to set back a relation that was broken, but I don´t know-how. Help :)

Thanks !!!

Gustavo Ulysses


texts: How Do I Extract Simple Product Positions Associated with Grouped Products?

texts:
I am soon going to be migrating to a fresh install of Magento CE 1.9 and we currently have tons of grouped products with many simple products associated with them.

I need to be able to retain the simple products position on the grouped products' page.

I have searched the database for the associated products position value, but I am not having any luck.  I also am not having luck reading the code for the catalog/product model.

I'm using CE 1.6.2.0 if that helps


texts: Category products only properly reindex when save product in admin

texts:
I've been importing products into Magento using magmi. Some products, about 200 out of 1500, are not being indexed properly. I have a root category called Tires which is anchor and then sub-categories that are anchors that contain products.

Some, not all, of the products are not being associated with the root Tires category after I run the reindexer. They only get associated after I go into the admin and save the product.

I've compared products that work and products that don't and can't find any difference.

Has anyone run into this problem before?


texts: Set magento 2 layered navigation by clicking a custom button/link

texts:
I am working on a Magento 2.1.9 website. I have created an attribute which is being used in layered navigation as well. So what I want is that when I click on a button on home page, this attribute should get selected automatically to a value.

For example : name of this attribute is Company and values are - google, stack-overflow, apple etc. so when I click on a button/link called "google" from homepage, then this attribute "company" should choose an option "google" in layered navigation.


texts: Add content to media.phtml without modifying the code

texts:
I have added custom code to media.phtml. media.phtml shows the product image.

The product images get cached and therefore my custom code is getting cached also and I do not want it to be.

What I want to know is, how do I add my code to the file without editing media.phtml?

I'm guessing XML but how?


texts:
I have seen a similar question but no answer, so trying again. (Select Fabric First Then Color?)

In our shop, we have a product in different colors (bright and dark) with their own SKU. I have setup 1 bundle product with a bright board and 3 bright hangers, so far so good, but I would actually like the customers to be able to choose bright or dark in the beginning.
http://roonrahn.dev.magepartner.net/produkter/moodboard-funktionelle-mobler/moodboard-1x6-eg-kit

If they choose bright board, they should only be shown bright hangers, and if they choose dark board, they should only be shown dark hangers... makes sense?

I hope you can help me find a solution on this :)


texts: How to create custom modal ui form component with multiple fieldset and field

texts:
i have layout handle like frontname_index_index

<referenceContainer name="content">
   <container name="button.actions.container" label="Container">
     all button action here .. such as save, back reset
   </container>
   <container name="form" label="Form"><!-- this modal form -->
    <block class="Namespace\Module\Block\Adminhtml\FormWrap\Form" >
       <uiComponent name="ui_form"/>
     </block>
   </container>
</referenceContainer>

Possible to use ui modifiers to add dynamic button to specific spot? When i pressed button it will open modal ui_form ability save , edit like normal form


texts: Magento Get Different options to select from Options.php

texts:
I have a admin back-end options section/module to control few things like upload slider images, site background, banners etc. That is simple cause it just requires xml code in system.xml. I want to add different drop-downs, radio buttons, multiple select. I have the following code in Options.php Its giving me options to select one, two or three for every drop-down, radio or multi select. What I have to define here to get different options? not just one, two and Three.

    <?php
    class Options_CustomConfig_Model_Options
    {
      /**
       * Provide available options as a value/label array
       *
       * @return array
       */
      public function toOptionArray()
      {
        return array(
          array('value'=>1, 'label'=>'One'),
          array('value'=>2, 'label'=>'Two'),
          array('value'=>3, 'label'=>'Three')
        );
      }
    }


texts: Magento 2 - Buy X Get Y Free isn't working

texts:
Is anyone know anything about this functionality? I'm trying to set up the functionality with the following guide:
magento docs
It isn't working...


texts: Magento 2 How to apply filters for layered navigation Using REST API

texts: I want to apply filters for layered navigation using REST API. If I send color=5 then in category page it is displaying 2 products so how to get that data in API response?


texts: Display Drop down options for Values saved in Backend

texts:
We created custom module and we saved list of product Brands & Models in backend. In below image, Apple, sony, samsung are brands & iphone4, iphone4s...etc are models.

Brands

Models

We want to create dropdown options for both Brands & Models in frontend. Once we select particular brand from 1st drop-down box, then only associated models should display in 2nd Drop-down box.

Company/Brand/Block/Frontend/View.php

class Company_Brand_Block_Frontend_View extends Mage_Catalog_Block_Product_Abstract
{
     protected function _prepareLayout()
    {
        $this->getLayout()->createBlock('catalog/breadcrumbs');
        $headBlock = $this->getLayout()->getBlock('head');
        if ($headBlock) {
            $product = $this->getProduct();
                $title = $product->getMetaTitle();
            if ($title) {
                $headBlock->setTitle($title);
            }
            $keyword = $product->getMetaKeyword();
            $currentCategory = Mage::registry('current_category');
            if ($keyword) {
                $headBlock->setKeywords($keyword);
            } elseif ($currentCategory) {
                $headBlock->setKeywords($product->getName());
            }
            $description = $product->getMetaDescription();
            if ($description) {
                $headBlock->setDescription( ($description) );
            } else {
                $headBlock->setDescription(Mage::helper('core/string')->substr($product->getDescription(), 0, 255));
            }
            if ($this->helper('catalog/product')->canUseCanonicalTag()) {
                $params = array('_ignore_category' => true);
                $headBlock->addLinkRel('canonical', $product->getUrlModel()->getUrl($product, $params));
            }
        }

        return parent::_prepareLayout();
    }
    public function getProduct()
    {
        $collection = Mage::getModel('catalog/category')->load(310)
            ->getProductCollection()
            ->addAttributeToSelect('*')
            ->addAttributeToFilter('custom_phone_case', 1);

            $products=$collection->getFirstItem();

            $product =  Mage::getModel('catalog/product')->load($products->getId());
            $p=Mage::registry('product');
        if ($p=='') {Mage::register('product', $product);}
            return  $product;
        }

I will give 50 bounty if it works for me.


texts:
We would like to update the following fields of a product via the M2 API

Product description
Meta title
Meta description

Which API would we use?


texts:
What is the difference between Magento CE 2.1.4 and 2.1.5?

Which bugs are solved in Magento CE2.1.5?

What are the differences with previous Magento CE?


texts:
http://websitename.com/pub/static/frontend/organica/organica_default/en_US/css/style.css

I want to change in to this folder.
I have no idea where to make css changes

/app/design/frontend/organica/organica_default/web/css

can i create a style.css in above location and remove style.css from pub and then run deploy ?

UPDATE :
I changed in style.less file in

 /app/design/frontend/organica/organica_default/web/css  and then deploy , every things work.

so my problem is solved but

I have a doubt that is it necessary to make changes in style.less file. can't i create a style.css and make changes in them.


texts: Magento : Fatal error: Class 'Mage_Giftcards_Helper_Data' not found in …/app/Mage.php on line 546

texts:
I have installed one module extension which throws an fatal error

  "Fatal error: Class 'Mage_Giftcards_Helper_Data' not found in ..../app/Mage.php on line 546" in admin.

I have reffered this link https://stackoverflow.com/a/9191286/2919940 and this link as well https://magento.stackexchange.com/a/7133/3693

But I have

<global>
<helpers>
        <giftcards>
            <class>Webtex_Giftcards_Helper</class>
        </giftcards>
    </helpers>
</global>

in my config.xml and I have this class

class Webtex_Giftcards_Helper_Data extends Mage_Core_Helper_Data{
// my methods
}

declared at /app/code/local/Webtex/Giftcards/Helper/Data.php path.

I have disabled compiler and cleared cache by making empty var/cache directory.

I found everwhere that config.xml should have helper class define and Data.php should have declare that helper class.

But I have both of them in my case, what can be reason for this error ? I have tested that module on my fresh magento installation as well,

Magento version is 1.7.0.2

Please provide help for this error ?? If there's conflicts of class names how can we debug that ??

Thanks


texts: importing Magento database from wamp to a live server from

texts: I am trying to import my magento database to a live server from my wamp. I get the error as seen in the snapshot


texts: Onepage checkout button is not working | magento 1.9 onepage checkout page

texts:
I have magento 1.9.3 and onepage is already installed with my theme. Place Order button which is the final button to submit an order is not working.

It is not disabled and in browsers it is not showing any kind of error as well

The form was working before but suddenly noticed that checkout button not working, no error is showing

can you help me to find the error please


texts: I have a grid in my module that shows a few columns, one is "price". But it shows the price like this "00.0000", how can I make it show "00,00"? I don't believe I need to post any part of my code for this, do I? If so, tell me what.


texts: How can I go to the last visited page in magento?

texts:
I have a link called "BACK TO.." which will redirect to the previous page.I have used something like the following..

    <a href="<?php echo Mage::getSingleton('core/session')->getLastUrl();?>">Back to ...

But it is not working..It redirects to 404 not found page.


texts: The product's required option(s) weren't entered. Make sure the options are entered and try again

texts:
I am getting the standard error when the product requires options to be selected before adding to the quote/cart. However, it seems the error is displaying multiple times to match the number of options there are. See screenshot below.
Any advice would be greatly appreciated.


texts: Error unauthorized: authentication required while installing the Devbox in docker

texts:
I am trying to install magento DevBox in docker, I followed all of the instructions and prerequisites, after configuring and downloading the package, i checked the MAGENTO_PUBLIC_KEY and MAGENTO_PRIVATE_KEY in the docker-compose.yml and they all right,
when I start the installation process via CLI it continue downloading till around 24% and then it produce the following error message:

ERROR: unauthorized: authentication required
ERROR: No container found for web_1
Install Magento
ERROR: No container found for web_1
Press any key to continue . . .

Appreciate you kind advice,

Thank you in advance


texts: Magento 2 Creating table setting in admin with custom dropdowns

texts:
I'm using following code to show table setting in adminhtml

<?php
namespace Company\Modulename\Block\Adminhtml\Form\Field;

class Test extends \Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray
{
    /**
     * @var \Magento\Framework\Data\Form\Element\Factory
     */
    protected $_elementFactory;

    /**
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Magento\Framework\Data\Form\Element\Factory $elementFactory
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\Data\Form\Element\Factory $elementFactory,
        array $data = []
    )
    {
        $this->_elementFactory  = $elementFactory;
        parent::__construct($context,$data);
    }
    protected function _construct(){
        $this->addColumn('min_sales_amount', ['label' => __('Min Sales Amount')]);
        $this->addColumn('max_sales_amount', ['label' => __('Max Sales Amount')]);
        $this->addColumn('test', ['label' => __('Commission')]);
        $this->addColumn('is_percent', ['label' => __('Is Percent?')]);
        $this->_addAfter = false;
        $this->_addButtonLabel = __('Add');
        parent::_construct();
    }

}

Table setting appears in admin panel, but I want the field is_percent to contain dropdown with values "Yes" and "No", how to achieve it?


texts:
I want to rewrite the Magento 1 model Mage_Sales_Model_Quote_Address_Total_Collector

protected function _initRetrievers()

How can rewrite this?


texts: Magento 1.9 file structure - in particular public_html

texts:
This should be a quick yes/no reply.

I am having difficulty in getting any theme to work, and think this may be due to file structure. I have a public_html folder that contains the files for base, rwd, default templates. Yet the themes I install affect only the app, js and skin folders. When I have investigated Magento file structure, I can see no reference to a public_html folder, so am wondering if this should be there?


texts: Filter out attributes used in layered navigation

texts:
I have a situation where I have 2 layers of categories, one inside the other

I want to list the same products in the top level category as I use in the 2nd level sub categories. However I only want one set of attributes to show in the top level layered navigation, then another set of attributes in the 2nd level layered navigation. So for example, if I have this structure…

  Washing Machines
    - Top Loading Washers
    - Front Loading Washers
    - Washer Dryer Combo

…in the top level 'Washing Machines' layered navigation I want to show the labels for Machine Type as "Top Loading Washers", "Front Loading Washers", "Washer Dryer Combo" then in the second level for each machine type I want to show the layered nav for Machine Capacity as "3kg", "4kg", "6kg".

I don't want to show the Machine Capacity in the top level navigation and I don't want to show the Machine Type in the sub categories. Is it possible to filter out attributes used in layered navigation so only one set is used in the top level and another set is used in the sub category while using the same product in both categories? Thanks


texts: Is there anything wrong with keeping Magento 2 in Developer Mode?

texts:
Anytime I switch to production mode, the system does not display the product images on the product pages. The wheel just keeps rotating. This only happens in production mode. I have compiled, flushed, deployed static content, flushed static content, everything.

But switching my Magento 2.1 (PHP 7.0) into production mode makes a spinning wheel for my product images on the product page, and, a spinning wheel after logging into the backend.

Don't even know where I can debug this or look for errors.


texts: Magento 2.2.4 - How to add custom attribute below Price on Product View Page?

texts:
I have this code -

<?= /* @escapeNotVerified */ $this->helper('Magento\Catalog\Helper\Output')->productAttribute($block->getProduct(), $block->getProduct()->getAttributeName(), 'attributename') ?>

But confused with the path where to paste this code to show custom attribute below price on product page.


texts: Display Customized image in place of Base image under "Recently added items"

texts:
Once user Uploaded custom image on Product image & Add item to cart, than we want to display custom image below "Recently added items" instead of normal product image.

custom uploaded image :

we are saving custom image in path : media/custom_options/quote .
custom image path in table : "sales_flat_quote_item_option" in column : "value"

1.code to display normal product image :

app/design/frontend/rwd/theme/template/checkout/cart/minicart/default.phtml

<!--Custom product image code -->

<?php $_helper = $this->helper('catalog/output');
$_product = $this->getProduct();

if($_product->getAttributeSetId()==9)
{
    // code for display custom image
}

else
{

?>

<!--Normal product image code -->

<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>

I tried below code , but its not displaying custom image under Recently added items : Mage_Checkout_Block_Cart_Item_Renderer.php

protected function _getImageSrc($optionValue)
    {
        if(file_exists($optionValue['fullpath']))
        {
            $pathNew = str_replace(DS.'media'.DS.'custom_options', '', $optionValue['order_path']);
            $image = Mage::getModel('aitcg/image');
            $image->copyImage($optionValue['fullpath'], $image->getEmailPath().$pathNew);
            return $image->getEmailUrl().$pathNew;
        }

        return false;
    }

As we are saving custom image in path : media/custom_options/quote how to display that custom image under "Recently added items".....


texts:
I add this link in sales order history section when I click on this link popup open but blank shown I add this link.

 <block class="Magento\Shipping\Block\Tracking\Link" name="tracking-info-link" template="Magento_Shipping::tracking/link.phtml">
            <arguments>
                <argument name="label" xsi:type="string" translate="true">Track your order</argument>
            </arguments>
        </block>


texts: When a user buys something with PayPal, they receive an automatic email about the purchase, if someone does it by the default tpv, they don't receive a confirmation email, and I have to send it manually. Is there any way to send it automatically just as PayPal (when they order anything).


texts:
I'm currently working on Magento 2.2. And found that In Magento 2.2 core team made many changes in files and folder structure, deleted many files, replaced classes and many other things.

One other important change found, that in Magento 2.2 generation folder location changed

Change location from

  magento2.1/var/generation

To

  magento2.2/generated

Added new folder metadata in generated folder what is use of it?

Other things found that add new i18n folder at magento22/app like Magento 1 app/locale

Does anyone has found more changes or differences in Magento 2.2?


texts: How to exclude catalog-price-rule reduced items from a shopping card discount rule?

texts:
we are desperately looking for a shopping cart sales rule and a extension that allows us to do the following:

We want to offer a shopping card coupon code (-15%) which can only be applied to regularly priced (full price) articles. This means that old items which are reduced by a catalog price rule (-30%) are excluded and cannot be reduced any further.

At the moment, our settings only allow

either to apply the shopping cart discount to all articles (including the items that are already reduced by the catalog price rule)
or if I set the condition "special price =0 " it doesn't work at all since we're reducing with catalog rules and not with individual special prices.

Can anyone recommend a solution or Extension to work with?


texts: how to remove "Group" dropdown feild in order create form in backend in magento 2

texts:
I need to remove the "Group" dropdown field in order to create a form in the backend ?
Can anyone guide me to remove this field in magento2


texts: Magento 1.9 installation error - PHP extension "mcrypt" must be loaded

texts:
I have configured php_mcrypt, still getting same error.

How to solve the error?

Note : phpinfo not showing details about mcrypt.


texts: How to call template file to check mail?

texts:
I am having problem to call template pankaj.html after sending mail. I have search through google but not found better solution to solve my issue.

path: /app/locale/en_US/template/email/pankaj.html

& i am calling template file in config.xml of module under global tag.

 <template>
            <email>
                <inquiry  module="inquiry">
                    <label>pankaj</label>
                    <file>pankaj.html</file>
                    <type>html</type>
                </inquiry>
            </email>
   </template>

Controller code:

 public function sendemailAction()
        {
            echo "abc";
            $data = $this->getRequest()->getParams();

            //echo "<pre>"; print_r($data);

            $adminUserModel = Mage::getModel('admin/user');
            $admin = $adminUserModel->getCollection()->load();

            $emailTemplate = Mage::getModel('core/email_template')
                    ->loadDefault('inquiry');

            $senderName = $admin->getFirstItem()->getFirstname();
            $senderEmail = $admin->getFirstItem()->getEmail();
        $sender = array('name' => $senderName,
            'email' => $senderEmail);

        $recepientEmail = array();
        $recepientName =array();

        /*$customer_name = $senderName = $customer->getFirstname().' '.$customer->getLastname();*/
        $recepientEmail = $data['email'];

        $store = Mage::app()->getStore()->getId();

        $vars = array('product_name' => $data['productname'],
            'sku' => $data['sku'],
            'qty' => $data['qty'],
            'customprice' => $data['customprice']
            );

        $translate  = Mage::getSingleton('core/translate');

        // Send Transactional Email

        try {

            Mage::getModel('core/email_template')
            ->sendTransactional($emailTemplate, $sender, $recepientEmail, $vars, $store);

            $translate->setTranslateInline(true);

            Mage::getSingleton('core/session')->addSuccess('email send');

        }
        catch(Exception $ex) {

            Mage::getSingleton('core/session')->addError('Unable to send email. Sample of a custom notification error.');

        }
        $this->_redirect('');
    }

To check pankaj.html file, i have print $text in template.php file.
  echo "<pre>"; print_r($text); die;

path: app/code/core/Mage/Core/Model/Email/template.php

How to solve this issue, Thanks in Advance .


texts:
I have both price inclusive and exclusive tax on product listing and detail page. Now i want to round off only inclusive price on product listing and detail page. Exclusive price will be same as it. How can i round only inclusive price.

I want to round only Incl price to 151.00 €.


texts: Magento2 RabbitMQ Topic % is not configured error

texts:
I used rabbitmq message queueing system in my module. It works perfectly at my local environment. But as I deploy it to live-host (which runs at platform.sh) i get error topic % is not defined.
I found which block renders this exception error and put it below.
\Magento\Framework\Communication\Config

It seems the app tries to get topic information with topic name but can not find it.
At my local env I put var_dump and exit after data variable and got the message below.

It seems at live host topic information can not be found.
Do you know from where this information is obtained. I examined the Communication/Config.php , it gets its data from \Magento\Framework\Config\DataInterface , which is implemented for local storage, i guess.
Do you have any solution for this problem ?


texts: How to add product in magento?see atteched image

texts:
How to add following type of product.
select radio button for product.
I am new in magento.
I have try using Tier Price.how to display radio button?


texts: Template path hints are not displaying on front end, I tried in default and developer mode

texts: Template hints are not displaying in both developer and default mode. I am using magento 2.3.5 p1


texts:
I have issue with website after disable MSI:
Warning: include(/home/shop/domains/domain.com/public_html/generated/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status/Interceptor.php): failed to open stream

Anyone have any solution?


texts: Magento2 Collection Multiple Columns as OR

texts:
I want to do something very simple, have a collection that returns all customers that have a certain string in their name or email.

Based on how you can use in, I thought I would be able to do something like this

->addFieldToFilter(
    array('email', 'firstname', 'lastname'),
    array("like" => "%{$query}%")
 )

However, I get an error

  "Warning: Illegal string offset 'attribute' in vendor\magento\module-eav\Model\Entity\Collection\AbstractCollection.php on line 362"

The MySQL I am essentially aiming for is

SELECT * FROM mage_customer_entity

WHERE firstname LIKE '%tim%' OR email LIKE '%tim%';


texts: Some of my product price options have disappeared on the admin side

texts:
If I go to the magento admin panel, the pricing options are limited. I don't know where the conflict is coming from.

I've attached two screen shots. One of what it should be, one of what it is. Any ideas?

I've attached two screen shots, first is what it is, second is what it should be.


texts: catalog_product_entity data not getting deleted completely

texts:
How to completely remove the catalog_product_entity table data.

I have deleted the values and again tried to import the csv, i get the ids starting from the last value(not from 1).

Why is it so?


texts:
How do one get the column scope_id from core_config_data via given path
E.G:

$this->_config->getValue(self::MY_PATH, ScopeInterface::SCOPE_STORE);

The above returns the column value I need column scope_id

e.g: getScopeID

$this->_config->getScopeID(self::MY_PATH, ScopeInterface::SCOPE_STORE)


texts: Magento 2: How to Call a Console Command from a Custom Cron job?

texts:
I'm working on a custom Cron and I want find the best way to call other commands from the Cronjob code in magento2 (programmatically).

For example:
When running cli "php bin/magento cache:clean" and so on or my custom console commands.

I try this code but, it is not work..

namespace AmirHome\Cron;

use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Application;
...
$arguments = new ArrayInput(['command' => 'my:custom:command']);
$this->getApplication()->find('my:custom:command')->run($arguments,
$output);

$arguments = new ArrayInput(['command' => 'cache:flush']);
$this->getApplication()->find('cache:flush')->run($arguments, $output);

  Error: Call to undefined method AmirHome\Cron\MyCode::getApplication()


texts:
I need to add new or update the customer db. I must to synchronize the customer db of magento with a another db.

I need make this each 24h.

I think this:

if entity_id exist into db magento i update all fields
if entity id not exist into db magento i insert the new customer

it's correct?

there is a script for update or add new customers?


texts: Custom field in checkout with proper server-side validation

texts:
I've been trying to get this to work for a while now, and i've found out it's pretty easy to bypass now.

I've added my custom validation in js/prototype/validation.js and in the checkout step. However, when you inspect the element (with ex. Chrome) and remove the validate-morgen and required-entry classes, the input field will validate as true, which it isn't. Is there another way to make this that this field is being validated properly on the server-side?

Validation.js:

['validate-morgen', 'Voer een juiste morgen-bezorgen code in. Heeft u geen code? Gelieve telefonisch contact op te nemen.', function(v) {
    if (v != "gmos") {
        return false;
    } else {
        return true;
    }
 }]

HTML input field:

<input id="morgen-bezorg-code" class="input-text validate-morgen"
    placeholder="Morgen-bezorgen code" />


texts: Random generate password, isn't sending when created

texts:
I am running Magento 1.7 Community Edition. When I manually (admin panel) create a new user account for one of my clients and select randomly generate password it creates the user but never send the email with the password.

However if I revisit the user after its been created and recheck randomly generate password and click save it will send the email.

Any ideas why it won’t work when I create the user?

Thanks


texts: How to get most popular search terms for each storeid?

texts:
I want to read to top 10 search terms from magento.
This works:

$items = Mage::getModel( 'catalogsearch/query' )
    ->getCollection()
    ->setOrder("popularity")
    ->setPageSize( 10 )
    ->getItems();

foreach ( $items as $item )
{
    echo sprintf("%s\n", $item->getQueryText());
}

But how can I get the results for each store-id?


texts: how to change Magento homepage title quickly of  website, that help you optimize your Magento site for search engines.


texts:
I have class in my module for Magento 2.
His constructor gets 2 parameters

class MyClass
{
    private $str1;
    private $str2;

    public function __construct(string $str1, string str2)
    {
        $this->str1 = $str1;
        $this->str2 = $str2;
    }
}

This parameters saved in database in core_config_data table.
I want use this class in other module classes, but i dont know how i can use DI for object transfer of this class in constructors others classes.
I can use for this di.xml?


texts: Add a custom tab on the customer detail page admin panel in magento 2

texts:
I am trying to add a custom tab for customer in admin panel. When admin click particular customer the page with customer information is opened. I want to add the custom tab there.

This is what i want to achieve http://www.mydons.com/how-to-add-custom-tabs-to-magento-customer-edit-page/ .

Could anyone help?Or provide some information.


texts: Mag 2.2 Task "Assign Categories to Shared Catalog" - is pending since 2 days

texts: i have a problem in shared catelogue. the products i have shared to shared catelogue arent getting completed since 2 days with the notification- Task "Assign Categories to Shared Catalog": 565 item(s) have been scheduled for update... plz advice. I tried Reset & Reindex, but no luck


texts: products image upload error after upload 100%

texts:
when i upload product image he is complete 100% after error and there is no error show then i write this code in

  /lib/Varien/File/uploader.php
  after not show any error and permission is right

public function save($destinationFolder, $newFileName = null){
$this->_validateFile();
 if ($this->_allowCreateFolders) {
 $this->_createDestinationFolder($destinationFolder);
}
if (!is_writable($destinationFolder)) {
// Put a mage::log() and check what is the folder magento is looking for.
Mage::log($destinationFolder);
throw new Exception('Destination folder is not writable or does not exists.');}


texts: magento 1.9 doesn't save attribute value on sales_order_place_after

texts:
When the event sales_order_place_after is triggered the new quantity value is not inserted, what is the problem? How to update quantity or other attributes when this event is triggered? I need to update attribute after a user place an order.
The config.xml file is OK. I already checked if the event is triggered.

    public function save_product_frontend($observer = null) {
       $event = $observer->getEvent();
       $order = $event->getOrder();
       $items = $order->getAllItems();
       foreach ($items as $item) {
          $product = Mage::getModel("catalog/product")->load( $item->getProductId() );
          $stockitem = Mage::getModel('cataloginventory/stock_item')->loadByProduct( $product );
          $stockitem->setQty( 100 );
          $stockitem->save();
      }
  }


texts: Magento 2 recommended approach to applying patches

texts:
So far had to apply patches through command line. Bugs me there is not version control for this as in some cases changing vendor folder contents which is ignored. More for accountability with time and date of change instead of ability to revert. But then I came across this article.

https://support.magento.com/hc/en-us/articles/360005484154-Create-a-patch-for-a-Magento-2-Composer-installation-from-a-GitHub-commit

Its hard to gauge from this article. Is this the recommended approach to applying patches? Or is there another method?


texts: How to create mass print invoice from shipping grid

texts:
I want to add opportunity to print pdf invoices from shipping grid. I take print action from order controller

 public function pdfinvoicesAction(){
$shipmentIds = $this->getRequest()->getPost('shipment_ids');
$flag = false;
if (!empty($shipmentIds)) {
    foreach ($shipmentIds as $shipmentId) {
        $invoices = Mage::getResourceModel('sales/order_invoice_collection')
            ->setOrderFilter($shipmentId)
            ->load();
        if ($invoices->getSize() > 0) {
            $flag = true;
            if (!isset($pdf)){
                $pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
            } else {
                $pages = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
                $pdf->pages = array_merge ($pdf->pages, $pages->pages);
            }
        }
    }
    if ($flag) {
        return $this->_prepareDownloadResponse(
            'invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(),
            'application/pdf'
        );
    } else {
        $this->_getSession()->addError($this->__('There are no printable documents related to selected shipments.'));
        $this->_redirect('*/*/');
    }
}
$this->_redirect('*/*/');

}

But it print invoices which hasn't belongs to the shipments selected. Can anybody help with this?


texts: Is it possible to calculate a shipping price based on how many different values for a product attribute exist in the shopping cart?

texts:
This may seem a somewhat strange question, but I'm going to ask anyway. I'm currently building a Magento store (CE 1.9) for a client who has an unusual requirement for shipping price calculation.

I need to be able to calculate a shipping price based on how many different values there are for a given product attribute, set within the products contained in the shopping cart, as part of the normal checkout process.

My first thought was that table rate might solve this, however I cannot find a way to achieve the desired result.

I'll try to explain what I need...

Shipping on the site would use a 'base' shipping price of £6.95.
The contents of the shopping cart would be reviewed and a list of all 'manufacturer' product attributes would be made, from which all duplicate values would be removed.
The base price would then be multiplied by the number of values in the 'manufacturer' attribute list.

For example, if there were 4 values in the attribute list, the shipping cost would be £27.80.

Any advice on how this could be achieved would be much appreciated.

Thank you!

Paul