texts: Reports: Differences in File Systems and Databases between 1.9.2.4 and 1.9.3.1

texts:
If anyone is interested in finding out what are the changes between Magento CE 1.9.2.4 and 1.9.3.1 download the following archives:

Folder Comparison Report:
http://www.megafileupload.com/89dx/FolderComparisonReport.zip
Database Comparison Report:
http://www.megafileupload.com/89dm/DatabaseComparisonReport.zip

There are two html files with very nice visual results.


texts: do not display prices to users not logged

texts:
You must know how to hide prices to users not logged in, perhaps with a message prompting you to log in.

The theme I use is Universal


texts: Disabling product in specific store is disabling that product in all stores

texts:
I am creating multistore website in magento. I've created multistores and I am trying to disable product for specific store. I am doing it like this:

 1. In products page (admin), Filters -> Choose Store and apply filter
 2. Select product and change status to disable

Here is the screenshot:

My Stores Screenshot:

When i disable choosed product in specific store then it is disabling that product in all stores. Why? Even I've applied filter that i want to disable that product only in that specific store. Please help me.


texts: I want to insert a iframe to my domain page, when I iframe a magento home-page, I get blank page

texts:
I want to insert a iframe to my domain page, when I  iframe a magento home-page, i get blank page.
for example: my domain is www.a.com, I put this code on my page:

<iframe frameborder="no" style="height: 100%; width: 100%; top: 0px; bottom: 0px; position: absolute;" src="http://www.b.com"></iframe>

I want iframe the domain "b.com" content.  but I get a blank page.

additional: a.com is bulid in zencart,  b.com is build in magento.
I guess it is the cms Loading problem, but I do not know how to solve. Can you help me?

I asked somebody they only said that, the magento cms page can only load once，so when iframe a magento page I get a blank page.. I need to writte the magento cms-page code to the temple. Is it right?


texts: Call to a member function getId() on null - module-catalog/Helper/Product.php

texts:
I added sample data to my magento2 website, but when I want to access to a product I always get this error :

  Fatal error: Uncaught Error: Call to a member function getId() on null
  in
  /var/www/html/test/vendor/magento/module-catalog/Helper/Product.php:313
  Stack trace: #0
  /var/www/html/test/vendor/magento/module-catalog/Helper/Product.php(430):
  Magento\Catalog\Helper\Product->canShow(NULL) #1
  /var/www/html/test/vendor/magento/module-catalog/Helper/Product/View.php(263):
  Magento\Catalog\Helper\Product->initProduct(1562,
  Object(Magento\Catalog\Controller\Product\View\Interceptor),
  Object(Magento\Framework\DataObject)) #2
  /var/www/html/test/vendor/magento/module-catalog/Controller/Product/View.php(118):
  Magento\Catalog\Helper\Product\View->prepareAndRender(Object(Magento\Framework\View\Result\Page\Interceptor),
  1562, Object(Magento\Catalog\Controller\Product\View\Interceptor),
  Object(Magento\Framework\DataObject)) #3
  /var/www/html/test/vendor/magento/framework/App/Action/Action.php(108):
  Magento\Catalog\Controller\Product\View->execute() #4
  /var/www/html/test/vendor/magento/framework/Interception/Interceptor.php(58):
  Magento\Framewor in
  /var/www/html/test/vendor/magento/module-catalog/Helper/Product.php on
  line 313

The Product.php code :

public function canShow($product, $where = 'catalog')
    {
        if (is_int($product)) {
            try {
                $product = $this->productRepository->getById($product);
            } catch (NoSuchEntityException $e) {
                return false;
            }
        } else {
       /*313*/     if (!$product->getId()) {
                return false;
            }
        }
        return $product->isVisibleInCatalog() && $product->isVisibleInSiteVisibility();
    }

when I var_dump($product) it's return NULL

Product.php class code : https://snipsave.com/saadsaad/#/snippet/iDIEafixLtWgzWO9sK

is there any solution?


texts: Homepage 404 page not found after removing .html suffix in Magento 2.3

texts:
I have Magento 2.3 installation on Nginx server.
I removed .html suffix from configuration by going to

System > Config > Catalog -> Catalog -> Search Engine Optimization

Now the categories and products are opening on frontend without html but homepage shows 404 page not found

I tried clearing all the cache, reindexed all the indexes, deployed static content with no luck.

Do I have to change any Nginx setting to make it work?


texts: adding a new block with overwritten class fails

texts:
I have created a new module (to extend checkout):

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

I want to extend from the success page:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Checkout\Block\Onepage\Success"
                type="Vendor\Module\Block\Checkout\Onepage\Success"/>
</config>

And use that class in checkout.success instead of the original success class plus changing to my own success template:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.success" remove="true" />
        <block class="Vendor\Module\Block\Checkout\Onepage\Success"
               name="checkout.success"
               template="Vendor_Module::success.phtml"
               cacheable="false"/>
    </body>
</page>

The result is a checkout success page loading just fine. Yet the checkout.success block just won't render.

I have to do this to get it to work:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.success">
            <action method='setTemplate'>
                <argument name='template' xsi:type='string'>Vendor_Module::success.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>

Okay so I get setting the preference for the original success class will obviously make Magento take my new class for the template too.

What I do not get is why my original attempt won't work and why with this the block won't render at all.
If I leave out the class attribute in the xml definition for the template. Magento will run into an error because it then tries to load an empty string as a class name. (which of course fails)
The class just extends from the original class and within that class is currently nothing that would prevent it from loading. In fact, the class is never loaded itself at all (checked with xdebug).

namespace Vendor\Module\Block\Checkout\Onepage;

use Magento\Directory\Model\Currency;
use Magento\Sales\Api\Data\OrderPaymentInterface;

class Success extends \Magento\Checkout\Block\Onepage\Success
{
    private $order;

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Checkout\Model\Session $checkoutSession,
        \Magento\Sales\Model\Order\Config $orderConfig,
        \Magento\Framework\App\Http\Context $httpContext,
        array $data = [])
    {
        parent::__construct($context, $checkoutSession, $orderConfig, $httpContext, $data);
        /** @var \Magento\Sales\Model\Order $order */
        $this->order = $this->_checkoutSession->getLastRealOrder();
    }

    // ...

PS: I run Magento in developer mode with symlinked sources and clear the cache and everything before I load the page.


texts: Magento 1.9.2 - Accessing an External Database an another domain

texts:
On my site with Magento installed, I can't call up the database that is present on another domain. I wish I could have one database for multiple sites with Magento.

How can I retrieve the database with my site with Magento which is present on another domain?

Thanks so much for any help.


texts: Custom Backend Timezone for Store Views or Users

texts:
We have a multi-store setup with different countries.
It looks like in the backend always the timezone is used which is configured for the Default Config scope at System -> Config -> General -> General -> Locale Options.

Is there a way to use the timezone of the specific country?


texts:
I have to apply custom tax by customer wise.

For example from Admin attribute is given to apply customer  wise tax or not.

If this option is enabled than apply additional 10% tax to customer.

I have added attribute to the customer in Admin side, but not getting solution to add customer wise tax.

Please give me some suggestion or help.


texts:
I've been using Magento 2 to do some theme development and I'm wracking my brain trying to find documentation for block classes.  I've been digging through Block folders and stuff.  I'm wondering if there's any documentation for the module Block classes.

Example:
 I needed to know how to get description from product.  I basically had to dig around to see how it was being done for another block and copy
Magento\Catalog\Block\Product\View to the block.  Is there anywhere I can find the methods of this class?

Thanks for any and all help.


texts:
I am freaking out- as all things I am about to launch our Magento in 2 days. I made some minor changes in the XML files and updated the logo through our FTP. Came back and recached- everything looked great and working...

2 hours later I am updating the social icon links and refresh the cache...Now it looks as if my whole site's template or CSS is missing! Someone please help! I don't know what to do to try to resolve this issue!

http://market.matthewsenvironmentalsolutions.com

Thank you so much!


texts: Best way to Version Control whole Magento store

texts:
We are currently trying to implement a good version control system for our company with 3 Magento web-stores.

These websites will be kept in three separate repositories on local server.

We were previously using Mercurial with the Tortoisehg application, however we found that it was far too slow for our needs.

So I have recently decided to switch to GIT with the GITKraken application. However it is so slow I am struggling to even set it up.

The size of each web-store is around 65,000 files, could that be a problem?

1) What is the best way to Version Control a Magento application?

2) Whats the maximum files you would recommend in one repository, we don't want to be having one application over a number of Repos.

Our workstations has a high end i7 and 16GB RAM and our computers are connected to our local server with 1gbps ethernet so I do not think that our hardware is the issue here.

I found this thread Version control for Magento but that didn't really help me solve the issue of really slow version control application.


texts: Magento 2.3.5 Migration trigger error and log_bin_trust_function_creators=1

texts:
I'm trying to migrate from Magento 1.9.3.2 to Magento 2.3.5-p1.
My Magento software and Magento Database are installed in diferents servers.
I have followed every step in the migration process.
In Addition I have the line log_bin_trust_function_creators=1 in my.cnf file.
And, grant SUPER privilege to Magento 2 data base user.
But, this error is still remain when I try to migrate data from Magento 1 to Magento 2

     SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege (you *might* want to use the less safe log
  _bin_trust_function_creators variable), query was: CREATE TRIGGER trg_catalog_compare_item_after_insert AFTER INSER
  T ON catalog_compare_item FOR EACH ROW
  BEGIN
  INSERT INTO m2_cl_catalog_compare_item (`catalog_compare_item_id`, `operation`) VALUES (NEW.catalog_compare_item_id
  , 'INSERT')ON DUPLICATE KEY UPDATE operation = 'INSERT';
  END

Somebody have any idea why is this error still there?
Thanks.


texts: Custom payment gateway order getPayment returns null

texts:
I'm developing a custom payment gateway. The payment flow uses an iframe to process the payment, and the result is sent by a request to a custom URL. I've succeeded in displaying my custom payment method, with the iframe. But when receiving the request notification, and trying to update the order status, I get the following error:

  Call to a member function getMethodInstance() on null in
  /vendor/magento/module-payment/Observer/SalesOrderBeforeSaveObserver.php:24

