texts: Download pdf file from database Magento 2 code

texts:
I have some pdf file that is saved in the table named pdf_download
the database name is loc_pos.

Need to download that file when I click.

<a href="http://domain.com/index.php?route=information/start_downloads&amp;name=<?php echo $category['name']; ?>&amp;download=drivers_manuals&amp;file=<?php echo $category['file']; ?>" target="_blank"><?php echo $category['name']; ?>

Output is:

http://domain.com/index.php?route=information/start_downloads&name=SENSORMATIC AMS 1140 SECURITY DETECTION&download=drivers_manuals&file=20140715164946.pdf

This script is not working.

I think the route is not working properly.

Can someone help me to get the correct code?


texts: Magento2 customer register event for rest call

texts:
I am sending sms on customer registration using customer_register_success, fired in

app/code/Magento/Customer/Controller/Account/CreatePost.php

But as this is from controller, and not fired when user is created using restapi, is there any cleaner event which can suffice for web and restapi calls


texts:
I am pulling my hair out trying to get to the bottom of this fault. I have read various sites and solutions but nothing has worked. I have tried the following solutions from different sites and they are all correct - still no products display anywhere on site, Categories will display with info and featured image but no products etc.

The products must be Visible in Catalog.
The products must be Enabled.
Product must have a stock Quantity.
The product must be set to In Stock.
If the product is set not to track stock, it still has to have a stock Quantity and be set to In Stock.
The product must be assigned to the target Category.
If using multi-website mode (or if you imported the products through Data Flow), the products must be assigned to the target Website.
You must refresh your Cache / Indices, just to make sure.

I hope someone can help


texts: How to remove an specific href from a top-menu link in magento?

texts:
I have an specific cateogry (top-level / main category) witch shows a menu on hover at menu.
I need to remove the href from that < li> item, or replace href value for "javascript:void(0);".

I'm trying to do this with page_block_html_topmenu_gethtml_before and page_block_html_topmenu_gethtml_after observers, but didn't get it yet.

I wouln't like to make a replace in block's html output. I don't think it's a good idea. =O

Does anyone have any idea?


texts: How to add existent options inside product options

texts:
I trying to add simple products and after associate these products in a configurable product, but some options of these products can't be exists.

So, I add options using EVA config and return id of options, but these options have type like

  Magento\Eav\Api\Data\AttributeOptionInterface

And

  Magento\Catalog\Model\Product->addOptions()

or

  Magento\Catalog\Model\Product->addOption()

requires object type like

  Magento\Catalog\Model\Product\Option

I don't understand how Magento can create options like this. See that they already exist inside objects like

  Magento\Eav\Model\Entity\Attribute\AbstractAttribute

I needed to associate my products with these options but I don't understand how I can do it.

Suppose the method works perfectly for the purpose of inserting options into the attributes and the option objects are returned from this call. Follow the code.

$options = $this->helper->setupAttributeOptions([
    "size" => $configurable["options"]["size"],
    "color" => $configurable["options"]["color"],
]);
/*
return ->
[
    "color" => [
        0 => [
            "label" => "Red",
            "option_object" => Magento\Eav\Api\Data\AttributeOptionInterface
        ]
    ],
    "size" => [
        0 => [
            "label" => 40,
            "option_object" => Magento\Eav\Api\Data\AttributeOptionInterface
        ]
    ]
]
*/

I parse result and extract option_object inside an other simple array. Load my simple product by SKU using Magento\Catalog\Api\ProductRepositoryInterface and add options with this.

$product->setHasOptions(1);
$product->setOptions($correctOptions);
$product->save();

I try using $productRepository->save($product); but not have success.

Any idea.


texts: Deliver downloadable products from a sub-domain?

texts:
How can Magento be configured to deliver downloadable products from a sub-domain.

Currently:

https://example.com/downloadable/download/link/id/SECRET_KEY/

Desired:

https://download.example.com/downloadable/download/link/id/SECRET_KEY/

Note: the store is configured so that downloadable links cannot be shared, i.e. the customer must be logged in his own account to download the product.


texts: If getAttributeText() not working in list.phtml

texts:
I am running an if statement on an the contents of an attribute, and if it is true I want specific text to be displayed. However, the if does not appear to work. I've tried just plain html text in the file and this shows - so I know it is something to do with the if statement.

IF

<?php if($_product->getAttributeText('in_stock') == $this->__('This item is in stock')): ?>

IN STOCK

<?php endif; ?>

Can anyone please suggest an amend to get it working?


texts:
In my catalog/product_list block template (catalog/product/list.phtml), I've this piece of code that should work, but $_productCollection is always false:

<?php
$session = Mage::getSingleton('core/session');
$_productCollection = $session->getProductCollection();

if (!$_productCollection){

    $_productCollection=$this->getLoadedProductCollection();
    $session->setProductCollection($_productCollection);
}

$_helper = $this->helper('catalog/output');

Strings work, just not collection objects it seems. In my IDE I can see the $_SESSION superglobal populating with the collection, but on refresh it just disappears. Maybe it is garbage collected when the request completes? Any one have any idea?

Note, this page is not using a toolbar.


texts: How to delete a particular row from database when its corresponding delete link is clicked?

texts:
I displayed a table from database and created a delete link to every row. I want to delete a particular row when its corresponding link is clicked. Can anyone help me please..

<?php
 $model = Mage::getModel('test/test')->getCollection();
 foreach($model as $data)
  {
    echo '
';
    echo ''.$data->getTestId().'	';
    echo ''.$data->getTitle().'	';
    echo ''.$data->getFilename().'	';
    echo ''.$data->getContent().'	';
    echo ''.$data->getStatus().'	';
    echo ''.$data->getCreatedTime().'	';
    echo ''.$data->getUpdateTime().'	';
    ?>

    <?php
    echo '
';
   }
 ?>

Thanx.


texts: Magento 2 : How to add product image from custom front-end form in Magento 2?

texts: I have created a module to add product from front-end custom form. Currently the product is created in back-end but product image is not uploaded. If anyone having knowledge regarding this then please guide me. Thanks!


texts: We can't create the backup right now. magento 2

texts:
I get this comment when I choose for Magento Backups in admin

Nowhere an answer to find

Someone know?


texts: How Magento 2.2.2 creditmemo create and save functionality work

texts: While working on custom creditmemo functionalities, I created this flow diagram to show a high level view, how Magento 2.2.2 performs creditmemo create/save operation from admin area.


texts: Digital Ocean Hosting for personal development

texts:
I'm currently hosting my personal development on DO.  My droplet is 1CPU 2GB and 50GB storage.  I'm having issues with load times, mind you this is only for development, so I wouldn't even mind 3-4 second page loads. After I'm deep into a few pages, it just gets stuck, almost like its run out of memory.

My question is to anybody that has this same droplet / type of hosting plan.  Do you have issues as well? Also, new here, finally made the plunge, 10 years later! SMH

Thanks!


texts: Magento 2 : Add Block After Add To Cart Button

texts:
I have to add block and call custom phtml file after "Add to Cart" button on product details page.

I have added below code in catalog_product_view.xml file in extension.

It is working but displaying before Qty input box

<?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>
    <referenceContainer name="alert.urls">
        <block class="Package_Name\Module_Name\Block\Catalog\Product\View\Enquiry" name="product.info.enquiry" template="Package_Name_Module_Name::catalog/product/view/enquiry.phtml" after="-" />
    </referenceContainer>
</body>

But it's not working

<?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="product.info.addtocart">
        <block class="Package_Name\Module_Name\Block\Catalog\Product\View\Enquiry"name="product.info.enquiry" template="Package_Name_Module_Name::catalog/product/view/enquiry.phtml">
        </block>
    </referenceBlock>
    <!-- for config products -->
    <referenceBlock name="product.info.addtocart.additional">
        <block class="Package_Name\Module_Name\Block\Catalog\Product\View\Enquiry" name="product.info.enquiry" template="Package_Name_Module_Name::catalog/product/view/enquiry.phtml">
        </block>
    </referenceBlock>
</body>


texts: Proper way of adding custom code to vendor module?

texts:
Is there a guide somewhere to overriding, extending or otherwise adding to the composer module sets that show up in /vendor/?

I've run into a couple of scenarios where I just have to make a few small modifications to Models and/or add custom phtml templates to views in some of the existing /vendor/magento/module-* packages. I know for regular site content, you can do the views in a custom theme, but in this particular case, we need to add a custom email template to module-sales.
Also, rather than add the complication of another extension to increase the flexibility of the filters in those templates, I would like to add an equivalent twig-like number_format() method for formatting values with trailing decimals.

But I'm not sure how I would extend the Model or where to put the custom views.
As stated, in this particular instance I need to add the custom view to vendor/Magento/module-sales and modify/extend the Model in vendor/Magento/module-email/Model/Template

Any help is appreciated.


texts: How To Load All Product Details Using Attribute

texts:
Hello i created custom product attribute with Yes/No Value.
for Product Information Page.
If attribute Value Is Yes Then Display Products Details.
But Whenever I Call, getAttributeText displayes null.
I dont'd know what is the error.

i created one phtml file call special_product.
in this file i call attribute.
but its not work.

pls help me.

how to load product details if attribute value is "Yes"?


texts: Price Rules Magento 2 show discount only if price difference is 5%

texts:
I have a magento 2 store but all the prices are populated from a content management system. In this system, I have two prices retail ( manufacturer) that cannot be changed and my price. I want the show savings on the website only if the price difference is 5% between both prices. Please see image for an example

But I do not want the Savings to show up if the retail price is £280 and my price is £279. When I change the price in the special price it is always showing the discount.


texts: Favicon going back to default when opening a new window

texts:
I have changed my store favicon and it works perfectly when navigating through my store. However when i open a datasheet from my products a new window opens up displaying the PDF file, however my favicon changes back to the magento default icon, does anybody know how to change this or why it happens.

Thanks in advance.


