texts: Writing a local file from an external FTP server - Issue with Varien_Io_File

texts:
I have a script that pulls a file from an external server, and tries to save it locally (to then be processed).  I'm using Varien_Io_Ftp() to facilitate this, however, upon saving the file locally, it throws the following exception, despite creating the file that is required which upsets me.

Warning: chdir(): Invalid argument (errno 22)  in C:\wamp\www\xxxxx\shop\lib\Varien\Io\File.php on line 547

This line in Varien_Io_File is the only one in the vacinity that doesn't have error suppression added to it.  Is this a bug, or should I be setting _iwd somewhere within my call?

Hopefully some code to explain the call below:

$importDir = Mage::getBaseDir() . DS . 'var' . DS . 'import' . DS . 'stock' . DS;
$localFile = $importDir . "StockUpdate_" . date("Y-m-d-H-i-s") . ".csv";

$file = new Varien_Io_File();
$file->mkdir($importDir);
$pickupFile = new Varien_Io_Ftp();

try {
    $pickupFile->open(
        array(
            'host'      => $host,
            'user'      => $username,
            'password'  => $password,
            'timeout'   => '10'
        )
    );

    $pickupFile->cd($remoteDir);
    $_fileToImportRemoteTmp = $pickupFile->read($remoteFile);
    $pickupFile->close();

    if (!$file->write($localFile, $_fileToImportRemoteTmp)) {
        die("cannot write local file :/");
    }
    $file->close();

} catch (Exception $e) {
    var_dump($e);
}

The exception I being thrown with this line:

if (!$file->write($localFile, $_fileToImportRemoteTmp)) {


texts: Need to import product image from Media library while updating product images

texts:
While uploading images for a product in Magento Admin panel, one can only upload/browse images from a local computer. Is there a way to have a Media Library ( like the way we have in WordPress that can insert images into a post from the media library as well as upload images ) that lists all the images that are already existing in the media folder of the Magento system, from which we can choose an image instead of choosing it from local computer.

This similar implementation can be seen in CMS -> Content Pages -> <<Edit one of the page>> -> Insert Image which lists the Media Storage. I want to implement a similar style for product images upload.

Also, any extensions already existing would also help me get over it. Please feel free to share any links to the custom extensions.

I prefer to have the solution in Magento 2, but a module in Magento 1 would help too.


texts: Why Paypal gateway has rejected request error comes (Error No.10413) in Magento

texts:
The error is displayed as follows:

  PayPal gateway has rejected request. The totals of the cart item
  amounts do not match order amounts (#10413: Transaction refused
  because of an invalid argument. See additional error messages for
  details).


texts: How can I assign an order to a customer?

texts: Let's say if a customer has an account, but for some reason can't log in, and creates an order by checking out as a guest. How can I assign this "guest order" to her customer account? This is so as she wants it in her order history. Any way to solve this? Appreciate the help!


texts: Check Component Dependency magento 2.1.10

texts:
I am using Magento 2.1.10. While trying to install an extension. I am getting the following error.

Also I am using php version 7.0.6, but PHP version Check is showing 5.6.25.
Also earlier I tried to install extension on another machine which passed the test but there was no progress in installing.

How can I solve this issues?

Any suggestion is appreciated.


texts: When Cancel An Order And Pending From Admin Then Order Email Is Not Sending In Magento2

texts: All Orders Email Works But Cancel and Pending Orders Email are Not working with Magento version 2.2.3


texts: How to set 2 columns left in admin form in Magento 2?

texts:
I have created layout with ui component form. But now I want to add tab in admin layout.

I already set layout="2columns-left" in layout but it's showing only my one ui compnent form.

<?xml version="1.0" ?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="editor"/>
    <body>
        <referenceContainer name="content">
            <uiComponent name="my_ui_form"/>
        </referenceContainer>
        <referenceContainer name="left">
           .....
           .....
        </referenceContainer>
    </body>
</page>

How to set 2columns left in Admin?


texts: Magento 2 - Check login for page in custom module

texts: I'm developing a custom module. How to check if a user is logged in or not? If not logged in, redirect the user to login page.


texts: Magento 2 custom module installation failed

texts:
I made my own Magento 2 module for adding a custom field to an existing table sales_order_item. When I try to enable the module with the command

php bin/magento module:enable Test_ProductType

The following error occurred,

  There are no commands defined in the "module" namespace

And if I ran this command

php bin/magento

I got this output, see image:

And this is my module.xml

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

What do I have to do to make this module working?


texts: Getting Error on di:compile in Magento 2.4.2

texts:
I have installed Magento 2.4.2 and then installed Claue Theme after setup theme and running command
php bin/magento setup:di:compile

it will working on 5 from 9 then give an error like
Compilation was started.
Area configuration aggregation... 5/9 [===============>------------]  55% 40 secs 286.0 MiB
In ClassReader.php line 45:

** **Impossible to process constructor argument Parameter #3 [ <required>
Magento\InventorySalesApi\Api\StockResolverInterface $stockResolver ]
of Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Indexer\Fulltext\Datasource\InventoryData class

In ClassReader.php line 34:

 Class Magento\InventorySalesApi\Api\StockResolverInterface does not exist

I have check in app/config.php
there are 3 modules with name Smile
'Smile_ElasticsuiteCore' => 1,
    'Smile_ElasticsuiteCatalog' => 1,
    'Smile_ElasticsuiteSwatches' => 1

I think that is causing the issue but don't know yet.

Any help is appriciated.


texts:
I am facing an issue with the XML-RPC interface. When I do a multicall, my Magento 1.9.4.0 setup starts running out of memory.

The call (a little shortened, the actual call is like 30 orders long):

<?xml version='1.0'?>
<methodCall>
<methodName>multiCall</methodName>
<params>
<param>
<value><string>TOKEN</string></value>
</param>
<param>
<value><array><data>
<value><array><data>
<value><string>sales_order.info</string></value>
<value><string>400000179</string></value>
</data></array></value>
<value><array><data>
<value><string>sales_order.info</string></value>
<value><string>300000024</string></value>
</data></array></value>
<value><array><data>
<value><string>sales_order.info</string></value>
<value><string>400000174</string></value>
</data></array></value>
<value><array><data>
<value><string>sales_order.info</string></value>
<value><string>200000205</string></value>
</data></array></value>
<value><array><data>
<value><string>sales_order.info</string></value>
<value><string>400000169</string></value>
</data></array></value>
<value><array><data>
<value><string>sales_order.info</string></value>
<value><string>500000018</string></value>
</data></array></value>
<value><array><data>
<value><string>sales_order.info</string></value>
<value><string>400000180</string></value>
</data></array></value>
..
<value><array><data>
<value><string>sales_order.info</string></value>
<value><string>200000199</string></value>
</data></array></value>
</data></array></value>
</param>
</params>
</methodCall>

The result from the logs:

  [Thu Feb 14 11:04:44.639767 2019] [cgi:error] [pid 963] [client x.x.x.x:40630] AH01215: PHP Fatal error:  Allowed memory size of
  2147483648 bytes exhausted (tried to allocate 20480 bytes) in
  /var/www/html/myshop/lib/Zend/XmlRpc/Value/Collection.php on line 47

I tried increasing the memory to 3GB, but then it just bails out at 3G. Upping it more is almost impossible, as the server only has 4G.

Update when narrowing it down, some orders get this error, and some others work fine.

What could cause this, and how to fix it?


texts: Magento customer email missing in guest checkout, when using soap api

texts: I am using magento version 1.9 and its soap api to create order. In case of guest checkout(customer mode is guest), the email address is not getting saved or shown in admin sales orders. This is working fine for customer in "customer" mode. In the api, it is working fine because "customer_is_guest" is 1 and customer_email is correctly set when we check cart.info api call. Please help to resolve this magento bug.


texts: How can I run phpunit commands from any location in CLI?

texts:
In Magento 2 documentation "Running Unit Tests in the CLI" is text:

To run all tests, navigate to the Magento base directory and execute
the following command:
$ ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist

My question is: How can I run unit tests or integration tests without navigating to specific Magento directory?
So basically I would like to know the reason, why I have to be in specific directory to run phpunit commands in CLI? (I want to execute the command from any location)
EDITED:
Why I can not use full path to the vendor/bin/phpunit directory?
<path to Magento base directory>/vendor/bin/phpunit -c dev/tests/unit/phpunit.xml

ERROR THAT IT RETURNS:
Could not read "dev/tests/unit/phpunit.xml". Why the error appears?
Example: why I can not run /var/www/magento2/vendor/bin/phpunit -c dev/tests/unit/phpunit.xml when I am situated in /var/www/magento2/var/log $ location or anywhere else in the file system?
Reason: I want to create an app that allows me to speed up my development process. (I am not interested IDE-s) and I want to understand the reason why I have to navigate to the Magento base directory.


texts: SQL to list all skus, inventory on hand and qty sold between x and x date

texts:
I have a Magento 1.9 site and I am trying to write a sql query that would return a listing of all skus (disabled and enabled) in the site as well as how many of each sku was sold between a specific date range and then also show how many qty are currently on-hand still for the item.

My issue is I have the below query however it only lists the data I need of the items that were sold between x and x date. The below query is not listing all items even items that were not sold between the stated dates.

