texts: How to use single js/css file in frontend and backend in magento?

texts:
I have to use a frontend js file in backend.Currently file is at

/skin/frontend/default/test/js/v1.js

and if I want to use it in backend I have to move it to

/skin/adminhtml/default/default/js/v1.js

but I don't want to duplicate it. So where should I place it. And what should be path in

<action method="addItem">
           <type>skin_js</type>
           <name>path of js file/v1.js</name>
</action>


texts: Magento - Change CSS for Product & Category Grid/List depending on category ID

texts:
I would like to find a way to change the CSS of a product depending on the category it is in.

For example:

Valentines (ID31)
Mothers Day (ID32)

Some of the products may be in other categories also, If the product is in a standard category than the CSS should not change and remain in the standard format. The css should only change for the products assigned to the above categorie OR sub categorie.


texts: Free Delivery Code Applying to Products Not deilvery

texts:
When setting up our free delivery code within Shopping cart price rules (see settings laid out) I notice that the discount value is being removed from the product lines and not from the shipping value. Do we have our settings for this coupon incorrect and if not what is the best way to apply this type of rule properly?

Thanks

Settings:
Conditions>
Shipping country is UK
Actions>
Apply fixed discount to whole cart, value £5.95.


texts: Controller's action with name "list" showing 404 for the custom module

texts:
I am using Magento 2 version 2.2.2

I have a simple custom module and right now for the testing it only has Index controller. The problem is all actions for this Index controller works fine but somehow the action name List is showing "404 Not Found".

Custom module files are as below.
At app/code/Vky/ then

Vky/JustTesting/registration.php

<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Vky_JustTesting',
    __DIR__
);

Vky/JustTesting/etc/module.xml

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

Vky/JustTesting/etc/frontend/routes.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="justtesting" frontName="justtesting">
            <module name="Vky_JustTesting" />
        </route>
    </router>
</config>

Vky/JustTesting/Controller/Index/Index.php

<?php

namespace Vky\JustTesting\Controller\Index;

class Index extends \Magento\Framework\App\Action\Action
{
    public function execute()
    {
        echo '<pre>'; print_r("Index Action");die((__FILE__).'-->'.(__FUNCTION__).'--Line('. (__LINE__).')');
    }
}

Vky/JustTesting/Controller/Index/List.php

<?php

namespace Vky\JustTesting\Controller\Index;

class List extends \Magento\Framework\App\Action\Action
{
    public function execute()
    {
        echo '<pre>'; print_r("List Action");die((__FILE__).'-->'.(__FUNCTION__).'--Line('. (__LINE__).')');
    }
}

At frontend.

http://127.0.0.1/magento222/justtesting/index/index - Works
http://127.0.0.1/magento222/justtesting/index/list - Not working

To make sure I created other actions also like View,Save, Delete

http://127.0.0.1/magento222/justtesting/index/view - Works
http://127.0.0.1/magento222/justtesting/index/save - Works
http://127.0.0.1/magento222/justtesting/index/delete - Works

Then I thought Let me try with List01.php

Vky/JustTesting/Controller/Index/List01.php

<?php

namespace Vky\JustTesting\Controller\Index;

class List01 extends \Magento\Framework\App\Action\Action
{
    public function execute()
    {
        echo '<pre>'; print_r("List01 Action");die((__FILE__).'-->'.(__FUNCTION__).'--Line('. (__LINE__).')');
    }
}

And http://127.0.0.1/magento222/justtesting/index/list01 - Works

I have tried all this.

php bin/magento setup:upgrade

php bin/magento cache:clean

php bin/magento cache:flush

remove var/cache and var/page_cache folder. But nothing is helping.

Why is the list action not working?
Is there any restriction to use action name?
Am I missing something?
Something wrong with my project? But I have tried this in another project also and the same problem.

  If it's because of this.

There is some reserved word in PHP. List is one of them. http://www.php.net/manual/en/reserved.keywords.php
Then why I can use it in Magento 1. http://127.0.0.1/magento1936/justtesting/index/list - Works in Magento 1.

I am just hoping for some explanation.


texts: While trying to Reindexing through the command prompt generate error

texts:
Command I used :

php bin/magento indexer:reindex


texts: Magento2: Production Critical Error on Cloudinary

