texts: Payment methods are not visible in backend

texts:
I am working a vanilla Magento 1.9 setup and trying to set up payment methods.

Once I activate in the backend at System -> Configuration -> Payment Methods they become visible in the frontend, but if I try and place an order through Orders -> Create new order, I cannot choose any payment methods.

I understand that some payment methods have been deliberately programmed to disallow backend payment using the $_canUseInternal instance variable for security reasons (e.g. entering credit card details), but picking a payment method such as Bank Transfer should not classify as such. If I look at the implementation in app/code/core/Mage/Payment/Model/Method/Banktransfer.php I can see that it doesn't override $_canUseInternal which is set to true in the abstract superclass.

I have checked the configuration scope in System -> Configuration and it's correctly global/default with no website overrides present.

What am I missing?


texts: Customer account navigation link removal is not working

texts:
I want to remove some of the navigation links in my account page so I have put the below code at the path:

  app/design/frontend/vendor/theme/Magento_Customer/layout/customer_account.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" design_abstraction="custom">
<body>
    <referenceBlock name="customer-account-navigation-orders-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-wish-list-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-newsletter-subscriptions-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-product-reviews-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-my-credit-cards-link" remove="true"/>
</body>
</page>

However, its not working. I have also tried in the core file, /vendor/magento/module-customer/view/frontend/layout/customer_account.xml. But still no luck. I have cleaned the cache and run all the commands.

It's working in local but having issue in the server. Is it something related to DB. If yes, where could be the issue?

Can anyone please help?


texts:
The Product prices are entered in Indian Rupees

display currency is set as: Us Dollar
base currency is          : Indain Rupee

as we all know magento checkouts in base Currency. Is there is a way to checkout in display currency?
it will save a lot of hassle.

i use paypal standard as payment processor

help would be appreciated


texts: Make custom option price to be added to bundle product price in cart

texts:
All this for bundle products with price type dynamic - when prices are calculated based on selections products.

Mage_Bundle_Model_Product_Price::PRICE_TYPE_DYNAMIC === 0

A custom option of type checkbox was added to a bundle product.
The custom option is passed correctly when product is added to cart and further in the order in admin. This is ok.
On the product page the correct price is displayed: bundle price + custom option price.

The price of the custom option is not cumulated with the bundle product price on cart page.

I've debugged a lot Magento on this feature and I can't seem to find where the price of the custom option is added to a simple product price in cart.
Better said: where is the sum of custom option price and simple product price first time calculated or/and stored in quote item.

I also searched for the part of code for bundle products where the custom option price is disregarded or even unset/destroyed.

I've followed a few debug backtraces:
- from cart controller addAction function,
- getFinalPrice in type/Price.php classes
and other.

What I can say is that getFinalPrice function seems to return the correct price (bundle price + custom option price).

Anyone knows how this feature could be approached ?

I'm not interrested in using an extension for this. I know there are available extensions for this feature.

EDIT:

Further investigating, quote items may be saved for the first time when adding a product to cart (addAction) in:

Mage_Sales_Model_Quote::_afterSave()
$this->getItemsCollection()->save(); // with this

The price in quote item is set for the first time during

Mage_Sales_Model_Quote::collectTotals()
$address->collectTotals(); // with this line when address is shipping

Function setPrice of quote item is called for the first time in:

Mage_Sales_Model_Quote_Address_Total_Subtotal::_initItem

Until now the price is correct. It sums the bundle total selections price with the custom option price and set it with setPrice.

The problem is in:

Mage_Tax_Model_Sales_Total_Quote_Subtotal::_recalculateParent()

where it recalculates the parent product price (the bundle product - current item) using selections product prices (the sum of the simple products prices).
In the same class in function, the parent product price is recalculated because the bundle quote item is marked as isChildrenCalculated:

Mage_Tax_Model_Sales_Total_Quote_Subtotal::collect()