I am not sure how to change the query. I need it all as one query since I am exporting the result to excel

  //form post variables
  $fromdate = mysqli_real_escape_string($cn, $_POST['volumefrom']);
  $todate = mysqli_real_escape_string($cn, $_POST['volumeto']);

  $list = mysqli_query($cn, "SELECT sales_flat_order_item.name, sales_flat_order_item.sku, sum(sales_flat_order_item.qty_ordered) As Qty_Sold,
                          cataloginventory_stock_item.qty AS On_Hand FROM sales_flat_order_item, catalog_product_entity_varchar,
                          catalog_product_entity, cataloginventory_stock_item
                          WHERE catalog_product_entity_varchar.attribute_id = 71 AND catalog_product_entity_varchar.entity_id = cataloginventory_stock_item.product_id AND catalog_product_entity_varchar.entity_id = catalog_product_entity.entity_id AND
                          sales_flat_order_item.sku = catalog_product_entity.sku AND sales_flat_order_item.price > 0 AND
                         sales_flat_order_item.created_at >= '$fromdate 00:00:00' AND sales_flat_order_item.created_at <= '$todate 23:59:59'
                         GROUP BY sales_flat_order_item.sku ORDER BY sales_flat_order_item.sku LIMIT 1000");


texts:
I have a multistore and have just added a new store and gone to upload the new products as I usually do however this time the upload won't work with new SKUs.

I already had about 5 products in the new site to test and using their SKUs only the upload works? But if I add another line and change the SKU it gives an error 'attribute set does not exist'for the last line which of course it does as the lines above have the exact same set and no error!

On working through this I found that its the new SKU that stops the upload. Can Magento stop new products from uploading?

Any help or advice would be great.

I have already tried using open office, notepad, and saved as UT8, MSDOS CSV, took off all but required fields and still the same. I also added a new product in the backend and added it to the upload file which worked... but not when I add a new product in the csv file and try to upload.


texts: Add custom dynamic column in sales order grid Magento 2

texts: This solution shows how to add a custom column to the sales order grid, but to add a custom column you need to add the column via XML, the problem is i need to read data collection to get available column data and add it as a custom column in sales order grid, in conclusion, I want to add multiple columns which will be generated dynamically from database collection data, is there any way to do this?


texts: remove header part from some .phtml pages

texts:
visit these links : http://4.videomergerapp.com/

we removed the complete header part [except logo ] in the following page :

http://4.videomergerapp.com/marketplace/

I want to hide complete header part from some other pages also.

what code we need to add to done this.


texts: Will a thirdparty libary rejected if we go though to Magento technical review of our new plugin?

texts: we use a library and inserted it in our vendor folder. This library we want to include with our Plugins/Extension’s composer (required: {lib/mylib}). We noticed that the library in vendor folder is using a eval() or a serialize function. Will this library code be rejected if we go though to Magento technical review of our plugin?


texts: Product Image Gallery Not Displaying When Using Custom Theme

texts:
I have created a child theme from Luma and when I enable it the product image gallery does not appear. When I re-enable the Luma theme the image gallery works fine. What am I missing?

NOTE: I'm using Single Store Mode


texts: Breadcrumbs on pages other than category/product detail

texts: I've already seen a few posts here how to add breadcrumbs on pages like customer page or contact page (like this or that). But is there any way to add them to all pages that are missing them without having to edit all the layout xmls?


texts:
This is a pretty basic CSS question I think, but I'm struggling to solve it.

I recently updated my theme (Ultimo) and it seems as though my custom sub-theme is overriding some default CSS that justifies the search bar true left. My header is based on a grid structure (i.e. 12 columns therefore header is three columns of 12-4 12-4 12-4). I think it may be a problem with the left hp-block.

Demo: http://bear15.livesol.net

Any help would be appreciated.

p.s. this is my first request on here, so apologies if there's a lack of clarity.


texts: array('_forced_secure' => true) in every page

texts:
In every page of my magento shop

there is a message

array('_forced_secure' => true)


texts: Disable logging into cron.log in Magento 2.4?

texts: In my var/log directory I have a large cron.log file, that contains lots of successful processed cron job entries. Can that be turned of anyhow? As it seems it is not part of the cronjob configuration that one get with bin/magento cron:install. I think this logging in cron.log is not very important...


texts: How add custom field (Product Sku) in Order export CSV magento2.2?

texts:
I need to export my orders to csv. I need two fields product sku and qty.

sales > Order > export

Any way to add Product SKU's as comma separated or any extension that can do it?


texts: Magento 2 how to show catalog/product/list.phtml in Custom Module collection

texts:
Magento 2 how to show catalog/product/list.phtml in Custom Module popup with custom filter product collection
Anyone know how to do this ?


texts: Load multiple footers in Magento 2 transactional emails

texts:
I'm trying to figure out how to load a different footer on the invoice emails.

The default footer will be loaded with:

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

This will load the template from /MY-THEME/Magento_Email/email/footer.html.

In my invoice template I would like to load:

{{template config_path="design/email/footer-invoice_template"}}

For this I have created a tempate: /MY-THEME/Magento_Email/email/footer-invoice.html.

But it isn't that easy.

What would be the best way to do this?


texts: How to avoid using the Object Manager in Magento2?

texts:
From this website:

  Manually Load Object Manager

  You should avoid calling the object manager directly as this is not the proper way, but if you have to you use:

$om = \Magento\Framework\App\ObjectManager::getInstance();
/* use object manager to get a class for example the attribute repository */
$attr = $om->get('\Magento\Eav\Api\AttributeRepositoryInterface');
/* use returned class attribute repository to get the attribute id of
the name for products */
$productNameAttributeId = $attr->get('catalog_product', 'name')->getId();

It states:

  this is not proper way, but if you have to you use

How can I do this the proper way?


texts: What is the use of the view.xml of theme etc directory

texts:
I found this file located in the app/design/frontend/Magento/luma/etc/view.xml
Can we depend on this file to make change to the image resolution?

Any other specific use of this file.
Shall we put any color variables in this file and load on theme level.


texts: Can possible to load only catalog/product/view.phtml in custom module

texts:
I am trying to make a custom module for product quick view. Their only need to load catalog/product/view.phtml

Here is My code

app\code\local\Abdus\Ajaxproduct\controllers\LoadproductController.php

<?php
class Abdus_Ajaxproduct_LoadproductController extends Mage_Core_Controller_Front_Action{
    public function indexAction(){
        $this->loadLayout();
        $this->renderLayout();
    }
    public function getbyskuAction(){
        $_prdSku    = $this->getRequest()->getParam('sku');
        $_product   = Mage::getModel('catalog/product')->getCollection()->addFieldToFilter('sku',$_prdSku);
        $this->productInfo($_product);
    }
    public function getbyidAction(){
        $_prdID     = intval($this->getRequest()->getParam('id'));
        $_product   = Mage::getModel('catalog/product')->getCollection()->load($prdID);
        $this->productInfo($_product);
    }
    public function productInfo($_product){
        $this->loadLayout();
        $this->renderLayout();
    }
}

app\code\local\Abdus\Ajaxproduct\etc\config.xml

<config>
    <modules>
        <Abdus_Ajaxproduct>
            <version>1.0.0</version>
        </Abdus_Ajaxproduct>
    </modules>
    <frontend>
        <routers>
            <ajaxproduct>
                <use>standard</use>
                <args>
                    <module>Abdus_Ajaxproduct</module>
                    <frontName>ajaxproduct</frontName>
                </args>
            </ajaxproduct>
        </routers>
    </frontend>
</config>

app\design\frontend\base\default\layout\local.xml

<?xml version="1.0" encoding="utf-8"?>
<layout version="0.1.0">
    <ajaxproduct_loadproduct_getbysku>
        <remove name="head" />
        <remove name="header" />
        <remove name="footer" />
        <remove name="right" />
        <remove name="left" />
        <reference name="root">
            <block type="page/html" name="content" output="toHtml" template="catalog/product/view.phtml"/>
        </reference>
    </ajaxproduct_loadproduct_getbysku>
</layout>

But when i call my link

mysite/ajaxproduct/loadproduct/getbysku/sku/418

Then I get a error

Fatal error: Call to a member function getOptions() on null in D:\x\htdocs\m1\app\design\frontend\rwd\default\template\catalog\product\view.phtml on line 42


texts: Customer getUpdateAt() doens't return correct datetime?

texts:
I tried to get customer update_at datetime string in Magento 2, but unfortunately it doesn't return correct datetime as it supposed to be.

Here is what I get after dumped \Magento\Customer\Model\Data\Customer object

array (size=28)
  'id' => int 3
  'group_id' => int 1
  'default_billing' => string '2' (length=1)
  'default_shipping' => string '2' (length=1)
  'confirmation' => null
  'created_at' => string '2016-04-13 07:28:54' (length=19) [UCT]
  'updated_at' => string '2016-04-19 04:40:05' (length=19) [UCT]

But inside customer_entity table, it is showing different datetime

2016-04-13 14:28:54 (locale, store time)
2016-04-19 11:50:37 (locale, store time)

Anybody have any idea about this situation?


texts: Magento 2 preference not working for Magento\Customer\Model\Metadata\Form\File

texts:
I want to create preference for this file Magento\Customer\Model\Metadata\Form\File but its not working so please give some solution for this problem how to solve it
di.xml code


texts: Using Onepage item.phtml from own Template

texts:
I am trying to edit the onepage/review/item.phtml to add specific attributes such as "sku" and "shippingtime".

In the onepage checkout a file is loaded from another (not base) template (i had to install  a module to be "german market ready"). I´ve deleted this item.phtml cause I thought Magento would load the onepage/review/item.phtml from the standard template or my template.

The folder structure should be ok:

/app/design/frontend/default/theme254k/template/checkout/onepage/review/item.phtml

Magento is still loading the not existent item.phtml so there are no items in checkout (no item.phtml where Magento wants it).

Did I do something wrong? Why doesn't it load the "new" item.phtml even if old one does not exist?


texts:
I'm using Magento REST API to create products and upload images. No problems so far, but i can't find a way to set an image as the default image to be displayed on the store using the API.

Is there a way to do so without modifying magento?

I'm using Magento CE 1.9.1.0

Thanks,


texts: Magento 2: Attribute set in custom product

texts: I've created new product type, defined in product_types.xml. Then, i've created product with my custom attribure set, but i don't see attributes from this set in admin.


texts: magento 2.3.4: I want to put brand attributes value after the short description

texts:
I tried different xml code but unable to achieve.
I am getting attribute value using below code, but above the sku, I want to place it in the short description block after it's content.
    <referenceContainer name="product.info.price">
        <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.brand" template="product/view/brand_info.phtml" before ="-">
        <arguments>
        <argument name="at_call" xsi:type="string">getBrand</argument>
        <argument name="at_code" xsi:type="string">manufacturer</argument>
        <argument name="css_class" xsi:type="string">brand</argument>
        <argument name="at_label" xsi:type="string">default</argument>
        <argument name="add_attribute" xsi:type="string">itemprop="manufacturer"</argument>
        </arguments>
        </block>
    </referenceContainer>


texts:
Is there any option to init (text/x-magento-init) script after page load? Example, I am working on a simple quickview feature and my controller returns my a layout - phtml file - with rendered html and script with config like this below:

<script type="text/x-magento-init">
{
    "[data-role=swatch-options]": {
        "Magento_Swatches/js/swatch-renderer": {
            "jsonConfig": ...
        }
    }
}

New content is appended to modal wrapper and new popup is initialized. Is there any option to fire (maybe some kind of event od body/document) which triggers again init process for Magento_Swatches/js/swatch-renderer script?


texts: Magento CE 1.8.1 - Write template to page via Ajax Controller function causes blank html result?

texts:
I am trying to write some HTML back to the page via ajax, called from a custom controller.

The Ajax executes correctly but when I try and retrieve the template and write it to the page, the HTML output is always blank. I cannot figure out how to retrieve the template successfully to write it's contents to the page.

My Controller:
MyModule/Ajax/controllers/ProductController.php

require_once 'Mage/Catalog/controllers/ProductController.php';

class MyModule_Ajax_ProductController extends Mage_Catalog_ProductController {

    public function indexAction() {

        if ($product = $this->_initProduct()) {

            $product->getData();
            $helper = Mage::helper('catalog/product_view');

            $json_product = array('name' => ''.$helper->htmlEscape($product->getName()).'',
                        'url' => ''.$product->getProductUrl().'',
                        'description' => ''.nl2br($product->getShortDescription()).'',
                        'price' => ''.$product->getFormatedPrice().'');

            $layout = $this->getLayout();
            $update = $layout->getUpdate();
            $update->load('ajax_product_changestyle'); //loading custom handle defined in module's layout .xml file
            $layout->generateXml();
            $layout->generateBlocks();
            $output = $layout->getOutput();

            //$output always seems to be an empty string?!

            $this->getResponse()->setBody(Mage::helper('core')->jsonEncode(array('html' => $output)));

        } else {
            echo Mage::helper('catalog')->__('Product not found');
        }
    }
}

My layout XML:
layout/mymodule_ajax.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <ajax_product_changestyle>
        <remove name="right"/>
        <remove name="left"/>
        <block type="ajax/product" name="root" output="toHtml" template="ajax/product/changestyle.phtml"/>
    </ajax_product_changestyle>
</layout>

My config:

<?xml version="1.0"?>
<config>
    <modules>
        <MyModule_Ajax>
            <version>1.0</version>
        </MyModule_Ajax>
    </modules>
    <frontend>
        <routers>
            <ajax>
                <use>standard</use>
                <args>
                    <module>MyModule_Ajax</module>
                    <frontName>ajax</frontName>
                </args>
            </ajax>
        </routers>
        <layout>
            <updates>
                <ajax>
                    <file>mymodule_ajax.xml</file>
                </ajax>
            </updates>
        </layout>
    </frontend>
</config>

Does anyone know what I am doing wrong?


texts:
I'm using an Instance of Ubuntu 16.04 lts on Google to run a store, but I'd like to point to my domain.
Wich line on Apache2 should I update?


texts: Google Analytics Cross Domain Tracking in Magento 2

texts:
I'm not hugely familiar with Magento 2. I have Google Analytics set up through Magento 2 by going through the settings:
Stores > Configuration > Sales > Google API
But there is no option for cross domain tracking.
When  I have looked up online, I just find articles about e-commerce tracking or, how to do cross domain tracking through Google Tag Manager. I need to know how to do it through Magento 2.
I'm assuming we're going to have to access the file that houses the GA code because I don't see the option in the Magento UI, I wanted to check if there was another way before going down this route.


texts:
I have a client call and say he could not re-index after importing 100 products. I attempted to re-index in shell and received this error

exception 'PDOException' with message 'SQLSTATE23000: Integrity constraint violation: 1062 Duplicate entry '9243-159-1-555' for key 'PRIMARY'' in

I learned that the client was testing his 100 new products on the production server (and not staging), seeing that we have a Staging and Development server.


texts: Redirect to third party payment gateway using POST authentication without any server side redirection

texts:
I am new in magento development. i am developing payment gateway and i am stucked on checkout process please help me to out. I couldn't find how to do this let say

I don't find how to do following tasks

User submit checkout page then he will redirect to third party site fill credentials on site and site will redirect to specific url for complete checkout
How generate Cancel Url and Accept url ( url for complete checkout process ) because gateway need. Gateway will redirect to Cancel url if user click on cancel button on gateway site but if he successfull in payment then redirect to complete url with some post data

Please help me to solve this problem; i can't use curl or any sort of php server side post validations


texts: Magento 2 - Get category id of products in shopping cart

texts:
I would like to get category IDs and name of products in shopping cart.

$product = $this->_session->getQuote()->getAllVisibleItems()->getProduct();
$category = $this->_category->getCategoryIds($product);


texts: Magento 2 : Minimum Cart Value for Certain Category

texts:
We need to setup a rules to ensure below is satisfied.

When an item is added only from category x then minimum cart price should be set to 25
When an item is added from category x and also has items from other categories then the minimum cart value should be set to 100.

I'm not sure how to achieve this, I tried setting up cart rules but didn't helped me. Any idea or inputs will be great.
Thanks


texts:
I need to set a magento website on local computer. While loading the website on local computer the page is not loading. This is the apache log.

[Tue Dec 26 23:25:23.551700 2017] [negotiation:error] [pid 8462]
[client 127.0.0.1:38922] AH00687: Negotiation: discovered file(s) matching request: $
[Tue Dec 26 23:25:23.871522 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP Fatal error:  Call to a member function getCode() on boolean in /v$
[Tue Dec 26 23:25:23.871549 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP Stack trace:
[Tue Dec 26 23:25:23.871561 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP   1. {main}() /var/www/stage.elb2b.online/index.php:0
[Tue Dec 26 23:25:23.871570 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP   2. Mage::run() /var/www/stage.elb2b.online/index.php:71
[Tue Dec 26 23:25:23.871578 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP   3. Mage_Core_Model_App->run() /var/www/stage.elb2b.online/app/Ma$
[Tue Dec 26 23:25:23.871587 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP   4. Mage_Core_Controller_Varien_Front->dispatch() /var/www/stage.$
[Tue Dec 26 23:25:23.871596 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP   5. Mage_Core_Controller_Varien_Router_Standard->match() /var/www$
[Tue Dec 26 23:25:23.871604 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP   6. Mage_Core_Controller_Varien_Action->dispatch() /var/www/stage$
[Tue Dec 26 23:25:23.871612 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP   7. Mage_Install_IndexController->preDispatch() /var/www/stage.el$
[Tue Dec 26 23:25:23.871621 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP   8. Mage_Core_Controller_Varien_Action->preDispatch() /var/www/st$
[Tue Dec 26 23:25:23.871628 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP   9. Mage::dispatchEvent() /var/www/stage.elb2b.online/app/code/co$
[Tue Dec 26 23:25:23.871637 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP  10. Mage_Core_Model_App->dispatchEvent() /var/www/stage.elb2b.onl$
[Tue Dec 26 23:25:23.871644 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP  11. Mage_Core_Model_App->_callObserverMethod() /var/www/stage.elb$
[Tue Dec 26 23:25:23.871653 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP  12. MageWorx_CurrencySwitcher_Model_Observer->currencyAutoswitch($
[Tue Dec 26 23:25:23.871660 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP  13. MageWorx_GeoIP_Model_Geoip->getCurrentLocation() /var/www/sta$
[Tue Dec 26 23:25:23.871668 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP  14. Mage::getSingleton() /var/www/stage.elb2b.online/app/code/loc$
[Tue Dec 26 23:25:23.871675 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP  15. Mage::getModel() /var/www/stage.elb2b.online/app/Mage.php:477
[Tue Dec 26 23:25:23.871683 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP  16. Mage_Core_Model_Config->getModelInstance() /var/www/stage.elb$
[Tue Dec 26 23:25:23.871691 2017] [:error] [pid 8462] [client 127.0.0.1:38922] PHP  17. Mage_Customer_Model_Session->__construct() /var/www/stage.elb$

Can you please suggest how can I solve the problem. Any suggestion would be helpful.


texts: Shopping Cart Increment / Decrment Not Working

texts:
                <button title="Decrease Qty" onclick="changeQty('<?php echo 'qty_'.$_item->getId() ?>',0); return false;" class="decrease"><?php echo $this->__('-') ?></button>

            <input id="<?php echo 'qty_'.$_item->getId() ?>" name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" size="4" title="<?php echo $this->__('Qty') ?>" class="input-text qty" maxlength="12"  readonly/>

                <button title="Increase Qty" onclick="changeQty('<?php echo 'qty_'.$_item->getId() ?>',1); return false;" class="increase"><?php echo $this->__('+') ?></button>

Js

error

changeQty not defined

I don't know what is the problem


texts:
I have added four different attributes that the user should be able to filter by in the category page, namely size, brand, color and style.
All of these attributes are shown correctly on the category page, however they are also all required to be selected in the product page.
I only want the user to specify the size when adding the product to the cart and not the 3 other attributes. How do I remove the other attributes from the product page?


texts: How magento 1.7 creates new shipment from admin area?

texts: I have the following problem with magento 1.7.0.2 - shipment and invoice emails are not sent to the customer who placed the order. However, these emails are sent to the email addresses that are set in magento area in Send Invoice Email Copy To and Send Shipment Email Copy To. I've managed to track the process of sending these emails in magento core files but I cannot find where and how magento admin area calls a function to create a new shipment when the button submit shipment is clicked. If you have any suggestions please help.


texts: Same front-end action triggers different events?

texts:
On the front-end, a user can save his account information (name, address, etc.). Let's call this action user-save.

I'm finding that when the user doesn't have any address information, user-save triggers the customer_save_after event. The observer then provides a Mage_Customer_Model_Customer object, which lacks address information, understandably.

If he has at least one address saved, user-save triggers customer_address_save_after. Then the observer provides a Mage_Customer_Model_Address object, which has all of the user info.

Am I getting this right? Why is this?

UPDATE:
Actually it looks like when a customer has addresses in his account, customer_address_save_after is triggered in addition to customer_save_after, once for each address.


texts:
I'm trying to use soap API. Answer contains : The sort order has to be specified as %1 for ascending order or %2 for descending order. What i'm doing wrong?
request:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:def="http://xxx/Magento-2-0-2-0-ce/soap/default?services=salesOrderRepositoryV1">
   <soap:Header/>
   <soap:Body>
      <def:salesOrderRepositoryV1GetListRequest>
         <searchCriteria>
            <filterGroups>
               <!--Zero or more repetitions:-->
               <item>
                  <!--Optional:-->
                  <filters>
                     <!--Zero or more repetitions:-->
                     <item>
                        <field>*</field>
                        <value>*</value>
                        <!--Optional:-->
                        <conditionType>?</conditionType>
                     </item>
                  </filters>
               </item>
            </filterGroups>
            <!--Optional:-->
            <sortOrders>
               <!--Zero or more repetitions:-->
               <item>
                  <field>Name</field>
                  <direction>%1</direction>
               </item>
            </sortOrders>
            <!--Optional:-->
            <pageSize>10</pageSize><currentPage>0</currentPage>
            <!--Optional:-->

         </searchCriteria>
      </def:salesOrderRepositoryV1GetListRequest>
   </soap:Body>
</soap:Envelope>

response:

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
   <env:Body>
      <env:Fault>
         <env:Code>
            <env:Value>env:Sender</env:Value>
         </env:Code>
         <env:Reason>
            <env:Text xml:lang="en">The sort order has to be specified as %1 for ascending order or %2 for descending order.</env:Text>
         </env:Reason>
      </env:Fault>
   </env:Body>
</env:Envelope>


texts: Magento 2: Discount in row total, incorrect rounding by 1 cent

texts:
Where can I configure how Magento does round?
I have the issue that it seems to alternate the rounding method.

I got an order with 3 lines, each having subtotal of 22.50, Discount is 25%. Now it does for the first line calculate a discount of 16.87, second 16.88, third 16.87.
Correct would be 16.88 or 16.875.

I have magento-2.1.9 installed.


texts:
I am working on magento-2.

After added the products into cart, minicart is not showing any products even if the added product exists in the checkout/cart page.

After long refresh, this minicart works.l haven't change the phtml file of the minicart.


texts:
we are installing magento and seeing Composer install magento: Class PayPal\Braintree\Console\VaultMigrate does not exist
Braintree is neither required neither replaced ...
How can it go missing? Or is something 'not requiring' that was replaced?
In ClassReader.php line 26:

  Class PayPal\Braintree\Console\VaultMigrate does not exist

Adding via require also does not work
[InvalidArgumentException]
Package magento/module-braintree at version  has a PHP requirement incompatible with your PHP version (7.4.11)
1 exception(s):
Exception #0 (Magento\Framework\Exception\FileSystemException): The contents from the "/vendor/paypal/module-braintree-core/etc/module.xml" file can't be read. Warning!file_get_contents(/vendor/paypal/module-braintree-core/etc/module.xml): failed to open stream: No such file or directory


texts: Same Customer Id Is Coming Up Every Time

texts:
I have made a custom link in My account section of customers.  I want to get the customer's id with the click of button in another custom page (can\Test\Account).  The customer id is not changing.

For example: Rahul logs in and goes to his My account section and clicks on a custom link then his customer id say 16 is appearing on can\Test\Account but if another customer with id of 18 comes log in and clicks on link in My account section then also 16 is appearing.

BLOCK code:

<?php
namespace SimplifiedMagento\Custom2\Block;
class Details extends \Magento\Framework\View\Element\Template
{
    protected $_customerSession;

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Customer\Model\SessionFactory $customerSessionFactory
       // array $data = []
    ) {

        $this->_customerSession = $customerSessionFactory;
    parent::__construct($context/*, $data*/);
    }

    public function getDetails() {
        $obj = $this->_customerSession->create();
        if($obj->isLoggedIn()){
            echo $obj->getId();
           }
    }
}
?>

phtml:

<?php $block->getDetails();?>

Layout:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer_account_navigation">
            <block class="Magento\Framework\View\Element\Html\Link\Current" name="demo-link">
                <arguments>
                    <argument name="path" xsi:type="string">can/Test/Account</argument>
                    <argument name="label" xsi:type="string">Employee details</argument>
                </arguments>
            </block>
        </referenceBlock>
    </body>
</page>


texts: When to truncate the core_session table?

texts:
I have roughly 35,500 rows of session data in this table. Is that a lot? Would this cause problems? How much is generally too much? Should i truncate it?

It seems to be a problem so I was thinking of truncating it.

New Relic is giving me a list of most time consuming mysql queries.

Thoughts?


texts: get admin order grid content block blank when enable https

texts:
When enable ssl or https it gives blank content area.
have debug using this code from index.php register_shutdown_function("fatal_handler");

function fatal_handler() {
    $error = error_get_last();
    echo("<pre>");
    print_r($error);
}

and give error like

   Array
(
    [type] => 2
    [message] => vsprintf(): Too few arguments
    [file] => /var/www/host/public_html/app/code/core/Mage/Core/Model/Translate.php
    [line] => 416
)

have check all translation file but nothing found.can anyone please guide me on this.


texts: Magento: Allow customer to add item only once to cart?

texts:
I'm wondering if it's possible to only allow the customer to add an item into the basket once so trying to add it again would result in something like

"this item is already in your basket"

Any help would be appreicated as I've searched high and low for an answer but the only thing I have found is limiting the number of products actually in the cart to 1 which is no good.


texts: Magento 2 Images not showing in Frontend

texts:
I installed Magento 2 on a new fresh installed VPS, running Debian 8. Magento is installed and I can seem to be working OK, but I cannot see any images on the front end and when I look in the catalog.

I'm running Apache 2.4, PHP 5.6 and MySQL 5.6


texts: Filter on order comment history in order grid magento 1

texts:
I have added an column to the magento 1 order grid. it renders the order history of the order.
I have made a renderer with the following code:
class Mage_Adminhtml_Block_Sales_Order_Renderer_Red extends

Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
    public function render(Varien_Object $row)
    {
        $orderId = $row->getId();
        $order = Mage::getModel('sales/order')->load($orderId);
        $history = $order->getStatusHistoryCollection()->getFirstItem();
        return $history->getComment();
    }
}

And added it to the add column:
'history' => array(
'header' => Mage::helper('sales')->__('History status'),
'type'  => 'text',
'renderer' => new Mage_Adminhtml_Block_Sales_Order_Renderer_Red,
),

My question is:
How can i filter on the text that is displayed in the order grid?
Thanks.


texts: Is there a way to show a different set of product images based on the product category?

texts:
I'm selling eyewear and am currently running Magento 1.9.0.1 (still in development). Each SKU is the frame. My category hierarchy is:
Men
 -> Eyewear
 -> Sunglasses
Women
 -> Eyewear
 -> Sunglasses

It's possible that a frame belongs to all the above categories. For certain frames, I have photos of that frames with sunglass lenses and some with regular eyewear lenses. I want to only show the sunglass lens photos on the product page if the item was selected under the sunglass category, and only show the optical lens photos if the item was found under the eyewear category.

As an example, if the user navigates to Women -> Sunglasses and then clicks a picture of awesome-frame-1 with sunglass lenses, they'll go to
http://www.myeyewearsite.com/women/sunglasses/awesome-frame1.html
and I want the default product image on the product page to be a photo of awesome-frame1 with sunglass lenses, the same image they clicked on from the catalog page to get there. Conversely, if the user navigates to Women -> Eyewear and then clicks a picture of awesome-frame-1 with eyewear (non-sun) lenses, they'll go to http://www.myeyewearsite.com/women/eyewear/awesome-frame1.html and I want the default product image on the product page to be a photo of awesome-frame1 with eyewear (non-sun) lenses, the same image they clicked on from the catalog page.

If you're wondering why I don't just use a different SKU for sun vs eyewear, it's because we are working with a 3rd party that is charging us based on the number of SKUs. So, we're trying to keep them to a minimum.

Is there a way to present only a subset of product images based on its category? I've spent hours playing around in my CMS and haven't found a way to do it through there. I was unable to find an answer looking at other questions asked in this forum either, so any guidance would be appreciated.


texts: Cart Price Rule uses Configurable's Category instead of Simple's

texts:
I want a cart price rule to only be active for certain simple products under a configurable product, but so far I've been unable to accomplish this. Any ideas?

One thing I've tried was to create a category to assign all simple products to, but Magento seems to only be checking the configurable product's category in this case.

Here's the rule:

-ACTIONS: Apply 20 percent of product price discount.

if ALL of these conditions are TRUE:
Category is not one of 6, 12, 14, 27

I've tried adding an additional SKU condition ("is not one of...") with no success.


texts: Magento 2 - Images randomly not loading on Product Page

texts:
I am unsure what is causing this issue, but images are randomly not loading on the front-end of a live website. This issue came about yesterday and there doesn't seem to be an obvious fix.

Refreshing the page SOMETIMES fixes the issue, but another product will just randomly break.

I have tried the following techniques:

Flushing cache
Flushing Image Cache
Flushing JS/CC
Reindexing
Putting the site in maintenance mode and upgrading/compiling/deploying static files

I really do not want to run the "resize" function due to the size of the website.

Any tips? It's strange because it's completely random. I have tried it on multiple browsers with no changes.

I'm fairly new to Magento, so I apologize if I'm missing something that is obvious. Cheers.


texts: How can I create a date field by using system.xml?


texts: Can't add menu item in admin menu in magento 2

texts:
I am trying to add test menu item in admin menu in magento 2, like it is described here: Adding a Menu to the Left Side but menu item is not showing. What I miss or doing wrong ? Extension is enabled, cache disabled, commands executed:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy

/app/code/Rockforweb/Stuller/etc/adminhtml/menu.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="Rockforweb_Stuller::top_level_example"
             title="Top Level Example"
             module="Rockforweb_Stuller"
             sortOrder="9999"
             resource="Magento_Backend::content"
            />
    </menu>
</config>


texts: How to implement translations in design template package CSV's? How does echo $this->__('Text') work?

texts:
I have a design package setup like so:

design/frontend/package_name/theme_name/locale/

under which I have

de_DE, en_GB etc, under which I have corresponding translate.csv files with the various strings: "Key", "Translation"

I am trying to implement various strings in my theme using echo $this->__('Text')

However, it doesn't seem to work (I only see the string inside the ('Text') displayed). I think I am missing some fundamental understanding of when Magento pulls strings from the CSV to be translated. Can someone please explain how to get these csv files to work?


texts: How to create payment gateway module that will redirect to external page

texts: how can i create a payment gateway module that will redirect the customer to an external url when the customer places an order? I have tried using ultimate module creator but my module isn't appearing in the payment methods tab in the configurations menu.


texts: Magento2 : How to get last order id in payment module template file

texts:
I am creating a custom payment method module in magento2.

On order place redirecting to to my request controller from script. In request controller I have below code :

...
$resultPage = $this->_pageFactory->create();
$resultPage->addHandle('custom_request_index');
return $resultPage;
...

In xml file added template file form.phtml and it is loading on the page.

All are working but I am trying to get last order id in form.phtml file as below :

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$checkout_session = $objectManager->get('\Magento\Checkout\Model\Session');
$incrementId = $checkout_session->getLastRealOrderId();
echo $incrementId;

But above code returning nothing. But when I try to log same code in request controller then it returns correct order id.

I have also tried to add a function in block file to get order id in template file like $block->getLastOrder() but this function also returning nothing, while other functions in block file working properly.

Why this is happening? How to get last order id in form.phtml file?


texts: Adding data to the admin's view customer page

texts:
So we're currently working on an additional process where customers will be segmented to special customers based on the required government ID they upload.
I added this extension: https://github.com/kishan-cybercom/sk-profile-picture so users are now able to upload their "IDs" on their end, but I can't figure out how to make it appear on the admin's view as the admin's the one to segment the customers.
Hoping for help! :)
I tried adding customer attribute field extension as well, but it's limited to data sets so there was no field for images.


texts: Magento 2: How to get JSON API Variable in Model

texts:
Below is the REST API called on Checkout Page, when you have multiple address & u click on "Ship here"

magento/rest/default/V1/carts/mine/estimate-shipping-methods-by-address-id

It passes addressId variable as a POST

How to get that variable in Model?

magento\vendor\magento\module-dhl\Model\Carrier.php

protected function _buildQuotesRequestXml() {
    // Need to get addressId variable here
}

I need it because for Hong Kong it's not passing City for Saved Address.

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


texts: Changing country name (Ireland to be Republic of Ireland) in Magento 2

texts:
I need to change Ireland to the Republic of Ireland. No matter what I change and clear the caches it does not update

I have tried editing

vendor/magento/zendframework1/library/Zend/Locale/Data/Translation.php
vendor/magento/zendframework1/library/Zend/Locale/Data/en.xml

Along with adding Ireland to the the en_GB.csv in my il8n file

Could anyone else advise


texts: Magento 1.9 : How to override/overwrite customer module core files

texts:
I need to add some custom controller actions in customer module core files in magento. How I can do this without touching the core files? I need to update the following files from the core customer module:

frontend/base/default/layout/customer.xml

app/code/core/mage/customer/controller/AccountController.php, navigation

frontend/base/default/template/customer/account/navigation.phtml

frontend/base/default/template/persistent/customer/form/register.phtml

Another file is the theme file which I also need to override/overwrite:

frontend/mtghost/default/template/catalog/product/view.phtml

Any help would be appreciated.


texts: Magento module's block code is working in product details page but not working in category and list page?

texts:
In magento I am writing one module. In my module lets say I have mymodule.xml where I want to insert my own block after this block

<catalog_product_view>
    <reference name="product.info">
      <block type="test/test" name="test" as="other" template="test/test.phtml" >
        <block type="test/test" name="test_info" as="test_info" template="test/testinfo.phtml" />
      </block>
    </reference>
  </catalog_product_view>

This one is working fine in product details view page but when I am trying to show the same block  in product category view and list view its not working at all.
  The product list category is like this where I am inserting my code from mymodule.xml

    <catalog_product_list>
    <reference name="product.info">
       <block type="test/test" name="test" as="other" template="test/test.phtml" >
        <block type="test/test" name="test_info" as="test_info" template="test/testinfo.phtml" />
      </block>
    </reference>
  </catalog_product_list>

When I am going to check the changes in list view I can't see any changes (after clearing cache). So can someone kindly tell me how to solve this issue. Any help and suggestions wll be really appreciable. Thanks..


texts: After changes in less file setup:static-content:deploy is compulsory

texts:
Most of time spend on setup:upgrade and setup:static-content:deploy.
Is it compulsory to run both command after changes on less file?
I have used Default lUMA theme.


texts:
So I have added a custom button and onclick function to the edit product page, the button appears fine. I have set an onclick function, and the code for this runs when the edit product page is loaded, but not when I click the button. I only need it to run if the button is clicked. I have overridden the Mage/Adminhtml/Block/Catalog/Product/Edit.php and added the following code:

Add to the end of the peraperlayout function:

$this->_product = $this->getProduct();
            $this->setChild('printbarcode_button',
            $this->getLayout()->createBlock('adminhtml/widget_button')
                ->setData(array(
                'label'     => 'Print Barcode',
                'onclick'   => $this->getPrintLabelUrl()
            ))
        );

added:

public function getBarcodeButtonHtml()
    {
        return $this->getChildHtml('printbarcode_button');
    }

amended:

public function getDuplicateButtonHtml()
    {
        return $this->getChildHtml('duplicate_button') . $this->getChildHtml('printbarcode_button');
    }

and the function I have wrote that I want to run on click, and not on load, as it is doing now:

public function getPrintLabelUrl()
    {
        //This downloads a PDF on demand

        try {
            //get param
            $productId = $this->getProductId();
            $qty = 1;
            Mage::log('Trying to autoprint barcodes, SKU: ' . $productId . " Qty: " . $qty, null, 'custom_log.log');
            //create pdf & download
            $obj = mage::getModel('AdvancedStock/Pdf_BarcodeLabels');

            $pdf = $obj->getPdf(array($productId => $qty));

            $fileName = 'barcode.pdf';
            mage::helper('ClientComputer')->printDocument($pdf->render(), $fileName, 'Barcodes : print barcode');
        } catch (Exception $ex) {
            die("Error auto sending PDF to printer: " . $ex->getMessage() . '<p>' . $ex->getTraceAsString());
        }
    }

Any help/guidance would be appreciated

Thanks


texts: How to get attributes of product from collection with our custom attribute property condition in magento

texts:
I want to show custom product comparison with standard products on the product page but the attributes that are used to compare the products may be different than magento comparision.

So I followed https://gielberkers.com/add-custom-properties-magento this blog to add the custom property to every attribute, depending on the value of this newly added  property I want to show the attribute in comparison. then i have created another attribute from admin panel for product and will store the similar standard products id's in that.

After that i have registered a module created a block, fetched the current product and using the attribute which i have created from admin panel, fetched the id's of similar standard products and created collection of then, they can be 2 or 3 products

$collection=Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->addFieldToFilter('entity_id', array('in' => array($productIds)));

This is how collection is created

Now i have to fetch ALL the attributes of products in collection and check if the newly added property(which is added to every attribute it's type is text and i'm giving value yes if i want to show that attribute) of each attribute, if it is yes then i have to show the attribute, how to do this ?
Am i going in a right direction,

Thanks in advance


texts: Will using async or bulk endpoints actually improve performance of import processes?

texts:
We have a multi-store setup with 16 stores and every store has it's own language, we have a lot of store-specific information. Most of our products are configurable products with lots of variants, so all in all we have about 6000 simple or configurable products.

We have a middleware in place that manages upload of categories, product and media via Magento2's synchronous REST API. This middleware has its own message queues and concurrency management. I played a bit around and ended up with about 5 concurrent workers as the best tradeoff between performance and Magento-deadlocks.

In the rare case that I have to upload all products, I have to perform about 6000 products * 16 stores = ~ 100.000 API calls which takes a lot of time, eventough our instance is running on an AWS t2.2xlarge instances. Usually it takes more then 24 hours.

I understand how utilizing bulk or asynchronous APIs can facilitate and optimize things when you don't have a message queue in place yet. But do you think switching over to async or bulk APIs could still signifantly optimize performance compared to our solution? I don't want to optimize just the time it takes to hand over a task to Magento but I want to optimize the time it takes a change actually is applied and becomes visible for the customer. If Magento's bulk/async APIs use the exact same internal APIs as the sync-API, I don't see any potential optimizations except saving network latency here. What do you think?


texts: Magento site not showing product images and main banner

texts:
I have recently moved my client site arabianglitz.com to a new hosting and using magento 1.9.2.4 in it.

For cache using a full page cache and maxcdn as well. As the site was moved to a new hosting full page cache ask me to setup a cron job which I did via cpanel.

Now my client site main home page banners and all product images are gone...

Help needed.


texts: Are there any event will be dispatched after the user adding/editing the rules in Promotions->Catalog price rules/Shopping cart price rules, i'm going to write a module to log these actions.


texts: How to disable autofill Magento login in Magento?

texts:
When I enter to my login page the login form is filled automatically without even typing anything, this is pseudo-code

        <?php echo $this->__('Email Address') ?> *
        <input type="text" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />

        <?php echo $this->__('Password') ?> *
        <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />

How can I prevent this autofill, I have tested with jquery disable autocomplete plugin and it does not work

Thanks in advance


texts: Show custom tab only for specific attribut set

texts:
I have custom tab in product page admin panel. I want to show that tab only if product attribute set is equals to "Frame" in both add product and edit product page. I have tried with xml but its not working

<adminhtml_catalog_product_edit>
    <PRODUCT_ATTRIBUTE_SET_ID_9>
    <reference name="product_tabs">
        <action method="addTab">
            <name>my_custom_edittab</name>
            <block>customtabs/adminhtml_catalog_product_edittab</block>
        </action>
    </reference>
    </PRODUCT_ATTRIBUTE_SET_ID_9>
</adminhtml_catalog_product_edit>

<adminhtml_catalog_product_new>
    <PRODUCT_ATTRIBUTE_SET_ID_9>
    <reference name="product_tabs">
        <action method="addTab">
            <name>my_custom_tab</name>
            <block>customtabs/adminhtml_catalog_product_tab</block>
        </action>
    </reference>
    </PRODUCT_ATTRIBUTE_SET_ID_9>
</adminhtml_catalog_product_new>


texts: Magento 2 File Upload Issue with Multiple Fields in Admin side

texts:
I have two fields in admin side form. Logo and brand_product_image. I am using following code to upload file and save in database.

$fields = array('logo','brand_product_image');

                foreach($fields as $field):
                     $uploader = $this->_objectManager->create(
                        'Magento\MediaStorage\Model\File\Uploader', ['fileId' => $field]
                );
                $uploader->setAllowedExtensions(['jpg', 'jpeg', 'gif', 'png']);
                /** @var \Magento\Framework\Image\Adapter\AdapterInterface $imageAdapter */
                $imageAdapter = $this->_objectManager->get('Magento\Framework\Image\AdapterFactory')->create();
                $uploader->setAllowRenameFiles(true);
                $uploader->setFilesDispersion(true);
                /** @var \Magento\Framework\Filesystem\Directory\Read $mediaDirectory */
                $mediaDirectory = $this->_objectManager->get('Magento\Framework\Filesystem')
                        ->getDirectoryRead(DirectoryList::MEDIA);
                $result = $uploader->save($mediaDirectory->getAbsolutePath('brand'));
                if ($result['error'] == 0) {
                    $data[$field] = 'brand' . $result['file'];
                }
                endforeach;

When i am saving data m not getting value of brand_product_image. But i if remove logo from $fields array i am getting value of it.

Please provide some solution.


texts:
I'm busy developing a Magento 2 theme. Now I updated my local and production server to Magento 2 (the latest release from yesterday). Since this version I get this error when I try to add a product to the cart:

We can't add this item to your shopping cart right now.

This is a general error, so it's hard to find out what the real error is here. I checked all standard stuff, like if the item is in stock etc. I disabled my theme to check if it's something in my theme, but the error was still thrown after this.

In the log file I did find this error:

main.CRITICAL: Exception message: Each getter must have description with @return annotation. See Magento\Tax\Api\Data\TaxDetailsInterface::getSubtotal()

If I open this file, I see this:

/**
 * Get subtotal
 *
 * @return float
 */
public function getSubtotal();

This does look like a fine annotation to me. I have this on multiple installations now.

Does anyone have the same error?


texts: Magento 2 Remove Javascript from requirejs in child theme

texts:
We're extending the Magento_Blank theme to create our own child theme. Magento_Blank includes some js via require_js theme.js and responsive.js` which are not required.

I cannot figure out how to remove these from my child theme. I tried creating a blank requirejs-config.js in Magento_Theme which didn't seem to work.

How can I do this ? I'd rather not create blank files for each as this will mean we have network requests which have no purpose.


texts: Magento 2.2 I want to add plyr.js for Vimeo video, I'm getting requirjs error and Class.extend is not a function, how to solve it?

texts:
Error
1) Class.extend is not a function.
2)RequireJS
   Error: Mismatched anonymous define() module: function (_, utils, wrapper) {
    'use strict';
3) I'm getting black screeninsted to Video.
----------
Here are my code

require([<?php echo $block->getViewFileUrl("plyr/plyr.js")?>'], function (plyr) {
   plyr.setup('.js-player');
});


texts:
I have updated our website page layout so that the main product image is 12 columns width at the top of the page, but the site seems to still force the images to be 363px wide. The site theme is Ultimo.
Where do I find the setting for this image size please as I've looked through the configuration and can't see it:

http://www.forefrontcases.co.uk/apple-ipad-mini-with-retina-display-purple-clam-shell-leather-case

Thanks in advance.


texts: Magento2 emojone script included in magento

texts:
In my Magento2 - I noticed that it is downloading a script emojione.min.js from https://cdn.jsdelivr.net/emojione/2.2.7/lib/js/emojione.min.js.

is it a default magento script?
I also tried to find out how it is included, but couldn't find any reference to this JS file either in my filesystem or database.
So I think the same is being included by some malware.

I need some help to fix it.


texts: compile returns error with theme extension

texts:
When I run

php bin/magento setup:di:compile

I get an error with one of my theme's extensions:

  Fatal error: Class 'Hybrid_Provider_Model_OAuth2' not found in
  /var/www/html/app/code/MageBig/SocialLogin/Model/Providers/Amazon.php
  on line 26


texts:
This is what I am trying to do:

{{if var data.request_quote=="on"}} Yes {{else}} No {{/if}}

Where var data.request_quote is a form variable. It keeps coming out as No, even if data.request_quote is on.


texts:
Im using the latest version of magmi on my installation (magento 1.9.3.4)

When I run a import to update a single attribute it stops on 1.

It also says 'Initialized attribute_set_infos!'

Has anyone had the same problem or does anyone have any ideas. Thanks

The file im tyring to import is simply 2 products to test. With headers 'sku' and 'order_code' (.csv file with UTF-8 formatting.)

sku,order_code
testproduct,TEST
9015-2160,TU05122

I know this is a Magmi issue and not exactly Magento but I always get good support from this community and I have used the magmi tag. Thanks again


texts:
Unable to save or update products in Magento ver. 1.9.1.0.

When I go to save a product record in admin, it returns with onscreen error message

  There is no active transaction

and no changes are saved.

The function which was overridden

public function saveEntityIndexes($storeId, $entityIndexes, $entity = 'product')
    {
            $adapter = $this->_getWriteAdapter();
            $data   = array();
            $storeId = (int)$storeId;
            $str = "";
            foreach ($entityIndexes as $entityId => &$index) {
                    $data = array(
                            (int)$entityId,
                            $storeId,
                            '"'.addslashes($index['data_index']).'"',
                            '"'.addslashes($index['name']).'"',
                            '"'.addslashes($index['name_attributes']).'"',
                            '"'.addslashes($index['category']).'"',
                            '"'.addslashes($index['manufacturer']).'"',
                            '"'.addslashes($index['product_type']).'"',
                            '"'.addslashes($index['product_color']).'"',
                            '"'.addslashes($index['product_img']).'"',
                            '"'.addslashes($index['product_url_path']).'"',
                            '"'.addslashes($index['default_sort']).'"'
                    );
                    $str .= '('. implode(', ', $data) . '),';
            }
            $str = rtrim($str, ',');
            if ($data) {
                $query =  'INSERT INTO `sphinx_catalogsearch_fulltext` (`product_id`,`store_id`,`data_index`,`name`,`name_attributes`,`category`,`manufacturer`,`product_type`,`product_color`,`product_img`,`product_url_path`,`default_sort`)'
                . 'VALUES ' . $str
                . ' ON DUPLICATE KEY UPDATE `data_index` = VALUES(`data_index`), `name` = VALUES(`name`), `name_attributes` = VALUES(`name_attributes`), `category` = VALUES(`category`), `manufacturer` = VALUES(`manufacturer`), `product_type` = VALUES(`product_type`), `product_color` = VALUES(`product_color`), `product_img` = VALUES(`product_img`), `product_url_path` = VALUES(`product_url_path`), `default_sort` = VALUES(`default_sort`)';

                $resource = Mage::getSingleton('core/resource');
                $writeConnection = $resource->getConnection('core_write');
                $writeConnection->query($query);
                $writeConnection->closeConnection();
            }

            return $this;
    }


texts: Resolved - Add Product Thumbnails to Custom Grid

texts:
I have created a custom module with grid. Now trying to add the product thumbnails to this grid, but the $val in renderer file is empty and images don't show up (see image below).

[![custom module grid images don't show up][1]][1]

Here is the renderer file at ....\Block\Adminhtml\Template\Grid\Renderer\Image.php

class Cpstest_ProductComment_Block_Adminhtml_Template_Grid_Renderer_Image extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
    public function render(Varien_Object $row)
    {
        return $this->_getValue($row);
    }

    protected function _getValue(Varien_Object $row)
    {
        $val = $row->getData($this->getColumn()->getIndex());
        $val = str_replace("no_selection", "", $val);
        $url = Mage::getBaseUrl('media') . 'catalog/product/' . $val;
        $out = "<img src=". $url ." width='60px'/>";
        return $out;
    }
}

And the column code in Grid.php

$this->addColumn('image', array(
    'header'   => Mage::helper('catalog')->__('Image'),
    'align'    => 'left',
    'index'    => 'image',
    'width'    => '70',
    'renderer' => 'Cpstest_ProductComment_Block_Adminhtml_Template_Grid_Renderer_Image'
));

Thanks for any suggestions.


texts: How to delete compare and shop by function in Magento 2

texts:
I'd like to delete all the compare and shop-by functions completely,
how can I do this through the cpanel?

Thank you.


texts: Magento 2 css js all can't be loaded after upgrade

texts:
After i upgraded the magento 2 from 2.1 to 2.1.5, all can't be loaded

All css & javascript links are like this

http://example.com/pub/static/version1491232244/frontend/Magento/luma/en_US/css/styles-l.css

with version1491232244, the path is wrong, if i remove version1491232244, the resource can be loaded, anyone know what is the problem?

it seems the nginx rewrite problem?

My current config:

    location /static/ {
            # Uncomment the following line in production mode
            # expires max;

            # Remove signature of the static files that is used to overcome the browser cache
            location ~ ^/static/version {
                    rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
            }

            location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
                    add_header Cache-Control "public";
                    add_header X-Frame-Options "SAMEORIGIN";
                    expires +1y;

                    if (!-f $request_filename) {
                            rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
                    }
            }

            location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
                    add_header Cache-Control "no-store";
                    add_header X-Frame-Options "SAMEORIGIN";
                    expires    off;

                    if (!-f $request_filename) {
                       rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
                    }
            }

            if (!-f $request_filename) {
                    rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
            }

            add_header X-Frame-Options "SAMEORIGIN";
    }


texts: Admin session expiry not working despite being set in admin and php settings

texts:
Admin session expiry is not working in Magento 2 (2.3.5-p1).
We have it set in the backend admin configuration:

We also have it set in the php session.gc_maxlifetime:

Still though, session expiry in backend is less than an hour (I am not sure how long exactly).
I am unsure what else I can try...
Session files were being saved to /var/lib/php/session on the server although we have just defined a path within Magento environment at var/session to see if this makes a difference.
The website is running PHP as FPM application served by nginx (if that helps or makes a difference).


texts:
<file> tag in layout file.

I have use one third party extension. In their layout file they have use the below code.

<action method="addJs">
     <file helper="rewardssocial/purchase_share/getJs" />
     <script>tbt/rewardssocial/purchase/share/reward.js</script>
</action>

I don't know what the purpose of the file tag in that.


texts:
I want to use Displaze Protoshow slideshow on my home CMS page. The following code is suggested by Displaze to insert the slideshow in a CMS page:

{{block type="myslideshow/slideshow" template="displaze/myslideshow/slideshow.phtml"}}

If I use this code, I get the following error when the home page is loaded:

 ERR (3): Warning: include(): Filename cannot be empty  in /var/www/mage/app/code/core/Mage/Core/Block/Template.php

So I tried to use

{{block type="Displaze_MySlideshow_Block_Slideshow" setTemplate="displaze/myslideshow/slideshow.phtml"}}

The error is gone, but the block is still not rendered.

On request the block code:

class Displaze_MySlideshow_Block_Slideshow extends Mage_Core_Block_Template
{

/* Some function */
}

The extension etc/config.xml code:

<config>
<modules>
    <Displaze_MySlideshow>
        <version>1.7.1</version>
    </Displaze_MySlideshow>
</modules>

<global>

    <helpers>
        <myslideshow>
            <class>Displaze_MySlideshow_Helper</class>
        </myslideshow>
    </helpers>

    <!-- Global Blocks definition -->
    <blocks>
        <myslideshow>
            <class>Displaze_MySlideshow_Block</class>
        </myslideshow>
    </blocks>
   ...


texts: Bug or Feature? regular_price vs final_price in Magento2

texts:
I am having some weird issue in multi-store with different store currency but same base currency.

For example:

$_product->getPriceInfo()->getPrice('regular_price')->getValue() gives the price in base currency.

While $_product->getPriceInfo()->getPrice('final_price')->getValue() gives price in store currency (i.e. converted value of base currency).
Even same case has been observed with $_product->getFinalPrice()

Questions:

Is this the expected behavior?
How to get final price value in base currency?


texts: What is the right way to get both, the admin translation and the frontend value of a multiselect attribute?

texts:
I am using the following code to fetch  the admin option value as well as the frontend label from an ID list of vales of a multiselect.

    $attribute = $this->eavConfig->getAttribute('catalog_product', self::ATTRIBUTE_CODE);
    $adminAttribute = clone $attribute;
    $adminAttribute->setStoreId(0);

    $result = [];
    foreach(array_unique($allIds) as $id) {
        $description = $attribute->getSource()->getOptionText($id);
        $fileName = $adminAttribute->getSource()->getOptionText($id);
        $result[$fileName] = $description;
    }

In a block on the product list this seems to work, while it does not look clean for me. Anyways, on a product detail page it does not (I get for $fileName still the frontend value, not the admin value).

Is there a proper way to do this?

EDIT I was thinking about loading the product in Admin store, still I get the non-admin-store value:

$adminProduct = $this->_productRepository->getById($product->getId(), false, 0);
$adminProduct->getAttributeText(self::ATTRIBUTE_CODE);


texts: Subtract two Price input types and display result

texts:
I'd like to show visitors to my website an instant savings based on subtracting 2 attributes costnopromo and cost.

If the attributes are the same, then I do not want to display the text, "Save:"

I know I can do this with an if statement, but I do not know how to subtract the 2 attributes.

How do can achieve the following:

costnopromo - cost = savings_value

NOTE: I've searched and came across the method to show a savings based on MSRP and PRICE but this does not meet my requirements as the costnopromo is a custom value.


texts: How to get recently viewed products by customer id?

texts:
I want to expose through a SOAP WS the most recently viewed items of a customer.

How can I reach those items? I know they're stored in 'reports/product_index_viewed'; however, I don't know which is the right way to reach those.

Here's what I got so far:

public function getRecentlyViewedByCustomer($customerId)
{
    Mage::log(__METHOD__);
    $customer = $this->_getCustomer($customerId);
    Mage::log('Getting recently viewed products of '. $customer->getName() .' ('. $customer->getEmail() .'), ID: ' . $customer->getId() );

    $productCollection = Mage::getResourceModel('reports/product_index_viewed');

    Mage::log(print_r($productCollection, true));

    return __METHOD__;
}

public function _getCustomer($customerId)
{
    $customer = Mage::getModel('customer/customer')->load($customerId);
    return $customer;
}


texts:
Using Magento 2.3.1

When admin locale is en_GB it processes dates wrong.
For example filtering orders by date.
The date pickers work correctly so the 1st May comes out as 1/5/2019 but Magento processes this as if it were an American date, e.g. January 5th

If I change to en_US locale it works consistently but I would like to use en_GB.

How can I fix this?


texts: Should I be worried about the latest Zend-Mail RCE Vulnerability similar to the PHP-Mailer/Swift Mailer Vulnerability if I use Magento?

texts:
From the recently disclosed Zend-mail remote code execution vulnerability:

Affected Zend Framework versions:

Zend Framework < 2.4.11    Remote Code Execution (CVE-2016-10034)

zend-mail < 2.4.11

zend-mail < 2.7.2

Should I be worried about this if Magento uses Zend Framework? Does Magento take proper precautions in sanitizing all types of email forms out-of-the-box?


texts: Magento 2 How to Call JavaScript Click Function on Checkout?

texts:
<script type="text/javascript">
    require([ 'jquery', 'jquery/ui'], function($){
    $( "#checkoutnext" ).click(function() {
        alert("Test!");
    });
 });
 </script>

I am using this code on onepagecheckout. but not working any Idea or suggestion


texts: Is it possible to search for multiple content types (products, categories, blogs, articles etc) in Magento? I got the search result for products only. I want to display products when to search for the category name.


texts: Header not showing after changing the language to Arabic

texts:
For adding the language switcher for a website, I created an additional Arabic store view.
When I select the Arabic language in dropdown, the store view changes to Arabic, but the entire header part is not there.

I am using the Homepage style 21 of SM Market Theme. When I inspect the header section of both pages, the class names of body tag is different. English store view is showing header-21-style, where as in the Arabic store view the class name is showing header-1-style. Not sure if this is the reason. It would be very helpful if someone could help me to fix the header. I need to know if I have missed out anything. Thank you in advance.


texts:
there is a problem on my magento 1.9.2
the Currency symbol dosen't shown with the price , I did enabled from admin panel but still doesn't shown

I hope you can help me with it.


texts:
Is there a way to include inline styles after the <title> tag as shown on this image:

If I edit the file default_head_blocks.xml I can only get this to show after the merged css file which defeats the purpose of using critical-css. One possible way is to add this bit of code into default.xml but then the inline css is rendered right at the top of <head> before all the <meta> tags so I'm not sure if this is bad practice or not
<referenceBlock name="require.js">
       <action method="setTemplate">
           <argument name="template" xsi:type="string">Magento_Theme::/header/inline-css.phtml</argument>
       </action>
</referenceBlock>


texts: Magento2: Impossible approve discount code in checkout

texts:
In basket I can approve discount code and work perfect:

but in second step in checkout impossible. After accept discount no result:

@ UPDATE

SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data[Więcej informacji] error-processor.js:28:25


texts:
I have already implemented This solution , but it is not working for me

I am trying to redirect customer after login to different page rather than my account

What i tried

\app\code\Mycompany\Customerhomepage\etc\frontend\events.xml

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/framework/Event/etc/events.xsd">
    <event name="customer_login">
        <observer name="mycompany_customerhomepage_customer_login" instance="Mycompany\Customerhomepage\Observer\Customerlogin"/>
    </event>
</config>

\app\code\Mycompany\Customerhomepage\Observer\Customerlogin.php

<?php

namespace Mycompany\Customerhomepage\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\UrlInterface;
use Magento\Framework\App\ResponseFactory;

/**
 * Class customerlogin
 * @package Mycompany\Customerhomepage\Observer
 */
class customerlogin implements ObserverInterface{
    protected $_responseFactory;
    protected $_url;

    /**
     * @param UrlInterface $url
     * @param ResponseFactory $responseFactory
     */
    public function __construct(
        \Magento\Framework\App\ResponseFactory $responseFactory,
        \Magento\Framework\UrlInterface $url
    ) {
        $this->_responseFactory = $responseFactory;
        $this->_url = $url;
    }
    /**
     * @param Observer $observer
     * @return void
     */
    public function execute(Observer $observer)
    {
        $customerBeforeAuthUrl = $this->_url->getUrl('customerhomepage/index/landing');
        $this->_responseFactory->create()->setRedirect($customerBeforeAuthUrl)->sendResponse();
        die();

    }
}

It also exhibiting in variable behavior , sometime it redirects sometime it does not


texts: How to dynamically load phtml file on a button click in Magento 2

texts:
I have a phtml file view.php and its block class View.php. I need to show that phtml on a modal on checkout page and to do that I'm pre-loading
 phtml file using following code :

<div id="modal-form" >
    <?php include ($block->getTemplateFile('XYZ_module::view.phtml')) ?>
</div>
<script>
    require(
        [
            'jquery',
            'Magento_Ui/js/modal/modal'
        ],
        function(
            $,
            modal
        ) {
            var options = {
                type: 'popup',
                responsive: true,
                innerScroll: true,
                title: 'Some Title',
                buttons: [{
                    text: $.mage.__('Continue'),
                    class: '',
                    click: function () {
                        this.closeModal();
                    }
                }]
            };

            var popup = modal(options, $('#modal-form'));
        }
    );
</script>

And then I'm opening this modal using following code :

$(".someBtn").click(function(event){
        event.preventDefault();
        $('#modal-form').modal('openModal');
});

Right now everything is working from loading in the phtml file, in the modal and opening that modal on a button click.
What's not working is the functions of View.php block class.
I think the issue is with the pre-loading in phtml file using include function and because of that the php functions are hitting the server once and not when I actually open the modal.
Can I reload or just load that phtml file dynamically when the modal opens on a button click?


texts: Is it possible to override Magento theme files?

texts:
I previously asked a question regarding overriding Magento core files and learned that I can copy files to local folder and the core files will be overridden. Is this also possible for Themes? I want to modify Magento theme files, but those changes will be lost whenever a new theme update will be rolled out. I will have to do all those changes again.

Is is possible to override Theme files as we do with core files? If yes, please point me to the right direction.

I thought it would be possible by copying this to local folder, but confused about the location/path to follow while copying.


texts: How to upgrade all modules to the required version?

texts:
I did (setup:upgrade composer:update && composer:install setup:static-content:deploy) but it's no helped,

Please help me, thanks

  Please update your modules: Run "composer install" from the Magento
  root directory. The following modules are outdated: The following
  modules are outdated:

Amazon_Core db schema version: defined in codebase - 2.1.0, currently installed - 2.1.2

Amazon_Core db data version: defined in codebase - 2.1.0, currently installed - 2.1.2

Klarna_Core db schema version: defined in codebase - 4.4.4, currently installed - 4.5.2

Klarna_Core db data version: defined in codebase - 4.4.4, currently installed - 4.5.2

Amazon_Login db schema version: defined in codebase - 2.1.0, currently installed - 2.1.1

Amazon_Login db data version: defined in codebase - 2.1.0, currently installed - 2.1.1

Amazon_Payment db schema version: defined in codebase - 2.1.0, currently installed - 2.1.1

Amazon_Payment db data version: defined in codebase - 2.1.0, currently installed - 2.1.1

Klarna_Ordermanagement db schema version: defined in codebase - 4.3.4, currently installed - 4.4.1

Klarna_Ordermanagement db data version: defined in codebase - 4.3.4, currently installed - 4.4.1

Klarna_Kp db schema version: defined in codebase - 5.4.4, currently installed - 5.5.1

Klarna_Kp db data version: defined in codebase - 5.4.4, currently installed - 5.5.1

Dotdigitalgroup_Email db schema version: defined in codebase - 2.6.0, currently installed - 2.6.1

Dotdigitalgroup_Email db data version: defined in codebase - 2.6.0, currently installed - 2.6.1

Vertex_Tax db schema version: defined in codebase - 100.2.0, currently installed - 100.2.1

Vertex_Tax db data version: defined in codebase - 100.2.0, currently installed - 100.2.1


texts: How to create Custom Attribute in magento by script which should have following property

texts:
hi I want to create extesnion...and for that I need to create attribute which should have following front end properties....

Use in Quick Search ----> true
Use in Advanced Search ---> true
Comparable on Front-end ---> true
Used in Product Listing --- >true
Visible on Product View Page on Front-end --- > true
Allow HTML Tags on Frontend --->true
Use for Promo Rule Conditions --->true
Use In Search Results Layered Navigation-->true
Use In Layered Navigation --> true

this is following properties of my attributes which is  needed for me but its not working with this code...

$installer = $this;
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$installer->startSetup();

$setup->addAttribute('catalog_product', 'test_attribute1', array(
    'type'              => 'varchar',
    'backend'           => '',
    'frontend'          => '',
    'label'             => 'test',
    'input'             => 'select',
    'class'             => '',
    'source'            => 'catalog/product_attribute_source_layout',
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
    'visible'           => true,
    'required'          => true,
    'user_defined'      => true,
    'default'           => '',
    'searchable'        => true,
    'filterable'        => true,
    'comparable'        => true,
    'visible_on_front'  => true,
    'unique'            => false,
    'group'             => 'General'

));
$installer->endSetup();

How this will be possible by custom script........


texts: Magento 2: Send transactional email(new signup, order creation, abandon cart) mailchimp

texts:
Is it possible through mailchimp to send all emails(new signup, order
creation etc)?
Magento, mailchimp, Zandesk Sell which would be better for transactional emails?
Please suggest for this
Thanks


texts: can magento add store with different subdomain?

texts: it's my first time to use magento my main domain for exmple domain .com with centos OS my magento on store.domain .com with Ubuntu 16 can i use the same Ubuntu server for another store with sub domain store2.domain .com ? P.S my main domain domain .com uses wordpress Cms thanks


texts: Magento 2: Only dependency assignment operations are allowed in constructor. Coding standard error

texts:
"WARNING | Only dependency assignment operations are allowed in constructor. No other operations are allowed".

I'm getting this warning error while checking the coding standard in Magento2 code snippet. Please help me to resolve this issue.


texts: How to add addition script to existing validation class

texts:
I need to increase the validate-password class length to 8 characters.

How can I add that script in that validate-password class?

Note:

I don't want to create a new validation class
I don't want to add any class name (validate-length) to the password field


texts: Email template issue in custom module Magento 1.9

texts:
I have created an email template in the custom module, This is the code I have used to add the template.

    <template>
        <email>
            <spritzrequestquotation_email_template translate="label" module="sprrequestquotation">
                <label>Request Quotation Email</label>
                <file>requestquotation_email_template.html</file>
                <type>html</type>
            </sprrequestquotation_email_template>
        </email>
    </template>

This is my module folder structure.
app/local/Spr/RequestQuotation/

I have created an email template (requestquotation_email_template.html).

Controller code calling the template and sending mail. I am getting an email but mail body is empty.

$emailTemplate = Mage::getModel('core/email_template')->loadDefault('requestquotation_email_template');

    //Getting the Store E-Mail Sender Name.
    $senderName = Mage::getStoreConfig('trans_email/ident_general/name');

    //Getting the Store General E-Mail.
    $senderEmail = Mage::getStoreConfig('trans_email/ident_general/email');

    //Variables for Confirmation Mail.
    $emailTemplateVariables = array(
        'firstname' => 'John',
        'lastname'  => 'D.'
    );
    $emailTemplateVariables['name'] = $fullName;
    $emailTemplateVariables['email'] = $email;

    //Appending the Custom Variables to Template.
    $processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);

    //Sending E-Mail to Customers.
    $mail = Mage::getModel('core/email')
     ->setToName($senderName)
     ->setToEmail($senderEmail)
     ->setBody($processedTemplate)
     ->setSubject('Request A Quotation')
     ->setFromEmail($senderEmail)
     ->setFromName($senderName)
     ->setType('html');

$mail->send();


texts:
For a few days we have detected that in our Magento 2.2 the user is asked for their credit card details when it is something that was not done since the user is directly redirected to pay on the bank page.
Today a client told us that a charge had appeared on her card with which she bought on our casino page and we believe that the store has been hacked. Some help?


texts: Display form for each product in this page and store form data in database

texts:
Step 1: Here with each product, I want to display a form and store data in the Database.
Step 2: Get all the data with product id and order id in the Admin Panel.
My module PHP file Code
<?php
namespace Softadroit\Prescription\Block;

class Prescription extends \Magento\Framework\View\Element\Template
{
    protected $_orderFactory;

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Checkout\Model\Session $checkoutSession,
        array $data = []
    ) {
        $this->_checkoutSession = $checkoutSession;;
        parent::__construct($context, $data);
    }

    /**
     * Get quote object associated with cart. By default it is current customer session quote
     *
     * @return \Magento\Quote\Model\Quote
     */
    public function getQuoteData()
    {
        $this->_checkoutSession->getQuote();
        if (!$this->hasData('quote')) {
            $this->setData('quote', $this->_checkoutSession->getQuote());
        }
        return $this->_getData('quote');
    }
}
?>

And this is my .phtml file code
<?php
// Get all visible items in cart
$quote = $block->getQuoteData();

foreach($quote->getAllVisibleItems() as $_item) {
    echo 'Name: '.$_item->getName().'
';
    echo 'Quantity: '.$_item->getQty().'
';
    echo 'Price: $'.$_item->getPrice().'
';
    echo "
";
}


texts: How to override php class in magento 1.9

texts:
I want to make changes in the PHP file of a third-party module installed in Magento 1.9.x

The path of the file is app/code/community/Fooman/PdfCustomiser/Model/Mypdf.php

I want to change this class class Fooman_PdfCustomiser_Model_Mypdf extends TCPDF

how can I override this in my local module?

What are the steps I need to follow?


texts: Magento 2 Certified: Extension Attributes

texts:
I'm prepared for Magento 2 Certified Exam, and i'm testing through this site.

But i don't understand how this answers is correct
Can some one explain please, i've read about the extension attribute before.
Thanks.


texts: Invoice at admin panel, do not include custom discount and fee amount why is this happening?

texts: I have made a custom discount and fee module but when I create invoice at admin panel,invoice do not include custom discount and fee amount. I want to know from where i can change the custom discount and extra fee for payment in the admin module?


texts:
I have a button in a dynamic setting array like this

$this->addColumn(
    'col_2',
    [
        'label' => __('download'),
         'renderer'  => $this->getInsta(),
    ]
);

How can I call the function from the controller by clicking this button in admin panel ??

I want add controller function to butto edit in action


texts: show currency dropdown on top header links

texts:
i want to show currency drop down before my account in top links.
i added below code in links.phtml but nothing shows.

<?php if($this->getCurrencyCount()>1): ?>

        <select name="currency" onchange="setLocation(this.value)">
        <?php foreach ($this->getCurrencies() as $_code => $_name): ?>
            <option>
                <a href="<?php echo $this->getSwitchCurrencyUrl($_code) ?>" title="<?php echo $_code ?>" <?php if($_code==$this->getCurrentCurrencyCode()): ?> class="selected"<?php endif; ?>>
                    <?php echo Mage::app()->getLocale()->currency($_code)->getSymbol()?>

            </option>
        <?php endforeach; ?>
        </select>

        <?php echo $this->__('Currencies') ?>

<?php endif; ?>


texts: Disable price & Add to cart button for particular category

texts: I want to disable the price and add to cart button for particular product or a category. Instead I need to place a button that takes me to a web form page. Is there any extension that provides this functionality? Or any code tweaks?


texts: How do I correctly package my extension for compatible Community Editions

texts:
Lately I have been having an exceedingly difficult time getting my extension approved for Magento Connect. I am packaging using 1.7, and I have followed all the instructions in the Packing Extension Guidelines (as far as I understand them), but my submissions are always returned with the following item for correction:

  Extension Packaging: Repackage your extension correctly so that compatible Community Editions and/or Enterprise Editions correspond with correct channels. (Magento Connect 1.0 and Magento Connect 2.0) Please associate Magento versions 1.5 and above with Magento Connect 2.0 and Magento versions 1.4 and below with Magento Connect 1.0.

I take this to mean that when packaging my extension, the channel value should be aligned to the versions of Magento that I'm targeting ("connect.magentocommerce.com/community" for pre 1.5, and simply "community" for 1.5 and above).  Is that the correct interpretation?

And this is what I have selected during the packaging process:

However all my submissions come back instructing me to repacking my extension to correspond with the correct channel.  If it's not done in the "Package Info" section, where is that supposed to be done?

Edit:  Since my initial posting, I've also tried packaging the extension using CE 1.9.1.0, but have still received the response that my packaging is incorrect.


texts: Cart page shipping method loading issue. Magento2

texts:
I have set 'Minimum Order Amount' to 25 for Free Shipping & other shipping method is 'Flat rate'. My issue is when I redirect back from paypal to cart page after canceling the payment from paypal the cart page shows Flat rate Shipping method first while loading later when the loading of page is over it displays correct Shipping method i.e. 'Free Shipping'

In short, the loading under 'Estimate Shipping & Tax' displays incorrect shipping method while the loading spinner is on.


texts: Magento 2 Site after moving from local server to live all pages showing 404 except Home page?

texts:
After moving My Magento 2 website from local server to Production server All the Pages including admin showing/redirecting 404 page except Home Page.

How Can I resolve this issue ?

Can any one please help me on this.


texts: How to send custom request to authorize with Direct Post in Magento2?

texts: In magento2 - I want to capture some amount other than order manually from authorise. How to create manually request? And How to sent request to authorise with Direct Post method.


texts: get product in controller_action_predispatch_adminhtml_catalog_product_edit observer

texts:
i'm writing a observer based on this event

controller_action_predispatch_adminhtml_catalog_product_edit

public function currentUser(Varien_Event_Observer $observer) {
   $product = $observer->getEvent()->getProduct();

}

But i can't get the product through the event object which is null, how can i get product through this event?