texts: Magento 2.3.3 - "Be the first to write a review" link is stopped clicking after upgrades to magento 2.3.3

texts:
Magento 2.3.3:-
"Be the first to write a review" and "Add your Review" link on the product detail page is stopped clicking after upgrades to Magento 2.3.3. There is no error in the console. Anybody have solution for it?


texts: Custom api for User login magento Invalid Api path

texts:
Hi I am developing android app using magento api. I am using built-in api for some of the tasks. Like getting the products for different category etc.
As I need some customized api for user login, Sort and filter products etc.
I followed link its working for getting products. But I need to change this one for user login by taking user credentials. Please let me know what changes I need to do with this code for V2Soap.


texts:
My code:

 $category = Mage::getModel('catalog/category');
    $category->setName('check');
    $category->setUrlKey('new-category');
    $category->setIsActive(1);
    $category->setDisplayMode('PRODUCTS');
    $category->setIsAnchor(1); //for active achor
    $category->setDisplayInMenu(0);
    $category->setStoreId(Mage::app()->getStore()->getId());
    $parentCategory = Mage::getModel('catalog/category')->load($parentId);
    $category->setPath($parentCategory->getPath());
    $category->save();

Now i dont want to show category in menu i m using setDisplayInMenu but its not working how can i do this


texts:
Address url for images is this

I've uploaded 3 images in admin thumbnail, small image and base image.
None of the images I've uploaded is 400x400.

I can see that its cached, how can I stop the cache setting to 400x400


texts: Magento Freightquote Error: Source model "Freightquote_Shipping_Model_Carrier_Source_Class" not found for attribute "freightquote_class"

texts:
I installed the freightquote extension to try it out and didn't like it so I uninstalled it.

When I uninstalled this extension and go to edit a product I get a fatal error.

The error log is below.  Please help me this extension has broke my store.