if ($item->getHasChildren() && $item->isChildrenCalculated()) {
            foreach ($item->getChildren() as $child) {
                $this->_processItem($child, $addressRequest);
            }
            $this->_recalculateParent($item);

Resolving the custom option price is related to:

Mage_Sales_Model_Quote_Item_Abstract::isChildrenCalculated

Now I'm not sure if I should mess with 'isChildrenCalculated' because there are other parts of Magento code which depend on it.

EDIT 2:

A workaround would be to add custom options prices to one of the simple products (of a selection) using the event 'sales_quote_product_add_after' like they do here:
https://stackoverflow.com/questions/5104482/programmatically-add-product-to-cart-with-price-change


texts: problem "extending" item renderer : duplicate content generated

texts:
I try to overload sales/order/items/renderer/default.phtml to modify order printing format

In my layout.xml I defined :

<sales_order_view>
    <reference name="my.account.wrapper">
        <block type="sales/order_view" name="sales.order.view">
            <block type="sales/order_items" name="order_items" template="sales/order/items.phtml">
                <action method="addItemRender"><type>default</type><block>sales/order_item_renderer_default</block><template>mymodule/sales/order/items/renderer/default.phtml</template></action>
                <action method="addItemRender"><type>grouped</type><block>sales/order_item_renderer_grouped</block><template>mymodule/sales/order/items/renderer/default.phtml</template></action>
            </block>
        </block>
    </reference>
</sales_order_view>

    <sales_order_print>
        <reference name="content">
            <block type="sales/order_print" name="sales.order.print" template="sales/order/print.phtml">
                <action method="addItemRender"><type>default</type><block>sales/order_item_renderer_default</block><template>mymodule/sales/order/items/renderer/default.phtml</template></action>
                <action method="addItemRender"><type>grouped</type><block>sales/order_item_renderer_grouped</block><template>mymodule/sales/order/items/renderer/default.phtml</template></action>
            </block>
        </reference>
    </sales_order_print>

When I generate the order print view, my new renderer is applied, but the generated page displays the order summary 2 times…

An idea why?

Thank you for your help,


texts:
I want to add the store switcher to page/template/links.phtml

And I have this on local.xml

<?xml version="1.0" encoding="UTF-8"?>
<layout>
    <default>
        <reference name="root">
            <block type="core/text_list" name="languagesreference" as="languagesreference" translate="label">
                <label>Languages reference</label>
            </block>
        </reference>
        <reference name="languagesreference">
            <block type="core/template" name="languagesreferenceblock" template="page/switch/languages.phtml" />
        </reference>
    </default>
</layout>

And on page/template/links.phtml:

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

What am I doing wrong here?

UPDATE: I managed to fix it by adding this to local.xml:

<reference name="top.links">
    <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
</reference>

But I have a lot of uncertainty here.


texts: How to make custom CSS have priority over CSS defined in head.phtml in Magento 2?

texts:
I'm sure many of you come across this issue: in some third party themes, many predefined styles and css generated from theme configuration (located in pub/media/{theme}) are loaded in

/{vender}/{theme}/Magento_Theme/template/html/head.phtml

which have priority over your custom theme that is usually defined in

/{vender}/{child_theme}/Magento_Theme/layout/default_head_blocks.xml

because the css files in head.phtml always loads after the custom css.

The theme I'm using is Smartwave_porto, so far I can only resolve it by removing the css files from head.pthml, then use symlinks to create the same files and load them in default_head_blocks.xml together with my custom css. I wonder if there's better solutions to this?


texts: get product collection for specific ids in magento 1.9.2?

texts:
I've got a list of product ids and I want to load a product collection for the list:

$getdata[$a]=Array
(
[0] => 166
[1] => 166
[2] => 164
);
 $_productCollection =Mage::getModel('catalog/product')->getCollection()
     ->addAttributeToFilter('id', array('in' => $getdata[$a]))
                               ->load();

 I am getting error as
Fatal error: Call to a member function getBackend() on boolean in /var/www/magento//app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 816


texts: Magento 2 - how to create a new tab in admin user edit page?

texts:
I want to create a new tab under User Role tab.

Can anyone help me on how to create those types of tab in admin panel. Please !!


texts: Multi-store hreflang-Tag extension - Magento

texts:
At the moment we are using two separate magento systems: One for Germany & Switzerland and one for 7 other Countries. How can we integrate the hreflang-Tag, to make sure Google is serving the correct language or regional urls in Search results (https://support.google.com/webmasters/answer/189077?hl=en).

Because of SEO issues this is very important for us. Is there a way to map / match the two independent magento systems - e.g. by using an identifier?

Many thanks for your Ideas and Feedback. Cheers JBG


texts: Get product Collection with all product with category id

texts:
I'm trying to get product collection and join table catalog/category_product.

$productCollection = Mage::getResourceModel('catalog/product_collection')
                        ->addAttributeToSelect('*')
                        ->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds())
                        ->joinField('category_id','catalog/category_product','category_id','product_id=entity_id',null,'left');

And I have the error.
Item (Mage_Catalog_Model_Product) with the same id "338" already exist.
What am I doing wrong?
Thanks.


texts: Unable to Reindex 'Catalog URL Rewrites'

texts:
Hi I have been looking for an answer to this all over however I cant find an answer that helps.

Whenever I try and reindex all of the data within the admin panel I seem to get this error:

So far I have tried changing the permissions of the 'media' folder to 777 and also tried dropping the core url rewrites table (I'm not sure if this is the correct name of the table but it's close).

Any idea what else I can do that might resolve this issue?


texts: Any better resource for learning Magento 2 API implementation?

texts:
If anybody know any better resource that can help me in understanding Magento2 API. please share.
It can be either any videos links, books, website links etc.


texts:
I have following action:

http://localhost/admin/catalog/product_attribute/edit/attribute_id/135/key/…/

I would like to do some extra things with attribute after saving.
I have created and registered custom plugin in Vendor/Module/Plugin/Model/ResourceModel/Attribute/Save.php with following content:

class Save
{
    /**
     * @var Config
     */
     protected $config;

    /**
     * @param Config $config
     */
    public function __construct(Config $config, TypeListInterface $typeList)
    {
        $this->config = $config;
    }

    /**
     *
     * @param Attribute $subject
     * @param Attribute $result
     * @return Attribute $result
     *
     */
    public function afterSave(Attribute $subject, Attribute $result)
    {
        # Do something
    }
}

I have also added following entry to di.xml:

<type name="Magento\Catalog\Model\ResourceModel\Attribute">
    <plugin name="do_stuff_after_attribute_save" type="Vendor\Module\Plugin\Model\ResourceModel\Attribute\Save" />
</type>

But the plugin seems not to work. Even if I die('somenthing'); or try to log to file, the code is not executed after saving the attribute.

Maybe I am trying to overwrite wrong method?


texts: Error Magento 2.3.0 upgrade ( php requirement )

texts:
I'm upgrading Magento from 2.2.7 to 2.3.0 from composer.
Running in sequence

php bin/magento maintenance:enable
composer require magento/product-community-edition 2.3.0 --no-update
composer update

In the console I read several lines of error with sentences like

  magento/framework 100.1.15 requires php ~5.6.5|7.0.2|7.0.4|~7.0.6 -> your PHP version (7.1.23) does not satisfy that requirement.

  Can only install one of: magento/framework[102.0.0, 101.0.0].

I'm using php v7.1.23 and https://magento.com/tech-resources/download don't say nothing about issue on v 7.1.x.

So i don't understand why the upgrade isn't compatible.

How does this problem happen? Do I need to upgrade to php v7.2?


texts: Merge billing address, shipping address and shipping method on onepage

texts:
I managed to join the file:

\ template \ checkout \ onepage \ shipping.phtml

with:

\ template \ persistent \ checkout \ onepage \ billing.phtml

But I must also add the file:

\ template \ checkout \ onepage \ shipping_method.phtml

Needed to load the method shipping using ajax. But I'm not sure where to start, can someone show me any solution or tip. I am trying to change the Controllers and Blocks too.

I made several changes I dont want to install any module of checkout.

Thanks in advance.

==================================

EDIT 1:

Please see (on line 442):
http://pastebin.com/aCJXGjFr

It is the file:

\template\persistent\checkout\onepage\billing.phtml

And, I tried to move the folder:

\template\checkout\onepage\shipping_method\

To:

\template\persistent\onepage\shipping_method\

Now I am trying to edit the Controllers/Blocks.. But I dont know how refresh the Shipping Method.

==================================

EDIT 2:

I changed this file:

app\design\frontend\default\my_theme\layout\persistent.xml

I changed this:

<action method="setTemplate"><template>persistent/checkout/onepage/billing.phtml</template></action>

To this:

<action method="setTemplate"><template>checkout/onepage/billing.phtml</template></action>

Now I can load Shipping Method, but I need to reload when the client changes the postal code with ajax. Can someone help me?


texts: Remove attribute from creating a product

texts: How can I remove for example "color" from my creating product page without removing it from the store (just removing it in new product page)


texts: Magento 2 update Special Price Programatically with using custom script

texts:
I want to update special price for each associated product of configurable product.I have migrated data from Magento 1 to Magento 2,since Magento special price was managed by main configurable but in Magento 2, special price are managed by each associated product hence we require to update special price for each associated product by picking special price of configurable.

I want to do it by writing a custom script root of Magento.

Please suggest me how we can achieve it.


texts: How to use customer attribute for the not logged in customer (Guest Customer)?

texts:
Is there any why with which we can use customer attribute for the guest customer. Like I have a news letter with which I am getting subscriber Email, Name, D.O.B., Country, but the thing is all this things are stored in newsletter_subscriber table as because I have added new columns to add them into this table.

Now I wanted to create attribute for these fields say subscriber_name, subscriber_dateofbirth, subscriber_countrycode, now because newsletter can be subscribed by guest users also so obviously this attribute should be usable for the guest customer also so can someone tell me that how will I map this data with it & get the exact data from these attributes? can any one  help please?


texts: How to call a phtml file in category view

texts:
I am creating a block in catalog.xml like this

<block type="catalog/category_sidebar_all" name="category_sidebar_all" as="category_sidebar_all" template="catalog/category/sidebar/all.phtml"/>
            <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">

I am calling the block like this in category/view.phtml

<?php echo $this->getChildHtml('category_sidebar_all'); ?>

Nothing is happening.


texts: Import product image using dataflow profiles

texts: I want to import product image using dataflow profiles. When upadating the csv file getting an error like 'images not found'.I exported these images from a non-magento database and trying to import using dataflow profile.


texts: Remove Header and Footer as per Config Settings in Custom Module

texts:
using Magento 1.9,

Can anyone let me know that how can i remove, header or footer as per config settings for my custom module.

I tried below but not working:

<mymodule_index_index>
        <remove name="header" ifconfig="general/layout/enable" />
        <remove name="footer" ifconfig="general/layout/enable" />
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="mymodule/mymodule" name="mymodule" template="mymodule/mymodule.phtml"/>
        </reference>
 </mymodule>


texts: Admin UI component grid search filters not working in custom module

texts:
Search by keyword is not working in admin UI component grid.

Kindly suggest a solution.


texts: XML sitemap redirects to HTML sitemap after change

texts:
I have a strange issue where when you visit www.website.com/sitemap.xml or www.website.ca/sitemap.xml, it shows the sitemap as an html page.

The following has been added to my .htaccess :

#Sitemap: https://www.website.ca/sitemaps/ca/sitemap.xml
RewriteCond %{HTTP_HOST} ^website.ca
RewriteRule ^sitemap.xml$ /sitemaps/ca/sitemap.xml [NC,L,R=301]

#Sitemap: https://www.website.com/sitemaps/usa/sitemap.xml
RewriteCond %{HTTP_HOST} ^website.com
RewriteRule ^sitemap.xml$ /sitemaps/usa/sitemap.xml [NC,L,R=301]

Is this normal?


texts: Magento 2 SSH CLI reindexing not working

texts: I just installed a Magento 2.3.6 version. and I tried to run the Command Reindexing but it's not working. I tried with diff commands like cache clear and flush none of the commands are not working through SSH. How can i achieve this thing. Can anyone help me with it please.


texts: Magento 2 - New product added to cart has subtotal price value of 0

texts:
I created a new product programmatically and added it to the cart, but the subtotal value which is showing in the cart is 0.
use \Magento\Catalog\Model\ProductFactory;
use \Magento\Catalog\Api\ProductRepositoryInterface;

...

    /**
     * @var \Magento\Catalog\Model\ProductFactory
     */
    protected $productFactory;

    /**
     * @var \Magento\Catalog\Api\ProductRepositoryInterface
     */
    protected $productRepository;

...

    public function __construct(
        ProductFactory $productFactory,
        ProductRepositoryInterface $productRepository,
    ) {
        $this->productFactory = $productFactory;
        $this->productRepository = $productRepository;
    }

...

$product = $this->productFactory->create();
$product->setName($data["name"]);
$product->setSku($data["sku"]);
$product->setPrice($data["difference"]);
$product->setTypeId("virtual");
$product->setWeight(0);
$product->setTaxClassId($this->taxClassId);
$product->setVisibility(1);

try {
    $product = $this->productRepository->save($product);
} catch (CouldNotSaveException $e) {
    $this->logger->info("CouldNotSaveException : ". $e->getMessage());
} catch (InputException $e) {
    $this->logger->info("InputException: " . $e->getMessage());
} catch (StateException $e) {
    $this->logger->info("StateException: ". $e->getMessage());
}

...

$this->quote->addProduct($product);
$this->quote->save();


texts: Magento 2: Could not map class in code-migration Tool

texts:
When using the Magento Inc. provided code migration tool, there's a number of mapping files that need to be generated.  One of those is a class dependency map.   Per the README.md, you can generate this map with the following.

php bin/utils.php generateClassDependency m1

However, when I do this, there's about 554 lines at the end of the (long) run that read something like this

[2017-06-12 17:19:10][WARNING]: Could not map class: Mage_Cron_Model_Schedule
[2017-06-12 17:19:10][WARNING]: Could not map class: Mage_Cron_Model_Observer

Each one references a different class.  Is this expected?  Or is it an error? What would I need to do to get rid of these in a safe way (i.e. down voting anyone who tells me to comment out the warning :) )

The warning seems to come from the Magento\Migration\Mapping\ClassMapping class.  It's unclear if the developer of the generateClassDependency command decided these warnings were acceptable, or if they're really a problem.  This lack of clarity is further exacerbated by there being no clear explanation of what this command is meant to do, or how its output is ultimately used by the migration commands.  Finally, just for lolz, the Magento\Migration\Mapping\ClassMapping is actually an auto-generated Magento\Migration\Mapping\ClassMapping\Proxy class in the generateClassDependency command which means its constructor gets skipped/delayed.


texts: Some of my pages in my Magento setup redirect to themselves

texts:
For some reason many of my Magento pages don't work. I get a Internal Server error when I try to load the pages. When looking at the logs I get a infinite redirect.

I have no idea why it's doing this. Any ideas?

I haven't touch the PHP or anything.

For some reason I am able to access the admin section and the Home page. Nothing else works.

I am using a share host.


texts: How to add CMS Dynamic Block Programmatically using UpgradeData in Magento 2?

texts: I'm trying to create a dynamic block by making an UpgradeData on magento 2.3, someone knows how this do it?


texts: Get a value from table 'eav/config' by client id

texts:
Code

$users = Mage::getModel('customer/address')->getCollection();

$i = 1;
foreach ($users as $key => $user) {
$id = $user->getId();

$customerObj  = Mage::getModel('customer/address')->load($id);
print_r($customerObj);
}

Return

[entity_id] => 91
[entity_type_id] => 2
[attribute_set_id] => 0
[increment_id] =>
[parent_id] => 95
[created_at] => 2016-04-29T01:09:49-03:00
[updated_at] => 2016-08-26 19:31:42
[is_active] => 1
[prefix] =>
[firstname] => Luis Gustavo
[middlename] =>
[lastname] => Carvalho
[suffix] =>
[company] =>
[city] => São Paulo
[country_id] => BR
[region] => São Paulo
[postcode] => 08042-110
[telephone] => (11) 27385-808
[fax] => 11-948563521
[vat_id] =>
[mobile] => (11) 94856-3521
[esmart_reference] =>
[esmart_sms_message] =>
[esmart_signature_handwriting] =>
[esmart_sms_confirmation_mobile] =>
[region_id] => 508
[esmart_address_type] => 0
[esmart_relationship] => 0
[esmart_occasion] => 0
[esmart_fl_sms_message] => 0
[esmart_fl_sms_confirmation] => 0
[street] => Rua Parmênides
            309
            a
            Cidade Nova São Miguel

These fields bring me 0 because they are custom attributes and when they have they have placed a value text, how do I get the numerical value of these fields?

[esmart_address_type] => 0
[esmart_relationship] => 0
[esmart_occasion] => 0
[esmart_fl_sms_message] => 0
[esmart_fl_sms_confirmation] => 0