texts: Allowed memory size of 2097152 bytes exhausted (tried to allocate 8192 bytes) i

texts:
I am getting error while running the cli commands,
I increased the memory_limit to 5G


texts: Magento 2.2.1 Search Returns No Products

texts:
Upgraded to Magento 2.2.1 from 2.2.0, refreshed all caches, indexes, etc. Everything seems to be working fine except when using the frontend search it returns no products regardless.

I checked the search_query table and it is showing the queries and that it should have results.

Has anyone encountered this or have any suggestions that I could try to correct this?


texts:
I have been trying to override Magento resource collection class. I have found few solutions but it seems can't get it to work.
The class is located in:

App/code/core/Mage/Reports/Model/Resource/Order/Collection.php

This is the code to register module:

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

And XML config file to override collection:

<?xml version="1.0"?>
<config>
    <modules>
        <XYZ_Reports>
            <version>0.1.0</version>
        </XYZ_Reports>
    </modules>
    <global>
        <models>
            <reports>
                <rewrite>
                    <resource_order_collection>
                        XYZ_Reports_Model_Resource_Order_Collection
                    </resource_order_collection>
                </rewrite>
            </reports>
        </models>
    </global>
</config>

This is a one version of config file. I have used different approaches including this one suggested by  Damir Korpar - Inchoo:

<?xml version="1.0"?>
<config>
    <modules>
        <XYZ_Reports>
            <version>0.1.0</version>
        </XYZ_Reports>
    </modules>
    <global>
        <models>
            <reports_resource>
                <rewrite>
                    <order_collection>
                        XYZ_Reports_Model_Resource_Order_Collection
                    </order_collection>
                </rewrite>
            </reports_resource>
        </models>
    </global>
</config>

The new file located in:

app/local/XYZ/Reports/Model/Resource/Order/Collection.php

And finally extended class:

<?php

class XYZ_Reports_Model_Resource_Order_Collection extends Mage_Reports_Model_Resource_Order_Collection
{

    public function joinCustomerName($alias = 'name')
    {
        die('Overridden class');
    }
}


texts: Why Magento 2 Google Shopping ads has very bad reviews?

texts:
I'm going to install Google Shopping Ads extension for my store.
https://marketplace.magento.com/magento-google-shopping-ads.html#

My store version is CE 2.2.3
My first question is
This extension is compatible with my store version?

My second question is..
Why this extension has many bad reviews?
This really has many bugs? Magento team is still struggling to solve the issues?
I'm currently checking the latest version 3.0.1. I want to know whether this latest version has also the known issue.
By the way, I've already installed it in my development site. Still, it looks fine. I am not seeing any blank screen(Many bad feedbacks say that they were seeing blank screen after they installed it)

My third question is..
Can I test it in my development site as well?
I am not doing the test now because our Google Merchant Center is only linked with our product site.
How can I test it for my development site? I really want to make sure 100% before I go to the production site with this extension.

Thanks in advance.


texts: Plugin modifications not getting reflected in orders and adminhtml

texts:
I am building a plugin which would build the price of product based on formula (param1+param2+param3) with each parameter being store in database.
Files of which are:
<MAGENTO-ROOT>/Vendor/Modulename/etc/adminhtml/di.xml
    <?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Model\Product">
        <plugin name="cache_price_admin" type="Vendor\Modulename\Plugin\Product" sortOrder="1" />
    </type>
</config>

<MAGENTO-ROOT>/Vendor/Modulename/etc/frontend/di.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Model\Product">
        <plugin name="cache_price" type="Vendor\Modulename\Plugin\Product" sortOrder="1" />
    </type>
</config>

<MAGENTO-ROOT>/Vendor/Modulename/Plugin/Product.php
<?php
namespace Vendor\Modulename\Plugin;

class Product
{

    public function afterGetPrice(\Magento\Catalog\Model\Product $subject, $result)
    {
        $param1=500; //these values will be dynamically fetched from database
        $param2=600;
        $param3=700;
        return ($param1*0.10)+($param2*0.30)+($param3*0.20);
    }

}

above plugin changes the products prices and displays it on the frontend correctly but price gets cached once products are loaded and doesn't change when changing the formula parameters.
i have tried another approch in which i created the module which interated through all products and updated the price of each with the value from above formula whenever the formula parameters were updated by admin user. but it took more than 20 mins just to update prices of 50 products with re-indexing set to manual mode.And since Number of Products are in the range of 20k this can not work.
so my questions are:

how can i make this plugin work to show updated product prices on frontend and backend as well as in orders whenever a user buys one of these products?

is there any way to make product price update faster when using \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory class and
$product->setPrice(($param10.10)+($param20.30)+($param3*0.20))->save()

is there any alternative approach to achieve this functionality?


texts: How to override 'vendor/magento/module-catalog/etc/product_types.xml' in Magento 2.1?

texts:
In Magento 2.0 if you put the file vendor/magento/module-catalog/etc/product_types.xml inside your module's etc folder, it'll be overridden. But this same behaviour is not working in Magento 2.1. So basically I want to override this vendor/magento/module-catalog/etc/product_types.xml in Magento 2.1.

Any suggestion would be appreciated.

EDIT:
The content of app/code/Mynamespace/Mymodule/etc/product_types.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/product_types.xsd">
    <composableTypes>
        <type name="configurable" />
    </composableTypes>
</config>


texts: how to add Custom column with link in sales order grid magento

texts:
I want to add custom column in sales order grid.

In the row data I want to add link using block render or using ui-component.


texts: Catalog url rewrite stuck on REINDEX REQUIRED

texts:
I am re-indexing Catalog url rewrite via cron, but it is always showing reindex required.

When I manually ran it via browser after deleting the locks file it works fine.

I ran reindex via command line and checked in admin, it is showing processing and after sometimes in command line it is showing re-index successful but in admin it is still showing reindex required and update date is also of day when I manually ran it.

Re-index mode is manual.

After deleting the var/locks manually everything just works fine.

Have anybody face this issue earlier?
What is the issue here?
How this can be fixed?


texts: Reindexing : When do you use 'Update on schedule' or 'update on save'?

texts:
In Magento 2, there are 2 methods of indexing:

Update on schedule
Update on save

I understand the differences between these two modes, but what I'm wondering (and what the documentation is not telling something about) is in what kind of situation you would choose one over the other?

So in what scenario would it be better to use 'index on schedule' and vice versa?


texts: what does `compatible product` mean in product-media.js?

texts:
Can someone explain me what the following code says in product-media.js :

 getCompatibleProductImages: function(productFallback, selectedLabels) {
        //find compatible products
        var compatibleProducts = [];
        var compatibleProductSets = [];
        selectedLabels.each(function(selectedLabel) {
            if(!productFallback['option_labels'][selectedLabel]) {
                return;
            }

            var optionProducts = productFallback['option_labels'][selectedLabel]['products'];
            compatibleProductSets.push(optionProducts);

            //optimistically push all products
            optionProducts.each(function(productId) {
                compatibleProducts.push(productId);
            });
        });

        //intersect compatible products
        compatibleProductSets.each(function(productSet) {
            compatibleProducts = ConfigurableMediaImages.arrayIntersect(compatibleProducts, productSet);
        });

        return compatibleProducts;
    }

What does the compatible products  & intersect compatible products mean in above code? please someone explain me clearly.


texts: how to change old magento 2 installation keys from VS code editor?

texts:
I have removed public and private keys from magento account which was configured in visual studio code.After deleting keys from magento account i am updating composer from already installed magento throwing error. credentials are not matched.

How can i change new keys in visual studio code for magento installation via composer.

Help


texts: Search Query with Umlaut (äöü) not working, what can i do?


texts: Random integrity constraint errors saving orders in Magento 2.1 after payment

texts:
I have a system that generates quotes, then submits the quotes, which processes a payment.

The system is pretty standard: nothing really complicated is going on. The quotes have a single product in them.

After the payment is processed, Magento saves the Order and the payment. However, sometimes we get an exception:

  PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (sales_order_address, CONSTRAINT SALES_ORDER_ADDRESS_PARENT_ID_SALES_ORDER_ENTITY_ID FOREIGN KEY (parent_id) REFERENCES sales_order (entity_id) ON DELETE CASCADE) in /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228

This error suggests to me that it is trying to save the sales_order_address for a non-existent sales_order record, but why would that happen?

The payment was processed successfully on the backend but there is nothing recorded in the database to indicate that. Retrying the same quote again with the same input data usually results in success - the error appears to be transient.

How can I figure out what is causing the sales_order record to be deleted? How is this even possible? I tried searching the Magento code for a transaction rollback that swallows an exception, but didn't find any. We are using a third-party Stripe payment module but the order-saving part happens after the payment was successfully placed. From what I can see whatever error is happening here is entirely in the core code.

The error is happening on the latest (2.1.11) version.


texts: Magento 2: How to override configurable.phtml block

texts:
I am just extended configurable block using a custom block, but I couldn't get the "selected_configurable_option" while changing the configurable options [ not getting simple product id ].

Did this can be achieved by extending the block like
Block Test.php

class Test extends \Magento\ConfigurableProduct\Block\Product\View\Type\Configurable{
}

di.xml

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

or do I need to override the configurable.phtml. How to solve this problem ?


texts: Mysql Server Is restarting again and again due to High Memory usage

texts:
I have 4 vCPU and 6GB of memory in my server and red hat Linux distro with magento 1 configured and was working well suddenly it started to restart mysql server again and again. I checked the usage CPU usage of all the 4 cores goes to 100% most of the time and Memory consumption slowly went to 5.87GB then server kills the mysql server and again Memory went to 1.2Gb usage and Mysql server starts again and again same thing happens. I checked the my.cnf file and found these settings

   #
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

[mysqld]
sql_mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
max_allowed_packet=1073741824
max_allowed_packet=1073741824
sql_mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
log-error=/var/lib/mysql/server1.nctest.net.err
performance-schema=0
default-storage-engine=MyISAM
innodb_file_per_table=1
open_files_limit=50000
innodb_buffer_pool_size=134217728

