texts:
I have created an API and I want to write test files for that API. How can it be done in Magento 2.3.5? I have referred the link - https://devdocs.magento.com/guides/v2.4/get-started/web-api-functional-testing.html and also saw the video by a famous Russian Magento Developer. I am unable to run the tests and this is the error I am getting if I run the test.
The command I ran from my Magento root directory is
vendor/bin/phpunit --config dev/tests/api-functional/phpunit_rest.xml

The error is:

Could not read "dev/tests/api-functional/phpunit_rest.xml".

Also, in PHPStorm, I am unable to configure the Unit Test version. I am getting this error.

If I use the autoloader.php I am getting the following error:

When I run the following command I am getting this error.
vendor/phpunit/phpunit/phpunit app/code/<Directory>

I need help in setting up the API testing in PHPStorm and the correct working code to test a POST API
Any help is highly appreciated.


texts: Getting Error in Magento 2.1 add to Product in Admin

texts:
I have created a new product in Magento 2.1 admin. I am getting the error shown below:

  Warning: Illegal string offset 'is_in_stock' in [...]/vendor/magento/module-catalog-inventory/Ui/DataProvider/Product/Form/Modifier/AdvancedInventory.php on line 87

Any idea what could cause this?


texts: Mass action for tranfering products with default values. Magento 1.8

texts:
I am able to transfer a single product between stores and choose default values

The code doing this is the following:

<?php if($this->getWebsites() && !$this->hasWebsite($_website->getId())): ?>
    <span class="website-<?php echo $_website->getId() ?>-select" style="display:none">
    <?php echo Mage::helper('catalog')->__('(Copy data from: %s)', $this->getChooseFromStoreHtml($_store)) ?>
    </span>
<?php endif; ?>

But i cannot do the same with multiple products at a time??? I have pasted the same code into

adminhtml/default/default/template/catalog/product/edit/action/websites.phtml

But it does not work!

