texts: Manually specifying top search results for a specific search query

texts:
I'm looking for a way to manually force certain search results for certain search queries.

For example, if the customer searches for "T-Shirt", I'd like to be able to manually select 4-5 products that I'd like to show as the first search results for that search query, even though they might have nothing to do with T-Shirts at all. After that, Magento's default search results should appear.

Even though there are a lot of searching extensions, none seem to offer what I have in mind.


texts: Magento 2.2.5 Enterprise Edition Price Reindexing On Checkout fails in case of backorder

texts:
I have been facing issue on checkout page in case of Back Order product. The exception I am getting "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42438-0-1' for key 'PRIMARY', query was: INSERT INTO catalog_product_index_price_temp SELECT catalog_product_index_price_final_temp.entity_id, catalog_product_index_price_final_temp.customer_group_id, catalog_product_index_price_final_temp.website_id, catalog_product_index_price_final_temp.tax_class_id, catalog_product_index_price_final_temp.orig_price AS price, catalog_product_index_price_final_temp.price AS final_price, catalog_product_index_price_final_temp.min_price, catalog_product_index_price_final_temp.max_price, catalog_product_index_price_final_temp.tier_price FROM catalog_product_index_price_final_temp"

Followings are my findings :

Price re-indexing happens to be initiated when "sales_model_service_quote_submit_success" is fired which calls Magento\CatalogInventory\Observer\ReindexQuoteInventoryObserver.
If you see line number 77, this where it starts price reindxing.
Also, I am not able to find the existance of key mentioned in exceptioned.

Help me. This is bit of urgent.


texts: Custom Option Math Operators - Multiply and Divide

texts:
Magento 1.8

Are there multiply and divide operators? I can only add in minus (-) or plus (+).


texts: How to Get Product Image data in Cart API Magento 2?

texts:
GET /V1/carts/mine

This API Returns information for the cart for a specified customer.

How to get Cart Item Images
Because in Mobile Application we show Product Images in CART - so how
Can I get Product Images - Item wise in /V1/carts/mine REST API?


texts:
I am creating a module where I am adding an observer to the event sales_order_save_after which checks the order status and then sends an invoice e-mail.
However, the event is only valid if the order is saved, e.g. create a shipment. This is not what I need.

Is there an event to catch an order status change (the order status is changed from processing to complete after an API push call).

current events.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name='sales_order_save_after'>
        <observer name='vendor_autoinvoice_send_invoice' instance='Vendor\AutoInvoice\Model\Observer\AutoInvoice'/>
    </event>
</config>


texts:
I'm using Magento 2.4.2. I want to show my zero tax subtotal and taxable products subtotal in the cart and on order invoices.
I have set Display Zero Tax Subtotal to Yes but nothing shows on either cart or invoices.

Are there more settings or specific conditions required to get this to work?
Thank you.


texts: Can't create new category and product - Integrity constraint violation: 1048 Column 'entity_id' cannot be null

texts:
I've been working with magento for a month now and everything working fine so far. Due to circumstances I need to move magento to another machine. Again everything are working properly after I move it. But then when I want to create new category and products I received the below error. I don't think that moving magento was the main cause. I'm using magento version 2.2.4.

Error received when saving new category

Error received when saving new simple products

Exception log (after saving new category):

*main.CRITICAL: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'entity_id' cannot be null, query was: INSERT INTO `catalog_category_entity` (`entity_id`, `attribute_set_id`, `parent_id`, `created_at`, `updated_at`, `path`, `position`, `level`, `children_count`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) {"exception":"[object] (Zend_Db_Statement_Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'entity_id' cannot be null, query was: INSERT INTO `catalog_category_entity` (`entity_id`, `attribute_set_id`, `parent_id`, `created_at`, `updated_at`, `path`, `position`, `level`, `children_count`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) at magento\\vendor\\magento\\zendframework1\\library\\Zend\\Db\\Statement\\Pdo.php:235, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'entity_id' cannot be null at magento\\vendor\\magento\\zendframework1\\library\\Zend\\Db\\Statement\\Pdo.php:228)"} []*

Exception log (after saving new simple products):

*main.CRITICAL: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'entity_id' cannot be null, query was: INSERT INTO `catalog_product_entity` (`entity_id`, `attribute_set_id`, `type_id`, `sku`, `has_options`, `required_options`, `created_at`, `updated_at`) VALUES (?, ?, ?, ?, ?, ?, ?, ?) {"exception":"[object] (Zend_Db_Statement_Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'entity_id' cannot be null, query was: INSERT INTO `catalog_product_entity` (`entity_id`, `attribute_set_id`, `type_id`, `sku`, `has_options`, `required_options`, `created_at`, `updated_at`) VALUES (?, ?, ?, ?, ?, ?, ?, ?) at magento\\vendor\\magento\\zendframework1\\library\\Zend\\Db\\Statement\\Pdo.php:235, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'entity_id' cannot be null at magento\\vendor\\magento\\zendframework1\\library\\Zend\\Db\\Statement\\Pdo.php:228)"} []*

From the exception log, magento was failing due to entity_id.

Do you know what's causing and how to solve the issue? Updating existing products are working fine. Any help will be appreciated.


texts: Remove Mass action from Sales/Order Grid

texts:
I need to remove a few options from the Admin/Sales/Order Actions list. I do not want to edit the core files in Magento

Right now when I click on the drop down list Actions in the top right corner of the page, it shows Print Invoices among other things. I want to remove that option in my code without editing anything in the core files.

I know currently if I delete the following line of code from Core file Mage/Adminhtml/Block/Sales/Order/Grid.php the option will not be displayed.

$this->getMassactionBlock()->addItem('pdfinvoices_order', array(
         'label'=> Mage::helper('sales')->__('Print Invoices'),
         'url'  => $this->getUrl('*/sales_order/pdfinvoices'),
    ));

Is there any other way to do this?


texts: Module does not display custom settings, magento 1.9

texts:
system.xml

<?xml version="1.0"?>
<config>
    <tabs>
        <ronisbt translate="label" module="feedback">
            Feedback
            <sort_order>200</sort_order>
        </ronisbt>
    </tabs>
    <sections>
        <feedback_setting module="feedback" translate="label">
            Feedback
            <tab>Feedback</tab>
            <frontend_type>text</frontend_type>
            <sort_order>1</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
            <groups>
                <captcha translate="label">
                    Captcha
                    <expanded>1</expanded>
                    <sort_order>1</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_Website>1</show_in_Website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <blocks_captcha_secret>
                            Secret key
                            <frontend_type>text</frontend_type>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_Website>1</show_in_Website>
                            <show_in_store>1</show_in_store>
                        </blocks_captcha_secret>
                        <blocks_captcha_public>
                            Public key
                            <frontend_type>text</frontend_type>
                            <sort_order>3</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_Website>1</show_in_Website>
                            <show_in_store>1</show_in_store>
                        </blocks_captcha_public>
                    </fields>
                </captcha>
            </groups>
        </feedback_setting>
    </sections>
</config>

adminhtml.xml

<?xml version="1.0"?>
<config>
    <acl>
        <resources>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <feedback_setting translation="title" module="feedback">
                                        <title>Feedback</title>
                                    </feedback_setting>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
<menu>
    <cms>
        <children>
            <feedback translate="title" module="feedback">
                <title>Contact Form</title>
                <action>adminhtml/ronisfb</action>
                <sort_order>20</sort_order>
            </feedback>
        </children>
    </cms>
</menu>
</config>


texts:
I've seen a few things floating around the impermanent internet (i.e. Twitter) that some recent changes to Magento 2 make it possible to install a module into the vendor directory via composer, and Magento 2 will see your module without any symlink-ing tomfoolery.

If this is true, is there a "minimum composer.json" file floating about for module developers to use with their modules to let Magento 2 users install them into their systems?


texts: Magento2.3 Could not open input file update/cron.php does not exist

texts:
I have a Magento2.3 based website and I did a mass update of products 2 days ago. However still at the top of the Magento admin panel I see a yellow bar that says
Task "Update attributes for 50 selected products": 5 item(s) have been scheduled for update.

I tried running cron manually on the command line via this command:
php bin/magento cron:run

However after a few minutes it still does not clear.
I have the below cron jobs listed/setup when I look at crontab -e on the command line
* * * * * /usr/bin/php7.3 /var/www/***/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /var/www/***/var/log/magento.cron.log
* * * * * /usr/bin/php7.3 /var/www/***/update/cron.php >> /var/www/***/var/log/update.cron.log
* * * * * /usr/bin/php7.3 /var/www/***/bin/magento setup:cron:run >> /var/www/***/var/log/setup.cron.log

So I am not sure what the issue is. I think I am missing the /update/cron.php file ??
Also I do not seem to get any automated emails such as the back in stock emails which I believe are triggered via Cron.
When I look in my cron_schedule database I see a lot of rows that say
Cron Job indexer_update_all_views is missed at 2020-12-04 15:50:00
Cron Job indexer_reindex_all_invalid is missed at 2020-12-04 13:15:00
Cron Job consumers_runner is missed at 2020-12-04 10:44:00
Class Magento\Framework\MessageQueue\Consumer\Config\CompositeReader\Interceptor does not exist

any Suggestions?


texts:
EDIT
Sorry, I have formulated my question extremely badly: I need to retrieve this field(no problem) and read the value with php(problem, I haven't ever met this type of input and I don't know howto handle it)

I need to retrieved session_data field from the table core_session and read the value with php? From PhpMyAdminField structure:

session_data    mediumblob

and it lets me download it like a .bin file.
I know it isn't fully related to Magento, but maybe here someone has got a better idea on how the whole session storage process works.


texts: how does frontend js methods call a backend api in magento 2.3

texts:
I'm new to PHP and Magento.

I am building a payment module. I have saved some encrypted credentials in the core_data table. i am currently able to retrieve these decrypted credentials with my method renderer via : window.checkoutConfig.payment.name_of_module. these are made available through my Model>Ui>ConfigProvider.php, where they return the configurations(decrypted).

Problem :

I can grab these credentials and make an XHR request via my JavaScript. But my decrypted credentials will be out on display on dev tools.