a:5:{i:0;s:108:"Source model "Freightquote_Shipping_Model_Carrier_Source_Class" not found for attribute "freightquote_class"";i:1;s:3354:"#0 /home/shopcapa/public_html/store/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(387): Mage::exception('Mage_Eav', 'Source model "F...')
#1 /home/shopcapa/public_html/store/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(201): Mage_Eav_Model_Entity_Attribute_Abstract->getSource()
#2 /home/shopcapa/public_html/store/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php(70): Mage_Adminhtml_Block_Widget_Form->_setFieldset(Array, Object(Varien_Data_Form_Element_Fieldset), Array)
#3 /home/shopcapa/public_html/store/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(144): Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes->_prepareForm()
#4 /home/shopcapa/public_html/store/app/code/core/Mage/Core/Block/Abstract.php(862): Mage_Adminhtml_Block_Widget_Form->_beforeToHtml()
#5 /home/shopcapa/public_html/store/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php(79): Mage_Core_Block_Abstract->toHtml()
#6 /home/shopcapa/public_html/store/app/code/core/Mage/Core/Block/Abstract.php(238): Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs->_prepareLayout()
#7 /home/shopcapa/public_html/store/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#8 /home/shopcapa/public_html/store/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('adminhtml/catal...', 'product_tabs')
#9 /home/shopcapa/public_html/store/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('adminhtml/catal...', 'product_tabs')
#10 /home/shopcapa/public_html/store/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#11 /home/shopcapa/public_html/store/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#12 /home/shopcapa/public_html/store/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#13 /home/shopcapa/public_html/store/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#14 /home/shopcapa/public_html/store/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(Array, true, true)
#15 /home/shopcapa/public_html/store/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(250): Mage_Adminhtml_Controller_Action->loadLayout(Array)
#16 /home/shopcapa/public_html/store/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Adminhtml_Catalog_ProductController->editAction()
#17 /home/shopcapa/public_html/store/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#18 /home/shopcapa/public_html/store/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /home/shopcapa/public_html/store/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#20 /home/shopcapa/public_html/store/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#21 /home/shopcapa/public_html/store/index.php(87): Mage::run('', 'store')
#22 {main}";s:3:"url";s:89:"/store/index.php/admin/catalog_product/edit/id/2841/key/7dfbc8e46bf196fb9e645b8391e16c09/";s:11:"script_name";s:16:"/store/index.php";s:4:"skin";s:5:"admin";}


texts:
The website I have just made live on Magento has crashed after one day of activity.

I have checked the error log and it begins with the following ...

  a:5:{i:0;s:144:"SQLSTATE[HY000]: General error: 126 Incorrect key file
  for table '/tmp/#sql_dda_0.MYI';

try to repair it, query was: DESCRIBE log_visitor_info";i:1;s:3547:"#0

Does anyone know what this means, or can assist me in fixing this issue please?
Thanks


texts: Magento2: frontend event is not working (sales_order_place_after)

texts:
I am catching sales_order_place_after event in etc/adminhtml/events.xml everything working fine..

But same is not working while trying to catch in etc/frontend/events.xml.
also tried to catch the event in etc/events.xml but no luck..

In brief my problem is:

sales_order_place_after event is working while placing the order from admin Dashboard but same is not working if order placed from frontend.

is there any different way to call this event from front end ??

adminhtml/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="sales_order_place_after">
        <observer name="sales_order_grid_vendors" instance="Company\Vendors\Observer\Adminhtml\Vendor\AddVendorSalesOrders" />
    </event>
</config>

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="sales_order_place_after">
        <observer name="sales_order_grid_vendors_customer" instance="Company\Vendors\Observer\AddVendorOrders" />
    </event>
</config>

observers:
Observer/Adminhtml/Vendor/AddVendorSalesOrders.php

namespace Company\Vendors\Observer\Adminhtml\Vendor;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
class AddVendorSalesOrders implements ObserverInterface
{
  public function execute(Observer $observer)
      {
        die('mujassam');
      }
}

Observer/AddVendorOrders.php

namespace Company\Vendors\Observer;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
class AddVendorOrders implements ObserverInterface
{
  public function execute(Observer $observer)
      {
        die('mujassam');
      }
}


texts: Memcached is running but not writing correctly

texts:
I am running on a load balanced server setup with memcached installed in order to improve site performance through caching. However memcached doesn't look to be working correctly. I am currently running three instances of memcached on ports 11111, 11211 & 11311

I have verified the following:
- memcached module in php is enabled and present in phpinfo
- The service memcache is running on both servers
- memcached has been configured in Magento (see local.xml below)

 File
 memcached

<backend>memcached</backend>
<memcached>
<servers>
<server>
  <host><![CDATA[127.0.0.1]]></host>
  <port><![CDATA[11211]]></port>
  <persistent><![CDATA[1]]>   </persistent>
</server>
<server>
  <host><![CDATA[server2-hostname]]></host>
  <port><![CDATA[11211]]></port>
 <persistent><![CDATA[1]]></persistent>
</server>

but whenever I telnet into memcached I get the following output:

Trying 127.0.0.1...

Connected to localhost.

Escape character is '^]'.

stats

STAT pid 8383

STAT uptime 2561

STAT time 1366852648

STAT cmd_get 0

STAT cmd_set 0

STAT cmd_flush 0

STAT cmd_touch 0

STAT get_hits 0

STAT get_misses 0

STAT delete_misses 0

STAT delete_hits 0

STAT bytes_read 7

STAT bytes_written 0
...
END

Which implies nothing is being correctly cached.

Anyone any ideas why this might be?


texts:
I'm trying to install Magento CE 2 on AWS following this tutorial:

https://comtechies.com/how-to-install-magento-on-amazon-ec2.html

However, I cannot go to http://IP/magento. I've look on Google and I saw that my /app/etc/env.php does not exist.

I already tried this command:

php bin/magento setup:install --base-url=http://127.0.0.1/magento2/ \
--db-host=localhost --db-name=magento --db-user=magento --db-password=magento \
--admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \
--admin-user=admin --admin-password=admin123 --language=en_US \
--currency=USD --timezone=America/Chicago --use-rewrites=1

And I got this error:

PHP Fatal error: Uncaught Error: Class 'Locale' not found in /var/www/html/magento/vendor/magento/framework/Locale/Bundle/DataBundle.php:64

How should I proceed to finish this installation?

Many thanks!


texts: Magento Can we check which applied shopping cart rules in the order email template?

texts:
I added a new rule and I need to change the shipping text in the order email depend on this rule So I need to check if it is applied.

Thanks,


texts: Modules that can be migrated in Magento To MongoDB

texts:
A NoSQL database to meet the challenges of storing larger catalogues of data, this scalable solution will bring unmatched performance. But as we know , Magento has a large number of tables and those tables have relationships to each other. So we will not be able to completely migrate in one go.

But we can be migrate few modules which make sense to do so? What are the modules that can be migrated or is there any other way that a NoSql database like MongoDB can be used.

I have also read how to connect to MongoDB, but need to know which modules which will increase performance.


texts:
I have a page that is setup to display all product categories. How do I sort these alphabetically?

This is what the block looks like {{block type="core/template" template="catalog/category/cat-thumbnails.phtml"}} {{block type="core/template" template="catalog/category/sidebar-fix.phtml"}}

I just want to alphabetize it.


texts: How to make Magento NOT send Thank you for registering Welcome Email?

texts:
Magento 1.9.1
Porto theme

We get thousands and thousands (like over 100 thousand) new Account registrations as explaned here:

People from Russia making fake accounts in our Magento 1.9.x store - why?

Nothing we tried to do actually helped and the situation has gotten so bad that this was taking up all of our server resources and I had to suspend that account. Now I'm looking to start that website back up but I much rather just disable the sending of the Thank you for registering Welcome Email. How can you do that? Any other suggestions will be greatly appreciated.


texts:
When I am adding a new product,
Then, Search Engine Optimisation fields:
meta title, meta description, meta keywords have an event listener which fills in these fields when the user types in the product name.
How to make an additional event listener for the Url Key field?
I've found so far the following,
Following JS file is responsible for listeners
vendor/magento/module-catalog/view/adminhtml/web/js/components/import-handler.js

And the listeners are registered in
vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/General.php

But I have no idea how to add/create an additional listener?
Is there an easier way?

All I need is url-key to be filled with product name with - instead
of ' ' ( spaces ).


texts:
We setup a development environment. In the development environment, we installed third party's modules and theme, made some changes to modules and theme, and also made our own module. After fully testing, now it is time to setup production environment.

I read many online documents regarding deployment, but still not very clear. Could someone experts tell me the details about how to create a build server, capture all the changes from development server, build code and assets, create deployment artifacts, deploy to production, and finally make production running as what we see in development environment.

Please not ask me to use this tool, that tool. Let me know how to successfully process build and deployment with Magento and system commands without any third party's tools.

Thanks!


texts: How can I add a currency switcher to my language container at the top of rwd theme

texts: I am using my own custom version of the RWD theme and would like to know how I can display a currency switcher in the div .header-language-background, how would i go about doing this? thanks


texts: Magento Products export session out while download 25K records

texts:
In my store 25K records available, when i try to download i am getting error like Request is taking too long to respond.
How can i solve this response error?


texts:
I have a Magento 2.1.10 installation that I want to upgrade purely for security updates.

With Magento 1 I used to be able to just apply patches to achieve this. But from what I understand with Magento 2 you have to upgrade the installation to get security updates? So to get the updates for 2.1.10 I would update to the latest in the 2.1.x branch? Are these update generally quite painless or am I going to experience issues? Presumably as I am wanting to keep in the 2.1 branch it should be more straightforward than if I were to update to 2.2.

Many thanks


texts: "Use Default value" randomly unselected - so Move infotmation from [Store View] to [Global]?

texts:
Something wrong happens with my store view management since I've created a new store view.

Basically, till now all the boxes for all views "use default value" were selected but recently most of all have been randomly unselected.
That means, when I want to update an information about a product (Price or status for example) I need to check for each store view if the box "use Default value" is selected. ( http://prntscr.com/ekyw7b )

Does anybody know if there is a way to automatically select the box "use default value" for all product information (except Name & Description) and all store view ?

Another good solution would be to define all product information  (except Name & Description) as [Global] instead of [Website] or [Store View] ...

Can anybody help to figure out how to proceed ?


texts: Can anyone explain how getStoreConfig works?

texts:
Mage::getStoreConfig('systemfieldsgroupsectioncode/systemfieldsgroupcode/all_products_gold_price', Mage::app()->getStore());

Can you please explain the folder path ?


texts: Create a new category with data for store_id 0

texts:
I'm trying to create new categories. My code, which is called in the admin panel, looks this way:

/** @var \Magento\Catalog\Api\Data\CategoryInterface $parentCategory */
/** @var \Magento\Catalog\Api\Data\CategoryInterfaceFactory $this->categoryFactory */
/** @var \Magento\Catalog\Api\CategoryRepositoryInterface $this->categoryRepository */
$data = [
    'parent_id' => $parentCategory->getEntityId(),
    'name' => ucwords(strtolower($name)),
    'is_active' => 1,
    'is_anchor' => 0,
    'include_in_menu' => 1,
    'url_key' => strtolower(str_replace(' ', '-', $name)),
    'display_mode' => 'PAGE',
    'page_layout' => '1column'
];
$category = $this->categoryFactory->create();
$category->setData($data)
    ->setAttributeSetId($category->getDefaultAttributeSetId());
$this->categoryRepository->save($category);

Although categories created this way do get created, all the data is being added for store_id 1 instead of 0. Because of this, my categories lack name (among other stuff) when seen on the category listing in the admin panel.

What I tried:

Setting the store_id on a category before saving it (it was just a blind guess, not a result of any research), like this: $category->setStoreId(0)->setData($data)
Emulating area code in a similar way it's done in sample data modules, this way:

/** @var \Magento\Framework\App\State $this->appState */
$this->appState->emulateAreaCode(
        'setup',
        [$this, 'getCategory'],
        ['name' => $name, 'parentCategory' => $parentCategory]
    );

where getCategory is a method wrapping up the code pasted at the beginning of the post.

None of those methods succeeded, though. What do I miss?


texts: I want to show track order link in My Account > My Orders.How to give link to that.How to add functionality for that.Help me


texts:
I am writing a custom function which gives me cross sell items from products from cart.

I have wrote this function as follow:

        $quote = $this->getQuote();
        $quoteItems = $quote->getAllItems();

        $productIds = array();
        foreach($quoteItems as $item){
            if (!$item->getParentItem()) {
                $product = Mage::getModel('catalog/product')->load($item->getProductId());
                $productIds[] = $product->getCrossSellProductIds();

            }
        }
        if ($productIds) {
            $productCollection = Mage::getModel('catalog/product')
                ->getCollection()
                ->setStoreId($this->getQuote()->getStoreId())
                ->addStoreFilter($this->getQuote()->getStoreId())
                ->addAttributeToSelect('name')
                ->addAttributeToSelect('price')
                ->addAttributeToSelect('small_image')
                ->addIdFilter($productIds)
                ->load();
        }
    }
    return $productCollection;

But this gives me error for some few products only. Not sure what's going on.

As I understand it is trying to filter products from store.

Error

  a:5:{i:0;s:238:"SELECT e.* FROM catalog_product_entity AS e
  INNER JOIN catalog_product_website AS product_website ON
  product_website.product_id = e.entity_id AND
  product_website.website_id = '1' WHERE (e.entity_id IN('46', '56',
  '60', ))

Can anyone point me out what's happening, since magento is not giving me specific reason for the error.


texts: Catalog Price Rule not applying to Downloadable product

texts:
I'm trying to implement a Catalog Price Rule of 50% on specific category of downloadable product, but it doesn't give implemented.

Here are the basic spec of what I've built so far:

Downloadable product:

Price set at 0, size you cannot buy the entire set, just the
different resolution
Each Product has 4 to 6 possible version of download each with a
different price

Catalog Price Rule

Is active and implement on the main website
Condition is set to the proper category
Action is apply By Percentage of the original price
Enable discount to subproduct is enable
and is apply By Percentage of the original price

What I am doing wrong?


texts: Magento 2: Can't call parent function in JS / knockout file

texts:
I'm having trouble receiving the return value from a function in the parent file.

As you can see in Magento_Tax/js/view/checkout/summary/shipping.js, it's calling functions in the (grand)parent file (Magento_Checkout/js/view/summary/abstract-total.js - getFormattedPrice() ) but I'm receiving a JS error when I try to call this.getValue() in the parent file (this.getValue() is not a function).

Can anyone spot why I can't call this.getValue()?

Magento_Checkout/js/view/summary/shipping.js
(Parent file – I haven't touched this file apart from adding in the string return value for demo purposes).

define(
[
'ko',
'jquery',
'Magento_Checkout/js/view/summary/abstract-total',
'Magento_Checkout/js/model/quote'
],
function (ko, $, Component, quote) {
    return Component.extend({
        defaults: {
            template: 'Magento_Checkout/summary/shipping'
        },
        quoteIsVirtual: quote.isVirtual(),
        totals: quote.getTotals(),

        getShippingMethodTitle: function() {
            if (!this.isCalculated()) {
                return '';
            }
            var shippingMethod = quote.shippingMethod();
            return shippingMethod ? shippingMethod.carrier_title + " - " + shippingMethod.method_title : '';
        },

        isCalculated: function() {
            return this.totals() && this.isFullMode() && null != quote.shippingMethod();
        },

        getValue: function() {

            return 'this is the value I want to see in the #Magento_Tax/checkout/summary/shipping.html';

        }

    });
  }
);

Magento_Tax/js/view/checkout/summary/shipping.js
( I added just the newVar: ko.observable(this.getValue()) )

define(
[
'ko',
'jquery',
'Magento_Checkout/js/view/summary/shipping',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/step-navigator'
],
function (ko, $, Component, quote, stepNavigator ) {
    var displayMode = window.checkoutConfig.reviewShippingDisplayMode;

    return Component.extend({
        defaults: {
            displayMode: displayMode,
            template: 'Magento_Tax/checkout/summary/shipping'
        },

        newVar: ko.observable(this.getValue()),

        isBothPricesDisplayed: function() {
            return 'both' == this.displayMode
        },
        isIncludingDisplayed: function() {
            return 'including' == this.displayMode;
        },
        isExcludingDisplayed: function() {
            return 'excluding' == this.displayMode;
        },
        isCalculated: function() {
            return this.totals() && this.isFullMode() && null != quote.shippingMethod();
        },
        getIncludingValue: function() {
            if (!this.isCalculated()) {
                return this.notCalculatedMessage;
            }
            var price =  this.totals().shipping_incl_tax;
            return this.getFormattedPrice(price);
        },
        getExcludingValue: function() {
            if (!this.isCalculated()) {
                return this.notCalculatedMessage;
            }
            var price =  this.totals().shipping_amount;
            return this.getFormattedPrice(price);
        }
    });
}
);

Magento_Tax/checkout/summary/shipping

// This is what I want to update with the return value from getValue()

...


texts: System stuck on a controller on live instance does not return any thing nor redirect

texts:
I am duplicating the category tree with products works fine on my system while checking on live instance.

scenario

Duplicate category and subcategory but not products works fine.
Duplicate category with no subcategories but have products more then
1200 also works fine.
Duplicate category and subcategory and their
respective products not more then 500 works fine.
Duplicate category and subcategory and their respective products more then 500 doesn't works fine and stuck on
the controller giving 404 error instead of redirecting like other
scenarios.MAIN ISSUE


texts: Magento2 : stop order confirmation email for specific payment method

texts:
How can we stop new order confirmation email.
We have 3 payment methods which are EFT(Cash on Delivery), Paypal express checkout & Credit card payment.
So when we place an order we get invoice and order confirmation email, so our requirement is something like we don't want order confirmation email if Paypal express checkout is used to order otherwise we want them so can't disable it from admin config and want some custom solution about it, any help will be appreciated, Thanks.


texts: Magento 2: Fill dropdown with first level of category

texts: I am creating a dropdown using phtml .. Is there any class, method or factory is exists through which I can get toOptionarray() of first level of category.


texts: How to remove links on my account navigation?

texts:
i wanted to remove "billing agreement" "recurring profile" "customer token" "My Downloadable Products" in account navigation.

Magento ver. 1.9.2.4

please help me .


texts:
I want to configure and use : https://devdocs.magento.com/guides/v2.3/config-guide/varnish/config-varnish.html
for Magento in bitnami Linux
Can any one guide me port no which Port No Varnish should be deployed ??
I had deployed it on port 8080 and It caused some conflict in my server
Linux apache 2 bitnami
Please any one help!!


texts: How can i fix duplicate product fetching on home page

texts:
My theme is using this product loop to show chosen products on the home page. However, the results are acting really weird - some products seems to cause it to stop before getting all products, hence only showing around 13 products instead of the desired 16 ones. When trying to load more, it loads some of the same products again.

I have tried contacting my theme developer, but they won't aknowledge the error, since they cant recreate it.

Code on pastebin

Life demo of the error - see featured products just below the banner on frontpage


texts:
I have problem with image alignment. These two along with some small description underneath are supposed to be next to each other but for reason I don't understand they appear to be aligned in single row. As you can see in the code below, only first image has div class col-md-6 because as soon as I add it to second image, it breaks layout and covers the text (description). Using float: right provides the same result.

Header

Category name Lorem ipsum dolor
sit amet, consectetur adipiscing elit. Integer varius, nisi quis dignissim condimentum, quam elit
tincidunt dui, suscipit vestibulum dui nulla id mi.

Category name Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer varius, nisi quis dignissim condimentum, quam elit tincidunt dui, suscipit vestibulum dui nulla id mi.


texts: click proceed to checkout and page reload and set Disable checkout button in cart

texts:
I have use observer for "controller_action_predispatch_checkout_onepage_index" and in set but not disable proceed checkout button...anything missing?

$quote->setHasError(true);
                // Mage::app()->getStore()->setConfig('checkout/options/onepage_checkout_enabled',1);
                Mage::getSingleton('checkout/session')->addError('Remove Products.');
                Mage::app()->getResponse()->setRedirect(Mage::getUrl('checkout/cart'));


texts: "Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with id = 4 " in magento 2

texts:
While tried to open products via admin end, it throws below error,

1 exception(s):
Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with id = 4

Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with id = 4
#0 /var/www/html/xxxx/vendor/magento/module-eav/Model/AttributeSetRepository.php(155):

DB

Please provide me a solution


texts: Permanent solution for magento 2 permission issue after cache flush

texts:
Whenever i flush cache i have to give permission to the folder.
what is the permanent solution for this issue.


texts: Strange behaviour with loading entity by attribute

texts:
Maybe I'm missing something fundamental by how can it be that the following code works fine and finds an entity:

$model = Mage::getModel('catalog/category')->loadByAttribute('url_key', $urlKeyToCheck);

And the following is not:

$model = Mage::getModel('catalog/category');
$model->loadByAttribute('url_key', $urlKeyToCheck);


texts: magento 2 move product_list_toolbar after category.cms or category.view.container

texts:
I like to move the product_list_toolbar element after the category.cms or category.view.container, for that have tried the following code

<move element="product_list_toolbar" destination="category.view.container" after="-"/>
<move element="product_list_toolbar" destination="category.cms" after="-" />

But nothing seems to work, it's throwing the Fatal error: Uncaught Error: Call to a member function getSize() on null.

for your further reference herewith I have attached my expected things.


texts: get the drop down added at admin side on product detail page

texts:
I have added an attribute (Dropdown) at the admin side, and now I want to get that dropdown on my product detail page in the module, with there option and values.  I have searched everywhere but I couldn't find it, help me here.
I am adding the screenshot of the dropdown from the admin side.

and screenshot where I want to show it, you see the dropdown. (This is custom create by me )


texts: Multistore issue Duplicate content issue

texts:
We have multiple Store 3 Stores we are using same products in all..

Can someone give me idea how we can prevent for duplicate?

we are using some product on our client site. with shop.domain.com we want this all product or pages should not be index by google


texts:
Getting an error when changing Theme via admin Dash... "Something went wrong while saving this configuration: Area is already set" Found the solution patch from Magento. but I don't know where to import the file to my IDE.

Please find attached screen shot along with problem being resolvedVIa Github... I have the Patch to import to IDE... I just don't know where it goes...
Also This is the Patch from Magento 2: Patch - MAGETWO-93036

Can anyone help Please? Thank you in Advance!


texts: How to get large collection of products?

texts:
I have a store with over 100K products. I am using this code to get all my products.

$model = Mage::getModel('catalog/product')->getCollection();
foreach ($model  as $product) {
     $p = Mage::getModel('catalog/product')->load($product->getId());
     echo $p->getName();
     echo $p->getDescription();
     echo $p->shortDescription();
}

But it shows nothing. This code works where i have only less number of products in my store.
So how to get all my 100K products?
Thank you


texts: How to create a cms block with existing block content using widget in Magento 2?

texts:
Is it possible in Magento 2 to create a new cms block(using widget) with content of an existing block, and admin can change the images, links and text of new block????

Actually, I need a template(widget), and it should be called in different pages. For different pages, I need to change the template's images, text and links. For example, I have a cms block for showing these images on homepage

Now, I need the same block for some other page, but I need options to change images(using image uploader), texts and links... Any help will be appreciated... Thanks


texts: How to setup and configure perfect webserver on centos for magento2

texts:
I want to Build a new AWS EC2 centos webserver with the best configuration for Magento2 ?

there is any clear steps or script?

Regards,
Ahmed


texts: How to enable Flat Rate Shipping Method Only for Selected Products?

texts: How to do the Flat Rate Shipping Method only for selected products.


texts: Is it possible to copy an extension from one site to another

texts: I have two sites and have an extension pre installed in one of the themes and want to know if I can copy it to the other theme? Is this possible?


texts: Custom Module Grid is not working going to 404

texts:
I have created a custom module with the form and form is saving the data to DB perfectly now i want to show all the data in my admin Grid custom page.

I have tried it but when ever i visit the page it goes to 404

Here is my review.xml file where i defined the menu in the directory
app > design > adminhtml > default > default > layout with the following code in it:

 <? xml version = "1.0" ?>
  <layout version="0.1.0">
     <reviewmycompany_adminhtml_review_index>
         <reference name="content">
           <block type="reviewmycompany/adminhtml_review" name="review" />
           </reference>
     </reviewmycompany_adminhtml_review_index>
   </layout>

And have my ReviewController.php in app > code > community > OptFirst > ReviewMyCompany > controllers > adminhtml with the following code:

       <?php

     class OptFirst_ReviewMyCompany_Adminhtml_ReviewController extends Mage_Adminhtml_Controller_action
         {

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

}
public function gridAction()
{
    $this->loadLayout();
    $this->getResponse()->setBody(
        $this->getLayout()->createBlock('reviewmycompany/adminhtml_review_grid')->toHtml()
    );
}

}

And my Review.php file in app > code > community > OptFirst > ReviewMyCompany > Block > adminhtml as follows

      <?php
       class OptFirst_ReviewMyCompany_Block_Adminhtml_Review extends Mage_Adminhtml_Block_Widget_Grid_Container
        {
         public function __construct()
          {
          $this->_controller = 'adminhtml_review';
          $this->_blockGroup = 'review';
          $this->_headerText =  Mage::helper('optfirst_reviewmycompany')->__('Manage Social Icons');
          $this->_addButtonLabel = Mage::helper('optfirst_reviewmycompany')->__('Add Employee');
           parent::__construct();
        }
     }

And My Grid.php files in app > code > community > OptFirst > ReviewMyCompany > Block > adminhtml >Review with the following code:

<?php

     class OptFirst_ReviewMyCompany_Block_Adminhtml_Review_Grid extends Mage_Adminhtml_Block_Widget_Grid
      {
      public function __construct()
        {
    parent::__construct();
    $this->setId('reviewGrid');
    $this->setDefaultSort('id');
    $this->setDefaultDir('ASC');
    $this->setSaveParametersInSession(true);
}

protected function _prepareCollection()
{
    $collection = Mage::getModel('optfirst_reviewmycompany/review')->getCollection();
    $this->setCollection($collection);
    return parent::_prepareCollection();
}

protected function _prepareColumns()
{
    $this->addColumn('id', array(
      'header'    => Mage::helper('reviewmycompany')->__('ID'),
      'align'     =>'right',
      'width'     => '10px',
      'index'     => 'id',
    ));

    $this->addColumn('name', array(
      'header'    => Mage::helper('reviewmycompany')->__('Name'),
      'align'     =>'left',
      'index'     => 'name',
      'width'     => '50px',
    ));

    $this->addColumn('content', array(
        'header'    =>     Mage::helper('reviewmycompany')->__('Description'),
        'width'     => '150px',
        'index'     => 'content',
    ));
    return parent::_prepareColumns();
 }

}

So can you please look into this and let me know why it all happening why its going to 404?

Thanks!


texts: Add a new address during multishipping checkout

texts: Is there a good way to allow users to add new addresses during multishipping checkout in-page (not having to go to a dedicated form page) the way many onepage checkouts function?


texts:
Every body, I got a problem --
My var/log.update.log is keeping increasing.
And that cause me lot of trouble.

I found this issue and try to stop log by change cron job into:

* * * * * /usr/local/php/bin/php /home/wwwroot/shopkey.doyustudio.com/bin/magento cron:run
* * * * * /usr/local/php/bin/php /home/wwwroot/shopkey.doyustudio.com/update/cron.php
* * * * * /usr/local/php/bin/php /home/wwwroot/shopkey.doyustudio.com/bin/magento setup:cron:run

But it not working.
update.log is keep increasing, and that's totally useless for trouble shooting.
I found a topic is talking about how to trace it.
But I don't wan't to edit magento system, is there any other way to disable to log?

Thank you :)


texts: product buying option(Add to cart functionality) for only one category products

texts:
I am working on a project which has a category.

And I want to add product buying option only for that category products.
Other categories don't have product buying options.

I want to know the best way to implement this.
Please explain in detail.


texts: How to redirect Wishlist output from popup to website url?

texts:
In category listing page I am using quick view. In Quick View, product detail page is displayed in popup. In that popup I am displaying wishlist also.

Wishlist functionality is working fine but its output is getting redirected to popup url.

For Quick View I have referred link -

 https://www.weltpixel.com/advance-product-quick-view.html

Wishlist output is getting redirected to popup instead of website url.

 <a href="#" data-post='<?php  echo $this->helper('Magento\Wishlist\Helper\Data')->getAddParams($_product) ?>' class="action towishlist" data-action="add-to-wishlist">Add to Wishlist


texts: Magento 2 - offline payment have no entry in sales_order_status_history table

texts:
I am working on the implementation of Track order functionality in Magento 2 in which I am using the sales_order_status_history table to get all status history related to the orders.
But this is working only for online payment whereas in the case of offline payment such as COD, Check / Money Order, etc, I am not getting any record in the sales_order_status_history table.
Whereas in Magento 1 records are maintained for every order I placed.
Please help me by letting me know the actual cause of this.


texts:
I need to add a custom link to the dropdown menu :

        <div class="customer-menu" data-target="dropdown">

How can I do this easily (without using jquery), I need to do it the magento way


texts: Images are not showing in frontend in magento2

texts:
I have issue with my store , All the images are not showing on the frontend.

To increase speed of site,I want to optimize all images in site.
for that i have already tried 1 plugin (https://github.com/tinify/magento2-plugin)


texts: Magento 2: Unable to Save Custom Order Attribute Programatically

texts:
I have added one custom attribute to order. but i am not able to save it from my custom file programatically.

use \Magento\Sales\Model\Order;
$_objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $_objectManager->create('Magento\Sales\Model\Order')->loadByIncrementId(000000004);
$dat = $order->getData();
$order->setData('is_send_review',1);
$order->save();

I am able to print array of order by $dat, but when i am going to save it's gives internal server error.


texts: Charge tax on shipping only for specific US states - Magento CE

texts:
I'm trying to figure out how to charge tax on shipping to only a select list of states where state law requires tax on shipping.

I currently have one list of Tax Rules in Magento (provided by Zip2Tax) that has a rule for each zip code in the country.

How can I accomplish this?


texts: Use Magento 2 translation (for example German) from CrowdIn

texts:
So people are translating Magento 2.

How can I use the current translation from there in my project?

I can download a source.csv - but won't I need one file per module?


texts: Can I salvage reviews after changing product type?

texts:
We want to make some of our products as grouped products now but what happens to the reviews? If I make it a new product type with additional products I KNOW it's going to be like a new product in the eyes of a customer but the boss is nervous that I'm about to re-do products over and go from hundreds of reviews to none.

Is there a way to transfer them?


texts: Magento 2 search suggestion showing some character and symbols

texts: My search is not working fine, when i try to search, it shows some unknown and irrelevant charters in the suggestion.


texts:
Using magento 1.x I have changed the source of my sales_order grid form sales/order_grid_collection to sales/order_grid_collection

protected function _getCollectionClass() {
        return 'sales/order_collection';
}

This works aside form the Bill and Ship to Name fields which are empty. I cann't see why this would be the case. Any ideas why I should be missing these fields?


texts:
after installing sparsh banner extention and adding {{ block class="Sparsh\Banner\Block\Banner" template="Sparsh_Banner::banner.phtml" }} this code in home page but in forntend home page display error Error filtering template: Notice: Undefined index: directiveName in C:\wamp64\www\sejal\vendor\magento\framework\Filter\DirectiveProcessor\SimpleDirective.php on line 68
how to resolve it??? plese help me to get out of this error


texts: Magento2 Product Import - Select / Multiselect Field values do not work

texts:
i try to add the value of an custom select and multiselect attribute in my custom product import job. But it do not work.

F.e. I have a custom SELECT attribute "pattern" with values (A,B,C), than i try to add the related product value in my import:

...
$oSimpleProduct = $this->_objectManager->create('\Magento\Catalog\Model\Product');

// ... add the min req. attributes

// HERE is my problem ... $oProductItem->getPattern() has value "A"
$oSimpleProduct->setCustomAttribute('pattern', $oProductItem->getPattern());

$oSimpleProduct->save();

...

After the save the product shows up in the magento admin .. but the field is still empty. If i load the product field it shows:

object(Magento\Framework\Api\AttributeValue)#3969 (1) {
  ["_data":protected]=>
  array(2) {
    ["attribute_code"]=>
    string(7) "pattern"
    ["value"]=>
    string(1) "0"
  }
}

Do anyone know what i am doing wrong? - How can i add SELECT AND MULTISELECT Values?


texts:
I am new to Magento.  Magento is installed as /products/ and I have 3 websites/stores: /products/en/ for english, /products/es/ for spanish, etc.  If I have a category URL key of 'cars', then what is the correct URL to browse the category?

I have tried:

/products/cars/

/products/en/cars/

/products/category/cars/

etc

These all return a 404 error.

I can find plenty of instructions on how to edit categories, or even programmatically find the category url, but the videos etc all leave out one important fact, how this translates to the browser URL/address!


texts:
Can’t login into the admin panel of Magento2.also try command in case the account is locked is?

php bin/magento admin:user:unlock ADMINUSERNAME

And manually edit password in the admin_user table in the database.
But it seems not fixed it.


texts: how to get front name and controller name with hyphen in magento 2 url?

texts:
I want to get URL like this after domain URL

domainname/hellowword/example-index


texts: Magento 2: Unregistered User does not get proper error message while signing in

texts: If the user is not yet applied for the registration and he tries directly trying to log in on our website it shows the message like "This account is not confirmed". Instead of displaying this message to users who are not yet applied for the registration we've to display an error message like Your username or password is incorrect.


texts: Need help on creating Shopping Cart Rule for Specific Brand and of Fixed Value with Minimum Shopping Value of that Brand

texts:
For example INR 100 off on purchasing a item of XYZ brand of value 500 and above. I have Brand as an Attribute.

In the Cart there is 1 item of ABC Brand, 1 item of EFG Brand and 2 Items of XYZ Brand. Currently it is getting calculated on cart subtotal hence calculation is going wrong.

Ideally this should be considered on the line item total of the cart which have XYZ as a Brand. Don't know how to fix this.


texts: New release of Magento 2.0 block layout not displaying

texts:
Magento has released new version 2.0. I am trying to creating HelloWorld Module in Magento 2.0 . I have created controllers which is working fine. But I am having issue with displaying block in content area. Below is my code :

Excercise\HelloWorld\Block\HelloWorld.php

<?php
 namespace Excercise\HelloWorld\Block;
 class HelloWorld extends \Magento\Framework\View\Element\Template
 {}
?>

Excercise\HelloWorld\view\frontend\layout\helloworld_index_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Lay   out/etc/page_configuration.xsd">

    <referenceContainer name="content">
        <block class="Excercise\HelloWorld\Block\HelloWorld" name="helloworld" template="helloworld.phtml" />
    </referenceContainer>

</page>

Excercise\HelloWorld\view\frontend\template\helloworld.phtml

Welcome to Magento2 !

Please help me out to solve this issue.


texts:
I'm working through this tutorial http://alanstorm.com/magento_2_crud_models_for_database_access/

When I reach the point Magento 2 Factory Objects, confusion embraces me as the code in my local project starts to differ from the one in tutorial. Maybe the tutorial was not updated for some time.
It says there should be Pulsestorm\ToDoCrud\Model\TodoItemFactory class, but I don't have it.

When I run my page, I get the error:

Uncaught TypeError: Argument 2 passed to Pulsestorm\\ToDoCrud\\Block\\Main::__construct() must be an instance of Pulsestorm\\ToDoCrud\\Model\\TodoItemFactory, array given

This second argument is in the code below, but I am apparently missing the class file itself.

public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Pulsestorm\ToDoCrud\Model\TodoItemFactory $toDoFactory
    )

What shall I do?
Do I have to create the class file manually?
Does TodoItemRepository has something to do with this?


texts: Hide the qty box on product detail page based on attribute set

texts:
I want to hide the qty box on the product details page but only for items with a certain attribute set.  I know i need to edit the addtocart.phtml file with an if statement.  I found a similar issue solved with this if statement which works:

        <?php if($_product->getStockItem()->getMaxSaleQty() > 1): ?>

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

        <?php endif; ?>

But, I don't want to base it off of MaxSaleQty. I want to base the condition on the qty available.  Solution?


texts: How to write magento javascript mixin for widget returned as an object?

texts:
I need to write magento javascript mixin for the menu.js part which is returned as the object of two multiple widgets. Actual location of the file is lib\web\mage\menu.js which further extends the  menu from jquery-ui to add custom functionality while keeping native code intact.
But in this case there are two multiple widgets defined in one javascript module and returned as an object.
return {
    menu: $.mage.menu,
    navigation: $.mage.navigation
};

As per the devdocs https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html
i need to take wrapper function to extend the method code.
This is the mixin code for step navigator object when object is returned from js module. In this case whole object is stepNavigator itself.
define([
    'mage/utils/wrapper'
], function (wrapper) {
    'use strict';

    return function (stepNavigator) {
        stepNavigator.setHash = wrapper.wrapSuper(stepNavigator.setHash, function (hash) {
            this._super(hash);
            // add extended functionality here or modify method logic altogether
        });

        return stepNavigator;
    };
});

But in my case there are two multiple jquery widgets are returned in one object.
So how to override/extend the method (_open method) from menu widget only so that it is embed into widget part before widget being called? I don't need any change in navigation widget.
Edit-1
I am initializing js menu via data-mage-init so is there any chance that mixins are not applying?


texts: Connection refused error while sending order confirmation mail

texts:
My magento admin dashboard says that the order confirmation mail has been successfully send, but I am not getting any mail in my inbox, and the exception.log file says this

exception 'Zend_Mail_Protocol_Exception' with message 'Connection refused'
in /lib/Zend/Mail/Protocol/Abstract.php:277
Stack trace:
#0 /lib/Zend/Mail/Protocol/Smtp.php(167) Zend_Mail_Protocol_Abstract->_connect('tcp://smtp.secu...')
#1 /lib/Zend/Mail/Transport/Smtp.php(199): Zend_Mail_Protocol_Smtp->connect()
#2 /lib/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /lib/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /app/code/local/Mage/Core/Model/Email/Template.php(460): Zend_Mail->send()
#5 /app/code/local/Mage/Core/Model/Email/Template.php(517): Mage_Core_Model_Email_Template->send(Array, Array, Array)
#6 /app/code/core/Mage/Core/Model/Email/Template/Mailer.php(84): Mage_Core_Model_Email_Template->sendTransactional('1', 'support', Array, Array, Array, '1')
#7 /app/code/core/Mage/Sales/Model/Order.php(1354): Mage_Core_Model_Email_Template_Mailer->send()
#8 /app/code/core/Mage/Sales/Model/Order.php(1369): Mage_Sales_Model_Order->queueNewOrderEmail(true)
#9 /app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php(139): Mage_Sales_Model_Order->sendNewOrderEmail()
#10 /app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Sales_OrderController->emailAction()
#11 /app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('email')
#12 /app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#14 /app/Mage.php(684): Mage_Core_Model_App->run(Array)
#15 /index.php(83): Mage::run('', 'store')
#16 {main}

I have set up my host as smtp.secureserver.net and the port is 25. I have copied the template.php file in the app>code>core>mage>core>model>email to my local directory and edited the getmail(). I would also like to mention that in the template.php file below the send() in this line:

if (!($this->hasQueue()) && $this->getQueue() instanceof Mage_Core_Model_Email_Queue) {

The above line generates an exception in the exception.log file but the original code which was this

 if (($this->hasQueue() && $this->getQueue() instanceof Mage_Core_Model_Email_Queue) {

doesn't generates any error in the log file. Please help, thanks in advance


texts:
I followed this tutorial to create the custom block in magento

http://www.gravitywell.co.uk/blog/post/how-to-creating-your-own-custom-block-in-magento

But nothing is showed when I open up home page or any other page. I have searched alot on web but unable to solve the issue.

The above tutorial did not mention where to create layout.xml file but I have created it at:

app\design\frontend\gravitywell\example\layout\layout.xml

It has just following code:

<block type="gravitywellexample/menu" name="menu" as="menu" template="gravitywell/menu.phtml" />

Any help will be highly appreciated.

Thanks in advance.

Here is local.xml at app\design\frontend\gravitywell\example\layout:

<?xml version="1.0"?>
 <layout version="0.1.0">
    <default>
        <reference name="right">
            <block type="gravitywellexample/menu" name="menu" as="menu" template="gravitywell/menu.phtml" />
        </reference>
    </default>
</layout>

This is config.xml at app\code\local\Gravitywell\Example\etc:

<?xml version="1.0"?>
 <config>
 <modules>
    <Gravitywell_Example>
        <version>0.1.0</version>
    </Gravitywell_Example>
 </modules>
    <global>
    <blocks>
        <gravitywellexample>
            <class>Gravitywell_Example_Block</class>
        </gravitywellexample>
    </blocks>
</global>

</config>

Here is menu.phtml at app\design\frontend\gravitywell\example\template\gravitywell:

   Hello Sir


texts:
I get a problem about cron jobs.

I have followed the tutorial both on 2.0 and 2.2

  http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html#config-cli-cron-bkg

  http://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-cron.html

And did setup of cron jobs,

I can ensure the location of the files are correct, because I have double checked many times. But the error "One or more indexers are invalid. Make sure your Magento cron job is running." remains there. I also clear the cache but it does not work...

Can anyone help me? Thanks for any advises.


texts: Magento 2 Email template How to add Controller Path

texts:
I want to add controller path in Email template.I have create custom email template using programmatically.
This is my code :-
{{template config_path="design/email/header_template"}}

Hello {{var name}} ,

You Are Confirom Delete Your Account in Our Store.

If {{trans 'Yes'|row}} Or  {{trans 'No'|row}}

        Thank you

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

I want to Following link add in For Example:-
xyz.com/routername/controllername/action/customerid/encryptedid..

Please Advice me How to add Dynamic URL,
THANKS.


texts: why images showing 404 when used inspect with .jpg.tmp

texts:
Randomly some product images are showing error only when i click inspect.

Error details :

  Failed to load resource: the server responded with a status of 404
  (Not Found).

See image below.

i looked around on google and forums, it was suggested it's permission issue with product images folder. but all permission are correct as per magento.

any help will be appreciated.


texts: How to uninstall Payssion Module in Magento 2?

texts:
I want to uninstall Payssion Module all folder and database.
How can i do? i read this reference but not understand.
http://devdocs.magento.com/guides/v2.2/install-gde/install/cli/install-cli-uninstall-mods.html


texts: Shipping method configuration Save Config button doesn't work

texts: Shipping method configuration Save Config button problem. It does nothing when I click it. I increased input limit value in php.ini. But it does nothing.


texts: Magento 2: Why Magento copy product images in pub static cache directory?

texts:
While I upload a image in Magento. Image path was like /001/21525-A-1000.jpg

But Magento is rendering images on front-end from this directory:

example.com/pub/media/catalog/product/cache/image/e9c3970ab036de70892d86c6d221abfe/2/1/21525-a-1000.jpg

So now as per my understanding this image is twice on my server.

Is this standard of Magento? OR Why Magento copy images in static cache directory?


texts: How to use the attribute value for parent configurable product to take effect on simple products to restrict payment method

texts:
I am trying to implement the card only payment option for specific products (configurable products) in this magento (1.9.1) store. The problem i am having with the code that i am using is that i need to go to each simple product and update the attribute value to take effect. What I would like to know if i can make changes to the code so instead of using the value of the simple product can the value of the parent product be used, regardless of what value the simple product is using. So i would just have to update the configurable product to say if this product is Card Only.

My Observer.php for this module

<?php

class JMAWD_CardOnly_Model_Observer
{
public function cardOnly(Varien_Event_Observer $observer)
{
   $event           = $observer->getEvent();
       $method          = $event->getMethodInstance();
       $result          = $event->getResult();
   $cardonly        = false;

    foreach (Mage::getSingleton('checkout/cart')->getQuote()->getAllVisibleItems() as $item)
    {
        if($item->getProduct()->getCardOnly()){
            $cardonly = true;
        }
    }

    if($method->getCode() == "cashondelivery" && $cardonly){
        $result->isAvailable = false;
    }

}
}

My config.xml for this module

<?xml version="1.0"?>
<config>
<modules>
    <JMAWD_CardOnly>
        <version>0.1.0</version>
    </JMAWD_CardOnly>
</modules>
<global>
    <events>
        <payment_method_is_active>
            <observers>
                <card_only>
                    <type>singleton</type>
                    <class>cardonly/observer</class>
                    <method>cardOnly</method>
                </card_only>
            </observers>
        </payment_method_is_active>
    </events>
    <models>
        <cardonly>
            <class>JMAWD_CardOnly_Model</class>
            <resourceModel>cardonly_mysql4</resourceModel>
        </cardonly>
    </models>
    <sales>
        <quote>
            <item>
                <product_attributes>
                    <card_only/>
                </product_attributes>
            </item>
        </quote>
    </sales>
</global>
</config>

Help & advice appreciated. Thanks


texts:
How can I get all rates of the customer?

For review, I do it like this:

public function getReviews($isApproved=false)
{
    if($this->reviewData!=null)
        return $this->reviewData;
    $reviews=$this->reviewFactory->create();
    if ($isApproved) {
        $reviews->addFieldToFilter("approve_status",$this->status::Review_Approved);
    }
    $this->reviewData=$reviews;
    return $reviews;
}


texts: Set Grid Mode as default for some specific categories - Magento 2

texts:
I have list mode view set as default for my whole store, however, some categories I would like to have grid view mode set as default.

Any thoughts?


texts: Magento 2, force login on product and catalog pages

texts:
I have found this module :
https://github.com/bitExpert/magento2-force-login
and this topic :
Force login to access catalog and product pages
but I still think there must be a simpler solution, to just limit access to product and catalog pages.
What would be the optimal point of departure for such a module?
Thanks guys!


texts: Magento 2 - Replace the Toplinks HTML class "Link"

texts:
How can I replace the HTML Class of the top links block? I thought I can do it by overriding this class https://github.com/magento/magento2/blob/2.4-develop/lib/internal/Magento/Framework/View/Element/Html/Links.php
But not sure if it is the right thing to do, please advise.


texts: How to Refresh/reload Magento 2 Quote Object in checkout session/page

texts:
TLDR

How can we reset or refresh or reload the quote session/cache key with the shipping address collection that belongs to it in Magento 2 checkout page.

Lengthy/Confusing Explanation

We are developing a custom checkout page with Mageplaza Onestepcheckout - the extension itself works ok without any extra functionality.

With this we are adding Address selector/choose as modal box with new address form - so here when ever customer submits a address its getting added to customer_address_entity as we have it in the code for new address.

With below code we are able to get the shipping methods works ok since magento finds matching address if the address was added/exist before.

    .............
    $quote = $this->prepareShippingAssignment($quote, $address, $carrierCode . '_' . $methodCode);
    $this->validateQuote($quote);
    $quote->setIsMultiShipping(false);

    try {
        $this->quoteRepository->save($quote);
    } catch (\Exception $e) {
        $this->logger->critical($e);
        throw new InputException(__('We are having a problem getting shipping rates. Please check the address you entered or contact customer service.'));
    }
    ..............

But if we use the newly added address from the our custom form in checkout to quote_object as Shipping address in this line $this->quoteRepository->save($quote);  it throws exception as "Invalid customer address id [Last_added_customer_address_id]" - but this customer_address_id does exist in DB.

Because quote save goes into this callstack for to validate address against the current quote here \Magento\Quote\Model\QuoteAddressValidator::validate - this function always pulls only previous set of addresses - some how we have to say magento to reset the cache key/refresh the quote session/object to reload shipping address list but am not able to follow where/how that can be done.

This seems to be session/cache issue because if we add one more address then the previously added address pulls shipping methods ok since Magento refreshes the address list/quote shipping object some where - not sure how this is being done.

How can we reset or refresh or reload the quote session/cache key with the shipping address collection that belongs to it.


texts:
There is observer in my magento 1 site for event vat_check_after.

In this observer the code is:

$validation_result = $observer->getEvent()->getValidationResult();
if($validation_result->getVatRemoved() == true){
.....
}

but in one page checkout there is exception thrown:

  Call to undefined method stdClass::getVatRemoved()

I did not find this method anywhere so what should I do to prevent exception? How can I debug this issue?


texts: I want to customize my minicart in Magento 2. I need to add 3 attributes: SKU, Manufacturer, and Manufacturer part number. These are existing attributes. I see where to add the output values but not where to call them from.


texts: How to show particular product in cms page?

texts:
I want to display specific product in CMS static page.
I want to create a .phtml file which displays particular product detail page based on the product id in cms page.
How can i do it.


texts: How to set "view full site" link in the mobile theme?

texts:
I am creating a mobile theme for the magento store so that the same url(e.g. example.com) for the store when watched in the mobile devices then it will look differently.

I have added the exception feature of magento in the admin site for the mobile devices.

Now in the footer I want to keep a link called "View full site" which when clicked , should show the other theme which is used for the desktop view.
How can I do this ?


texts: custom XMl works well on dev machine but doesn't work properly on server

texts:
Having a strange issue on custom created modules layout xml in 2 different environments.

On dev machine all created xmls are getting loaded and executed but when pushed code on server none of the declaration inside xml aren't taken in consideration.

What can cause this behaviour? if the module is called directly than it works

{{block class=Vendor\Custom\Block\TopSellers" template="Magento_Catalog::product/list.phtml" name="topsellers"}}

How to debug this kind of cases?

I see that module is enabled

I already run these commands

rm -rf var/di var/cache/ var/generation
rm -rf pub/static/*

bin/magento setup:upgrade

bin/magento setup:di:compile

bin/magento index:reindex

bin/magento setup:static-content:deploy


texts: Magento 2 - Check if static block is enabled

texts:
On my Magento 2 store I have a static block that outputs a message to inform customers that the prices are not currently available. On my template files I'd like to wrap the prices and Add to Cart buttons to an if/else statement, so those elements are not created if that static block is enabled:

if ( 'static block "disable_store" is active' ) {
    echo "No prices available at this time";
} else {
    ... show the price etc ...
}

The bit I can't figure out is what to put on the if line. Please note that I don't want to output the contents of the block here, just to check if it's enabled or not.


texts:
I am pretty new to Magento2 and my question may sound banana to most of you.
I would like to know how can I compile my less file.

  app/design/frontend/my_theme/web/css/source/_layout.less

thank you so much in advance


texts: Magento 2: How to change page layout from to 1column

texts:
What's up guys, i know this is some kind of basic question, but here's the thing, i can't change page layout from catalog_product_view.xml to 1column.
I've try using new custom theme, and EVERY content in that custom them is worked perfectly, but not with the layout="1column" in catalog_product_view.xml
Here is it:

  C:\xampp\htdocs\my-project\app\design\frontend\Gssi\jewellery\Magento_Catalog\layout\catalog_product_view.xml

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <!-- create new custom tab in product detail page -->
        <referenceBlock name="product.info.details">
          <block class="Magento\Catalog\Block\Product\View" name="custom.tab" as="custom_tab" template="product/view/custom_tab.phtml" group="detailed_info" >
             <arguments>
                <argument translate="true" name="title" xsi:type="string">Custom Tab</argument>
             </arguments>
          </block>
        </referenceBlock>

        <move element="product.info.details" destination="product.info.extrahint"></move>
    </body>
</page>

You see, every content in this file is worked. the referenceBlock name="product.info.details" work, the move element="product.info.details" work. But not with the layout="1column".

Are there something in admin page that i need to check? I've searching everywhere but can't find anything ..
Any idea? Please help, thanks :)


texts:
I am trying to Create a Related Product Rule but when I get to the step of select specific Attribute set (like color) I don't see it as an option of other  Attribute but only Attribute Set is Default.

I have seen on places I can select from all kind of Attribute but I just not getting it.

https://prnt.sc/n0clo1

https://prnt.sc/n0cm56

You can see I don't have the option of all the Attribute like color, size...
You can see I don't have the option of all the Attribute like color, size...

what will help me to make a new attribute set? i need to use the attribute that in the attribute set like color, size.... like this: https://prnt.sc/n0vnbu
what i am getting is this (when i have colors, size in the "Attribute set") https://prnt.sc/n0cm56


texts: Magenot2: what is the use of `resource` paramerter in menu.xml

texts:
i created one testing module in magento2 and for backend added menu by this code:

location of this file is Test/Seller/etc/adminhtml/menu.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Backend/etc/menu.xsd">
<menu>
<add id="Test_Seller::seller" title="Seller" module="Test_Seller" sortOrder="40" resource="Test_Seller::seller"/>
    <add id="Test_Seller::items" title="Manage Sellers" module="Test_Seller" sortOrder="40" parent="Test_Seller::seller" action="selleradmin/manage/" resource="Test_Seller::items"/>
</menu>
</config>

its working fine. all parameters are clear but what is ther use of resource parameter in add node.
if i remove this parameter then "Missing required param resource" error is coming.


texts: Data Migration Tool interrumpted, and know I can´t start again

texts:
I have a problem running Data Migration Tool to migrate a Magento 1.7.0.2 to Magento 2.2. I run the command:

php bin/magento migrate:data -r vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.7.0.2/config.xml -vvvv

And it shows the progress, but stayed in EAV Setup:

[2018-01-25 22:14:55][INFO][mode: data][stage: integrity check][step: Data Integrity Step]: started
100% [============================] Remaining Time: < 1 sec
[2018-01-25 22:14:55][INFO][mode: data][stage: integrity check][step: EAV Step]: started
100% [============================] Remaining Time: < 1 sec
[2018-01-25 22:14:55][INFO][mode: data][stage: integrity check][step: Customer Attributes Step]: started
100% [============================] Remaining Time: < 1 sec
[2018-01-25 22:14:55][INFO][mode: data][stage: integrity check][step: Map Step]: started
100% [============================] Remaining Time: < 1 sec
[2018-01-25 22:14:57][WARNING]: Mismatch of data types. Destination document: testimonial. Fields: content
[2018-01-25 22:14:57][INFO][mode: data][stage: integrity check][step: Url Rewrite Step]: started
100% [============================] Remaining Time: < 1 sec
[2018-01-25 22:14:57][INFO][mode: data][stage: integrity check][step: Log Step]: started
100% [============================] Remaining Time: < 1 sec
[2018-01-25 22:14:57][INFO][mode: data][stage: integrity check][step: Ratings Step]: started
100% [============================] Remaining Time: < 1 sec
[2018-01-25 22:14:57][INFO][mode: data][stage: integrity check][step: ConfigurablePrices step]: started
100% [============================] Remaining Time: < 1 sec
[2018-01-25 22:14:57][INFO][mode: data][stage: integrity check][step: OrderGrids Step]: started
100% [============================] Remaining Time: < 1 sec
[2018-01-25 22:14:57][INFO][mode: data][stage: integrity check][step: Tier Price Step]: started
100% [============================] Remaining Time: < 1 sec
[2018-01-25 22:14:57][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started
100% [============================] Remaining Time: < 1 sec
[2018-01-25 22:14:57][INFO][mode: data][stage: setup triggers][step: Stage]: started
100% [============================] Remaining Time: < 1 sec
[2018-01-25 22:14:59][INFO][mode: data][stage: data migration][step: EAV Step]: started
28% [========>-------------------] Remaining Time: < 1 sec

And stayed there for a very long time (one hour or more), and the percentage did not change.. So, in my despair, I canceled the command and ran the command again. But when I did it, the screen only shows the Reset the current position of migration to start from the beginning message and nothing more. Stay in that form for hours again, and nothing happens.

What could I do to run the migration again successfully?

Thanks.


texts: Magento admin Store Email Addresses Email id not set

texts:
I have domain with .XYZ extension means test@abc.xyz.

I had tried to set ID in to

ADMIN -> System -> Configuration -> General -> Store Email Addresses

Not set it and Fire a ERROR :

  Invalid email address test@abc.xyz.

So who to set it.


texts: How to have different toolbars for top and bottom of products page?


texts:
I am trying to remove the add to cart and add to compare buttons from the category page. At present I have used the following code:

<referenceBlock name="product.info.addtocart" remove="true" />
<referenceBlock name="product.info.options.wrapper.bottom" display="false" />

In my Magento_Catalog/layout/catalog_category_view.xml without any success


texts:
We only allow 1 country in our Magento store.
Now we load on a custom module the country selector, but this does not select the only country as default selection.

It currently show a select box with the following values. But we want to select NL as a default country. How can we achieve that?

<select name="billing[country_id]" id="billing:country" class="validate-select" title="Land">
    <option value="" selected="selected"></option>
    <option value="NL">Nederland</option>
</select>

Our code:

            <label for="<?php echo $this->getAddedFieldName(); ?>:country"><?php echo Mage::helper('sales')->__('Country') ?>
            <?php echo $this->getFieldRequiredSpan(true); ?>
            <?php echo Mage::getBlockSingleton('directory/data')->getCountryHtmlSelect(
                $parent->getValue('country_id', $formType),
                $this->getAddedFieldName().'[country_id]',
                $this->getAddedFieldName() . ':country',
                Mage::helper('sales')->__('Country'));
            ?>


texts: Do you think it's a good idea to force Google AMP on all Magento pages?

texts:
I have Magento 2, and I'm using an AMP extension. And there is an option that says, force AMP on all mobile pages. Should I enable this or just not enable it? What are the benefits of forcing people to use AMP if they don't have to?

The site obviously looks better on mobile without the AMP pages.


texts: Change amount of orders shown per page in account

texts:
The default amount of orders shown in the Magento account page in Frontend is 10. Also you have the option to show 20 or 50 orders in the table. I want to set the default to 50 or maybe even 100 orders shown. Also i want to achieve this for the product reviews.

Please see screenshot attached.


texts: Magento 2 Product Insertion area custom multiselect field how to save?

texts:
I am add a Multiselect into the custom section product insertion area.Please show below screenshot:

I add this multiselect into the

  F:\xampp-7.2.14\htdocs\magento230\app\Code\Vendor\module\view\adminhtml\ui_component\product_form.xml

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="cs_product_custom_option">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string" translate="true">cs Product Custom Option</item>
                <item name="dataScope" xsi:type="string"/>
                <item name="sortOrder" xsi:type="number">10</item>
                <item name="collapsible" xsi:type="boolean">true</item>
                <item name="opened" xsi:type="boolean">true</item>
            </item>
        </argument>
        <field name="cs_custom_option">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">cs\Customproduct\Model\Source\CustomoptionValues</item>
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">text</item>
                    <item name="label" translate="true" xsi:type="string">Select the options</item>
                    <item name="formElement" xsi:type="string">multiselect</item>
                </item>
            </argument>
    </field>

    </fieldset>

How to save its value into the database with products ?

Thanks in a Advance


texts: Magento 1.9.x show, value cart rules in products page

texts:
I want to show the value of the discount created with the cart rules, and applied to the products set in the rule with sku.

The first idea, I came to mind was to create a dropdown attribute and then call it on the product page, and it works. But this creates me the difficulty, I have to set this attribute for thousands of products.

So, I would like to find a solution that would allow me to see the value of the discount applied to the cart rule or Label and in alternative description of the cart rule, for the various sku for which the rule is set.

Do you have any suggestions how make it?

Thanks


texts: Popup for different products in Magento 2

texts:
I have to make a pop-up window under the products on the sales page. Instead of redirecting to ordering, a feedback form should appear. The problem is that I do not know how to tie a pop-up window separately to each product in order to transfer its values to the form. Js defines only the first press of the button, because the id of all buttons is the same.

<?php foreach ($block->getSaleCategory(16) as $product) : ?>

<?php echo $block->getMediaPath($product->getEntityId()) . $product->getImage() ?>

<?php echo $product->getName() ?>

<button type="button" id="openModel" class="custom_model_popup" >Order</button>

<?php endforeach; ?>

        <form action="<?php echo $block->getBaseUrl() . 'sale/frontend/sendmail' ?>" method="post" id="form-validate" enctype="multipart/form-data" autocomplete="off" data-mage-init='{"validation":{}}' data-hasrequired="<?php /* @escapeNotVerified */ echo __('* Required Fields') ?>">
            <input name="email" value="email">Email

            <input name="name" value="name">Name

            //there must be hidden fields with product data
        </form>

            <img src="<?php $this->getBaseUrl() ?>pub/media/home/loader-2.gif" style="height: 150px;width: 150px">

How can I implement a pop-up window for each product and transfer its values to the form?


texts: no commands defined in the “setup” namespace

texts:
[InvalidArgumentException]
  There are no commands defined in the "cache" namespace.

I am using putty to run some commands. if I run
php bin/magento setup:cache
Is there any thing I missed during installation


texts: How do I reinstall Magento 2.1, but keep all my CMS Pages, Blocks, Product Data?

texts:
I have built my entire site on a Magento 2.1.2 installation w/ sample data.  Using an extension and some manual labor, I was able to delete most of the sample data (categories, pages, products), but as stated in the docs, it does not clear the database completely.

In the docs it also says NOT TO DO ANY DEVELOPMENT with sample data installed...but due to time constraints and having to "learn Magento overnight", I went forward.

Now, my O.C.D. is kicking in and I want a clean install.  With all the changes coming, I'm worried that the old installation with the sample data will clog my current site if I proceed with updates...feel like building a house on top of the mud.

Question 1 => Will having sample data on my initial install be a problem down the line?

Question 2 => Is there a way to export the "changes" I've made and reinstall a clean instance of Magento, then upload those changes (mostly CMS pages, blocks, images, and product)?  I'm afraid of a full "migration" because I don't want the old "sample data" transferring to the new site as well.

Thanks in advance!


texts: Error when restoring full system backup on a new Server (Bitnami Magento 2.2.1)

texts:
I'm migrating a webshop to a new server, I was hoping it could be as simple as doing a full system backup on one server and a restore on the new server.

But after restoring the backup on the new server I cannot access the website anymore and when I run the bnconfig --machine_hostname command I get the following error output:

  BlocProblem running post-install step. Installation may not complete correctly
   Error running /opt/bitnami/mysql/bin/mysql --user=bn_magento --host=localhost --socket="/opt/bitnami/mysql/tmp/mysql.sock" --database=bitnami_magento -p**** <<"EOF"
  UPDATE core_config_data SET value ='http://54.194.xx.xx/' WHERE core_config_data.path ='web/unsecure/base_url';
  EOF: Warning: Using a password on the command line interface can be insecure.
  ERROR 1045 (28000): Access denied for user 'bn_magento'@'localhost' (using password: YES)
  kquote

So this leads me to believe that the new server is having issues with some hardcoded passwords in config files that needs to be updated for the new database.

Does anyone know where I should look for these config files, or could the problem be something else entirely?


texts: Magento 2: Limit the orders for a specific admin user

texts:
I have created an admin user who can upload products, after that if he got an order for this product this will show in order page normally, what I want is to limit the only products that he uploaded (I am keeping track of admin user with his ID by the product attribute), so he will be able to see only his orders.
but here the all orders is showing...


texts: Magento 2.3 admin custom form ajax not working

texts:
Custom form ajax submit data not working in magento 2.3
its working with magento 2.1 and 2.2.x versions.

  Error 401 (Unauthorized)

  Failed to load resource: the server responded with a status of 401
  (Unauthorized)

Please give any suggestion


texts:
I'm quite new to Magento (ver 1.9.1.0).
I'm trying to add my own CSS that should apply to all pages.

I can't seem to make it work just by adding it on /app/design/frontend/base/default/layout/page.xml

Using the following:

<block type="page/html_head" name="head" as="head">
    <action method="addItem">
        <type>skin_css</type>
        <name>css/custom-style.css</name>
    </action>
</block>

My CSS is located at /skin/frontend/base/default/css.

I've seen some posts suggesting that I should add it into layout.xml but I can't see it anywhere on /app/design/frontend/base/default/layout/

Am I doing something wrong? Or is there any other way to do this without using Layout XML Update from the Admin Panel?


texts: Magento 2 First Name is a required field Error While Placing Order

texts:
When I try to place an order after the customer registration/Login. Magento 2.2.5 shows "First Name is a required Field Error".
A Sample error message is attached.

This is the response I am getting:


texts: I would like to use pagination by text box where client can type the number of product page and click go/submit button.


texts:
I have recently migrated a Magento website which had been using merge_css_files successfully.

On the new server, however, I cannot get it to work and would very much appreciate any advice on the matter. The system will create the CSS files in media/css but they are always blank (unpopulated). I suspect that this might be something to do with the server itself as it worked previously on the old server.

I have already toggled Merge CSS on and off, flushed the caches multiple times, deleted the files from the media/css folder, updated all file and folder permissions, checked the ownership in FTP.

Perhaps you have experienced the same or could advise on a possible solution?


texts:
i am currently trying to wireframe a very custom website e-store, i will try to be as direct and clear as possible to my question:

Is it possible to have for example, in a product page where you are selling a 1 piece canvas product where you have 3 pictures as a mockup of that 1 canvas example, and then on the side you have multiple options, one of them is to split that canvas in 3 pieces (multi-canvas), switching those 3 mockup photos to the 3 new ones that display the multi-canvas instead? To this question im almost certain its possible but its always good to ask again because it relates to my REAL doubt.

Is it possible in the Product list page, have a filter that we would choose to filter 1 piece canvas, and it would only display images of that, and then there was another filter that would display only the 3 pieces canvas. Is it possible to do this without creating multiple products? In this scenario i only gave 2 options but in reality it would have many more, just wondering if its possible to do that kind of filtering without having to create different product per each circunstance.

Im not asking how to do it, im sure its really hard and needs an expert, just asking if its possible.

Thank you so much for your feedback in advance :)


texts:
I have a client that would like to do the following when creating an Admin Sales Order (without creating a Price Rule);

Give £10 discount when ordering 4 of Product A (Unit Price: £10).

At present, it seems that the only way this can be done is by checking the Custom Price and setting the Unit Price of all 4 items to £7.50 to give the discount of £10 making a total of £30.

The ideal would be to do something like this;

Add 2 of Product A at £10
Add 2 of Product A at £5

So that the total would be £30 instead of £40. Or to have a field when creating the admin order that can simply add a fixed amount discount to the order.

The client gives different discounts and they don't want to have to keep creating a price rule every time that they wish to create an admin order with a discount.

Has anyone comes across an extension that can do this before? I've done endless searching online and have asked at some of the extension developers like Amasty, Webshopapps and Mageworx etc but they're all pretty certain that this isn't possible. But I figured I would try here too as I hate telling a client that something just can't be done within the Magento framework.


texts: How to add extra comment in invoice pdf in magento2 backend?

texts:
I know the override way

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

but have any other better way to insert extra filed in pdf

because i want to add lots different filed in different modules in pdf


texts: in catalog module i found method called addShortcut but in that method there is an use of instanceof i did not understand what it is

texts:
public function addShortcut(Template $block)
{
    if ($block instanceof ShortcutInterface) {
        $this->_shortcuts[] = $block;
    }
}

here is the function which im talking about , in if block there is an use of instanceof method may i know what exactly happening in if block and what is the use of instanceof in it.


texts: Catalog + Categories + Attribute Set import / export tool

texts:
I am looking for a comprehensive import / export tool for Magento 2.0.

I have a typical development environment where there is a dev instance, a staging and production environment.

I am embarking on a set of new websites development and need a way to export / import / sync any product definitions in the catalog to the other Magento instances.

The tool must be able to create new records or update existing records.

The type of data must include the catalog (simple, virtual, grouped, and bundled products / bundle items), attribute sets, categories, attribute values, pricing, preserving default vs. website values, images, etc.

Please let me know if you know of a suitable extension or solution.


texts: Strange Error when running setup:upgrade after module installation

texts:
I have tried to install wyomind google shopping and have the following error when running bin/magento setup:upgrade.

[UnexpectedValueException]
Unable to retrieve deployment version of static files from the file system.

[Magento\Framework\Exception\FileSystemException]
Cannot read contents from file "/var/www/vanillamage2/public_html/pub/stati
c/deployed_version.txt" Warning!file_get_contents(/var/www/vanillamage2/pub
lic_html/pub/static/deployed_version.txt): failed to open stream: No such f
ile or directory

I have tried this on 2 seperate server and 3 seperate installation of Magento 2.1.7 however recieve the same issue each time. I have seen similar issues here:

https://github.com/magento/magento2/issues/6426

and

http://olivernam.com/magento2-frontpage-error-after-deploying-static-files

So have tried many solutions mentioned here including redeploying static files , resetting permissions, removing static content, placing empty deployment_version.txt ect but without any luck. I have even set that file to 777 and has correct owner and am pretty sure that is not the issue as my solutions below wouldn't change the permissions of this file.

There are only 2 ways I can get the setup:upgrade to run.

Disabling the plugin.
Rename app/code/Wyomind/SimpleGoogleShopping/Setup/UpgradeData.php to UpgradeData.bak

Doing either of these allow 'setup:upgrade' to run however Wyomind are suggesting this is a problem on my side and not their plugin and so are unwilling to help.

Is there anything anyone can suggest that may be causing this issue?


texts: Magento 2: Preload shipping estimation without filling up shipping address details

texts: In checkout cart summary, is there a way to preload the shipping estimation without filling up the detail and choosing the shipping method? so when we first load it will show subtotal, shipping rate, and Order total


texts: Magento 2.2.5 : public function getConfiguredAmount(): \Magento\Framework\Pricing\Amount\AmountInterface

texts:
From this \vendor\magento\module-wishlist\Pricing\ConfiguredPrice\ConfigurableProduct.php

File I find below code:

public function getConfiguredAmount(): \Magento\Framework\Pricing\Amount\AmountInterface
    {
        /** @var \Magento\Wishlist\Model\Item\Option $customOption */
        $customOption = $this->getProduct()->getCustomOption('simple_product');
        $product = $customOption ? $customOption->getProduct() : $this->getProduct();
        return $product->getPriceInfo()->getPrice(ConfiguredPriceInterface::CONFIGURED_PRICE_CODE)->getAmount();
    }

What the below code mean

public function getConfiguredAmount(): \Magento\Framework\Pricing\Amount\AmountInterface


texts: How to add extra column in Item ordered tab in Magento2.3?

texts:
How to add an extra column in Item ordered tab in Magento 2?

PFA

Any ideas?


texts: Undefined offset: 19 in \vendor\magento\data-migration-tool\src\Migration\Step\Eav\Data.php on line 279 in magento migration

texts:
I am facing the below error while migrating from m1.9 to magento 2.3.3 version.
Notice: Undefined offset: 19 in \vendor\magento\data-migration-tool\src\Migration\Step\Eav\Data.php on line 279 while migrating m1.9 to magento 2.3
Help me to resolve this.


texts:
I have this query to get the prices of all sold products of a shipping date:

SELECT ShippingDay,
       round(Sale_in_Euro,2) AS Sales,
FROM
SUM(SELECT (cped.value * sfoi.qty_ordered)
                 FROM catalog_product_entity_decimal AS cped
                 WHERE cped.entity_id = sfoi.product_id
                   AND cped.attribute_id = 99)) AS Sale_in_Euro
FROM sales_flat_order AS sfo
   INNER JOIN sales_flat_order_item AS sfoi ON sfoi.order_id=sfo.entity_id
   WHERE (sfo.status = 'processing'
          OR sfo.status = 'pending')
   GROUP BY sfo.shipping_arrival_date
   ORDER BY sfo.shipping_arrival_date DESC) AS resulttable

However cped.value is the value of the product including taxes. I now want to include that the taxes are substracted from the calculation, but I am a bit confused where to find the appropriate information.

I find the tax_class_id of the product in catalog_product_index_price - then there are other tables like tax_calculation_rate and tax_calculation, but how are they connected? Any suggestion how I can substract the taxes from the product prices in the query above?

And what is stored in sales_order_tax_item?


texts: How to add fee to order totals in Magento 2

texts:
The following link will describe

http://excellencemagentoblog.com/blog/2012/01/27/magento-add-fee-discount-order-total/

to add fee to order totals in Magento 1.

Now this functionality is moved to Quote module in Magento 2 .

I think still same concept like collect and fetch methods.
Has anyone tried this in Magento 2?


texts: Can not update configurable products, price of simples suddenly become 0,00

texts:
Preconditions

Magento 2.1
Nginx
PHP 7.0.9
Memcached
Redis Server

Steps to reproduce

Add a new configurable product
Create the simple products while creating the configurable product
Save the product
Open the configurable product again
Upload images or change any other data
Save the product

Expected result

Configurable product gets updated.

Simple products related with the configurable product should stay the same

Actual result

The simple products suddenly have the price of 0

What has been done allready

I did a clean install of Magento
I setup a new server with Magento
Reported the bug with Magento, but they cannot reproduce the error https://github.com/magento/magento2/issues/5973

Is there anyone else that stumbled uppon this bug? And if so how did you solve it.

If you did not solve it can we reported the error together or fix it together?


texts: EcomDev_PHPUnit assert block property contains

texts:
I am having a problem asserting that a blocks property contains an array key.

I have added a link to the my customer account area using the following XML:

<customer_account>
    <reference name="customer_account_navigation">
        <action method="addLink" translate="label" module="namespace_ordermigration">
            <name>migration</name>
            <path>migration/order/list/</path>
            <label>Migrated Orders</label>
        </action>
    </reference>
</customer_account>

That addLink method is called on the block Mage_Customer_Block_Account_Navigation which has a protected property $_links = array();

Here the closest I could get with a EcomDev_PHPUnit_Test_Case_Controller test:

public function testMyAccountButtonDefined()
{
    $this->dispatch('migration/order/list');

    $this->assertLayoutBlockPropertyEquals('customer_account_navigation', '_links', array('migration' => ''));
}

Which fails:

1) Namespace_OrderMigration_Test_Controller_OrderController::testMyAccountButtonDefined
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
-    'migration' => ''
+    'migration' => Varien_Object Object (...)
+    'account' => Varien_Object Object (...)
+    'account_edit' => Varien_Object Object (...)
+    'address_book' => Varien_Object Object (...)
...

Does anybody know how I could get access to the property it is testing so I could do a simpler PHPUnit test with the results?

Another potential option is creating a new wrapper around the assertContains method of PHPUnit_Framework_Assert in EcomDev_PHPUnit_Test_Case_Controller called something like $this->assertLayoutBlockPropertyContains. This is quite a bit of work and it would probably be better spent exposing the response.


texts:
I wish to have code equivalent in Magento 2.

The below one is Magento 1

  $resource = Mage::getSingleton('core/resource'); $connection =
  $resource->getConnection('core_read');

I need the above code in Magento 2.


texts:
/var/www/html/magento23# php bin/magento setup:di:compile
Compilation was started.
Area configuration aggregation... 5/7 [====================>-------]  71% 1 min 282.0 MiB
In ClassReader.php line 35:
Class Magento\Framework\Model\Resource\AbstractResource does not exist
In ClassReader.php line 29:
Class Magento\Framework\Model\Resource\AbstractResource does not exist
setup:di:compile


texts: Date range error when trying to change the design

texts:
I'm test running Magento 1.8.0.0 (community) and I've stumbled upon an error when trying to change designs. First, I changed the design from the default to "default/iphone", and it worked like a charm. However when I tried to change the design to a custom one, I got the following error:

  Your design change for the specified store intersects with another one, please specify another date range.

I keep getting the same error even if I try to change the design to one of the default included ones (e.g. "default/modern").

Clearing the design_change table solves the issue, but I can't mess with the database everytime I want to change the design. Is there a non-programmatic solution?


texts: Magento 2 code sniffer showing session_id() warning

texts: After running the code sniffer on Magento 2 extension got several warnings and that includes one warning saying "The use of function session_id() is discouraged". So what is the alternative to get the session_id in Magento 2 extension?


texts: bin/magento setup:di:compile getting 'generated' directory permission is read-only' error

texts:
During run bin/magento setup:di:compile getting following error, i gave 777 permission to generated folder still getting error. How to solve the following error,
Class Magento\Inventory\Model\Source does not exist
  Class Biztech\Inventorysystementerprise\Controller\Mobileassistantpro\Product\addNewProduct\Interceptor generation error: The requested class did not generate prop
  erly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory
   permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related constru
  ct method, only.


texts:
When looking inside Magento 2 core code, I found some commented methods, as it was in Magento 1 :

 * @method string getState()
 * @method string getStatus()

I know how it works technically, and the interest for the developer, but is it a good practice in terms of coding? Does-it add some overhead to magento, or the compilation does the job?


texts: Image Uploading Issue After Applying Patch 8788

texts:
We are facing an issue of image upload in catalog product in admin after applying patch 8788. Please do not say clear magento cache, clear browser cache, flush CDN etc...etc...we already tried all these. We do not have CDN.

Please check the attached screenshot to see the jquery/javascript/json error that comes in console while uploading any image in product. It only says Uploading, then no process.


texts: gd library or image magick - which is better

texts:
We need product personalization feature, means we want customers to upload the product image and add text from frontend. then when he buy product, we will send a product with same image.
[ ex product- T-shirts ].

For Provide this option for uploading an image and adding texts and color, is it better to use g98 or image magick or canvas library ? Is there any free extensions available ?


texts:
I want the total tax amount must be equal if I calculate it via grandtotal incl. Tax.

Like:

Product Ordered :  P1 = $10 (Incl. Tax) P2 = $20 (Incl. Tax)

Subtotal = $30 Shipping = $30 (Incl. Tax)
 Grand total Incl Tax : $60
Total Tax(7%) : $3.92 (I want this should be 3.93)
Grand total excl. Tax : $56.08 (It should be 56.07)

Because I set same tax class for both Shipping and Products.
Set Tax rate to 7%.

When I calculate 60 * 7 /107 = 3.9252 = 3.93

But I guess in magento it is like :

Product total tax via row total = 30 * 7 /107 = 1.9626 = 1.96
Shipping tax = 30 * 7 /107 = 1.9626 = 1.96
Total Tax = 1.96 + 1.96 = 3.92 (That is different if I calculate it on grand total)

(I don't want to round tax individually, I want to round the total tax amount (Product tax + shipping))

Suggest how can I achieve this.