What I need

When collecting the data they bring me the value or label instead of 0
.
As in the code below, how can I do this?

Code

$config    = Mage::getModel('eav/config');

$attribute = $config->getAttribute('customer_address', 'esmart_address_type');
$values    = $attribute->getSource()->getAllOptions();
print_r($values);

Return

[1] => Array
    (
        [value] => 8993
        [label] => Residencial
    )

[2] => Array
    (
        [value] => 8994
        [label] => Comercial
    )


texts: Check if all module dependencies are met

texts:
I recently disabled some modules and after an upgrade I feel that new dependencies got introduced (when disabling and re-enabling a custom module I got errors).

Is there a command to check if the current dependencies are all met?


texts: Change text $this->__('Choose an option...') in template

texts:
There are a number of changes that I would like to make to the theme but I give just one here as an example. Where the dropdown says 'Choose an Option', I  like to be polite and ask users to 'Please Choose an Option'.

So, I enable template path hints and block name hints. The block name hint in the image obscures the full path to the file which is...

frontend/default/paul_overrides/template/catalog/product/view/type/options/configurable.phtml

When I get to configurable.phtml there is very little there...

I do notice the ability to change 'Choose an Option' but when I did change it, it doesn't change on the site. So I don't understand why, it must be getting that from somewhere else.

Also the block name hints. So i have Mage_Catalog_Block_Product_View_Type_Configurable
What does that refer to and how does that help me find the code that is creating the html?

Update

Thank You fschmengler.

I created translate.csv in my child theme 'paul_overrides', I inserted the line you suggested into this and also the file highlighted below to make sure i would catch it. Unfortunately neither worked and I am still getting the original display on the dropdown.

Any ideas?

Must say, I'm very surprised at magento, it is hailed as being easy to modify but if this example is anything to go by it seems anything but easy.

Appreciate any help.


texts: Complete the sample data installation error

texts:
I was following the steps shown Here to add sample data to my magento site for testing then i got this error stack below:

It was the last part of the installation where i executed this command: php <your Magento install dir>/bin/magento setup:upgrade

 Installing data... PHP Fatal error:  Uncaught Error: Call to a member function getDataByKey() on null in C:\xampp\htdocs\Magento\magento2-sample-data\app\code\Magento\SalesSampleData\Model\Order\Converter.php:191
    Stack trace:
    #0 C:\xampp\htdocs\Magento\magento2-sample-data\app\code\Magento\SalesSampleData\Model\Order\Converter.php(171): Magento\SalesSampleData\Model\Order\Converter->getProductAttributes(Array)
    #1 C:\xampp\htdocs\Magento\magento2-sample-data\app\code\Magento\SalesSampleData\Model\Order\Converter.php(76): Magento\SalesSampleData\Model\Order\Converter->convertProductData(Array)
    #2 C:\xampp\htdocs\Magento\magento2-sample-data\app\code\Magento\SalesSampleData\Model\Order.php(101): Magento\SalesSampleData\Model\Order\Converter->convertRow(Array)
    #3 C:\xampp\htdocs\Magento\magento2-sample-data\app\code\Magento\SalesSampleData\Setup\Installer.php(30): Magento\SalesSampleData\Model\Order->install(Array)
    #4 [internal function]: Magento\SalesSampleData\Setup\Installer->install()
    #5 C:\xampp\htdocs\Magento\vendor\magento\framework\App\State in C:\xampp\htdocs\Magento\magento2-sample-data\app\code\Magento\SalesSampleData\Model\Order\Converter.php on line 191

    Fatal error: Uncaught Error: Call to a member function getDataByKey() on null in C:\xampp\htdocs\Magento\magento2-sample-data\app\code\Magento\SalesSampleData\Model\Order\Converter.php:191
    Stack trace:
    #0 C:\xampp\htdocs\Magento\magento2-sample-data\app\code\Magento\SalesSampleData\Model\Order\Converter.php(171): Magento\SalesSampleData\Model\Order\Converter->getProductAttributes(Array)
    #1 C:\xampp\htdocs\Magento\magento2-sample-data\app\code\Magento\SalesSampleData\Model\Order\Converter.php(76): Magento\SalesSampleData\Model\Order\Converter->convertProductData(Array)
    #2 C:\xampp\htdocs\Magento\magento2-sample-data\app\code\Magento\SalesSampleData\Model\Order.php(101): Magento\SalesSampleData\Model\Order\Converter->convertRow(Array)
    #3 C:\xampp\htdocs\Magento\magento2-sample-data\app\code\Magento\SalesSampleData\Setup\Installer.php(30): Magento\SalesSampleData\Model\Order->install(Array)
    #4 [internal function]: Magento\SalesSampleData\Setup\Installer->install()
    #5 C:\xampp\htdocs\Magento\vendor\magento\framework\App\State in C:\xampp\htdocs\Magento\magento2-sample-data\app\code\Magento\SalesSampleData\Model\Order\Converter.php on line 191


texts: Migrate M2E PRO from Magento 1.9.3.10 to Magento 2.3.2

texts:
I want to migrate M2E PRO data and settings from Magento 1.9.3.10 to Magento 2.3.2.

In Magento 1.9.x I have M2E Pro ver. 6.5.4 (include Walmart) and in Magento 2.3.x I use M2E Pro ver. 1.2.1, is anyone that can guide me step by step how I can proceed?

I read this doc too but was not so useful.

Thank you


texts: how to change the position of static block present in category to the left side

texts:
In magento , The static block can be set for each category, At present it is at the top of the product listing. I need to change the position of the static block from the top of the product listing to the left side , that is below the layered navigation.

layered navigation|  custom blocks
                     ------------
                      product listing

Need to change to

layered navigation | Product Listing
------------------
custom block

I am doing this in order to display ads in the custom blocks that are related to categories


texts: Sales Grid, adding columns from different SQL tables

texts:
Using Magento 1.8.1

I've added custom columns to the Sales Order Grid. The collection is as follows in my app/code/local/Mage/Adminhtml/Block/Sales/Order/Grid.php:

protected function _prepareCollection()
{
    $collection = Mage::getResourceModel($this->_getCollectionClass());
    $this->setCollection($collection);
    $collection->getSelect()->join('sales_flat_order', 'main_table.entity_id = sales_flat_order.entity_id', array('base_shipping_amount', 'base_subtotal', 'base_tax_amount'));
    return parent::_prepareCollection();
}

Now that is working perfectly fine, I want to append a new column from a different table, the sales_flat_order_address table, but I'm having trouble. How do I effectively add in a second collection into the _prepareCollection method? Basically I want to add in:

$collection->getSelect()->join('sales_flat_order_address', 'main_table.entity_id = sales_flat_order_address.entity_id', array('country_id'));

Into the first collection so that I can use country_id in the columns with the other data.


texts:
I'm trying to create a store view and i'm getting an error.

In the browser it says: One or more indexers are invalid. Make sure your Magento cron job is running.

I tried to run the reindex command, cron run commands and nothing has worked.

Looking at my debug.log and system.log I see this:

debug.log

`[2016-11-17 09:24:16] main.DEBUG: cache_invalidate:  {"method":"POST","url":"http://my.ip.address/admin/admin/system_store/save/key/082334a1ecfb2f5f13159ea2677dc79e89b45967ff0d0086304df69113b44a91/","invalidateInfo":{"tags":[],"mode":"all"},"is_exception":false} []`

system.log

`[2016-11-17 09:24:16] main.CRITICAL: Exception message: Warning: is_file() expects parameter 1 to be a valid path, string given in /var/www/html/vendor/colinmollenhour/cache-backend-file/File.php on line 512
Trace: #0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'is_file() expec...', '/var/www/html/v...', 512, Array)
#1 /var/www/html/vendor/colinmollenhour/cache-backend-file/File.php(512): is_file('/var/www/html/v...')`

....and a long trace with different paths

Seems to me like the no reindexing or cron changing will fix this, since the problem is in the software itself.


texts: Two Magento Frontend eShops on the same store (selling the same products)?

texts:
I have two magento 1.9 e-shops right now. They sell the same products but have separate magento installations. Now I got the request to somehow merge them into one.

The end result should look like this.

The customer can reach each website on their own domain.
But when they buy things it will be from the same store (as in the same products).
So one sell on website1 will also register as one sell on website2.

Right now I think I should go about it like this. One "Website" in magento, one "Store", and two "Store Views". Would this be working? I would probably need to copy the theme over and then work in the backend by changing the Store View. Will this be working? Or am I totally off here.

If some of you had to deal with this and could lend me some help that would be awesome!

Thanks!


texts: Magento 2.1 - Add a new method to block class?

texts:
I need to add a new function to the configurable.php block, located in Magento\ConfigurableProduct\Block\Product\View\Type\Configurable.  It's a function similar to $block->getJsonConfig() except it gets some different values.

Can I do this (add a new method/function) through a plugin or do I have to override the original block?  I'm not changing or removing any of the original functionality, just need to be able to call another function from the phtml file.  If I override, does that mean I need to copy all the original methods from the original block php or can I just define the new function I need in my override file?

Edit: I have followed Aaron's advice for extending the original class.  Here is my di.xml file:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference
        for="Magento\ConfigurableProduct\Block\Product\View\Type\Configurable"
        type="zzTest\zzModule\Block\Product\View\Type\Configurable" />
</config>

Here is what zzTest\zzModule\Block\Product\View\Type\Configurable.php looks like:

<?php

namespace zzTest\zzModule\Block\Product\View\Type;
use Magento\ConfigurableProduct\Block\Product\View\Type\Configurable;
class Configurable extends \Magento\ConfigurableProduct\Block\Product\View\Type\Configurable
{
    public function getXPPackCounts()
    {
        return 'good';
    }
}

Finally, I attempt to call this function from configurable.phtml in design/frontend/my/theme/Magento_ConfigurableProduct/templates/product/view/type/options/configurable.phtml .  My calling code looks like this:

<?php /* @escapeNotVerified */ echo $block->getXPPackCounts() ?>

I know this phtml file is being called okay because I have other stuff on it that shows up.  But I don't receive any output from my call.  What have I setup incorrectly?


texts: Magento 2: Class BaseImage does not exist

texts:
Today we've updated from version 2.0.6 to 2.1.2, it was everything but flawless. But I've managed to fix all te problems except one:

When editing a product I receive this error:

Exception #0 (ReflectionException): Class Magento\Catalog\Block\Adminhtml\Product\Helper\Form\BaseImage does not exist