is there a way for my listen to the method in my method renderer, on click, which calls a Magento backend API to run a function. so that it does not need to be displayed?

SINCERELY APPRECIATE with clear examples as I am really finding it tough to go through the docs.


texts:
we are using custom module for displaying shipping charges in Product View page.

Means once we enter the zip code in view page,

1)it will calculate the shipping charges &
2)it will display shipping is available or not as here , [zip : 110001]

If you observe clearly ,you can see "Shipping is available" is not displaying properly in above image. so i want to move the text above and want to display as here :

I am using following code to display shipping charges and message :

<?php echo "Selling Price + " . str_replace('.00','',$_excl) . " Delivery & Shipping is available";?>

complete code of the results.phtml :

        <?php
    echo Mage::helper('webdevlopers_productpageshipping')->getShiptitle();
        ?>

<?php if ($this->getResult()):?>

            <?php foreach ($this->getResult() as $code => $_rates): ?>

<?php echo $this->getCarrierName($code) ?>

                    <?php foreach ($_rates as $_rate): ?>
                        <li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"';?>>
                           <?php if ($_rate->getErrorMessage()): ?>
                                <?php echo $_rate->getErrorMessage() ?>
                           <?php else: ?>
                                <?php
                            //  echo $_rate->getMethodTitle()
                                ?>
                                <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
                                <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>

                                <?php echo "Selling Price + " . str_replace('.00','',$_excl) . " Delivery & Shipping is available";?>

                                <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
                                    (<?php echo Mage::helper('webdevlopers_productpageshipping')->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
                                <?php endif; ?>
                           <?php endif ?>

                    <?php endforeach; ?>

            <?php endforeach; ?>

        <?php else: ?>
        <?php //echo $this->getMessagesBlock()->toHtml(); ?>
        <?php echo Mage::helper('webdevlopers_productpageshipping')->getResult(); ?>
<?php endif;?>


texts: Updating the type attribute of all CSS and JS references in the HEAD

texts:
I created a new theme in Magento 2 extending the default Magento Luma theme.

However, now I want to make some very specific customizations to all CSS and JS files referenced in the <HEAD>.

I want to change all CSS references that look like this:

<link  rel="stylesheet" type="text/css"  media="all" href="https://my-magento-url/pub/static/version1574090503/frontend/restive/magedot/en_US/mage/calendar.css" />

to look like this:

<link  rel="stylesheet" type="text/css/custom"  media="all" href="https://my-magento-url/pub/static/version1574090503/frontend/restive/magedot/en_US/mage/calendar.css" />

and all JS references that look like this:

<script  type="text/javascript"  src="https://my-magento-url/pub/static/version1573830556/frontend/Magento/luma/en_US/requirejs/require.js"></script>

to look like this:

<script  type="text/javascript/custom"  src="https://my-magento-url/pub/static/version1573830556/frontend/Magento/luma/en_US/requirejs/require.js"></script>

Notice that the type attribute changes from text/{file_type} to text/{file_type}/custom, where {file_type} is either css or javascript.

What files need to be updated/extended to make this work?


texts: Why does Magento 2 suspend inline translation while sending a transactional email?

texts: What is Magento 2 trying to avoid by suspending inline translation before it sends and then resuming after?


texts: Logging to a Custom log file or dynamic log time stamp in Magento2

texts: How i can create my own custom log file with time stamp each time when i log the error


texts: Magento2 to_html_after event was remove?

texts:
How can I get intercept html output in magento2?

For example, for magento 1.x i can do:

///core_block_abstract_to_html_after
$block = $observer->getBlock();
if($block->getNameInLayout() == 'root'){
    $output = $observer->getTransport()->getHtml();
}

In magento2 the to_html_after event was remote?:
[https://github.com/magento/magento2/blob/0.42.0-beta10/lib/internal/Magento/Framework/View/Element/AbstractBlock.php#L622][1]


texts: I have an error pointing to this block class but i'm not sure what's wrong with it.. (magento 2.2.5)

texts:
A validation error occured in an XML layout file

<block class="Magento\Cms\Block\Block" name="gbp_success_page-block">

        <container name="gbp-fullwidth-hero-wrapper" as="heroWrapper" label="Hero Wrapper" htmlTag="div" htmlClass="gbp-fullwidth-hero-wrapper" before="main.content">
          <block class="Magento\Cms\Block\Block" name="gbp-fullwidth-hero-block" ifconfig="theme/general/enable_fullwidth_hero">
            <arguments>
                <argument name="block_id" xsi:type="string">gbp_fullwidth_hero</argument>
            </arguments>
          </block>
        </container>

I do not see anything wrong with this:

<?xml version="1.0"?> <body> <referenceContainer name="content"> <block class="Magento\Cms\Block\Block" name="gbp_success_page-block"> <arguments> <argument name="block_id" xsi:type="string">gbp_success_page</argument> </arguments> </block> </referenceContainer> </body>


texts:
On main category page when I mouse over each product - this is how they show. Product image displays - Title/Price get covered up.

There seems to be another hover box behind and below the main one which covers the product below the current highlighted one. And all the products are not spaced out at all. They are right next to each other.

I am not sure how this came about - I have a custom theme(parent is Luma). I have copied over to my theme the
    Magento_Catalog/layout , Magento_Catalog/templates, Magento_Catalog/web and Magento_Catalog/requirejs-config.js

I have not edited any of the files in Magento_Catalog/layout

I am thinking that maybe the styling is wrong somewhere?

Does the catalog style come from  lib/web/css/source/lib?

I can not seem to find where the hover effect is coming from? jQuery? knockoutJs?

I appreciate any help! I have been trying to figure this one out for days!


texts: How to use magento2 function in root file

texts:
create test.php file in magento2 root, i want require baseUrl
also i try to

require __DIR__ . '/app/bootstrap.php';

but it's not work


texts:
Last year I migrated from 1.7 to 2.1.7. I used

$ composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition .

to create the Magento installation which I believe it is called the metapackage installation method.

Now I encounter difficulties to upgrade 2.1.7 and I already tried the standard procedure with composer to upgrade which should be possible, but I cannot see what's going wrong. I cannot upgrade with the Web setup upgrade because the notification says it is a git clone also.

Doing the following

$ composer require magento/product-community-edition 2.1.14 --no-update

$ composer update

gives me errors about dependencies of Magento itself (not other custom modules). My composer.json file looks very standard and it is quite similair as on github

Here is a part of my composer.json file.

    {
        "name": "magento/magento2ce",
        "description": "Magento 2 (Community Edition)",
        "type": "project",
        "version": "2.1.7",
        "license": [
            "OSL-3.0",
            "AFL-3.0"
        ],
        "require": {
            "php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
            "zendframework/zend-stdlib": "~2.4.6",
            "zendframework/zend-code": "~2.4.6",
            "zendframework/zend-server": "~2.4.6",
            "zendframework/zend-soap": "~2.4.6",
            "zendframework/zend-uri": "~2.4.6",
            "zendframework/zend-validator": "~2.4.6",
            "zendframework/zend-crypt": "~2.4.6",
            "zendframework/zend-console": "~2.4.6",
            "zendframework/zend-modulemanager": "~2.4.6",
            "zendframework/zend-mvc": "~2.4.6",
            "zendframework/zend-text": "~2.4.6",
            "zendframework/zend-i18n": "~2.4.6",
            "zendframework/zend-eventmanager": "~2.4.6",
            "zendframework/zend-view": "~2.4.6",
            "zendframework/zend-servicemanager": "~2.4.6",
            "zendframework/zend-json": "~2.4.6",

 ...
        },
        "require-dev": {
            "phpunit/phpunit": "4.1.0",
            "squizlabs/php_codesniffer": "1.5.3",
            "phpmd/phpmd": "@stable",
            "pdepend/pdepend": "2.4.0",
            "fabpot/php-cs-fixer": "~1.2",
            "lusitanian/oauth": "~0.3 <=0.7.0",
            "sebastian/phpcpd": "2.0.0"
        },
        "replace": {
            "magento/module-marketplace": "100.1.2",
            "magento/module-admin-notification": "100.1.2",
            "magento/module-advanced-pricing-import-export": "100.1.2",
            "magento/module-authorization": "100.1.2",
            "magento/module-authorizenet": "100.1.5",
            "magento/module-backend": "100.1.3",
            "magento/module-backup": "100.1.2",
            "magento/module-braintree": "100.1.6",
            "magento/module-bundle": "100.1.3",
            "magento/module-bundle-import-export": "100.1.3",
            "magento/module-cache-invalidate": "100.1.3",
            "magento/module-captcha": "100.1.3",
            "magento/module-catalog": "101.0.7",
            "magento/module-catalog-import-export": "100.1.4",
            "magento/module-catalog-inventory": "100.1.5",
            "magento/module-catalog-rule": "100.1.4",
            "magento/module-catalog-rule-configurable": "100.1.3",

...

Trying to just copy the composer.json 2.1.18 file won't update the core files, right? What am I doing wrong that it won't work with the normal composer update? Do I just have to download the 2.1.14 archive and copy and overwrite the Magento root?


texts: Get product image by its "Role" in the gallery

texts:
On the products grid in the category view I need to display additional image for some products.
When I have a gallery of product images:

$images = $product->getMediaGalleryImages();
foreach ($images as $item)
{
    //...
}

how to retrieve an image by its role in the gallery? For example, I'd like to get the image which is marked with the Thumbnail role (or with some other custom role).

Is there any way to do that?


texts:
I'm trying to add new product in my Magento theme, but it cannot be added
the button (save) that add the product doesn't work.

this problem appeared suddenly although my website was running without any problem


texts: How to use 'searchCriteria' and 'fields' in REST API for fetch orders

texts:
I am using below curl_init like this,

$webSiteUrl = 'mydomain.com'

$last2DayUpdated = date('Y-m-d',(strtotime ('-1 day', strtotime(date('Y-m-d')))));

$ch = curl_init("{$webSiteUrl}/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=updated_at&searchCriteria[filter_groups][0][filters][0][value]={$last2DayUpdated}&searchCriteria[filter_groups][0][filters][0][condition_type]=gteq");

But I want to fetch particular info like billing_address,customer_firstname,customer_lastname

For this, I need to use fields parameter.

But both parameters searchCriteria and fields are not working with each other. Only single parameter is working.

Anyone knows how can I use these both parameters together?

UPDATED:

I have tried as below, but not working.

$ch = curl_init("{$webSiteUrl}/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=updated_at&searchCriteria[filter_groups][0][filters][0][value]={$last2DayUpdated}&searchCriteria[filter_groups][0][filters][0][condition_type]=gteq&fields=billing_address,customer_firstname,customer_lastname");


texts: How to associate downloadable product to configurable products in magento

texts: I have a product with two format one downloadable and another non-downloadeable. How can I show both format together on frontend with that product.


texts: Stucked at billing Information section on checkout page

texts:
Every time i try to continue the testing procedure for the checkout page i get stuck at the billing information. It says loading, but does not continue for the next section.

I'm using one page checkout
when i click inspect element and go to the network tab it is showing 1 js file which is jquery-1.10.2.min.map
The error returned is: "Uncaught TypeError: string is not a function" in a js file called prototype.js
I'm using magento 1.9

Anyone can help on this ??
My website is www.925sterlingsilver.com.au

Thnaks in advance


texts:
I was just wondering if anyone knows about negative performance impacts of multiple <move /> statements in a theme's layout XML files.
Sometimes the <move /> statement is even in the same file that the element that gets repositioned: it gets defined inside some block or container, and afterward moved somewhere else.

I often see XML files in a theme with like 20 <move /> statements per file, which results in 100+ <move /> statements per theme.

I was not able to find the place in the source code where they are handled, so I "assume" for the generation of the "whole" layout XML, that...

...it's easy when <referenceBlock /> or <referenceContainer /> is used because a lot of the structure is already present in the XML
...it's expensive when <move /> statements are used because Magento has to parse the XML tree over and over again and again

It would be nice if someone could point me where I can find this in the code, or even had some performance benchmarks or experience to share.


texts: Magento 1.9 - Not getting recenlty uploaded product import files(CSV) on AWS server with CDN

texts:
When I upload CSV files from Magento backend under System > Import/Export > Dataflow-Profiles > Upload File tabs, files are uploaded successfully but when check uploaded files under Run Profile tabs, I did not get recently uploaded files in the dropdownlist. This is working fine on my local instance but not on live server which is hosted on Amazon cloud with CDN. But after reloading page it is showing in the dropdownlist. In subsequent request sometime it is showing or sometime not. Have checked requests on browser console and find that request is going to two different IPs and hence sometime uploaded files is showing in the dropdownlist or sometime not.

Now I am looking some way to sort out this issue so that uploaded files show every time even request is going other IP.

Please help me out to fix this issue.


texts: Billling address and shipping_address populate from billing_address_id and shipping_address_id in magento 2

texts:
I need to known how Billing address and Shipping address is populate in sales_order_grid  table from sales_order table Even in the sales_order table there is billing_address_id and shipping_address_id is placed .

How billing_address and shipping_address populate in sales_order_grid from billing_address_id and shipping_address_id ?


texts: How to implement ajax based toast notification for add to cart, wishlist and compare?

texts:
Is there any way to show toaster notification using  jQuery for add to cart and wishlist and compare from product list page and detail page.

Want to show some of the below toast notification after add to cart event and wishlist and compare.
https://www.jqueryscript.net/other/jQuery-Bootstrap-Based-Toast-Notification-Plugin-toaster.html
https://colorlib.com/wp/jquery-notification-plugins/

For ajax based functionality - i'm using below free extensionn.

https://www.tigren.com/magento-2-extensions/ajax-suite-magento-2/


texts: Magento 2: Hook into price display on category page

texts:
I want to add custom notices directly behind every price on product detail and category pages. On product detail page this works fine with layout.xml:

<referenceContainer name="product.info.price">
    <block before="product.info.stock.sku" after="product.price.final" class="..." name="after_price" as="after.price" template="..."/>
</referenceContainer>

But actually that doesn't work for category pages. If I look into Magento\Catalog\Block\Product\ListProduct which is the block on the category page, there is a function called getProductPrice() which is called for price rendering. Internally it calls getPriceRender() which calls a block from layout which renders the price:

$this->getLayout()->getBlock('product.price.render.default');

So I thought I just create a catalog_category_view.xml layout file with the following content:

<referenceBlock name="product.price.render.default">
    <block class="..." before="category.product.type.details.renderers" template="..."/>
</referenceBlock>

But unfortunately this is not the solution, it doesn't work. I thought the reason is that product.price.render.default is added dynamically as it only can be found on product detail page's layout xml files and not category layout files. But I can't find where it is added. And why does my layout file not work?
I don't want to overwrite the template Magento_Catalog::product/list.phtml as different themes will overwrite my changes.


texts: review_product_list is not a valid handle in reviews page

texts:
I just figured out why the captcha is not being displayed on the review product form.

I went ahead and added this line:

Zend_Debug::dump($this->getLayout()->getUpdate()->getHandles());

To see what handles were really loading, turns out that the handle review_product_list loads after the form is submitted so you can see the INVALID CAPTCHA and the captcha box and input on the form because now that handle has been loaded.

Also, if you go ahead and update the reviews.xml file and add the following to the <review_product_list> handle the captcha is still not displayed:

<reference name="head">
  <action method="addJs"><file>mage/captcha.js</file></action>
</reference>
<reference name="product.info.additional">
  <block type="core/text_list" name="form.additional.info">
    <block type="captcha/captcha" name="captcha">
      <action method="setFormId"><formId>review_captcha</formId></action>
      <action method="setImgWidth"><width>230</width></action>
      <action method="setImgHeight"><height>50</height></action>
    </block>
  </block>
</reference>

Any ideas how to resolve this issue?

Thanks!


texts: magento2 facing error during npm install

texts: -- I got this warning during npm install in my local system


texts: Magento 2 disable merge items into the cart

texts: HI I want customer add same item into cart with separate line. I don't want them merge together and into single line. Is there anyway to do this? I saw people asking for Magento 1, is there any solution for Magento 2? Thanks


texts: Magento 2 CSS and JavaScript not loading from correct folder

texts:
I am attempting to install and run Magento 2 on WAMP on a Windows 7 machine with little success.

After jumping through the many and various hoops to get the site to load I am now faced with 404 responses and no styles or javascript loading.

Spec is as follows:

Magento-CE-2.0.0+Samples
Apache 2.4.9
PHP 5.5.12
MySQL 5.6.17

When I look at the browser console among the errors are attempts to access files that are not in the pub/static folder.  The "frontend" folder does get loaded and most of the files are present.  I have noticed however that some CSS files are not present.

On running the PHP deploy command

php bin/magento setup:static-content:deploy

that is mentioned in other posts I get the below error. I am not sure how to remedy this?

  Fatal error: Allowed memory size of 134217728 bytes exhausted (tried
  to allocate  64 bytes) in
  C:\wamp\www\magento\vendor\oyejorge\less.php\lib\Less\Visitor.php on
  line 45

Any assistance will be greatly appreciated.

UPDATE

I bumped up the PHP memory allowance and ran the PHP deploy script again.  This time it did not error and executed fully.  However, the same issue as described above is still present.  The site loads but every attempt to load any page or asset results in a 404 page not found an error with no styling applied.

Please see below the errors in Chrome Inspector.


texts:
I had a Magento2 version 2.0.5 and I upgraded it to Magento 2.1.0rc1 using composer. I ran the command for setup upgrade and db schema upgrade.

After upgrade I have faced some comparability issues with my custom extension so I downgraded it to 2.0.7 using composer. and ran below commands

composer require magento/product-community-edition 2.0.7 --no-update
composer update
rm -rf var/di var/generation
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento indexer:reindex

Now Magento is not working and its giving me error that version of my certain modules in db is different then they are in file system. Any idea what I did wrong and how to get it back ?


texts: Display fedex shipping rate in product page magento 1.9

texts:
I read the similar question but no luck.

I am working in magento 1.9. I want to display shipping rate in product view page. I have zipcode textbox in product page. After enter zipcode I want to display shipping charges in the same page.

I tried the following code. It is displaying changes but the actuall prices are different that means in checkout page the same zipcode charges are different. and by using following code the charges are different.

$shippingblock = $this->getLayout()->createBlock('checkout/cart_shipping');
        $quote = Mage::getModel('sales/quote');

        $shippingAddress = $quote->getShippingAddress();
        $shippingAddress->setCountryId('country');
        $shippingAddress->setPostcode('zipcode');
        $shippingAddress->setCollectShippingRates(true);

        $quote->addProduct($_product);
        $quote->getShippingAddress()->collectTotals();
        $quote->getShippingAddress()->setCollectShippingRates(true);
        $quote->getShippingAddress()->collectShippingRates();

        $rates = $quote->getShippingAddress()->getGroupedAllShippingRates();

        if(empty($rates)){
             echo  Mage::helper('shipping')->__('There are no rates available');
        }

        foreach ($rates as $code=>$rate) {
            $carierName = '
'
                . $shippingblock->getCarrierName($code)
                .'
';
            echo $carierName;

            foreach($rate as $r){
                $price = Mage::helper('core')->currency($r->getPrice(), true, false);
                $rates  = '
'
                    . $r->getMethodTitle()
                    . ' '
                    . $price
                    .' ';
                echo $rates;
            }

        }

Any other way to display fedex charges in product page ? I am using default fedex method.


texts: Magento2: How to rename the Details tab on the product details page, via overwriting layout file?

texts:
How can I use arguments in an xml layout file to overwrite the Details tab title on the product details page? The layout file I hope to overwrite is: vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml
The block in the file is:


texts: Magento 1.9 admin 500 Error caused by cache. Any ideas?

texts:
A client recently contacted me to say they got a 500 error when trying to access their Magento 1.9 admin.
My first idea was to refresh the cache manually. This worked.
It sounds like they might not have logged in in a while, but why should not logging in or not clearing the cache make the admin inaccessible.
The associated error message was:
PHP Fatal error: Maximum execution time of 30 seconds exceeded in /lib/Zend/Cache/Backend/File.php on line 679

Here's a link to the file producing the error: https://github.com/OpenMage/magento-mirror/blob/magento-1.9/lib/Zend/Cache/Backend/File.php
I understand that the max_execution_time has exceeded and that increasing this time might help, but I want to understand why it exceeded in the first place. It should not need 30s+ to access Magneto admin so there is obviously an issue causing the timeout.
Any ideas would be helpful.
Thanks in advance :)


texts: How to send different email for credit memo based on payment method

texts:
I am in a requirement for sending different email content while I create credit memo for a return process based on the payment method used while checkout.

For example: If a person placed order using paypal, while creating return (credit memo) in admin panel, I want to send credit memo email stating about that particular payment method (paypal here).
If a person placed order using credit card, while creating return (credit memo) in admin panel, I want to send credit memo email stating about that particular payment method (credit card here).

So, basically there will be different transactional emails needs to trigger while creating credit memo based on the payment method used to purchase.

Can anyone help me in this !


texts: Magento 2: Getting 404 Not Found with exception on products after migrating

texts:
I have recently copied my Magento 2 website onto another server, created a new database and imported a copy of the old/original database.
Everything seems to work fine, but when I click on a product it gives me 404 not found.

The exception.log shows the

  exception: Item (Magento\CatalogInventory\Model\Stock\Status) with the same ID "38" already exists.'

I have truncated url_rewrites and ran reindex but the error still occurs.

Hope someone can help me out


texts: How to programmatically get the "custom URL" from a category

texts:
I get my category by ID:
$catid = 446;
$category = Mage::getModel('catalog/category')->load($catid);

And I need to get the "custom URL"

Is there a function for it?


texts: I found out that there is an admin config that lets you show a promotional message for affirm monthly payment in the cart page summary. However, I would like to change its verbiage and it seems that the default verbiage is being pulled from a third-party script 'https://cdn1-sandbox.affirm.com/js/v2/affirm.js'. Does anyone of you know how to changes the verbiage?


texts: A single report containing credit card types and transactions

texts:
Not a Magento expert here, but gotta figure this out.

My team wants to be able to see a report in Magento that puts the credit card type next to each transaction all in one sheet.

we can click in to each order, but as we increase in number of transactions, this will be too time consuming.  Can someone help us figure out if this is at all possible?

Thank you in advance!


texts:
I am a beginner in Magento. This may be a simple question.

I have a header menu 'shop'. This link should redirect to a page that shows all parent categories. How can I do this? any help is really appreciated.

This is how the 'shop' page should looks like (Parent categories only).

Thank you.


texts: Magento 2 Different Final Price Templates for Category and Product Page

texts:
I have modified the final_price.phtml to customize the final price on the product page. It is working fine.
But I am getting the same customization on Category page which I do not want. Please let me know how can I use different final price templates for Product and Category pages.


texts:
I'm new working with Magento, and I was wondering if there's any way I can create a CMS page that uses PHP code. I mean,the page I need to create is something like an About Us, with a short description and a pretty simple contact form. Now, I tried to create it in the CMS section but it only allows me to use HTML code.

Am I doing it the wrong way? What would be the right way? Create a Module? A Block with the Form?

Any suggestions are truly appreciated.

Thanks.


texts: magento2 drop down custom options price want to change

texts:
In magento 2 there are two price types fixed and percentage that's fine.

Now I have a simple product with drop down custom options and i have created a new custom price type like (SQM) in the backend.

Please find the below scree shots.

I would like to show my custom option prices in the respected drop down options based on the price type(sqm),

As well once i select the option the respected price want to add to product price accordingly.

could you please suggest me or help me how i can achieve this?

Note: Sqm=x+y+z;


texts:
How do I write update schema in Magento 2 for the following:

$installer->run(
   "UPDATE {$this->getTable('catalog_eav_attribute')} SET `is_visible` = 0
   WHERE `attribute_id` IN(SELECT `attribute_id`
   FROM {$this->getTable('eav_attribute')}
        WHERE `attribute_code` LIKE 'my_name_%');"
);

Basically, I am trying to set "is_visible" to 0 in catalog_eav_attribute table, if attribute_code is like my_name_% in eav_attribute table.


texts: Magento doesn't use _beforeLoad events in collection function getAllIds

texts:
I have an question about Magento that I don't know if is a bug or not.

Category Collection:

I used an Observer to filter only the customer categories (business rule)

My_Module/config.xml

<frontend>
        <events>
            <catalog_category_collection_load_before>
                <observers>
                    <my_module>
                        <type>model</type>
                        <class>my_module/catalog_observer</class>
                        <method>removeUnavailableCategories</method>
                    </my_module>
                </observers>
            </catalog_category_collection_load_before>
        </events>
</frontend>

My_Module/Model/Catalog/Observer.php

<?php
class My_Module_Model_Catalog_Observer
{
    function removeUnavailableCategories($observer)
    {
        $collection = $observer->getCategoryCollection();

        $allowedCategories = array();

         foreach (Mage::helper('my_module/customer')->getAllowedCategories() as $category)
         {
             $allowedCategories[]['like'] = $category->getPath();
             $allowedCategories[]['like'] = $category->getPath() . '/%';
         }

        if (count($allowedCategories) > 0)
        {
            $collection->addFieldToFilter('path', $allowedCategories);
        }
        else
        {
            /**
             * Clear collection
             */
            $collection->getSelect()->reset(Zend_Db_Select::WHERE);
            $collection->getSelect()->where('e.entity_id < 0');
        }
    }
}

As you can see, I put a filter to show only the categories allowed for the customer.

But, when I use the function "getAllIds" in the category collection, this observer is not called:

Mage::getModel('catalog/category')->getCollection()->getAllIds();

I do it like this:

Mage::getModel('catalog/category')->getCollection()->load()->getAllIds();

And it worked.

But I don't like this. Since the function "getAllIds" makes the search again:

Mage_Eav_Model_Entity_Collection_Abstract

protected function _getAllIdsSelect($limit = null, $offset = null)
{
    $idsSelect = clone $this->getSelect();
    $idsSelect->reset(Zend_Db_Select::ORDER);
    $idsSelect->reset(Zend_Db_Select::LIMIT_COUNT);
    $idsSelect->reset(Zend_Db_Select::LIMIT_OFFSET);
    $idsSelect->reset(Zend_Db_Select::COLUMNS);
    $idsSelect->columns('e.' . $this->getEntity()->getIdFieldName());
    $idsSelect->limit($limit, $offset);

    return $idsSelect;
}

public function getAllIds($limit = null, $offset = null)
{
    return $this->getConnection()->fetchCol($this->_getAllIdsSelect($limit, $offset), $this->_bindParams);
}

My question is:

Is it correct use to call the function _beforeLoad before search for the IDs?

Like this:

public function getAllIds($limit = null, $offset = null)
{
    $this->_beforeLoad();
    return $this->getConnection()->fetchCol($this->_getAllIdsSelect($limit, $offset), $this->_bindParams);
}

OR

protected function _getAllIdsSelect($limit = null, $offset = null)
{
    $this->_beforeLoad();

    $idsSelect = clone $this->getSelect();
    $idsSelect->reset(Zend_Db_Select::ORDER);
    $idsSelect->reset(Zend_Db_Select::LIMIT_COUNT);
    $idsSelect->reset(Zend_Db_Select::LIMIT_OFFSET);
    $idsSelect->reset(Zend_Db_Select::COLUMNS);
    $idsSelect->columns('e.' . $this->getEntity()->getIdFieldName());
    $idsSelect->limit($limit, $offset);

    return $idsSelect;
}

Or is there something that I don't know?


texts: Call extension's phtml file in CMS page editor

texts:
I am using extension for Daily deals. It's displaying active deals in the sidebar.

But i have to display this in the Home page so i am adding following code in the editor of Home page.

{{block class="dailydeal/sidebar_activedeal" template="mw_dailydeal/sidebar/activedeal.phtml"}}

but nothing is displaying on the front side.

When i am using another test file it's displaying output.

{{block class="core/template" template=mw_dailydeal/sidebar/test.phtml"}}

in layout file it's as following:

<reference name="left">
        <block type="dailydeal/sidebar_todaydeal" name="todaydeal_left" before="-">
            <action method="setTemplate">
                <template helper="dailydeal/sidebar/displayTodaydealLeft"/>
            </action>
        </block>
        <block type="dailydeal/sidebar_activedeal" name="activedeal_left" after="todaydeal_left">
            <action method="setTemplate">
                <template helper="dailydeal/sidebar/displayActivedealLeft"/>
            </action>
        </block>
        <block type="dailydeal/sidebar_calendar" name="calendar_left" after="activedeal_left">
            <action method="setTemplate">
                <template helper="dailydeal/sidebar/displayCalendarLeft"/>
            </action>
        </block>
</reference>

In block file as following :

class MW_Dailydeal_Block_Sidebar_Activedeal extends Mage_Core_Block_Template{
}

Please help me to solve this.


texts: Magento 2 - Auth.net Sandbox not working

texts:
Using Magento 2.2.4 - I have the Auth.net Direct Post payment method enabled, the Magento Auth.net patch applied, and with the configuration:

Gateway URL:

https://test.authorize.net/gateway/transact.dll

Transaction Details Url:

https://apitest.authorize.net/xml/v1/request.api

I'm seeing the transactions in the Auth.net sandbox payment.log:

(TESTMODE) This transaction has been approved

but an error is being thrown on the Magento side:

Please enter a transaction ID to authorize this payment

I've tried with Test Mode both enabled and disabled. How can I get this working properly?


texts:
Just go to

  database -> sales_invoice -> indexes

just remove one rule

SALES_INVOICE_INCREMENT_ID_STORE_ID

0 down vote  SOLVED Invoice Unique Constraint Violation Magento 2.2.5 when i am generating a invoice facing this error


texts: Add multiple products to cart using product ids

texts:
I am trying to add multiple products to my cart. I have product ids in the form of $productIds = implode(',', array_column($points, 'productId')); which gives me numeric product ids like this : 5330,3770,4259,5107,6537. I want to put all this products to cart on button click.

I have been trying this from so long with 0 luck.I tried accepted solution of this question: Add to cart via Javascript in CE 2.1

Any help ? I am on magento 2


texts: Magento 2: How to do telephone number masking?

texts:
I want to set telephone masking(US Country telephone number format) in my customer registration form how can i do that?
In US telephone number format is (999) 999-9999 now i want to in my customer registration form when i click on telephone number field then above phone number format maskin should open.


texts:
I am trying to edit the product view on mobile version. What i would like is to not show the default description but my custom description which, in reality, is a shortened version of the actual product description. I'm not very sure what I need to look for as there is no clear "mobile" identification anywhere...

Any help will be appreciated...

m.


texts:
I want to show list of the guest user in my custom module.  Which is the best way to get the list of the guest order.

How can i get list of the guest orders?

 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
 $lastyear = date('Y-m-d', strtotime("-1 year"));

  $order = $objectManager->create('Magento\Sales\Model\Order')->getCollection()->addAttributeToFilter('customer_id', $customer_id)->addAttributeToFilter('state', 'complete')->addAttributeToFilter('created_at', ['gteq'  => $lastyear]);

To get the guest orders i am getting collection of all the orders and checking  customer email address. If user with that email address doesn't exist then consider it as guest order.

Is this correct flow?  Is there any other flow to check guest orders?

Any help would be appreciated.


texts: How to backup old magento onto new Magento on a different subdomain

texts:
I'm trying to design a new theme on my Magento so I created a test.***.com.au sub-domain to try it out on.
I want the old data/pics onto the new one to see how it all looks, but after trying to perform a backup in the Backend of my original install. It says "loading" and loops for what feels like eternity (I left it for 4 hours, still looping). Is there a way I can backup through cpanel or FTP? Or maybe a script I'm unaware of?

Thanks,
Stephen


texts: get final price of configurable super product with catalog rules applied

texts:
I'll try to explain it in details as it's quite tricky.

Let's say I have configurable product X with price 10, and color variations red and green with fixed price +5 and -5.
So the final price for the red X would be 15 and for the green X would be 5 while for other X colors would be 10.

Now we also apply a catalog rule on the configurable X, for example let's say -3.

So now the final prices would be:
red X: 12
green X: 2
other X colors: 7

I can get the final price of the Configurable(7) by using

Mage::getResourceModel('catalogrule/rule')->getRulePrice

but how can I get the final prices for the other attribute options as well?
Should I recalculate looping through the attributes and their pricing_value and applying them to the discounted price of the base product or is there any easier way?

moreover:
if catalog rule has disabled discount to sub-products then above logic works. Get the base price with the catalog rules applied and apply super attributes prices on top.
but if discount to sub-products is enabled, then how can I get the "pricing_value" of an attribute with catalog rules applied?


texts:
We recently upgraded from 1.10 to 1.13 and are having some problems with our home page.  All other cms pages are functioning properly, but the home page is consistently returning a cms 404.  It doesn't matter which cms page we choose to be the home page, it always returns 404.

The store view is properly set, the homepage 'url' is set to cms, and i can't find any entries in core_url_rewrite with an empty request_path field.

Everything worked fine in our dev environment.

As a stop gap fix until we find a real solution, we have magento's 404 page set to load the cms page that is supposed to be used in the actual home page.  Users don't notice a difference, but the home page of our site is still technically throwing a 404.

Any thoughts on what is going on here?

EDIT

The culprit was a product with an empty url key. Up until now, there were some cases in our product upload workflow where a product would get added to magento from our erp before it has a name. The url key is generated based on the product name, so these products have no url key. In 1.10 this apparently wasn't a problem. 1.13 however, treats that as though we entered the document root as the url key. Since Product url redirects supersede cms redirects, magento was trying to point to this product. It was returning 404 because the product was marked as 'not visible individually'.


texts: Magento2 - Reposition billing address form to customer-email region

texts:
I'm trying to reposition the billing-address-form below the authentication form. But I can't figure it out.

Preferred result:

What I have done so far

I have found this question, and made a module for it.

<vendor>/<module>/Block/Checkout/LayoutProcessor.php

namespace <vendor>\<module>\Checkout\Block\Checkout; //<-- I think the first Checkout needs to be removed.

use Magento\Checkout\Block\Checkout\LayoutProcessor as LayoutProcessor;

class LayoutProcessorPlugin
{
    public function afterProcess(LayoutProcessor $layoutProcessor, callable $proceed): float
    {
        $jsLayout = $proceed();

        // get billing address form at billing step
        $billingAddressForm = $jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children']['payment']['children']['afterMethods']['children']['billing-address-form'];

        // move address form to shipping step
        $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']['billing-address-form'] = $billingAddressForm;

        // remove form from billing step
        unset($jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children']['payment']['children']['afterMethods']['children']['billing-address-form']);

        return $jsLayout;
    }
}

<vendor>/<module>/etc/frontend/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\Block\Checkout\LayoutProcessor" type="<vendor>\<module>\Block\Checkout\LayoutProcessor" />
</config>

But after the compilation I get the following error on the checkout page:

  Cannot declare class <vendor>\<module>\Block\Checkout\LayoutProcessorPlugin, because the name is already in use in /app/code/<vendor>/<module>/Block/Checkout/LayoutProcessor.php on line 6


texts:
Hi I am trying to create attributes. I need to create an attribute which accepts any value between 1 to 9999. The code is as follows,

 $installer->addAttribute('catalog_product', 'number_of_codes', array(
'type'              => 'text',
'backend'           => '',
'frontend'          => '',
'label'             => 'Number of Codes to Generate',
'input'             => 'select',
'class'             => '',
'source'            => 'catalog/product_attribute_source_layout',
'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'visible'           => false,
'required'          => false,
'user_defined'      => true,
'default'           => '1',
'searchable'        => false,
'filterable'        => false,
'comparable'        => false,
'visible_on_front'  => false,
'unique'            => false,
'group'             => 'Code_Generation'
));


texts: Sorting Product Collection by MulitSelect Attribute

texts:
My client wants me to sort a category of products where the products with a particular mutli-select attribute lumen_style_icons option NEW selected will show first.

I am assuming there is no way to push these products to the front of a collection, If you know of a way to do that, that would be great.

I am trying to just create two collections, one that contains only the products with the NEW selected, and the other collection with all the products in the category.

I am having a problem getting "finset" to work

Here is my code:

$_productCollection=$this->getLoadedProductCollection();
$newProductCollection = Mage::getModel('catalog/category')->load(Mage::registry('current_category')->getId())
    ->getProductCollection()
    ->addAttributeToFilter('lumen_style_icons', array('finset' => 'NEW'));

I am getting a count of 0 for $newProductCollection

-Thanks


texts: Magento 2 : Are php code sniffers the right tool for extension development?

texts:
I am creating a custom extension for Magento 2 and looking for the tool that can help me in the code standards. I come to know about PHP code sniffers from google.

Is the PHP code sniffer is right tool for Magento coding standard? or We have some other tools?


texts: Select product image using SQL in Magento 2

texts: In Magento 2, how can I get the product image using only MySQL queries? For example, /c/t/ct0126black.jpg. All of my products are configurable products so they have different images for different colours.


texts: How to add Price Slider Filter in Layered Navigation on category Page. Magento 2

texts:
I want to add a Slider filter (Scroller) on the SideBar currently My SideBar is

but I want my Sidebar like

is there is any core functionality to change the price to this slider if Yes please let me know if No then let me know that how can I change this to Slider. Thanks


texts:
I've set no on system configuration-> customer login configuration. But nothing's happen, it still direct to my account dashboard.

How to redirect to previous page after login?


texts:
I've received the following request from some of the admin users:

When viewing the products list (The Manage Products screen), they want products to open in a new tab when clicking on them to edit.

I'm not sure if it's as simple as setting target="_blank" somewhere or if it's more complex, I honestly am not sure where to start.

Can someone please help me or at least point me in the right direction, please?


texts: Magento + gclid + redirect is not working

texts:
I've just been on the phone with Adwords and they've told me my gclid url query string is not working properly.

So I did some digging and found this stackexchange question / answer that really looks like it should solve my problems:

https://stackoverflow.com/questions/26629722/magento-category-redirect-cuts-off-the-querystring-of-an-url

The thing is, the answer says to put the following code in Request.php

    $queryString = $this->_getQueryString();
    if ($queryString) {
        $targetUrl .= '?'.$queryString;
    }

When I look in Request.php - that code is already there (magento 1.9.0.1) - but when I make a request on a URL with a query string to a page that is redirected by magento (such as one of my top menu pages), no query string is appended to the redirected to url.

Can someone please help me or point me in the right direction?


texts: I've lost my category links in the header

texts:
I have spent the last three days trying to figure this out! Any help would be much appreciated.

I'm using 1.7, and I was playing around in the header.phtml file, now my category links are gone.

Can I just run a PHP/HTML snippet in my header.phtml to get them back?


texts: Adding product short-description on product review page

texts:
I have used

$_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description');

in catalog/product/view.phtml to show the product short description.

Its showing in single product page but not in product review page though enabling Template Path Hints shows they both come from view.phtml

Any suggestions?


texts: Custom option file path "[fullpath] => /var/www" in magento 1.8 not able to open it on download

texts:
I have Magento 1.8 setup, if I try to print info array in this file

app/code/core/Mage/Sales/controllers/DownloadContorlleres.php

it is printing the full path as below

  /var/www/html/media/custom_options/quot/w/i/f8e5fcf046a0b213588f15b3d63312d3.jpg

I am not able to download or open the same path.
On accessing it with the base url /media/custom_options/quote/w/i/f8e5fcf046a0b213588f15b3d63312d3.jpg it throws the error ->
You don't have permission to access /media/custom_options/quote/w/i/f8e5fcf046a0b213588f15b3d63312d3.jpg on this server.


texts: Escaping special characters entered by customers

texts:
Rarely, a customer copies and pastes names, addresses, etc., and in those copy & paste they are bringing over right quotes instead of single quotes.  Generally not a big deal, magento handles them okay, BUT it breaks the hash between Magento and Authorize.net.
How would I go about sanitizing all customer completed fields to replace right quote with single quote?


texts: I'm getting a Error on creating orders inside the Admin panel Magento 2

texts:
I'm getting a error on creating the order inside the Admin panel like below

  Order saving error: Your API key is not valid.

I don't known why it is happening.??

Please anyone help me. Thanks in Advance


texts:
I want to create a package of products i.e. a package can have products A,B,C.

Now, I've gone through the steps of creating grouped products but I want to allow customer to choose color & size as well.

I did some google but not getting anywhere. So, if someone have some link or tutorial, please help me.

Thanks in advance


texts: Invalid credentials for repo.magento.com

texts:
I'm trying to install Magento 2.3 on a local Laragon install, but the composer install is failing because of this error:

  [Composer\Downloader\TransportException]
  Invalid credentials for 'https://repo.magento.com/archives/magento/module-invitation/magento-module-invitation-100.3.4.0.zip', aborting.

I've tried re-generating my marketplace access keys and tried using another account. Adobe is saying their servers are working fine from what I can tell. I've ensured that I'm putting the public key in the "username" prompt and the private key in the "password" prompt. I'm not saving my keys anywhere and am putting them in every time it asks.

~ Matt


texts: I need to create a Bundle product and I need to be able to add a text field where my clients can add a personalized text that will be included in the selected product, but Magento will not let me add it, how can I do it?


texts:
after basic installation of magento 2.4.0 I got several problems with the initial run of admin backend.
This was partly solved by disabling 2 modules:

Magento_TwoFactorAuth
Magento_Csp

However still on the login screen to admin (and on the dashboard even more extensively) I'm getting issues with javascript (I'm using developer more, so issue should not be in static files):
require.js:1:5 Uncaught SyntaxError: invalid regular expression flag d
requirejs-config.js:18:9 Uncaught TypeError: require.config is not a function
As well issues with downloadable fonts:
downloadable font: rejected by sanitizer (font-family: "Open Sans" style:normal weight:400 stretch:100 src index:0) source: https://kamco.kunert.dev.salesxp.com/pub/static/version1598607466/adminhtml/Magento/backend/en_US/fonts/opensans/regular/opensans-400.woff2
When I open link to the font, font is downloaded (you cannot replicate it as server is on my local network).
Could you please give me a hint how to fix those?
Thanks.
BR,
Kamil


texts: Magento 2.3.1 Cloud EE configure multiple websites on one installation

texts:
I'm following the official Magento wiki regarding the configuration of multiple websites in Magento 2.3.1 EE cloud but I really cannot understand what I'm doing wrong in my local configuration.

What I want to achieve is something like:

domain1/it
domain1/de

domain2/it
domain2/de

So multiple websites with one store each and each store have two store views.
As you can see I need the same store code for both the websites but creating both from the admin gives an error because the variable is unique.

So I created the store views with codes like domain1_it, domain2_it.
I then specified on the admin panel both the URLs I specified above for the store views. I even un-set the Auto-redirect to Base URL value because it kept redirecting me while I browsed my second domain.

my host's file is the following right now: 127.0.0.1 domain1 domain2

I can access the domain2 right now but when I switch to my store domain2/it I get an error 404. Do I need even more configuration?

For now, I am pretty unsure about this configuration and I'm worried about what I'll have to do for my integration deployment too.

Thanks in advance!


texts: After Upgrade from 1.4 to 1.9.1 getting undefined method Mage_Catalog_Helper_Product_Compare::setCustomerId

texts:
I am Getting the error
Call to undefined method Mage_Catalog_Helper_Product_Compare::setCustomerId()
After Upgrading From Magento 1.4 to 1.9.1

Any help will be appreciated.


texts: Configurable product select from attribute


texts: How can I redirect Document root to Magento root?

texts:
Ducument root is /var/www/html

Magento root is /var/www/html/magento

I tried the virtual directory like

VirtualHost *:80>
    DocumentRoot /var/www/html/magento
    <Directory /var/www/html/magento>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
    </Directory>
</VirtualHost>

But this broke my frontend page and admin page.


texts:
I want to run a cron once a day at midnight so have added this command to crontab -e.
00 00 * * * /usr/local/bin/php /home/../public_html/bin/magento cron:run --group="crongroup"

but not sure what values should use for these fields
<group id="crongroup">

<schedule_generate_every>5</schedule_generate_every>

<schedule_ahead_for>10</schedule_ahead_for>

<schedule_lifetime>5</schedule_lifetime>

<history_cleanup_every>10</history_cleanup_every>

<history_success_lifetime>60</history_success_lifetime>

<history_failure_lifetime>600</history_failure_lifetime>

Please let me know which values need to be change in the above code so that cron can run every night without being missed.


texts: Nginx Setup for Multistore on the same url

texts:
I wish to setup multistores on our nginx environment but using the admin 'Add Store Code to Urls' isn't an option as we have several other sites that run off different urls and having store codes appended to them isn't necessary and looks awful.

so we have our base url:

www.domain.com
www.domain.com/store2/
www.domain.com/store3/
www.domain.com/store4/

I get the impression I need to use 'map' in the domain.conf file. Has anyone got a code example to help me?

thanks.

EDIT

ok i've discovered that
www.domain.com/store2/ (the home page works its when you go to)
www.domain.com/store2/category/ (it 404's)

however if you go to

www.domain.com/store2/index.php/category this goes through successfully so in fact what i'm needing to work out is why the index.php redirect that works on www.domain.com aren't applying the sub folder stores.

any ideas?


texts: Magento 2 : Is there any way to showing billing and shipping address in formatted view?

texts:
i just need to show billing and shipping address in formatted view ?
Any idea please share


texts: Magento 2.4 add to cart functionally not working

texts:
I have installed one module after add to cart functionally has been not working. If i try to add to cart Showing this error The stock item for Product in option is not valid.
So Please help me.
THANKS.


texts: Magento 2.3.4 - Checkout page showing empty

texts:
We have a magento 2.3.4 running, when you add products to your cart and open the checkout page the page is just blank.

The following error appears within the developer console.

A cookie associated with a cross-site resource at http://paypal.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.

What exactly can i do to fix this error?
Here is a link to a screenshot of my "Web" Config settings:

config settings

I really would appreciate any help, since i tried everything, i found on google, but there is no specific instructions i can find to get rid of that.
I also upgraded to the latest version (2.3.4), but it did not fix anything.

Thank you very much


texts: Redirect category from one store view to another

texts:
I have a trouble with my subdomain and have therefore deactivated a store view.
Is it possible to redirect the categories from that store view to the main store view?
The direct of a category is already used to create the semantic URL.
The URL i want to redirect is da.domain.com/tuborg/tuborg-bar-items.html
It should be redirected to domain.com/tuborg/tuborg-bar-items.html
The category ID is 25

How can i do it?


texts:
in my case i use translation in magento 2 , all the string text to be translated works fine, but when i want to translate a variable i can't get the translation , can anyone tell me why ?

<?= $block->escapeHtml(__($var->getData()['colomn'])) ?>

output

"text"

translat file

"text","text translate"

  why i can't get "text translate" instead of "processing" ?


texts:
When i tried to click on some subcategory links on the navigation bar it gives the error

Recoverable Error: Object of class Magento\Framework\DataObject could not be converted to string in /home/ampscooters/public_html/vendor/magento/framework/Escaper.php on line 247

I have upgraded to magento 2.3.3 from magento 2.2.4 and this issue is raised,

I have also checked the file Escaper.php on line 247.

Although this issue is with some sub-categories and others are opening fine.


texts:
Magento 2.3.3
When registering a new user, a message is sent to the mail. If the user creates an order or tries to send from the admin, there is no message.
I tried to install Mageplaza SMTP, test emails come, but no ordering emails.
How to identify the error?
I try disable all third-part modules, try DB with fresh install, same error.


texts: Multi select attribute not indexing CE 2.6.1

texts:
I migrated my site from 1.9x to 2.6.1.  I have at least 2 multi select attributes that are not being indexed to catalog_product_index_eav.  In researching this issue, I found that if the eav_attribute.backend_type is set to varchar, I should see it in catalog_product_entity_varchar.  Its not there, but I have found it in catalog_product_entity_text.

I found this issue by doing an advanced search and realizing that when I selected one of the multi select attributes to search on, no results were found.  They do work on my 1.9x site.  I have verified all the attribute settings.  I've even created a new multiselect attribute as a test and that works fine.  I even manually added the non working attribute to the catalog_product_index_eav table and then the search could find it.

So, I'm looking for more ways to debug or other things to check to figure out why its not indexing to catalog_product_index_eav.

Thank you


texts: How to fix the isue "same ID "923" already exists." when update version 2.1.7 to 2.2.2?

texts:
Today I updated magento 2 from 2.1.7 to 2.2.2. when done I tried edit product but get issue.

  Item (Magento\Catalog\Model\Product\Interceptor) with the same ID
  "923" already exists.

I looking in database but not result see is the item duplicated.
this is code be use:

SELECT * FROM cataloginventory_stock_item where product_id in (SELECT product_id FROM cataloginventory_stock_item GROUP BY product_id HAVING ( COUNT(product_id) > 1 ))


texts: Magento page.xml main content block have no template file

texts:
My page.xml file is located at "/app/design/frontend/default/templatefolder/layout/page.xml" and I am able to see all the blocks pointing to particular template(".phtml"). There is a block showing a label as "Main Content Area" and having no template attribute defined in the block element. How can I get to know which phtml file is used for this particular block.

<block type="core/text_list" name="content" as="content" translate="label">
            <label>Main Content Area</label>
        </block>

Can anybody please help on how to find the template file containing the code for main content area ?


texts:
I am displaying all of the attributes right next to the product as shown below

I am doing it by adding

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

to my theme

  \app\design\frontend\ultimo\default\template\catalog\product\view.phtml

as explained here

But this display all of the attributes. How can I display only specific ones on the top part?


texts: Magento-2 How to exclude category products from catalog search results

texts:
I need to change catalog search product results collection, exclude some categories from catalog search results.

Anyone know how to apply category filters in search results.

Thanks


texts: integrate net banking and debit card payment gateway to indian shopping site

texts:
We are devoloping shopping site for indian customers.

So we have to integrate "online banking payment gateway" & "debit card" that should include all the banks

in india. please guide me to do this.


texts: Set custom product price attribute as default product price

texts:
I have made one product attribute myprice. and showing as input field in admin.

I want to use that myprice attribute as product's price instead of default price, thus products price on frontend would be that of myprice attribute value instead of default price.

How can I achieve this ?

Thanks.


texts: Magento Dev site urls redirecting to live site

texts:
My Magento dev site has been set up and the homepage is working for it, however all the urls around the site including the backend admin are redirecting the the live site.

I have created a new database for the dev site
I have changed the relevate base URLS in the core_config_data to match the dev site.
I have changed the local.xml to reference the dev database
I have eptied the var/cache, var/sessions and var/tmp
I have commented out/deleted the re-directs in the .htaccess files

Have I missed anything because I can not find a way to get this problem solved. Any help would be amazing. Thank you in advance.


texts: Is it bad to use ObjectManager in list.phtml like in Code Below? What's the best Practice?

texts:
Is it bad practice to use ObjectManager in file app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product/list.phtml
like this below.
        <?php
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $category = $objectManager->get('Magento\Framework\Registry')->registry('current_category');
        if($category->getDescription())
        {
            echo '
'.$category->getDescription().'
';
        }

Would there be a better way to write this???
Any help would be greatly appreciated. Thank you!


texts: Multi Select Category Attribute not saving

texts:
I'm using Magento Community 1.9.0.0.

I have programmatically created a custom category attribute which is a multi select. The attribute can be seen in my admin category section. When i select any values - whether it's one or more and press save i get a successful saved message but the values never save.

I then also tried an extension which creates category attributes. This had the same issue. When i contacted support they said

Category entity does not support multi selection so this type of attribute will not work with category.

Is this true? Can multi select not work on category attributes on CE-1.9?

Here is the code i was using to create it programmatically:

require_once('app/Mage.php');
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
$installer = new Mage_Sales_Model_Mysql4_Setup;
$attribute  = array(
    'type' => 'text',
    'label'=> 'Room Type',
    'input' => 'multiselect',
    'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'visible' => true,
    'required' => false,
    'user_defined' => true,
    'default' => "",
    'group' => "General Information",
    'option' => array (
        'value' => array(
            'kitchen' => array('Kitchen'),
            'bedroom' => array('Bedroom'),
            'bathroom' => array('Bathroom'),
            'loft' => array('Loft'),
            'basement' => array('Basement'),
            'lounge' => array('Lounge')
        )
    )

);
$installer->addAttribute('catalog_category', 'room_type', $attribute);
$installer->endSetup();


texts: Set date value to an attribute in a custom model

texts:
So I have my EAV called mymodel and one of it's fields/attributes is called "enddate" of date type. Now, when I create a new object, and I want to set the value of this "enddate"... I just can't. The saving works fine, but the value saved into the database is bogus, so not the value I want to set. So this here does not work

$mynewitem = Mage::getModel('mypath/mymodel');
$mynewitem->setEndDate('2011-03-05');//(I also tried with time attached hh:mm:ss)
$mynewitem->save();

How do I save this date inside my model from Magento?
I actually have a form (frontend) where I enter the date and Post it, so it's going to be text.

I also tried

$mynewitem = Mage::getModel('mypath/mymodel');
$dtx1 = Mage::getSingleton('core/date')->gmtDate('Y-m-d H:i:s','now');
$mynewitem->setEndDate($dtx1);
$mynewitem->save();

But what format should I use? How to set it?


texts: Magento 2.3.x installed in windows 10 using XAMPP backend and frontend not load properly

texts:
I am installed Magento 2.3.x in windows 10 using XAMPP backend and frontend not load properly.

I was installed much time and also I have run all Magento command but did not get any success.

Please help me.


texts: Detect and convert Simple Products to Bundle if equivalent (CE 1.7.0.2)

texts:
Does anyone know if it's possible to have Magento detect if the simple items in a cart are equivalent to a bundle, and if so convert it to the bundle product in the cart.

i.e. Product A is £100. Product B is £200. Both are available individually. Bundle X consists of product A and product B for a fixed price of £250. If someone adds Product A, then later Product B, I want Magento to detect that this is equivalent to Bundle X and so show Bundle X in the cart instead.

Thanks

Neil


texts: One-Time Customer Discount per Customer Group

texts:
Hi I wanted to see if I can do some sort of promotional thing on a customer account.

Say customer A is assigned the customer group industry. I want to assign customer A a discount of 20% per item, but it only can be "used" one time. So after the customer purchases that item it returns to normal price. Any idea on how I could do that? I tried looking at plugins but I can't seem to find "that logic"

Thanks


texts: magento 2: trigger js form validation without submit

texts:
On a custom frontend page I have a form in which I use magento's js validation to validate inputs: name, email description, etc.  When the form is submitted the validation is triggered and works properly.  I am wondering if there is a way to manually invoke magento's js validation without requiring a "submit" action.

Here is what I use to apply the validation

var dataForm = $('#form-validate');
var ignore = null;
dataForm.mage('validation', {
    ignore: ignore ? ':hidden:not(' + ignore + ')' : ':hidden'
}).find('input:text').attr('autocomplete', 'off');

and I am looking for

$("#form-validate").mageValidate();  // validate form fields

Let me know if you need more detail.


texts:
The pagination is missing on my toolbar on category pages, it works for the search results. I debugged the code and figured what the problem is.

In the Toolbar block there is a function getPagerHtml. It contains this code:

$pagerBlock = $this->getChild('product_list_toolbar_pager');

if ($pagerBlock instanceof Varien_Object) {
    ...
}

The problem in my case is, $pagerBlock is false on category pages in my case, so the pagination is never rendered and shown.

What could be the problem for that? I checked the catalog.xml and the product_list_toolbar_pager block is there.

Thanks!


texts: Magento 2: Are Flat Tables Still a Thing?

texts:
Are flat tables still a thing we need to worry about in Magento 2?  I know there's UI where we can turn the flat tables on, but I'm unsure how well they've been tested, and if they're even needed anymore.

If flat tables are still a thing -- where/when do the attributes for flat tables get generated and/or regenerated.  Does this only happen at reindexing?  Or can other UI actions trigger a flat table generation?  Does it happen at php bin/magento setup:di:compile?  Other places?

Also -- how does Magento decide if it needs to make an attribute a flat attribute?  Are all EAV attributes flattened?  Or are there others which might not be?


texts:
favorite
This question already has an answer here:
Duplicate title tags in Google Webmaster Tools 1 answer
I have set up my robot.txt file so that google doesn't crawl limit pages (how many products show on a page) so it doesnt class all these pages as duplicate content.

However when i go onto html improvement on webmaster i can see under duplicate title tags it has still referenced some of my limit pages, not all of them only some.

So it is telling me i have duplicate title tags on these pages when Google shouldn't even be able to see them, how can i fix this problem.

Thanks


texts: How to prevent customer/section/load ajax call when ever i'm making my custom ajax call in M2?

texts:
For my custom module i'm making a ajax call. during this ajax call a additional call ../customer/section/load/?sections=messages&update_section_id=true&_=1485355389960 getting triggered.
Not sure this is called every time.

Anybody having idea over here?


texts: how to get particular products from collection in magento

texts:
for example my store has 20 products. I load all products using following code

$collection = Mage::getSingleton('catalog/product')->getCollection()->addAttributeToSelect('*')->addAttributeToSort('name','ASC');

In ascending order they list a product from number 1,2,3,...20.

how i get products which are numbered 8,9,10..15.


texts:
I am using Magento 1.7.2 and the desktop site is fine. How on the mobile its taking to long to load because I have images on the home page of the site. I have the desktop site themed (mytheme) and I also see the iphone theme for mobile. Is there a way to tell the mobile phone not to load images from the home page?

You can see the desktop site here: http://www.webstertoolbox.com


texts: Types cannot be provided in put mapping requests : Magento2.3

texts:
I am facing issue when enabling elastic search in magento 2.3 with latest elastic version 7.3.1. All products are hidden in frontend and search not working and when trying to do manual indexing getting this error.

  {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Types
  cannot be provided in put mapping requests, unless the
  include_type_name parameter is set to
  true."}],"type":"illegal_argument_exception","reason":"Types cannot be
  provided in put mapping requests, unless the include_type_name
  parameter is set to true."},"status":400}


texts: Magento 2: When registration.php is called?

texts:
When we built/install new module it should have registration.php as per Magento Standard.

When we run php bin/magento setup:upgrade. Module will be installed.

How actually this command check for my custom module's registration.php & install it?


texts: Override the newsletter subscription success email template in Magento2

texts:
How can I override the core email template of newsletter subscription success email template in Magento2?

Thanks for the help


texts:
I have a problem on my site which is after the customer adds all product he wants to the cart, and then when he clicks to the cart it shows him an empty cart.
this is not always happening but sometimes

I searched for it but I didn't find any like my issue.
also, I put the Session Lifetime to 86400 but didn't help

may Magento is 1.9

I hope I can find a solution for it.

thank you.


texts: get Drop down option on product view page from a multipal select custom attribute

texts:
I am working on magento 1.9, I have created a multiple selection attribute from back-end and deploy it on attribute sets, I want users to choose a time slots between 4 or 5 slots, like, there will be options 08:00 Am, 10:00 AM, 12:00PM, And so on, and user will choose appropriate time slot from all these.

The problem is i am working with virtual products as like services. so i don't want to go to the configurable or bundle way, i want a drop-down with these slots on my product page. i tried getting attribute value on select option but every time i do so i get only a drop-down not options and nor values

Any Suggestions will be appreciated

Lalit


texts: Best way to upgrade Magento from 1.4.2 to 1.9

texts:
Ok, I've got a site running on Magento 1.4.2 and need to upgrade it to 1.9.

For what I've read online an upgrade doesn't seen a good option, so I'm trying ways to migrate the data. I've tried export customers, products, stock and weight into a new Magento instal (1.9) but that doesn't seem to work.

Can anyone suggest the best approach to migrate the data (orders, customers, etc)?

I'd rather not import the database as someone pointed out on another question that would be best get the whole new site on a new db engine rather than mess around with an old one.


texts: magento2 unable to override custom search engine- getting blank page

texts:
here is my full 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\Catalog\Block\Product\ProductList\Toolbar" type="Vendor\Module\Block\Catalog\Product\ProductList\Toolbar" />

<preference for="Magento\LayeredNavigation\Block\Navigation" type="Vendor\Module\Block\CatalogSearch\Layer" />

<preference for="Magento\Catalog\Model\ResourceModel\Product\Collection" type="Vendor\Module\Model\Catalog\Resource\Product\Collection" />

</config>

In Vendor\Module\Model\Engine.php

$current_list_mode = $this->layout->createBlock('Vendor\Module\Block\Catalog\Product\ProductList\Toolbar')->getCurrentMode();

In \Vendor\Module\Block\Catalog\Product\ProductList\Toolbar.php

namespace Vendor\Module\Block\Catalog\Product\ProductList;

use Magento\Catalog\Helper\Product\ProductList;
use Magento\Catalog\Model\Product\ProductList\Toolbar as ToolbarModel;
use Magento\Framework\View\Element\Template;
use Magento\Framework\Registry;

class Toolbar extends \Magento\Catalog\Block\Product\ProductList\Toolbar
{
    protected $tglssearchHelper;

public function __construct(
    /* passing all Constructors parameters to the parent class -Magento\Catalog\Block\Product\ProductList\Toolbar.php*/
    \Magento\Framework\View\Element\Template\Context $context,
     \Magento\Catalog\Model\Session $catalogSession,
    \Magento\Catalog\Model\Config $catalogConfig,
    ToolbarModel $toolbarModel,
    \Magento\Framework\Url\EncoderInterface $urlEncoder,
    ProductList $productListHelper,
    \Magento\Framework\Data\Helper\PostHelper $postDataHelper,
    \Vendor\Module\Helper\Data $tglssearchHelper,
    \Magento\Framework\Registry $registry,
    array $data = []
)  {
        $this->tglssearchHelper = $tglssearchHelper;
        $this->_catalogSession = $catalogSession;
        $this->_catalogConfig = $catalogConfig;
        $this->_toolbarModel = $toolbarModel;
        $this->_urlEncoder = $urlEncoder;
        $this->_productListHelper = $productListHelper;
        $this->_postDataHelper = $postDataHelper;
        $this->_registry = $registry;

        parent::__construct($context,$catalogSession,$catalogConfig,$toolbarModel,$urlEncoder,$productListHelper,$postDataHelper,$data);
   }

  public function getAvailableOrders()
{
    echo 'availablOrders';

}

But still im not able to override the custom block for my custom search engine:(
my layout file name : catalogsearch_catalogsearch_resultcontroller.xml

Controller path is:
Vendor\Module\Controller\CatalogSearch\ResultController

My system.log says:

Cache file with merged layout: LAYOUT_frontend_STORE1_3d41d8cd98f00b204e9800998ecf8427e and handles : Please correct the XML data and try again.  [] []

I get a blank page when i search for the products. please help where am i wrong!!


texts: Stripe Payment Gateway - Multi Capture of Authorized amount

texts:
I want to capture (or invoice authorized amount from Magento2) authorized amount multiple times. Use case is as follows

Customer Places an order of $200 with two products and Stripe
authorize this amount.
Business user will Capture amount $100 for first product considering shipping scenario.
After 2-3 days business user will Capture (invoice) amount of second product.

But Stripe Payment Gateway does not support multi capture. If we try to capture less than authorized amount then Stripe PG refunds remaining amount. How this scenario should be tackled?


texts: How can i add shipping at our own store location in magento 2

texts:
I'm very new to the Magento 2. Can anyone help me to overcome my problem?

I need another new option is "pickup at our stores".

So there will be no shipping charges for the customers. For this, should I install any plugin or Magento 2 has inbuilt feature?    Please let me know about this.

Thanks


texts: Integrate TCPDF in Printing Invoice PDF : Magento 2

texts:
How can I use TCPDF in print Invoice PDF, Really I am facing a problem which is Arabic characters are reversed and separated.

I did a search a lot for this problem and found Zen PDF has many problems with fonts, so there are many advices to use TCPDF.

Kindly help.


texts: Daily admin email for products that went out of stock that day

texts:
I am trying to set up a script to send out daily emails to my admin to let them know what went out of stock that day only.

It doesn't need to be anything fancy, perhaps even writing items to a text file as products go out of stock until the end of a day when that text files is sent out as an email and cleared for the next day?

Thanks!


texts: How to know if module's output is disabled in magento 2?

texts:
I have already tried these solutions : How can I check if the module output is enabled on the Magento 2?

But the thing is if I use this solution, it always give 0.

$this->_scopeConfig->getValue(
             'advanced/modules_disable_output/' . [ModuleName],
             \Magento\Store\Model\ScopeInterface::SCOPE_STORE
 )

If I use this solution, it always give 1.

$this->_moduleManager->isEnabled('Module_Name')

So, I am confused why it is so! I have one module and it's output I have kept disabled from  Config. -> Advance -> Advance in Default, Main Website, Default Store View.

And kept Enabled in my custom created Website, Store & Store View so whenever I run sitename.com or sitename.com/mycustomnewstore it gives the same output either 0 or 1 as per above code.

It should give 1(Disabled) in sitename.com & 0(Enabled) in sitename.com/mycustomnewstore

Any other code or technique?


texts: Getting `Area code is already set` when running consumers

texts:
When I am running any of the consumers command from the console:
bin/magento queue:consumers:start exportProcessor

I am getting the following exception from the vendor/magento/framework/App/State.php, method: setAreaCode($code): Area code is already set.
My current magento version is: 2.3.4. Do you have any ideas why am i getting that exception ?
Thank you


texts: Thumbnail images are not loading Magento 2.3.0

texts:
On Category Listing Page my Product Thumbnail Images are not Loading whenever I apply a Filter on to the Category Page or I try to Navigate to some other pages of the Category. The first page of the category Loads fine and shows the Thumbnail Images without any issues.
I am using Porto Theme....
This is what I get on category listing page:

My Console Shows this:

Any help would be appreciated..
I also tried using this command but no Luck:
 php bin/magento catalog:images:resize


texts: What is the event that will fire after cancelling the order in Magento 2

texts:
I am trying to do something customization from my custom module after an order has been cancelled (Frontend as well Backend). For this I have gone through cancelled Observer on the sales/etc/events.xml and sales/etc/adminhtml/events.xml, But I can't find where it is.

Could you please help me where it is(Observer)? to do something after cancelled the order Frontend(Customer) and Backend(Vendor/Seller).

Which observer will use from frontend and backend?


texts:
I try to overwrite the Exportorders.php in my extension which is located here:

/app/code/community/Raveinfosys/Exporter/Model/Exportorders.php

I created my own extension now in /app/code/local/Namespace/Raveinfosys/Exporter/

and added the Namespace_Raveinfosys_Exporter.xml to /app/etc/modules/.

Within /Exporter/ I created two folders: /etc/ and /Model/. Within /etc/ I placed the config xml with the following contents:

<?xml version="1.0"?>
<config>
    <modules>
         <Namespace_Raveinfosys_Exporter>
            <version>0.0.1</version>
        </Namespace_Raveinfosys_Exporter>
    </modules>
    <global>
        <models>
            <raveinfosys_exporter>
                    <rewrite>
    <exportorders>Namespace_Raveinfosys_Exporter_Model_Exportorders</exportorders>
                    </rewrite>
            </raveinfosys_exporter>
        </models>
   </global>
</config>

Within the /Model/ folder I created copied the Exportorders.php and put in the first line:

class Namespace_Raveinfosys_Exporter_Model_Exportorders extends Raveinfosys_Exporter_Model_Exportorders

But somehow it is not working. Does anybody know why it is not working? Is it a problem that the /etc/ Folder are in the 2nd level? They are not in Namespace/Exporter, they are in Namespace/Raveinfosys/Exporter.


texts: How to remove "Please enter a quantity greater than ##" when adding a product to cart

texts: I need to remove the "Please enter a quantity greater than ##" message from the product detail page, what file do I have to edit to stop only this specific alert?


texts: Where do I find the reviews summary file?

texts:
I need to change the reviews ratings on the category and product pages to a custom review star system from a third party.

I am using Magento 1.9.1.0 and I have the code:

<div class="ruk_rating_snippet" data-sku="<?php echo $_product->getSku(); ?>" data-store="my-store-ltd">

I am stuck on how to find the files and what to overwrite on my custom copy?

Thanks for any help,


texts: Update CMS static block content programmatically

texts:
I have created one CMS static block.

I want to know that can I change its content by code (programmatically).

Is there any way to do it?


texts:
I tried using this function

$this->_scopeConfig->getValue(
      'general/store_information/phone',
      \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITES
    );

And it is always returning an null value. This is on all general store settings. Is there a way to retrive store website phone number?
Use case display store phone number in checkout.


texts: Magento 2 : Get simple products from configurable (with Out of stock products)

texts:
I'm looking for get the simple products associated to a configurable one. I'm currently using this :
$product->getTypeInstance->getUsedProducts($product);
Where $product is a configurable.

But it return me simple products that have quantity > 0. Is there a method to  also get the 'out of stock' products from a configurable ?

Thanks!


texts: Pin code based expected delivery in magento product details page

texts:
I am developing a Magento based application for a gold selling company.

Now I got stuck with the requirement for including the expected delivery for products based on pin code.

I tried some extensions, but all failed. Most of the extensions come with COD availability. But I need the expected delivery date actually.

Thanks in advanced!


texts:
I am using an extension of the mageworx "Advanced Configurable Option ..." https://www.mageworx.com/magento-2-advanced-product-options-suite.html

I could have used the basic magento configurable products, but unfortunately for the work I had to do I should have created more than a thousand attributes.

The extension support told me that it is an incompatibility with my theme, and I have to pay. But I like to solve problems alone and above all to understand how I solved it well. This is to enrich my experience.

"isWatched" It should hide the dropdown , but in my theme it doesn't work and the drop down remains.

The question is: is it possible to HIDE the dropdown only on the product page?
Can i do this with css?

URL Product : https://gyps.it/it/test-product.html

Magento CE 2.2.2

Thanks!