I didn't get what I am missing here, that letting consume my 100% of memory by mysqld process.


texts:
I'm trying to add a custom Javascript file and a jQuery file to my site. I've place the following code in my local.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
        <reference name="head">
            <action method="addJs"><script>lib/jquery-1.10.2.min.js</script></action>
            <action method="addItem"><type>skin_js</type><name>js/main.js</name></action>
        </reference>
    </default>
</layout>

But that didn't work. Then I added the lines to page.xml

<block type="page/html_head" name="head" as="head">
    <action method="addJs"><script>lib/jquery-1.10.2.min.js</script></action>
    <action method="addItem"><type>skin_js</type><name>js/main.js</name></action>
</block>

But that didn't do the trick either. Eventhough the I have the cache disabled,I did flush it again and I even rebuild the indexes. Now i've run out of ideas to try.


texts: Why aren't the roles I selected in my controller for an uploaded image displaying in the admin backend

texts:
I've recently created some code that grabs a remote image, pulls it to the server, and sets a product to have this image with a number of roles. See below:

file_put_contents($import_filepath, file_get_contents($bgg_image));
$attribute_codes = ['image', 'small_image', 'thumbnail', 'bgg_image'];
$product->addImageToMediaGallery($import_filepath, $attribute_codes, false, false);
unlink($import_filepath);
$this->productRepository->save($product);

$import_filepath is the path to place on the server. $bgg_image is a remote image.

This is working fine, the upload is successful. The roles are actually being set too, i.e.

$attribute_codes = ['image', 'small_image', 'thumbnail', 'bgg_image'];

I can tell because if I use the below code, it will print out the correct path for my image:

 $product = $this->productRepository->getById($product_id);
 $logger->info('data is now bgg -------- ' . $product->getData('bgg_image'));

2020-01-02T04:48:43+00:00 INFO (6): data is now bgg -------- //b/g/bgg_img_24291_pic2428687_1_2.jpg

The issue is that in the below screenshot, these roles don't display on the frontend at all unless I manually select them and save the product. All other behaviour on the frontend website is as expected.

I've tried reloading the cache, completely clearing the cache, redploying all static files, and a whole bunch of stuff that's brought up nada.

Pls help.


texts: Hide flat shipping when free shipping is eligible in magento 2.1

texts: Do anyone know how to hide flat shipping when free shipping is eligible in magento 2.1?


texts: How to save data to sales_shipment_grid table while saving it to sales_shipment table in Magento 2?

texts:
After creating shipment I'm saving additional data to it and need to display this data in shipment grid.

I've added column named 'some_data' in sales_shipment and sales_shipment_grid tables in database. Also added UI components to display this column in shipment_grid:

sales_order_shipment_grid.xml

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_shipment_columns">
        <column name="some_data">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">Some Data</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

Also added configuration in MyNamespace/MyModule/etc/adminhtml/di.xml:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<virtualType name="ShipmentGridAggregator" type="Magento\Sales\Model\ResourceModel\Grid">
    <arguments>
        <argument name="columns" xsi:type="array">
            <item name="some_data" xsi:type="string">sales_shipment.some_data</item>
        </argument>
    </arguments>
</virtualType>

Value successfully saves to sales_shipment table but not to sales_shipment_grid table, therefore column in admin shipment grid remains empty.

How can I populate this custom column with data from sales_shipment table column?

Maybe there are other approaches?
All examples I've found were for sales_order_grid and they does not work for sales_shipment_grid.


texts: Where magento 2 set the products attributes on save

texts:
I'm trying to debug something quite tuchy (Product attribute in filter)
I've been able to see that one of my attribute was not in the table catalog_product_index_eav while he is present on the product attributes lists and the attributes is well saved. Meanings if I save it then go again on the product in backend, the value is correct. But she is not added to that specific table and i'm trying to understand why.
In order to do so, I need to find where in the product save controller magento is saving the attributes product value one by one. (Not speaking about attributeSet here).
But I can't find where it is, any help would be welcome.


texts: How do I use the rsync command correctly

texts: I am migrating a customer site.  I have made a copy of it and placed it in a subdirectory of the root.  So just below the prod site.  I know that I can use the rsync command to make sure all files are the same in both directory's, but I am unclear as to the correct usage.  Also I believe there is a way useing the --delete option to keep it from syncing the local.xml file.  Any suggestions?


texts: Unable to translate line 76, on CouponManagement.php

texts:
Unable to translate line 76 on Magento 2.3.3
/vendor/magento/module-quote/Model/CouponManagement.php
"The coupon code isn't valid. Verify the code and try again."

Copy Paste of my actual translation dictionary
"The coupon code isn't valid. Verify the code and try again.","El cupon no es valido. Verifica e intentalo de nuevo.",module,Magento_Quote

Tested everthing, flushing cache..removing every cache files, all the basics. If i directly modify the file it works, but is not a good practice.


texts: It seems 2.0.8 is released  but I dont see any version update on https://www.magentocommerce.com/download . Does any one have any idea on this?


texts: Sort by 2 attributes with different orders

texts:
I have to catalog sort by 2 attributes with different orders (asc, desc). I have change in
function setCollection($collection). But here order is overwrite on another order.

Here is my code, which I have changed.

public function setCollection($collection)
    {
        $this->_collection = $collection;

        $this->_collection->setCurPage($this->getCurrentPage());

        // we need to set pagination only if passed value integer and more that 0
        $limit = (int)$this->getLimit();
        if ($limit) {
            $this->_collection->setPageSize($limit);
        }
        if ($this->getCurrentOrder()) {

            # Code Added By Prashant Parekh : Sort By Pairing Idenity : 31/12/2013
            if($this->getCurrentOrder()=='name'){
                $orders = array('desc'=>'pairing_identity','asc'=>'name');
                foreach($orders as $key=>$value){
                    if($value=='name')
                        $this->_collection->setOrder($value, $this->getCurrentDirection());
                    else
                        $this->_collection->setOrder($value, $key);
                }
            } else {
                $this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
            }
        }
        return $this;
    }

its set default order DESC, whenever first time product list is load.
I want pairing_identity => 'desc' and name => 'asc'. But this code set pairing_identity => 'desc' and name => 'desc'.


texts:
It's doesn't work, but I need it done with this code, is it possible?

public function setProdQty($customerId,$upQty,$sendId){

    $quote = $this->quoteFactory->create()->loadByCustomer($customerId);

    $quote->getAllVisibleItems();
    $quote->setitemId($sendId);
    $quote->setqty($upQty);
    return $quote->save();

 }


texts: Only individually saved products are shown

texts:
in Magento 2 I have a rare problem. If I select some products and me for example change the status to Active, this is not done. But If I enter one of these products (child) and I only click save then yes is done and it's shown on the website.
Thanks


texts: Show price without taxes in frontend for customer group

texts:
I would like to show price without taxes in the catalog for B2B customers but calculate with taxes as normally.

I know this can be done with a second store view but is this possible without a second view?


texts: REST API endpoint v1/carts/{cartId}/items always returns error message

texts:
Background: I'm doing all the following with an admin token, and I'm not dealing with guest carts.  There are quote_item records associated with the quote in question.  I've tried this with several different quote_id's, and they all behave in exactly the same way.

If I make a GET request to v1/carts/55402, I receive a correct response including the cart info, customer info, etc.

If I make a GET request to v1/carts/55402/items, I always get this error:

array (
  'message' => 'No such entity with %fieldName = %fieldValue',
  'parameters' =>
  array (
    'fieldName' => 'cartId',
    'fieldValue' => 55402,
  ),
)

Yet, if I go look in the quote_item table there are definitely items in that table that have a quote_id of 55402.

As I mentioned, this is the case for every quote I've tried via the API.  I can retrieve the quote, but NOT the quote items.

What am I doing wrong?


texts: I am a web developer, and I've recently gotten into selling stuff online, and now I am ready to take my products and make an e-commerce site. Heres the thing, I can code my own e-commerce website but I think it will be time-consuming, yet if it's built right I would be able to customize it to whichever way I like it and maybe sell the script itself. So should I go ahead or just stick with Magento?


texts: I am getting mail afrer Clicking Forgot Password, but after clicking the password reset link I m getting a blank page

texts: Forget Password link not loading layout and template page.


texts:
I added new action in row at admin grid. It works, link oppening in new window. But when I click on link, checkbox meking (on or off enter link description here) How can i remove event from row?  How can I make checkbox clickable only when i click on it?
I added action on Associated product in grouped product type.


texts:
I need to change all of the "http://" to "https://" in a file on my site. I did these steps. By the way, I'm using Magento 1.9.2.4 and a Chromebook -

I right clicked on my site and clicked "Inspect".
The screen splits in two, and on the right there is a message saying:
'http://fonts.googleapis.com/css?family=Arimo:400,700|Open+Sans:400,700,600italic,300|Roboto+Condensed:300,400,700'. This request has been blocked; the content must be served over HTTPS.
I click on directly this and get taken to this link:

http://fonts.googleapis.com/css?family=Arimo:400,700|Open+Sans:400,700,600italic,300|Roboto+Condensed:300,400,700

I right click on "view page source" and then I right click again and click "Inspect".
The screen splits in two and on the right at the top there are tabs that say "Elements, Console, Sources, Network, Timeline, and Profiles".
I clicked on "Elements", double clicked on the code I wanted to edit (you can also right click and hit "Edit Text" or "Edit as HTML"), and typed an "s" in front of all the links that say "http://" and change them to "https://".
However, there is no way to save this file on my site where the next time I go to my site, it won't have these problems.
Adarsh Khatri told me to delete the "http:" and keep the "//" so it can load on both "http://" and "https://" just in case my site switches back to the "http://" version. This is good advice.

EXACTLY HOW can I change all of the "http://" links to say "//"? Is there a way to do this automatically or do I have to do it manually for all of them?