Does anyone know how to fix this problem?


texts: How to log on an admin page without having access to anything?

texts:
Some context is needed here : I just started a placement at a place where they used Magento to create their website. I don't yet have access to the code of the site, so I'm trying to log as an admin using the admin panel. Login form asks for a captcha, which appears from time to time and the image won't load at anytime. I might have access to the code later but for the moment I'm stuck with nothing to do.
Is there a way to ignore that captcha so I can login ?

EDIT : captcha bugs are resolved now, but putting in the username/password that should be correct won't work (saying You did not sign in correctly or your account is temporarily disabled)


texts: How can i retain my site traffic and promotions after change my hosting service

texts:
Now am working with Bigcommerce , i am ready to move magento with hosting provider Godaddy. After am migrating how can i retain my site traffic.

  What is the basic steps to take retain Website traffic.


texts: Magento cart price rules conditions not working properly

texts:
I have a discount of free shipping which I want to apply when the shipping address is in the U.S. and the subtotal is $100 or over.

I am trying to exclude Hawaii and Alaska from receiving the free shipping but even after excluding it, its still giving the free shipping to Alaska and Hawaii.

Can someone help? Am I doing it wrong?


texts: (SOLVED) add external link in custom magento plugin

texts:
I'm updating a Magento plugin and I'd like to add an external link like this:

<a href="myweblink" target "_blank">My weblink </a>

I tried to do it adding these lines in layout.xml file (that is the model I use)

 <?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<referenceContainer name="footer">
    <block class="Magento\Framework\View\Element\Html\Link\Current" name="footer_blog_link" before="-">
        <arguments>
            <argument name="label" xsi:type="string" translate="true">Condizioni di contratto e termini di utilizzo</argument>
            <argument name="path" xsi:type="string">https://www.fattura24.com/termini-utilizzo/</argument>
            <argument name="target" xsi:type="string">_blank</argument>
        </arguments>
        <arguments>
            <argument name="label" xsi:type="string" translate="true">Regolamento integrarivo (delle Condizioni di Contratto) per l'UTENTE che utilizza moduli per E-Commerce di Fattura24</argument>
            <argument name="path" xsi:type="string">https://www.fattura24.com/regolamento-ecommerce/</argument>
            <argument name="target" xsi:type="string">_blank</argument>
        </arguments>
        <arguments>
            <argument name="label" xsi:type="string" translate="true">Privacy</argument>
            <argument name="path" xsi:type="string">https://www.fattura24.com/policy/</argument>
            <argument name="target" xsi:type="string">_blank</argument>
        </arguments>
    </block>
</referenceContainer>

I'm not displaying the links in admin footer of my extension.

I put this file in /adminhtml/layout
then I updated the app, flushed magento cache, reindexed but still can't display links


texts: How to create best seller page in Magento 2.2

texts:
I am trying to create a page where all best sellers products should be displayed and it needs to look like magento's default category page(filters on the left and product grid/list on the right).

I made a custom page then tried to reuse most of Magento_Catalog resources like blocks, templates, etc. The problem is, most of the functions uses getCurrentCategory() which seems not applicable in my case.

Any insights how can I do it?


texts: How to create a simple product using SOAP api in magento2

texts:
Here I have tried but I getting this error:

  Fatal error: Uncaught SoapFault exception: [env:Sender] %fieldName is a required field.

require('vendor/zendframework/zend-server/src/Client.php');
require('vendor/zendframework/zend-soap/src/Client.php');
require('vendor/zendframework/zend-soap/src/Client/Common.php');
$token = '6ge34qaj7ugklona2in8fmmig93qmblx';
$wsdlUrl = 'http://localhost/magento214/soap/default?wsdl&services=catalogProductRepositoryV1';
$opts = ['http'=> ['header' => "Authorization: Bearer " .$token]];
$context = stream_context_create($opts);
$soapClient  = new \Zend\Soap\Client($wsdlUrl);
$soapClient->setSoapVersion(SOAP_1_2);
$soapClient->setStreamContext($context);
      $productData = array(
        'sku'               => 'ZZ-TEST',
        'name'              => 'testproduct',
        'visibility'        => 4, /*'catalog',*/
        'type_id'           => 'simple',
        'price'             => 45,
        'status'            => 1,
        'attribute_set_id'  => 4,
        'weight'            => 1,
        'custom_attributes' => array(
            array( 'attribute_code' => 'category_ids', 'value' => ['3'] ),
            array( 'attribute_code' => 'description', 'value' => 'Simple Description' ),
            array( 'attribute_code' => 'short_description', 'value' => 'Simple  Short Description' ),
            )
    );
      $productData = json_encode(array('product' => $productData));
     //  print_r($productData);exit;
$result = $soapClient->catalogProductRepositoryV1save($productData);
var_dump($result);


texts: How to Get Unique Product URL Key Magento2?

texts:
I making a commerce product with the help of Magento and I am new to this, my question is while adding a product from Magento admin, it stores the search engine optimization URL key default as the name of the product but I want to extend its functionality so that it can store unique URL key.
for example:
product name: Iphone 6s 32GB
By default Magento generate URL key : iphone-6s-32GB.html
but I want to store the url key with product id,so url key would be always unique
It should be generate Url Key: iphone-6s-32GB-{productid}.html


texts: Can I call addFieldToFilter via di.xml? / Set a global filter on product collection

texts:
I am working with vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Fulltext/Collection.php which extends the \Magento\Catalog\Model\ResourceModel\Product\Collection.

I need to call

    $this->addFieldToFilter('custom_visible', 1);

on each creation of the collection.

Can I do this somehow via di.xml ? Or what is the best way to do this?

In legacy code, \Magento\Catalog\Block\Product\AbstractProduct::_getProductCollection was overwritten, but this seems to fire to late.


texts: CE1.9.2.4 - Custom Module calling 3rd Party API

texts:
I am creating a module that exposes a form for customers to fill in. Upon submission, an ajax request request is made to a PHP script which calls the API.

Now I have already tested this in a separate simple site consisting of just an HTML page (with the form and Javascript) and a PHP file with the function.

As I'm still learning module development in Magento, I'd like to know where my PHP function should go and how to call it (What would be the URL to call)? My first guess is that I need to create a controller with a custom method.

Anyway, here is my PHP function and corresponding Javascript:

Thank you

submit.php

<?php

function is_ajax() {
    return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest';
}

function subscribe() {
  if (is_ajax()) {
    $fieldData = array(
      'api_key'    => '99999999999',
      'email'      => $_POST['email'],
      'properties' => json_encode(array(
        '$first_name' => $_POST['firstname'],
        '$last_name' => $_POST['lastname']
      ))
    );

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL,"https://somesite.com/api/v1/subscribe");
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $fieldData);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    $server_output = curl_exec ($ch);

    curl_close ($ch);

    echo $server_output;
    // echo json_encode($server_output);
    // echo json_encode($fieldData);
  }
}

?>

_index.js

$(document).ready(function() {
  $('#testform').submit(function(event) {
    var formData = {
      'email'     : $('input#email').val(),
      'firstname' : $('input#firstname').val(),
      'lastname'  : $('input#lastname').val(),
    };
    $.ajax({
      type: 'POST',
      dataType: 'json',
      url: 'submit.php/subscribe',
      data: formData,
      encode: true,
      success: function(data) {
        $('#result').html(JSON.stringify(data));
      },
      error: function(XHR, textStatus, errorThrown) {
        console.log(errorThrown);
      }
    });
    event.preventDefault();
  });
});


texts:
After applying parch Security patch 8788 V2 on magento CE 1.8.0.0, I am experiencing this problem:

Magento won't send any emails.

Does anyone have a clue ?


texts: Magento 2 How to add custom product relations?

texts:
I am needing to add another related products attribute to associate multiple other products.

I have found a solution for Magento 1: http://inchoo.net/magento/how-to-add-custom-product-relations-in-magento/

However, I wishing to implement this in Magento 2. Any guidance is appreciated.


texts: Magento 2 - Plugin to run only when function is called from specific module

texts:
Is there any way that I can specify that a Plugin X only runs when the class is called from Module Y?
So that if same function is called from other modules the Plugin is not called.


texts: magento throws "Request Timeout" error when creating shipments

texts:
When I am trying to create shipment for an order, the page throws this error:

  Request Timeout

This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'."

When I Investigate the problem by exploring the code by creating log, Its stops on random code lines. I am stuck now, what to do, how to know what is the error and which operation is creating the problem. This problem only appears for amazon orders.


texts: Magento 2: Shipping rates show 0 when there are more than one item in the cart

texts:
I configure my store to use Flat Rate for shipping. When I add an item to cart, and go to checkout page, the shipping rate is there with my amount of money I configured (Let's say it's $20).

But when I add one more item into the cart, the shipping rate still shows up, but the price now is $0. This only happens when there are more than one items in the cart, no matter whether they are the same product with the quantity of >1, or two different products.

Could anyone please help me to fix this problem? I use Magento version 2.0.7. If there is any needed information, please let me know.

Thanks in advanced.


texts: how to check magento soap api session id is valid or not

texts:
I am using magento soap api for mobile application, I want to know how to check the soap api session id is valid or expired?

I want to know so if that session id expires I can regenerate the session id again.

thanks


texts: How to get shipment tracking information from sales_order_invoice_save_after event in magento2?

texts: Is there any way to get shipment tracking information from sales_order_invoice_save_after  event in magento2, Please help me.


texts: Not able to compile complete in Magento2

texts:
I am running compile command

php bin/magento setup:di:compile

Compilation was started.
Repositories code generation... 1/7 [====>-----------------------]  14% < 1 sec 54.0 MiB  You have new mail in /var/mail/root

Compilation stop in 1/7 without displaying any error.

May i know why its breaking compilation ?


texts: Magento 2: How to get product collection by category?

texts:
We are trying to get product collection by category id.

Block:

protected $_categoryFactory;

public function __construct(
    \Magento\Backend\Block\Template\Context $context,
    \Magento\Catalog\Model\CategoryFactory $categoryFactory,
    array $data = []
)
{
    $this->_categoryFactory = $categoryFactory;
    parent::__construct($context, $data);
}

public function getCategory($categoryId)
{
    $category = $this->_categoryFactory->create();
    $category->load($categoryId);
    return $category;
}

public function getCategoryProducts($categoryId)
{
    $products = $this->getCategory($categoryId)->getProductCollection();
    $products->addAttributeToSelect('*');
    return $products;
}