I'm using PayPal module as reference. I'm using its set-payment-method action. But it seems that when calling:

$this->order->loadByIncrementId($orderId);
var_dump($this->order->getPayment());

The method returns NULL, and it's needed in the SalesOrderBeforeSaveObserver.

I've also tried using the set-payment-information action, but then I get an error with message "The payment method you requested is not available." in the API response.

I'm using magento 2.1.2

Any help on on how to solve this or which steps should I follow for this kind of integration will be greatly appreciated.


texts:
I have created a module Vendor/Module I have added sql setup script in it. The module is working fine.

Now I need to alter table and add come more columns in the table. To do this I need to add new sql setup script and Update my module version.

Can anyone help me out on this? How can I do this?


texts: How to know that function is getting value form which file(model or class)

texts:
I am a little confused here I didn't understand what is this.

I have a .phtml file in which there is a function say $this->getArticle() when I print this it show the array of the data's stored in the database.

Then I have a function call like this $this->getArticle()->getId(), $this->getArticle()->getContentHtml() these shows the values which is inside the array as the under the same name as database field i.e id and content_html.

I understand till now.

But in the next line there is another function call like this $this->getArticle()->getCategories() It is returning the categories inside the my article array. But what I didn't understand is that from where is this getArticle() calls the value.
I dont have categories as an database field name.

In my class file I have a function defined as function getArticle() but there is no function named as getCategories.

Then I checked my model file and there I find the function getCategories which is actually returning the category values.

So the question is that, in the first two statement the the function is called from the class file while in the last one the same function getArticleis calling the model file and the next is the function in this file. how is this happen.

What is the logic behind this I didn't understand the flow here when to get value from model and when from class.


texts: Translate in Araic language Magento 2.3.3

texts:
Product Name, Description and Layerd Navigation not Translate In Arabic Language.

Using Arabic Language Pack Install Language Pack.

  1. Product Name

  2. Product Description

  3. Layerd Navigation


texts: can't get 'scope' value from core_config_data table

texts:
I need to make an sql sentence where i retrieve records filtered by 'scope' value from core_config_data table. This is the script:

$query = "SELECT * FROM  `core_config_data` WHERE  `scope` = $scope";

I get $scope with this line:

$scope = Mage::getSingleton('adminhtml/config_data')->getScope();

But when i run this, i receive an error saying:

An error occurred while saving this configuration: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'stores' in 'where clause'

When i run the same sql sentence in phpmyadmin, it works fine and it retrieves the correct record, so i don't know what's wrong here.

Thanks for helping


texts: How to check repeat customers in Magento?

texts: Need a data which shows the name of the repeat customer and total purchase made by her/him in Magento backend.


texts: Magento 2.2 something went wrong with the subscription

texts:
When customer tries to subscribe, magento return error something went wrong with the subscription. How can i fix it?
Mail function works on server correctly.


texts:
I installed Varnish, but getting this message. Varnish cache not working.
And check the var/page_cache/ directory is not empty.still have mage-tags file.

i have in System > Full Page Cache > Setting >
Access list:11.22.133.44
Backend host:11.22.133.44
Backend port:80
Grace period:300.
My whm setting Apache IP/port:8080.

My /etc/varnish/varnish.params

# Varnish environment configuration description. This was derived from
# the old style sysconfig/defaults settings

# Set this to 1 to make systemd reload try to switch VCL without restart.
RELOAD_VCL=1

# Main configuration file. You probably want to change it.
VARNISH_VCL_CONF=/etc/varnish/default.vcl

# Default address and port to bind to. Blank address means all IPv4
# and IPv6 interfaces, otherwise specify a host name, an IPv4 dotted
# quad, or an IPv6 address in brackets.
VARNISH_LISTEN_ADDRESS=11.22.133.44
VARNISH_LISTEN_PORT=80

# Admin interface listen address and port
VARNISH_ADMIN_LISTEN_ADDRESS=11.22.133.44
VARNISH_ADMIN_LISTEN_PORT=6082

# Shared secret file for admin interface
VARNISH_SECRET_FILE=/etc/varnish/secret

# Backend storage specification, see Storage Types in the varnishd(5)
# man page for details.
VARNISH_STORAGE="malloc,4096M"

# User and group for the varnishd worker processes
VARNISH_USER=varnish
VARNISH_GROUP=varnish

# Other options, see the man page varnishd(1)
DAEMON_OPTS="-a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,4096m -p thread_pool_min=5 -p thread_pool_max=500 -p thread_pool_tim$$ol_timeout=300"

my /etc/varnish/default.vcl is follow this file:
https://gist.github.com/dvershinin/de91aa78a96ae9f6e8d2950b3e1463a4

backend default {
    .host = "11.22.133.44";
    .port = "8080";
}

acl purge {
    "11.22.133.44";
}

please help. thank you very much~