UPDATES - Please DO NOT tell me I need to edit these files, I ALREADY KNOW that, I need to know EXACTLY HOW to edit these files.

Maybe I'm editing the wrong way. If so -

Please tell me the EXACT STEP BY STEP INSTRUCTIONS on how you would FIX this (provide as much DETAIL AS POSSIBLE with SCREENSHOTS for EACH STEP and CLEAR CUT EXPLANATIONS along with the screenshots)
Please tell me how to do edit and save this on other computers too like (Windows, Mac, Chromebook, etc) what browsers you use for each operating system like (Firefox, Google Chrome, Safari, etc)

Ex -

Step 1 - Go to CPanel, admin panel, your site or wherever to edit and save this file to your site.

Step 2 - On your site, right click "this and that", click on....., then click.... etc

In the CPanel or where the right place to go is located, go to "skin/frontend/.....", or go "here and there", click on "this" file, scroll down until you see "this line of code" etc
In the admin panel or where the right place to go is located, go to "system -> config -> ....", or go "here and there", switch "this and that" to "Yes or No", or click on "this and that" etc

Step 3 - Scroll down to the "top, lower top, upper middle, middle, lower middle, bottom, etc" part of "this file" and find "this code"
(It would be great if you can show me screenshots of exactly how you would edit and save this)

What programs can I install to edit and SAVE these on my site? If there aren't any or no need for any, EXACTLY what do I do to PROPERTY EDIT AND SAVE this file to my site? (Please provide clear step by step instructions)
Where can I find these editors? Are they free or not? What operating systems are they for?

Thanks!


texts: Cannot remove additional information tab from product view in XML

texts:
This is my xml :

<?xml version="1.0"?>
   <layout>
      <catalog_product_view>
        <reference name="product.info.tabs">
            <action method="unsetChild">
                <child>product_additional_data</child>
            </action>
        </reference>
       </catalog_product_view>
</layout>

I clear the cache but nothing happens. I want to remove the additional info tab, but keeps the description. What should I change or check ? thx

UPDATE
This is the xml from catalog.xml base:

   <block type="catalog/product_view_attributes" name="product.attributes" as="additional" template="catalog/product/view/attributes.phtml">
                    <action method="addToParentGroup"><group>detailed_info</group></action>
                    <action method="addToParentGroup"><group>detailed_info</group></action>
                    <action method="setTitle" translate="value"><value>Additional Information</value></action>
                </block>


texts: How to show customer name after login in their account magento 2.1.1?

texts:
I want to show customer last name into my website when customer will access their account.