texts:
I am trying to run the setup:upgrade command I get the following error

  PHP Fatal error:  Uncaught Error: Call to a member function
  getCloud() on null in
  /var/www/asprod/vendor/cloudinary/cloudinary-magento2/Model/Configuration.php:149
      Stack trace:
      #0 /var/www/asprod/vendor/cloudinary/cloudinary-magento2/Core/ConfigurationBuilder.php(20):
  Cloudinary\Cloudinary\Model\Configuration->getCloud()
      #1 /var/www/asprod/vendor/cloudinary/cloudinary-magento2/Model/BatchDownloader.php(156):
  Cloudinary\Cloudinary\Core\ConfigurationBuilder->build()
      #2 /var/www/asprod/vendor/cloudinary/cloudinary-magento2/Model/BatchDownloader.php(150):
  Cloudinary\Cloudinary\Model\BatchDownloader->_authorise()
      #3 /var/www/asprod/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111):
  Cloudinary\Cloudinary\Model\BatchDownloader->__construct(Object(Cloudinary\Cloudinary\Model\Configuration),
  Object(Cloudinary\Cloudinary\Core\ConfigurationBuilder),
  Object(Cloudinary\Cloudinary\Model\MigrationTask),
  Object(Cloudinary\Api),
  Object(Magento\Framework\App\Filesystem\DirectoryList),
  Object(Magento\Framework\HTTP\Adapter\ in
  /var/www/asprod/vendor/cloudinary/cloudinary-magento2/Model/Configuration.php
  on line 149

I am using these steps to install cloudinary

composer require cloudinary/cloudinary-magento2
php bin/magento maintenance:enable
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento maintenance:disable
php bin/magento cache:flush

Using PHP 7.0, Magento 2.2.0 and Ubuntu 18.04.
Without the cloudinary extension, everything is working fine but the site doesn't display any images since they are all hosted on Cloudinary.


texts: Validation for new attribute on customer signup controller

texts:
I have created new attribute 'customer_interest' and successfully getting it in form, frontend validation is working.

Now I need to validate it on backend(php), which file I need to work on? where is this signup form submitting?


texts: When I setup cross-sell for Product A with Product B, I want it to automatically cross-sell in reverse when saving the product. How can I set this up?


texts: Magento 2 - How to generate an Interface and a model?

texts: Sometimes i have to create lots of api models, how would I be able to automate that?


texts:
I am using 1.9.2.1.
After applying SUPEE-6788 , cron stopped working.
Why??
I attached the cron setting of my system.


texts: If I enter the article number "S55XK", the articles "S55AK, S55BK, S55CK, S55DK, ..." will be found

texts:
The extension that article numbers with an "X" are still found, as well as the category
How can I work with elastic search in Magento2. I need the solution for below example -
For example, if I enter the SKU number "S55XK", the articles "S55AK, S55BK,
S55CK, S55DK, ..." will be found.


texts: Extension Rewrites a Model Method to Rewrite a Resource Model Method: How to Extend It?

texts:
I have ThirdPary_Extension that rewrites a resource class method of Mage_Catalog_Model_Resource_Product_Indexer_Price. However, ThirdPary_Extension goes about doing this a little strange. It's configured to rewrite only Mage_Catalog_Model_Product_Indexer_Price, but in this class' _construct(), it's pointing to a resource class that extends off of Mage_Catalog_Model_Resource_Product_Indexer_Price.

Let me illustrate.

config.xml

...
<models>
     <catalog>
        <rewrite>
            <product_indexer_price>ThirdParty_Extension_Model_Product_Indexer_Price</product_indexer_price>
        </rewrite>
    </catalog>
</models>
...

ThirdParty_Extension_Model_Product_Indexer_Price

class ThirdParty_Extension_Model_Product_Indexer_Price extends Mage_Catalog_Model_Product_Indexer_Price
{
    protected function _construct()
    {
        $this->_init('thirdparty/resource_product_indexer_price');
    }
    ...
}

ThirdParty_Extension_Model_Resource_Product_Indexer_Price

class ThirdParty_Extension_Model_Resource_Product_Indexer_Price extends Mage_Catalog_Model_Resource_Product_Indexer_Price
{
    protected function _rewrittenMethod()
    {
        // Good stuff
    }
    ...
}

And in Mage_Catalog_Model_Product_Indexer_Price::reindexAll, you have $this->_getResource()->reindexAll(), which invokes the rewritten method as was intended.

However, this causes some issues. Depending on how you're instantiating the resource model and invoke a method, you may end up with using ThirdParty_Extension_Model_Resource_Product_Indexer_Price (good) or Mage_Catalog_Model_Resource_Product_Indexer_Price (bad), among one or two other things.
Obvisouly, the extension works for re-indexing prices, but I'm not a fan of how it's done. Please correct me if I misunderstand this extension.

Now the question, how do I rewrite Mage_Catalog_Model_Resource_Product_Indexer_Price the right (lol!) way?

Rewrite both Mage_Catalog_Model_Product_Indexer_Price and Mage_Catalog_Model_Resource_Product_Indexer_Price to re-align everything nicely? Or..
Rewrite just ThirdParty_Extension_Model_Resource_Product_Indexer_Price

Option #1 would typically be my pick, but I'm thinking maybe there was a reason this rewrite was done in such a way, in which case #2 would be the way to go. What say ye?


texts: customer's password not displayed in email templates in Magento

texts:
After New account registration in 'welcome email' password not visible.
If I want to send a password through email then how to send it.

Is it good practice to send a password in clear text?


texts: Magento 2 : Getting an error "syntax error, unexpected 'Abstract' (T_ABSTRACT)"

texts:
I have create 2 files as below :

Namespace/Module/Model/Test.php

<?php
namespace Namespace\Module\Model;
use Namespace\Module\Model\Payment\Method\Abstract;

class Test extends Abstract
{
}
?>

Namespace/Module/Model/Payment/Method/Abstract.php

namespace Namespace\Module\Model\Payment\Method;
use Magento\Framework\DataObject;

abstract class Abstract extends DataObject implements \Namespace\Module\Model\Payment\Method\Interface
{
}

Now when file "Test.php" is called that time I am getting below error :

  s:221:"Fatal Error: 'syntax error, unexpected 'Abstract' (T_ABSTRACT), expecting identifier (T_STRING)' in '/var/www/html/m2/app/code/Namespace/Module/Model/Payment/Method/Test.php' on line 3";

Does any one have an idea ?
Thank you.


texts: Magento not AUTO sending transaction emails

texts:
This is a weird situation, Magento stopped sending New Order emails, contact form submission, etc. Interesting, after a customer places an order, I can go in and click send an email and the email will be sent.
I am using Ashroeder SMTP Pro, and it is passing the test, I have been using it for about a year now, the only thing I can think of I changed recently is that I shortened my Order numbers from 9 digits to 4 digits.
I have googled this all day and tried a bunch of different things without success. I think that the function to send email is not being called automatically. No error message as far as I can tell.If anyone will be kind to point me in the right direction that would be appreciated.


texts: Site loading speed very slow Magento 2.3

texts:
as per our architecture, we have a web server(Apache) running on one machine and my database(MySQL) running on different machine. The communication between these two machines in over internal network (without any firewall or any gateway).

We have a database heavy site with around 3000 products and the number is expected to grow. But the problem is that the site is taking too much of time to load (~30 sec). the waterfall diagram in browser shows that first response from server takes around 24-25 seconds and then the complete page loads in 30 seconds.

Images of the products are not heavy and also there is no need for CDN as the server location is in same geographical area.
the site is hosted on a private cloud
the score on GTMetrix is 96%

Any pointers to debug the issue will be much appreciated


texts:
I want to export all the orders till date (without using extension) with Following Details
- Name
- E-mail
- Phone

Can someone guide me on DB query to export the same? Default export in panel only allows name and email, no phone numbers.


texts: Get your authentication keys getting Fastly is validating your browser

texts:
I am trying to get my  authentication keys i go to :https://marketplace.magento.com/customer/account
and get "Fastly is validating your browser"
I have a clean cache also try to get it from 3 different pc. mobile. nothing work!
is it only me?


texts: I am facing this error while fetching data to admin grid in Magento

texts:
I am facing this error while fetching data from custom table in Magento 2.3.5
the error is:
Argument 1 passed to Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider::searchResultToOutput() must implement interface Magento\Framework\Api\Search\SearchResultInterface, instance of Aspl\Contact\Model\ResourceModel\Contact\Grid\Collection given, called in D:\xampp\htdocs\M2\vendor\magento\framework\View\Element\UiComponent\DataProvider\DataProvider.php on line 282

please if anyone have idea about this problem then just give me solution.
Thanks In Advance.


texts: Magento 2 custom theme CSS and other resources not loading

texts:
I have setup Magento 2 in local system in WAMP stack.
We have two websites.
One is our Main website and other is different domain webiste.

First website working fine with Luma theme and url is abc.com.
I have created new website and created virtual host for the same.

But when I run virtual host url xyz.com it's running perfectly but css and other resources not loading. It gives an error like failed to load resources.

Also I have check pub/static all the files available.

See screenshots.

abc.com default website

xyz.com new website with new custom theme

I have run below command as well.

  php bin/magento setup:upgrade
  php -dmemory_limit=5G bin/magento setup:static-content:deploy -f

But default website working fine only.

My virtual host configuration like below.

Please help me.


texts: New Magento 2, nginx config error 403 forbidden

texts:
After my installation of magento2 on Ubuntu, I get this error on localhost http://localhost/magento2/ - 403 forbidden

I have to change the port to any other like 8080 in file /etc/nginx/sites-available/magento, in order to be able to load the website like this http://localhost:8080/magento2/

I know that nginx is able to server various sites, and I was expecting to use this http://localhost:80/magento2/ but I get error 403 forbidden

In my understanding as far as you have a root directory for each virtual hosts, the web-server will pull the site files from those locations, so it should not matter if this is the same port, if you specific the folder with the content after server name, in my case: http://localhost:80/magento2/

Is there anyone able to advice how this supposed to be configured with nginx?,
thanks

My nginx config for magento is:

    upstream fastcgi_backend {
         server  unix:/run/php/php7.2-fpm.sock;
     }

     server {

         listen 80;
         server_name localhost/magento2;
         set $MAGE_ROOT /var/www/html/magento2;
         include /var/www/html/magento2/nginx.conf.sample;
     }

Default is just:

    server {
            listen 80 default_server;
            listen [::]:80 default_server;
            root /var/www/html;
            index index.html index.htm index.nginx-debian.html;

            server_name _;

            location / {

                    try_files $uri $uri/ =404;
            }


texts: How to fix "Fatal error: Class 'Mage_Catalog_Block_Product_Abstract' not found" after restoring backup of Magento installation?

texts:
After some issues in a webshop which I'm managing technically, I did a restore of a backup from the files. The backup was only one week old and worked well previously.

I removed all the files from the server and uploaded the backup. After that I get the following error:

"Fatal error: Class 'Mage_Catalog_Block_Product_Abstract' not found in /ROOTDIR/public_html/shop/app/code/core/Mage/Reports/Block/Product/Abstract.php on line 36"
For two days I tried several things like clearing the cache, reuploading (also older backups), checking file permissions, code fixes, but in any case, I still get this error.

The files and classes do exist physically, checked all logging and tracing, but nothing to get there.

Has anyone any suggestion where to look for the problem, or how to solve this?

Thanks in advance.

Magento version: 1.9.2.4


texts:
Magento 2 site.
I've been told that this is due to the site caching versions of the page which contain a gclid or a fbclid in the url.
It occurs intermittently and is impossible to keep on top of as it changes from page to page.
To give an example. If I land on the site direct using the url in the search bar and this is completely clean (no tracking parameters). I navigate to a category in the navigation, for example, 'armchairs'. I scroll down and click in the pagination to view page 2 but the url is not clean now, it contains a glid for a generic ppc ad group. Every user that follows the same journey in shopping this category falsely inflates the metrics of that ad group in ads and GA.
It happens most often in the pagination but it also happens in the use of colour, material or style filters.
How do I ensure that the cache never ever serves a page which has marketing campaign parameters in it as it's really skewing all our optimisations?
Thank you so much for any help.


texts: Magento 1.9 admin grid custom report displays same collection data in all rows

texts:
I am developing a customised grid report which gives result as per the given time period for specific order status. As a result I am getting same collection in all rows instead of getting a result according to the relevant date.

Can someone please help me fix this asap.

Thanks,


texts: Magento: Observer + Router + Controller not working

texts:
I'm working on a MassAction plugin for Sales/Order using Observer. I cant get the controller route to work.

Here is my etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>

<config>
    <modules>
        <Test_Compressfiles>
            <version>1.0.0</version>
        </Test_Compressfiles>
    </modules>

    <adminhtml>
        <events>
            <adminhtml_block_html_before>
                <observers>
                    <Test_Compressfiles_Model_Observer>
                        <type>singleton</type>
                        <class>Test_Compressfiles_Model_Observer</class>
                            <method>compressfiles</method>
                    </Test_Compressfiles_Model_Observer>
                </observers>
            </adminhtml_block_html_before>
        </events>
    </adminhtml>
    <admin>
        <routers>
        <adminhtml>
            <compress>
                <use>admin</use>
                <args>
                    <module>Test_Compressfiles</module>
                    <frontName>compress</frontName>
                </args>
            </compress>
        </adminhtml>
        </routers>
    </admin>

</config>

my folder structure:

- Compressfiles
-- Model / Observer.php
-- Controllers / Adminhtml / Sales/ OrderController.php
-- etc / config.xml

Here is my controller - this is where I dont understand how to get the controller URL:

<?php

require_once 'Mage/Adminhtml/controllers/Sales/OrderController.php';

class Test_CompressFiles_Sales_OrderController extends Mage_Adminhtml_Sales_OrderController {

protected function _construct()
{
    Mage::log("COMPRESS");
    die('it works');

}

public function indexAction() {

    Mage::log("COMPRESS");

    echo "test2";

}

public function compressAction() {

    Mage::log("COMPRESS");

    echo "test2";

}

}

?>


texts: Order collection not showing the order that have been invoiced

texts:
I try to retrieve all the order collections, but when I observe by looping the collections and print the order id, I notice the order that has been invoiced is not inside the collection.

$collections = Mage::getModel('sales/order')->getCollection()
      ->addAttributeToSelect('*');

foreach($collections as $collection){
 echo $collection->getId();
}


texts: Added wishlist to cart and stay on wishlist page

texts:
How to stay on page after add wishlist product to cart?

Here is the function

public function getJs()
{
    $js = "
        function addWItemToCart(itemId) {
            var url = '" . $this->getItemAddToCartUrl('%item%') . "';
            url = url.gsub('%item%', itemId);
            var form = $('wishlist-view-form');
            swal('Barang berhasil di tambahkan ke keranjang');
            if (form) {
                var input = form['qty[' + itemId + ']'];
                if (input) {
                    var separator = (url.indexOf('?') >= 0) ? '&' : '?';
                    url += separator + input.name + '=' + encodeURIComponent(input.value);
                }

            }
            setLocation(url)
        }
    ";

    $js .= parent::getJs();
    return $js;
}


texts:
I need to change the front banner of my site, but the button to "Insert Image" in to the static block does nothing when you click it. None of the buttons do.

I also wanted to make a coupon code and when I tried to click to make the rule that button now also does nothing.

I notice at the bottom of my browser this comes up - javascript:void(0) when trying to do the coupons, but not when trying to change the image.

Our web designer has recently been making changes to the site to speed things up a bit but these buttons seem not to be working ever since he's been doing so.

So my question I suppose is - has he messed up somewhere? Or is there an issue in Magento that I've missed that will fix this?

It's Black Friday tomorrow so getting the site updated is quite important!

Many Thanks.


texts: How to save Image data using Magento 2.4.2?

texts:
I have created an input type image using Magento 2 Extension and want to save Image data.
Now I want to save Image data in Magento 2 Database Custom table.
I have created custom table and run Ajax successfully. But don't know how to insert image data in Magento 2 and upload that files in Magento Folders.
Please suggest me any link or any dummy code regarding the same like how to upload image in Magento 2.
Any help is appriciated.


texts: Catalog search returning blank page and no error in system.log

texts:
Finding it hard to debug my problem, I am getting a blank page when searching for a product.

When I check my system.log there's nothing there explaining the error, could someone let me know where I would start debugging this problem!

Sorry if the question is too broad can't think how I would expand it as I can't debug it with no error message to work off!

EDIT

Sorry I should of mentioned, yes I have display_errors on and developer debugging and logging etc on.


texts: add default filter for admin grid magento2

texts:
I have created the custom table to join sales_order_item and sales order grid.
I need to display the order with complete status by default instead of pending status order.

I have searched for the same and got the solution for magento1, http://inchoo.net/magento/prepared-filter-for-magento-admin-grids/. Could anyone help me to implement the same filter by default on magento2

Now I am getting,

But I need to get complete status order details by default.


texts: How to check if product is added to wishlist from 'list page' or 'product page'

texts:
I am wondering if there is any way to know that product is added to the wishlist from 'Category/List' page OR 'Product View' page. I need this only when product is successfully added to the wishlist.
Any help would be appreciated.


texts: Customized data in Sales->Orders columns

texts:
My objective is to pull in tracking numbers for the orders (Already done) and take those tracking numbers, run them through the Canada Post API and take the result  (String) and add that to the column instead of the tracking numbers themselves.
What is the best way to go about this?


texts: Magento2 - How to get cart sale-rules information with respect to specific Product?

texts: I am using event checkout_cart_add_product_complete which is triggered after Doing Add to cart any product, in the observer of this event I want to get associated cart price rule if any applied?


texts: Magento 2: Dependency Injection: Optional class as parameter

texts:
We are developing a Magento 2 extension and we need to inject a class from a third party extension that the user may or may not have installed.

We thought about injecting the class via the di.xml file and set as an optional parameter in the class constructor.

When we run 'bin/magento setup:di:compile' no errors are thrown, however when refreshing the pages, a class not found exception is thrown.

How can we check that the class exists before injecting in the di.xml?

I have something like this in my di.xml:

    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="My\Custom\Class\Builder">
        <arguments>
            <argument name="thirdPartyHelper" xsi:type="object">Third\Party\Helper</argument>
        </arguments>
    </type>
</config>

And something like this in the class that i'm trying to inject:

    class Builder
    {
        private $dependency1;
        private $thidPartyHelper;

        public function __construct(
            Dependency1 $dependency1,
            ThidPartyHelper $thidPartyHelper = null
        ) {
            $this->dependency1 = $dependency1;
            $this->thidPartyHelper = $thidPartyHelper;
        }
    }


texts: Overriding template files in own theme, loaded through JS (Knockout.js)

texts:
Since the official Magento 2.0 forums aren't of any help, i'll post my question here as well.

We're in the process of building our own theme based on the Magento Blank theme and we would like to implement 2 small changes to the minicart dropdown in the header. These files are loaded through JS (Knockout.js framework), but simply duplicating the file to our own theme in the same folder (Name/name2/web/template/minicart/item/default.html) and editing them doesn't show up any changes so we suspect the override behaviour is different in this case.

Can someone point us in the right direction? Thanks!


texts: How to add wysiwyg editor to custom frontend form of custom module in Magento1.9

texts: I have shown here https://stackoverflow.com/questions/22218898/magento-add-wysiwyg-to-custom-frontend-form and I have putted the code of that site in my .phtml file of custom module for showing wysiwyg editor in frontend custom form instead of "textarea". But it showing nothing. If any one knows about it to render wysiwyg editor in frontend custom form, please reply it.


texts:
I have 22k products in my website. When I export products from admin, it shows error:

This page isn’t working demotoday.info took too long to respond.HTTP ERROR 504

I have changed max_execution_time and memory_limit on the server but still the result is same.

When I checked the log file, in which an error related to the database.

2017-07-17T14:49:57+00:00 ERR (3): Warning: Error while sending QUERY packet. PID=9539  in /var/www/html/staging/lib/Zend/Db/Statement/Pdo.php on line 228

How can I fix this issue?


texts:
How to add returned products back to inventory?

If a customer orders a product it gets subtracted from the shops inventory. Now I would like to add it back if he returns it.


texts: Magento 2 blank product price and image after data migration?

texts:
I have migrated data from magento1.9.0.1 to magento2 in admin panel.

I am able to see product and its details but when I edit any product it shows only product name and sku other fields are blank.

Suggest me some solution.


texts: How to get the shipping address from using sales_order_payment_save_after event

texts:
I need to save the shipping address while order is placed in my custom table how to i take the shipping address . I am using the event sales_order_payment_save_after and did the following codes

$shippingAddress = $order->getShippingAddress();
 $city = $shippingAddress->getCity();
 $state = $shippingAddress->getRegion();
$countryData = $this->countryInformation>getCountryInfo($shippingAddress->getCountryId());
$country = $countryData->getFullNameLocale();

It is not return any result . how to i get the shipping addess


texts:
Does anyone know how do I add a community poll at the end of my checkout success page?
I know I can use widget and add a static block but I can't seem to find the correct code.
I am using Magento CE 1.9.3.2


texts: Tracking number in Email template magento 2 not working

texts:
I have use in the Email templates "New Shippment" the variable tracking numer detail
The variable in BO magento 2 Email templates :
{{block class='Magento\Framework\View\Element\Template' area='frontend' template='Magento_Sales::email/shipment/track.phtml' shipment=$shipment order=$order}}

When i recieve the email i get no informations of tracking informations
I use magento version 2.3.5-p1 , i wanna just get the informations of tracking number in email shippment.
The variable of Order Summary is also empty


texts: Magento 2 Warning: DOMXPath::query(): Invalid expression in /vendor/magento/framework/Config/Dom.php on line 277

texts:
Please Help me, I checked other magento stackexchange answer but not getting actual answer.
I am trying to send a email programatically then getting this error.
I am using magento2.3 version
i got this error :- Warning: DOMXPath::query(): Invalid expression in /vendor/magento/framework/Config/Dom.php on line 277


texts:
Added language and currency switcher to template using this below layout.

<block class="Magento\Framework\View\Element\Template" name="store.settings" group="navigation-sections" template="Magento_Theme::html/container.phtml">
                    <arguments>
                        <argument name="title" translate="true" xsi:type="string">Settings</argument>
                    </arguments>
                    <block class="Magento\Store\Block\Switcher" name="store.settings.language" template="Magento_Store::switch/languages.phtml">
                        <arguments>
                            <argument name="id_modifier" xsi:type="string">nav</argument>
                        </arguments>
                    </block>
                    <block class="Magento\Directory\Block\Currency" name="store.settings.currency" template="Magento_Directory::currency.phtml">
                        <arguments>
                            <argument name="id_modifier" xsi:type="string">nav</argument>
                        </arguments>
                    </block>
                </block>
            </block>

But When I click on dropdown there shows this below error

  TypeError: event.target.matches is not a function

This is multistore concept.


texts: How to export Magento 2 whole website from live to local?

texts:
I just want to know how to export magento2 whole website from live server to localhost ? with proper installation, I tried many shortcuts but failed and faced access denial if hit URL of admin dashboard in local, can anyone please elaborate it step by step, thanks :)

My personal effort before this :

  I have tried and resolve many issues using my own way installing from
  live to local, I have also faced ioncube encode issue, but resolve it
  by enabling ioncube in XAMPP with CURL. but my screen return blank
  screen on both front end and back end dashboard.


texts: Magento 2: SQLSTATE [22003] Error occurring when deleting product from Admin

texts:
I'm trying to exclude two specific products from Admin, but I've ever seemed this message below:

SQLSTATE [22003]: Numeric value out of range 1690 BIGINT UNSIGNED value is out of range in...

How could I solve that?


texts: Magento 2.3.1 Merge products from one database to another?

texts:
I have a staging and a production server for my Magento 2.3.1 project. The two databases have different data and configurations, so I can not just dump the mysql db and restore it.

Is there a way to merge only products data from one database to another?


texts: Magento security patch SUPEE-6482, What is patched?

texts:
Today 04.08.2015 there was a new security patch released, some colleagues and I were checking the patch, and is always nice to have some discussion about what changed, also does anyone know what are the possible attacks that could affect and unpatched shop?
What 's the worst that could happen?

Update: I just wanted to add the email magento sent today to complete the post.


texts: How to prevent extension installation problems with compilation mode enabling

texts:
I have the extension which is listening to core_layout_block_create_after event.
It could be any event which is firing in magento admin.
Also I have magento instance with compiler mode enabled.
I installed the extension through magentoconnect. Installation was successful and cache was cleaned.
Now, after returning back to admin I will get the error:

Mage registry key "_singleton/extension/observer" already exists
 /var/www/magento/trunk/app/Mage.php(222): Mage::throwException('Mage registry k...')
 /var/www/magento/trunk/app/Mage.php(476): Mage::register('_singleton/exte...', false)
 /var/www/magento/trunk/includes/src/__default.php(21023): Mage::getSingleton('extension...')
 /var/www/magento/trunk/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('core_layout_blo...', Ar
ray)
 /var/www/magento/trunk/includes/src/__default.php(27297): Mage::dispatchEvent('core_layout_blo...', A
rray)
 /var/www/magento/trunk/includes/src/__default.php(27310): Mage_Core_Model_Layout->createBlock('adminh
tml/page', 'root')
 /var/www/magento/trunk/includes/src/__default.php(27077): Mage_Core_Model_Layout->addBlock('adminhtml
/page', 'root')
 /var/www/magento/trunk/includes/src/__default.php(27043): Mage_Core_Model_Layout->_generateBlock(Obje
ct(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
 /var/www/magento-demo/trunk/includes/src/__default.php(13507): Mage_Core_Model_Layout->generateBlocks()
 /var/www/magento/trunk/includes/src/__default.php(13432): Mage_Core_Controller_Varien_Action->generat
eLayoutBlocks()
 /var/www/magento/trunk/includes/src/Mage_Adminhtml_Controller_Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
 /var/www/magento/trunk/app/code/core/Mage/Compiler/controllers/Adminhtml/Compiler/ProcessController.
php(59): Mage_Adminhtml_Controller_Action->loadLayout()
 /var/www/magento/trunk/includes/src/__default.php(13582): Mage_Compiler_Adminhtml_Compiler_ProcessController->indexAction()
 /var/www/magento/trunk/includes/src/__default.php(17927): Mage_Core_Controller_Varien_Action->dispatch('index')
 /var/www/magento/trunk/includes/src/__default.php(17484): Mage_Core_Controller_Varien_Router_Standar
d->match(Object(Mage_Core_Controller_Request_Http))
 /var/www/magento/trunk/includes/src/__default.php(20061): Mage_Core_Controller_Varien_Front->dispatch()
 /var/www/magento/trunk/app/Mage.php(683): Mage_Core_Model_App->run(Array)
 /var/www/magento/trunk/index.php(87): Mage::run('', 'store')


texts:
I would like to refresh all cache at specified intervals, like once a day at midnight (as an example). How can I accomplish this?

I'm using CE 1.9.1.


texts: Magento 2 create table field with ENUM data type

texts:
I want to create a field in my custom table "test_days" with values "days,week,month" and set default value as "days".

How is this possible with Magento 2?


texts: Call custom JS function in HTML Template file

texts:
Is there any way that we can call our JS function into HTML template file.
here is my js function and I want to call this JS function in HTML template file which is available in

web/template/select.html

requirejs([
'jQuery',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/shipping-rate-registry',
'Magento_Checkout/js/model/error-processor'
], function($, quote, rateRegistry, errorProcessor){

function getCity () {
    console.log('sdasdasd');
    var address = quote.shippingAddress();
    address.trigger_reload = new Date().getTime();
    rateRegistry.set(address.getKey(), null);
    rateRegistry.set(address.getCacheKey(), null);

    quote.shippingAddress(address);
}

});


texts: Why my bin/magento setup:upgrade is really slow?

texts:
Running this command seems incredibly slow taking around half an hour+. I feel like it didn't always take this long and am wondering if this is normal and if not what can cause this?

This is a very basic almost default Magento 2 installation on a dedicated server with NGINX PHP7 MYSQL. I have been trying to write some basic modules however this is really slowing me down.


texts:
Last night my host experienced what they call "InnoDB engine server is broken".  It took awhile but they did a recovery but had some issues with missing tables.  I also found out that we didn't have any backups.  I had switched from cloud to dedicated and found out (after the fact) that the auto backup wasn't included and that I had to order separately.

I do have a problem with a missing table on http://bit.ly/1STElBF

I looked up some solutions, but I'm not sure if they apply to me.  My host seems to think they don't but I was hoping someone could help me with this?

The error message:

  SQLSTATE[42S02]: Base table or view not found: 1146 Table
      'firstgea_shop.core_store' doesn't exist, query was: SELECT `main_table`.*
  FROM `core_store` AS `main_table` ORDER BY CASE WHEN main_table.store_id = 0 THEN 0 ELSE 1 END ASC, main_table.sort_order ASC, main_table.name ASC

Trace:

#0 /home/firstgea/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/firstgea/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/firstgea/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/firstgea/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `main_ta...', Array)
#4 /home/firstgea/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
#5 /home/firstgea/public_html/lib/Zend/Db/Adapter/Abstract.php(737): Varien_Db_Adapter_Pdo_Mysql->query('SELECT `main_ta...', Array)
#6 /home/firstgea/public_html/lib/Varien/Data/Collection/Db.php(736): Zend_Db_Adapter_Abstract->fetchAll('SELECT `main_ta...', Array)
#7 /home/firstgea/public_html/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(521): Varien_Data_Collection_Db->_fetchAll('SELECT `main_ta...', Array)
#8 /home/firstgea/public_html/lib/Varien/Data/Collection/Db.php(572): Mage_Core_Model_Resource_Db_Collection_Abstract->getData()
#9 /home/firstgea/public_html/app/code/core/Mage/Core/Model/Resource/Store/Collection.php(174): Varien_Data_Collection_Db->load(false, false)
#10 /home/firstgea/public_html/lib/Varien/Data/Collection.php(752): Mage_Core_Model_Resource_Store_Collection->load()
#11 /home/firstgea/public_html/app/code/core/Mage/Core/Model/App.php(635): Varien_Data_Collection->count()
#12 /home/firstgea/public_html/app/code/core/Mage/Core/Model/App.php(477): Mage_Core_Model_App->_initStores()
#13 /home/firstgea/public_html/app/code/core/Mage/Core/Model/App.php(360): Mage_Core_Model_App->_initCurrentStore('', 'store')
#14 /home/firstgea/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#15 /home/firstgea/public_html/index.php(84): Mage::run('', 'store')
#16 {main}


texts: How to hide product attribute from add new product in admin area?

texts:
I have created a product attribute name "testcheck". I am trying to hide this attribute from add new product section only but want to show the edit product mode. so I can put the test value for this attribute once the product has been created.

Is there any way or idea or data provider. Please suggest.


texts: how can i get the current product id in the product edit page custom tab collection grid, magento 2

texts: I have created custom tab under product edit page and shows grid under the tab but I need to show grid collection based current production id,if get current product id it shows the grid reneder url how to achieve this?


texts: How to update custom price in Total after select shipping method in Magento 1.9?

texts:
I have a dropdown on shipping method step and I want to update price as shipping price if someone select an option from dropdown. It should updated Shipping price and Grand total.

Can anyone help me in this?


texts: Magento Layer Navigation Move after Custom Block

texts:
I want to move layer navigation after My custom Block i tried lot of things but its not working even its still showing there after removing layer navigation code form "Catalog Category (Anchor)" in catalog.xml

<reference name="left">
    <block type="catalog/navigation" name="left_nav" before="-" template="catalog/navigation/left_nav.phtml"/>
    <block type="catalog/layer_view" name="catalog.leftnav" after="-" template="catalog/layer/view.phtml"/>
</reference>


texts: Is any way to create different root categories for different store

texts:
I have two store one is English and  another is France.I have multiple category in English store.But I want to create these all category in France Language for France store.
Manually this is possible for me to change store and change the category name English to  France. This is working perfect. Can I create different root category for a different store.


texts:
I am trying to apply images to those products that are missing them in my development magento 2.1 system.
The initial product data was imported from a magento 1.9.2 system, and since that import, new products have been created in Magento 2.
All existing products (imported) have their respective images applied and working fine in both admin and frontend.

When I try to add a new image to a new product, the image seems to upload to the system fine (it appears on the product admin page while setting base, small and thumb roles for the image.

After I click save on the product though, that image no longer appears in the admin pages (product listing, or edit product pages), nor does it appear on the front end product pages?

I have tried clearing and flushing the cache (although cache is disabled on this dev site currently), tried reindexing everything, checked folder permissions etc.

I am scared to try and run...

magento catalog:image:resize

...for fear of it taking days to complete, based on what I have read in many other threads. For someone else, it took 12 hours for 6000 products, and I have 36000 products!!!

Not sure why this is not working as expected?


texts: Magento 2 REST API Product delete Category entry

texts:
Updating a product with REST API with POST gives me a problem wenn I want to delete the category assignment

For example the product online is assignet into 3 categories and now I want it into 2 categories only.

So my POST would be like:

   {"product": {
        "id": 1234,
        "sku": "2345",
        "name": "Nice Product",
        "extension_attributes": {
            "website_ids": [1],
            "category_links": [{
                "position": 1,
                "category_id": "10"
            },
{
                "position": 2,
                "category_id": "11"
            }]
        }}
    }

But after this it still has assigment into 3 categories, its not deleeting the 3rd.

Btw. I have a simular question:
Magento REST API Post Product and Category without "Sorting" parameter


texts:
I want to include filters of Layered Navigation in the home page in Magento 2.

How I can add this? Where I have to modify to get it?


texts:
I have a collection and I want to filter like this: WHERE field1 >= '2020-01-01' OR (field2 == 'open' && $field3 == 1).
How can I achieve that?


texts: UI Component: How to filter a custom column with data generated by logic?

texts:
I added a custom column named Payment Code to order listing page in admin:

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_columns">
        <column name="payment_code" class="Vendor\Module\Ui\Component\Listing\Column\PaymentCode">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">Vendor\Module\Ui\Component\Listing\Column\PaymentCodeOptions</item>
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">select</item>
                    <item name="label" xsi:type="string" translate="true">Payment Code</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
                    <item name="dataType" xsi:type="string">select</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

The data Payment Code isn't getting its value from database but calculated by logic as soon as the order listing page loaded. Now I want to filter orders by Payment Code.

My filter does show up and display all of the options in Vendor\Module\Ui\Component\Listing\Column\PaymentCodeOptions, but when used, it returns error as it tried to filter by querying into db, while my fields is pure logic and no data is stored.

How do I do it?


texts:
Tax and Shipping Not yet Calculated on Magento 2.2.6

  Magastore one step checkout extensions

on Order Review Box there are shipping and tax not display so there are not display total amount but when order completed on order email we got there all details


texts:
When I try to checkout by selecting a payment method and click place order button, I get following error message,

"message": "An error occurred on the server. Please try to place the order again."

And I see

http://www.my-domain.com/rest/mystorepath/V1/carts/mine/payment-information 400 (Bad Request)

on browser console.
What could cause this issue? I have disabled SSL on my site too.


texts: My custom module routers and acl problem

texts:
I have a problem about my custom module. It is not shown in my admin panel menu and when I try to open it with its url, I see a 404 page.

My module config file:

<?xml version="1.0"?>
<config>
  <modules>
    <Altar_Hashtag>
      <version>0.1.0</version>
    </Altar_Hashtag>
  </modules>
  <global>
      <page>
          <layouts>
              <page>
                  Share Contents
                  <template>page/sharecontents.phtml</template>
              </page>
          </layouts>
      </page>
    <helpers>
      <hashtag>
        <class>Altar_Hashtag_Helper</class>
      </hashtag>
    </helpers>
    <blocks>
      <hashtag>
        <class>Altar_Hashtag_Block</class>
      </hashtag>
    </blocks>
    <models>
      <hashtag>
        <class>Altar_Hashtag_Model</class>
        <resourceModel>hashtag_mysql4</resourceModel>
      </hashtag>
      <hashtag_mysql4>
        <class>Altar_Hashtag_Model_Mysql4</class>
        <entities>
              <hashtag>

altar_hashtag_contents

              </hashtag>
        </entities>
      </hashtag_mysql4>
    </models>
    <resources>
      <hashtag_setup>
        <setup>
          <module>Altar_Hashtag</module>
        </setup>
        <connection>
          <use>core_setup</use>
        </connection>
      </hashtag_setup>
      <hashtag_write>
        <connection>
          <use>core_write</use>
        </connection>
      </hashtag_write>
      <hashtag_read>
        <connection>
          <use>core_read</use>
        </connection>
      </hashtag_read>
    </resources>
  </global>
  <admin>
    <routers>
      <hashtag>
        <use>admin</use>
        <args>
          <module>Altar_Hashtag</module>
          <frontName>hashtag</frontName>
        </args>
      </hashtag>
    </routers>
  </admin>
  <adminhtml>
  <menu>
    <hashtag module="hashtag">
    <title>Hashtag</title>
    <sort_order>100</sort_order>
    <children>
      <hashtag module="hashtag">
        <title>Manage Hashtag</title>
        <sort_order>0</sort_order>
        <action>hashtag/adminhtml_hashtag</action>
      </hashtag>
    </children>
    </hashtag>
  </menu>
    <acl>
      <resources>
        <all>
          <title>Allow Everything</title>
        </all>
        <admin>
          <children>
            <hashtag translate="title" module="hashtag">
              <title>Hashtag</title>
              <sort_order>1000</sort_order>
              <children>
          <hashtag translate="title">
            <title>Manage Hashtag</title>
            <sort_order>0</sort_order>
          </hashtag>
              </children>
            </hashtag>
          </children>
        </admin>
      </resources>
    </acl>
    <layout>
      <updates>
        <hashtag>
          <file>hashtag.xml</file>
        </hashtag>
      </updates>
    </layout>
  </adminhtml>
</config>


texts: how i can get the column value of admin user table in magento 2

texts:
Hi I have created a new column in the admin users table
using this answers Magento2: How to add new column in admin_user table?
Now I want to get the column value when admin user logged in

How i can get this?


texts: Multistore - Prevent product from having multiple urls

texts:
I have a magento multi-store configuration. One website, with multiple stores, on different subdomains. I'm having an issue with a single product assigned to one store view having multiple urls.

My configuration is as follows:

Store 1 (website, store and view)

-- example.com
Store 2 (store, using above website)

-- store2.example.com (view for store2)
Store 3 (store, using above website)

-- store3.example.com (view for store3)

The issue is, I can go to three different urls for the same product:

example.com/test-product.html
store2.example.com/test-product.html
store3.example.com/test-product.html

"Test Product", is assigned to Catagory1 and Catagory1 is assigned to store2 view.

Why is it that I can go to each of these urls and return the same product. When I do a site search, I want the product to be found, but when clicked, go to store2.example.com/test-product.html no matter what site the user is currently on.

Simply put, I want to:

Prevent the same product from having multiple urls (especially considering it should only be available in one store)
Search across all store but then point the product to the store it's assigned to.

I'm using Magento 1.8.


texts: catalog_product_view.xml - move block to sidebar problem

texts:
I want to move to the sidebar, only on the product view.

To achieve this I've created catalog_product_view.xml in Vendor/Name/Magento_Theme/layout/.

I've added the following line:

<move element="product.info.main" destination="sidebar.additional"/>

But now the product.info.main-block jumps BELOW the footer, which obviously isn't what I wanted to achieve.

My question now is: how can I achieve this?


texts: Link Grouped Parent/Children With Default Quantity set

texts:
I have been looking into programmatically attaching children to their parent (grouped) products, but with the default quantity set as well. There seems to be little to no information on how to do more than attach a single product to a single parent, no quantity information involved.

Code I have that can attach products, albeit with a default quantity of 0:

$linkApi = new Mage_Catalog_Model_Product_Link_Api();
$linkApi->assign('grouped',$parent_id,$child_id);

There is an option $data variable, but I have yet to be able to format an array that would properly be accepted, even after using $linkApi->items('grouped',$id); as a baseline.

Another option is forgoing that part of the API and using the product model, but again not much luck in the way of documentation. Closest I have is this fragment I found, but it does not seem to work.

$grouped = Mage::getModel('catalog/product')->load($parent);
$relationData[$grouped->getId()] = array(
    'qty' => $qty,
    'position' => 0,
    'ids'      => $child,
);
$grouped->setGroupedLinkData($relationData);
try{ $grouped->save(); } catch() //Snipped for brevity

It saves without error, but no associated products appear. If anyone could assist, I would be most grateful.

Summarized:

Need to attach/group children products
Need to attach with a default quantity on a per-child basis


texts:
I want to custom data render from shipping method render.
I have changed files(template in this file js):

Magento_Checkout/js/view/cart/shipping-rates.js

getSubfixLabel: function(){

            var label =  window.checkout.estimate_label_subfix;

            return label;
        },

Magento_Checkout/template/shipping-rates.html

<form id="co-shipping-method-form" data-bind="blockLoader: isLoading, visible: isVisible()" >
    <p class="field note" data-bind="visible: (!isLoading() && shippingRates().length <= 0)">

    <fieldset class="fieldset rate" data-bind="visible: (shippingRates().length > 0)">

                    <input type="radio"
                           class="radio"
                           data-bind="
                                click: $parents[1].selectShippingMethod,
                                checked: $parents[1].selectedShippingMethod,
                                attr: {
                                        value: carrier_code + '_' + method_code,
                                        id: 's_method_' + carrier_code + '_' + method_code
                                        }
                                "/>

                        <each args="element.getRegion('price')" render="" />

    </fieldset>
</form>

I want to get data from function getSubfixLabel and render by html. However, it's showing this function undefined.

ReferenceError: estimate_label_subfix is not defined

Anyone can help me out this issues?


texts: Magento Magmi import products CSV reindex not working

texts:
I've used Magmi to import bulk products to Magento Store and all fine but when the import finishes the reindex plugin ( Magmi Magento Reindexer v1.0.3a) not working I've to use PHP CLI command php-cli, plus I've enabled On the fly indexer v0.2 plugin but still not working.

So any suggestions about that please ?


texts:
I am trying to implement Buy Now feature and I find that if there are 2 items from before in cart, total of 3 items are shown in Checkout page when only 1 was expected.

All solutions that I have found in open source seem to add "buy now" product to cart first and then only checkout.

Is there a way where I can create another cart for same user ( guest / logged in ) so that this single item goes to that cart. I can subscribe to pre checkout event and then use that cart for fetching single item ?

Magento - 1.9

EDIT

I think there could be an approach where a cart full of items can be split into two orders , one for product that has been added using "buy now" and another for rest of items. Then, checking out buy now order would let checkout only 1 item. Is this correct approach since it seems checkout can not be decoupled from cart and also we can't create multiple carts !


texts:
Guys i need an advice on how can i achieve this shipping rule

1) Shipping cost should be at a minimum of US$25.00 or 10% of the total purchase.

Example 1:

Total Purchase = $25
Shipping cost = $25
Total = $50

Example 2:

Total Purchase = $500
Shipping cost = $50
Total purchase = $550.00

Thanks.


texts: can not choose website in advanced pricing

texts:
I want use the advanced pricing set different price for different website.I have multiple websites,but in advanced pricing setting from I can just select one website——All Websites.Why? How can I fix it? Thanks very much.

actuary I have multiple websites


texts: Configurable product not showing all associated products in front end. Magento 2.1.2

texts:
I have a configurable product with 6 simple products associated.  The configurable product has 2 options, color and size.  Color is set as black option, with size being selectable.

I have checked as many of the suggestions and all of my settings seem to be proper, and they are showing as associated in the admin panel.

I also have a number of other configurable products with different number of options.

All configurable products are showing the associated products but they are only showing the first 4 of the associated products.

Is there a setting that I'm missing that limits/sets the number of the associated products that are displayed on the front end?  Possibly a setting that indirectly affects this?

EDIT
I tested the "limit/set" theory and it seems that even after disabling 2 of the associated products in the configurable product, the last 2 are not showing.  I double checked all settings with the last 2 simple products and they are identical to the products that are visible on the front end.

Does someone out there know if there is some kind of "bug" with size options?  For all my products, the XXL and XXXL will not show as options as of now.


texts: I want to edit PDF invoice payment method in magento2.3

texts:
I want to change the position of payment and shipping method position. I want to move this block below grand total. I tried a lot but not working for me.

This is updated code result.


texts: Can we run two separate Magento Applications on two separate php versions like: Magento1 on PHP 5.6 AND Magento 2 on PHP 7 on same server


texts: Add new block/template to customer account edit page

texts:
I'm trying to add one new template to customer account edit page using code below in my layout file

<customer_account_edit>
    <reference name="customer_edit">
        <block type="redbox/customer" name="linkedin_profile" template="redboxDigital_linkedin.phtml"/>
    </reference>
</customer_account_edit>

I want to include my template content above change password & Save button. How I can do that? I know I can over-write edit.phtml and add my code there but I don't prefer it.


texts:
I cant change the logo of transactional emails for some reason when I upload ans press SAVE & CONTINUE the picture its showing me like this

http://prntscr.com/jiabim

Does anyone has found this problem?
Thank you!


texts: How to override cart\addcontroller in magento 2?

texts:
I want this function in \code \StwBuyXGetY \BuyXGetY \Controller\Checkout\Cart\Add.php(this is written in magento 1.9, I want to convert it into magento 2). But I cant add any new function in add controller. Any help will be appreciated.

    public function buyXgetYfree()
    {

        $cart = $this->_getCart();
        /* check if cart is empty */
        if (!$this->_getCart()->getQuote()->getItemsCount()) {

            return;
        }

        $buyProductXID = explode (",",Mage::getStoreConfig('buyxgety_section1/general/productx_product_id'));
        $buyProductYID = explode (",",Mage::getStoreConfig('buyxgety_section1/general/producty_product_id'));
        $buyProductXminQty = explode (",",Mage::getStoreConfig('buyxgety_section1/general/productx_required_qty'));
        $buyProductXmaxQty = explode (",",Mage::getStoreConfig('buyxgety_section1/general/productx_limit_qty'));
        $buyProductYDescription = explode (",",Mage::getStoreConfig('buyxgety_section1/general/producty_description'));

        $error="A BuyXGetY Extension cart error was detected!";

        try
        {
            for($i = 0; $i < count($buyProductXID); $i++){
                if (empty($buyProductYDescription[$i])) {
                    $buyProductYDescription[$i]="free gift";
                }
                if (empty($buyProductXID[$i])) {
                    $buyProductXID[$i]="0";
                }
                if (empty($buyProductYID[$i])) {
                    $buyProductYID[$i]="0";
                }
                if (empty($buyProductXminQty[$i])) {
                    $buyProductXminQty[$i]="999";
                }
                if (empty($buyProductXmaxQty[$i])) {
                    $buyProductXmaxQty[$i]="0";
                }
                if ($buyProductXID[$i] !="0" && $buyProductYID[$i] !="0") {
                    if ($this->isProductYUnique())
                    {

                        $this->buyXgetYfreeCartUpdate((int)$buyProductXID[$i],(int)$buyProductXminQty[$i],(int)$buyProductYID[$i],$buyProductYDescription[$i],(int)$buyProductXmaxQty[$i]);
                    } else {
                        $error = "Error in Buy X configuration - Product Y is not unique across all extension settings.";
                        throw new Exception($error);
                        break;
                    }
                }

            }

        } catch (Exception $ex) {

            $cart->getCheckoutSession()->addError($this->__($error));
            $this->sendErrorEmail($error);
            }
    }

di.xml

        <?xml version="1.0"?>
        <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
        <type name="Magento\Checkout\Controller\Cart\Add">
            <plugin name="buy-x-get-y" type="StwBuyXGetY\BuyXGetY\Plugin\Controller\Checkout\Cart\Add" sortOrder="1" />
        </type>
        </config>

\code \StwBuyXGetY \BuyXGetY \Controller\Checkout\Cart\Add.php

        namespace StwBuyXGetY\BuyXGetY\Plugin\Controller\Checkout\Cart;
        class Add
        {
            public function aroundExecute(\Magento\Checkout\Controller\Cart\Add $add, \callable $proceed, OutputInterface $output)
            {
                $this->buyXgetYfree();
                $returnValue = $proceed();
                return $returnValue;
            }
            public function buyXgetYfree()
            {
                echo "buyXgetYfree"; // this is dummy content
            }
        }


texts: I am trying to add one block of text below Shipping Address but do not know where to place it. please help me.


texts: Disable "Only X left Threshold" Qty from Showing on Store

texts:
Anyone know how to remove the "Only # left" from showing on the product page of the store?

System > Configuration > Inventory for Stock Options has the field "Only X left Threshold" set to "0" which is suppose to disable this yet it still shows.  I've also set Manage Stock to No for Product Stock Options.  I've done the obvious with clearing cache.  I'm running 1.8 ver and to have a Custom Theme installed.  Is this a known bug or could the Custom Theme be overriding something?


texts: Difference between Tax Amount and Base Tax Amount

texts:
I am curious to what the difference is between Tax Amount and Base Tax Amount. I have dumped to the system.log the values of each and the Base Tax Amount is coming out a penny more than the Tax Amount.

Any insight on these two fields is greatly appreciated, and any ideas on why the two are different values is even more appreciated =]

Thank you!

Jeff


texts: Site is not loading properly in Magento 1.9.2

texts: I am using Magento 1.9.2, Some times site is not loading properly like no CSS and JS file loading. And once I delete cache files manually it works fine, It is happening quite regularly. Any specific reason for this issue.


texts: Conditional free shipping: if subtotal >= X and category != Y

texts:
I am trying to set conditional free shipping in our store.

We are on CE1.9.1.

WHAT I EXPECT:

If subtotal is over $80, and there are no items from Category 44 or 45 in the basket, shipping is free.
If subtotal is under $80, and there are no items from Category 44 or 45 in the basket, shipping is uses Aus Post (Fontis Australia extension).
If there are items from category 44 or 45 in the basket, shipping is not free at all.

Category 44 is Hats, Cat 45 is Akubra which is a sub category of Hats.

Here's how it looks:

Anyway, I cannot get this to trigger.

We are using Fontis Australia's extension for Aus Post shipping.
Table/flat rates are turned off.
Free shipping (Mage native) is on, with an $80 threshold.

I would appreciate any advice in getting this working!

Tim


texts: Fatal error while extending Catalog Model Layer class - Magento2

texts:
Been Working on Layered Navigation for my custom collection which is displayed on a custom page, Have extended the Magento\Catalog\Model\Layer  in my custom class and have added the preference in di.xml for the same  <preference for="Magento\Catalog\Model\Layer" type="Custom\LayeredNav\Model\Layer" /> i need to override just one method i.e prepareProductCollection() so i could replace the default collection with the custom collection.

After Following all these steps I have been stucked on the error as below:

  Fatal error: Uncaught Error: Cannot instantiate interface
  Magento\Catalog\Model\Layer\ContextInterface

Any guidance would be really helpful. Below is the code.

Di.xml

<preference for="Magento\Catalog\Model\Layer" type="Custom\LayeredNav\Model\Layer" />

Custom Layer File

<?php
namespace Custom\LayeredNav\Model;
use Magento\Catalog\Api\CategoryRepositoryInterface;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory as AttributeCollectionFactory;
use Magento\Catalog\Model\Layer\ContextInterface;

class Layer  extends \Magento\Catalog\Model\Layer
{
    public function __construct(
        ContextInterface $context,
        \Magento\Catalog\Model\Layer\StateFactory $layerStateFactory,
        AttributeCollectionFactory $attributeCollectionFactory,
        \Magento\Catalog\Model\ResourceModel\Product $catalogProduct,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Framework\Registry $registry,
        CategoryRepositoryInterface $categoryRepository,
        array $data = []
    ) {
        parent::__construct(
            $context,
            $layerStateFactory,
            $attributeCollectionFactory,
            $catalogProduct,
            $storeManager,
            $registry,
            $categoryRepository,
            $data
        );

    }

    public function prepareProductCollection($collection)
    {
        parent::prepareProductCollection($collection);
        //custom collection
        $custom_collection = $this->registry->registry('md_optioncollection');
        //Have set root category id as current category as such the filtered collection is not related to specific category
        $curr_cat_id = $this->registry->registry('current_category')->getId();
        $this->collectionFilter->filter($custom_collection, $curr_cat_id);

        return $this;
    }

}

Custom collection set in my controller file which i store in registry.

//this is where i set my custom collection in another file
public function getAttributeCollection()
{
    $attributevalue = $this->getAttributeValue();
        $attr_code = $attributevalue->getAttributeCode();
        $attr_option_value = $attributevalue->getOptionId();
        $collection = $this->productCollectionFactory->create();
        $store_id = $this->getRequest()->getParam('store_id');
        $collection->addAttributeToSelect('*')
                   ->addAttributeToFilter($attr_code , ['finset'=>$attr_option_value ])
                   ->addAttributeToFilter('visibility','4')
                   ->setStore($store_id)
                   ->addFieldToFilter('status', array('eq' => 1))
                   ->setOrder('id', 'DESC');
        $this->setCollection($collection);
        $this->_coreRegistry->register('md_optioncollection', $collection);
}


texts: Question Magento htaccess - FTP subfolder are reachable for everyone

texts:
I clean installed a new Magento shop and everything works fine. I only have a problem with the protection of the subfolders.

For example i can type in the URL

www.exampleshop.com/vendor

this url is reachable and i dont know how i can protect it.


texts: Magento2 - Enterprise Edition technical differences compared to Community Edition

texts:
I am interested in technical differences between Magento2 EE and CE editions.
Questions I would like to find answers to are:

How can I test my custom CE extension on EE? Assuming that I don't have any access to EE whatsoever.
What are the differences(if any) in extension development for EE and CE?
Often extension providers charge slightly more fore EE extension - is it purely because of technical differences and effort it takes?


texts: related products showing even if disabled

texts:
Magento 1.9.3 custom code.

I have a foreach loop for related products to show in a custom piece of code for the product view page.  here is the code.

<?php foreach ($allRelatedProductIds as $id): ?>
<?php $relatedProduct = $productModel->load($id); ?>

    <a href="<?php echo $relatedProduct->getUrlPath(); ?>">
        <img class="b-lazy" src="<?php echo $relatedProduct->getImageUrl(); ?>"
            alt="<?php echo $relatedProduct->getDescription(); ?>-<?php echo $relatedProduct->getSku(); ?>"
            title="<?php echo $relatedProduct->getDescription(); ?>-<?php echo $relatedProduct->getSku(); ?>"
            width="60px" />

However I am finding that even if a product is set to disabled or out of stock or even not visible individually it will still show in the related products loop.

How can I edit this piece of code to not show disabled items in the loop?

Thanks in advance.


texts: How to assign a Guest Order to a Customer - Magento 2

texts:
I've got some order from guest and later they create their account and ask to link the old orders.

How can I do it?

I tried to update the table sales_order but it wasn't enough to work.

Thanks


texts:
I created system.xml file like below and set all fields depend on active field but some of them doesn't work and display even active field is disabled

system.xml

<fields>
    <active translate="label">
        Enabled
        <frontend_type>select</frontend_type>
        <source_model>adminhtml/system_config_source_yesno</source_model>
        <sort_order>2</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>
    </active>
    <get_settings translate="label">
        Account Info
        <frontend_type>label</frontend_type>
        <frontend_model>module/adminhtml_settings</frontend_model>
        <sort_order>3</sort_order>
        <show_in_default>1</show_in_default>
        <depends><active>1</active></depends>
    </get_settings>
    <title translate="label">
        Title
        <frontend_type>text</frontend_type>
        <sort_order>4</sort_order>
        <show_in_default>1</show_in_default>
        <depends><active>1</active></depends>
    </title>
    ....

in above file get_settings doesn't work but title work as well !
What is different between them?

and Settings.php in module/adminhtml_settings

class Name_Module_Block_Adminhtml_Settings extends Mage_Adminhtml_Block_System_Config_Form_Field
{
    protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
    {
    ....
    ....
    return $html;
    }
}

but didn't use $element in codes!


texts: How can I fix "Item (Mage_Catalog_Model_Product) with the same id "xxx" already exist"?

texts:
I have been getting this error when trying to filter a products collection

Item (Mage_Catalog_Model_Product) with the same id "6058" already exist and wanted to ask what could ne causing the error since there is only one (visible) product with the same ID inside of Magento.

Is there a table that needs to be cleared to remove this dupilcate?


texts: Language switch on product page returns 404

texts:
Having trouble switching between languages on product view of Magento 1.8.1.0. Already tried extensions/solutions from Vinai and DGagliardi resulting in same one-way redirection behaviour.

Our case:

VIEWS:

Lithuanian (default)
English

Product info:

URL default: product-title-in-lithuanian
URL lithuanian: "Use Default Value"
URL english: product-title-in-english

Behaviour

from Lithuanian view:

being on /lt/product-title-in-lithuanian
switching to english sends to /en/product-title-in-lithuanian
which itself redirects properly with 301 to /en/product-title-in-english

from English view:

being on /en/product-title-in-english
switching to lithuanian sends to /lt/product-title-in-english
which DOES NOT redirect to /lt/product-title-in-lithuanian and ends with 404 error

Any tip what could be the problem here?


texts:
I have two custom modules: ModuleA and ModuleB.

Each one rewrites Core Product Model via:

<global>
    <models>
        <catalog>
            <rewrite>
                <product>AD_ModuleA_Model_Product</product>
            </rewrite>
        </catalog>
    </models>
</global>

and class header: class AD_ModuleA_Catalog_Model_Product extends Mage_Catalog_Model_Product

and

<global>
    <models>
        <catalog>
            <rewrite>
                <product>AD_ModuleB_Model_Product</product>
            </rewrite>
        </catalog>
    </models>
</global>

and class header: class AD_ModuleB_Catalog_Model_Product extends Mage_Catalog_Model_Product

but AFAIK, it's not correct syntax since Magento doesn't support multiple rewrites in such case. I've put debugging line Mage::log('AD_ModuleB_Catalog_Model_Product file has been loaded') before its class definition, but it even doesn't load a class file.

Is there another way to extent Core Product Model in multiple independent custom models?

Thanks.


texts:
Howdie,

Ive transferred my site to a new host, upgrading to a VPS in the process.

Cant get the homepage to load though, if I browse to the URL i get page not found. /test.php loads fine.

Ive copied in the original index.php file from the install directory but still cant get the site to load.

Sure im missing something straight forward?

Any pointers, greatly appreciated - free pint for any assistance!

Cheers


texts: How to redirect users to specific page when they go to any pages?

texts:
How to redirect customers to custom page when they go to any other page.

I have integrated OTP verification, I want to redirect customers to the verification page if they are not verified.


texts: Magento 2.2.4 - Modifying Cache configs via CLI or env.php not working when Opcache Enabled

texts:
So controlling my cache from command line or modifying env.php doesn't seem to work. Going into admin showed them all as disabled. Enabling them however within admin worked fine and shows all enabled from command line, env.php and within admin. Modifying them on command line however does nothing but modify env.php and make you think its enabled. What is going on!?
When i disable my opcache the issue stops happening and breaks when I enable. I have to flush my opcache everytime for the changes in the cache to become active but only when configuring cache via CLI or direct changes to env.php. Opcache seems to be caching these configs now it seems?
For now I have blacklisted env.php from opcache however am nervous that more issues may arise here as have never had to do this before.
Steps I have taken

bin/magento cache:status shows all caches set to 1.
Checked env.php, this has updated fine
Reset permissions as per dev docs
I can't find any instances of cacheable="false" within theme or modules
No errors show in logs
Checked redis which seems to be working however hard to debug the database being being used.
Disabled all custom modules.
Wanted to disable theme however new bug in 2.2.4 is stopping this (have renamed to bak majority of folders within theme for now)
Restored a database backup
...Asked a question on here.
Stuck a bounty on it.

Cache:enable process
I have tried tracing what is actually going on when i run this command and so far I can see that the following happens:
Defined in Magento\Backend\Console\Command which extends AbstractCacheSetCommand
protected function configure()
{
    $this->setName('cache:enable');
    $this->setDescription('Enables cache type(s)');
    parent::configure();
}

This then sets enabled the applicable cache types:
$changedTypes = $this->cacheManager->setEnabled($types, $isEnable);

A few more steps through classes shows this command does the following:
public function setEnabled(array $types, $isEnabled)
{
    $changedStatusTypes = [];
    $isUpdated = false;
    foreach ($types as $type) {
        if ($this->cacheState->isEnabled($type) === $isEnabled) { // no need to poke it, if is not going to change
            continue;
        }
        $this->cacheState->setEnabled($type, $isEnabled);
        $isUpdated = true;
        $changedStatusTypes[] = $type;
    }
    if ($isUpdated) {
        $this->cacheState->persist();
    }
    return $changedStatusTypes;
}

However the following line leads me too and interface and am unable to determine the exact contents of that method:
$this->cacheState->setEnabled($type, $isEnabled);

This then runs below code:
public function setEnabled($cacheType, $isEnabled)
{
    $this->load();
    $this->statuses[$cacheType] = (int)$isEnabled;
}

And as Marius points out the persist function is what actually updates env.php.
public function persist()
{
    $this->load();
    $this->writer->saveConfig([ConfigFilePool::APP_ENV => [self::CACHE_KEY => $this->statuses]]);
}

This all seems to work correctly however will leave here as may help any future debugging. However in my situation env.php updates fine and this seems to be where cache configs should be read from, however i have discovered they seem to be cached in opache for some reason.


texts: Magento - Add / Remove Attributes to Existing Configurable Products

texts:
What is the correct procedure - rather than deleting the product and starting again to add or remove attributes to existing configurable products.

When creating a configurable product you are asked to choose which attributes to use for the product.

I have a lot of products i now need to remove some attributes for that were selected initially, and some that also need an attribute adding that were not initially selected.

Any help with this is appreciated - as deleting the products does not seem like the best approach to this. Especially as lots of other things are associated to the products.


texts: Magento 2 : Custom phtml file for custom shipping method

texts:
I am able to add a custom shipping method and I want to add a custom template for that shipping method. I have followed this article to create a custom shipping method.  Is there any way to add custom phtml file for custom shipping method?

Any help would be appreciated.

Edited :

Following is my approach. Please let me know what I'm doing wrong.

  app/code/Custom/Shipping/view/frontend/layout/checkout_index_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="steps" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="shipping-step-custom" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="step-config" xsi:type="array">
                                                    <item name="children" xsi:type="array">
                                                        <item name="shipping-rates-validation before-form" xsi:type="array">
                                                            <item name="children" xsi:type="array">
                                                                <item name="fedex-rates-validation" xsi:type="array">
                                                                    <item name="component" xsi:type="string">Custom_Shipping/js/view/customshipping</item>
                                                                </item>
                                                            </item>
                                                        </item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

  app/code/Custom/Shipping/view/frontend/web/js/view/customshipping.js

define([
        'uiComponent'
    ],
    function (
        Component
    ) {
        "use strict";
        console.log('zed blackbeard');
        return Component.extend({
          initialize: function () {
            this._super();
            console.log('inside initialize function')
          },
          defaults: {
            template: 'Custom_Shipping/customshipping',
          },
        })
    }
);

As you can see in the above screenshot, js called but the template is not rendering.


texts: Magento 2.2.0 missing admin developer configuration

texts: I tried to upgrade my Magento into 2.2.0. And I see that is missing Advanced and Developer items. Is it me? Why it's happening this?


texts:
I have a magento2.2.0 based website and I am trying to get the cron jobs running. Used Ubuntu server with no control panel (AWS EC2 hosting). So, I ssh'ed into the instance and went to

sudo crontab -u root -e

and below is what I have

* * * * * php -c /etc/php/7.0/cli/php.ini var/www/html/***.com/v2/bin/magento cron:run
* * * * * php -c /etc/php/7.0/cli/php.ini var/www/html/***.com/v2/update/cron.php
* * * * * php -c /etc/php/7.0/cli/php.ini var/www/html/***.com/v2/bin/magento setup:cron:run

I edited the cron.php file at the top i have a php mail() tag setup to send me an email when the file is executed so i can know cron is running but after waiting 2 minutes and do not think that cron is running.

Odd thing is when I try to run the cron.php via ssh command line I still am not getting the file to send me an email so idk if its working?


texts: Magento2 - Downgrade Magento from 2.3.4 to 2.3.3

texts:
Is it possible to downgrade Magento from 2.3.4 to 2.3.3?

Because upon downgrade, It's giving me an error like LayoutProcessor not found and Every page is breaking.

So what's the correct way to do it?


texts: How to enable payment/shipping method via fixture EComDev PHPUnit

texts:
My purpose is to check whether certain values are properly set after I place an Order. As I am using a complete separate databse for unit testing purpose I don't have the Magento configuration available in the database.

I am trying to enable payment method and shipping method by inserting data through fixture in core_config_data table, by the following way

config:
    default/dev/template/allow_symlink: 1
    default/payment/purchaseorder/active: 1
    default/carriers/matrixrate/active: 1

But after running the test, when I check the test database table, I can't see those values in there. According to EcomDev_PHPUnit manual we can insert config data in that  way.
What am I missing here?
Is there something else I should consider?


texts:
I have a new client is experiencing REDIS spikes and it is reflected in NewRelic

This is the 2nd call with this same problem this week and I am wondering if there is a good solution to REDIS slowness and site slowness?

Is clearing the REDIS cache on a daily or weekly basis a good practice?


texts: Magento 1.8 remove default google font from head

texts:
I searched Stackexchange but my question is different from others. I saw a similar question with Magento 1.9 but that solution does not work on 1.8. So therefor I ask my question.

I noticed that the browsers block this content from my https Magento:

<link href='//fonts.googleapis.com/css?family=Raleway&subset=latin' rel='stylesheet' type='text/css' />

I did not put this line there, so I guess it is Magento default / pre-installed. I've been searching on the server but cannot find the file that is responsible for putting that line in the head.

Can anyone tell me where I can find the responsible file? So that, hopefully, I can easily remove this line and make my website 100% https secure.

Thank you in advance. John


texts: Watermark Category Images with Brand Logo

texts:
I'd like to add a watermark to each small image (but only in the category listing page) that is based on the manufacturer attribute.   I don't want to alter the small image for that product on other pages.

I've thought about setting a watermark for small images and overriding the image file, but that will add the watermark to all small images for that product (which might be shown on other pages).

Is there a somewhat easy way to do this without creating a custom module?


texts: Magento2.3: item count is not updating in category page

texts:
We have added some of the products in one of the category. When we go to that category page, the item count is not updating. It always showing "1 Total Result". Please see the below screenshot once.

Could anyone please help me to resolve this?


texts: On the product page how would I display an attributes text value based on the value of another attribute?

texts:
I am looking to use one attributes value to display another attributes value.
 For example I would like the text value that is in attribute_weight to be displayed on the product page if attribute_group value is supersize.

I have the value in attribute_weight displayed, but it is all the time, I only want it to display if the attribute_group value is specifically supersized.

Here is the current code that has the weight attribute displaying on the product page for the associated products of configurables:

$product = Mage::getModel('catalog/product')->load($productId);
$prodWeight = $product->getData('weight');
$formattedWeight = Mage::helper('core')->getExactDivision($prodWeight, true, false);
if ($prodWeight) {
    echo 'Shipping Weight: '.$prodWeight.' lbs';
}


texts: MAGENTO 2 Checkout javascript not showing shipping address

texts:
i have a problem in the checkout with the Magento 2.1.6 version.

In the second step only the cart resume is showed and i have this error in the console:

Uncaught RangeError: Maximum call stack size exceeded
at jQuery.fn.init.init (jquery.min.js:2)
at new jQuery.fn.init (/pub/static/version1508932666/frontend/Soul/equiva/es_ES/jquery/jquery-migrate.js:225)
at jQuery.fn.init.p [as constructor] (jquery.min.js:2)
at jQuery.fn.init.pushStack (jquery.min.js:2)
at jQuery.fn.init.before (jquery.min.js:2)
at Object.wrapNode (/pub/static/version1508932666/frontend/Soul/equiva/es_ES/Magento_Ui/js/lib/knockout/template/renderer.js:292)
at node (/pub/static/version1508932666/frontend/Soul/equiva/es_ES/Magento_Ui/js/lib/knockout/template/renderer.js:334)
at /pub/static/version1508932666/frontend/Soul/equiva/es_ES/Magento_Ui/js/lib/knockout/template/renderer.js:222
at Array.some (<anonymous>)
at /pub/static/version1508932666/frontend/Soul/equiva/es_ES/Magento_Ui/js/lib/knockout/template/renderer.js:21

The only change was on pass from the development server to production one.


texts:
I want to add an additional field to the orders that are created by Recurring Profiles, the field is in the database in the table sales_recurring_profile in the order_info column. The field I want on the orders is called tm_field1 and it adds delivery instructions to the orders.
Looks like this in the db

 s:9:"tm_field1";s:20:"Leave somewhere safe";

If I look in

app/code/core/Mage/Sales/Model/Recurring/Profile.php

At the following

public function createOrder()

I can see the array is read by

$transferDataKays = array(
        'store_id',             'store_name',           'customer_id',          'customer_email',
        'customer_firstname',   'customer_lastname',    'customer_middlename',  'customer_prefix',
        'customer_suffix',      'customer_taxvat',      'customer_gender',      'customer_is_guest',
        'customer_note_notify', 'customer_group_id',    'customer_note',        'shipping_method',
        'shipping_description', 'base_currency_code',   'global_currency_code', 'order_currency_code',
        'store_currency_code',  'base_to_global_rate',  'base_to_order_rate',   'store_to_base_rate',
        'store_to_order_rate'
    );

Im guessing that just adding tm_field1 to the array is too easy and will need some additional code somewhere just not sure where?


texts: Child Products appearance for different websites in magento 2.3.2

texts:
I have 2 websites "Retail" and "Wholesale". I am using configurable products on both the sites.
For each configurable products, some child products are to be shown on Retail site and some on Wholesale site.
See https://prnt.sc/um8eyp
Now in frontend when i visit the retail and the wholesale website all the 3 child products are visible there.
In fact, i have selected proper website scope for them.
See https://prnt.sc/um8flv for 50 yards roll products which need to be visible only on wholesale site
See https://prnt.sc/um8fsz for yards product  which needs to be visible on retail site.
What is the solution for this?


texts: magento 2: create custom frontend input type

texts:
I need a custom frontend input type which I would call "table":

The issue at hand is that I have a customer that has a lot of different attribute sets with even more attributes. And he is in a constant need for more. Alls this only to describe the products in a tabular way. Giving him a html editor to create html tables is an absolute no go. This has been tried and the results were horrible (an unfixable html mess).

So my idea is to create ONE attribute (varchar) that gives the user a simple interface with x columns (to be defined) and an undefined number of rows. The user should be able to dynamically (javascript) add new rows as needed. The result should be json encoded and saved in one varchar field.

I picture the frontend a little bit like the customer group price:

I hope there is someone smarter than me that could point me into the right direction on how to go about this. I know all about creating modules and using plugins and so on. But this is a little bit beyond my skill so far.

Thanks for any insight.


texts: Get order collection last one year month wise

texts:
I need to get order collection of last one year, In which I have to show data month wise like

Jan - xxx(Orders)
Feb - xxx(Orders)


texts: Phantom sales_order_place_after event fired without order?

texts:
I have written a custom module which handles the export of new orders to a remote location.

The module has an observer set against the sales_order_place_after event and the function starts with the following log:

public function sendOrder(Varien_Event_Observer $observer)
{
    $order = $observer->getEvent()->getOrder();
    Mage::log('sendOrder() called for order #'.$order->getIncrementId(), Zend_Log::INFO, 'orders.log', true);

    ...
}

I have just noticed that there is a log of an order number for an order which does not exist in the system.

So my question is: How can this event fire without there being an order in the system?


texts: Is it possible to add custom data in magento 2 rest API?

texts:
I am using rest/all/V1/products/:SKU API for fetching product details.
Now issue I am facing is that i wanted to add one custom data in this API response.

I wanted to append "SellerID" custom data along with product details which I am getting from API.
I tried some solutions but not able to add it in the response.
Can any one help me to append seller id in product response ?


texts: Email template '' is not defined. in magento2

texts: when I am sending a mail error Email template '' is not defined.is coming


texts: Help connecting Magento to a third-party REST API

texts:
I need to update Magento products using a third party API.  What is the best method of doing so. Should I trigger an API call when an event/observer hits on product detail page? There is no OAuth yet, just normal hard coded token.

I see alot of documentation for using MAGENTO's API, but not a third-party API.


texts: How to use Magento 1.9.2.3 REST or SOAP API to get list of products - working example required

texts:
I'm a new to Magento API.
Tried this: https://stackoverflow.com/questions/40734545/how-to-get-product-info-using-rest-api-in-magento
but all I'm getting is a blank page.
Can anyone help or advice what should I do ?

Edited:

In the meantime I worked on it a bit and found that to make it work oauth php extension is required (so installed it).
Now I 'm getting a login screen which is a promising sign :)

SOAP is working fine.
Need REST example.


texts: Error while running Magento Migration Tool with 2.2.3

texts:
Trying to migrate Data from 1.9.3.8 to 2.2.3 I am running

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

Getting error

    [Exception]
    Notice: Undefined offset: 26 in /Applications/MAMP/htdocs/magentotest/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 291


texts: Magento Bundle with only one product available is impossible to buy

texts:
Magento 1.9.0.1 with RWD template

I have a Bundle product, Fruit Box.
I have three "real" product: watermelon, type1 melon and type2 melon.

In a Fruit Box i can add 2 single product, a watermelon and a type of melon. A simple box with two "hole".

I have only one type of Watermelon, so in the product page of bundle i haven't a radio input for this product, because is a mandatory product to have in the Fruit Box.

But i have two type of melons, type1 and type2. So in the bundle i see two radio inputs (selection is mandatory), for selecting which type of melon i can have in the Fruit Box.

Now melon type2 is out of stock.

In the product page of bundle now i see two row: one with the obvious watermelon and one with remained (type1) melon. In both rows i have no radio inputs, because obviously there is no longer a choice between products.

Now, when i click to "add to cart" a notice tell me that... i have to select a choice/option!

And so it is impossible to buy this bundle Fruit Box.

I see the code in magento/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml but i can't figure out where is the problem.

I think is related to the "if" inside the foreach that generate the radio inputs...

It seems that Magento still expects a radio input with a "checked" state... but we have no radio inputs here...

Can someone help me to find the problem? Thanks!


texts:
I added products to my cart, when i proceed to checkout, none of the steps open when i click on them, even if i begin by clicking on billing information.

how to un-stuck them ?


texts: Importing table rates "Invalid Region/State" [Magento]

texts:
in configuration system in payment method, i want to add shipment cost for a product based on destination, and then i added my country ID , Region/state ,... etc

when i import this file and click on save config i have this error


texts:
I am running 1.7.0.2 Magento and php 5.3.29, and for the past 2-3 days I've been getting the Deprecated Functionality warning

Deprecated functionality: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated

PHP Deprecated:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version.

I have 3 questions:

Why do these two warnings started to show up out of nowhere?
Is it necessary to fix these warning if the site function fine?
Can these warning break website if not fixed?


texts: How to add where clause or join condition to the shipment grid using ui component?

texts:
I managed to display the shipment core grid using ui component on another magento admin page. Right now I would like to filter it, to add more where clauses and join it MAYBE with other tables.

This is my di.xml:

<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
    <arguments>
        <argument name="collections" xsi:type="array">
            <item name="vendor_modulename_grid_data_source" xsi:type="string">Magento\Sales\Model\ResourceModel\Order\Shipment\Grid\Collection</item>
        </argument>
    </arguments>
</type>

Having the above I get a list of shipments. And I need to add a where clause , something like , where order status = {with something}.

I believe I need to use a virtualType for it, so I tried with:

<virtualType name="Magento\Sales\Model\ResourceModel\Order\Shipment\Grid\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
    <arguments>
        <argument name="mainTable" xsi:type="string">sales_shipment</argument>
        <argument name="resourceModel" xsi:type="string">path\to\my\custom\class</argument>
    </arguments>
</virtualType>

I 'm not sure if if having the file declared in the resource model: path\to\my\custom\class this part , is the correct approach.  Would you please advice how can I achieve this goal ?

Thnx in advance!