curl -I -v --location-trusted 'http://demo.xxx.com'
* About to connect() to demo.xxx.com port 80 (#0)
*   Trying 11.22.133.44...
* Connected to demo.xxx.com (11.22.133.44) port 80 (#0)
> HEAD / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: demo.xxx.com
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Date: Mon, 22 Oct 2018 09:06:53 GMT
Date: Mon, 22 Oct 2018 09:06:53 GMT
< Pragma: no-cache
Pragma: no-cache
< Cache-Control: max-age=0, must-revalidate, no-cache, no-store
Cache-Control: max-age=0, must-revalidate, no-cache, no-store
< Expires: Sun, 22 Oct 2017 09:06:53 GMT
Expires: Sun, 22 Oct 2017 09:06:53 GMT
< X-Content-Type-Options: nosniff
X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN
X-Frame-Options: SAMEORIGIN
< Set-Cookie: PHPSESSID=bcf54440a844d3de2256cb07e54c268a; expires=Mon, 22-Oct-2018 10:06:53 GMT; Max-Age=3600; path=/; domain=demo.xxx.com; HttpOnly
Set-Cookie: PHPSESSID=bcf54440a844d3de2256cb07e54c268a; expires=Mon, 22-Oct-2018 10:06:53 GMT; Max-Age=3600; path=/; domain=demo.xxx.com; HttpOnly
< X-UA-Compatible: IE=edge
X-UA-Compatible: IE=edge
< Content-Type: text/html; charset=UTF-8
Content-Type: text/html; charset=UTF-8
< X-Host: demo.xxx.com
X-Host: demo.xxx.com
< X-Magento-Cache-Control: max-age=0, must-revalidate, no-cache, no-store
X-Magento-Cache-Control: max-age=0, must-revalidate, no-cache, no-store
< Content-Encoding: gzip
Content-Encoding: gzip
< Vary: Accept-Encoding
Vary: Accept-Encoding
< Age: 0
Age: 0
< X-Magento-Cache-Debug: MISS
X-Magento-Cache-Debug: MISS
< Connection: keep-alive
Connection: keep-alive

<
* Connection #0 to host demo.xxx.com left intact


texts: Confirm magento 2 email programmatically

texts:
I set the configuration for Magento 2 customer to do email confirmation after register and change e-mail, is there a way to confirm customer e-mail programmatically only by customer id or customer e-mail?

$customerId = '35';
$customerEmail = 'test@test.com';
$this->confirmCustomerEmailByCustomerId($customerId);  //how ?
$this->confirmCustomerEmailByCustomerEmail($customerEmail); //how ?


texts: Magento 2: Create NOT CAPTURE Invoice after Authorize Payment using Braintree

texts: I'm using Magento 2.3.4 and Braintree as payment method, i set the payment action configuration to Authorize only, after checkout using this payment method i need to generate a NOT_CAPTURE invoice automatically, is there a setting to do this? or is there a way to do it programmatically?


texts: No graphics after update from CE1.7 to CE1.9

texts:
I am trying to update our web site to 1.9. I created a new fresh install on a new host, copied all the necessary files and the database. When I try to connect to the new site I see only text on white background. No colors, no graphics, just text and links.

What did I do wrong?

problem solved. I forgot to add a "/" at the end of the path on core_donfig_data


texts: How to inject dependencies on class extend

texts: can somebody explain when I extend another Block what is the way to inject dependencies? For example my Block is extending ListProduct


texts: Magento 2.3 sort categories alphabetically

texts:
I want to sort the categories in a Magento 2.3.1 install in alphabetical order (on the frontend!). I'm aware of the fact that you can sort it by dragging it in the Magento admin panel. But since the store I'm working on has more than 3000 categories, that's not an option. The categories also update from time to time, so it has to be a "future proof" solution.
Does anyone have an idea how to solve this? The only things I can find are for M1.


texts: Want an existing report to be in a different menu area

texts: I am trying to get the report here "admin/report_sales/sales" to be duplicated under my custom menu area.  How should I do this as simply as possible?  Should I create a menu item, then use a redirect? Do I actually have to use a controller to redirect?


texts: Magento 2.3.2 : how can i add notice below street field in shipping address on checkout page

texts:
In our case, we will always have two input fields for street address. I want to add notice below the 2nd input field of street. I have override layoutProcess file and just like given in below link, it is adding notice to every input field except street.

Magento 2 : how can i add notice below state/province field in shipping address in checkout page

I have tried following so far:

$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
            ['shippingAddress']['children']['shipping-address-fieldset']['children']['street[1]']
            ['notice'] = __('This is my custom notice.');

$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
            ['shippingAddress']['children']['shipping-address-fieldset']['children']['street']
            ['notice'] = __('This is my custom notice.');

$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
            ['shippingAddress']['children']['shipping-address-fieldset']['children']['street.1']
            ['notice'] = __('This is my custom notice.');


texts:
Can anybody help me to provide the complete process of making my custom module install able and update able using composer.

I am using my custom bit bucket repository to upload my code base of extension.

Please provide complete steps


texts:
we have a complex shop structure with an multishop base theme from scratch and about 10 child themes.

The structure is as follows:

multishop_theme/
default (main theme content)
child theme 1 (other css, layout ...)
child theme 2
child theme 3,4,5,6,7 and so on

Now we want to add other shops that are not based on our multishop_theme but we want to share some defaults (payment templates, customer, checkout), so that we dont repeat ourselves. What is the best structure in this case?

multishop_theme/
default
child
child
default/default
singleshop_themes/
theme 1
theme 2

So the multishop_theme/default is based on default/default, and the multishop childs are based on multishop_theme/default.

The new shops are based on default/default too. What do you recommend?

Best regards


texts: Installation & Varnish Test Results Failed on magento marketplace

texts:
Installation & Varnish Test Results Failed on Magento Marketplace

composer.json
{
    "name": "vendor/preorder",
    "description": "Pre Order",
    "type": "magento2-module",
    "version": "2.0.0",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "require": {
       "php": "~7.1.3||~7.2.0||~7.3.14||~7.3.0||~7.3.1||~7.3.2||~7.3.3||~7.3.4||~7.3.5||~7.3.6||~7.3.7||~7.3.8||~7.3.9||~7.3.10||~7.3.11||~7.3.12||~7.3.13"
    },
    "extra": {
        "installer-paths": {
            "app/code/Vendor/Preorder": ["vendor/preorder"]
        }
    },
    "autoload": {
        "files": ["registration.php"],
        "psr-4": {
            "Vendor\\Preorder\\": ""
        }
    }
}

[Composer\Downloader\TransportException]
The "https://repo.magento.com/packages.json" file could not be downloaded (HTTP/1.1 500 Internal Server Error)
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] []...


texts: Restrict Cash on delivery based on Country under shipping method

texts: I want to restrict COD based on country we select under billing address in checkout page


texts: Magento randomly redirects to hostname/index.php/install/

texts:
My Magento website is acting strangely.

Here is what happen this morning when I tried to log in to the backend this morning. I opened up the homepage and everything came up fine. I went to the backend and got the login page. After logging in though I am redirected to the Magento's Installation Wizard page. I clear my cache and sessions under /var and the process repeats. It happens randomly now. For example, if I go my about us page it works fine, but then I go to contact us and it goes to the installation page.

Any ideas anybody?

My site is not live. The last thing I remember doing was importing products using Magmi and I adding a web reference to a visual studio project.

Error logs are turning up no results because the redirect is not considered an error.

It seems like my local.xml is readable, but at some point, during usage of my site it becomes unreadable and requires the session and cache to be cleared.

Update:

I believe I found the error message that triggered this bug.

[Mon Jul 21 16:19:12 2014] [error] [client 10.0.0.115] PHP Warning:  SoapServer::SoapServer(): I/O warning : failed to load external entity "http://hostname.com/index.php/api/soap/index/?wsdl=1&wsdl%2F_vti_bin%2FListData_svc%2F%24metadata=" in /var/www/html/lib/Zend/Soap/Server.php on line 811

What I forgot to mention before is that I ran into this bug a few weeks ago. However, the bug managed to fix itself so I thought nothing of it. But I checked the error log from last week when this bug appeared and this is the error.

[Wed Jul 09 13:41:40 2014] [error] [client 10.0.1.33] PHP Warning:  SoapServer::SoapServer(): I/O warning : failed to load external entity "http://hostname.com/index.php/api/index/index/?wsdl=1" in /var/www/html/lib/Zend/Soap/Server.php on line 811

Maybe this will help.

Udate

Found this on the forums.

http://www.magentocommerce.com/boards/forum/viewthread/512408/

Problem with this is I don't have an old cache folders or sessions


texts: Backend fatal error when making a invoice

texts:
Now that the web store is almost ready, I am investigating how the processing of orders goes.

When I go to sales - orders - promotion - view, I come to the order.
Then I go to invoice (at the top of the screen) scroll down, and click on invoice entry.

Then I get an error message:

[Mon Apr 15 19:24:54.184279 2019] [lsapi:error] [pid 810902:tid 140179756345088] [client 185.217.171.22:56800] [host www.orionyx.org]
Backend fatal error: PHP Fatal error:  Uncaught TypeError: Return value of Magento\\InventorySourceSelection\\Model\\Request\\InventoryRequest::getItems() must be of the type array, null returned in /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/module-inventory-source-selection/Model/Request/InventoryRequest.php:102
Stack trace:
#0 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/module-inventory-source-selection-api/Model/Algorithms/Result/GetDefaultSortedSourcesResult.php(110): Magento\\InventorySourceSelection\\Model\\Request\\InventoryRequest->getItems()
#1 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/module-inventory-source-selection/Model/Algorithms/PriorityBasedAlgorithm.php(73): Magento\\InventorySourceSelectionApi\\Model\\Algorithms\\Result\\GetDefaultSortedSourcesResult->execute(Object(Magento\\InventorySourceSelection\\Model\\Request\\InventoryRequest), Array)
#2 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/module-inventory-source-selection-api/Model/SourceSelectionService.php in /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/module-inventory-source-selection/Model/Request/InventoryRequest.php on line 102,
referer: https://www.orionyx.org/admin/sales/order_invoice/new/order_id/2/key/8fb69961f679934e4fe53733a11bb9c0e44c5288a860475eb8d7f43e7d067442/

I don't understand this at all.

Can someone explain to me what happened here and how I could solve this?

Sincerely!


texts: Use saved credit card information for authorize.net

texts: In magento when we place order by using payment method authorize.net. The credit card information entered saved into the database. Next time when same customer wants place order then saved credit cards should show on checkout payment page.  customer should use it so that no need to retype again. Customer should manage this credit card information from my account section. Any idea how can do this? Any extension available?


texts:
I'm trying to make a preference to override the PayPal Module's ResponseValidator class, so that i can save the validation errors for easier debugging on our end if a customer's checkout fails.

The problem is, magento just doesn't seem to want to respect my preference code.

My module/etc/di.xml looks like this:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Paypal\Model\Payflow\Service\Response\Validator\ResponseValidator" type="Acme\Module\Plugin\Validators\ResponseValidatorOverride"/>

</config>

And my ResponseValidatorOverride class looks like this:

<?php
namespace Acme\Module\Plugin\Validators;

use Magento\Paypal\Model\Payflowpro;
use Magento\Framework\DataObject;
use Magento\Paypal\Model\Payflow\Transparent;
use Magento\Framework\Exception\LocalizedException;
use Psr\Log\LoggerInterface;
use Magento\Customer\Model\Session;

class ResponseValidatorOverride extends \Magento\Paypal\Model\Payflow\Service\Response\Validator\ResponseValidator
{
    /** @var LoggerInterface logger*/
    protected $logger;
    /** @var  Session session */
    protected $session;

    public function __construct($validators, LoggerInterface $log, Session $session)
    {
        parent::__construct($validators);
        $this->logger = $log;
        $this->session = $session;
    }

    /**
     * Validate data
     *
     * @param DataObject $response
     * @param Transparent $transparentModel
     * @return bool
     * @throws LocalizedException
     */
    public function validate(DataObject $response, Transparent $transparentModel)
    {
        xdebug_break();
        $message = $response->getData('respmsg');
        $this->logger->debug('Validate: ' . var_export($response->toArray(), true));
        switch ($response->getResult()) {
            case Payflowpro::RESPONSE_CODE_APPROVED:
            case Payflowpro::RESPONSE_CODE_FRAUDSERVICE_FILTER:
                foreach ($this->validators as $validator) {
                    if ($validator->validate($response, $transparentModel) === false) {
                        $this->logger->debug('After Validate: ' . var_export($response->toArray(), true));
                        if(isset($this->session)){
                        $this->session->setData('CUSTOMER_LAST_PAYMENT_ERROR_INFO', array(
                            'message' => $message,
                            'last_four' => $response['ACCT'],
                            'cardholder' => (isset($response['BILLTONAME']) ? $response['BILLTONAME'] : 'Unknown Customer.')
                        ));
                    }
                        throw new LocalizedException(__('??????'));
                    }
                }
                break;
            case Payflowpro::RESPONSE_CODE_INVALID_AMOUNT:
                break;
            default:
                xdebug_break();
                throw new LocalizedException(__('Transaction has been declined'));
        }
    }
}

I've tried clearing all the var/di, var/generation, etc, and recompiling, and all that fun stuff, as one would expect

I've confirmed it never even runs my code, because when i run xdebug and step through a payment, the default ResponseInterceptor gets used.

So I thought maybe it was because the class was manually initialized somewhere, not given via DI, and thus a preference wouldn't work, so I tracked down where the ResponseInterceptor is given, and it's actually created via DI.

I confirmed the mapping existed by checking in /var/di/global.ser, so I know it's telling the DI about the preference

I also tried switching between development and production modes, to see if that made any difference, and it didn't.

Does anyone have any ideas as to what could be causing this?


texts: Magento 2 : How to Debug Which Extension is Causing Early Session Timeout or Logout of Admin

texts:
I have a problem in admin section where I frequently get logged out at random intervals of time.

One thing that I am assured is that one of my extension is causing trouble but I could not find way to debug which extension does that.

I referred Alan storm's article on early session timeout which was quite helpful, but still could not figure out any solution to this problem.

So basically, is there a way to debug this case.


texts: How do I add an item size attribute to a product and make sure it's visible on search

texts:
I have a standard Magento 1.9 store with ~22000 products and use the default theme without customisations.

What I want to do is add item size information to a product. The item size may differ per product. For a yellow bell pepper it's going to be "each". For Ruffles Original party size potato chips it's going to be "13.5 oz".

I would like it to look like this:

My question has two parts:

What is the best way to add this type of attribute to a product?
How do I make sure it's visible in the search results when people search for a product?


texts:
Currently, orders that are being placed through Credit/Debit Card come through on Magento with the 'Total Due' field being populated. However, I would like the 'Total Paid' field to be populated instead. I have attached a test order which I performed using a Debit Card..
Please note that we also accept PayPal and these orders have the 'Total Field' populated.
The reason why I would like this field to be showing the correct amount is so the orders get read by our stock system when importing the orders.
Is this possible? Any help/advice would be greatly appreciated!
Thank you.


texts: How to change the number of items per row in products grid?

texts:
How to modify magento 2 to show 3 items per row in product grid instead of the default 4?

I tried to play with /var/www/magento2/vendor/magento/theme-frontend-luma/Magento_Catalog/web/css/source/module/_listings.less but nothing changed.

I've restarted apache2... I have flushed magento2 cache ... I have deleted all folders under /magento2/var/cache ... but still showing 4 items per row!!!

Any suggestions?


texts:
When selecting a swatch and adding an item to the bag the master product image is shown in the minibag. We would like the image of the selected swatch to be the thumbnail. Is there a script to do this?

Magento 2.1.11


texts: Which API url to get all categories list in Magento 1.9?

texts: Need API url to get all categories in magento 1.9


texts: Access Denied Error in Admin Panel - Cart Mart (Multivendor Marketplace) - Magento 1.9.X

texts:
I am getting access denied error for 3 Tabs in admin panel.

    <acl>
        <resources>
            <admin>
                <children>
                    <vendor>
                        <title>Vendor</title>
                        <children>
                            <orders>
                                <title>Orders</title>
                            </orders>
                            <transaction>
                                <title>Transactions</title>
                            </transaction>
                            <review>
                                <title>Reviews</title>
                            </review>
                        </children>
                    </vendor>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <cartmart>
                                        <title>Cart Mart Section</title>
                                    </cartmart>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>


texts: After upgrade Magento 2.4.1 not redirect on success page after place order

texts:
After upgrade Magento 2.4.1
We are getting issues on the checkout page.
Redirect on back to cart page after place an order instead of the success page.
Order look fine in the admin panel.
And not get any error at the frontend but the only issue is not redirecting on the success page after place an order.
Already tried with basic Magento command like an upgrade, deploy, flush cache etc...


texts: How to prevent access of web folder from browser in magento

texts:
When I visit URL of my Magento store like http://www.example.com/skin/frontend/default/ then it shows all sub-folder listings on browser like shown in below image-

How can I prevent them from showing like this ?


texts: How to set the additional_attribute column value in Magento2 during import

texts:
How to get the additional_attributes columns values from Product export in Magento2.

For eg: if I want attributes like color, manufacturer, i have set the color attributes as Filterable with results and assigned some values in admin, but when i export the csv, i get this column blank.

And also while import if i set color=White for that column, where does the value reflect in admin.


texts: update product inventory and and price by attribute

texts:
I need to write a cron job to update my products inventory and price hourly.

The variables are these.

I have 6000 products with their own IDs which my accounting system uses (not magento).

These 6000 turn into 31,000 products. The reason for this is they are car parts, so a Mazda 3 may use the same part as a Honda civic, users on my site will be searching by make, model, and year (all attributes). The only way I could figure out how to do this by importing 31,000 different parts (so they have 31,000 magento IDs).

So I have also imported my accounting system ID as an attribute (my_part_id) which all products have.

So I would like my cron to search for all products which have my_part_id and update the qty and price.

Can someone please point me in the right direction to get this done? I am very comfortable using PHP and MYSQL, I just don't fully understand the Magento Database yet and don't want to mess up any table relationships that I don't know about.


texts: Uncaught Error: Call to undefined method Magento\\Catalog\\Model\\ResourceModel\\Product\\Interceptor::_construct()

texts:
I am getting the following error in my Magento application sometimes, it's not breaking the application always but in regular interval I am getting this error.

The application CPU usage is also going high sometimes. Application is using redis for both caching and session. Database is AWS Aurora.

  [Tue Jul 16 15:41:41.849749 2019] [:error] [pid 6506] [client
  10.101.8.81:26870] PHP Fatal error:  Uncaught Error: Call to undefined method
  Magento\Catalog\Model\ResourceModel\Product\Interceptor::_construct()
  in
  /mnt/drive1/www/magento-2019-07-08-06-50-51/vendor/magento/framework/Model/ResourceModel/AbstractResource.php:40\nStack
  trace:\n#0
  /mnt/drive1/www/magento-2019-07-08-06-50-51/vendor/magento/module-eav/Model/Entity/AbstractEntity.php(234): Magento\Framework\Model\ResourceModel\AbstractResource->__construct()\n#1
  /mnt/drive1/www/magento-2019-07-08-06-50-51/vendor/magento/module-catalog/Model/ResourceModel/AbstractResource.php(51):
  Magento\Eav\Model\Entity\AbstractEntity->__construct(Object(Magento\Eav\Model\Entity\Context),
  Array)\n#2
  /mnt/drive1/www/magento-2019-07-08-06-50-51/vendor/magento/module-catalog/Model/ResourceModel/Product.php(130):
  Magento\Catalog\Model\ResourceModel\AbstractResource->__construct(Object(Magento\Eav\Model\Entity\Context),
  Object(Magento\Store\Model\StoreManager),
  Object(Magento\Catalog\Model\Factory), Array)\n#3
  /mnt/drive1/www/magento-2019-07-08-06-50-51/generated/code/Magen in
  /mnt/drive1/www/magento-2019-07-08-06-50-51/vendor/magento/framework/Model/ResourceModel/AbstractResource.php
  on line 40,

Another similar error

  PHP Fatal error:  Couldn't execute method
  Composer\Autoload\ClassLoader::composer\autoload\classloader::loadclass\x03
  in Unknown on line 0, referer:


texts: Where I can modify Magento search query?

texts:
In magento2 I want to change the catalog search query of the frontend.

In particular, when there are multiple words in search query I would search with AND instead of OR. Example "red apple" not "red" and "apple".

Which file should I change?


texts: Make a module that allows admins to upload file to web dir, from administration area?

texts:
I am new to magento2, and I was put on a task to make a new section, or to somehow allow admins to upload a file from administration area, and save it to web folder, always under same name. File is in .csv format

Any ideas on how to do this? So far I've only done frontend in magento, and Im lost here. Tried googling, but solutions I found did not work.

Thank you for your help and patience.


texts: How to add a input mask on any checkout field?

texts:
I've been searching for a way to adds masks in some checkout input fields, I found this, but without answers, I want to add pt_BR mask on the telephone field.

Is there some way to use Jquery Mask Plugin, or something like, on Magento 2 checkout fields?

Thanks in advance.


texts: Magento2.1.0 showing error Required parameter 'theme_dir' was not passed while saving product in admin

texts: I am facing this error Required parameter 'theme_dir' was not passed when i try to save the product in admin. I checked the theme configuration it was assigned to the stores. Recently i have upgraded from 2.0.7 to 2.1.0.Also i have checked the theme directory registration.php file exists. Anyone came across this issue.


texts: magento jquery-1.10.2.min blocking other script files

texts:
Am using magento 1.9.3, i creating custom file called declaration.

In declaration page am adding

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

This script blocking some function. Like ajax cart, mouse hover menu expand, ect...

How can i fix this issue.


texts: image keeps loading after image select in admin grid in magento2

texts:
hello everyone I am uploading an image in admin grid after selecting the image the image keeps loading and nothing change
screenshot

code to save image

public function modifyData(array $data)
{
    $items = $this->collection->getItems();
    /** @var $image \Turiknox\SampleImageUploader\Model\Image */
    foreach ($items as $image) {
        $_data = $image->getData();
        if (isset($_data['image']) && $_data['image'] != '') {
            $imageArr = [];
            $imageArr[0]['name'] = $image->getImage();
            $imageArr[0]['url'] = $image->getImageUrl();
            $_data['image'] = $imageArr;
        }
        $image->setData($_data);
        $data[$image->getId()] = $_data;
    }
    return $data;
}

ref:


texts:
how i can customize magento 2 PWA studio

and

which best for use PWA with magento 2

  1)Venia concept (PWA studio by Magento)

  2)Scandipwa

  3)Vue storefront