Please help! It would mean so much too me if I could solve this problem as I'm newly employed and don't know much about magento yet (wow it's big and hard to understand!) - Thanks a lot


texts: core_cache keeps getting bigger - but I use redis and files

texts:
Hopefully, someone can help me?

I have Magento 1.9 and the database table core_cache keeps on getting bigger and bigger. Though I have setup my local.xml to use REDIS as the cache backend and also my sessions are setup to use files.

Is this normal?
If so, why is cache being set in the DB when I am using Redis? Shouldn't it only be in Redis?

What can I do to stop it using the DB?

Also I use amasty full page cache.


texts: How to generate url-key for product programmatically

texts:
I am creating products programmatically in my magento store by a PHP script. Everything is going correct but url-key not showing correct.

For example :
I have a product Test already in store which has url-key test and frontend url is test.html.
Now when I create a new product with name Test then it is showing url-key test in admin panel but in frontend url is test-123.html showing.

I want to set url-key as test-123 in admin panel also.

How to do that at the time of product creation?


texts: Magento 2 - Change the entire width of theme

texts:
I want to adjust the entire width of the Luma or Blank theme (I prefer Blank theme).

What is the best way to do this?


texts: How to empty the form before loading in magento 2

texts:
I have created popup modal using ajax and it works successfully. But once the form submitted, it saves in DB. But if I click again to perform action, It simply shows prefilled message instead of new form in popup. How to resolve it??

history.phtml

    <a href="#" id="click" class="click-me" data-id="<?= $_order->getEntityId(); ?>">Cancel

    <form action="<?php echo $block->getBaseUrl() . 'sales/index/index'; ?> " method="post" id="form-validate"
          enctype="multipart/form-data" autocomplete="off" data-mage-init='{"validation":{}}'
          data-hasrequired="<?php /* @escapeNotVerified */
          echo __('* Required Fields') ?>">

            Reason:
            <textarea id="reason" rows="4" cols="6" name="reason"></textarea>

    </form>


texts: Programmatically move category in Magento

texts:
I have 3000+ products in a brand category. How do I programmatically move brand to brand collection?

If I move in the backend it will take some time. How do I move?


texts: Magento 2 : specific product remove from quote

texts:
I set product's expire time in my custom module. When, product is expire at that time that specific product should be remove from quote. I used event layout_load_before for that.

Because, this code should be working from any page in whole site. If, any other event should i should then, please inform me that also.

Actual Result :

Now, point is that if I remove specific product from quote. Then, product will be remove but minicart is not update.

Expected Result :

When product remove from cart/quote then minicart also refresh and product should be remove from quote/cart.

How to do that ? Please help me.

My observer code :

$items = $this->_checkoutSession->getQuote()->getAllItems();
$createdAt = $this->_stdTimezone->date()->format('Y-m-d H:i:s');
foreach ($items as $key => $item) {
    if (strtotime($customModel->getExpireTime()) <= strtotime($createdAt)) {
        $this->_cart->removeItem($item->getId());
    }
}
$this->_cart->save();


texts: Is it possible to integrate Magento Go with a custom made system?

texts: Client would like to switch to Magento, specifically to Magento Go from currently used custom made webshop solution. Would it be possible to integrate Magento Go with this "in-house" system to use some of it's features - apart from writing the module and uploading to Magento Connect so that it may be installed from there?


texts: How to override template Magento\Sales\Block\Adminhtml\Items\Column\Qty

texts:
I have no luck overriding template Magento_Sales::items/column/qty.phtml in my custom module like so:
file
app/code/Maghos/Backorders/view/adminhtml/layout/sales_order_view.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="column_qty">
            <action method="setTemplate">
                <argument name="template" translate="true" xsi:type="string">Maghos_Backorders::items/column/qty.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>

After cache flush Magento is still loading this vendor file:
vendor/magento/module-sales/view/adminhtml/templates/items/column/qty.phtml
instead of my custom Maghos/Backorders/view/adminhtml/templates/items/column/qty.phtml.
What I am missing?


texts: Magento 2 Override Product Canonical Url

texts:
How would you override the product canonical url in Magento 2?

Scenario: We have a group products which cannot be configurable's (client request) so we've created 4 simples and connected them via product relations. Each of the 4 products are related to each other. Our problem is each of the 4 products have the same product information except for pricing & url which is bad for SEO.

Our proposed solution would be to change the canonical URL for 3 of the products to point to the 4th product which could be, for example, the cheapest product.


texts:
Anyone facing this issue with Magento 2.3.3 EE?
Unable to save page and block changes using Page Builder with enabled js minification.
Magento Version: 2.3.3 EE
Steps to reproduce:

Stores->Settings->Configuration->Advanced->Developer->JavaScript Settings->Minify JavaScript Files = Yes

Set production bin/magento deploy:mode:set production

Go to Content->Elements->Blocks\Pages->Edit

Make changes and Save

Changes are not saved

Any help will be appreciated.
Thank you.


texts:
In Magento nginx sample config, there is path for update. What is usage for this path?

# PHP entry point for update application
location ~* ^/update($|/) {
    root $MAGE_ROOT;

    location ~ ^/update/index.php {
        fastcgi_split_path_info ^(/update/index.php)(/.+)$;
        fastcgi_pass   fastcgi_backend;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_param  PATH_INFO        $fastcgi_path_info;
        include        fastcgi_params;
    }

    # Deny everything but index.php
    location ~ ^/update/(?!pub/). {
        deny all;
    }

    location ~ ^/update/pub/ {
        add_header X-Frame-Options "SAMEORIGIN";
    }
}


texts:
How to get only list of products that are selected inside the bundle product in magento2
when we create a bundle product we can selects some products to attach in bundle products i just want to show these attached products on detail page


texts: Cronjobs error - MySQL server has gone away

texts:
we suddenly have an error in the cronjob.

error message:

a:4:{i:0;s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";i:1;s:1334:"#0 /html/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(305): PDO->beginTransaction()

<#1 /html/magento/lib/Zend/Db/Adapter/Abstract.php(495): Zend_Db_Adapter_Pdo_Abstract->_beginTransaction()

<#2 /html/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(219): Zend_Db_Adapter_Abstract->beginTransaction()

<#3 /html/magento/app/code/core/Mage/Core/Model/Resource/Abstract.php(76): Varien_Db_Adapter_Pdo_Mysql->beginTransaction()

<#4 /html/magento/app/code/core/Mage/Core/Model/Abstract.php(313): Mage_Core_Model_Resource_Abstract->beginTransaction()

<#5 /html/magento/app/code/community/Aoe/Scheduler/Model/Observer.php(112): Mage_Core_Model_Abstract->save()

…


texts: How to set up multiple domains without redirecting the domain

texts: I currently have 3 domains set up the in the magento admin, only one of these is in use at the moment. I have to set up the other stores for the two other domains, but I don't know how to access these pages without redirecting the domains. How can I set up these sites?


texts: How to display my custom block after view.phtml, using XML layout updates only?

texts:
I can append my block to content block, by using reference, with this layout update:

<layout version="0.1.0">
    <catalog_category_view>
        <reference name="content">
            <block type="mynamespace_mymodule/myblock" name="filtereduseditems" before="-">
                <action method ="getUsedItemsInCategory">
                </action>
            </block>

            <block type="mynamespace_mymodule/myblock" name="filterednewitems" after="-">
                <action method ="getNewItemsInCategory">
                </action>
            </block>

            <block type="mynamespace_mymodule/myblock" name="filteredremainderitems" after="-">
                <action method ="getRemainderItemsInCategory">
                </action>
            </block>

        </reference>
    </catalog_category_view>
</layout>

But it displays before view.phtml. I want it to be displayed after view.phtml, which already exists. How can I do that? I tried these references:

<reference name="category.products">
<reference name="product_list">
<reference name="product_list.name.after">
<reference name="product_list.after">

and it didn't work, the block can only be displayed on:

<reference name="content">

. What else can I try? I want my block (3 instances of it) appended to the end of (name=)'content' block, after view.phtml, or appended to view.phtml, but without changing the view.phtml.


texts: New Quote id generate on every time of getQuote() in magento

texts:
When I try to get cart items by using getQuote() method like

Mage::getModel('checkout/cart')->getQuote();

It generates new quote id on every time of this line call. sales_flat_quote table growing rapidly and it will make a looping! And show the below error! Please check the screenshot!

  Fatal error: Maximum function nesting level of '6000' reached, aborting!

This issue occurs only some times and for some customers only. If I check in another system, Its showing fine! It rectify automatically after some times. But I can't understand why it happening.

Any advice or suggestions would be greatly appreciated!

EDIT

I have created custom module for add handling fee amount. I just wrote a code like get cart items quantity of specific category, and add fee amount based on this quantity. I have followed this tutorial. I'm just using Mage::getModel('checkout/cart')->getQuote(); for get cart items.

 public function getitemqtys() {
        $request = Mage::getModel('checkout/cart')->getQuote();
        foreach ($request->getAllItems() as $item) {
            $product = Mage::getModel('catalog/product');
            $product->setId($item->getProductId());
            $cat_ids = $product->getResource()->getCategoryIds($product);
            if (in_array(1057, $cat_ids)){
                $item_quanties+=$item->getQty();
            }
        }
        return  $item_quanties;
     }

Tried this code for get Cart item quantities of specific category!


texts: Send order confirmation mail to email given in shipping address rather than logged in email id

texts:
I have logged in using abc@gmail.com. In checkout page, I have changed shipping email id to xtz@gmail.com in shipping address.

But, the mail is sending to abc@gmail.com. I want the mail to send to the email given in shipping address.


texts: Magento 2 Add extension attributes in order totals

texts:
I want to add a custom field in the cart totals API call
/V1/guest-carts/:cartId/totals-information.
The custom field value is stored in the quote table
How can I do this?


texts: 404 Error after moving Magento 2.2.3 from localhost to live server

texts:
I had installed the Magento on my localhost,  Install and customise the theme and now when I uploaded the website to the server. I cannot access the admin page; it gives me the 404 error, and my site is not displaying correctly.

I have already change the URL to MySQL, core_config_data. Run the reindex and flush cache command also try to (php bin/Magento setup:static-content:deploy) but no luck. Current file permission:  Folders: 0775, Cache Folder:  777 and files: 0644

Website: http://exhaustkings.co.uk/backup/


texts: Quantity of a product sold in the last 30 days from sku or id in Magento 2?

texts:
I need to obtain the quantity that has been sold of a product from its sku or id in Magento 2. This quantity must refer to the last 30 days.
I have tried to follow what is reported here but without success:
Magento 2: How many products sold Query
Thank you to anyone who can help me.


texts: How can i translate the FTP(Fixed Product Tax)?

texts:
How can I translate the text that I get FTP that I like the most?

Its not a extension or something, FTP is an attribute that has a product and is different for each product

Magento version 2.2.4


texts:
magento 2.1.7 how to access from another device on localhost?
I can access to phpmyadmin, but when I tried to access magento/admin from another device browser jumps to localhost instead of my typed IP address.
How can i give permission to access from another device?


texts: Display site logo in custom email template

texts:
I want to display the site logo in one of the sections of my New account email confirmation template. So basically when the user signup they receive an email of the account creation. Now I want to customize this content. I went to Marketing -> Communication -> Email Template and change my template content. Below is what I get

Now I'm wondering why my Site logo is not displaying. Honestly, I don't know if this is the correct code to display the actual site logo in the email. When I view the email in my email client I get a broken site logo. Any idea on how to fix this?


texts:
I would like to disable a field in magento admin at default level.

The reason for this is I have built a bespoke stock integration which will overwrite the default values regularly.

I will populate the fields at "store view" level.

Things I have tried:

$installer->updateAttribute('catalog_product', 'name', 'readonly', 1);
$installer->updateAttribute('catalog_product', 'name', 'is_readonly', 1);
$installer->updateAttribute('catalog_product', 'name', 'disabled', 1);
$installer->updateAttribute('catalog_product', 'name', 'is_disabled', 1);

I understand that if this is possible I may not be able to make new products within Magento. I am ok with this due to the fact all sku's should be imported from our stock management.


texts:
I have various shipping methods configured and would like to select a default one based on country of the visitor or something.

For example if the user is from Spain (Or spanish Locale) then default shipping is ... and if from another country then International shipping.

Can anybody help me out here? I don't have a clue where to start.

Also I want it to be applied by default, because we have an PayPal express checkout and if I click on it without entering the cart and selecting the Shipping method from the Estimate section, the shipping cost's are not applied when Paying by PayPal... This is a problem..

Thanks,


texts: Magento 1 : Get product collection using command line throwing error

texts:
I have a script file like getproducts.php & have placed it under script/getproducts.php. I want to get products collection in my script file.

code in my file:

<?php

require_once('../app/Mage.php');

umask(0);
Mage::app('admin');

Mage::app()->getStore()->setId(Mage_Core_Model_App::ADMIN_STORE_ID);

$productCollection = Mage::getModel('catalog/product')->getCollection();

echo "Product Count ".$productCollection->getSize();

After executing my getproducts.php through command line

html/demosite/script$ php getproducts.php

I am getting error on prompt:

PHP Fatal error:  Uncaught exception 'Mage_Core_Exception' with message 'Invalid entity_type specified: catalog_product' in /var/www/html/demosite/app/Mage.php:595

Note : However it's working when trying to hit directly by Url: http://localhost/demosite/script/getproducts.php


texts:
I have many issues in the error log file that I don't understand. I didn't found any info on this specific issue anywhere.

There is the error :

  [:error] [pid 23390] [client 78.235.181.108:52380] PHP Fatal error:
  Uncaught Error: Call to a member function getFinalProduct() on null in
  /data/www/mystore/prod/vendor/magento/module-wishlist/CustomerData/Wishlist.php:135\nStack
  trace:\n#0
  /data/www/mystore/prod/vendor/magento/module-wishlist/CustomerData/Wishlist.php(120):
  Magento\Wishlist\CustomerData\Wishlist->getItemData(Object(Magento\Wishlist\Model\Item))\n#1
  /data/www/mystore/prod/vendor/magento/module-wishlist/CustomerData/Wishlist.php(77):
  Magento\Wishlist\CustomerData\Wishlist->getItems()\n#2
  /data/www/mystore/prod/vendor/magento/module-customer/CustomerData/SectionPool.php(79):
  Magento\Wishlist\CustomerData\Wishlist->getSectionData()\n#3
  /data/www/mystore/prod/vendor/magento/module-customer/CustomerData/SectionPool.php(60):
  Magento\Customer\CustomerData\SectionPool->getSectionDataByNames(Array)\n#4
  /data/www/mystore/prod/vendor/magento/module-customer/Controller/Section/Load.php(77):
  Magento\Customer\CustomerData\SectionPool->getSectionsData(Array,
  false)\n#5 /data/ww in
  /data/www/mystore/prod/vendor/magento/module-wishlist/CustomerData/Wishlist.php
  on line 135

, referer:

The wishlist feature is the basic one from Magento (no extension should overwrite that on our website).

Do you have any idea about this problem ?


texts: Magento 2 - Where cart price rules applied in codebase?

texts:
I am working on magento 2.2.0. I have created some cart price rules with discount. I have added 5% product price discount in rule action. And 3 to 4 AND conditions for rule.

I want to know in magento 2.2.0 where these cart price rules are actually applied ? because with 4 conditions it's not working, working with only one condition.

Any help is much appreciated!

Thanks


texts: How to create a custom Report in Magento2. Please provide any sample code / link.


texts: create customer & login that customer Programmatically in custom controller

texts:
i am creating one getaway & hosted solution that redirect user on select payment method so user can't press place order button so it's creating problem in register checkout.     customer not create or login on register checkout.now i want to create & login that customer         Programmatically using detail present in quote on return of customer from that payment site.May be Magento have already have some methods. can any body helps.
Thanks


texts:
I need to create link to new page.

 <?php if ($model->_data['firstname'].' '.$model->_data['lastname']===$managedAgents[$orderItem->getAgentId()]) :?>
 <?php if($orderItem->qty_invoiced==0):?>
<a href="">
  <?php echo $this->__('Finalize Order')?>
 </a>
<?php else:?>
<?php echo $this->__('Payment made'); ?>
<?php endif;?>
<?php endif;?>

Which way do I need to write in href?


texts: How can I get security patch for Magento Professional 1.10.0.1?

texts:
I have a client running an older version of Magento Enterprise (Professional 1.10.0.1) and they need the SUPEE-1533 patch and it's pair SUPEE-5390. The patch is titled Magento Enterprise Edition 1.10.1.x: PATCH_SUPEE-5390_EE_1.10.1.0_v1.sh
but for whatever reason is not available for public download and the client no longer has access to their enterprise magento login. I've reached out to Magento but not response yet. Chances are there is a file out there someone, possibly even a direct link.


texts: Magento 2 - Card decline status not reverting quantity

texts:
Just like cancel order, I have created a new status card_decline I have set canceled state to this new status.

Now when I am updating any order to card_decline status programmatically then it is not reverting product quantity from order just like we get quantity reverted to products when we cancel any order.

For cancel order we just use cancel code like this: https://magento.stackexchange.com/a/115279/49772

I am updating status like this:

$orderState = Order::STATE_CANCELED;
$order->setState($orderState)->setStatus("card_declined");
$order->addStatusToHistory($order->getStatus(), '');
$order->save();

I know just changing status wont revert back quantity, please help me find approach to revert quantity along with status update.


texts: How to to add external nusoap library in a custom extension?

texts: I have to include external NUSOAP library in my custom made extension. What steps do I have to take as PHP's require_once() or include() doesn't work in Magento.


texts: Display quantity of simple product using sku

texts:
Following is the code to get stock quantity by using product Id.

<?php
    $product = Mage::getModel('catalog/product')->load($products->getId());
    echo (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($product)->getQty();
?>

I need to get the same result using product SKU.
Is it possible to retrieve the data using above method?

or else how can I Iterate the data if I follow the below path?

$productsku = $_item->getSku();
$skuu = $productsku;
$_productCart = Mage::getModel('catalog/product')->loadByAttribute('sku', $skuu);
$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_productCart);

How can I iterate the stock quantity from $stock?


texts:
I wrote a new extension and trying to create a configuration setting file in Magento Admin. When I run on browser after clearing the cache I got the error like below

Fatal error: Class 'Mage_GlobalSms_Helper_Data' not found in D:\wamp\www\project\app\Mage.php on line 547

In system.log error log file I found the error below:

2015-05-27T13:40:43+00:00 ERR (3): Warning: include(Mage\GlobalSms\Helper\Data.php): failed to open stream: No such file or directory  in D:\wamp\www\project\lib\Varien\Autoload.php on line 93
2015-05-27T13:40:43+00:00 ERR (3): Warning: include(): Failed opening 'Mage\GlobalSms\Helper\Data.php' for inclusion (include_path='D:\wamp\www\project\app\code\local;D:\wamp\www\project\app\code\community;D:\wamp\www\project\app\code\core;D:\wamp\www\project\lib;.;C:\php\pear')  in D:\wamp\www\project\lib\Varien\Autoload.php on line 93

My app\etc\modules\ file as below:

<?xml version="1.0"?>
<config>
    <modules>
        <Php_GlobalSms>
            <active>true</active>
            <codePool>local</codePool>
            <version>0.0.1</version>
        </Php_GlobalSms>
    </modules>
</config>

My config.xml as below:

<config>
<modules>
    <Ucs_GlobalSms>
        <version>0.0.1</version>
    </Ucs_GlobalSms>
</modules>
<admin>
     <routers>
        <adminhtml>
            <args>
                <modules>
                    <ucs_globalsms before="Mage_Adminhtml">Ucs_GlobalSms_Adminhtml</ucs_globalsms>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>
<global>
    <helpers>
        <globalsms>
            <class>Ucs_GlobalSms_Helper</class>
        </globalsms>
    </helpers>
    <models>
        <custommodule>
            <class>Ucs_GlobalSms_Model</class>
        </custommodule>
    </models>
    <events>
        <customer_register_success>
            <observers>
                <Ucs_GlobalSms_customer_register_success>
                    <type>singleton</type>
                    <class>Ucs_GlobalSms_Model_Observer</class>
                    <method>customerRegisterSuccess</method>
                </Ucs_GlobalSms_customer_register_success>
            </observers>
        </customer_register_success>
    </events>
</global>

My Helper/Data.php as below:

<?php
class Php_GlobalSms_Helper_Data extends Mage_Core_Helper_Abstract {

}

I can find lot of posts on SO saying that Data.php is missing, but everything is there, still I am getting error


texts:
When i try to launch cron on magento 1.9.0.1 in crontab, I have this error :

...can't get apc memory size...

In my apc.ini, I have "apc.enabled=1", "apc.enable_cli = 0".

I know, I need to have "apc.enable_cli = 1" but I can't, instead I use :

/usr/bin/php -f /www/cron.php -d "apc.enable_cli=1"

But it doesn't work. It's really strange because on magento 1.7 this trick working well.

Do you have an idea why ?


texts: Rwd Child Theme Copy Sass Partials Or Create New Ones

texts:
I want to create an upgrade-safe child theme mypackage/mytheme of the default rwd/default theme.

Magento's RWD dev guide says:

  To customize styles for an existing Magento theme, you should edit existing Sass partials.

This sounds as if it was best practice to copy the existing Sass partials to one's own theme to override them and edit them there. The problem is that with each Magento update, one would again need to compare the files and merge the changes manually. I would consider it best practice to always define new Sass partials similarly named as the default ones and make all customisations there. For instance, in order to customise the header, I would do the following:

Create a new file mypackage/mytheme/scss/layout/_custom_header.scss with my modifications to the header CSS.
Edit the file mypackage/mytheme/scss/_core.scss and add the following line at the end:

@import "layout/custom_header";

This would make an upgrade easy as it should normally not be necessary to compare the changed rwd/default Sass partials with the custom ones. So why does Magento / Classy Llama suggests copying the files? Do I overlook some disadvantages of the describes method?

I have read the text directly behind the cited sentence where Magento suggests a similar method. Anyway, they say you should use it "if you are building a highly custom theme". I think it is good to use it for any theme. I do not see any disadvantage of this method


texts: Migrate two magento 1 websites on single magento 2 setup with multi website

texts:
We have 2 magento 1 websites each on it's own magento 1 installation, is it possible to migrate them and merge them on same magento 2 installation as multiple website (website A & website B) keeping stores for each of them separate for its own(website A -> store A ; website B -> store B )?

If yes then can we need to do it before migrate or after?


texts: Problems Upgrading magento 2.2 to 2.3 via web wizard

texts:
Hi guys ive been trying to upgrade our magento 2 store from 2.2 to 2.3 but im getting some odd dependancy issues. Does anyone have any suggestions?

This is the error:

Problem 1
- Conclusion: don't install magento/product-community-edition 2.3.3
- magento/product-community-edition 2.3.3 requires magento/framework 102.0.3 -> satisfiable by magento/framework[102.0.3].
- Conclusion: don't install magento/framework 102.0.3
- Conclusion: don't install symfony/console v3.4.36
- Installation request for magento/product-community-edition 2.3.3 -> satisfiable by magento/product-community-edition[2.3.3].
- Conclusion: don't install symfony/console v2.8.38
- Conclusion: don't install symfony/console v4.1.1|install symfony/console v2.8.38
- Conclusion: don't install symfony/console v4.1.2|install symfony/console v2.8.38
- Conclusion: don't install symfony/console v4.1.3|install symfony/console v2.8.38
- Conclusion: don't install symfony/console v4.1.4|install symfony/console v2.8.38
- Conclusion: don't install symfony/console v4.1.5|install symfony/console v2.8.38
- Conclusion: don't install symfony/console v4.1.6|install symfony/console v2.8.38
- Conclusion: don't install symfony/console v4.1.7|install symfony/console v2.8.38
- Conclusion: don't install symfony/console v4.1.8|install symfony/console v2.8.38
- Conclusion: don't install symfony/console v4.1.9|install symfony/console v2.8.38
- Conclusion: don't install symfony/console v4.1.10|install symfony/console v2.8.38
- Conclusion: don't install symfony/console v4.1.11|install symfony/console v2.8.38
- Installation request for sebastian/phpcpd 2.0.4 -> satisfiable by sebastian/phpcpd[2.0.4].
- Can only install one of: symfony/console[v4.1.0, v3.4.21].
- Can only install one of: symfony/console[v4.1.0, v3.4.22].
- Can only install one of: symfony/console[v4.1.0, v3.4.23].
- Can only install one of: symfony/console[v4.1.0, v3.4.24].
- Can only install one of: symfony/console[v4.1.0, v3.4.25].
- Can only install one of: symfony/console[v4.1.0, v3.4.26].
- Can only install one of: symfony/console[v4.1.0, v3.4.27].
- Can only install one of: symfony/console[v4.1.0, v3.4.28].
- Can only install one of: symfony/console[v4.1.0, v3.4.29].
- Can only install one of: symfony/console[v4.1.0, v3.4.30].
- Can only install one of: symfony/console[v4.1.0, v3.4.31].
- Can only install one of: symfony/console[v4.1.0, v3.4.32].
- Can only install one of: symfony/console[v4.1.0, v3.4.33].
- Can only install one of: symfony/console[v4.1.0, v3.4.34].
- Can only install one of: symfony/console[v4.1.0, v3.4.35].
- magento/framework 102.0.3 requires symfony/console ~4.1.0 -> satisfiable by symfony/console[v4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9].
- Conclusion: don't install symfony/console v4.1.12|install symfony/console v2.8.38
- Conclusion: don't install symfony/console v4.1.0|install symfony/console v2.8.38|install symfony/console v3.4.21|install symfony/console v3.4.22|install symfony/console v3.4.23|install symfony/console v3.4.24|install symfony/console v3.4.25|install symfony/console v3.4.26|install symfony/console v3.4.27|install symfony/console v3.4.28|install symfony/console v3.4.29|install symfony/console v3.4.30|install symfony/console v3.4.31|install symfony/console v3.4.32|install symfony/console v3.4.33|install symfony/console v3.4.34|install symfony/console v3.4.35|install symfony/console v3.4.36

If there is anything else you guys need to help let me know and ill get it as soon as possible!


texts:
I saw a function declared like this below.
<?php
public function getFirstName():string
{
    return $this->firstName();
}

why this :string is used and when I should use this.


texts: Magento 2 Make "View and Edit Cart" a button on mini cart

texts:
I'm trying to make the "view and edit cart" link at the bottom of the mini cart a button.

I have copied content.html to my child theme

  app/design/frontend/Mytheme/Mytheme/Magento_Checkout/web/template/minicart/content.html

Within content.html the "View and edit cart" link is generated from

I have changed it to

                 <button
                    id="lower-cart-btn-checkout"
                    type="button"
                    class="action viewcart"
                    data-bind="attr: {href: shoppingCartUrl}">

            </button>

The button is generated. However, when you click the button nothing happens.

Does anyone know what I'm doing wrong here?


texts: Magento 2.3.4 Region Missing When Creating a New Address During Checkout

texts:
Running into an issue during checkout on the Shipping step. When you add a new address to ship to during this step, it asks you for your City, State, Zip... however after adding your address, the State disappears, resulting in an error.
Adding New Address (Including the State):

State Not added, resulting in error:

So far the only way to counter this is to first go into your account and add the new address first, then go to checkout and select the address.
Any ideas?


texts: Extending Third Party Modules in Magento 2

texts:
In Magento 2 for themes, it's incredibly easy to extend from a parent. This follows a nice logical hierarchy when inheriting theme .xml and .phtml files. This is clearly defined in the theme.xml.

However in my experience thus far with Magento 2. Modules by nature are (And understandably) entirely encapsulated with their respected module namespaces. Which in most cases, inherit from the Magento 2 Vendor core.

Although when wanting to inherit from a Third party module that may, or may not already extend from the Magento core. As I may have business specific functionality to add.

Say for example, the Third Party namespace and folder structure that extends the a Third Party's Blog:

/app/code/[ThirdPartyVendor]/[SimpleBlog]

/Block

...

/Controller

/Post

Index.php

This SimpleBlog's core functionality has some awesome features that they've added - although I need to tweak some aspects.

I could just edit directly their Module code (Inside Index.php). Although this obviously would lead to update problems.

So what if I reference the Module from my Own Controller implementation of the Module, of the same name within my Vendor folder?

<?php
/**
 * Fetch the Third Parties' Original Implementation.
**/
require( "/app/code/[ThirdPartyVendor]/[SimpleBlog]/Controller/../Index.php" );

/**
 * My Vendor Namepace
**/
namespace MyVendor\SimpleBlogExtended\Controller\Post;

/**
 * My Class Implemention, Extending upon the original Third Party Class
**/
class Index extends \ThirdPartyVendor\SimpleBlog\Post
{
     //
     public function __construct()
     {
         //Extend the original functionality.
         parent::__construct();
     }

     //
     public function myNewFunctionality()
     {

     }
}
?>

But then this isn't clean, nor would this account for any other dependencies?

The other method I thought of - which is widely documented for extending the core, is di.xml Dictating the objectManager to take a perference of what to inject for a to-be-loaded class. Although this isn't a full module inheritance so to speak.

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema instance="...">
     <preference for="ThirdPartyVendor\SimpleBlog\Controller\Post.."
                 type="MyVendor\SimpleBlogExtended\Controller\Post.." />
</config>

Same methodology could be applied for routes.xml - taking precedence a request.

Apologies that this may seem very broad; but TLDR: Best Practice for extending a Module; not it's themes?


texts: Different layouts for parent categories?

texts:
This is my category tree:

-Default Category
--Top Cat 1
---sub cat 1
----sub sub cat 1
----sub sub cat 2
----sub sub cat 3
---sub cat 2
---sub cat 3
--Top Cat 2
---sub cat 1
---sub cat 2
---sub cat 3
--Top Cat 3
---sub cat 1
---sub cat 2
---sub cat 3

The thing is I need to display different content and sidebar on the 3 Top Categories. How can I achieve this?


texts:
My previous directory is this

pratyush@pratyush-To-be-filled-by-O-E-M:~$

but when I run  sudo -i for removing xampp then it's showing this

root@pratyush-To-be-filled-by-O-E-M:~#

How can I move again the previous command?


texts:
For some reason my checkout page is bugged, and I didn't change anything as far as I know. Usually the flow goes like this:

Add product > Go to cart > Go to checkout > Fill out details OR login > 'Place order'.

If I log in at that detail page, I get to select my address from my account, which is good. And then I can continue. However, if I'm on a random page and login from there, and then go to my cart, I run into an issue. When I go to the next page (checkout), it remains blank. I only see the summary of items on the right side, but not the 'Place order' button, nor my address(es).

Also, this 'one page refreshing' thing bugs me. When I have my email auto-filled in at the checkout page, I have to add and remove a character to have the javascript triggered to show the password field. Can't I just add a page in between this process giving people the option to choose 'login', 'register', or 'guest checkout'.

Hope someone can answer these questions.


texts: Need Random product block with Magento Full page cache enable

texts:
I am using the default Magento Full page cache with magento version 1.13.1.0
I have one random product clock listed on home page, but the issue is when I enable full page cache, it stops loading the random product.

Is there any way I can disable the Full page cache for that block only?
I tried with the following, but it seems like it is disabling the full page cache for the entire page. I use this in my block file where the collection is being loaded.

 $cache = Mage::app()->getCacheInstance();
 $cache->banUse('full_page');


texts: Magento 2.1: How to handle custom payment grand total mismatch upon return to the merchant ?site

texts:
The customer payment gateway I'm working on is based on the workflow of PayPal Express checkout. Upon the checkout, the user will be redirected to the payment site and then return back to the Magento store after the payment is completed.

Here's the catch, PayPal Express keep the shopping cart as quote until the user is returned and then convert quote into order. If the user were to modify the shopping cart on a different browser tab and continued with the PayPal payment. The final charge amount will still reflect the latest shopping cart grand total.

Unfortunately, my custom payment gateway has the transaction occurred on their site before returning back to the merchant. So if the user were to modify the shopping cart on separate tab, the grand total would be mismatched with the paid amount.

We consider to add the validation that will fail the order creation if the payment doesn't match with the final grand total. However, the payment will be made to the merchant, but no order will be created on the store.

If we were to create an order first before sending to the payment gateway, if the user were to cancel the payment, then the order will be canceled as well. However, we may end up having the situation where someone is messing with the system and end up throwing a large numbers of cancelled orders on the system.

Since the payment amount cannot be altered while the user is on the payment gateway site, what would be the best way to handle this situation?

Thank you,


texts: append title in shopping cart if size=twin

texts:
Can somebody tell me the code and page to place code for this functionality?

My product titles for twin size blankets cannot indicate the size in the title. I'd like to append the title in the shopping cart ONLY if a twin size blanket is placed in the cart


texts: How to add some custom price to order total on reorder from admin?

texts:
I am trying to add some custom price to order total on reorder from admin but
i am not sure about using observer or controller to modify.
Any thoughts ?


texts:
In checkout page at order review section, Magento 1.9 only showing one discount , when there are more than one promo applied:

how can i breakdown all discounts in order review?


texts:
How on earth do I programatically retrieve customers latest order?

Tried a few solutions on the web, but they all get all orders from a customer, not all.


texts:
I want to get the previous page controller action name from previous page URL in Magento 1.9.

I get the previous page url by this:

Mage::app()->getRequest()->getServer('HTTP_REFERER');

Now I tried to get the controller name from page url.

My question is "How to get the controller action name from page url?"

Thanks.


texts: Additional shipping fees for specific items...possible?

texts:
I have a client with a Magento site that we inherited from their original developer and I don't know much about the platform. The client is an online candy store and wanted to know...

"Is there a way we can get something set up in Magento to allow us to check a box if an added fee of $1.99 per item needs to be added to ship chocolate in the summer.  We can go thru the products and check the ones that need this added to, we just need something set up in the back office and something for customers to see when they are viewing the product and checking out letting them know of this chocolate shipping charge."

Can anyone shed some light on the process of adding additional shipping fees for certain products?


texts: How to fix invalid indexer on magento 2.1

texts:
I am new with Magento, is my first time with this software and I need a little support.

I have installed Magento in AMPPS of my mac, but in dashboard appears a warning with the ne

  One or more indexers are invalid. Make sure your Magento cron job is running.

I´ve looked for the solution to this and it says, execute the next script on shell:

  bin/magento indexer:reindex

I ready go to my shell and I´ve executed this command but is not working.

I need "go to the CLI and then the root folder of your magento installation and run the below command"...

but I don´t know how to do this?


texts: echoving new selected attribute in Magento created using setup script

texts:
I create custom attribute for customer using installer script it worked.
now i want to echo selected attribute here is my approach

my installer script

$setup->addAttribute('customer', 'gender', array(
    'type'          => 'varchar',
    'label'         => 'Gender',
    'input'         => 'select',
    'required'      => false,
    'sort_order'    => 9,
    'global'     => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
    'backend'    => 'eav/entity_attribute_backend_array',
    'option'     => array (
        'values' => array(
            0 => 'Mail',
            1 => 'Femail',

        )
    ),
));

if (version_compare(Mage::getVersion(), '1.6.0', '<='))
{
      $customer = Mage::getModel('customer/customer');
      $attrSetId = $customer->getResource()->getEntityType()->getDefaultAttributeSetId();
      $setup->addAttributeToSet('customer', $attrSetId, 'General', 'gender');
}
if (version_compare(Mage::getVersion(), '1.4.2', '>='))
{
    Mage::getSingleton('eav/config')
    ->getAttribute('customer', 'gender')
    ->setData('used_in_forms', array('adminhtml_customer','customer_account_create','customer_account_edit','checkout_register'))
    ->save();
}

This is my phtml file

<select name="gender" id="gender">
  <option value="1" <?php if($this->getCustomer()->getGender()==1){ echo 'selected="selected"'; } ?> >Mail</option>
  <option value="0" <?php if($this->getCustomer()->getGender()==0){ echo 'selected="selected"'; } ?>>Femail</option>
</select>

But when i echoing value  using $this->getCustomer()->getGender() it gives  null.how I get selected value after save


texts:
We use some line to display if we are open or not. For this we use this line:

<?php $weekday = Mage::getSingleton('core/date')->date('w'); ?>
<?php $hour    = Mage::getSingleton('core/date')->date('G'); ?>
<?php if ($weekday >= 1 && $weekday <= 5 && $hour >= 8.30 && $hour < 17.30) : ?>

Open

<?php else : ?>

Closed

<?php endif; ?>

But I want to expand this line, that we are closed because of a national day of the year.  How can I expand this code with some specific dates. For example 14/05/2015 and 24/05/2015 and 25/05/2015.

How can I achieve that?


texts: Cannot access site to admin after disabling cache

texts:
I was attempting to install a Google Captcha extension from MageComp. In the install instructions it said:
" It’s required to disable cache in the administration panel of your site. Go to System/Cache Management.  Choose all caches and take action “Disable” then submit. "

As soon as I did this I was presented with the following error screen:
There has been an error processing your request
Exception printing is disabled by default for security reasons.

Error log record number: 693155652642

Now  I cannot access either the website or the admin area, I just get the error screen. I  tried editing the database to re-enable the Cache, however it made no difference. I should have backed up the site before I did this, but thought it would be a simple install, & that nothing would go wrong (big mistake). Below is a copy of the 'Error log record number: 693155652642' Does anybody have any idea?

a:4:{i:0;s:98:"SQLSTATE[HY000] [1045] Access denied for user 'selbergf_magento'@'localhost' (using password: YES)";i:1;s:2317:"#0 /home/selbergf/public_html/lib/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /home/selbergf/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(251): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /home/selbergf/public_html/lib/Zend/Db/Adapter/Abstract.php(448): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 /home/selbergf/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 /home/selbergf/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 /home/selbergf/public_html/app/code/core/Mage/Core/Model/Resource/Type/Db/Pdo/Mysql.php(45): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 /home/selbergf/public_html/app/code/core/Mage/Core/Model/Resource.php(93): Mage_Core_Model_Resource_Type_Db_Pdo_Mysql->getConnection(Object(Mage_Core_Model_Config_Element))
#7 /home/selbergf/public_html/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(297): Mage_Core_Model_Resource->getConnection('core_read')
#8 /home/selbergf/public_html/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(312): Mage_Core_Model_Mysql4_Abstract->_getConnection('read')
#9 /home/selbergf/public_html/app/code/core/Mage/Core/Model/Mysql4/Cache.php(41): Mage_Core_Model_Mysql4_Abstract->_getReadAdapter()
#10 /home/selbergf/public_html/app/code/core/Mage/Core/Model/Cache.php(424): Mage_Core_Model_Mysql4_Cache->getAllOptions()
#11 /home/selbergf/public_html/app/code/core/Mage/Core/Model/Cache.php(459): Mage_Core_Model_Cache->_initOptions()
#12 /home/selbergf/public_html/app/code/core/Mage/Core/Model/App.php(1101): Mage_Core_Model_Cache->canUse('config')
#13 /home/selbergf/public_html/app/code/core/Mage/Core/Model/Config.php(404): Mage_Core_Model_App->useCache('config')
#14 /home/selbergf/public_html/app/code/core/Mage/Core/Model/Config.php(286): Mage_Core_Model_Config->_canUseCacheForInit()
#15 /home/selbergf/public_html/app/code/core/Mage/Core/Model/App.php(359): Mage_Core_Model_Config->loadModulesCache()
#16 /home/selbergf/public_html/app/code/core/Mage/Core/Model/App.php(295): Mage_Core_Model_App->_initModules()
#17 /home/selbergf/public_html/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#18 /home/selbergf/public_html/index.php(80): Mage::run('', 'store')
#19 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";}


texts:
I have installed Magento 2.0.0.0 on Windows with IIS 8. When I try to add a new product I get a message:

"Could not determine temp directory, please specify a cache_dir manually"

When I click the 'Add Product' button anyway I don't get a data entry form that I would expect - it's mostly blank.

I have looked around at solutions, but they all seem to focus on versions earlier than 2.0.0.0 (e.g. this one applies to 1.8.1.0) and this is important because there is no app/code/core/Zend/Cache/Backend/ folder as described in that solution. There is however:

lib/internal/Cm/Cache/Backend and a File.php there. I have changed line 42 here to:

    'cache_dir' => 'var/tmp/',

(Even though hacking away at the file in 'lib' doesn't feel right).

Still the message and problem persists.


texts: In Store Pickup delivery Method is not working

texts:
I Upgrade the Magento Version from 2.3 to 2.4. I integrate the "In store Pickup" Delivery Method. But this is not work .I follow the all steps Given in "https://store.magenest.com/blog/magento-in-store-pickup/"
Please Guys Let me know if anyone have idea what is the solution.


texts: How to get custom field values from quote table in observer?

texts:
I have added a custom field in checkout form and saved that values in quote table. And also displayed in the backend in order details. Now I want to send that custom field value in email.
I have used observer to do so. When static value is passed then it is printed in email but I am not getting any solution to get the custom field value from quote table and pass it in email.
I am getting order id but from that order id please help/guide me to find the custom field value.
Below is my code
namespace Rishi\Emails\Observer;
use Magento\Framework\Event\ObserverInterface;

class AddMyData implements ObserverInterface
{
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $transport = $observer->getTransport();
        $order=$transport['order'];
        $orderId=$order->getEntityId();

        $transport['myvar'] = $orderId;
        $transport['payment_html'] = 'myvar';
    }
}

I have created a custom template and added {{var myvar|raw}}.
Please help me.


texts: How to override vendor/magento/framework/DB/Adapter/Pdo/Mysql.php and vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php?

texts:
I created a custom module and to try to override vendor/magento/framework/DB/Adapter/Pdo/Mysql.php and vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php

but

<preference for="Magento\Framework\DB\Adapter\Pdo\Mysql" type="Test\MySQLCluster\DB\Adapter\Pdo\Mysql" />

does not work for vendor/magento/framework/DB/Adapter/Pdo/Mysql.php

And for vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php I don`t know how to do it.


texts: Magento2 Product attribute value change in cart and order page

texts:
I am working on Magento 2, for some of my client requirement is related to change the selected product attribute values change into the cart and order page.

I got so many links that are related to the custom-options changes but didn't get any useful link that is related to my requirement.

I am trying with the following observer on cart page "checkout_cart_product_add_after".

Kindly share your ideas and thoughts


texts: Magento2 Invalid Form Key. Please refresh the page while creating configurable product

texts:
While creating the configuration products in Magento2.2.2 I am facing the

  Invalid Form Key. Please refresh the page

error. I have google regarding this error and I have found the solution to

  Increase the value of max_input_vars PHP configurable variable

I have increased this value but the problem is not solved.

While creating the configurable product almost 40000 associated product is generated and now I have set the max_input_vars value to 3075000 but the problem is not solved.

Anyone, please help me to fix this issue.


texts: Magento add another custom dropdown field in bundle items of bundle product

texts: How to add new dropdown field, next to the position field of bundle item like shown in the below screenshot.


texts: Afterpay module not showing on frontend in magento 2 site

texts:
We have installed the afterpay module in magento 2 site.

Properly fired the required command.

But afterpay not showing at checkout.

Back end showing fine configuration and I have properly configured details of it.


texts:
I'm trying to create this cart rules without real success.
I will need some help.

1/ Buy x + y get $50 off
This means that you can buy 2x + 2y and get $100 off
Or buy 2x + 1y and get $50 off...

2/ Buy x + y + z get $75 off
If you remove z from the cart, the rule 1 should apply
This means that you can buy 2x + 2y + 2z and get $150 off and the rule 1 shouldn't be applied
If you buy 2x + 2y + 1z you should get $125 off ($50 from rule 1 + $75 from rule 2)

Thank you


texts: how to set up ubuntu server different fresh magento install?

texts: Please tell me I am working Magento 2 on ubuntu now 1 Magento 2.3 is install and running condition so how to download 2 second magento2.3 on localhost this one server?


texts: Customer Attribute require error magento 2

texts:
I am adding customer attribute in magento 2

$customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
        $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
        $attributeSetId = $customerEntity->getDefaultAttributeSetId();

        /** @var $attributeSet AttributeSet */
        $attributeSet = $this->attributeSetFactory->create();
        $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

        $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, 'test', [
            'type' => 'varchar',
            'label' => 'Test',
            'input' => 'text',
            'required' => true,
            'visible' => true,
            'user_defined' => true,
            'sort_order' => 90,
            'position' => 90,
            'system' => 0,
        ]);

        $attribute = $customerSetup->getEavConfig()->getAttribute(\Magento\Customer\Model\Customer::ENTITY, 'test')
            ->addData([
                'attribute_set_id' => $attributeSetId,
                'attribute_group_id' => $attributeGroupId,
                'used_in_forms' => ['adminhtml_customer','customer_account_create'],
            ]);

        $attribute->save();

add in register.phtml

            <?php /* @escapeNotVerified */ echo __('Test') ?>

                <input type="text" name="test" id="test" value="<?php echo $block->escapeHtml($block->getFormData()->getTest()) ?>" title="<?php /* @escapeNotVerified */ echo __('Test') ?>" class="input-text">

and now when i add values in form for register it gives me an error

  "Test" is a required value

What to do? i can't understand


texts: add class in button after product add to cart

texts:
In product listing grid/list view mode after added product to cart with ajax,

Need add custom class in button (Add To Cart) .

Can i create some observer js or i must rewrite standard methods ?


texts:
I have upgraded my Magento store from EE 1.11 to EE 1.14

Problem

After upgrade I have changed URL key for one category. Now on frontend it is showing me correct URL on mouse hover but when I am clicking on that category link it is showing non-SEO friendly URL in address bar.

Example :

Suppose SEO friendly url is mydomain.com/category-parent/category-sub.html,  but instead of this, it is showing mydomain.com/catalog/category/view/id/84 in address bar.

What I have done

I have cleared all caches and re-indexed all data.

It would be great if someone can help me out in fixing this issue.


texts: Move only error message on product view page

texts: can I just move the error message (You cannot use decimal quantity for this product.) under product.info.price?


texts: Trying to setup magento2 , missing Extension intl. -XAMPP

texts:
I'm trying to setup magento2 but this error 1 missing PHP Extension intl.  already made me crazy... tried so many solution like edit php.ini :

From:

;extension=php_intl.dll

To

extension=php_intl.dll

Also copying all 6 files:

icudt57.dll,icuin57.dll,icuio57.dll,icule57.dll,iculx57.dll,icuuc57.dll

From php folder to apache\bin

Tried all those and it didnt fixed it , can you please help me?

When I command php -m in cmd , module intl is missing.

Also in another check commant it gives back this:

PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_intl.dll' - The specified module could not be found.
 in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_intl.dll' - The specified module could not be found.
 in Unknown on line 0


texts: Magento 1 How are div classes generated?

texts:
I have this output in couple product pages:

    <select name="options[82]" id="select_82" class=" required-entry
    product-custom-option" title="" onchange="opConfig.reloadPrice()">
    <option value="">-- Please Select --</option><option value="236"
    price="0">3 Months </option><option value="237" price="50.5284">6 Months
    +51€</option><option value="238" price="151.5852">12 Months
    +152€</option></select>

But it should be this:

Went through templates, haven't found right place. Maybe it is being rendered by product option type or something else, if so where?


texts: I can't access Magento backend with the first time installation. Magento 2.0.11

texts:
I have a Magento 2.0.11 installed into XAMPP.
The installation is okay, but when I finish this and I wan't to go to Admin Page, Magento redirect me to a different url.

http://localhost/magento/admin_9zmscg/admin/index/index/key/70f34c5c85ee5c60ce1b15daed441b33e3b37e15684ee363e8d54207582b76a0/

I have the basic configuration.

Please help, I want to finish this school's work :((


texts: how to import new products or update existing stock from csv file

texts: I've three types of products in my store. Each Grouped product holds a simple product and a configurable product and configurable product in grouped product hold three simple products. Now I want to update the existing stock or import new products from CSV with images please guide me any simple solution to do this in Magento.


texts: Getting category by name returns old or wrong category ID

texts:
Currently encountered a problem with catalog/category_collection.

When I'm trying to get category id by it's name it returns wrong category ID.

Anyone else had this problem and know a fix? I tried reindexing data, clearing cache nothing helps.

$category = Mage::getResourceModel('catalog/category_collection')->addFieldToFilter('name', $name);
$cat = $category->getData();
$id = $cat[0][entity_id];

Anyone maybe know an alternative to this code?


texts: how to filter product collection by category?

texts:
My products are in multiple categories.  As such, using

            ->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left')

returns multiples of the same entity and therefore is unuseable.

    $collection = Mage::getModel('catalog/product')->getCollection()->joinField('category_id','catalog/category_product','category_id','product_id=entity_id',null,'left')->addAttributeToSelect('*')->addAttributeToFilter('category_id',array(array('finset'=>'1299'),array('finset'=>'3')))
            ->addAttributeToFilter('news_from_date', array('or' => array(
                0 => array('date' => true, 'to' => $todayEndOfDayDate),
                1 => array('is' => new Zend_Db_Expr('null')))
            ), 'left')
            ->addAttributeToFilter('news_to_date', array('or' => array(
                0 => array('date' => true, 'from' => $todayStartOfDayDate),
                1 => array('is' => new Zend_Db_Expr('null')))
            ), 'left')
            ->addAttributeToFilter(
                array(
                    array('attribute' => 'news_from_date', 'is' => new Zend_Db_Expr('not null')),
                    array('attribute' => 'news_to_date', 'is' => new Zend_Db_Expr('not null'))
                )
            )
      Mage::log($collection->getSelect()->__tostring());

The resultant tostring looks something like:

  SELECT 1 AS status, e.entity_id, e.type_id,
  e.attribute_set_id, at_category_id.category_id,
  e.entity_id, e.attribute_set_id, e.type_id,
  e.allow_open_amount, e.cost, e.created_at,
  e.email_template, e.enable_googlecheckout,
  e.giftcard_amounts, e.giftcard_type,
  e.gift_message_available, e.gift_wrapping_available,
  e.gift_wrapping_price, e.has_options, e.image_label,
  e.is_recurring, e.is_redeemable, e.lifetime,
  e.links_exist, e.links_purchased_separately,
  e.links_title, e.msrp, e.msrp_display_actual_price_type,
  e.msrp_enabled, e.name, e.news_from_date,
  e.news_to_date, e.open_amount_max, e.open_amount_min,
  e.price, e.price_type, e.price_view,
  e.recurring_profile, e.required_options, e.shipment_type,
  e.short_description, e.sku, e.sku_type, e.small_image,
  e.small_image_label, e.special_from_date, e.special_price,
  e.special_to_date, e.tax_class_id, e.thumbnail,
  e.thumbnail_label, e.updated_at, e.url_key,
  e.url_path, e.use_config_email_template,
  e.use_config_is_redeemable, e.use_config_lifetime,
  e.visibility, e.weight, e.weight_type FROM
  catalog_product_flat_1 AS e  LEFT JOIN catalog_category_product
  AS at_category_id ON (at_category_id.product_id=e.entity_id) WHERE
  (((((e.news_from_date <= '2015-02-05 23:59:59') OR (e.news_from_date
  IS null))))) AND (((((e.news_to_date >= '2015-02-05 00:00:00') OR
  (e.news_to_date IS null))))) AND ((e.news_from_date IS not null)
  OR (e.news_to_date IS not null))


texts: How to change order status after it has been invoiced

texts:
I've created my own custom status and assigned it to a state.

This works fine if I load an order, set the status and save as in the following:

$order = Mage::getModel('sales/order')->load($orderId);
$order->setStatus('custom_status_code');
$order->save();

However, when I want to set the custom status after invoicing by observing the "sales_order_invoice_register" event, sometimes it saves the custom status while other times it doesn't.

I'm guessing that sometimes the way Magento sets its own status gets triggered after mine. How would I get my custom status to be set last and not be overridden?

Thanks.


texts: Magento: Delete products and 301 redirect to relevant it's parent category

texts:
Anyone have a solution for 301 permanent redirects for deleted products in Magento?

I have a store with 5000 products. 4000 have been sold and will never be back in stock. I want to delete those products b/c I no longer need them and want to clean up/decrease my database, but I need to 301 permanently redirect them to appropriate pages to keep the SEO juice I've built up.

To be clear, I do not want the deleted product pages to be live any more, not even with an Out of Stock message, and I do not want 404 Page Not Founds.

Also required is if product can assign disable category then redirect to home page not an 404 page redirect it is important part.

My actual requirement is if i have product deleted then product can be 301 redirect to parent category. so how do I get these programmaticly? Or other solution to this?


texts: How do I make my category sort orders keep from reverting to different order in admin view?

texts:
I am using Magento 1.9.2.1. When I am in Catalog/Manage Categories I am finding that the sort order that I am dragging my categories into is not staying the same. I have caching disabled as this is a development store.

Question: How do I make my category admin sort order stay the same without it reverting to a previous order?

And on another probably related issue, I notice that sometimes when I click on a category in the left sidebar that has nested subcategories, the plus sign will go away and the only way for me to see the subcategories is to refresh the page.

I there a way perhaps to import my categories back into Magento with the sort orders in the correct positions?

Any suggestions on these problems? Thanks All!


texts: Not able to access the magento api installed from AMPPS

texts:
You don't have permission to access /magento/app/code/core/Mage/Catalog/Model/Product/Api/V2/create/
on this server


texts:
im new in magento 2,
im work on print order to print order comment when we do print order from front end,

My Orders->Print Order

when we click on Print Order the same comment print on PDF

as per the below image.
so how can we print that comment on Order PDF?


texts: How to add new block to view.php (Catalog/Product/view.php)

texts:
I am trying to add button to view.php but i can't do this. I need any step by step tutorial how to do this, can anyone help me?

Thanks for reply i did something like this:
i create my own template here:

  app/design/frontend/module/MyTheme/template/catalog/product

I have here view.phtml and i have

  app/design/frontend/module/MyTheme/template/catalog/product/view

and in this folder i have sub.phtml i want to see sub.phtml in view.phtml but while i do something like this:

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

It'snt visible on Product View so do you maybe know what I'm doing wrong?

EDIT:
So i did create file in path:

  app/design/frontend/module(namespace)/MyTheme/layout/sub.xml
  Inside this file i wrote something like that:

<?xml version="1.0"?>
<layout version="0.1.0">
    <catalog_product_view>
    <reference name="product.info">
         <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
    </reference>
    </catalog_product_view>
</layout>

And now it should works?


texts: How to show the distance using geolocation?

texts:
I have an address (with lan,lon) and want to show the distance from current location to that address using geolocation.

How can i achieve that?

Can anyone please guide me?


texts:
I have a custom grid which resembles the Manage Products grid in Catalog Menu.

I need to get the corresponding action link to each entity item. How do i do that?

My custom grid is declared in the class Mynamespace_Mymodule_Block_Adminhtml_MyblockGroup_Grid with _prepareColumns function for the action column as follows

$this->addColumn('action',
        array(
            'header'    => Mage::helper('catalog')->__('Action'),
            'width'     => '50px',
            'type'      => 'action',
            'getter'     => 'getId',
            'actions'   => array(
                array(
                    'caption' => Mage::helper('catalog')->__('Edit'),
                    'url'     => array(
                        'base'=>'*/*/edit',
                        'params'=>array('store'=>$this->getRequest()->getParam('store'))
                    ),
                    'field'   => 'id'
                )
            ),
            'filter'    => false,
            'sortable'  => false,
            'index'     => 'stores',
    ));

As of now, the link which this action getting is '_baseUrl/adminfrontNameforMyModule/controller_action/edit/id/entity_id'.

I assume, If this action gets the link to '_baseUrl/admin/catalog_product/edit/id/entity_id' then my issue is resolved.

Can any one help me with this?


texts: Magento2 programmatically set value for specific attribute

texts:
I created a drop-down attribute called "marketing" with 2 values : "sale" & "new" and I like to use a cron script that check every day :

if a product has a special price (or a catalog rule) => attribute "marketing" set to "sale"
if a product has no special price => attribute "marketing" empty
if a product is set to new from/to date => attribute "marketing" set to "new" or nothing

Idea is to filter in a catalog list all products that are "on sale" or "new". I know ho to check the conditions but not how to set the correct value for this attribute.


texts: Magento 2.1 Image Import Documentation Wrong

texts:
I have followed the documented instructions to create the image import CSV, and produced an exact replica of the CSV shown, but with my own product details, obviously.

http://docs.magento.com/m2/ce/user_guide/system/data-import-product-images.html

Then I follow the instructions for the actual import (http://docs.magento.com/m2/ce/user_guide/system/data-import.html), I choose "Products" entity type, and Import Behaviour "Add/Update", set the image file directory and then choose my CSV file.

When I click check data, it returns an error, saying:

1. Product Type is invalid or not supported in row(s): 2, 3, 4, 5, 6, 7.
Checked rows: 13, checked entities: 13, invalid rows: 6, total errors: 6

Those rows do not contain a SKU as they are additional images for row 1 SKU, so have been left blank as per the instructions - quoted here:

If importing multiple images for a single sku, insert a blank row below the sku, and enter the additional image file names in the appropriate columns. The additional rows are understood to belong to the parent sku.

Can someone tell me if the instructions are out of date, and there is a working method to do this? Or if I have to do this some other way?

If it comes to it, I could manually add the additional product images to those products that need them, but would rather the automated method worked.


texts:
I have upgrade magento 2.1.6 to 2.1.9 but problem is Minicart shows no product even when I have products in cart.
My site work on local not work on live .

PFA

Please Give me any solution?


texts:
I am using Magento latest version Magneto2.1.3 when I run this command and check admin/frontend I face Js missing issue in console..

Command Run :: php bin/magento setup:static-content:deploy

Issue ::

  Js missing whole pages.


texts: How do I display an attribute on product view page in magento 2

texts:
I am trying to display some attributes on the product view page on a magento 2 website. However i am not able to get the values to echo onto the page. I have tried using

$block->getData('price')

and

$block->getAttributeText('name')

I am trying to call upon the price value and also a custom text attribute and display/use via phtml file.

Appreciate the help. Thanks


texts: Attache order as pdf is not display in fooman extension magneto version 2.3.1

texts:
I used Magento version 2.3.1. I installed extension fooman version 104.0.3. In the admin side, I am not able to see a checkbox for Attache order as pdf

Here I attached its screenshot.

You can see that the checkbox option is missing. This extension is working perfectly in 2.2.6. Now I want to run it in 2.3.1 latest version.


texts: How to use Asynchronous Product Import in Magento 2?

texts:
How to use Asynchronous Product Import in Magento 2 ?
I want to import product's using asynchronous API to import the products.
Is there any idea how to use them to import the data using asynchronous.
Any help is appreciated.


texts: How to translate JS error message or text in Magento 2?

texts:
I have two views English and Arabic default js validation error message needs to translate in Arabic so how to do it? And also I have a few custom texts on how to do it.

I created an i18n for Arabic is working fine if I do echo in PHTML or PHP file, the same way how to brig it into js also in Magento 2

anyone help me out


texts: unable to access newly created domain in nginx on ubuntu

texts:
recently was setting up magento in my local system, i did installed mariaDB, nginx and php7.1.

i did created new files in sites-available and did symlink as well. And i did run nginx -t there were no error looks everything fine but when i try the domain on browser, i can see a message which says site can't be reached.

Can any one help me what might be the issue.

Please find the site configuration details

upstream fastcgi_backend {
         server  unix:/run/php/php7.1-fpm.sock;
}
server {
    listen 80;
    listen [::]:80;
    index  index.php index.html index.htm;
    server_name  dev.magento.com;

    client_max_body_size 100M;
    set $MAGE_ROOT /var/www/html/magento2;
    set $MAGE_MODE developer;
    include /var/www/html/magento2/nginx.conf.sample;
}


texts:
How to get Attributes of a Group of Default Attribute Set in my custom phtml in Magento_Catalog module.

using following code

catalog_product_view.xml:

<referenceContainer name="after.body.start">
    <block class="Magento\Catalog\Block\Product\View\abstractView" name="product_view_custom_features"
        template="Magento_Catalog::product/view/features.phtml" before="-"></block>
</referenceContainer>

template:

$_helper = $this->helper('Magento\Catalog\Helper\Output');
$_product = $block->getProduct();

$productAttributes=$product->getAttributes();
        $group_id=9;
        $attributeSetId=4;
        foreach ($productAttributes as $attribute) {
            if ($attribute->isInGroup($attributeSetId, $group_id)) {
             echo $attribute->getFrontendLabel().' : '.$attribute->getFrontend()->getValue($product).'<br />';
            }

    }


texts: After clicking on CONTINUE on step 3 (SHIPPING METHOD) it loads the BOTTOM of step 4 (PAYMENT INFORMATION) --) cannot see the payment options

texts: After customers click on CONTINUE on step 3 (SHIPPING METHOD) it loads the BOTTOM of step 4 (PAYMENT INFORMATION) - you cannot see the payment options at all! You have to scroll up to see them! This is a real problem because many customers are not able to figure out they have to scroll up...How can I correct this?


texts:
I'm having a really weird trouble with my extension, as the shipping method section in checkout cannot be loaded, here's what it shows in inspect element:

so the above POST request cannot be loaded and now I don't know where to dig into to fix this. Any idea what the cause is for this problem? thank you


texts:
I want to remove html tags from frontend. How to remove this?

 <?php
    $collectionTitle = $this->getCollectionTitle();
    ?>

        <?php foreach ($collectionTitle as $item): ?>

                        <?php echo $block->escapeHtml($item->getCategoryName()); ?>

            <?php $collection = $this->getCollection($item->getId()); ?>

                <?php foreach ($collection as $items): ?>
                    <?php echo $block->escapeHtml($items->getQuestion()); ?>
                    <?php echo $block->escapeHtml($items->getAnswer()); ?>
                <?php endforeach; ?>

        <?php endforeach; ?>

Faq.php

<?php

namespace Xxx\ManageFaqs\Block\Faq;

use Magento\Framework\View\Element\Template\Context;
use Xxx\ManageFaqs\Model\Faqcat;
use Xxx\ManageFaqs\Model\Faq;
use Magento\Framework\View\Element\Template;

class Collection extends Template
{

    protected $_resource;
    public function __construct(Context $context, Faqcat $connection, Faq $model)
    {
        $this->model = $model;
        $this->modelConnection = $connection;
        parent::__construct($context);
    }

    public function getCollectionTitle()
    {
        $collection = $this->modelConnection->getCollection()->addFieldToFilter('status', 1);
        return $collection;
    }

    public function getCollection($categoryname)
    {
        $connection = $this->model->getCollection();
        $connection->addFieldToFilter('category_name', $categoryname)->addFieldToFilter('status', 1);
        return $connection;
    }

}


texts: composer show magento/product-community-edition --all it show all version or your satup version?

texts:
in my system it show the last my setup version 2.3.4 my question is "it show the latest version with all or show your setup version and other degrade versions"

name     : magento/product-community-edition
descrip. : eCommerce Platform for Growth (Community Edition)
keywords :
versions : * 2.3.4, 2.3.3-p1, 2.3.3, 2.3.2-p2, 2.3.2, 2.3.1, 2.3.0, 2.2.11, 2.2.10, 2.2.9, 2.2.8, 2.2.7, 2.2.6, 2.2.5, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2.0, 2.2.0-rc30, 2.2.0-rc23, 2.2.0-rc22, 2.2.0-rc21, strong text2.2.0-rc20, 2.1.18, 2.1.17, 2.1.16, 2.1.15, 2.1.14, 2.1.13, 2.1.12, 2.1.11, 2.1.10, 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4, 2.1.3, 2.1.2, 2.1.1, 2.1.0, 2.1.0-rc3, 2.1.0-rc2, 2.1.0-rc1, 2.0.18, 2.0.17, 2.0.16, 2.0.15, 2.0.14, 2.0.13, 2.0.12, 2.0.11, 2.0.10, 2.0.9, 2.0.8, 2.0.7, 2.0.6, 2.0.5, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 0.42.0-beta7
type     : metapackage
license  : Open Software License 3.0 (OSL-3.0) (OSI approved) https://spdx.org/licenses/OSL-3.0.html#licenseText
license  : Academic Free License v3.0 (AFL-3.0) (OSI approved) https://spdx.org/licenses/AFL-3.0.html#licenseText
source   : []
dist     : [zip] https://repo.magento.com/archives/magento/product-community-edition/magento-product-community-edition-2.3.4.0.zip
names    : magento/product-community-edition

requires
magento/magento2-base 2.3.4
php ~7.1.3||~7.2.0||~7.3.0
ext-bcmath *
ext-ctype *
ext-curl *

Please help me to clear this query !!


texts: Bug? Using addBcc on Mage_Core_Model_Email_Template doesn't seem to work

texts:
The way I use it (Magento EE 1.12):

    $transactional = Mage::getModel('core/email_template');

    foreach($ccEmails as $ccEmail) {
        $transactional->addBcc(trim($ccEmail));
    }

    try{

        $transactional->sendTransactional($transactionalTemplateId, $sender, $recipientEmail, $recipientName, $vars, $storeId);

    } catch(Exception $e) {

        throw $e;

    }


texts: Magento keeps auto-checking "Use default value" box in category description field after save

texts:
I have a problem with Magento community edition 1.4.0.1. When I go to edit store categories, not the global one but for specific store for some categories (not all of them) Magento keeps auto-checking the "Use Default Value" box for selected fields like "Desctipion" or "Meta Description". This is a problem because the next time you go to that category to edit "Name" for example you have to manually uncheck those boxes to preserve data in them after next save.
To explain in more details please check the screenshot attached.


texts:
I have a multilanguage(many view) web site:

www.pincopallo.com

If i am into

www.pincopallo.com/it/rosso

and i click into switch language i should to go

www.pincopallo.com/en/red

(same category), but i go to

www.pincopallo.com/en/rosso

Is a bug? How i can resolve it? It's a problem rewrite module?


texts:
In Magento 1 I was able to catch exceptions and log them into the exception.log file using Mage::logException($e);

Now, in Magento 2, I can catch (\Exception $e) but what do I do with the caught exception? How do I log it into the exception.log? Or what is the typical way to handle this?


texts:
Do anyone have Magento 1.8.1.0 9767v2 files.
I want to apply the patch manually.

Please send us if any has this patch files for Magento 1.8.1.0.


texts:
I tried to add new link in the customer account link sidebar with add code below in customer_account.xml with my custom module.

customer_account.xml :

<referenceBlock name="customer_account_navigation">
  <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-owner-reset-employee-password">
     <arguments>
        <argument name="path" xsi:type="string">reset/emppass</argument>
        <argument name="label" xsi:type="string" translate="true">Reset Employee Password</argument>
     </arguments>
  </block>
</referenceBlock>

It's all works and i can see new link there, but how can i add the page for it? So if customer click the link, the customer will send to the custom link page.


texts: Magento 2 checkout remove field city, country, Pincode

texts:
How to remove
city,
state,
Pincode,
Country
in billing address on checkout page ?


texts: Product url key sporadically being set to blank

texts:
I am noticing that every so often, maybe once week a couple dozen products will lose their url key. I haven't had much time to look into it but my guess is it's after some type of indexing. Can anyone shed some light into why this is happening? We are running EE 1.13.1.0.

I have an audit to check the catalog_product_entity_url_key table and I can see that there is a record for each of these products, but the value is null.

I haven't been keeping track so I'm not sure if there are repeat offenders but today the audit showed 100+ products so it definitely changes.

UPDATE:
It appears this is happening after we do a product import. I have a ticket open with Magento. They gave me links to similar issues when using MAGMI, but we use the built in import process.

UPDATE:
It's not related to the product import. It's not happening each day but I've setup an audit and when the issue does occur it's between 9:20a and 9:40a. I don't see any external jobs that line up with this so I think I need to monitor either Magento's internal processes or the DB.


texts: Magento 1.9.0.1 compatible with PHP 5.6.5 and MySQL 5.6

texts: Is it possible to use Magento-1.9.0.1 with PHP 5.6.5 and MySQL 5.6?


texts: Magento Community Edition upgrade to Enterprise

texts:
i'm new in the magento world, and now i'm starting to create my first e-commerce with the Community Edition.

But i want to ask you if in the future i want  to upgrade the Community edition with the Enterprise Edition, is possible? if yes it's a complicate process?

regards

Alberto


texts:
When ever i open contact us page it gives 404 error on white screen like this

  http://prntscr.com/nv27xs

the page is enabled form configuration.
 by default 404 error page is like this

  http://prntscr.com/nv298u

In error log

  http://prntscr.com/nv50lu


texts:
I have update product URL-key but still, the old URL is working. New URL is not working.

I have run indexer command, cache flush.

Also, regenerate product URL from an extension. But still, the old URL is working. So can anyone suggest the solution?


texts: Decoding failed: Syntax error Mass product create


texts: How to get all the custom attributes and it's description

texts:
In Magento 2, How do I get all the attributes and it's description ?

Please provide me a solution. Anyone have any script ?


texts: Magento 2 Custom filter of product list page not affecting layered navigation

texts:
I have a filter in My list.phtml like below:

    $_productCollection = $block->getLoadedProductCollection();
    if($_COOKIE['selectToGarageList']){
        $dat = $_COOKIE['selectToGarageList'];
        $dat = json_decode($dat,true);
        print_r($dat);
        //$allCatPros = $_productCollection->addAttributeToSelect('*');
        $allCatPros = $cateinstance->create()->load($category['entity_id'])->getProductCollection()->addAttributeToSelect('*')->addFieldToFilter('sku',['in' => $dat]);
        $args =  $_SERVER['QUERY_STRING'];
        parse_str($args, $get_array);
        if(count($get_array)>0){
            print_r($get_array);
            foreach($get_array as $value=>$key){
              $allCatPros->addFieldToFilter($value,['eq'=>  $key]);
            }
        }
    }else{
        $allCatPros = $_productCollection;
    }

This filter is working fine and filter product list but not changing the layered navigation filters.

I couldn't find ways to add filter to this block

initializeProductCollection

of Magento\Catalog\Block\Product\ListProduct
class


texts: Magento 2 : override Magento_Sales::email/items/creditmemo/default.phtml

texts:
What is the best way to override below template file in module ?
Magento_Sales::email/items/creditmemo/default.phtml


texts: Can I set link field href with setValues in admin form?

texts:
Whenever I render a link type in admin form field, I often ends up loading the model to render the href with $helper->getUrl(...).

Is there a way I can render the link contents, including href and label, with $form->setValues() like other fields?

Example:

I don't want this:

$form->addField('link_to_somewhere', 'link', array(
'label' => 'Click me',
'href'  => 'http://...',
));

I want something like this:

$form->addField('link_to_somewhere', 'link', array(
  'label' => 'Click me',
));

$form->setValues(array(
  'link_to_somewhere' => 'http://...'
));


texts:
I am using this module - https://github.com/experius/Magento-2-Module-Experius-ExtraCheckoutAddressFields
As logged user, everything works just fine, but I can not manage to save my billing address custom address attributes to database, although they are in the checkout POST. Shipping address information work well with guest checkout. Did anyone who used this plugin or had similiar problem managed to solve this issue?


texts: Magento 1 admin panel and frontend on different servers

texts: Is there a guide on how to set up my front end and backend on separate servers? I am running magento 1.9.


texts: Magento 2: Show loader in cart page summary after remove shipping estimation

texts:
I successfully remove the shipping estimation in Magento 2 cart page summary using this solution:
<?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">
    <body>
        <referenceBlock name="checkout.cart.shipping">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="block-summary" xsi:type="array">
                            <item name="config" xsi:type="array">
                                <item name="componentDisabled" xsi:type="boolean">true</item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

when the page first load in cart page summary, the order total will take some time to display, but there is no loader that indicates the order summary is being loaded


texts: How to get third party module block function to custom module block

texts:
Third party module Block:
Path: app\code\Amasty\Storelocator\Block\View\Attributes.php
<?php
/**
 * @author Amasty Team
 * @copyright Copyright (c) 2021 Amasty (https://www.amasty.com)
 * @package Amasty_Storelocator
 */

namespace Amasty\Storelocator\Block\View;

use Magento\Framework\View\Element\Template;

/**
 * Class Attributes
 */
class Attributes extends Template
{
    /**
     * Show attributes
     *
     * @return string
     */
    public function toHtml()
    {
        if (!$this->getLocationAttributes()) {
            return '';
        }

        return parent::toHtml();
    }

    public function getLocationAttributes()
    {

               //logger
               $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/log1.log');
               $logger = new \Zend\Log\Logger();
               $logger->addWriter($writer);
               $logger->info($this->getLocation()->getAttributes());

        return $this->getLocation()->getAttributes();
    }
}

log file return values
Try to call getLocationAttributes() in my custom module,
Path : app\code\Zero\Storelocator\Block\Customerreview.php
<?php
namespace Zero\Storelocator\Block;
use Amasty\Storelocator\Model\ConfigProvider;

class Customerreview extends \Magento\Framework\View\Element\Template
{
     protected $helper;
     protected $_amastyconfigProvider;

     public function __construct(
        \Amasty\Storelocator\Block\view\Attributes $attributes,
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Amasty\Storelocator\Block\View\Attributes $myValue,
        \Amasty\Storelocator\Block\View\Location $myValue1,
        ConfigProvider $amastyConfigProvider,
        array $data = []
     ) {
        $this->_attributes = $attributes;
        $this->scopeConfig = $scopeConfig;
        $this->_amastyconfigProvider     =   $amastyConfigProvider;
        parent::__construct($context, $data);
    }

    protected function _prepareLayout()
    {
        parent::_prepareLayout();

    }

    public function getCustomerReview(){

        $authentication = $this->scopeConfig->getValue('customerreview/general/review_auth', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);

        $accountId = $this->scopeConfig->getValue('customerreview/general/review_account_id', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);

         // try to print values from third party module
         $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/fin.log');
         $logger = new \Zend\Log\Logger();
         $logger->addWriter($writer);
         $logger->info(print_r($this->_attributes->getLocationAttributes())); // print the values

        $authorization = "Authorization:".$authentication;

        $url = 'https://mybusiness.googleapis.com/v4/accounts/'.$accountId.'/locations/123456789/reviews';

        $ch = curl_init();
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json' , $authorization ));
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        $output = curl_exec($ch);
        $allData = json_decode($output, TRUE); // You will get all the data
        return $allData;
    }
}

I am getting the following error:
Error: Call to a member function getAttributes() on null in C:\xampp\htdocs\m3\app\code\Amasty\Storelocator\Block\View\Attributes.php:39
39th line -> $logger->info($this->getLocation()->getAttributes());
How to solve this error, i want to get my third party module function values to my custom module?
How to get the values from third party module block to Custom Module


texts:
When should one not use Modman in Magento development?

What are the dangers of activating Symlincs?

Thanks!


texts: after install magento 2 admin and front end object not found

texts:
I have installed Magento and after installation when accessing Admin and Front End, it throws error

  forbidden

I tried reinstalling many times but throws error in admin and front end:

  object not found

I already tried every solution I got here or from google but didn't solve and
I also already tried to change

.htaccess
FrontNameResolver
httpd.conf
httpd-xampp.conf
etc

I'm use xampp and install it in windows

Any help will be appreciated, Thanks


texts: How to Edit Display of Products in Catalog View Page in magento

texts:
Please visit this link :

http://www.whiteboard-shop.co.uk/whiteboard_school/fixed_wall_mount.html

Here , 1)On the products image box, We have an option to add "QUANTITY".

2) Also there is a text " Delivery in 1-2 working days".

I wanted both above options in magento site.

This is my list.phtml => http://pastebin.com/4BM3UySS

Please help in finding solution.

Thanks in Advance.


texts: Getting an error in Indexing after migration in Magento 2.2.6


texts: How to remove Duplicate parameter in URL?

texts:
In my custom module I have passed parameter in URL like this:

<?php $currentUrl = Mage::helper('core/url')->getCurrentUrl(); ?>
<a href="<?php echo $currentUrl .'?alpha='. $letter ;?>"><?php echo $letter; ?>

The problem is that I have used this parameter to filter collection and the result is returned to the same page, everything is working fine. But from result page when another parameter is selected URL became like this:

www.mydomain/category.html?alpha=D?alpha=J

Is it possible to remove the duplicate parameters?

Note: need to remove only duplicates not the other parameters.


texts: Issue in Loading Shipping Price in Order Summary at Checkout

texts:
I am working on a Magento2 project and its behaviors is little bit annoyed.

Please see the attached image and see that shipping price is not loading right side Order Summary area while its fine at bottom of the page.

Further, I would like to share that we have installed following shipping extensions:

Amasty_ShippingTableRates
Magento_Multishipping
Magento_OfflineShipping
Magento_Shipping

Please guide in this regard.


texts: Magento2 - How to make same order increment_id number for multiple stores under single website?

texts:
I have 4 stores running under single Magento 2 installation. Right now each store has its own order number series.

For Example:

                   Order Number
  Store 1:   100000001
  Store 2:   200000001
  Store 3:   300000001
  Store 4:   400000001

But We want same order number series for all, For example.

                   Order Number
  Store 1:   100000001
  Store 2:   100000002
  Store 3:   100000003
  Store 4:   100000004

Please let me know the solution for Magento2, I'm running version 2.2.1.


texts: SUPEE-6285 - Failed - Magento 1.9.3.8 - Magento Scanner

texts:
I've got problem with Magento Scanner - i've got just one error with:

SUPEE-6285 - Failed.
Access to /downloader/Maged/ should be restricted (APPSEC-847), got '500'.
Access to /downloader/lib/ should be restricted (APPSEC-847), got '500'.

I've got .htaccess files with:

Order deny,allow
Deny from all

How i can remove this message from scanner to get "You're site is secure"?


texts:
I've seen a lot of people with similar issues, but none of the many resolutions I've seen online have worked for my situation.

Magento 1.8 Community Edition. Admin changes are not being saved. Products are not saved, Configuration changes are not saved.

My htaccess is redirecting to get rid of the index.php

RewriteRule .* index.php [L]
RewriteCond %{REQUEST_URI} !^/index.php/admin/
RewriteRule ^index.php/(.*) $1 [R=301,QSA,L]

I use the same htaccess file on an older separate site with no issues.

I've noticed that in firebug, GET url requests are redirected 302, while the POST during the saving process is a 301, and calls the index.php/admin

Is this not an htaccess issue? Is there an issue in the core code redirecting the POST calls overriding htaccess?


texts: Magento 2: How to translate knockout html file for word that contains hyperlink?

texts:
I have a text like this:
To contact us please email us at joe@mail.com, will be waiting!

when the user clicked on the email it will redirect the user to mail link, using phtml i can easily achieve it like this:

 <?= __("To contact us please email us at %1, will be waiting!",'joe@mail.com') ?>

but i have trouble on putting this in knockout HTML file, because i don't know if it can support like that, it needs to be translated with this format:
XXXXXXXXX ZZZZZZ VVVVV joe@mail.com


texts:
on my admin panel appear :

Notice: Undefined offset: 0 in /var/www/main/app/code/local/Sm/Megamenu/Helper/Data.php on line 213

how to resolve?

public function getParentIdNode($id, $groupId, $nametable, $myLeft, $myRight='' ){
        $query = "
            SELECT * FROM {$nametable}
            WHERE (lft < '{$myLeft}' and rgt > '{$myRight}') AND group_id ='{$groupId}'
            ORDER BY lft DESC
            LIMIT 1
        ";
        // echo $query;die;
        try{
            $read= Mage::getSingleton('core/resource') ->getConnection('core_read');
            $data = $read->fetchAll($query);
            // Zend_Debug::dump($data);die;
            $item = new Varien_Object();
            $item->setData($data[0]);  <<====line 213
            // Zend_Debug::dump($item);die;
            return $item;
        }
        catch(Exception $e){
            Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
            return;
        }


texts: Magento 2 Create observer on customer create, with custom module

texts:
I want to create an observer in my custom module which called when new customer create and delete.

In my custom module i want to add custom data when customer created and delete custom data when customer deleted even its created from admin or imported.

How can i achieve this functionality.

Thanks.


texts:
I stumbled across hideit input on contact us form

https://magento.stackexchange.com/a/107656/70343

Makes sense to catch bots filling out the form. Just wondering whether it's worth adding to other custom forms? Or is this check a bit too primitive by today's standards.


texts: How to call controller function in cron magento 2.2.6

texts:
I have created a custom module and created the cron in magento 2.2.6

crontab.xml Learning\GreetingMessage\etc\crontab.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
<group id="index">
<job name="samplecron" instance="Learning\GreetingMessage\Cron\Test" method="execute">
<schedule>*/1 * * * *</schedule>
</job>
</group>
</config>

Test.php Learning\GreetingMessage\Cron\Test.php

<?php
namespace Learning\GreetingMessage\Cron;

class Test {

    protected $_logger;
    protected $_test;

    public function __construct(
        \Psr\Log\LoggerInterface $logger,
        **\Learning\GreetingMessage\Controller\Index\Text $text**
    ) {
        $this->_logger = $logger;
        $this->_test = $test;
    }

    /**
     * Method executed when cron runs in server
     */
    public function execute() {
        **$this->_test->execute();**
        $this->_logger->debug('Running Cron from Test class');
        return $this;
    }
}

I have controller in Learning\GreetingMessage\Controller\Index\Text.php

It is not working . it says Class Learning\GreetingMessage\Controller\Index\Text does not exist message in cron_schedule table


texts: How to get system configuration values dynamically in xml file in magento 2

texts:
I have created admin grid and form using Ui component, Now I need to get system configuaration values in my form.xml. Please provide me a solution
I need to get width,height,image size from below image.

System.xml

<field id="image" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Small Image</label>
                    <frontend_model>X\Y\Block\Adminhtml\System\Config</frontend_model>
                    <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
                    <comment>Image size should be in Bytes(1 KB = 1024 Bytes, 10 KB = 10240 Bytes, 50 KB = 51200 Bytes, 100 KB = 102400 Bytes, 150 KB = 153600 Bytes)</comment>
                </field>


texts: Magento 2. Is Cached information (FPC for e.g.) removed unless explicitly requested?

texts: Does the FPC content(be it saved in Redis,files or Varnish) ever expire/is removed except from the cases in which an explicit cache clean request is made (via console or GUI)?


texts:
I am wondering if there is a way to replace or hide a certain div with a module.

I'm not talking about a whole new .phtml file. If you can make a part phtml file thats fine but i don't know how. It needs to work with a theme so i want to make it more universal then just copy/pasting the .phtml file and adjusting it.

Is there a way to replace a part of a template only?

More in detail i want to delete :

<form data-role="tocart-form">

Thanks for your time of you are anwering this.

This is for Magento 2