<?php if( $isLoggedIn ) { ?>

    <a id="quick_sigup_link" style="positon:relative;" href="<?php echo $this->getUrl('customer/account/'); ?>">
            Hello. User
            My Account


texts: Magento2 : Create Custom Condition Field like Catalog Price Rule with my Own values

texts:
In Magento 2 Custom form i would like to add condition field like Catalog Price Rule with my custom values. Please find below screen shot.

Screen shot:

please suggest me how to get.


texts: Varying order confirmation email based on product sku

texts:
I'm trying to add a link to the order confirmation IF the order has the word ebook. This is a bundled product so it doesn't bring in the SKU for the product I'm referring to.  I don't know this is even possible.  All I want to do it show a link if the ebook is in the order. If it's not in the order don't show the link. Here's what I have so far.

{{if order.getEmailCustomerNote()}}

                {{var order.getEmailCustomerNote()}}

        {{else}}
       {{depend order.getitem().item == 'ebook'}}

        {{var order.getEmailCustomerNote()}}

THE LINK

     {{/depend}}
  {{/if}}


texts:
we are trying to add 4th icon after 3 icons in header

but whereever i placed below code in header.phtml , its not working.

4th icon is displaying before 3 icons. i want to display after 3 icons.

code for 4th icon.

<img src="<?php echo $this->getSkinUrl('images/search_16.png');?>" alt="Search">

header.phtml

        <a class="logo" href="<?php echo $this->getUrl('') ?>">
            <img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" class="large" />
            <img src="<?php echo $this->getLogoSrcSmall() ?>" alt="<?php echo $this->getLogoAlt() ?>" class="small" />

<img src="<?php echo $this->getSkinUrl('images/search_16.png');?>" alt="Search">

        <?php // In order for the language switcher to display next to logo on smaller viewports, it will be moved here.
              // See app.js for details ?>

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

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

                <a href="<?php echo $this->helper('customer')->getAccountUrl(); ?>" data-target-element="#header-account" class="skip-link skip-account">

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

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

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

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

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


texts: How to add custom payment module in Magento?

texts: How to add custom payment module in Magento_1.9.4.1


texts: Tax required field not working with multi-website 2.4

texts:
I have a Multi-Website where I want the tax to be required for one website and optional for another website, Website reloaded first takes the configuration option for both websites.
Facing Catch issue. If cache disabled its working
Website reloaded first takes the option
Video
Configuration

Default -> Tax Optional
Website 1 -> Tax Optional
Website 2 -> Tax Required

If Website 1 loaded first after catch flush
Expected
Website 1 -> Tax Optional
Website 2 -> Tax Required
Actual
Website 1 -> Tax Optional
Website 2 -> Tax Optional - Not working

If Website 2 loaded first after catch flush
Expected
Website 1 -> Tax Optional
Website 2 -> Tax Required
Actual
Website 1 -> Tax Required - Not working
Website 2 -> Tax Required


texts: Modify the default admin logo in Magento 2 (login portal and backend menu)

texts:
I would like to change both the logo in the login admin portal and the Magento icon at the top left of the admin menu.

What is the easiest way to do that, according images I want to upload are PNG files (I am not familiar with SVG format)
Thanks for your help.


texts: How do I know if magento index is actually processing or stuck

texts:
I added 50,000 products using magmi and catalog URL rewrites and Catalog SearchIndex are processing for last 16 hours. Some categories show blank page even though, they have thousands of products in them.

How do I know if index is actually processing and not stuck?


texts: magento 2 css is not added to head element

texts:
I develop a theme extending blank theme.

I mainly add some css to the _extend.less file, but now I need to add some 3rd party css to the theme.

I added the css-s to the proper directory.

/dev_magento/app/design/frontend/Vendor/theme/web/css

And indicated the source in the

/dev_magento/app/design/frontend/Vendor/theme/Magento_Theme/layout/default_head_blocks.xml

After all done

deleted pub/static , var/view_preprocessed/ directories and cleaned and flushed the caches.

However the css is not available, not even seen on the page source from the browser. js files also unavailable.

The google font is working. I can not see what can be the problem.

<?xml version="1.0"?>
<!--
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1,   maximum-scale=1.0, user-scalable=no"/>
    <css src="css/example.css"/>
            <script src="js/bootstrap.min.js">
            <script src="js/simples.js">
        <css src="css/bootstrap.min.css">
        <css src="css/bootstrap.css">
            <css src="css/kremvarazs_home_page.css">
    <link src='https://fonts.googleapis.com/css?family=Roboto:400,700,900,500' rel='stylesheet' type='text/css' src_type="url"/>
<link src="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet"  type='text/css' src_type="url">
</head>

Thank you for advising and looking into this problem


texts: Magento 2 - Render a custom column in orders table

texts:
After using this answer from three years ago. I would like to do the same thing but with HTML.

(Only difference is, I have the configuration as an option to one of the products, rather than having the custom database column)

My sales_order_grid.xml looks like this

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_columns">
        <column name="project_configuration" class="Wendrich\W360addtocart\Ui\Component\Listing\Column\Configuration">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="label" xsi:type="string" translate="true">Project configuration</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

Currently my output looks like this:

But I want it to look like this:

Is there a function I can use to tell the formatter "This string is safe, do not escape it" like the HTMLString class in Laravel for example?

do I need to create a custom template and render it manually?


texts: Why are my attributes showing out of position order on Magento 1.9.1.0 frontend?

texts:
The size attribute options on my configurable products are not displaying in the correct position on the frontend. They are displaying in the order of product ID instead

I have set the position on the size attribute in the admin panel (i.e. XS is position 1, S is position 2), but this appears to be disregarded on shop frontend.  I've already reindexed and flushed all caches.

Is this a known error? How do I fix this?


texts: filter Catalog Search Results based on Attributes

texts:
I get search results based on the search like http://crowdedgallery.co.uk/catalogsearch/result/index/?&q=cats

And I want to refine it more by adding another attribute to the search by
http://crowdedgallery.co.uk/catalogsearch/result/index/?orientation=landscape&p=3&q=cats

Where I have the values of the attribute "Orientation" as "Landscape" and "Portrait",

I know it is possible to filter using the Search in Layered Navigation, but I just want to FILTER the Search Results  after the output with "Orientation"

Is it possible to change something in the Query.php or any other methods,

please help,

I am new to magento and am stuck,


texts: Fatal errors after magento update from 1.7 to 1.9

texts:
I tried upgrading my shop from 1.7 to 1.9 but this caused sever problems on my webshop. (I did this via Magento Connect) Due to many custom made modules made by my predecessor I had no choice but to revert back to the old back upped file systen.

I tried reverting to a back up and reverted all the files on the FTP to the old version from before the update (only the files didn't revert the database yet).

Now I'm receiving this error on the site (frontend)

Fatal error: Undefined class constant 'METHOD_BML' in /home/users/amanvftp/amanvida.eu/app/code/core/Mage/Paypal/Block/Bml/Banners.php on line 75

In that file on line 75 is the following code

if (!$this->_getConfig()->isMethodAvailable(Mage_Paypal_Model_Config::METHOD_BML)
            && !$this->_getConfig()->isMethodAvailable(Mage_Paypal_Model_Config::METHOD_WPP_PE_BML)) {
            return '';
        }

The page stops processing there and is blank below that error.

In the backend, the admin section. I have a similar problem with the following error:

Fatal error: Undefined class constant 'XML_PATH_TAX_NOTIFICATION_URL' in /home/users/amanvftp/amanvida.eu/app/code/core/Mage/Tax/Block/Adminhtml/Notifications.php on line 175

Code:

public function getInfoUrl()
    {
        return $this->_app->getStore()->getConfig(Mage_Tax_Model_Config::XML_PATH_TAX_NOTIFICATION_URL);
    }

Also in the Magento Connect it still shows "1.9.2.1 (stable) " next to the mage modules.

How can I resolve this issue?


texts: I need to know if there is a way to browse product images from server and not upload them. I have several products with the same images and i am uploading the same image several time.


texts:
I'm working on a custom module for magento2. Trying to override the product view block so I can fetch data from an API and pass it into the view. Having read

https://community.magento.com/t5/Programming-Questions/Overriding-a-block-in-Magento-2/m-p/6831#U6831
Magento 2: Override Magento\Catalog\Block\Product\View Block
DI & Extending a Block on Magento 2

I'm still unsuccessful... Here's what I have in my module (Moxune/Moxune):

Block/Product/View.php

<?php
namespace Moxune\Moxune\Block\Product;

use Magento\Framework\View\Element\Template;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Catalog\Model\Product;
class View extends \Magento\Catalog\Block\Product\View
{
    protected function _toHtml()
    {
        $this->setModuleName($this->extractModuleName('Magento\Catalog\Block\Product\View'));
        return parent::_toHtml();
    }
}

etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <preference for="Magento\Catalog\Block\Product\View" type="Moxune\Moxune\Block\Product\View" />
</config>

I then run

rm -rf var/cache var/di var/generation var/page_cache && ./bin/magento setup:di:compile

and navigate to a product detail page. I can tell the overridden block isn't getting called though, because I've changed the _toHtml() body to:

protected function _toHtml()
{
   die('wtf');
}

and also introduced syntax errors and the page continues to load fine. However, if I put a die statement in the _toHtml() of

var/generation/Magento/Catalog/Block/Product/View/Interceptor.php

that shows on the product detail page. So it seems the preference I'm configuring is having no effect?

FWIW - It seems the DI process is creating a new Interceptor based on the configured preference:

var/generation/Moxune/Moxune/Block/Product/View/Interceptor.php

What am I missing?


texts: Magento Fatal Error on Running Installation

texts:
I am facing below Fatal Error on Magento Running installation,

  Fatal error: Uncaught Error: Class 'MagentoEavModelEntityAttributeSourceTable' not found in /var/www/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:93 Stack trace: #0 /var/www/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('MagentoEavModel...', Array) #1 /var/www/magento/vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Compiled->create('MagentoEavModel...', Array) #2 /var/www/magento/vendor/magento/framework/Validator/UniversalFactory.php(36): Magento\Framework\ObjectManager\ObjectManager->create('MagentoEavModel...', Array) #3 /var/www/magento/vendor/magento/module-eav/Model/Entity/Attribute/AbstractAttribute.php(551): Magento\Framework\Validator\UniversalFactory->create('MagentoEavModel...') #4 /var/www/magento/vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php(572): Magento\Eav\Model\Entity\Attribute\AbstractAttribute->g in /var/www/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

Everything was working fine and suddenly this error occur.

When I googled for this error it shows PHP Version incompatibly. But I am using PHP 7.0.33 version and Magento ver. 2.1.8.

Any help would be appreciated.

Thank you.


texts: Change order increment_id of existing orders

texts:
In a test system I would like to change increment_id for all orders. Otherwise I would get conflics with another module.

Can I simple change increment_id in sales_flat_order or will this messup Magento?


texts: Magento 2.3, how can I hide products automatically via cron for products that have a £0.00 price? I use a 3rd party to calculate prices across my store and when some products cannot be matched in their database it will not calculate the frontend price.


texts: Migration Error - Exception: SQLSTATE[HY000] [2002]

texts:
I've upload .zip file and database, and changed database info in local.xml.

Yet, my website is not working.

Error

  There has been an error processing your request Exception printing is
  disabled by default for security reasons.

  Error log record number: 291391725209

var/report

a:4:{i:0;s:105:"SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)";i:1;s:2973:"#0 /hsphere/local/home/claudiasousa/domain.com/lib/Zend/Db/Adapter/Pdo/Mysql.php(109): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /hsphere/local/home/claudiasousa/domain.com/lib/Varien/Db/Adapter/Pdo/Mysql.php(320): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /hsphere/local/home/claudiasousa/domain.com/lib/Zend/Db/Adapter/Abstract.php(460): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 /hsphere/local/home/claudiasousa/domain.com/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 /hsphere/local/home/claudiasousa/domain.com/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 /hsphere/local/home/claudiasousa/domain.com/app/code/core/Mage/Core/Model/Resource.php(169): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 /hsphere/local/home/claudiasousa/domain.com/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#7 /hsphere/local/home/claudiasousa/domain.com/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
#8 /hsphere/local/home/claudiasousa/domain.com/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
#9 /hsphere/local/home/claudiasousa/domain.com/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getWriteAdapter()
#10 /hsphere/local/home/claudiasousa/domain.com/app/code/core/Mage/Core/Model/Resource/Cache.php(53): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter()
#11 /hsphere/local/home/claudiasousa/domain.com/app/code/core/Mage/Core/Model/Cache.php(478): Mage_Core_Model_Resource_Cache->getAllOptions()
#12 /hsphere/local/home/claudiasousa/domain.com/app/code/core/Mage/Core/Model/Cache.php(520): Mage_Core_Model_Cache->_initOptions()
#13 /hsphere/local/home/claudiasousa/domain.com/app/code/core/Mage/Core/Model/App.php(1183): Mage_Core_Model_Cache->canUse('config')
#14 /hsphere/local/home/claudiasousa/domain.com/app/code/core/Mage/Core/Model/Config.php(414): Mage_Core_Model_App->useCache('config')
#15 /hsphere/local/home/claudiasousa/domain.com/app/code/core/Mage/Core/Model/Config.php(294): Mage_Core_Model_Config->_canUseCacheForInit()
#16 /hsphere/local/home/claudiasousa/domain.com/app/code/core/Mage/Core/Model/App.php(413): Mage_Core_Model_Config->loadModulesCache()
#17 /hsphere/local/home/claudiasousa/domain.com/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#18 /hsphere/local/home/claudiasousa/domain.com/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#19 /hsphere/local/home/claudiasousa/domain.com/index.php(87): Mage::run('', 'store')
#20 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";}


texts:
I'd like to directly query sku, special price, special price from date, special price to date from database.

We are offering special sale every week with different items. Sale items are supposed to have from date and to date. Unfortunately many of them are missed to date. We haven't cleared old/previous sale information for a long time. So I don't know how many items are on sale now.

Please advise me.


texts: How can I show product grid on the front-end? I want a product grid to be shown on the customer front-end panel. So customers will be able to select products from the grid on my account section.


texts: Magento 1.9 : How to combine two collection data?

texts:
I have two different collection one is of order payment transaction and other one is of sales order as show below:

$transactionData=Mage::getModel('sales/order_payment_transaction')->getCollection();
$orderData=Mage::getModel('sales/order')->getCollection();

I want to combine them into single collection. Also where can I find payment method cause I don`t see it under orderData or transactionData collection.


texts: No order confirmation when a customer chooses payment method paypal or sofort Magento 1.9

texts:
We are offering different payment methods like PayPal, credit card, "sofort".

When a customer chooses one of these methods, he gets redirected to the payment page but there is no order confirmation email beeing send to the customer or the copy to us.

For methods like invoice or bank transfer it works fine. The customer gets confirmation and we get the copy of the confirmation.

Does anyone have an idea how to solve this issue to get send a confirmation email everytime.Thanks in advance.


texts: Magento 2.3 Natural Sort Order for Numeric Attributes / Sort Order Wrong

texts:
I have a custom attribute (text field) - let's call it "size". It contains numeric values like 1,2,3,10,20,30. Products are sorted by this attribute on the category page.

Expected sort order:

  1,2,3,10,20,30

Actual sort order:

  1,10,2,20,3,30

I found this general answer which describes a general solution (not Magento related):
https://stackoverflow.com/questions/8557172/mysql-order-by-sorting-alphanumeric-correctly

There seems to be a solution for Magento 1.9:
https://stackoverflow.com/questions/22260419/magento-sort-attribute-by-decimal-not-alphanumerically

So here is my question:
How can I achieve a natural sort order for attributes that contain numbers in Magento 2 on the category page?


texts: How to get visitor data & store detail in database in magento2

texts:
I want to get visitor data when any visitor visit magento website. In visitor detail, I want to get IP address, browser name , Operating System Name , First Visit Time, & Last Visit time. How is it possible? This Feature must working on all page of magento website.

Please Help Me.

Thanks in advance. :-)


texts: How can I add "Sort by newest" and set it as default?

texts:
I'd like to add custom sort option "Sort by newest" using created_at system attribute and I'd like to set it as default, from the backend Stores->Catalog->Storefront->Product Listing Sort by.
I overrode \module-catalog\Block\Product\ProductList\Toolbar.php in my module with something like this:
/**
 * Add sort order option created_at to frontend
 */
public function afterGetAttributeUsedForSortByArray(
    \Magento\Catalog\Model\Config $catalogConfig,
    $options
) {
    $options['created_at'] = __('New');
    return $options;
}

Then I overrode module-catalog\Model\Config.php with:
/**
 * Set collection to pager
 *
 * @param \Magento\Framework\Data\Collection $collection
 * @return $this
 */
 public function setCollection($collection) {
    $this->_collection = $collection;
    $this->_collection->setCurPage($this->getCurrentPage());

    // we need to set pagination only if passed value integer and more that 0
    $limit = (int)$this->getLimit();
    if ($limit) {
        $this->_collection->setPageSize($limit);
    }

    // switch between sort order options
    if ($this->getCurrentOrder()) {
        // create custom query for created_at option
        switch ($this->getCurrentOrder()) {
            case 'created_at':
                if ($this->getCurrentDirection() == 'desc') {
                    $this->_collection
                        ->getSelect()
                        ->order('e.created_at DESC');
                } elseif ($this->getCurrentDirection() == 'asc') {
                    $this->_collection
                        ->getSelect()
                        ->order('e.created_at ASC');
                }
                break;
            default:
                $this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
                break;
        }
    }

    // echo '<pre>';
    // var_dump($this->getCurrentOrder());
    // var_dump((string) $this->_collection->getSelect());
    // die;

    return $this;
}

and it works but I'm not able to set it as default option and I don't know how I can add the option in the backend.
Any ideas?


texts: Collection addAttributeToSelect multiple columns in query

texts:
I'm trying something very simple:

$categoryCollection = Mage::getModel('catalog/category')
    ->getCollection();

$categoryCollection
    ->addAttributeToSelect('name')
    ->addAttributeToFilter('entity_id', array('in' => array(1,2,3,4)));

I would expect to have this query when doing $categoryCollection->getSelect()->__toString()

  SELECT main_table.name FROM catalog_category_flat_store_1 AS
  main_table WHERE (entity_id IN(1, 2, 3, 4));

Instead of that I get this:

  SELECT main_table.entity_id, main_table.level,
  main_table.path, main_table.position,
  main_table.is_active, main_table.is_anchor,
  main_table.name FROM catalog_category_flat_store_1 AS
  main_table WHERE (entity_id IN(1, 2, 3, 4));

Why is adding the extra columns, when I explicitly say I want only name, also what is the correct way of doing this?


texts: Help understanding layout files and where action links to

texts:
I'm working on creating a custom report and rather than just cut and paste code I'm trying to understand how magento layout files work better.

Magento 1.9
I'm looking at a report Products -> Most Viewed.

I've found the menu item added in

  app/code/core/Mage/Reports/etc/adminhtml.xml

Obviously I removed a lot to just show what I'm asking questions about.

<config>
    <menu>
        <report translate="title" module="reports">
            <children>
                <products translate="title" module="reports">
                    <children>      <!-- Menu Item -->
                        <viewed translate="title" module="reports">
                            <title>Most Viewed</title>
                            <action>adminhtml/report_product/viewed</action>
                        </viewed>
                    </children>
                </products>
            </children>
        </report>
    </menu>
</config>

Where it says:

<action>adminhtml/report_product/viewed</action>

I know that accesses

app/code/core/Mage/Adminhtml/Block/Report/Product

My question is, does the /viewed mean it opens Viewed.php, or subfolder /Viewed?

If the answer is it opens Viewed.php, what then opens the file /Viewed/Grid.php?


texts:
I want to set a max amount of products that can be added to the compare list.
I want to set the max at 3 products that can be compare.

Tried this code:

Step1:Create config.xml at app>code>local>Stackexchange>Magento38261>etc

Code:

<?xml version="1.0" ?>
<config>
    <modules>
        <Stackexchange_Magento38261>
            <version>1.0.0</version>
        </Stackexchange_Magento38261>
    </modules>

    <global>
        <models>
            <magento38261>
                <class>Stackexchange_Magento38261_Model</class>
            </magento38261>
        </models>
    </global>
    <frontend>
        <events>
            <controller_action_predispatch_catalog_product_compare_add>
                <observers>
                    <prevent_add_to_compare>
                        <class>magento38261/observer</class>
                        <method>preventadd</method>
                    </prevent_add_to_compare>
                </observers>
            </controller_action_predispatch_catalog_product_compare_add>
        </events>
    </frontend>
</config>

Step2: create Observer.php at app>code>local>Stackexchange>Magento38261>Helper

Code:

<?php
class Stackexchange_Magento38261_Model_Observer{
    public function preventadd($observer){

          $controller = $observer->getControllerAction();

         $items=Mage::getResourceModel('catalog/product_compare_item_collection')
                ->useProductItem(true)
                ->setStoreId(Mage::app()->getStore()->getId());
             if (Mage::getSingleton('customer/session')->isLoggedIn()) {
            $items->setCustomerId(Mage::getSingleton('customer/session')->getCustomerId());
            }else {
            $items->setVisitorId(Mage::getSingleton('log/visitor')->getId());
            }
            /* send error */
            if(count($items)>3){
             Mage::getSingleton('catalog/session')->addError(Mage::helper('catalog')->__('Error.'));
            $controller->setFlag('', Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH, true);
           // $controller->getResponse()->setRedirect(Mage::getUrl());

            /* start to redirec to lst page */
            $refererUrl = Mage::app()->getRequest()->getServer('HTTP_REFERER');
            if ($url = Mage::app()->getRequest()->getParam('referer_url')) {
                $refererUrl = $url;
            }
            if ($url =Mage::app()->getRequest()->getParam('r64')) {
                $refererUrl = Mage::helper('core')->urlDecode($url);
            }
            if ($url =Mage::app()->getRequest()->getParam('uenc')) {
                $refererUrl = Mage::helper('core')->urlDecode($url);
            }

            if (empty($refererUrl)) {
                $refererUrl =Mage::getBaseUrl();
            }
             $controller->getResponse()->setRedirect($refererUrl);

            }

            return $this;

    }
}

Step3:module file Stackexchange_Magento38261.xml at app\etc\modules

code:

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

But this code does not work, because I still can add more than 3 products to the compare list.


texts: Magento 2.2.7 - Reload totals cart using Ajax

texts:
I have tried below code

        var deferred = $.Deferred();
        getTotalsAction([], deferred);

But no luck and instead below error i am facing

  Uncaught TypeError: Cannot read property 'sectionLoadUrl' of undefined

Same code is working in Magento 2.1.9 but not working in Magento 2.2.7

Could you guys please help me out.
How to Refresh/Reload the totals cart via ajax
Thanks in advance.


texts: How to make product specific multiselect attributes on Magento 2.3?

texts:
We have a table that has data linked to products.

MyCustomDataTable {
    id,
    product_id,
    text_value
}

We want to be able to search for products using the MyCustomDataTable.text_value value. To do this I tried making a Data Patch and a custom source option.

namespace Vendor\Module\Setup\Patch\Data;

use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\Patch\DataPatchInterface;

class AddProductCustomData implements DataPatchInterface
{
    const ATTRIBUTE_NAME = "text_value";
    private $eavSetupFactory;
    private $moduleDataSetup;

    public function __construct(
        ModuleDataSetupInterface $moduleDataSetup,
        EavSetupFactory $eavSetupFactory
    ) {
        $this->moduleDataSetup = $moduleDataSetup;
        $this->eavSetupFactory = $eavSetupFactory;
    }

    public static function getDependencies()
    {
        return [];
    }

    public function getAliases()
    {
        return [];
    }

    public function apply()
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]);
        $eavSetup->addAttribute(\Magento\Catalog\Model\Product::ENTITY, self::ATTRIBUTE_NAME, [
            'position' => 200,
            'type'  => 'text',
            'label' => 'My Custom Data',
            'input' => 'multiselect',
            'user_defined' => false,
            'required' => false,

            'is_global' => true,
            'is_searchable' => true,
            'is_used_in_grid' => true,
            'is_visible_in_grid' => true,
            'is_filterable_in_grid' => true,
            'search_weight' => 5,

            'source' => 'Vendor\Module\Model\Config\Product\ExtensionOption',
            'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_STORE,
            'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend'
        ]);

        return $this;
    }
}

<?php
namespace Vendor\Module\Model\Config\Product;

use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource;
use Vendor\Module\Model\CustomDataFactory;

class ExtensionOption extends AbstractSource
{
    protected $_customDataFactory;

    public function __construct(CustomDataFactory $customDataFactory)
    {
        $this->_customDataFactory = $customDataFactory;
    }

    public function getAllOptions()
    {
        if ($this->options === null) {
            $collection = $this->_customDataFactory->create();
            $collection->addFieldToSelect('*');

            // TODO: Filter data based on product

            $this->options = [];
            foreach ($collection as $item) {
                $this->options[] = [
                    'value' => $item->getText(),
                    'label' => $item->getText()
                ];
            }
        }

        return $this->options;
    }
}

I need to limit the amount of options to only those that are linked to the product.

How do I do this or is there a better way?


texts:
I have a module which is modifying how bundled products are displayed for our store. As a part of this, we are removing the ability to display checkboxes. So, I want to change the backend so that it does not allow checkboxes as a valid input type for bundles.

I observe that Mage/Bundle/etc/config.xml defines the options in this section:

<product>
    <options>
        <bundle>
            <types>
                <select translate="label" module="bundle">
                    Drop-down
                </select>
                <radio translate="label" module="bundle">
                    Radio Buttons
                </radio>
                <checkbox translate="label" module="bundle">
                    Checkbox
                </checkbox>
                <multi translate="label" module="bundle">
                    Multiple Select
                </multi>
            </types>

However, I do not want to modify a core config file. Is there any way to have the config.xml for my module, remove the checkbox entry?

I know that blocks can be removed from the layout with a <remove "blockname"/> entry, so is there any equivalent for removing generic config values?


texts: Shipment Email not send automatically after creating a new shipment

texts:
In Magento2.3 - My site cannot be send shipment email automatically after creating a new shipment. But it can send order email successfully when a new order is created. Does anyone know. How to fix the issue?

Thanks!


texts: Magento 2 How can I show custom options on cart page?

texts:
I want to show custom product option in cart page magneto 2

echo $block->getLayout()->getBlock('product.info.options')->setProduct($product)->toHtml();

I got this type of error following :

Fatal error: Uncaught Error: Call to a member function setProduct() on boolean in /var/www/html/dev/gavin/albanyappliances/app/design/frontend/Albany/default/Magento_Checkout/templates/cart/item/default.phtml:116


texts: How to get sold products from third party app in magento database with complete payment and order

texts:
How to get all purchased product by customer with third party app  in magento.I am using for this as follow

i am getting all products ids and their quantities from app then creating an order in magento for it but it  creates an order with pending state but i want to make it complete so this can add in sale tables with complete order So I can make it report easily of sold products.


texts: Magento 2 : Which view model or Observable pulls shipping address data on payment page?

texts:
I see that following code from shipping-information template is used to display shipping address on checkout#payment page but unable to understand which Magento 2 PhP Model or knockout view model is getting this data. I know that this data comes from address tables but what I would like to understand is the middle man that's getting the data since I see the DB table and fronte-end code, but not the code that's fetching it.

<!-- ko foreach: getRegion('ship-to') -->
    <!-- ko template: getTemplate() -->
    <!--/ko-->
<!--/ko-->

Any clues gurus?

Alan Storm has a good to post to understand what's going on from shipping to payment page, which is very helpful in case anyone needs it.

Magento 2 checkout - Shipping to Payment


texts: Magento 2.3.1: Customer account edit page translation

texts:
How i can translate to another language?

If you created this account using Amazon Pay, you might not know your site password. (link)Request a password to change your account password.(link)

This doesn't work: "If you created this account using Amazon Pay, you might not know your site password. Request a password to change your account password."


texts:
We had the third party create a website for us and on one of the pages, as the page content is loaded, the content from one of the modals is visible. Once the page has finished loading it disappears but it is very ugly and distracting.
Looking at the HTML in the browser inspect, it appears a _show class is being added to an '' tag but I'm not sure what is creating that tag as it appears to be generated by the code itself.
As near as I can tell, the content that creates the modal and it's behaviour is below. I'm wondering if there is some way to set it to initially be hidden without breaking how the modal is supposed to work:

Lorem ipsum texty stuff

Detailed specs

Spec category

detail 1

detail 2


texts:
I'm using observer method sales_order_save_before to do some operations based on order state

   $order = $observer->getEvent()->getOrder();
   $initialState = $order->getOrigData('state');
   $newState = $order->getData('state');
   if($initialState != $newState && $newState == 'processing'){
    // Do some operation
    }
   if($initialState != $newState && $newState == 'complete'){
    // Do some operation
    }

First validation is working fine whereas in second if loop both the conditions are not being true at the same time.

I did some modifications in order and digged dipper into its status. What I see is when first time order is placed it's status and state is processing . When order is shipped and invoiced in admin it's status becomes complete but state still remains processing. When the status is complete and I write a comment on this order then it's state becomes complete due to which second if loop is not working.

How I can validate the loop when the order state becomes complete ? (initialState should be different than newState).


texts: Total product count display wrong in toolbar

texts:
$_productCollection = $block->getLoadedProductCollection();
$_productCollection->clear()
        ->addAttributeToFilter('author', array('eq' => 'Author-1'))
        ->load();
$this->setCollection($_productCollection);


texts: Handling local & community code pools, app/design and skin when upgrading versions

texts:
I have read through numerous posts and articles on upgrading from version 1.x to 1.x+1 and there are several things that i need to confirm my thinking is correct.

1) code in the community pool should be third party extensions and as such it should be possible to upgrade these, so the way to do this is to archive them and transfer to the new version then perform any indicated upgrades.

2) code in the local pool is probably locally developed and will need to be transfered to the new version and then tested and modified

3) in skin and app/design the custom elements for both local and community pools will need to be tracked down. This includes the media folder and various miscellaneous items such as app/etc/modules/*.xml files. Other than checking on a directory by directory basis there seems no easy way to do this

4)Several times i have seen one of the steps in the upgrade being to flip certain switches in the database via admin. e.g. logging to be on, but then a later step is to replace the "new" database with the one from the original version. So presumably this switch flipping is done in the database/version you are upgrading from.

5) in all cases it seems to be a fraught and error prone process that will require varying amounts of manual intervention and troubleshooting


texts:
I'm trying to import multiple product images into Magento using magmi and also add products to different category trees in the same import.

I've tried using ; to separate images under the media_gallery csv column heading and also to separate categories in the categories
 column heading.

I'm getting now errors when I run the import but only one image and category is being created.  the second image is being totllay missed and the ';' in the category is being added as a category as a character.


texts: Where does the foreach ($filterItems as $filterItem) coming in Magento 2 layered navigation (filter.phtml)

texts:
I am customising public_html\vendor\magento\module-layered-navigation\view\frontend\templates\layer\filter.phtml in custom module.I need to find which method or controller the foreach ($filterItems as $filterItem): is coming so I can call that method or block in my custom file.

<?php foreach ($filterItems as $filterItem): ?>

        <?php if ($filterItem->getCount() > 0): ?>
            <a href="<?php echo $block->escapeUrl($filterItem->getUrl()) ?>">
                <?php /* @escapeNotVerified */ echo $filterItem->getLabel() ?>
                <?php if ($this->helper('\Magento\Catalog\Helper\Data')->shouldDisplayProductCountOnLayer()): ?>
                    <?php /* @escapeNotVerified */ echo $filterItem->getCount()?>
                        <?php if ($filterItem->getCount() == 1):?> <?php /* @escapeNotVerified */ echo __('item')?><?php else:?> <?php /* @escapeNotVerified */ echo __('items') ?><?php endif;?>
                <?php endif; ?>


texts: Magento 2: Unable to import products due to Invalid URL Key Error

texts:
I have made an upload file with both simple and configurable products.
I have also specified all the necessary configurable_variations.

I am using the Add/Update import behaviour

When I click Check Data there are no errors in the Validation results

However, when I click import, I get Maximum error count has been reached or system error is occurred!and Invalid URL key.

The url_key column for all the products is empty.

So far, the solutions like this one that I have come across are not helping.

How can go about solving this error and import products successfully.

Thanks in advance!


texts: How to set the conditions for displaying of the related-products

texts:
Overriding related-product collection. My aim is to set limit for related product display. Related-products are not displayed if there are less than 10 products, the maximum number of products that can be displayed - 20, more than 20 related-products should not be displayed. But if there are less than 10 products,  do not need to display related-products at all.
I need support, please explain or show details, how can I do this using sql queries in a collection ? (not a template) Here is my class in which I am trying to do this:
class Related extends \Magento\Catalog\Block\Product\ProductList\Related
{

    /**
     * I set limit here
     */
    const RELATED_LIMIT = 20;

    public function __construct(
        \Magento\Catalog\Block\Product\Context $context,
        \Magento\Checkout\Model\ResourceModel\Cart $checkoutCart,
        \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility,
        \Magento\Checkout\Model\Session $checkoutSession,
        \Magento\Framework\Module\Manager $moduleManager,
        array $data = []
    ) {
        $this->_checkoutCart = $checkoutCart;
        $this->_catalogProductVisibility = $catalogProductVisibility;
        $this->_checkoutSession = $checkoutSession;
        $this->moduleManager = $moduleManager;
        parent::__construct(
            $context,
            $checkoutCart,
            $catalogProductVisibility,
            $checkoutSession,
            $moduleManager,
            $data
        );
    }

    /**
     * Prepare data
     * added limit for collection
     *
     * @return $this
     */
    protected function _prepareData()
    {
        $product = $this->getProduct();
        /* @var $product \Magento\Catalog\Model\Product */

        $this->_itemCollection = $product->getRelatedProductCollection()->addAttributeToSelect(
            'required_options'
        )->setPositionOrder()->addStoreFilter();

        //limit number of products
        $this->_itemCollection->setPageSize(self::RELATED_LIMIT);

        if ($this->moduleManager->isEnabled('Magento_Checkout')) {
            $this->_addProductAttributesAndPrices($this->_itemCollection);
        }
        $this->_itemCollection->setVisibility($this->_catalogProductVisibility->getVisibleInCatalogIds());

        $this->_itemCollection->load();

        foreach ($this->_itemCollection as $product) {
            $product->setDoNotUseCategoryId(true);
        }

        return $this;
    }
}


texts: Magento 1.9.0.1 to 2.2.6 data-migration issue

texts:
Magento data-migration process all done and all data showing but products add and edit feature not working. when we click on product edit action then we will face issue check below error:

  PHP Fatal error:  Uncaught TypeError: Argument 2 passed to
  Magento\Framework\View\Element\UiComponentFactory::argumentsResolver()
  must be of the type array, null given, called in
  /var/www/html/magentofirst/vendor/magento/framework/View/Element/UiComponentFactory.php
  on line 220 and defined in
  /var/www/html/magentofirst/vendor/magento/framework/View/Element/UiComponentFactory.php:172

Stack trace:

#0 /var/www/html/magentofirst/vendor/magento/framework/View/Element/UiComponentFactory.php(220): Magento\Framework\View\Element\UiComponentFactory->argumentsResolver('file_upload', NULL)
#1 /var/www/html/magentofirst/vendor/magento/module-ui/Component/Form/Field.php(84): Magento\Framework\View\Element\UiComponentFactory->create('file_upload', 'jvs_file', Array)
#2 /var/www/html/magentofirst/vendor/magento/framework/View/Layout/Generator/UiComponent.php(159): Magento\Ui\Component\Form\Field->prepare()
#3 /var/www/html/magentofirst/vendor/magento/framework/View/Layout/Generator/UiComponent.php(156): Mag" while reading response header from upstream, client: 43.240.9.243, server: magentofirst.com, request: "POST /ehplabsc_admin/catalog/product/reload/type/simple/store/0/popup/1/componentJson/1/prev_set_id/16/key/23b5e695b6a69fb96cd248a624282baaea5126f0c9a7e9e8232087140eb6ac42/?set=11&isAjax=true HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "http://magentofirst.com", referrer: "http://magentofirst.com/ehplabsc_admin/catalog/product/new/set/16/type/simple/key/6b13831a073eed316c24f915474fcd0f361293882a5ca0ef1898742a51d1777f/"


texts:
how to remove only ".00" decimal from price in magento2?

For Example,

$500.00 => $500

$19.99  => $19.99

Any help will be appreciated.


texts: how to get path of custom xml file in magento2

texts:
I created xml file in my module etc folder.i want to read this xml file and store into variable as a string.

\Magento\Framework\Filesystem\Directory\Read $read

$XMLGetRequest=$this->read->readFile('here i need xml file path');


texts: How to share my cart via mail with others magento 2

texts: I want to add the possibility of sharing a cart with others via mail so  is their a solution for that please  because i did not find any article that can help me in this


texts: How to determine order in which totals are collected in order invoice?

texts:
I'm using magento 1.9, and I just added a custom total following this tutorial: http://www.classyllama.com/blog/unravelling-magentos-collecttotals-example. Everything is working fine in terms of the total showing up in the cart, purchase history, purchase confirmation, etc, as well as actually being added to the total and saved to all the right tables.

I'm also using the Enterprise Reward module to allow customers to pay with points.

There's an issue, however: let's say a customer gets an item to which this new fee applies, and then they choose to use their points to pay, and their points happen to cover their entire order. In this scenario, the grand total paid is $0.00, and what they pay with points is the equivalent of the expected total + points, all's fine and dandy until this point, and the order that's saved to the database looks okay to me.

If one goes to look at the invoice generated, however, one can see that the invoice thinks only everything except the fee was covered by points, and thus the invoice says that the customer "paid" the fee (e.g. total paid is let's say $3 which is exactly what the fee is).

I tried to do some troubleshooting and noticed that when the Invoice model gets its total models as part of collectTotals, it gets them in such an order that the reward calculation happens before the fee calculation, and when I debug the reward module, it does indeed only see the total before the fee is applied and that's why it only says it'll use points for that, ignoring the fee.

I tried setting the before node in my module's config.xml to explicitly say that it has to happen before reward for the order_invoice entry, like so:

        <order_invoice>
            <totals>
                <fee>
                    <class>
                        the_fee/sales_order_invoice_total_fee
                    </class>
                    <after>subtotal</after>
                    <before>reward</before>
                </fee>
            </totals>
        </order_invoice>

I tried adding more totals to both before and after nodes, clearing all the caches I could clear in between and even though the config seems to be read anew in between tries, I still encounter the issue.

Is there any other place I should be updating to ensure that this is calculated correctly? Should I be messing with the Reward module? Or some other config? Usually changing stuff in config.xml has the expected effect but this has me at wits end, any pointers will be extremely appreciated!!


texts: Magento 2.1.6 Readiness check when installing new extension

texts:
I've installed the latest version of magento community edition via composer and all is working fine until i want to install an extension. I get the following:

PHP Version Check
Your PHP version is . The required PHP version is . Show detail
PHP Settings Check *
PHP Extensions Check
missing PHP extensions. Hide detail
The best way to resolve this is to install the correct missing extensions. The >exact fix depends on our server, your host, and other system variables.
Our PHP extension help can get you started.

I have gone over the server settings and have checked there is no variation on php versions which is currently on 7.0.17 all sites under this server are running the same. I've exhausted all options which i've found online such as modifying composer.json and there's no need for always_populate_raw_post_data=-1 as it's removed in PHP7.


texts: Magento 1.7 - Blank page on login and checkout

texts:
I'm having some trouble with the login page and the checkout page. Here is the debug message whenever i try to login (just show a blank page):

Notice: Undefined variable: message  in /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/code/core/Mage/Customer/controllers/AccountController.php on line 182

0 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/code/core/Mage/Customer/controllers/AccountController.php(182): mageCoreErrorHandler(8, 'Undefined varia...', '/home/235880.cl...', 182, Array)

1 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Customer_AccountController->loginPostAction()

2 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('loginPost')

3 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))

4 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()

5 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/Mage.php(687): Mage_Core_Model_App->run(Array)

6 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/index.php(114): Mage::run('', 'store')

7 {main}

And when i try to do a checkout (One step checkout module), throw this error:

Validate class not found from basename 'EmailAddress'

0 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/code/core/Mage/Customer/Model/Customer.php(811): Zend_Validate::is('lfsky.pedro@gma...',
'EmailAddress')
1 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/code/core/Mage/Checkout/Controller/Action.php(45): Mage_Customer_Model_Customer->validate()

2 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/code/community/Inovarti/Onestepcheckout/controllers/IndexController.php(16): Mage_Checkout_Controller_Action->_preDispatchValidateCustomer()

3 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(408): Inovarti_Onestepcheckout_IndexController->preDispatch()

4 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')

5 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))

6 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()

7 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/app/Mage.php(687): Mage_Core_Model_App->run(Array)

8 /home/235880.cloudwaysapps.com/txagccwhxs/public_html/index.php(114): Mage::run('', 'store')

9 {main}

I really don't know what do to. What do you think?


texts:
I bought and applied a new RWD theme called Ultimo to my 1.6.1 Magento store.

I followed the instructions and went into system > configuration and changed the package name to 'Ultimo' and the Theme setting to default.

After I did this I made sure I flushed the cache,cookies etc in Magento + Browser.

So when I go onto the customer side it still looks exactly as it did before the theme.

I have to manually go into each category or page and select Custom Design > Ultimo for any changes to appear.

This has ended up taking me a very long time, manually selecting the theme each time.

What are my options here?


texts: Magento2: How to use the Form Field Render for Weight Field?

texts:
I'd like information on the following :

How to use the Form Field Render for Weight Field?

How to Add Custom Field in Magento Tab ?

See In the Magento catalog that displays some customization to the Weight field as display formatting of the value to 2 decimal places and UNIT Measure


texts: How to auto fill or validate city based on zip code in magento 2.3.6 address field of my account page and checkout page


texts: Difference between SearchCriteria VS SearchResults Vs SearchCriteriaBuilder and when should we use it?

texts:
For searching in repositories we are using searchCriteriaInterface but i noticed sometimes we are using SearchCriteriaBuilder as well.

In which case we should use searchCriteriaBuilder? What's the use of searchResult?  When should we use it?

Any help would be appreciated.


texts: Paypal Payments Pro not working while in test mode

texts: I just set up Paypal Payments Pro and I cant get test mode to work. I have tried several of the recommended credit cards that paypal documentation shows, but when I  test it in live mode, it declines (im assuming because its in live mode) but when I switch it to test mode, all that happens is I get a spinner that never ends and no message.


texts: How to Add products to cart when clicks on a custom button

texts: I need single click checkout of product when user clicks on a custom button in my custom controller. Hope will get help.


texts: In Review orders page table rate amount has showing wrong,But calculation area amount showing correct and also code override not working- Magento2.3

texts:
I am using magento2.3

table rate -> enabled:yes

condition:Weight vs Destination

Ship to Applicable Countries:specific countries

Include Virtual Products in Price Calculation:yes

Calculate Handling Fee:Fixed, Ship to Specific Countries: India
in Review orders page table rate amount showing wrong ,But same page calculation area table rate amount showing correct ,See the below image

In image Best way(Table Rate) 22.00 has showing it's wrong value,In below Right side Shipping & Handling (Best way - Table Rate) - 15.00 ,Here showing the correct value and calculation also correct.

I try to override with code ,new module has create with app/code/Shipping/ShippingRate/etc/Module.xml file,
app/code/Shipping/ShippingRate/etc/di.xml file,
app/code/Shipping/ShippingRate/registration.php and override files
app/code/Shipping/ShippingRate/Block/Checkout/Overview.php file & app/code/Shipping/ShippingRate/view/frontend/templates/checkout/overview.phtml file, But Code override has not happening ,it doesn't entered into that module..

How to fix this issue??


texts:
I just recently updated to 2.1.16 and noticed that multiple cart rules were not being applied any longer to the quote. It is only applying one now. The cart rules are still associating correctly if i were to check the rule conditions.

$fdbRules = $this->getActiveRules();

   foreach($fdbRules as $ruleItem)
   {
     $ruleCondition = $ruleItem->getActionCondition()->getConditions();

       foreach($ruleCondition as $condition)
       {
         if($condition->getAttributeName() == "category_ids")
         {
           if($condition->getOperator() === "==")
           {
             if($this->compareCategoryIds($product->getCategoryIds(), $condition->getValue()))
             {
             $applicableRules[$num]['id'] = $ruleItem->getRuleId();
             $applicableRules[$num]['name'] = $ruleItem->getName();
             $applicableRules[$num]['description'] = $ruleItem->getDescription();
             $applicableRules[$num]['simple_action'] = $ruleItem->getSimpleAction();
             $applicableRules[$num]['discount_amount'] = $this->formatPercent($ruleItem->getDiscountAmount());
             $applicableRules[$num]['category_ids'] = $condition->getValue();
             $num++;
            }
           }
         }
       }
   }

I am able to pull all associated rules to the product.

Only one rules is being applied in the quote.

This was working fine before the update and wanted to see if anyone else knew if this was a bug or could test on their 2.1.16 for me.


texts: How to block all IP from accessing a page on web site

texts: Is there a way to block all IP addresses except my own from a certain page on our website using .htaccess?


texts: How to convert guest checkout order to My Account Order

texts:
I have placed an order from guest account and the end of order I have given an option to create an Account, when I created the account and navigate to order sections i see no others.
So i expplored a bit but still i am not able to understand.

Right now my code loads the order information via this code

   public function getOrderInformation($orderid)
   {
     $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
     $order = $objectManager->create('Magento\Sales\Api\Data\OrderInterface')->load($orderid);
     return $order;
   }

    $shippingAddressObj = $orderInfo->getShippingAddress();
    $shippingAddressArray = $shippingAddressObj->getData();
    $paymentObj = $orderInfo->getPayment();
    $paymentArray = $paymentObj->getData();

also for order related information like name, quantity, size I use this

    <?php foreach ($orderInfo->getAllVisibleItems() as $item): ?>
    <?php endforeach; ?>

How can I achieve the same for guest user order, as I will be using the same phtml for my account(guest or registered user).