texts: How can I go about aborting an email (sent via SMTPPro) from the success.phtml page?

texts:
I've been working, for a bit now, on an addition (to success.phtml) to abort emails that are being sent to one particular domain, upon a successful sale.  This is due to the aforementioned specific sales coming from an external referral, and the referrer wanting to handle the email contact with the end consumer exclusively.  The system that I am trying to implement this on is a Magento 1.9.x CE instance, utilizing (as mentioned in the question title) Aschroder's SMTPPro for email.

Now that I've successfully tied into the aschroder_smtppro_template_before_send event, and managed to learn to traverse the order's data structure enough to determine whether or not the email is going to the specified domain, I'm at a bit of a loss for how to go about aborting the email, while continuing on to a successful sale.

I would be very grateful for any pointers to some good information on methods that I might utilize in order to accomplish this.  Personal experience, any ideas that might be helpful are very much appreciated.  I'm having a very difficult time digging up much useful documentation on this.

Thanks for your time and consideration.

-Damon


texts: Magento 2 Free Shipping Rules not Applying to FedEx

texts:
Magento 2.2.3

We use only FedEx for shipping. FedEx shipping is setup and working fine, rates are being calculated correctly.

We want customers to be able to receive free shipping on orders over $50

Wholesale customers get free shipping on orders over $300

I set up the cart price rules. However, they are not being applied to FedEx, instead of $0, FedEx is still calculating a shipping price. I enabled flat rate shipping and the cart rules are correctly being applied to flat rate shipping, shows $0 if order is over $50. Both free table rate and FedEx rate show, which we don't want as that's confusing and we don't use table rate anyway.

How do we get the cart rule of free shipping rule to apply to FedEx? I have the correct free shipping method set under FedEx.


texts: Get product Category from Parent Product using SQL query

texts:
I have a collection of associated products of a configurable product. I want to get category for this products. The categories are assigned to their parent product(Configurable Product) and not to the simple products which I have.

I am using below code to add category_id to my collection

$_productCollection->getSelect()->joinLeft('catalog_category_product',
    'e.entity_id = catalog_category_product.product_id',
    array('product_category'=>'category_id'));

It works but for associated products, it shows NULL, I want to check if there is Null value for category_id then use category_id of its Parent Product.

Does anyone have any idea how to get categories from parent product using an SQL query?


texts: Magento 2 Get URL from Where order is placed in Observer

texts:
After order status change in observer I am getting data of the order.

Now I want to get the URL of the site from where order is placed.

Like if main store then - www.example.com

if french store view then - www.example.com/fr

Please help me with this.


texts: Mobile theme apply to browser responsive

texts:
I am using magento 1.9, I have created mobile theme successfully and apply it to mobile device working fine but it is not working on web browser resize.

How can I apply this theme to browser resize.


texts: How to get the quote address object when user logged in?

texts:
One particular user logged in to his account from frontend and adds some items to the shopping cart. And then he logged out. And again when he logged in I want to get his quote address object.

How to achieve this? Is there any event which fires and I can get the quote address object? Any suggestions will be appreciated.