and in html:

$categoryId = 6; // fetching products in category id 6
$categoryProducts = $block->getCategoryProducts($categoryId);
foreach ($categoryProducts as $product) {
    echo $product->getName() . ' - ' . $product->getProductUrl() . '<br />';
}

it works fine only if $categoryId = the highest level in the category tree. But if I change $categoryId to 2 (or 3... or etc but not last in category tree) it doesn't work.

How can I get it work?


texts: Magento optimisation : Compilation and Use Flat Catalog Product Features

texts:
I would like to improve the performance of my Magento website.

After checking online, it seems that I can:
- Set Use Flat Catalog Product to YES
- Enable the Compilation Tool

I will do a Cpanel backup before running these changes.

Question: Can these modifications break my website ?

The one in System > Tools > Compilation.
http://docs.magento.com/m1/ce/user_guide/system-operations/system-tools-compilation.html


texts: How to change magento 2.1.1 Registration success message?

texts: Can you help me on how to modify the default success message like "Thank you for your registration" after you create an account or register an account in magento 2.1.1.


texts:
I'm new to Magento.
I would like to integrate a 3'rd. Party(Booking.com) data using API and then connect it to FAC payment gateway API.
Can anyone offer guidance?


texts: Magento2: How to validate a specific system-configuration field on the server-side before save?

texts:
I have a custom module with some system configuration fields that needs to be validated on the server side (API credentials, etc...).
At the moment, I'm using an observer on the admin_system_config_changed_section_{my_module} event, but I'm looking for a way to validate an API-Key field before it's saved (& then throw errors if needed).
*The validation process must be on the server side. I'm not looking for a validation class that uses JS.
-- Any idea?


texts: Magento causing css issue after merging in safari

texts:
Magento merged css causes issue in safari browser and works well in other browser. Any one could give some idea? no error found in console.

Without merging it is working well.


texts: how to make dynamic two-column layout for custom options

texts:
I'm trying to figure out how to style a product detail page that right now has 24 custom options, but there may at times be more or less.  I want them to be in two columns instead of the default one column (as it makes the product detail page very long).  Any ideas on how to achieve this without much fuss?

I know that the options are printed out in a for loop at the bottom of options.phtml inside of

<fieldset>

option 1:

input box

 </fieldset>

can i achieve this using fieldset or is it better to change the javascript and use a table or divs?


texts: Reorder problem with custom quote attribute

texts:
I've defined a custom attribute called productcomment on sales_flat_quote_item and in sales_flat_order_item and the problem is when i want to reorder an specific order, the values are not copied.

The quote attribute is saved with the product when i click "add to cart" or with an specific button through ajax.

my config.xml:

<fieldsets>
        <sales_convert_quote_item>
            <productcomment>
                <to_order_item>*</to_order_item>
            </productcomment>
        </sales_convert_quote_item>
        <sales_convert_order_item>
            <productcomment>
                <to_quote_item>*</to_quote_item>
            </productcomment>
        </sales_convert_order_item>
</fieldsets>

The first part (sales_convert_quote_item) works like a charm, but the second one, don't.

Magento executes this code to process a reorder:

public function addOrderItem($orderItem, $qtyFlag=null)
    {
        /* @var $orderItem Mage_Sales_Model_Order_Item */
        if (is_null($orderItem->getParentItem())) {
            $product = Mage::getModel('catalog/product')
                ->setStoreId(Mage::app()->getStore()->getId())
                ->load($orderItem->getProductId());
            if (!$product->getId()) {
                return $this;
            }

            $info = $orderItem->getProductOptionByCode('info_buyRequest');
            $info = new Varien_Object($info);
            if (is_null($qtyFlag)) {
                $info->setQty($orderItem->getQtyOrdered());
            } else {
                $info->setQty(1);
            }

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

The problem with this, is that magento uses

$product = Mage::getModel('catalog/product')

and don't care about the $orderItem which already has the data

Which do you think is the best solution to this problem?

edit:
I've already tried solving it with these events:

checkout_cart_product_add_after : don't have older order data
sales_convert_order_item_to_quote_item : only fired on
adminhtml


texts:
Updated to Magento 2.3.2 yesterday and have noticed that the CSS for css/styles-m.css is failing to generate with the below error:

Operation on an invalid type in _typography.less in _utilities.less in _listings.less
<pre>#1 Magento\Framework\View\Asset\PreProcessor\AlternativeSource->processContent('css/styles-m.css', '', '', &Magento\Framework\View\Asset\File\FallbackContext#000000006569326b00000000204f06bd#) called at [vendor/magento/framework/View/Asset/PreProcessor/AlternativeSource.php:114]
#2 Magento\Framework\View\Asset\PreProcessor\AlternativeSource->process(&Magento\Framework\View\Asset\PreProcessor\Chain#000000006569327400000000204f06bd#) called at [vendor/magento/module-developer/Model/View/Asset/PreProcessor/PreprocessorStrategy.php:76]
#3 Magento\Developer\Model\View\Asset\PreProcessor\PreprocessorStrategy->process(&Magento\Framework\View\Asset\PreProcessor\Chain#000000006569327400000000204f06bd#) called at [vendor/magento/framework/View/Asset/PreProcessor/Pool.php:77]
#4 Magento\Framework\View\Asset\PreProcessor\Pool->process(&Magento\Framework\View\Asset\PreProcessor\Chain#000000006569327400000000204f06bd#) called at [vendor/magento/framework/View/Asset/Source.php:152]
#5 Magento\Framework\View\Asset\Source->preProcess(&Magento\Framework\View\Asset\File#000000006569326e00000000204f06bd#) called at [vendor/magento/framework/View/Asset/Source.php:105]
#6 Magento\Framework\View\Asset\Source->getFile(&Magento\Framework\View\Asset\File#000000006569326e00000000204f06bd#) called at [vendor/magento/framework/View/Asset/File.php:158]
#7 Magento\Framework\View\Asset\File->getSourceFile() called at [vendor/magento/framework/App/StaticResource.php:135]
#8 Magento\Framework\App\StaticResource->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#9 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\StaticResource#00000000656932b800000000204f06bd#) called at [pub/static.php:13]
</pre>

I removed any less files from my custom theme however the issue remained. I am in developer mode and deleted all static files to make sure they are getting regenerated however this error persists breaking styles within my store.

Any ideas why the less compilation may have changed or a way to debug with actual file paths and line numbers so this can be narrowed down further?

UPDATE

As stated this was the typography.less in my theme. Just deleting the file while in developer mode didn't seem to help however. Neither did the deploy static content command. Setting production mode however seemed to work fine which allowed me to go back to developer mode with everything working fine from then on. May be a quicker step to kick this into action but for me the above worked.


texts: Display Out of Stock Products in the End on Category Pages - Magento 2.4.0

texts:
I want to display all out of stock products in end on category pages, I have tested few solution which is mentioned on Magento stack exchange, But no one is working for me.  Anybody can help me regarding how to i can sort out products on base of quantity/stock ? I want to show first Instock product on all category pages, and all out of stock product should be display in end on category pages. I am using Magento 2.4.0.
Thanks


texts: How to find the indicator for stock amount in the code

texts:
I would like to know where you can find the indicator/code that says why a product is red/orange/green.

This is the code I found for what is still in stock. However, the stock is automatically tracked via a plug-in. And can not be adjusted in magento itself. Is there a way to indicate that when the stock is 0 it turns red, and the stock is 10 or less orange and 10 or more green?

Here I can change the text of the stock images, but how to change the indicator when it turns green/orange or red.

          <?php echo $this->__("Availability:")?>
        <?php if($qtyStock > 0 and $_product->isAvailable()){?>
            <img src="<?php echo $this->getSkinUrl('images/green.png')?>" title="<?php echo $this->__('1 or more pieces in stock')?>"/>
         <?php }else if($qtyStock <= 0 and $_product->isAvailable()){?>
              <img src="<?php echo $this->getSkinUrl('images/orange.png')?>" title="<?php echo $this->__('1 in stock, please contact us')?>"/>
          <?php }else if(!$_product->isAvailable()){?>
                 <img src="<?php echo $this->getSkinUrl('images/red.png')?>" title="<?php echo $this->__('0 in stock, please contact us')?>"/>
          <?php } ?>


texts: Custom Product View Based on Attribute Set Name

texts:
I am trying to create a different product view based on the Attribute Set Name (not ID, or specific attribute value). I've looked at a couple different tickets here already, and have tried to implement this using a plugin for beforeInitProductLayout ... but I can't seem to get it to work.
Magento 2 - Layout based on attribute set
Layout handle from attribute set
Vendor/Namespace/etc/frontend/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Helper\Product\View">
        <plugin name="vendor_namespace_helper_product_view" type="Vendor\Namespace\Plugin\Helper\Product\View" />
    </type>
</config>

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

Vendor/Namespace/Plugin/Helper/Product/View.php
namespace Vendor\Namespace\Plugin\Helper\Product;

use Magento\Bundle\Model\Product\Type;
use Magento\Framework\DataObject;
use Magento\Framework\DataObjectFactory;

class View
{
    const PRODUCT_LAYOUT_HANDLE = 'catalog_product_view_boxedcard';

    /**
     * @var DataObjectFactory
     */
    private $dataObjectFactory;

    /**
     * @param DataObjectFactory $dataObjectFactory
     */
    public function __construct(
        DataObjectFactory $dataObjectFactory
    ) {
        $this->dataObjectFactory = $dataObjectFactory;
    }

    public function beforeInitProductLayout(
        \Magento\Catalog\Helper\Product\View $view,
        \Magento\Framework\View\Result\Page $resultPage,
        $product,
        $params = null
    )
    {

        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $product = $objectManager->get('Magento\Framework\Registry')->registry('current_product');
        $attributeSet = $objectManager->create('Magento\Eav\Api\AttributeSetRepositoryInterface');
        $attributeSetRepository = $attributeSet->get($product->getAttributeSetId());
        $attribute_set_name = $attributeSetRepository->getAttributeSetName();

       if ($attribute_set_name == "Boxed Card Image Roles") {
           if (!$params) {
               $params = new \Magento\Framework\DataObject();
           }
               $afterHandles = $params->getAfterHandles();
               if (!$afterHandles) {
                   $afterHandles = array();
               }
               $afterHandles[] = PRODUCT_LAYOUT_HANDLE;
               $params->setAfterHandles($afterHandles);
           }
           return [$resultPage, $product, $params];
        }
}

Vendor/Namespace/view/frontend/layout/catalog_product_view_boxedcard.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>

    <referenceBlock name="product.info.media.image" remove="true"/>

        <referenceContainer name="product.info.media">
            <block class="Magento\Catalog\Block\Product\View\Gallery" name="boxed.card.gallery" template="Vendor_Namespace::product/view/gallery.phtml" />
        </referenceContainer>
    </body>
</page>

When I go to products on my local site that have this Product Attribute Set, it says the page can't be found and renders like this:


texts: Disable specific manufacturer(s) so that associated products are not visible in front end

texts:
I know that manufacturer(s) can be removed, but what I would like to do is temporarily disable specific manufacturer(s) in my database so that the products associated with them are not visible in the front end.

How can this be achieved?


texts:
I am developing a custom module. In this regard I have to upload image in admin panel. I found below codes in some tutorial.

$uploader->setAllowRenameFiles(true);
$uploader->setFilesDispersion(false);
$uploader->setAllowCreateFolders(true);

I would like to know more about these lines. What do they mean ??


texts:
I'm currently developing a eCommerce system with Magento. I have my footer called as

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

and my layout.xml has following tags to define the 'footer'

<reference name="footer">
  <block type="page/footer" name="footer">
    <action method="setTemplate">
      <template>page/html/footer_home.phtml</template>
    </action>
    <action method="setTemplate">
      <template>muaw/footer_script.phtml</template>
    </action>
  </block>
</reference>

footer_home.phtml is the actual footer and footer_script.phtml is a file with <script> tag for some jquery. My problem is that adding the second set of <action> tags for footer_script.phtml replace the actual footer. Is there any other way to get both files?


texts: how reindex and flush cache via code in magento 2?

texts: How can reindex and then flush cache magento in code instead command line?


texts: How to add a custom 'Under Construction' header to my Magento store?

texts:
I have a Magento store with a custom theme loaded. The site is ready to go for the most part, but I'd like to add a small message on the top that parts of it are still under construction and problems might occur.

Is there an easy, foolproof way to do this?


texts: How to add to customer wishlist in Magento Admin

texts:
Any idea how I can add products to a customer's wishlist in the admin backend? Being able to do this would greatly simplify the experience for some of my corporate customers who just wish to be able to sign in, look at their wishlist products and order.

I've done some Google searching for answers but not finding anything.

Thanks.


texts: Preference is not working while a method called from child class

texts:
I created a preference for the method _applyOptionsPrice() in Magento/Catalog/Model/Product/Type/Price.php class.
The preference is working while the _applyOptionsPrice() was called from the same class but the Price.php class was inherited by two class.
They are :

Magento/Bundle/Model/Product/Price.php
Magento/ConfigurableProduct/Model/Product/Type/Configurable/Price.php

While the _applyOptionsPrice() was called from the above two classes my preference method didn't worked.
I declared the preference in di.xml file:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
        <preference for="Magento\Catalog\Model\Product\Type\Price" type="Vendor\Module\Preference\Price" />
</config>

and this is my preference class:
<?php

namespace Vendor\Module\Preference;

use Magento\Catalog\Api\Data\ProductTierPriceExtensionFactory;
use Magento\Catalog\Api\Data\ProductTierPriceInterfaceFactory;
use Magento\CatalogRule\Model\ResourceModel\RuleFactory;
use Magento\Customer\Api\GroupManagementInterface;
use Magento\Customer\Model\Session;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\Event\ManagerInterface;
use Magento\Framework\Pricing\PriceCurrencyInterface;
use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
use Magento\Store\Model\StoreManagerInterface;

class Price extends \Magento\Catalog\Model\Product\Type\Price
{

    public function __construct(
        RuleFactory $ruleFactory,
        StoreManagerInterface $storeManager,
        TimezoneInterface $localeDate,
        Session $customerSession,
        ManagerInterface $eventManager,
        PriceCurrencyInterface $priceCurrency,
        GroupManagementInterface $groupManagement,
        ProductTierPriceInterfaceFactory $tierPriceFactory,
        ScopeConfigInterface $config,
        ProductTierPriceExtensionFactory $tierPriceExtensionFactory = null
    )
    {
        parent::__construct(
            $ruleFactory,
            $storeManager,
            $localeDate,
            $customerSession,
            $eventManager,
            $priceCurrency,
            $groupManagement,
            $tierPriceFactory,
            $config,
            $tierPriceExtensionFactory
        );

    }

    protected function _applyOptionsPrice($product, $qty, $finalPrice)
    {
        // Here is my custom code
    }

}

"I found a same issue in plugin from this link"
Please give me a suggestion to solve this error!!


texts: country specific auto language changer & currency converter

texts: We have an e-commerce .in domain. now we are planning to sell our product internationally for which we are planning to open multi sub-domain. the content & image of .in domain will be in all the sub-domain but pricing will change. so kindly suggest steps.


texts:
I need a solution for checkout per product.
In my website there is two type of product Heavy and Normal.
For Heavy we using Fedex.
For Samll we using Southeastern.

Now on cart page I want to button as well as functionality of Per Product Checkout.
You can say product wise checkout.
Step--

If i added two product in cart small and heavy.
Then first i want to seprate checkout for Heavy one.
Then on second checkout small one.

Pls advice me any extension or possibility or not.


texts: when installing an extension in new project without personal template, the extension works very fine but when i tried to install  the same under my project with a pesonal template, this does'nt work. Can you please explain to me the error and how to fix it thanks in advance


texts:
i need to modify all products description by sku : i have csv file with two column first column define sku and twice define description so how i can do that
this my script

      <?php
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
umask(0);
Mage::app('admin');
Mage::register('isSecureArea', 1);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
set_time_limit(0);
ini_set('memory_limit','1024M');

$csv                = new Varien_File_Csv();
$data               = $csv->getData('comment.csv'); //csv
array_shift($data);
  $collection = Mage::getModel('catalog/product')
    ->getCollection();
foreach ($collection as $product) {
    try{
        $product
        ->setDescription($data[1])
        ->setShortDescription($data[1])
        ->addFieldToFilter('sku',$data[0]);
        $product->save();
        echo "done";
    }
    catch(Exception $e){
   echo Mage::log($e->getMessage()) . " Error"."</br>";
 }
}
?>


texts: Custom data in custom column of sales order table not working in magento 2

texts:
I have created a custom column in order table of Magento 2 with the name:

  order_detail_data

Now, I want to save some custom data in this column by using

sales_order_place_before

My Observer code against above-mentioned event is:

namespace Vendor\Module\Observer;

use Magento\Framework\Event\ObserverInterface;

class OrderPlacebeforeSaveData implements ObserverInterface
{

protected $_coreSession;

public function __construct(
    \Magento\Framework\Session\SessionManagerInterface $coreSession

) {
    $this->_coreSession = $coreSession;
}

public function execute(\Magento\Framework\Event\Observer $observer)
{
    $orderDetailData = $this->_coreSession->getOrderDetailSession();
    $order = $observer->getEvent()->getOrder();
    $order->setData('order_detail_data', json_encode($orderDetailData));
    $order->save();
}
}

But unfortunately, I am not able to save data in this column.


texts:
I'm able to use bulleted lists in item detail descriptions but not on any page content or category content. Code seems fine.

 and so on ending in
I can place numbered list in but have to add another  to get it to move over.
Not critical but I like bullets better.
Example page where coded for bulleted and does not bullets. First bullet at Using hydroelectric and so on.
http://www.deckandrailings.com/about-us/

Thanks..............


texts: Magento 2 - Overwrite module-swatches view.xml

texts:
How do you overwrite the view.xml in \vendor\magento\module-swatches\etc\view.xml in your own template?

I want to overwrite the sizes for swatch_image and swatch_image_base. I tried putting the code in \...\mytheme\etc\view.xml and in \...\mytheme\Magento_Swatches\etc\view.xml but it does not work.

The other theme stuff works, so the theme is correctly set up.

Changing the values directly in the original view.xml works as well.

Edit: Full Code in \app\design\frontend\\{Vendor}\\{theme}\etc\view.xml

<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd">
    <media>
        <images module="Magento_Catalog">
            <image id="swatch_image" type="swatch_image">
                <width>50</width>
                <height>50</height>
            </image>
            <image id="swatch_thumb" type="swatch_thumb">
                <width>110</width>
                <height>90</height>
            </image>
            <image id="swatch_image_base" type="swatch_image">
                <width>50</width>
                <height>50</height>
            </image>
            <image id="swatch_thumb_base" type="swatch_thumb">
                <width>110</width>
                <height>90</height>
            </image>
        </images>
    </media>
</view>


texts: Newly created admin users unable to pass Two-Factor Authentication

texts:
Our production site, as well as our QA servers, are all having an issue with passing the 2-factor authentication in admin panel.
When a newly created admin user scans the QR code after providing their username and password, and enters the 6-digit code shown on the Google Authenticator app, they are consistently given an "Invalid code" error message. However, if an existing admin resets their Google Authenticator 2FA settings under User Accounts, the new user can scan the QR code and enter the 6-digit code with no issue. This is not happening on any old accounts, only new ones.
This issue is not reproducible on local environments.
There was a similar question asked earlier but the OP himself had to reset the 2FA in the accepted solution. This should ideally work without resetting the 2FA.
We are running Magento Commerce/Enterprise version 2.3.5-p1 while the msp/twofactorauth package is at version 3.1.2


texts: Your requirements could not be resolved to an installable set of packages for razorpay payment gateway

texts:
i tried to update razorpay payment gateway using the below command.
composer update razorpay/magento --ignore-platform-reqs
But i am getting the below Output.

Problem 1
- Conclusion: don't install facebook/php-business-sdk 9.0.3
- Conclusion: don't install facebook/php-business-sdk 9.0.2
- Conclusion: don't install facebook/php-business-sdk 9.0.1
- Conclusion: remove guzzlehttp/guzzle 6.4.1
- Installation request for facebook/php-business-sdk ^9.0 -> satisfiable by facebook/php-business-sdk[9.0.0, 9.0.1, 9.0.2, 9.0.3].
- Conclusion: don't install guzzlehttp/guzzle 6.4.1
- facebook/php-business-sdk 9.0.0 requires guzzlehttp/guzzle ^6.5 || ^7.0 -> satisfiable by guzzlehttp/guzzle[6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 7.0.0, 7.0.1, 7.1.0, 7.1.1, 7.2.0].
- Can only install one of: guzzlehttp/guzzle[6.5.0, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[6.5.1, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[6.5.2, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[6.5.3, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[6.5.4, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[6.5.5, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[7.0.0, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[7.0.1, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[7.1.0, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[7.1.1, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[7.2.0, 6.4.1].
- Installation request for guzzlehttp/guzzle (locked at 6.4.1) -> satisfiable by guzzlehttp/guzzle[6.4.1].


texts: I have configured the Redis cache as per Magento documentation. But if I run the cache:flush command the site loads lot of time and I'm using AWS RDS, The CPU of the RDS instance is 100% used. I also tried removing the Redis configuration from the env.php file and stoped the Redis server. No use.


texts: Enable free shipping only for coupon only

texts:
How do I configure the Magento2 can do below promotion?
Free shipping with coupon code:

(order >= $50)?

I did google some result, some ask to enable free shipping method and set min-order-amount $50. that's not work. Coz, I don't want to show free shipping as a shipping method selection.

Free shipping only apply to user after they input the coupon code.


texts: Magento 2: New customer-session = new quote

texts:
I have to solve the following problem in Magento 2.3.4:
Several people log in at the same time with the same email address.
Each person should start with an empty shopping cart after logging in.
So the different people do not fill each other's shopping basket with products - just there own "session-cart".
So I have to link the quote to a session:
New session -> new quote, which is valid as long as the session.
What is the best way to do this?
Thank you very much for your hints!
Marco


texts: State Region Repeat 2 time like I have western Australia in Region Dropdown but its repeat 2 time so I want to delete one western Australia how I do this.


texts: Migrate magento 1 to Magento 2 : Data migration tool change column type

texts:
I'm trying to migrate from Magento 1.7.0.2 to Magento 2.3.1

For that I use the migration tool :https://devdocs.magento.com/guides/v2.3/migration/migration-tool-install.html

All is working fine except a custom table.

I get this message for the col2 when I launch the import :

Mismatch of data types. Destination document: my_table. Fields: col2

Is it possible to tell the migration script to ignore the column type in the database (since it change from varchar to text) ?


texts: Captcha not show on customer registration page

texts: CAPTCHA not show on customer register page when submit form invalid CAPTCHA error error i disable it from admin and after clearing cache enable it but nothing error gone.


texts:
Is there a way to get translated string in php code?

Something like this:

$string = __('something');
foreach ($stores as $store){
 echo $store->getName().': '.$store->getTranslated($string)."\n";
}

\\-- output:
english: someting
italian: qualcosa
french: quelque chose

EDIT:
@Vinz suggestion could be a nice workaround but I need to use __() function or prashes won't be collected for dictionary.

in magento 1 I used;

$newLocaleCode = Mage::getStoreConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_LOCALE, $storeCode);
$initialEnvironmentInfo = Mage::getSingleton('core/app_emulation')->startEnvironmentEmulation($storeCode);
Mage::getSingleton('core/translate')->setLocale($newLocaleCode)->init(Mage_Core_Model_App_Area::AREA_FRONTEND, true);
Mage::getSingleton('core/app_emulation')->stopEnvironmentEmulation($initialEnvironmentInfo);

so after some research i found this:

 /**
  * \Magento\Store\Model\App\Emulation
  */
 protected $emulation;

public function __construct(\Magento\Store\Model\App\Emulation $emulation) {
   $this->emulation = $emulation;
}

/**
 * example function in which we want to emulate a stores environment
 */
public function example($storeId, $area = 'frontend') {

   //starting the store emulation with area defined for admin
   $this->emulation->startEnvironmentEmulation($storeId, 'adminhtml');

   //you can update or save a product attributes here with correct scope or anything else you want to do, perform some test

   // discard the emulated environment after doing your work
   $this->emulation->stopEnvironmentEmulation();

}

at this link:
https://webkul.com/blog/magento2-store-emulation/

This works fine.


texts: Magento 2: How to fetch a custom attribute of products

texts:
I am trying to fetch a custom attribute which is of collection type.

I need to get all various types of collection in that attribute using Magento 2 custom rest API and display them in postman.


texts: get block that has been instantiated earlier

texts:
I want to get and modify the Mage_Adminhtml_Block_Sales_Order_Grid block from within an observer which is listening for the event resource_get_tablename.

In my observer I'm using the code

if($observer->getTableName() == 'sales_flat_order_grid') {
    $block = Mage::getBlockSingleton('Sales_Order_Grid');
}

Whilst this does get an instance of Sales_Order_Grid its not the one that has already been instantiated by the system.

I added some logging to the constructor of Mage_Adminhtml_Block_Sales_Order_Grid and I can see that its called twice. I hadn't expected this behaviour as the word Singleton, in the getBlockSingleton method, to me implies that there will be only one instance stored in the registry.


texts: how to get info from external url in magento2?

texts:
Normally i'm using following code to get information from external url.

$url = 'http://something.net/json/' . $ipAdd;

if (!$content = file_get_contents($url)) {
  $error = error_get_last();
  $this->logger->addInfo("HTTP request failed. Error was: " . $error['message']);
  }

What is best way to get information from external url?
i mean this is right way declare url and call file_get_contents function?


texts:
i'm a newbie.... When i go in backend to orders, i like to ship it and add a tracking number, so in the list there are carriers i don't need. just hide them
how can i do that?


texts: Mapping Magento Test Automation Framework suite to netbeans

texts:
I am unable to integrate the MTAF in netbeans. Can you please provide me some ideas ,how to map to netbeans.
My MTAF folder structure:

and netbeans configuration folder structure steps:

open netbeans click on FILE->NEWPROJECT->PHP->PHP APPLICATION WITH EXISTING SOURCES->CLICk.
Source folder(path to magento folder)
Run AS:"script in command line"-->PHP Interpreter

once I click on the  Projects window, right-click the node for your project and select "Properties". On the 'Sources' tab: In the 'Test Folder' field, set the path to the folder with tests. (I am unable to find the "Testfolder")

Please help with this or Tell me another procedure to map the magento test framework.

)


texts: Magento 2 - get store specific product name and description

texts:
My shop has 6 store views: DE, AT, IT, ES, FR, GB
Each store view uses the same set of product (but appriopriate translated)

Now, I would like to get product name from IT only for example. How do I do it?

Thanks!


texts: Shipping costs based on weight and cart subtotal

texts:
So far I have the shipping costs based on the total weight of the cart.
Orders with a total weight below 100 pay 1.95 and above 5.95.

Now what I'm trying to achieve is to adjust these shipping costs based on the cart subtotal. So when the total weight is below 100 AND the subtotal is above 20 shipping is free. When the total weight is equal to or above 100 AND the subtotal is above 20 shipping is 1.95.

I am using Magento CE 1.9. Thanks for any help!


texts: magento 2.1.1 checkout page logo not display

texts: I have set logo in header but it is showing in all pages except checkout page.Please tell how to set it.


texts: Using "Layout Update XML" to add a block to the sidebar

texts:
When I create a new page in Magento 2 using the "two columns with left bar" layout it by default puts the wishlist in there.

Using the "layout update XML" in the design options tab I can remove that using this:

<referenceBlock name="wishlist_sidebar" remove="true"/>

What I also want to do is replace it with my own static block. I thought something like the following would do the trick but it does not. Can someone help?

<container name="sidebar.additional">
   <block class="Magento\Cms\Block\Block" name="test" />
</container>


texts: Magento Extension Fatal Error "EaDesign_PdfGenerator"

texts:
I installed EaDesign_PdfGenerator on my Magento Version 1.9.1.0 with the Magento Connect Manager succesfully ( with no error message ).
But if I entered the Backend it says:

  Fatal error: Class 'EaDesign_PdfGenerator_Helper_Data' not found in /var/www/vhosts/mydomain/httpdocs/app/Mage.php on line 547

I think I am not using the new "rwd" Theme if this is important.

On my other Magento installation there is no problem by using this plugin (there I am using the rwd theme)

Code of my adminhtml.xml of the plugin.

<?xml version="1.0" ?>
<config>
    <menu>
        <pdfadmin_menu>
            <title>EaDesign PDF</title>
            <sort_order>50</sort_order>
            <children>
                <first_page>
                    <title>Templates</title>
                    <action>adminpdfgenerator/adminhtml_pdfgenerator</action>
                </first_page>
            </children>
        </pdfadmin_menu>
    </menu>
    <acl>
        <resources>
            <admin>
                <children>
                    <pdfadmin_menu>
                        <title>EaDesign PDF</title>
                        <sort_order>50</sort_order>
                        <children>
                            <!-- child items go here -->
                            <first_page>
                                <title>Templates</title>
                                <sort_order>10</sort_order>
                            </first_page>
                        </children>
                    </pdfadmin_menu>
                </children>
            </admin>
        </resources>
    </acl>
</config>


texts: Magento 2.3 upload_max_filesize max at 8M for import feature

texts:
I adjusted upload_max_filesize in magento 2.3 and i can change the value to be anything between 2M and 8M.

If i put anything else like 85M, 9M, 50M, etc the Admin bar > System > Data Transfer > Import prompt says

  Make sure your file isn't more than 8M.

It won't let me upload a file beyond that size even if it's set in /etc/php/7.2/apache2/php.ini or /etc/php/7.2/cli/php.ini after restarting apache2 service.

Is this a bug in 2.3? How do i get around this for data imports?


texts: Applying Rules for a single product pro-grammatically

texts: I have a store of around 30000 products and I want to apply rules for single product by using SKU of that Product. If i go and update the same via admin panel is reflecting but i would like to achieve the same pro-grammatically. I have also gone through applying rules pro-grammatically for all the products


texts:
Just updated to 2.3.0 and when i try to open Stores -> Configuration -> Sales -> Payment Methods i get following error:

  Exception #0 (BadMethodCallException): Missing required argument
  $version of Magento\Setup\Model\ModuleContext.

How can i solve it?


texts: The HTML content within PHP are not appearing only on some pages — Magento 2.2

texts:
I am using Magento 2, I have added a piece of HTML wrapped in PHP to this page:

  CustomTemplate/Magento_Customer/templates/account/Customer.phtml

This is the code:

            <?php

some text

            ?>

This works on most pages, such as the account page, and the code creates the div.Container and the div.Child.
However, on some other pages, such as the Main page, the content wrapped in PHP are not showing. The div.Container is there, but the div.Child does not show up.

Note that this issue happens only on the Main page and some other pages, could there be any specific reason that this code works on some pages but not on the others?
Any help is greatly appreciated.


texts: Pinit Button is not working in IE11 in magento 2

texts:
I have added pinit save button using following guide Pinit Widget builder in product detail page in gallery widget.

I have added pinit.js at the end of app/code/Vendor/Module/view/frontend/templates/product/view/gallery.phtml

It works in Mozilla and Chrome but it does not work in IE11. However it shows errors in console which are not concerned with pinit like

  Unable to get property 'dialog' of undefined or null reference : translate-inline.js (22,5)
  Unable to get property 'timepicker' of undefined or null reference : jquery-ui-timepicker-addon.js (18,2)

I think IE11 renders the pinit.js instantly or something else.

  Update 1: It is something related to fotoroma gallery widget. As I remove the gallery and replace it with the simple image it works fine.

  Errors in console.


texts: last_update flag of user data also changed when user changes address details?

texts:
I'm accessing the magento store via v1 soap api.
User details have a last_update flag that tells me when the last change has been.

Does anyone here know if this flag also changes if a user changes his/her adress details? Or do I have to check the adress flags too if I wish to be sure?


texts: different catalog_product_view per category

texts:
So I have a webshop that needs different ways of showing product detail pages.
For example:
product A is a configurable product that needs to show a contact form.

But product B is also a configurable product that doesn't need to show that form but a picture.

Also, the simple products that come from product A would need to have the same layout as product A.

I originally tried to do this by creating custom product types, but i can't figure out how to make my custom product types configurable in the right way. I would still like to do it this way if someone has an idea how to do it.

So now I'm looking for a different way.
For product types you can use:  catalog_product_view_type_custom.xml
Is there a way to do this per category the product is in? Or maybe per attribute?


texts: Magento 2 move an element for desktop only or mobile only

texts: is it possible that move an element for the desktop only or mobile-only using xml or any other solution of it.


texts: Proper environment for magento2-2.3 on windows 10

texts:
I'm working on Win 10 OS. And am going to install magento2-2.3 on my local computer.
Which xampp version and composer version should I use?


texts: How do I debug Magento report with no error?

texts:
I have a module that I created that stores data posted via form to a custom table and then sends a confirmation email.

I got to a point of testing the form action, and it gets there - but I get the "There has been an error processing your request" message.

Going to that report number in var/report shows this:

$ cat 1569284307198
a:5:{i:0;s:0:"";i:1;s:715:"#0 /var/www/staging/site/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Namespace_Module_IndexController->postAction()
#1 /var/www/staging/site/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('post')
#2 /var/www/staging/site/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#3 /var/www/staging/site/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#4 /var/www/staging/site/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#5 /var/www/staging/site/index.php(101): Mage::run('', 'store')
#6 {main}";s:3:"url";s:28:"/frontname/index/post/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

It may just be my inexperience, but there's nothing there that actually helps me find out what's wrong with my code.

How do I find out what's wrong with my code (not necessarily what is wrong with my code)?


texts: How do i add two additional checkout fields in the checkout page? (date and time fields)

texts:
I want to add two additional fields to the checkout page. A delivery-date fields (that can only have the date of at least tomorrow) and a delivery-time field (which can only be between two set times).

I've been trying to do this on my own, but i'm pretty new to Magento (not code in general, just Magento).

Any help on the matter would be much appreciated :)


texts: Is it necessary to upload product images into the "media/import" folder before importing products from 1.9.1 to 1.9.4?

texts:
Magento 1.9.1 to Magento 1.9.4

I am exporting products from Magento 1.9.1 into Magento 1.9.4 and I read the following here:

Before the import put image files in media/import and in the .csv file enter the image name prepended with a slash. You can use the same image for base, small, thumbnail images and media gallery. For that fill in the appropriate fields:

  image, small_image, thumbnail, media_gallery.

https://www.mag-manager.com/useful-articles/tipstricks/required-csv-file-values-for-error-free-magento-import-via-admin/

The spreadsheet I exported already has all those columns. Do I have to download the folder with all the product images (where exactly is that?) from the old store (1.9.1) and put it in the media/import folder or put it directly into the images folder on 1.9.4 (where is that?). Do I have to do this before I IMPORT the csv file or can I do it later?


texts: Trying to override Mage_Core_Model_Domainpolicy

texts:
I'm trying to override the model Mage_Core_Model_Domainpolicy. Everything should work by now, but, obviously, it doesn't. This is my config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <My_Module>
            <version>1.0.0</version>
        </My_Module>
    </modules>
    <global>
        <models>
            <core>
                <rewrite>
                    <domainpolicy>My_Module_Model_Domainpolicy</domainpolicy>
                </rewrite>
            </core>
        </models>
    </global>
</config>

My overriding class(app/code/local/My/Module/Model/Domainpolicy.php):

<?php

class My_Module_Model_Domainpolicy extends Mage_Core_Model_Domainpolicy {

    /**
     * Get frontend policy
     *
     * @return string|null
     */
    public function getFrontendPolicy() {
        return null;
    }

}

And here my module xml file:

<?xml version="1.0"?>
<config>
    <modules>
        <My_Module>
            <active>true</active>
            <codepool>local</codepool>
        </My_Module>
    </modules>
</config>

I've checked it a thousand times, but still NO clue what I'm doing wrong..


texts:
i want to rewrite the url of product from

  www.example.com/product-name.html

To

  www.example.com/SKU.html

Someone can help me? I am beginner of magento.but i have too many existing products.


texts: best practice for selecting parent theme in M2

texts:
I'm wondering which theme is best to use as my custom theme's parent theme?

Should it be Magento/blank or Magento/luma?

Does is matter or is one more stable than the other? I noticed some LESS files where changed in our latest upgrade.

  app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_progress-bar.less

some additional style rules were added which effected our child theme.

Even with that, luma has some features which are better than in blank, such as the layered nav being responsive on mobile with the Shop By Button which opens the layered nav in a slide in modal.

With Blank the Layered Nav is styled very poorly.


texts: Get product parent name from child product

texts:
I have a product model from order item model, which i call like this:

$product = $orderItem->getProduct();

The problem is one of the order item is a child product from configurable product, i need to retrieve the parent name from this product, is there a way to do this?


texts: It is Possible to change admin base url main site to secondary website?

texts:
I have multi-website in Magento 2.3.1. So the main site has an admin URL like "/admin". But I want to change the admin URL to my secondary website.
For instance,
From > www.mainsite.com/admin To > www.secondsite.com/admin
Also I checked store > configuration  > Admin > Custom Admin Url
But it is not working.
Any suggestion?


texts: Magento 2.3 Backup failed Error received from server

texts:
I want to upgrade magento from 2.3 > 2.3.1

my system running on google cloud servers using bitnami

I have registered my domain on cloudflare to get the ssl

at first upgrade attempt on third section to create Backup (after Readiness Check), I had this error

where after checking the install log file I find that all backups created excepts for database stucks on

DB backup is creating ...

list of backup files (I attempt multiple times):

and when I was checking the browser console I found that the error was :

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

So I find that the issue is related to wait above 100 seconds and related to cloudflare
https://support.cloudflare.com/hc/en-us/articles/200171926-Error-524-A-timeout-occurred

So I cut it connection and use the External IP for my VM in google cloud directly (Of course I changed the settings on store configuration to use the ip address)

so that I don't rely to cloudflare nor domain and connect direct to google cloud VM

2nd attempt to upgrade to 2.3.1 using the IP address I faced this issue:

Possibly unhandled rejection: {"data":null,"status":-1,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"index.php/maintenance/index","data":{"disable":true},"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/json;charset=utf-8"}},"statusText":"","xhrStatus":"error"}

please, How can I resolve this issue ?

{UPDATE}
After changing permission on Var and created backups and pass to system upgrade
the backup stopped and gives me Rollback button.

Console Log:

[2019-04-01 10:06:03 UTC] Job "setup:maintenance:enable []" has started
Enabled maintenance mode

[2019-04-01 10:06:03 UTC] Job "setup:maintenance:enable []" has been successfully completed
[2019-04-01 10:06:03 UTC] Job "setup:cache:disable []" has started
Changed cache status:
config: 1 -> 0
layout: 1 -> 0
block_html: 1 -> 0
collections: 1 -> 0
reflection: 1 -> 0
db_ddl: 1 -> 0
compiled_config: 1 -> 0
eav: 1 -> 0
customer_notification: 1 -> 0
config_integration: 1 -> 0
config_integration_api: 1 -> 0
full_page: 1 -> 0
config_webservice: 1 -> 0
translate: 1 -> 0
vertex: 1 -> 0

[2019-04-01 10:06:03 UTC] Job "setup:cache:disable []" has been successfully completed

in Network I found this is the isse

Error 503 Backend fetch failed
Backend fetch failed

Guru Meditation:
XID: 131278

Varnish cache server

Where now the full website is not working!

I followed the instruction on Bitnami to configure varnish

https://docs.bitnami.com/bch/apps/magento/configuration/configure-varnish/

but it doesn't work and the full website is down

Also bin/magento {command} neither bin/magento {command} it was not working, there was a problem with composer somehow after the website went down

so I Updated composer and it downoaded and installs all components

then when I try bin/magento {command} neither bin/magento {command} it stuck and doesnt display any thing so I had to terminated using CTRL+ X

It tooks long time to stop by it self with this error message

Now I cannot Rollback nor do anything.

I am using Bitnami on google cloud. Is there a way to

download the 3 backups files from this VM,
then install fresh Magento on another VM
then upload the backups files
Then Rollback the backups files on the new fresh magento

does it going to install the theme again or I should upload its files the do Rollback?

how can I restart the website and restore the backup files?
How to upgrade correctly?


texts: Magento 2 get special price product collection

texts: I want to get all sale products (which have specila price and special from date and special to date) in a .phtml file. Which i use in any where in store.specially in list page.


texts: Magento 2.2.8 Cart Price Rule with Country doesn't work when Coupon Code used

texts:
I have Magento 2.2.8 with a live and working store. We can not seem to make Cart Price Rules that have a Country/Region/Postcode/Shipping Method work when coupon codes are used. when remove that condition (regional restriction) and the rule works fine. Now if I leave that condition and do not use that coupon code, it also works properly.

Please suggest How can I go about that troubleshooting ? I have no conflicting rules that I can see.

Thanks.


texts: Magento 2: How to create configurable product Programmatically

texts:
I want to create a configurable product and assign some simple product to it.
I have found lots of solution in the web but it's not working.
Please let me know if any idea!!!

Thanks