texts: Magento 2 remote validation, how to show loader

texts:
How to add showLoader option in this call?
data-validate="{required:true, 'validate-email':true, 'remote':'<?= $emailValidatorUrl ?>'}"


texts: Add custom salutation attributes on checkout page in Magento 2.3

texts: I want salutation before the name on checkout page, please give the step by step guide for it, i have tried lots in my way but still i have not fixed it.


texts: Why does shopping cart gets empty after sometime?

texts: If a product is added in the cart, it automatically gets empty after 2-3 hours. why does that happens? thanks


texts: Downloading order details through Mage::getModel('sales/order')

texts:
I am trying to download order details (email + name) from my stores. We have a multi-store.

The problem that I have is that when I run this code on STORE 1 or STORE 2 - both result in the full collection of orders. What I need is the orders belonging to STORE 1 or 2 etc

The snippet below is part of a PHP in the root of my domain.

I tried all three options mentioned below ...

Mage::app();

[OPTIONS I TRIED]
// ->addAttributeToFilter('store_id', Mage::app()->getStore()->getId())
//->addStoreFilter(Mage::app()->getStore()->getId())
// ->setStoreId(Mage::app()->getStore()->getId())

$orders = Mage::getModel('sales/order')
->getCollection()
[OPTIONS]

How can this be done?


texts: Some of the products below do not have all the required options error on cart page when add configuareble product to cart

texts:
[][]2

I have some configurable products in my store which have required options Decorations and size for configuaration and another option "Desired Delivery Date" from custom options of configuarable product.

When i add this product into cart and go to cart page it is displaying error "Some of the products below do not have all the required options."

But also all rewuired options which i selected displaying on cart page.

Please give me some solution.


texts: Entity attributes not listed when exporting products magento2!

texts:
I am exporting products but entity attributes list not appearing on the page.

When I check in response, it is showing script but not response.

<script>
require([
    'mage/adminhtml/grid'
], function(){
    if (window['export_filter_gridJsObject'] != undefined) {
        export_filter_gridJsObject.resetFilter = function () {
            return varienGrid.prototype.resetFilter.call(this, varienExport.modifyFilterGrid);
        };
        export_filter_gridJsObject.doFilter = function () {
            return varienGrid.prototype.doFilter.call(this, varienExport.modifyFilterGrid);
        };
    }
});
</script>


texts: Magento2: how to remove all cart's items from controller?

texts:
Please, how can i remove all cart's items from controller?

namespace Demo\Demo\Controller\Demo;

class Demo extends \Magento\Framework\App\Action\Action
{

    public function execute()
    {
      //Codes for removing all cart's items
    }

}


texts: Magento2: How to get clicked page number on pagination

texts:
My pagination is working fine. But in ajax I only want to get page number which is clicked. For example I have products on 10 pages. When I click on page 2 it alert only 2, when click page 3 it alert 3.
So I only want to alert page number which is clicked using jQuery could anybody help me please.


texts: Remove certain countries from country dropdown in onepage checkout while in Shipping Information part only

texts:
I wanted to remove certain countries from the 'countries dropdown' in magento onepage checkout at the section 'shipping information'.

It is to be noted that Billing information will have all the available countries in the dropdown but I want to restrict only incase of shipping information because there are certain law which doesn't allows my online shop to ship.

I can restrict shipping to particular country from admin end but I don't even want those countries to be shown in dropdown.


texts: Displaying products in category code no longer working after SUPEE-6788 patch

texts:
We added the SUPEE-6788 patch and this code that we used to display products from a category no longer works:

<?php
    $_productCollection=$this->getLoadedProductCollection();
    $_helper = $this->helper('catalog/output');
?>
<?php if(!$_productCollection->count()): ?>

<?php echo $this->__('There are no featured products') ?>

<?php else: ?>

        <?php $_collectionSize = $_productCollection->count() ?>
        <?php $i=0; foreach ($_productCollection as $_product): ?>

<a href="<?php echo $_product->getProductUrl() ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(236,177); ?>" width="236" height="177" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />

        <?php endforeach ?>
        <?php endif; ?>

Any ideas what I need to change to make this work again?  We have this code in a .phtml file and call it on a CMS page using the following call:

{{block type="catalog/product_list" category_id="29" template="catalog/product/featured.phtml"}}


texts: "This product does not exist" error each time I create a configurable product [2.3.3]

texts:
I try to create configurable products in magento 2.3.3 using 2 attributes: color and shipfrom

I simply add the attributes, the values, then save.
Just after saving I get the following error:

I cannot edit the configurable product if I try to, resulting in the same error.
However delete is working.
That seems odd as you would like to be able to change the list of associated products sometimes. Any idea what is the issue here ?


texts: Multiple file uploads through a single input

texts:
I have created a form in frontend where sellers can fill their details but for brands logo, I want them to upload all the logos through a single input.How can I do that?
Code:
form-
__('Brand Logo') ?>

Controller:
foreach($_FILES["logopic"]["tmp_name"] as $key=>$tmp_name){
                    if(strlen($_FILES['logopic']['name'])>0){
                        $image = getimagesize($_FILES['logopic']['tmp_name']);
                        if($image['mime']) {
                            $img2 = rand(1,99999).$_FILES["logopic"]["name"];
                    $target= Mage::getBaseDir().'/media/Seller_Profile/BrandsLogo';
                            $uploader = new Mage_Core_Model_File_Uploader('logopic');
                            $uploader->setAllowedExtensions(array('gif','jpg','jpeg','png'));
                            $uploader->setAllowCreateFolders(true);
                            $uploader->setAllowRenameFiles(false);
                            $uploader->setFilesDispersion(false);
                            $saved = $uploader->save($target,$img2);
                            if($saved){
                                $value->setlogopic($img2);
                            }
                        }else{
                            Mage::getSingleton('core/session')->addError(Mage::helper('marketplace')->__("Disallowed file type."));
                        }
                    } }


texts: Forbidden You don't have permission to access - Magento 2.2.9

texts:
When I'm trying to change my theme with the luma theme from backend on Magento 2.2.9 after upgrade from Magento 2.2.6, I'm getting following error.

Please help


texts: Warning: DOMDocument::loadXML(): Empty string supplied as input in C:\xampp\htdocs\Magento2\vendor\magento\module-config\Model\Config\Structure\Reader.php on line 132


texts: How to move a block from content to custom location

texts:
The block below is added to the bottom of content. I want this block to be called from within the catalog/product/view.phtml. So i can place it with $this->getChildHtml().

</PRODUCT_TYPE_bundle>
<reference name="content">
   <block type="catalog/product_view"     name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="catalog/product/view/options/wrapper/bottom_bundle.phtml" translate="label">
  <label>Bottom Block Options Wrapper</label>
  <action method="insert"><block>product.tierprices</block></action>
  <block type="catalog/product_view" name="product.clone_prices" as="prices" template="catalog/product/view/price_clone_bundle.phtml"/>
  <block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart_bundle.phtml"/>
</block>

How to do this ? Do I add a new reference ? like :

<reference name="content">
  <reference name="blockname">
    <block></block>
  </reference>
</reference>


texts: Magento2.0 used as backend and Wordpress used as frontend(magento2.0 Api)

texts:
I need solution with below requirement

1) All Magento data, inclusive of  catalog/products, inventory, customer data, quotes, checkout process, etc., should be utilized from within WordPress by way of the Magento 2 REST API

2) Magento should exist solely as a back-end service. It should have nothing to do with rendering the front-end at any point in the user experience


texts: how to remove wishList Item by item id and customer id in magento 1

texts:
if (!empty($customerId) and ! empty($item_id)) {
                $return['canRemove'] = true;
                try {
                    $item = Mage::getModel('wishlist/item')->load($item_id);

                    $wishlist = $this->getWishListById($item->getWishlistId());

                    if ($wishlist->getCustomerId() == $customerId) {

                        $item->delete();

                        $wishlist->save();
                        $return['error'] = false;
                        $return['msg'] = $this->__("Requested Item deleted from wishlist");

                        $resultCode = 1;
                        $resultText = "success";
                    }
                     else {
                        $return['msg'] = $this->__("Requested wishlist doesn't exist");
                    }
                } catch (Exception $ex) {
                    $return['msg'] = $this->__('An error occurred while deleting the item from wishlist.');
                }
            } else {
                $return['msg'] = $this->__('Item or customer is invalid');
            }


texts: How to remove multiple results from admin grid in ui-component Magento 2

texts:
How to Remove the multiple results in the grid from the same date in admin grid UI component Magento 2
- I have got multiple results for 1 day.
- I need a single result for a single date.

<column name="creation_time" class="Magento\Ui\Component\Listing\Columns\Date">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">dateRange</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
                    <item name="dataType" xsi:type="string">date</item>
                    <item name="label" xsi:type="string" translate="true">Created At</item>
                    <item name="sortOrder" xsi:type="number">140</item>
                </item>
            </argument>
        </column>


texts:
I have a parent category (ID 10). I'd like to call the children of category ID 10's child categories. As per example below, is there any way to do this?

Parent Category > First Level Child > I want this one

Current code

$parentCategoryId = 141;//put your parent cat id here
$category = Mage::getModel('catalog/category')->load($parentCategoryId );
$children = Mage::getModel('catalog/category')->getCollection()->setStoreId(Mage::app()->getStore()->getId());


texts:
I have tried to extend the schema mutation
by adding schema.graphql in my module &
type Mutation {
    revokeCustomerToken(pagedata: PageData): RevokeCustomerTokenOutput @resolver(class: "\\Vendor\\CustomerGraphQl\\Model\\Resolver\\RevokeCustomerToken") @doc(description:"Revoke the customer token")
}

input PageData {
    location: String @doc(description: "The location from where the login performed")
    login_type: String @doc(description: "The login type, such as manual or facebook")
    page_path: String @doc(description: "The path of the page")
    page_referrer: String @doc(description: "The page referrer")
    page_title: String @doc(description: "Title of the page")
    page_url: String @doc(description: "The page url")
}

but i am getting Syntax Error GraphQL request (4:15) Expected Name error
i try with this schema in chrome tool
mutation {
  revokeCustomerToken {
    result
    pagedata: {
  location: "test"
  login_type: "test"
  page_path: "test@example.com"
  page_referrer: "test"
  page_title: "test"
  page_url: "test"
}
  }
}

any thoughts on this ?


texts: Magento 2: Remove unused JS from home page

texts:
There are several unused JS files which we do not use on the homepage. JS files are:

jquery/ui-modules/datepicker.js
jquery/ui-modules/timepicker.js
moment.js
jquery/ui-modules/sortable.js
jquery/spectrum/spectrum.js
mage/calendar.js

How can we remove all these unused JS from specific pages like home page.
I tried to remove tag in xml but It did not work. It seems it is added in dependency in jquery-ui


texts:
I am rearranging the checkout.

I am getting rid of the sidebar concept as it hides the products behind a link and only allows very little space for the products.

My current store will have A LOT of products per quote and also a lot of information needs to be displayed. Too little space in this tiny sidebar. Therefore I want to return to the "old-school" way of displaying all the products before purchasing at the end of the last step only.

While I keep the container/region "sidebar" it will be a simple div taking up the entire width of the available space.

So far so good but how do I tell Magento to hide the sidebar on all steps except the last one? Currently, it is displayed on every step.

CSS is not an option since the DOM does not change from step to step.


texts: SQLSTATE[42000]: 1142 TRIGGER command denied for table 'catalog_product_index_price_replica',

texts:
Good Day

I am very much a novice when it comes to this. I upgraded my store from Magento 2.2.8 to 2.3.3.

All seemed initially to go without issues.

However on reindexing i get the below error.

SQLSTATE[42000]: Syntax error or access violation: 1142 TRIGGER command denied to user 'mydatabaseusername' for table 'catalog_product_index_price_replica', query was: INSERT INTO catalog_product_index_price_replica (entity_id, customer_group_id, website_id, tax_class_id, price, final_price, min_price, max_price, tier_price) SELECT catalog_product_index_price_temp.entity_id, catalog_product_index_price_temp.customer_group_id, catalog_product_index_price_temp.website_id, catalog_product_index_price_temp.tax_class_id, catalog_product_index_price_temp.price, catalog_product_index_price_temp.final_price, catalog_product_index_price_temp.min_price, catalog_product_index_price_temp.max_price, catalog_product_index_price_temp.tier_price FROM catalog_product_index_price_temp ON DUPLICATE KEY UPDATE entity_id = VALUES(entity_id), customer_group_id = VALUES(customer_group_id), website_id = VALUES(website_id), tax_class_id = VALUES(tax_class_id), price = VALUES(price), final_price = VALUES(final_price), min_price = VALUES(min_price), max_price = VALUES(max_price), tier_price = VALUES(tier_price)

The reindex appears to be attempting to use "mydatabaseusername" which is my old username and this is throwing the error.

I have checked app/etc/env.php and database name, username and password are correct.

All other reindexs are successful.

I have cleared and flushed cache.

I have search the internet and cant seem to find anyone with a similar problem.

Does anyone know how to resolve this?


texts: Can't able to create table in magento 1 upgrade script

texts:
I am trying to create a script to create a table in my custom module. I tried many method but i thing there is a minor issue in my script. I want sure what is mistake.

Config file

Path - app\code\community\Amit\Custommodule\etc\config.xml

<?xml version="1.0" ?>
<config>
   <modules>
      <Amit_Custommodule>
         <version>1.1.0</version>
      </Amit_Custommodule>
   </modules>
 <global>
<models>
    <custommodule>
        <class>Amit_Custommodule_Model</class>
        <resourceModel>custommodule_resource</resourceModel>
    </custommodule>
    <custommodule_resource>
        <entities>
            <custommodule>

custommodule

            </custommodule>
            <custommodule>

custommodule2

            </custommodule>
            <custommodule>

custommodule3

            </custommodule>
        </entities>
    </custommodule_resource>
</models>
<resources>
    <custommodule_setup>
        <setup>
            <module>Amit_Custommodule</module>
            <class>Mage_Customer_Model_Entity_Setup</class>
        </setup>
        <connection>
            <use>core_setup</use>
        </connection>
    </custommodule_setup>
    <custommodule_read>
        <connection>
            <use>core_read</use>
        </connection>
    </custommodule_read>
    <custommodule_write>
        <connection>
            <use>core_write</use>
        </connection>
    </custommodule_write>
</resources>

<blocks>
    <custommodule>
        <class>Amit_Custommodule_Block</class>
    </custommodule>
</blocks>

            standard

                Amit_Custommodule
                custommodule

                custommodule.xml

Sql Query

Path - app\code\community\Amit\Custommodule\sql\custommodule_setup\upgrade-1.0.0-1.1.0.php

<?php
$installer=$this;
$installer->startSetup();

$installer->run("
-- DROP TABLE IF EXISTS {$this->getTable('custommodule3')};
CREATE TABLE {$this->getTable('custommodule3')} (
  `custommodule_id` int(11) unsigned NOT NULL auto_increment COMMENT 'Q&A ID',
  `product_id` int(11) NOT NULL  COMMENT 'Product Id' ,
  `customer_name` varchar(255) NOT NULL COMMENT 'Customer Name',
  `customer_email` varchar(255) NOT NULL  COMMENT 'Customer Email',
  `question` text NOT NULL  COMMENT 'Question',
  `answer` text NOT NULL  COMMENT 'Answer',
  `status` smallint(6) NOT NULL default '0' COMMENT 'Status',
  `created_time` datetime NULL,
  `update_time` datetime NULL,
  PRIMARY KEY (`custommodule_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

    ");
$installer->endSetup();
?>


texts: how to restore deleted Shopping Cart Price Rules in magento 1.8

texts:
I accidentally deleted shopping cart price rule "xyz". By doing so all the codes and their statues was also deleted.
Can we retrieve this ?


texts: Changing how Magento 2 approximate prices in invoices

texts: we have a problem with how our Magento 2 calculates total prices, including taxes, on our invoices. We set up magento to calculate the price with taxes on every single line and then to add them up at the end, but we still get approximation issues. How does magento calculates that? Is it possible to change the way it approximate prices? It seems to be off, even if it's one cent, doing the same operations with a calculator.


texts: Magento 2: How to add extra variable in session for Cart

texts:
I already referred

How to Set, Retrieve and Unset Session Variables in Magento 2?

When a user clicks on "Add To Cart" button. I would like to Add One Additional Variable in Cart Quote Session.

How to set it & where can I do this may be Observer not sure?


texts: Varien Data collection toOptionArray does not pass arguments to protected method?

texts:
I'm trying to create a select list from a Magento collection using toOptionArray, but am unable to define the key => value relationship.

The lib/Varien/Data/Collection.php file contains the public & protected methods:

protected function _toOptionArray($valueField='id', $labelField='name', $additional=array())
    {
        $res = array();
        $additional['value'] = $valueField;
        $additional['label'] = $labelField;

        foreach ($this as $item) {
            foreach ($additional as $code => $field) {
                $data[$code] = $item->getData($field);
            }
            $res[] = $data;
        }
        return $res;
    }

    public function toOptionArray()
    {
        return $this->_toOptionArray();
    }

But it appears that the public function does not pass any arguments to the protected function, which would seem to limit the functionality of the method. Is this a bug, or is there a standard way to generate a select from a collection that does not inherit from the Collection class?

(it's easy enough to override the public method in my own class, but I'd like to know any insights on the design of the above)


texts:
Have done a bit of researching and searched various boards and topics and haven't been able to shed much light onto this. It seems like it's been a common problem over the various versions of Magento and I understand that it will never be 100% accurate but for the sake of conversion rate tracking it would be great to improve the current amount of transactions being tracked.

Magento ver. 1.7.0.2
Google API enabled with tracking code implemented
GA code confirmed to be present on checkout page source

Issue:

Only ~50% of transactions are showing in E-Commerce tracking in GA.

I can't see any theme or trend among the missing transactions, I did read it one thread that it may be guests who have signed up during the purchasing process but I'm not sure how to check this.

It's a huge amount of transactions missing. Does anybody have any idea of a solution or things I can look for or point a developer in the direction of?

Thanks in advance!


texts: How to add canonical tag for product pages as domainname.com/category/subcategory/product.html

texts:
Canonical tag for product pages of (eleczo).

I need solution how to add a canonical tag for product pages as domainname.com/category/subcategory/product.html in MAGENTO 1.9.1.1.

Because, the same product page is getting listed with two diff URLs as
"1. domainname.com/product.html",
"2. domainname.com/category/subcategory/product.html"

Now, I am worried about copied content though there nothing copied or duplicate content.

Yes, I can avoid it by enabling canonical tag for product at the backend. But, this will as canonical as domainname.com/product.html. But, I want full path including category and subcategory. So, how can I achieve it?


texts: Slow Admin Orders Grid - Magento 2.3.3 Community

texts:
We are faced with a constant issue of it taking 2-3 minutes just to load the first 20 results of the sales order grid in admin. This is with most columns deselected and only showing the most basic, id, date, name, price, status.
Overall our server is well optimised, front end is very fast.
We do have 178,000 orders which I guess is why it is so slow, but without deleting order history which we do not want to do, how can we get around this?


texts:
i run bin/magento sampledata:deploy and get this error:

Failed to decode response: zlib_decode(): data error
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info

Installation failed, reverting ./composer.json to its original content.

  [Composer\Downloader\TransportException]
  Your configuration does not allow connection to http://packagist.org. See h
  ttps://getcomposer.org/doc/06-config.md#secure-http for details.

require [--dev] [--prefer-source] [--prefer-dist] [--no-plugins] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [packages1] ... [packagesN]

There is an error during sample data deployment. Composer file will be reverted.

Any solution?


texts: Magento 2.3: Theme issue after migration

texts:
Magento migration from magento 1.9.2.3 to magento 2.3.3 theme error => There is no default/theme327k inside core_config_data. How to solve the error.

Following tutorial : https://bssthemes.com/blog/unable-to-load-theme-by-specified-key/#Using_SSH

How to set default Luma theme?


texts: Customize email template for change password/email

texts:
I was trying to customize the emails but for change password or email I don't see where I have to apply my created email.

For forgot password for example, I go to (Stores > Configuration; Customers > Customer Configuration)

And at password options section I see "Forgot Email Template", so easy!
But I can't find change password or change password and email.

Any help?


texts:
I download Order information But in that csv no information what mistake i made
How to download csv with data

public function downloadAction(){
  $orderId = $this->getRequest()->getParam('id');
  $order = Mage::getModel("sales/order")->load($orderId);
    // prepare CSV header
    $csv = '';
    $_columns = array(
     "Order Id",
     "Product Name",
     "Sku",
     "Price");
    $data = array();
    // prepare CSV header...
    foreach ($_columns as $column) {
           $data[] = '"'.$column.'"';
    }
    $csv .= implode(',', $data)."\n";
    foreach ($orders as $order) {
             $items = $order->getAllItems();
             foreach ($items as $item) {
                   $loadProduct = Mage::getModel('catalog/product')->load($item->getProductId());
                   //prepare csv contents
                    $data[] = $order->getId();
                    $data[] = $loadProduct['name'];
                    $data[] = $loadProduct['sku'];
                    $data[] = $loadProduct['price'];

                    $csv .= implode(',', $data)."\n";
                   //now $csv varaible has csv data as string
        }
    }

    try {
            //download
            $this->_prepareDownloadResponse('file-'.$orderId.'.csv', $csv, 'text/csv');
            $this->_getSession()->addSuccess($this->__('File downloaded.'));
        } catch (Mage_Core_Exception $e) {
            $response = array(
                'error'     => true,
                'message'   => $e->getMessage(),
            );
        }catch (Exception $e) {
            $this->_getSession()->addError(Mage::helper('sales')->__('File cannot be donwloaded.'));
            $response = array(
                'error'     => true,
                'message'   => $this->__('File cannot be downloaded.')
            );
        }
}

        public function getDownloadCsv($id)
    {
        return $this->getUrl('adminhtml/order/download', array('id' => $id));
    }


texts: Unable to resolve the source file for in Custom Offline Payment method in magento 2

texts:
I have created one offline payment method which will be visible to our specific customer group, all this is working fine in localhost but after uploading code in server i am getting following error at checkout page:

  /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/StaticResource.php(97):
  Magento\Framework\View\Asset\File->getSourceFile() #1
  /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/Bootstrap.php(258):
  Magento\Framework\App\StaticResource->launch() #2
  /opt/bitnami/apps/magento/htdocs/pub/static.php(13):
  Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\StaticResource))#3 {main}


texts: How Override the grid customer magento 2

texts: I want to delete some columns from the grid also add new others(custom attributes)  and   show the list of customers according to group (i will have two grid according) to group) I added the sequence module_customer in my layout module and I deleted some columns and flush cache but no result so please any help !!


texts: I create a new category in Magento admin On Sale (ID: 54), I select NO in Include in Navigation Menu, but even if this category is not display in desktop top navigation, I see this category in the mobnav menu, in search ... How I can hide this category completely in frontend?


texts: Magento 2 installation in GoDaddy shared hosting

texts:
Just installed Magento in my GoDaddy shared hosting and getting this error:

  Can't create directory
  /home/xxx/public_html/xxx.com/ecommerce/generated/code/Magento/Catalog/Controller/Adminhtml/Product/Index/.
  Class Magento\Catalog\Controller\Adminhtml\Product\Index\Interceptor
  generation error: The requested class did not generate properly,
  because the 'generated' directory permission is read-only.

If --- after running the bin/magento setup:di:compile CLI command when the generated directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only.

The permissions for all dirs were changed to 777.


texts:
I'm new to Magento so excuse me if i"m asking anything evident.
I have a request to change attribute set of 100+ products (they were created by a previous manager). How can I do that without re-cresting all these products?


texts: Redirection after login to another page is not working for server + Chrome issue

texts:
I have set previous URL like below in controller

Mage::getSingleton('customer/session')->setBeforeAuthUrl(Mage::helper('core/url')->getCurrentUrl());

After login, it will be redirect to previous url. It's working for Firefox but not working for chrome.

  System -> Customer configuration ->Redirect Customer to Account
  Dashboard after Logging in -> set to NO


texts: How to get the value of a field on the cart page in magento 2

texts:
Well, I would like to know if there are any observables that I can observe on the cart page. Or if there is a way to capture the value of a custom field that has been inserted.
Explaining further, a field was added and I would like to have access to this data when I start the checkout (delivery address)
Can anybody help me?


texts:
We've noticed emails from e.g. contact forms were not being send even though the site said they were.
We've added the cronjob to the system, but when we tried to test it by executing cron.php, we got a 403 FORBIDDEN.

url: https://merchgeex.com/cron.php

How can we fix this?

/var/log/apache2/error.log -->

[Thu Oct 06 07:20:03.760087 2016] [access_compat:error] [pid 7969] [client *ip*] AH01797: client denied by server configuration: /var/www/cron.php


texts: WSDLSOAP-ERROR: when accessing soap URL in browser

texts:
I am getting below error when accessing

  http://example.com/index.php/api/v2_soap/index/

(main site URL renamed for security purpose)in browser.
Error is

  WSDLSOAP-ERROR: Parsing WSDL: Missing  with name
  'typens:catalogProductAttributeRemoveRequest'

I am not sure why this is happening. Any kind of help will be much appreciated.


texts: Controlling visibility of products by status (catalog and search)

texts:
What we have here is a class that extends Mage_Catalog_Model_Product_Status, and adds two CONST variables, STATUS_PENDING and STATUS_PREVIEW.

What I am trying to find is the logic model that decides if a product appears in the frontend, preview is a special case here. I want to be able to see if a product is visible depending on if the user is a logged in admin, otherwise it will not display to customers in the search or by direct link.

So my goal is to find where the Varien router decides if a product is visible or if it should be redirected to our 404 page, extend the class and add filters to the query depending on if the user is an admin or not (e.g. changing it from STATUS_PREVIEW to STATUS_DISABLED if the user is not an admin)

Also in regards to catalog search, It was my impression that addVisibleFilterToCollection was supposed to handle this in the layer model on a product collection, however that method has been depreciated and is essentially useless in this case.

How can I control this in the product view and catalog search? If anyone could point me to the correct Models/Methods to handle this, I would greatly appreciate it, I have been at this for several hours trying to figure it out on my own.


texts: Grid in a Edit Form (backend) : Ajax is not working

texts:
I have included a product grid in edit form tab. ( same edit category does ), however when I search the ajax loader doesn't stop and I'm redirected to the main tab.

I can post part of code if needed but I would only if required ( many files involved )

UPDATE:

it looks like the problem is that the param $url passed to the function reload (grid.js) doesn't contains ?isAjax=true


texts: Magento Events 'catalog_product_get_final_price' not working?

texts:
below is my config.xml file code.

<?xml version="1.0"?>
<config>
    <modules>
        <Eventprice_Meta>
            <version>0.0.1</version>
        </Eventprice_Meta>
    </modules>
    <global>
        <models>
            <eventprice_meta>
                <class>Eventprice_Meta_Model_Observer</class>
            </eventprice_meta>
        </models>
    </global>
    <adminhtml>
        <events>
            <catalog_product_get_final_price><!-- observe the event -->
                <observers>
                    <eventprice_meta>
                        <type>singleton</type>
                        <class>Eventprice_Meta_Model_Observer</class>
                        <method>changeprice</method>
                    </eventprice_meta>
                </observers>
            </catalog_product_get_final_price>
        </events>
    </adminhtml>
</config>

below is my Observer.php files code.

<?php
class Eventprice_Meta_Model_Observer {

    public function changeprice(Varien_Event_Observer $event) {
        return 5;
        if($_GET['id']){
            $pricetoadd=Mage::getModel('catalog/product')
                        ->load($_GET['id'])->getPrice();

            $product = $event->getEvent()->getProduct();
            $originalprice = $product->getPrice();
            $customprice = $originalprice+$pricetoadd;
            $product->setPrice($customprice);
        }
        echo 'call';
        exit;
   }
}

i want to set the Product price $5 on product view page. i write a function 'changeprice' for changing the product price. but this function is not call please checked where i create a mistake in code.


texts: What is the correct event for collecting/updating order information after order success?

texts:
I've seen multiple people use save_order_place_after, as well as checkout_onepage_controller_success_action.  My issue is that I want to do a quick scan of information collected on that order, and update tables depending on the information collected. I've tried both of these events and get the following results (using PayPal Onepage checkout):

save_order_place_after:

Blank page loaded (PayPal payment review page according to URL)
Order interrupted (no success page)
Payment is sent to PayPal successfully
No order information is saved anywhere in admin panel or database
Account then becomes glitched with "duplicate invoice" error and cannot place another order without receiving error
An email is triggered and sent successfully from the Observer.php

checkout_onepage_controller_success_action:

Order is successful
Success page loaded
Nothing is executed from Observer.php

There are no syntax errors in the Observer.php, as it works correctly with the first event but is apparently interrupting the order in some way.

Is there another event that's triggered after an order is successfully completed and saved so that I can scan all information collected on the order?


texts:
I am using Magento 1.9. I want to send Cancel email to the particular customer.

How to send email to the customer


texts: In my account page after fillup all form fields, getting an error "regionid is required field" but I can't find out actual reason why this error comes every time. if anyone has idea please reply me.


texts: I am trying to add an icon on Magento 2 mobile menu tab. How to add different icon in Magento 2 luma theme mobile menu (Menu & Account)


texts: Magento 2 - Product custom price not change based with current currency

texts:
I have used checkout_cart_product_add_after event, to add the custom price in catalog product.

I used the code for to add custom price,

$item->setCustomPrice($price);
$item->setOriginalCustomPrice($price);
$item->getProduct()->setIsSuperMode(true);

Above code is not working while multi-currency. On cart page, if I added the product custom price with $10 it is showing $10.

When I am changing currency from the switcher to INR, It was showing  ₹10.

If I disabled event and add to cart same product, it's working properly in both currencies.

Does anyone have an idea about this issue?


texts: Checkout Order Summary Update Selected Payment Method

texts:
Can anyone help me out to update order summary section of Magento 2?

My goal is to update the order summary with the custom attribute like 'Surcharge Fee', when the customer selects any payment method

How can I achieve this?

Thank you


texts: Custom module: Access denied (ACL Problem)

texts:
I created a module, and it works perfectly; however, I hit a wall. When I'm logged in as admin, everthing is good. I added this in the acl:

<?xml version="1.0"?>
<config>
    <menu>
        <erp translate="title" module="firtal_deadstock">
            <title>ERP</title>
            <sort_order>99</sort_order>
            <children>
                <stock_management module="firtal_deadstock">
                                <title>Stock Management</title>
                                <children>
                                    <firtal_deadstock>
                                        <title><![CDATA[Firtal Stock Analysis]]></title>
                                        <sort_order>99</sort_order>
                                        <action>adminhtml/deadstock</action>
                                    </firtal_deadstock>
                                </children>
                </stock_management>
            </children>
        </erp>
    </menu>
    <acl>
        <resources>
            <all>
                <title>Allow Everything</title>
            </all>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <firtal_deadstock translate="title">
                                        <title>Firtal Stock Analysis settings</title>
                                        <sort_order>100</sort_order>
                                    </firtal_deadstock>
                                </children>
                            </config>
                        </children>
                    </system>
                    <erp module="firtal_deadstock">
                        <children>
                            <stock_management module="firtal_deadstock">
                                <children>
                                    <firtal_deadstock translate="title" module="firtal_deadstock">
                                        <title>Firtal Stock Analysis</title>
                                    </firtal_deadstock>
                                </children>
                            </stock_management>
                        </children>
                    </erp>
                </children>
            </admin>
        </resources>
    </acl>
</config>

But if I grant the permission to a role and login as a user with that role, they do see the menu point (not the config, but the actual menu point), but if I press it, I get an Access Denied error:

What am I missing?


texts: Magento 2 How to call adminhtml Block in Particular Tab

texts:
I have developed a custom module for admin and in created form , edit section...etc.
in the mydata_section_edit.xml  file I have created 3 tabs:

General
Order
Storedata(I am trying to calling the data in this tab from third party module)

In this file I am calling third party data with below code:
 <referenceContainer name="content">
            <block class="Vendor\Modulename\Block\Adminhtml\thirdpartydataTab" name="thirdpartydata" acl="Vendor_Modulename::customer" after="leftsection" />
        </referenceContainer>

But issue is this block is called in each three tab but I need only for third one(storedata).
I am calling the php file for storedata and name is storedatatab.php.
is this possible that xml block directly called in block php file?
please help anybody how to achieve it?


texts: Magento oAuth : Generating access token and access secret

texts:
I understand that the authentication endpoints include the following ones:

/oauth/initiate - this endpoint is used for retrieving the Request Token.
/oauth/authorize - this endpoint is used for user authorization (Customer).
/admin/oauth_authorize - this endpoint is used for user authorization (Admin).
/oauth/token - this endpoint is used for retrieving the Access Token.

I have written following python code to retrieve the magento access token and secret.

    class Magento_Oauth_Admin(restful.Resource):
        def get(self):
            return render_template('magentosetup.html')

        def post(self):
            consumer_key=request.form.get('consumer_key')
            consumer_secret=request.form.get('consumer_secret')
            magentourl='http://127.0.0.1/magento/admin/'

            session['magentourl']=magentourl
            callbackurl = api.url_for(Magento_Access_Token)
            temporary_credentials_request_url = '{magentourl}/oauth/initiate?{callbackurl}'.format(magentourl, urllib.urlencode(
                dict(oauth_callback=callbackurl)))
            admin_authorization_url = '{magentourl}/admin/oauth_authorize'.format(magentourl)
            oauth_session = OAuth1Session(consumer_key, client_secret=consumer_secret, callback_uri=callbackurl)
            # First step, fetch the request token.
            fetch_response = oauth_session.fetch_request_token(temporary_credentials_request_url)
            session['resource_owner_key'] = fetch_response.get('oauth_token')
            session['resource_owner_secret'] = fetch_response.get('oauth_token_secret')

            # Second step. Follow this link and authorize
            authorization_url = oauth_session.authorization_url(admin_authorization_url)
            return redirect(authorization_url)

class Magento_Access_Token(restful.Resource):
    """ The user has been redirected back from the provider to the registered
    callback URL. With this redirection comes an authorization code included
    in the redirect URL. We will use that to obtain an access token."""
    def get(self):
        access_token_request_url = '{magentourl}/oauth/token'.format(session['magentourl'])
        verifier = request.args.get('oauth_verifier')

        oauth = OAuth1Session(consumer_key,
                                  client_secret=consumer_secret,
                                  resource_owner_key=session['resource_owner_key'],
                                  resource_owner_secret=session['resource_owner_secret'],
                                  verifier=verifier)
        oauth_tokens = oauth.fetch_access_token(access_token_request_url)
        resource_owner_key = oauth_tokens.get('oauth_token')
        resource_owner_secret = oauth_tokens.get('oauth_token_secret')
        return render_template('magentosetupcomplete.html')

 api.add_resource(Magento_Oauth_Admin,"/v2/generateaccesstoken/",endpoint="generateaccesstoken")
 api.add_resource(Magento_Access_Token,"/v2/callback/",endpoint="callback

But at the first step itself when I am trying to generate the request token instead of getting the oauth token and secret I am getting the admin login page back.


texts:
I have several products in Magento 2 that were imported from Magento 1.7. I added to them color swatches and I turned inventory on. Only one of the products is displayed on the front-end as expected. The rest are shown as "Out of Stock".

The parent product is set to "In Stock":

And all child products (corresponding with each color) have quantity set to a positive number:

And yet "Stock Availability" drop-down list is greyed out (disabled) and set to "Out of Stock".

How can I unlock that combo and set it to "In Stock"?

Additionally, if I go through the wizard for Configurations and set product quantities:

they show up properly in the summary table:

but as soon as I save the parent product, quantity information is lost and reset to what it has been set to in each of the children products before:

and if I remove child products and create configurations for color swatches with quantities set for each individual child product from scratch and save changes in the main product, quantity information is lost:


texts:
i want create a custom block inside the header wrapper.
I have put the code inside the default.xml from my child theme and have created a .phtml file with a h1 for test, but it's not working.

The .phtml file is in: /Magento_Theme/templates/html/header/header-links.phtml

My Code in the default.xml:

<referenceContainer name="header-wrapper">
        <container name="header-links-test" htmlClass="container_css_class" htmlTag="div" after="top.search">
            <block class="Magento\Framework\View\Element\Template" template="Magento_Theme::templates/html/header/header-links.phtml" name="block_name" />
        </container>
</referenceContainer>


texts: Magento 1.9.2.4 : Is there away to prevent any item from having an "Out of Stock" Status (regardless of quantity)?

texts:
We have ways of dealing with 0 or sub zero quantity on items using backorder but it puts our customers off when they see an out of stock label.

I can put the whole catalog back in stock using the admin backend of course but everytime I upload stock levels and prices many items again appear out of stock.

Worse, I do not know if magento has a cron job to put more things out of stock as it finds them with zero levels.

I have tried obvious things like set min quantity for in stock to -100000 but it would not accept.

I could quite easily write a cron job to put everything in stock every 5 mins but that seems wrong. There must be a way to disable this without turning off stock management.


texts: getting category number without accessing category_flat

texts: On occasion our category_flat table isn't available.  This causes some areas of our codebase to break.  How can I get the category number of a given category without accessing this table?  Thx.


texts: Ordered products report exclude orders with status closed

texts:
the default Magento2 report from ordered products excludes orders with status canceled. I also want to exclude status closed.
/app/code/Magento/Reports/Model/ResourceModel/Product/Sold/Collection.php

in line 60 shows
  $connection->quoteInto("{$orderTableAliasName}.state <> ?", \Magento\Sales\Model\Order::STATE_CANCELED),

How can I add STATE_CLOSED here? I tried a bit but no success.


texts: Trying to convert USD to GB in price.html, only working on first product

texts:
I need USD prices to convert to pounds for users that are logged in with their billing address in the UK. The code below works but only on the first product. I'm probably missing something obvious here?

The file is located in \default\template\catalog\product\price.phtml

<?php
        $session = Mage::getSingleton('customer/session');
        if ($session->isLoggedIn()) {
            $countryCode = $session->getCustomer()->getDefaultBillingAddress()->getCountry();
            $usdPrice = Mage::helper('core')->currency($_product->getFinalPrice(),false);

            if($countryCode == "GB") {

                 if(!function_exists(convertCurrencyGb)) {

                     function convertCurrencyGb($amount, $from, $to){
                        $data = file_get_contents("https://finance.google.com/finance/converter?a=$amount&from=$from&to=$to");
                        preg_match("/(.*)<\/span>/",$data, $converted);
                        $converted = preg_replace("/[^0-9.]/", "", $converted[1]);
                        return number_format(round($converted, 3),2);
                    }
                    $newprice = convertCurrencyGb($usdPrice, "USD", "GBP");
                 }

                echo '
';
                echo $newprice;
                echo '
';
            }
        }
    ?>


texts: Magento 1.9 : How to get Image on Product page -> 2columns-left.phtml?

texts:
I want to display my below image on product page left side,

https://i.stack.imgur.com/OEZDN.jpg

I just added directly into 2columns-left.phtml,

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

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

Is my work recommend?


texts: Magento : Defer Parsing of JavaScript of Minified JavaScript

texts: I am using magento 1.9 version. I want to speed up my magento site, when I did gtmetrix analysis, it shows Defer parsing of JavaScript. Js files are already minified. How to do it.


texts: Update catalog strategy of large LIVE Magento site

texts:
We have an issue in which we have a Magento site of around 150K monthly traffic .

Configuration :

1.dual xeon cpu
2.16gb ram
3.500gb ssd
4.CDN
5.FPC cache

catalog_flat_tables enabled.

50K skus
100 categories .

Our site works very well.

We have an issue in which , we perform daily catalog updates via the catalog import tool ,and then when we clear the FPC cache , it takes the category page around 1-2 minutes to be rebuilt , during that time the site may seem to be down .
Not to mention warming up all the category filters cache.

Is there a certain method/strategy we can perform in-order to update the catalog and more importantly clear the FPC cache while the site is live without facing that downtime ?

Is there a better method to update the catalog instead of using the Magento import tool ?

Regards ,

James