texts:
When logging in to Admin, we receive the error "Could not create an acl object: Resource id 'id_name' already exists in the ACL"
The Resource id in question used to work, but now we get this error.
Doing a search on the codebase only returns one instance of an acl with the resource ID.
We've tried clearing/flushing the cache and redeploying.


texts: How to have loader widget block only some content

texts:
The loader widget allows a developer to block page content while an AJAX request is ongoing. The devdocs describes it as:

The Loader widget blocks page content (all content or a part of it).

I'm having trouble figuring out how to block "a part of it."
By using showLoader: true in jQuery AJAX calls, you can have the widget automatically show and hide the loader through the lifetime of the request. Further, the loaderContext property is supposed to give the ability to have the loader appear in a specific area on the site - which seems like a good lead. (You can see an example in the reviews processing JS).
$.ajax({
  url: url,
  showLoader: true,
  loaderContext: $('.elem')
  // snip
)};

This doesn't work at all, in my experience – I just get a warning of Expected to start loader but did not find one in the dom when I use my own element there.
What gives? Do I need to make another instance of the Loader widget for every section I want it to hide?


texts: Magento 2.3 getting error on wishlist page if simple product adding into wishlist?

texts:
I am using Weltpixel Advanced wishlist extension which is working fine for configurable product but when I am adding simple product into the wishlist then I am getting error related to price:

Fatal error: Uncaught Error: Call to undefined method Magento\Catalog\Pricing\Price\ConfiguredRegularPrice::getOptions() in /var/www/html/vendor/magento/module-catalog/Pricing/Price/ConfiguredPriceSelection.php:43 Stack trace: #0 /var/www/html/vendor/magento/module-catalog/Pricing/Render/ConfiguredPriceBox.php(126): Magento\Catalog\Pricing\Price\ConfiguredPriceSelection->getSelectionPriceList(Object(Magento\Catalog\Pricing\Price\ConfiguredRegularPrice))
#1 /var/www/html/generated/code/Magento/Wishlist/Pricing/Render/ConfiguredPriceBox/Interceptor.php(50): Magento\Catalog\Pricing\Render\ConfiguredPriceBox->getConfiguredRegularPrice()
#2 /var/www/html/vendor/magento/module-catalog/Pricing/Render/ConfiguredPriceBox.php(142): Magento\Wishlist\Pricing\Render\ConfiguredPriceBox\Interceptor->getConfiguredRegularPrice()
#3 /var/www/html/generated/code/Magento/Wishlist/Pricing/Render/ConfiguredPriceBox/Interceptor.php(63): Magento\Catalog\Pricing\Render\ConfiguredPriceBox->hasSpecialPrice()
#4 /var/www/html/app/design/frontend/OM/ in /var/www/html/vendor/magento/module-catalog/Pricing/Price/ConfiguredPriceSelection.php on line 43

I have tried clear generated folder as well but not getting the solution.
Can anyone help me to fixed the issue? I am using Magento 2.3.4


texts:
I am working on a module that connects to a third party API using SOAP. What I want to know is

what are the best practices when developing with SOAP?
How to validate the SOAP response?
ex - if the SOAP response comes in XML format, how to check if a specific node is available
any helper Methods to use

Thanks


texts: Shipping options have minus in front of them on Paypal Payment review

texts:
I have Paypal set up on my store and i have an issue with the drop down list in the payment review section of the checkout process when paying with a paypal account.

The costs look like they are being subtracted because there is a hyphen in front of them, when they actually are not.

How do i get rid of these hyphens please?

Thanks Tom


texts: Magento 2 add seo title suffix for every product page

texts: How can I add SEO title suffix for product page?


texts: How can i add a function to scroll product images in the catalog search list page?

texts:
so... i have been trying to solve this situation for a few days now... In theory, it should not be difficult to solve... But i cant find the right way to do it...
If i search for a product... i am returned a list (whose template is list.phtml) where there is a little image of the product, and some other attributes i added.
I need to add the possibility of scrolling the different images corresponding to that product in the little image that appears in the list... I will upload images of the list and the code regarding the image in list.phtml
Please!!!! any help is highly appreciated.
Thank you very much.


texts: get invoice item using order_item_id in magento 2

texts:
I want invoice item data using order_item_id and I tried using

use Magento\Sales\Api\InvoiceItemRepositoryInterface;
private function getInvoiceItemById($orderItemId)
    {
        return $this->invItemRepository->get($orderItemId);
    }

But i am not getting any data and instead i am facing an error

  Fatal error: Uncaught TypeError: Argument 1 passed to
  Magento\Sales\Api\Data\InvoiceItemInterfacePersistor::__construct()
  must implement interface
  Magento\Sales\Model\Spi\InvoiceItemResourceInterface, instance of
  Magento\Sales\Model\ResourceModel\Order\Invoice\Item given, called in
  /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on
  line 93 and defined in
  /var/generation/Magento/Sales/Api/Data/InvoiceItemInterfacePersistor.php:58
  Stack trace: #0
  /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93):
  Magento\Sales\Api\Data\InvoiceItemInterfacePersistor->__construct(Object(Magento\Sales\Model\ResourceModel\Order\Invoice\Item),
  Object(Magento\Sales\Api\Data\InvoiceItemInterfaceFactory),
  Object(Magento\Framework\App\ResourceConnection))


texts: unexpected SyntaxError from Template/Ajax - Magento 2

texts:
I am a newby in Magento, so sorry if my question seem stupid.
I have an error

  SyntaxError: JSON.parse: expected double-quoted property name at line 6 column 17 of the JSON data

that I don't understand, I mean I don't use JSON.parse and problem seems to come from this Magento core but I don't understant why.
Here my .phtml :

    <input type='button' id='zip_btn' name='zip_btn'>  <style>   .hideme{display:none;} </style> <script type="text/x-magento-init">
            {
                "*": {
                    "Vendor_ZipCode/web/js/ajax": {
                        "AjaxUrl": "<?php echo $block->getAjaxUrl(); ?>",
                    }
                }
            } </script> <div id='test' class="hideme">
        <select>
          <% _.each(posts, function(text,value) { %>
             <option value="<%= value %>"><%= text %></option>
          <% }) %>
         </select> </div>

and here js:

define([
    'jquery',
    'underscore',
    'mage/template',
    'jquery/list-filter'
    ], function (
        $,
        _,
        template
    ) {
        function main(config, element) {
            var $element = $(element);
            var zipurl = config.AjaxUrl;
            console.log('test');
            $(document).on('click','#zip_btn',function() {
                    var param = 'ajax=1';
                        $.ajax({
                            showLoader: true,
                            url: zipurl,
                            data: param,
                            type: "POST",
                            dataType: 'json'
                        }).done(function (data) {
                            $('#test').removeClass('hideme');
                            var html = template('#test', {posts:data});
                            $('#test').html(html);
                        });
                });
        };
    console.log('test');
    return main;

If someone know the answer I would be really glad.
please in case you put minus explain while like that I can improve the post ;)


texts: config.php missed in my app/etc directory

texts:
app/etc/config.php missed.

am also following code:

1)bin/magento module:install

2)bin/magento module:upgrade

3)bin/magento module:enable

4)php bin/magento setup:upgrade


texts:
Hello i have upgraded my magento EE 1.9 to 1.14.2.0.  My questions are

1) Upgrading directly from to major version is it okay? i don't any major issues so far in development. If i need to go for incremental approach to which version should i go?

2) Do i need to run any of the scripts in shell for my versions
url_migration_to_1_13.php
url_migration_from_1_13_0_0_to_1_13_0_2.php
umt113_conflict.php
umt113_redirect.php


texts: Magento Product REST API for configurable and grouped products

texts:
I can not find the REST API documentation for creating a configurable product over the REST API from Magento

I also can not find the documentation for relating simple products with a product over REST.


texts: I don't want to remove links from the product page but I have a iframe quick view which displays exactly what is there on the product page. I managed to remove additional tabs, upsells by inserting following in the layout file. I would like remove two more links "Sign up for price alert" and "Be the first to review this product". What are the tags for these two links that can be used in the layout file to remove.


texts: SUPEE-5344 - Addresses a potential remote code execution exploit

texts:
What will be the major changes in the files after installation of patch SUPEE-5344 for Magento 1.4.2.0? I mean that any particular files permission changes something like that...
Please help me for the same.


texts:
I want step by step Magento 2 REST API add to cart
I am trying this
post/rest/V1/guest-carts it generate cart Id , then
post/rest/V1/guest-carts/:cart Id/items and I am getting error message like
this

{
        "message": "Consumer is not authorized to access %resources",
        "parameters": {
            "resources": "Magento_Cart::manage"
        }
    }


texts:
I am developing a custom payment module and I am trying to show it on the product checkout page, without success. The thing is that not a single payment method (even the default ones) is shown at the checkout page, even when my payment module is disabled. The payment methods are enabled on admin panel.
How do I enable any payment method (beside admin panel), or how do I debug the whole process?

Update  1

I  installed  magento-sample-module, Braintree and Inchoo_Stripe method payment.
How can I enable at least Cash On Delivery Payment as a payment method?

Update 2
I went debugging. I installed wireshark and received the folowing (part of) response from server: {"payment_methods":[{"code":"cashondelivery","title":"Cash On Delivery"}],"totals":.... It appears that a propper response is received, but the JSON processing fails. I will come with another update soon.


texts:
One of my clients are having trouble with their magento installation. When they they create a new product and set the "Set Product as New from Date". It does not update until later that day, and not by midnight as expected.

I have tried the following:

Checking how often the magento cronjob is running,
Checking the time setting on the server.


texts:
I'm intermittently getting a 302 error like below.

Request URL: https://www.example.com/paypal/standard/redirect/
Request Method: GET
Status Code: 302 Moved Temporarily

Sometimes it works (200), sometimes it fails and just returns to homepage.

I put some debug code in

Mage/Paypal/controllers/StandardController.php

but when it fails it doesn't even use this file.

Any ideas??


texts:
Who has some solutions, maybe It helps me if I truncate some tables.
When i try make reindex get error: here was a problem with reindexing process.
In log file: Exception message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '515-173-1-53' for key 'PRIMARY', query was: INSERT INTO catalog_product_index_eav_idx (entity_id,attribute_id,store_id,value) VALUES (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?),


texts: How to add product reviews progmatically

texts:
I want to add product reviews programatically with some custom fields defined on my code below

$review = Mage::getModel('review/review')
->setEntityPkValue(intval($pressquote->product_id)) //product id
->setStatusId(intval($pressquote->status))
->setDetail($pressquote->text)
->setTitle('')
->setEntityId(1)
->setStatusId(intval($pressquote->status))          //approved
->setCustomerId(null)                       //null is for administrator
->setNickname($pressquote->source)
->setLink($pressquote->link)                            //custom field
->setLinktext($pressquote->linktext)                   //custom field
->setYear($pressquote->year)                            //custom field
->setStoreId(1)
->setStores(array('base'))
->save();

but it doesn't work for me.. I checked my code and it stops on save(). What went wrong?
I tried already removing the custom fields but nothing happened


texts: Magento 2 - Missing enable / disable cache options in Admin

texts:
In Magento 2,I can't enable/disable cache In System -> Cache Management, the two options are missing from the dropdown menu. what did wrong?

It's in Default mode.

Anyone has idea on this?


texts: Mage::getSingleton('core/session')->addNotice not print immeidately

texts:
I have an observer which will get the date parameter, if the date format is wrong, there is a notice will be print

public function datefilter($observer) {

    //$request = $observer->getEvent()->getRequest();
    //var_dump($request);
    $order = Mage::app()->getRequest()->getParam('order');
    //echo $order;
    if ($order == "range") {

        $start_date = Mage::app()->getRequest()->getParam('start_date');
        $end_date = Mage::app()->getRequest()->getParam('end_date');

        $dir = Mage::app()->getRequest()->getParam('dir');
        //var_dump($start_date);
        echo $start_date."
";
        echo $end_date."
";

        if ($this->checkDate($start_date) == false || $this->checkDate($end_date)  == false) {
            echo "Error
";
            Mage::getSingleton('core/session')->addNotice('bad date');

        } else {

                            $collection = $observer->getEvent()->getCollection()
            ->addAttributeToSelect('*')
            ->addAttributeToSort('created_at', 'desc')
            ->addAttributeToFilter('created_at', array('from' => $start_date, 'to' => $end_date))
            ->load();
        }

    }
}

The Mage::getSingleton('core/session')->addNotice('bad date'); will not print immediately, I need to click the URL in browser can press enter to reenter to page to show.


texts: Error: Can't start Docker in background - getting error when installed vue storefront

texts:
I am installing Vue Storefront using this reference link

when i run npm run installer command. i am getting below error

error log file contains below details

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'installer' ]
2 info using npm@6.13.4
3 info using node@v10.18.0
4 verbose run-script [ 'preinstaller', 'installer', 'postinstaller' ]
5 info lifecycle vue-storefront@1.11.0~preinstaller: vue-storefront@1.11.0
6 info lifecycle vue-storefront@1.11.0~installer: vue-storefront@1.11.0
7 verbose lifecycle vue-storefront@1.11.0~installer: unsafe-perm in lifecycle true
8 verbose lifecycle vue-storefront@1.11.0~installer: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/lampp/htdocs/project/m2vue/vue-storefront/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle vue-storefront@1.11.0~installer: CWD: /opt/lampp/htdocs/project/m2vue/vue-storefront
10 silly lifecycle vue-storefront@1.11.0~installer: Args: [ '-c', 'node ./core/scripts/installer' ]
11 silly lifecycle vue-storefront@1.11.0~installer: Returned: code: 1  signal: null
12 info lifecycle vue-storefront@1.11.0~installer: Failed to exec installer script
13 verbose stack Error: vue-storefront@1.11.0 installer: `node ./core/scripts/installer`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid vue-storefront@1.11.0
15 verbose cwd /opt/lampp/htdocs/project/m2vue/vue-storefront
16 verbose Linux 5.0.0-37-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "installer"
18 verbose node v10.18.0
19 verbose npm  v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error vue-storefront@1.11.0 installer: `node ./core/scripts/installer`
22 error Exit status 1
23 error Failed at the vue-storefront@1.11.0 installer script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Version(installed in my system)

npm - 6.13.4
node - v10.18.0
docker - Docker version 19.03.5, build
633a0ea838
redis-server - Redis server v=4.0.9 sha=00000000:0 malloc=jemalloc-3.6.0 bits=64 build=9435c3c2879311f3

I don't know what is an issue in my followed step or version which is installed in my PC

If any one know answer then please help me. Any help would be appreciated!

Thank you


texts: Magento 2: ACL Permission Call Manually for Logged In Admin

texts:
Magento 2: ACL Permission for Admin Module

In

magento\app\code\Custom\Module\Controller\Adminhtml\Posts\Index.php

namespace Custom\Module\Controller\Adminhtml\Posts;

use Magento\Framework\View\Result\PageFactory;
use Magento\Framework\App\Action\Context;

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

    /**
     * @var \Magento\Framework\Controller\Result\ForwardFactory
     */
    protected $resultPageFactory;

    /**
     * @param \Magento\Framework\App\Action\Context $context
     * @param \Magento\Framework\Controller\Result\ForwardFactory $resultForwardFactory
     */
    public function __construct(
    \Magento\Framework\App\Action\Context $context, \Magento\Framework\View\Result\PageFactory $resultPageFactory
    ) {
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

    public function execute() {
        $resultPage = $this->resultPageFactory->create();

        $this->_isAllowed();

        $resultPage->getConfig()->getTitle()->prepend(__('Posts'));

        return $resultPage;
    }

    /*
     * Check permission via ACL resource
     */

    public function _isAllowed() {
        return $this->_authorization->->isAllowed('Custom_Module::posts');
    }
}

While calling this it's giving error

  Exception #0 (Exception): Notice: Undefined property:
  Custom\Module\Controller\Adminhtml\Posts\Index\Interceptor::$_authorization
  in
  D:\wamp\www\magento\app\code\Custom\Module\Controller\Adminhtml\Posts\Index.php
  on line 55

Why i'm doing manually, because my Module Permission is still not working. So for Authrization we have module-authorization Module. Would like to use that Manually in Controller/Block file. Ideal Controller.

$_objectManager = \Magento\Framework\App\ObjectManager::getInstance(); //instance of\Magento\Framework\App\ObjectManager
$aclObject  = $_objectManager->get('Magento\Authorization\Model\Acl');

If i use above then it gives Class 'Magento\Authorization\Model\Acl' not found


texts: How to Set Condition for MetaDescription in Magento 2

texts:
I am trying to set a meta description dynamically for Magento 2 categories as default rules. And I did manage to do it, here is my code.

public function execute(
\Magento\Framework\Event\Observer $observer
) {
$category = $observer->getEvent()->getCategory();
//$metaTitle = $category->getName() ." - xxx.club";
$metaDesc = "Place order for " .$category->getName() . " with us and get huge sales and discount!";
if ($category instanceof \Magento\Catalog\Model\Category) {
    //$oldMetaTitle = $category->getMetaTitle();
    $oldMetaDesc = $category->getMetaDesc();
    //$category->setMetaTitle($metaTitle);
    $category->setMetaDescription($metaDesc);
}
}

I am trying to find a way to add a check so that observer check first if this page has meta description set in backend categories, then it should skip adding meta description, but add if there is no meta description tag on the page.


texts:
Custom theme using Magento 2.2.1 in developer mode, inheriting from the Magento/blank theme.

When selecting an item from a sizing dropdown on a product page, created using a configurable product, an element appears, which I believe is the 'tier price'.

The element in question is

.

I have tried adding <referenceBlock name="price-tier_price" remove="true" /> and <referenceBlock name="price-box" remove="true" /> to default.xml, but neither have worked.

Please can someone advise me how to hide this element?

Thanks.

EDIT:

Found this link.
Looks like this might be the root of the problem, which is marked 'Done' ready for Magento 2.3.


texts: Magento, problem with adding a custom css file

texts:
I am new with Magento.

By following instruction found in here: http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/css-topics/css-themes.html

For me no success to add a css file.

This is what I have done:

  app/code/MYVendor/mytheme/etc/module.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
  <module name="MYVendor_mytheme" setup_version="1.0.0">
    <sequence>
      <module name="Magento_Theme"/>
    </sequence>
  </module>
</config>

  app/code/MYVendor/mytheme/registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
  \Magento\Framework\Component\ComponentRegistrar::MODULE,
  'MYVendor_mytheme',
  __DIR__ );

  app/design/frontend/MYVendor/mytheme/Magento_Theme/layout/default_head_blocks.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <head>
    <css src="css/styles-l.css" media="screen and (min-width: 768px)"/>
  </head>
</page>

  app/design/frontend/MYVendor/mytheme/web/css/styles-l.css

body {
  background-color: blue;
}

I also have run:

php bin/magento deploy:mode:set developer
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento indexer:reindex
php bin/magento cache:flush

But no luck.

Can anybody help me please! Thank!


texts:
As we know that Form key feature has been added to new versions of Magento. This affects old themes or modules for adding product to cart, wishlist and placing an order. I faced a situation where a third party module for Brands, users were not able to add the products to cart nor to wishlist. On troubleshooting, I found that, the form key used by the brands module was different than of the normal product listing pages and I also found that the form key used for one category page remains the same for other category pages as well, so its seems it doesn't update for a particular session i guess and our module should has to follow the same.

however, I wrote a piece of code to update form key, in the add to cart url, with valid one using events and hence products were successfully added to cart and wishlist.

My question is:

Is there a general way developed/allowed by the Magento team, so that such third party modules, which are developed to list the products on some basis, are simply forced to follow the valid form key which is used by the default product listings instead of generating a new one?

Edit: The key returned by Mage::getSingleton('core/session')->getFormKey(); for custom product listing is not valid for adding the product to wishlist or cart.


texts: Magento2: How to move short:description to more information

texts:
How to move short description to more information tab?
https://prnt.sc/t7dvyl


texts: What is the difference between grand_total and base_grand_total of the order?

texts:
Can any one explain the difference between following attributes of the order?

grand_total
base_grand_total

Any suggestions will be appreciated.


texts: How to change Magento2 export product MULTI VALUE SEPARATOR?

texts:
In product import, there is interface input box to select multi value separator which is comma.

But in product export, we cannot select separator so it will mix up with the field separator.


texts: Magento 2.1 : getLoadedProductCollection() always returns all products

texts:
I am trying to get the collection of visible products on my category page. But as soon as I call getLoadedProductCollection(), my category page shows all products, effectively rendering pagination useless.

My module injects a phtml in the <head>-tag, and it's PHP code is this:

$categoryBlock = $this->getLayout()->getBlock('category.products.list');
$collection = $categoryBlock->getLoadedProductCollection()

Now, if I don't get the loaded products collection, everthing works fine. Magento states 'showing 15 products' and the pagination shows '1-15 of 17'.

However... as soon as my code also wants to have a peek of the product collection by invoking getLoadedProductCollection(), the category page and pagination show all 17 products, even though it's set to a lower value. (It then states 'items 1-17 of 17').

How can I get the same collection as the category page itself? That is: limited by the products that are actually shown?


texts: Magento 2: Error on checkout "Logged in customer Checkout getting No such entity with orderId =" for logged in customer

texts:
I'm using a Magento 2.3.2 in our production site.

But I don't know why when I try to place an order with an existing user, I am getting No such entity with orderId=. When I buy something as a guest, there isn't any problem.

How can I fix it?

When I check the error in Chrome console, I get the following:

POST http://XXXX/rest/en/V1/carts/mine/payment-information 400 (Bad Request)


texts: Magento 2 Migration - 1.9.3.10 to 2.3.5-p1 : Migration Tool URL Rewrite Step Fail

texts:
I am having the following issue when running the migration tool:
[2020-08-14 06:11:38][INFO][mode: data][stage: volume check][step: Url Rewrite Step]: Error occurred. Rollback.
[2020-08-14 06:11:38][INFO][mode: data][stage: volume check][step: Url Rewrite Step]: Url Rewrite Step: rollback
[2020-08-14 06:11:38][INFO][mode: data][stage: volume check][step: Url Rewrite Step]: Please fix errors and run Migration Tool again
[2020-08-14 06:11:38][WARNING]: Volume Check failed

I've not been able to find any definitive solutions for this.
Could anyone help me please?
Thank you.


texts: Magento 2 Add track order link popup on admin sales order grid page

texts: Anyone have idea how we can open track order link popup open on the admin sales order grid.


texts:
If Magento Enterprise's indexers have crashed or your database has crashed or was dumped during a re-index, you might get stuck with an indexer lock. This lock can only be removed by the MySQL thread which has started it.

So how to do this?


texts: How to join custom table with product collection

texts:
I have created a custom vendor module. How can i get vendor name along with product collection?.

Mine have a vendor attribute whose values comes from vendor module.

I tried

$collection = Mage::getModel('catalog/product')->getCollection()
$collection->getSelect()->join( array('tvendor'=>$this->getTable('vendor/vendor')), 'main_table.vendor = tvendor.vendor_option_id', array('tvendor.filename'));

But it doesn't work. Where am i wrong?


texts:
I've installed magento 1.9 with sample data.

From swagger Documentation page, I see that the Base url for swagger must be /index.php/rest/default. However, when I visit this link, I get 404 Page not found.

Is swagger there by default in Magento 1.9 ? What I am doing wrong?


texts:
I have now tried to perform an update to 1.9.2, which did not work.
I tried to install the update via Magento Connect, then the side seemingly offline (Error 503) but the maintenance.flag file does not exist.

Then it looks at the Magento error log as follows:

a:5:{i:0;s:1008:"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.status' in 'where clause', query was: SELECT COUNT(DISTINCT e.entity_id) FROM `mag19_catalog_product_flat_1` AS `e`
 INNER JOIN `mag19_report_compared_product_index` AS `idx_table` ON (idx_table.product_id=e.entity_id) AND (idx_table.visitor_id = '109')
 INNER JOIN `mag19_catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.category_id = '2'
 LEFT JOIN `mag19_core_store` AS `store_index` ON store_index.store_id = idx_table.store_id
 LEFT JOIN `mag19_core_store_group` AS `store_group_index` ON store_index.group_id = store_group_index.group_id
 LEFT JOIN `mag19_catalog_category_product_index` AS `store_cat_index` ON store_cat_index.product_id = e.entity_id AND store_cat_index.store_id = idx_table.store_id AND store_cat_index.category_id=store_group_index.root_category_id WHERE (e.status = 1) AND (cat_index.visibility IN(3, 2, 4) OR store_cat_index.visibility IN(3, 2, 4))";i:1;s:4858:"#0 /var/www/vhosts/domain.../httpdocs/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/vhosts/domain.../httpdocs/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/vhosts/domain.../httpdocs/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /var/www/vhosts/domain.../httpdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT COUNT(DI...', Array)

and many more

Do you have an idea?
I am grateful for any help.


texts: accordion menu on mobile screen not working

texts:
I am working on a magento ecommerce website https://harissonsbags.com

Here the accordion menu not working on mobile device. But it is working properly on localhost.

Can you please give me any suggestion?

I am using magento 1.9


texts:
Having problems displaying Item count in top cart (Safari).

Chrome:

Safari:

Code:


texts:
i have a strange problem in magento connect, no upload option works, the fields seem kind of off, see the image.

I am running Nginx, FastCGI-Hhvm, i installed a Wordpress and everything works fine, including installed plugins and themes using upload function without any problem.

using upload in CMS pages or adding a product all working fine except Magento Connect.

I already tried:

Set permissions 777
Run Magento Clean Up
Setting correct chown


texts: Billing address checkbox replace add button in magento 2

texts:
Checkbox hide and button click checkbox check and unchecked in billing address in magento 2.4

app/design/frontend/Vendorname/Themename/Magento_Checkout/web/template/billing-address.html

    <input type="checkbox" name="billing-address-same-as-shipping"
           data-bind="checked: isAddressSameAsShipping, click: useShippingAddress, attr: {id: 'billing-address-same-as-shipping-' + getCode($parent)}"/>

    <button class="action action-chnage" type="button">

    </button>

<render args="detailsTemplate"/>
<fieldset class="fieldset" data-bind="visible: !isAddressDetailsVisible()">
    <each args="getRegion('billing-address-list')" render="" />

        <render args="formTemplate"/>

    <render args="actionsTemplate"/>
</fieldset>


texts: How to remove "active" on product page tab after page load

texts: I would like to display only title in product information tab on product page after page load. When I click on title name , need to show their particular content.


texts:
The last order disappeared from the Magento2 backend (sales->orders).
The invoice related to that order is still visible in the list of invoices but when I try to open it I get a 404 with the following error:

Invoice capturing error

Any idea what when wrong and how I can fix this ?


texts:
On mass edit action i got these error. what i miss there?

view/adminhtml/ui_component/test_test_listing.xml

<action name="edit">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">edit</item>
                        <item name="label" xsi:type="string" translate="true">Edit</item>
                        <item name="callback" xsi:type="array">
                            <item name="provider" xsi:type="string">test_index_listing.test_index_listing.test_index_columns_editor</item>
                            <item name="target" xsi:type="string">editSelected</item>
                        </item>
                    </item>
                </argument>
            </action>

Error

editor.js (line 532, col 20)
TypeError: this.selections(...) is undefined

return this.selections().getPageSelections();


texts: Magento 2 - Call different module block function in my custom phtml

texts:
I have custom module in which there is custom block and it's associated phtml which call my custom block functions using $block object.

I want to call other module block function in my custom module phtml

So I need to figure out the best way of doing it? I already have the idea how to call other block function in phtml through Objectmanager but it is not the best practice

Any help, knowledge and experience sharing would be appreciated


texts: Getting configured product child sku on product page

texts:
I would like to do the following

  whenever we choose a setting for a configurable product on the product page. I would like to get the ID of the child product on the product page itself (not through add to cart observer).

  For example: I navigate to a "polo shirt" and then choose its color as "red", is there any way I can retrieve the SKU of the "red shirt" on the product view page itself? as right now, even if I choose "red" and get productSKU, it gets me the SKU of the "shirt" instead of the "red shirt"


texts: Magento2 - Remove/edit classes from navigation

texts:
I have set up a new magento2 store and I added some jqery-ui items ( accordion and tabs) and for them to work, I was included the jquery.css in my _extend.less inside my custom theme.

Unfortunately now it added to the standard magento2 navigation multiple animations and icons that i don't want, because the navigation has jquery classes by default.

My question now: How do i remove those classes from the menu, so i can use the jquery.css? Or how can i solve this, without styling all the jquery by hand?

Thank you.


texts:
I made a module to check if there are orders placed and if so then export them via another class. I can see the task getting created in the cron_schedule table however only the first one starts running and it keeps running, not finishing.

In this module I also have a controller file and if I go the the controller path the function executes so there's nothing wrong with the function I guess.

etc/crontab.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="default">
        <job name="order_export" instance="Vendor\Test\Cron\OrderExport" method="execute">
            <schedule>* * * * *</schedule>
        </job>
    </group>
</config>

Crontab works, cron jobs are created in cron_schedule table.

Cron/OrderExport.php

<?php
namespace Vendor\Test\Cron;

use Vendor\Test\Helper\GrippApi;
use Vendor\Test\Helper\GrippExport;

class OrderExport
{
    protected $_logger;

    protected $_orderCollectionFactory;

    protected $_orderRepository;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Psr\Log\LoggerInterface $logger,
        \Magento\Sales\Model\ResourceModel\Order\CollectionFactory $orderCollectionFactory
    ) {
        $this->_orderCollectionFactory = $orderCollectionFactory;
        $this->_logger = $logger;
        parent::__construct($context);

    }

    public function execute()
    {
        $this->_logger->debug('Running Cron from Gripp OrderExport class');
        $today = date("Y-m-d");
        $orders = $this->_orderCollectionFactory
            ->create()
            ->addAttributeToSelect('*')
            ->addFieldToFilter('created_at', array('gteq' => $today))
            ->addFieldToFilter('export_to_gripp', array('eq' => '0'))
            ->addFieldToFilter('status', array(
                array('eq' => 'pending'),
                array('eq' => 'processing')
            ));

        // Initialisatie API connector
        $apikey         = 'apikey';
        $url            = 'url';
        $api            = new GrippApi($apikey, $url);

        // Bepaal Betaalstatus
        $betaalstatus = 64;

        foreach ($orders as $order){
            $orderId = $order->getEntityId();

            $export = new GrippExport();
            $export->_api            = $api;
            $export->_order          = $order;
            $export->_betaalstatus   = $betaalstatus;
            $export->execute();
        }
        return $this;
    }

}
?>


texts: How to change eav attribute label only in loaded product?

texts:
I'm loading a product from a model.
And this product has some attributes like color, size etc.
My problem is that the labels of the color attribute have some extra informations divided by pipes.
Some day we will clean this mess up but for now I'm trying to load the product and change/crop the color labels only for that product and return it to $this.

Is this possible and how?
At the moment I can get all color attributes in a foreach loop but I don't know how to save then in my loaded product.


texts: Fatal error after Magento installation 'undefined method ProductExtension::setStockItem()'

texts:
When I run Magento I get

  PHP Fatal error:  Call to undefined method
  Magento\Catalog\Api\Data\ProductExtension::setStockItem() in
  /var/www/magento/vendor/magento/module-catalog-inventory/Model/Plugin/AfterProductLoad.php
  on line 47

Please help


texts: Magento 2: modify the appearance of tabs

texts:
I used to be able to add rounded corners to the tabs in the product view page in 1.8.1. Now in Magento 2.2 I don't even know where are the files that need to be modified. Can someone point me to the right direction? Thanks.
Here was the code I used in the css in 1.8.1

-webkit-border-top-left-radius: 15px;
-webkit-border-top-right-radius: 15px;
-moz-border-radius-topleft: 15px;
-moz-border-radius-topright: 15px;
border-top-left-radius: 15px;
border-top-right-radius: 15px;

I actually accomplished this by modifying the file:
/lib/web/css/source/lib/_sections.less
I added the following lines and it worked (I am not a programmer, sorry):

> .item.title {
            > .switch {
                -webkit-border-top-left-radius: 15px;
                -webkit-border-top-right-radius: 15px;
                -moz-border-radius-topleft: 15px;
                -moz-border-radius-topright: 15px;
                border-top-left-radius: 15px;
                border-top-right-radius: 15px;
             }


texts: My site needs some security patches applied

texts:
I'm having trouble finding the instructions for applying a security patch.  My hosting provider says I need to apply SUPEE-6285. I found a page for that on the Magento site here and the instructions say this:

  Enterprise Edition Merchants: Go to MY ACCOUNT, select the Downloads tab, and then navigate to Magento Enterprise Edition > Support Patches. Look for the folder titled “Security Patches – July 2015.” Merchants can also upgrade to the latest version of the Enterprise Edition and receive the security fixes as part of the core code.

The words "MY ACCOUNT" are a link but when I go there the page is blank.  If I click the My Account link in the upper corner of the site I go to a page but there is no Downloads tab.

Can someone help?


texts: Display by customer generated product collection with category layout

texts:
I'm trying to generate a search result/category page with a custom product collection. The plan is to create the product collection based on attributes the customer can choose in a custom html form. I have an IndexController

public function indexAction() {
    $this->loadLayout();
    $this->renderLayout();
}

public function postAction() {
    $postData = $this->getRequest()->getPost();
    $productCollection = Mage::getModel('mymodule/api')->checkPost($postData);
    //$this->_redirect(???);
}

which is receiving postData from my form.phtml and passing it to my checkPost function (postData gets evaluated) which returns a custom productCollection. I would like to redirect the customer from the form to a category/search result page with the productCollection as results but I have no idea how to get this done.


texts: Trying to get the URL to images from the cache, in the admin panel - "Image file not found"

texts:
What I'm actually trying to do here is generate blog posts automatically based on some custom criteria, and include some product results in them via a custom layout.  The data I can't seem to get at is a full path to a product's image in the cache, like this:

media/catalog/product/cache/1/small_image/210x/9df78eab33525d08d6e5fb8d27136e95/s/t/sts52090.jpg

Because I want images that are consistent width/height for a grid layout, and I want to use the already-generated ones from the cache.

I'm generating these from inside a controller in the Admin UI, and these two lines always create a "Image file was not found" error:

$thisMageProduct = Mage::getModel('catalog/product')->load($entity_id);
$thisMageImage = Mage::helper('catalog/image')->init($thisMageProduct, 'small_image');

I have confirmed the first line works - I can return other info about the product besides the image, such as the correct SKU.  When I add the second line, it throws the exception.

This is how I have instantiated Mage:

$mageFilename = $MAGROOT . 'app/Mage.php';
require_once $mageFilename;
Mage::setIsDeveloperMode(true);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

I have confirmed the images do really exist, and that write permissions are set on the media/catalog directory.

What else is there to check??

Editing since I can't respond to your comments:

Your code doesn't work for me.  The only way to prevent the exception is to comment out your line.

$product  = Mage::getModel('catalog/product')->loadByAttribute('sku', $productrow['sku']);

if (is_object($product)) {

  //  $smallimg = Mage::helper('catalog/image')->init($product, 'small_image')->resize(210, 210);
    $smallimg = "broken";

} else {

    $smallimg = "/media/catalog/product/cache/1/small_image/130x130/9df78eab33525d08d6e5fb8d27136e95/placeholder/stores/1/no-image-available_2.jpg";

}

Is there something weird about the Admin area that makes these classes work differently?

Edit:

I tried both of these methods, also, and both throw exceptions:

$smallimg = Mage::helper('catalog/image')->init($thismageproduct, 'small_image');
$smallimg = $thismageproduct->getMediaGalleryImages()->getItemByColumnValue('label', 'small_image')->getUrl();


texts:
How does the number of products affect magento/server performance?

I am considering deleting unused products in a magento multistore setup as I am only using 1 of the stores. I have over 25K skus but only using about 1k.

I am using magento 1.7.0.2 and have read about some catalog rewrite bug which can cause some slow queries.


texts: Pagination in product listing page fails

texts:
In website on Magento 2.1.5, in any category I have added around 80 products.
When I am opening product listing page in any category; default its showing 9 products in grid.
If I change limit to 15, I can see products are appearing in grid.
Once I change limit to 30, site is showing blank page.
Can anyone suggest.


texts: Change logo from admin back-end and login dashboard

texts:
I am trying to change logo from Dashboard and Admin login page .Of course I tried all solution from stack overflow . but I am getting the below Error :

  error"Exception #0 (LogicException): Unable to load theme by specified
  key: 'Adminlogo/Changelogo'"

Step1:app/code/Adminlogo/Changelogo/etc/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Theme\Model\View\Design">
        <arguments>
            <argument name="themes" xsi:type="array">
                <item name="adminhtml" xsi:type="string">Adminlogo/Changelogo</item>
            </argument>
        </arguments>
    </type>
</config>

step-2:app/code/Adminlogo/Changelogo/etc/module.xml

 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
     <module name="Adminlogo_Changelogo" setup_version="1.0.0">
         <sequence>
             <module name="Magento_Theme"/>
         </sequence>
     </module>
 </config>

step3:app/code/Adminlogo/Changelogo/registartion.php

    <?php
    \Magento\Framework\Component\ComponentRegistrar::register(
        \Magento\Framework\Component\ComponentRegistrar::MODULE,
        'Adminlogo_Changelogo',
        __DIR__
    );
    ?>

step4:app/design/adminhtml/mythem/logotheme/registration.php

    <?php
    \Magento\Framework\Component\ComponentRegistrar::register(
        \Magento\Framework\Component\ComponentRegistrar::THEME,
        'adminhtml/mythme/logotheme',
        __DIR__
    );

    ?>

step-5:app/design/adminhtml/mythem/logotheme/theme.xml

    <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
        <title>astrokapoor astrology</title>
        <parent>Magento/backend</parent>
    </theme>

step6:design/adminhtml/mythem/logotheme/Magento_Backend/layout/admin_login.xml

        <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <update handle="styles" />
            <body>
                <referenceBlock name="logo">
                    <arguments>
                        <argument name="logo_image_src" xsi:type="string">images/my_logo.png</argument>
                    </arguments>
                </referenceBlock>
            </body>
        </page>

step7:design/adminhtml/mythem/logotheme/Magento_Backend/layout/default.xml

    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
            <referenceContainer name="header">
                <referenceBlock name="logo">
                    <arguments>
                        <argument name="logo_img_width" xsi:type="number">300</argument>
                        <argument name="logo_img_height" xsi:type="number">300</argument>
                        <argument name="show_part" xsi:type="string">logo</argument>
                        <argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
                        <argument name="logo_image_src" xsi:type="string">images/astrokapoor_logo.png</argument>
                    </arguments>
                </referenceBlock>
            </referenceContainer>
        </body>
    </page>


texts: How to add cart sidebar on customer_account_create page

texts:
I want to add cart sidebar in customer_account_create and customer_account_login page for this I have added code in local.xml file as:

...
<customer_account_login translate="label">
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        </reference>
        <reference name="right">
            <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-">
                <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
                    Shopping Cart Sidebar Extra Actions
                </block>
            </block>
        </reference>
    </customer_account_login>

    <customer_account_create translate="label">
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        </reference>
        <reference name="right">
            <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-">
                <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
                    Shopping Cart Sidebar Extra Actions
                </block>
            </block>
        </reference>
    </customer_account_create>
...

But it is not showing sidebar cart in right sidebar.
While the same code is working for category view and product view page.

How to add cart in right sidebar on customer create and login page?


texts: Parsing a CSV file for custom options script

texts:
First off I'm new to Magento, so please forgive me for my ignorance.

I would like to read from a CSV file that has item_id, sku, and the custom options data so I can use it in a foreach loop.

I'm not looking for a complete solution, just an idea of what I can/should do. All I've done thus far is grab the CSV file and create a new instance of the Varien_File_Csv class. After that, I have a separate foreach loop but it requires me to enter the product_id's one by one. I would like to create an empty array that will be filled with the data in the CSV, I just don't know which methods to use. Can anyone advise a little bit?

<?php
error_reporting(E_ALL | E_STRICT);
require_once 'app/Mage.php';
Mage::app('default');

$file = 'test.csv';
$csv = new Varien_File_Csv();
$data = $csv->getData($file);

$productIds = array(100, 101, 102);

$option = array(
    'title' => 'Test Option',
    'type' => 'file',
    'is_require' => 1,
    'price' => 10,
    'price_type' => 'fixed',
    'sku' => 'testsku',
    'file_extension' => 'png,jpg',
    'image_size_x' => '100',
    'image_size_y' => '200'
);

foreach ($productIds as $productId) {
    $product = Mage::getModel('catalog/product')->load($productId);
    $optionInstance = $product->getOptionInstance()->unsetOptions();

    $product->setHasOptions(1);
    if (isset($option['is_require']) && ($option['is_require'] == 1)) {
        $product->setRequiredOptions(1);
    }
    $optionInstance->addOption($option);
    $optionInstance->setProduct($product);
    $product->save();
}


texts: Magento2 import table rates from Magento1

texts: Is there a way to export tables rates from a magento1 shop and import them to a magento2 shop ?


texts: Magento 2 very big problem in orders items

texts:
A few days ago I was having this problem,( main.CRITICAL: Unable to unserialize value. {"exception":"[object] (InvalidArgumentException(code: 0): ) but I searched for this error, I found it, I replicated it this location public_html/vendor/magento/framework/Serialize/Serializer/Json.php

public function unserialize($string)
 {
    $result = json_decode($string, true);
    if (json_last_error() !== JSON_ERROR_NONE) {
        throw new \InvalidArgumentException('Unable to unserialize value.');
    }
    return $result;
}

To

public function unserialize($string)
{
    if($this->is_serialized($string))
    {
        $string = $this->serialize($string);
    }
    $result = json_decode($string, true);
    if (json_last_error() !== JSON_ERROR_NONE) {
       throw new \InvalidArgumentException('Unable to unserialize value.');

   }
   return $result;
}

function is_serialized($value, &$result = null)
  {

   if (!is_string($value))
{
    return false;
}

if ($value === 'b:0;')
{
    $result = false;
    return true;
}
$length = strlen($value);
$end    = '';
switch ($value[0])
{
    case 's':
        if ($value[$length - 2] !== '"')
        {
            return false;
        }
    case 'b':
    case 'i':
    case 'd':
                   $end .= ';';
    case 'a':
    case 'O':
        $end .= '}';
        if ($value[1] !== ':')
        {
            return false;
        }
        switch ($value[2])
        {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
            case 8:
            case 9:
                break;
            default:
                return false;
        }
    case 'N':
        $end .= ';';
        if ($value[$length - 1] !== $end[0])
        {
            return false;
        }
        break;
    default:
        return false;
}
if (($result = @unserialize($value)) === false)
{
    $result = null;
    return false;
}
return true;
}

and I started getting this problem in orders.

Then I checked in the database and found out, when I mention this Null here, it works correctly.

Table: sales_order_item

i check this for get WeeeTax Applied

 public function getApplied($item)

{
    if ($item instanceof QuoteAbstractItem) {

        if ($item->getHasChildren() && $item->isChildrenCalculated())
 {
      $result = [];

       foreach ($item->getChildren() as $child) {

           $childData = $this->getApplied($child);

             if (is_array($childData)) {

                  $result = array_merge($result, $childData);
              }
          }
         return $result;
        }
    }

    $data = $item->getWeeeTaxApplied();

    if (empty($data)) {

return [];
    }
      return $this->serializer->unserialize($item-
   >getWeeeTaxApplied());
 }

Plz can anyone help me

Thanks in advance


texts: How to add store switcher on custom module

texts:
I have made a custom module and according to my need, and i want to make it customized. I want
to make it store based,just like we have in product section. Any idea how this can be achieved?


texts: How to add catalog price rule condition in magento2

texts:
I have added to custom module to add catalog price rule condition. how to
Add Rule Condition in My custom module, I have also added Rule file and Condition.

$renderer = $this->_rendererFieldset->setTemplate('Emipro_Seo::promo/fieldset.phtml')->setNewChildUrl($this->getUrl('catalog_rule/promo_catalog/newConditionHtml/form/rule_conditions_fieldset'));
        $fieldset = $form->addFieldset(
            'conditions_fieldset',
            ['legend' => __('Conditions (don\'t add conditions if rule is applied to all products)')]
        )->setRenderer($renderer);

        $fieldset->addField(
            'conditions',
            'text',
            ['name' => 'conditions', 'label' => __('Conditions'), 'title' => __('Conditions'), 'required' => true]
        )->setRule(
            $model
        )->setRenderer(
            $this->_conditions
        );


texts: How to change CMS Page URL key in Magento

texts:
I am developing my e-commerce website (www.fashionnow.in). I want to change my home page URL key in CMS Pages.
Here is current URL KEY Snap

I want to change this url key.
Please help me to solve this proplem


texts: How to add Long Texts below footers for different cms pages in Magento 1.9

texts:
I want to put text after the footer links for SEO purposes for my Magento website. I want different texts to be shown below the footer for the homepage, categories and the products.

As an example, you can refer to this: https://www.mybatua.com/ [They have a long 800-word text below the footer for their home and categories.]

I tried using the widget and static block approach but the text never shows when I select page footer as the location.

Help will be appreciated.

Thanks in advance


texts:
I want to show the configurable attribute ( Size & color) in the cart sidebar.
This is the coding I entered to show the attribute in the cart popup:

<?php if ($_options = $this->getOptionList()):?>

                <?php foreach ($_options as $_option) : ?>

<?php echo $this->escapeHtml($_option['label']) ?>

                    <?php if (is_array($_option['value'])): ?>
                    <?php echo nl2br(implode("\n", $_option['value'])) ?>
                    <?php else: ?>
                    <?php echo $_option['value'] ?>
                    <?php endif; ?>

                <?php endforeach; ?>

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

        <?php endif; ?>

But nothing is showing up. Where have i went wrong?
Please help me to show the color and size of the product in the cart sidebar.


texts: No valid data sent magento product export

texts:
Trying to export products from Magento using system import-export function and getting the error no valid data sent

Initially, I was trying to export a few thousand products I then tried to export just one but got the same error


texts: How to provide provision to upload a pic during checkout in Magento 2

texts:
Here I want to add a functionality in checkout. where the user can upload a logo or picture during checkout and I want to use that pic afterward.

for eg:
If a customer uploads his logo or picture during checkout and he has purchased for more than $500.So I can use that logo or picture on my shop's blog as our super customers.
this is what I want to achieve is there any way where I can do this.

Small help will be greatly appreciated.
Thanks In Advance :)


texts: How to get manufacturer attributes other than id and name on product lisitng and detail page?

texts:
I have added a field 'is_hide_price' in the table brand.
Now I want to get this field value on product listing and detail page.

I have tried the following codes:

$_productId = 1782;
$_product = Mage::getModel('catalog/product')->load($_productId);

// Get manufacturer name

$_manufacturerName = $_product->getAttributeText('manufacturer');

// Get manufacturer id

$_manufacturerId = $_product->getManufacturer();

EDITED:

Model:

class Onsis_Brand_Model_Brand extends Mage_Core_Model_Abstract
{
    public function _construct()
    {
        parent::_construct();
        $this->_init('brand/brand');
    }
}

In Product Listing page:

$manufacturer = Mage::getModel('brand/brand')->load($product->getManufacturer());

try {
           Zend_Debug::dump($manufacturer->isHidePrice());exit;

} catch (Exception $ex) {
    echo $ex->getMessage();exit;
}

Output:

Invalid method Onsis_Brand_Model_Brand::isHidePrice(Array ( ) )

$manufacturer = Mage::getModel('brand/brand')->load($product->getManufacturer());
     Zend_Debug::dump($manufacturer);exit;

object(Onsis_Brand_Model_Brand)#753 (15) {
  ["_eventPrefix":protected] => string(13) "core_abstract"
  ["_eventObject":protected] => string(6) "object"
  ["_resourceName":protected] => string(11) "brand/brand"
  ["_resource":protected] => NULL
  ["_resourceCollectionName":protected] => string(22) "brand/brand_collection"
  ["_cacheTag":protected] => bool(false)
  ["_dataSaveAllowed":protected] => bool(true)
  ["_isObjectNew":protected] => NULL
  ["_data":protected] => array(8) {
    ["brand_id"] => string(2) "41"
    ["title"] => string(15) "Elite Leather A"
    ["filename"] => string(0) ""
    ["content"] => string(46) "Elite Leather Items that are listed indivually"
    ["status"] => string(1) "1"
    ["is_hide_price"] => string(1) "1"
    ["created_time"] => string(19) "2016-04-25 05:17:14"
    ["update_time"] => string(19) "2016-04-25 05:17:14"
  }
  ["_hasDataChanges":protected] => bool(false)
  ["_origData":protected] => array(8) {
    ["brand_id"] => string(2) "41"
    ["title"] => string(15) "Elite Leather A"
    ["filename"] => string(0) ""
    ["content"] => string(46) "Elite Leather Items that are listed indivually"
    ["status"] => string(1) "1"
    ["is_hide_price"] => string(1) "1"
    ["created_time"] => string(19) "2016-04-25 05:17:14"
    ["update_time"] => string(19) "2016-04-25 05:17:14"
  }
  ["_idFieldName":protected] => NULL
  ["_isDeleted":protected] => bool(false)
  ["_oldFieldsMap":protected] => array(0) {
  }
  ["_syncFieldsMap":protected] => array(0) {
  }
}


texts: Magento 2: How to test my extension with Magento Marketplace EQP?

texts:
How can I run the Magento Marketplace EQP in my current installation that has my extension?

Thanks


texts: Magento2 UI-Component listing datasource other than DB

texts:
I am creating an admin module. I have implemented a section where using a listing ui-component, i present some data from DB to the user.

I want to create a table using the same css style with the listing but this time i want my data to be loaded from a simple array.(possibly from a simple block class???)

My main concern is the style of the table. I want to use the same theme.


texts: How to confirm and approve a customer account via Database in bulk Magento 2

texts: How can we change a customer account confirm and approve a customer account via Database in magento 2


texts: how to serve optimised images in magento if the images are hosted on differente server?

texts:
I know there are plenty of extensions (free and paid) whcih optimises image before serving it. but the issue for me is, i am using stockinthechannel for our images and data, and we import images as link so none of the product image is hosted on our site.

is there any way we can optimise these images before serving on our site?


texts: Magento 2: Can we show lifetime sales on the basis of processing order?

texts: Currently, Lifetime sales on Magento admin dashboard are showing on the basis of complete orders. Can we show it on the basis of processing orders?


texts: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32768 bytes)

texts:
I was trying to move my Magento 2 website from local to the server! I was trying to upgrade and clear the cache but I am getting the error message 'Fatal error: The allowed memory size of 33554432 bytes exhausted'
using :Php 7.1 and Magento ver. 2.3.5-p1

of course, this problem is self-explained, But the real problem is I am unable to increase the memory size

MultiPHP INI Editor
updated -756M

2.[Magento2-root-folder]/index.php
ini_set('memory_limit',256);
3.[Magento2-root-folder]/.user.ini
memory_limit = 768M
4.[Magento2-root-folder]/.htaccess (2 places)
php_value memory_limit 768M
5.[Magento2-root-folder]/pub/.user.ini
memory_limit = 768M
6.[Magento2-root-folder]/pub/.htaccess (2 places)
php_value memory_limit 768M
I have tried all these places, please let me know where I am wrong ! Where else I can try to increase


texts: Permission Denied Product Import Magento 2

texts:
I am receiving the following error while trying to import products that I have already imported before using the same file.

The error appears in one of the MessageManager's error boxes with a red cross.

Deleted that file manually does not help - it is recreated.

The file C:/laragon/www/teststore/var/importexport/catalog_product.csv cannot be deleted Warning!unlink(C:/laragon/www/teststore/var/importexport/catalog_product.csv): Permission denied


texts: Magento 2: How to add OR condition b/w 2 AND conditions in Searchcriteria

texts:
I have a requirement where I found the list of specific orders according to the filtered conditions. I need to create a searchCriteria which I can pass to $this->orderRepository->getList($searchCriteria). To pass searchcriteria, I need below condition:

  (status = 'pending' AND custom_field = 1) OR (status = 'review' AND
  custom_field = 4)

I found multiple similar questions which answer about the combinations of conditions:

(attribute-A OR attribute-B) AND (attribute-C OR attribute-D)

This link will explain more what I want.
If anyone can help me please let me know.


texts: What is diffrence between OriginalPathInfo() and PathInfo()

texts:
In Mage_Core_Controller_Request_Varien_Router_Standard::checkShouldBeSecure there is object $request
What is difference between getOriginalPathInfo() and getPathInfo() methods of $request?


texts: Adding products to cart on the click of a banner

texts:
I want to add a product to the cart on the click of a banner. I referred to the fourth answer on this link - Magento 1.9.0.1 add a product to the cart by URL?

But on following the steps as stated, I am getting this error - The requested URL /checkout/cart/add was not found on this server. Can't understand what's wrong.

Would also like to know if there is any alternative approach to this problem


texts: How to display 12 product in listing page?

texts:
in my website i used new product, feature product etc.. on that page 12 product not showing it showing only 9 product, so that i used custom code but it's not working

<?php $magentoCurrentUrl = Mage::helper('core/url')->getCurrentUrl();?>

<?php $magentoCurrentUrlArr = @explode("?",$magentoCurrentUrl);
$magentoCurrentUrl = $magentoCurrentUrlArr[0];
$magentoPageLimit = "";
if($magentoCurrentUrlArr[1])
{
    $magentoPageLimit = @explode("=",$magentoCurrentUrlArr[1]);
    $magentoPageLimit = $magentoPageLimit[0];
}

if($magentoPageLimit == "" || $magentoPageLimit != "limit")
{
    $_productCollection->setPageSize(12);
}

But default listing page it's working fine how i fix it?


texts: Magento 2 - product collection filtered with custom attribute

texts:
I would like to filter product collection on category page using custom attribute. For example:

On category page, I want to list only products that have custom attribute age set to 10.

How to achieve that?
Thanks


texts: get categories which are not linked to a static block

texts:
I have a script to display all categories

$obj = new Mage_Catalog_Block_Navigation();
$store_cats = $obj->getStoreCategories();
$current_cat    = $obj->getCurrentCategory();
$current_cat    = (is_object($current_cat) ? $current_cat->getName() : '');

foreach ($store_cats as $cat) {
    if ($cat->getName() == $current_cat) {
        echo '
getCategoryUrl($cat).'">'.$cat->getName()."\n
\n";
        foreach ($obj->getCurrentChildCategories() as $subcat) {
            echo '
getCategoryUrl($subcat).'">'.$subcat->getName()."
\n";
        }
        echo "
\n
\n";
    } else {
        echo '
getCategoryUrl($cat).'">'.$cat->getName()."
\n";
    }
}

But some of the categories are linked to a static block so i want to filter it out, anyone know how to do that?


texts: Magento 2 How to get recently view product collection

texts:
My requirement is to get recently view product collection.

Below function is used in Magento1 :

$collection = Mage::getSingleton('Mage_Reports_Block_Product_Viewed')->getItemsCollection();

I want to use above collection in magento2.


texts: Having problem with product images, Magento is adding a faint pattern over images

texts:
I'm fairly new to Magento. My problem is that when uploading images to Magento, it's adding a very light square pattern over the images. It's as if it's trying to apply a watermark that doesn't exist over them. I've checked the originals, and they are fine, no odd pattern is present, but the large image on the product page has this very very faint texture on it.

I had previously added a watermark, but when I discovered how terrible the watermarking quality is on Magento removed it. This pattern appears to be applied to all my images, including new ones added since removing the watermark. (Also, this pattern has nothing in common with the watermark I had previously used, so maybe the whole watermark thing has nothing to do with it…?)

I've cleared the image cache and that hasn't changed anything.

Any ideas why, and what I can do to resolve this, thank you.


texts: Get magento category id by category path

texts:
So I am adding products programmatically, in my csv I have the category path which would look like,

Clothing/Shirts/Sweaters

Now using this how do I look up the category id? As far as I know the only way to assign a product a category is using,

->setCategoryIds(array(1));

Pulling the data from the database looks very tedious, as my above example is three sub categories deep. Is there a builtin Magento function that will make this possible?


texts:
Trying to get the product count of a category which also counts the products in its children. Currently, I have:

$categories = Mage::getModel('catalog/category')->getCollection()
        ->addAttributeToSelect('*')
        ->addAttributeToFilter('level', 2)
        ->addAttributeToSelect('is_active', 1);

 foreach ($categories as $cat) {
      echo count($cat->getProductCollection());
 }

however this returns the product count of the parent category without counting its child category products. How do I include the child categories in the parent count?


texts: Checkout with Braintree payment with 3d secure give error "Please try again with another form of payment."

texts:
Preconditions

Magento 2.3.X
configure Braintree payment with 3d secure for Production Environment

Steps to reproduce

List item
Add to cart any product
Go to checkout
select shipping method
select Credit Card (Braintree) as the payment method
fill details and click Place Order

Expected result:
1. order placed successfully

Actual result:
1. give the error "Please try again with another form of payment".


texts: Magenton 1 - If i try to void the order return error - Void Failed: Authorization Not Found (Payeezy)

texts: I am using Payeezy Payment gateway [First Data] If I try to void in back-end order section, I am getting error message Void Failed: Authorization Not Found  How can I solve the issue and void the order?


texts: How to get file location of this page in magento 1.9


texts:
I want to add a js function to an input field located in a phtml page
on my magento 2 I have write my function like below:

<script>
     function qtyzn() {
         .....
      }
</script>

and my input is:
<input  oninput="qtyzn();" value="1" id="nbrbox" />

I dont really get how to make this work on my magento 2


texts:
To be clear, this is not a post about Javascript Bundling. This is about Javascript Merging.

So, I'm in Production Mode and I'm starting to look at the optimisation of Javascript Merging. My benchmarks are as follows:

Javascript Bundling = Off (226 js files load)
Javascript Bundling = On (223 js files load)

I honestly expected this difference to be much more significant. Magento Documentation says to just turn it on. But clearly, there's another level to it than that.

What am I missing to fully utilise the Javascript Merging feature?


texts: Mobile subcategory dropdown on mobile theme

texts:
we are making mobile layout for our web site, but we don't know how to edit the subcategory dropdown: which code to add or change?

http://transmog.net/iphone-simulator/mobile-web-browser-emulator-for-iphone-5.php?u=http://test.arredodesignonline.com/it/tavoli-sedie.html

(the dropdown that starts with the word "sedie")


texts: Shopping Cart Rules for New Sign Up/Registered Customers

texts:
How can I create a new shopping cart for new registered customers?

I'm using Magento 1.7.0.2

I want to give 15% discount to my new customers for them to use only once.

How can I set up with this?


texts: How to create a custom field in Magento 2 user registration?

texts: I want to create a custom input field in Magento 2 user registration page and save this field in database. Can you help me ?


texts: Magento2 Migration tool integrity check failed

texts:
I am getting the following error when running the data migration tool on a existing Magento 1.9.2.2 data base. I have configured the tool to exclude the custom tables. What could I be missing?

I get the following error

[Migration\Exception]   Integrity Check failed

Even though all integrity check done 100%


texts: How to prevent Redis cache race conditions

texts:
We have a multi server Magento installation using Redis as cache backend.

Every time I flush Redis (FLUSHDB or FLUSHALL) under traffic Redis runs into race conditions.

Calling

redis-cli -h xxx.xxx.xxx.xxx monitor | egrep set | cut -c 1-120

I get lots of lines like this

1444810735.659889 [0 int.ern.ip.3:55588] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES" "d" "gz:\...
1444810735.779509 [0 int.ern.ip.0:38044] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_PL" "d" ""gz:\...
1444810735.787633 [0 int.ern.ip.7:51360] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_SE" "d" ""gz:\...
1444810735.795483 [0 int.ern.ip.4:33149] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_EU" "d" ""gz:\...
1444810735.803374 [0 int.ern.ip.4:33142] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_CZ" "d" ""gz:\...
1444810735.831377 [0 int.ern.ip.1:40537] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_UK" "d" ""gz:\...
1444810735.840627 [0 int.ern.ip.7:51359] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_EU" "d" ""gz:\...
1444810735.847732 [0 int.ern.ip.7:51356] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_AT" "d" ""gz:\...
1444810735.854708 [0 int.ern.ip.1:40535] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_FR" "d" ""gz:\...
1444810735.864083 [0 int.ern.ip.7:51345] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_PL" "d" ""gz:\...
1444810735.872110 [0 int.ern.ip.0:38046] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_CH" "d" ""gz:\...
1444810735.880313 [0 int.ern.ip.4:33145] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_CZ" "d" ""gz:\...
1444810735.887541 [0 int.ern.ip.4:33148] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_EN" "d" ""gz:\...
1444810735.897101 [0 int.ern.ip.0:38044] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_FI" "d" ""gz:\...
1444810735.904982 [0 int.ern.ip.4:33149] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_AT" "d" ""gz:\...
1444810735.912321 [0 int.ern.ip.4:33142] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_PL" "d" ""gz:\...
1444810735.919390 [0 int.ern.ip.7:51360] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_EN" "d" ""gz:\...
1444810735.929803 [0 int.ern.ip.7:51359] "hmset" "zc:k:my_cache_prefix_CONFIG_GLOBAL_STORES_AT" "d" ""gz:\...

again and again. Sometime after some minutes the global caches could be written and everything is ok. But under heavy traffic I have to take the shop offline and warm the cache manually.

My Redis config:

   <backend>Cm_Cache_Backend_Redis</backend>
    <backend_options>
        <server>xxx.xxx.xxx.xxx</server>                          <!-- or absolute path to unix socket for better performance -->
        <port>6379</port>
        <database>0</database>
        <persistent></persistent>
        <force_standalone>0</force_standalone>                   <!-- 0 for phpredis, 1 for standalone PHP -->
        <automatic_cleaning_factor>0</automatic_cleaning_factor> <!-- Disabled by default -->
        <compress_data>1</compress_data>                         <!-- 0-9 for compression level, recommended: 0 or 1 -->
        <compress_tags>1</compress_tags>                         <!-- 0-9 for compression level, recommended: 0 or 1 -->
        <compress_threshold>20480</compress_threshold>           <!-- Strings below this size will not be compressed -->
        <compression_lib>gzip</compression_lib>                  <!-- Supports gzip, lzf and snappy -->
    </backend_options>

Any idea to prevent such race conditions?


texts: Cant upload any images to new or existing products. Updated magento to 1.9.3.10 but it didn't fix the issue. Looked at different solution but so far can't fix it. Tried permissions, cache. All unsuccessfully


texts: Magento 2.1-rc1 How to customize Topmenu Html Markup

texts:
Like in Magento1, the Topmenu html structure is still pretty hardcoded.

To change the html markup of the submenus in 2.0, I added a plugin which altered the getHtml Method of Magento\Theme\Block\Html\Topmenu

This was already pretty hacky since I extended my Plugin from the Topmenu and then called the _getHtml Method from my instance instead of the original Topmenu instance and did not call the $proceed callback function.

Despite not calling $proceed beeing really rude, the only alternative I had in mind was setting a preference and overriding the _getSubMenu method. Here is the original plugin class:

<?php
namespace Bragento2\Base\Model\Theme\Html\Topmenu;

use Magento\Framework\DataObject;
use Magento\Theme\Block\Html\Topmenu;

class Plugin extends Topmenu
{
    public function aroundGetHtml(
        Topmenu $subject,
        $proceed,
        $outermostClass = '',
        $childrenWrapClass = '',
        $limit = 0
    ) {
        $this->_eventManager->dispatch(
            'page_block_html_topmenu_gethtml_before',
            ['menu' => $this->_menu, 'block' => $this]
        );

        $this->_menu->setOutermostClass($outermostClass);
        $this->_menu->setChildrenWrapClass($childrenWrapClass);

        $html = $this->_getHtml($this->_menu, $childrenWrapClass, $limit);

        $transportObject = new DataObject(['html' => $html]);
        $this->_eventManager->dispatch(
            'page_block_html_topmenu_gethtml_after',
            ['menu' => $this->_menu, 'transportObject' => $transportObject]
        );
        $html = $transportObject->getHtml();

        return $html;
    }

    /**
     * Add sub menu HTML code for current menu item
     *
     * @param \Magento\Framework\Data\Tree\Node $child
     * @param string $childLevel
     * @param string $childrenWrapClass
     * @param int $limit
     * @return string HTML code
     */
    protected function _addSubMenu($child, $childLevel, $childrenWrapClass, $limit)
    {
        $html = '';
        if (!$child->hasChildren()) {
            return $html;
        }

        $colStops = null;
        if ($childLevel == 0 && $limit) {
            $colStops = $this->_columnBrake($child->getChildren(), $limit);
        }

        $html .= '

';
        $html .= $this->_getHtml($child, $childrenWrapClass, $limit, $colStops);
        $html .= '

';

        return $html;
    }
}

Now to the real Problem:
In Magento 2.1, the category Items are not anymore added by an Observer, but a plugin on the getHtml Method. Since I also have a Plugin which does not call the $proceed method, the category items are not added anymore (So this won't work anymore and I need an alternative)

Next thing I tried was changing the preference to my own Topmenu block class. But since the plugin, that adds the category items is defined for the original Topmenu class, this also does not work.

To my question: How can I change the html markup of the topmenu's submenus in Magento 2.1?


texts: Programatically load orders of data changed in magento1.9

texts:
Can anyone help me how to load the data edited orders in magento1.9.

Please help me if any one have idea about this.

Thanks


texts: Admin Category Product count shows wrong value when Is Anchor is yes

texts:
I was having an issue of product count in the admin, I used the following query

DELETE FROM catalog_category_product where product_id NOT IN (SELECT entity_id FROM (catalog_product_entity))

Now at least I can see the correct count but as soon I change the Is Anchor to Yes, it shows wrong count again. why is that?


texts: Event observer for multi select attribute in Magento 2

texts:
I want to get new added option or all option at the time of save multiselect attribute from admin.

Which event I need to use for multiselect attribute save?


texts: Need to get name of product from previous page Magento 2.2

texts:
I had a Request A Quote button on certain product pages on my Magento 1.9 site and when clicked, it would bring users to a custom contact form which would have the Product Name field filled in with the name of the product they came from.

I done it in Magento 1.9 using the below on the custom contacts forms .phtml page:

<form method="post">
    <?php $productName = $_POST['productname'];?>
</form>

Then using $productName in the field where needed.

How would I achieve this in Magento 2.2?


texts: Force store-level values via php instead of default

texts:
We have an API we use for an app in the iOS/Android store, and for the most part works fine.

However, our client has edited products so that there are values in the DEFAULT level that are different than the STORE view.

Is there a way via PHP to force the models/queries to load the STORE level values, and not the DEFAULT?


texts: Magento 1.9 check if two or mulltiple attributes have values

texts:
I add three text field attribute in my product view.phtml, but i want to hide one text above only if none of that attributes have value.

This is my work but, "PURCHASE FROM THESE RETAILERS" is still in page, if i remove all attributes value in admin from (amazon_com_link, amazon_com_link, amazon_ca_link).

<?php if(in_array($_product->getAmazon_com_link) && ($_product->getAmazon_co_uk_link) && ($_product->getAmazon_ca_link) ) ?>

             PURCHASE FROM THESE RETAILERS

                <?php if($_product->getAmazon_com_link()): ?>
                    <a href="<?php echo ($_product->getAmazon_com_link()) ?>"><img src="<?php $this->getSkinUrl(); ?>/amazonus-logo.jpg" alt="Buy from Amazon.com">
                <?php endif ?>
                <?php if($_product->getAmazon_com_link()): ?>
                    <a href="<?php echo ($_product->getAmazon_co_uk_link()) ?>">
                        <img src="<?php $this->getSkinUrl(); ?>/amazonuk-logo.jpg" alt="Buy from Amazon.co.uk">

                <?php endif ?>
                <?php if($_product->getAmazon_ca_link()): ?>
                    <a href="<?php echo ($_product->getAmazon_ca_link()) ?>">
                        <img src="<?php $this->getSkinUrl(); ?>/amazonca-logo.jpg" alt="Buy from Amazon.ca">

        <?php endif ?>

I want to show off text inside  if none of that three attributes have values.


texts: Any other way to increase the customer logged in time in Magento-1.9 without increasing server session time session.gc_maxlifetime?

texts:
Any other way to increase the customer logged in time without increasing server session time?

If we give a value as 78,00,000 seconds (3 months) for session.gc_maxlifetime in the php.ini file, then Magento 1.9 logged in customers will be active for three months? Note: Already increased "set Cookie Lifetime" in System > Configuration > Web > Session Cookie Management

Is that safe to set the session.gc_maxlifetime variable in the php.ini file as 3 months?


texts:
I am very new to GraphQl Magento. When I access the graphql url in my installation, following the below tutorial, it throws the below error.
https://devdocs.magento.com/guides/v2.3/graphql/

Do I need to enable any modules, or set any configurations?

{
  "errors": [
    {
      "message": "Syntax Error: Unexpected <EOF>",
      "extensions": {
        "category": "graphql"
      },
      "locations": [
        {
          "line": 4,
          "column": 35
        }
      ]
    }
  ]
}


texts: I want to add a custom tab in seo section and this tab can be used for adding scripts  and this tab will be visible on storefront but i dont know how to approach


texts: Magento EE: session_start(): Unable to clear session lock record

texts:
Magento Enterprise Edition 1.14.0.1
PHP 7.2.15
PECL memcached extension 3.1.3

We encountered this problem upgrading Magento EE from PHP 5.6 to PHP 7.2. We do not see the problem using the memcached 2.x extension with PHP 5.6, and do see the problem (100% reproducible) using the memcached 3.x extension with PHP 7.2 (no change to the memcache server itself).

The question: Has anyone actually SOLVED the problem for Magento EE?

Background:

The problem is fully described here: https://github.com/magento/magento2/issues/5319 but that issue was closed in 2016 without actually resolving the problem. The reporting person moved to Redis for session caching.
The people encountering this problem often ALSO encounter this problem: https://serverfault.com/questions/916129/php-7-2-failed-to-read-session-data-memcache - and reports therefore confuse the two. This latter problem has to do with PHP expecting the session handler to return a string, when actually false or null can be returned. Solve this one by casting the return value to string.
These reports for Magento 2 are almost certainly the same issue as this: Magento 2.2.2 Unable to clear session lock record in /var/www/magento/vendor/magento/framework/Session/SaveHandler/Native.php on line 22 and Magento 2: memcached error "SessionHandler::read(): Unable to clear session lock record in" .
This memcached extension issue https://github.com/php-memcached-dev/php-memcached/issues/399 remains open, but the ini-parameter tweaks suggested in that ticket haven't resolved our issue. That ticket references https://github.com/php-memcached-dev/php-memcached/issues/269 but none of the suggestions in the latter ticket have helped either.

All indications are that this is not specific to Magento or any version of Magento. It appears to be a known (and unresolved) problem with PHP 7.x using the PECL memcached extension 3.x. Reports linked above confirm that the problem isn't present when falling back to PHP 5.6 / memcached 2.x.

I'd like confirmation that this problem remains unsolved for Magento, or if solved, how to solve it (continuing to use memcached for session caching).


texts: How to add onClick event to add to cart button

texts:
Magento version 2.1.9

I want to use facebook pixel on my magento site. I want to add onclick event to all "add to cart" buttons.

Thank you in advance.


texts: Magento 2.1- ACL Permissions not Working

texts:
I have created a user and given all the required roles to access the module. When we logged in with that particular user , we are able to see the module and module items but when we click on any item in the module we get the following output.

Access denied
Please try to sign out and sign in again.
If you continue to receive this message, please contact the store owner.

In controller index.php I have this method:

protected function _isAllowed()
{

    return $this->_authorization
                ->isAllowed('NAMESPACE_ModuleName::item');
}

Below is my Acl

<acl>
    <resources>
        <resource id="Magento_Backend::admin">

            <resource id="NAMESPACE_Xyz::xyz" title="NAMESPACE Xyz">
                <resource id="NAMESPACE_ModuleName::main_menu" title="Module Title"
                                      sortOrder="100">
                    <resource id="NAMESPACE_ModuleName::manage_item" title="Manage Items"
                              sortOrder="22" />

            </resource>
            </resource>
            <resource id="Magento_Backend::stores">
                <resource id="Magento_Backend::stores_settings">
                    <resource id="Magento_Config::config">
                        <resource id="NAMESPACE_ModuleName::configuration" title=" Module Configuration" translate="title" />
                    </resource>
                </resource>
            </resource>
        </resource>
    </resources>
</acl>

The configuration file works for me but, when I click on the menu items , it says access denied.


texts: Custom ui_component form fieldset not submitting

texts:
I created a custom fieldset for a ui_component form to add custom input structures. The problem is, that the inputs are not included in the POST values.

The input you see is just a simple  element in the fieldset.phtml you see in the Block code. It has a custom name "test_input_data". I implemented the fieldset similar to the conditions fieldsets on sales rules. The form namespance is shipping_rule_form.

<fieldset name="conditions" sortOrder="20">
    <settings>
        <collapsible>true</collapsible>
        <label translate="true">Conditions</label>
    </settings>
    <container name="conditions_apply_to" sortOrder="10">
        <htmlContent name="html_content">
            <block name="conditions_apply_to" class="Company\Namespace\Block\Adminhtml\ShippingRule\Edit\Tab\Conditions" />
        </htmlContent>
    </container>
</fieldset>

In the Block i am adding the fieldset like this:

protected function _prepareForm()
{
    $model = $this->_coreRegistry->registry('current_shipping_rule');
    $form = $this->addTabToForm($model);
    $this->setForm($form);

    return parent::_prepareForm();
}

protected function addTabToForm($model, $fieldsetId = 'conditions_fieldset', $formName = 'shipping_rule_form')
{
    if (!$model) {
        $id = $this->getRequest()->getParam('entity_id');
        $model = $this->_ruleFactory->create();
        $model->load($id);
    }
    $conditionsFieldSetId = 'shipping_rule_form_conditions';

    /** @var \Magento\Framework\Data\Form $form */
    $form = $this->_formFactory->create();
    $form->setHtmlIdPrefix('rule_');
    $renderer = $this->_rendererFieldset->setTemplate(
        'Remklov_ShippingRule::promo/fieldset.phtml'
    )->setFieldSetId(
        $conditionsFieldSetId
    );

    $fieldset = $form->addFieldset(
        $fieldsetId,
        [
            'legend' => __(
                'Apply the rule only to the products matched by the rule, if following conditions are met.'
            )
        ]
    )->setRule(
        $model
    )->setRenderer(
        $renderer
    );
    $fieldset->addField(
        'conditions',
        'text',
        [
            'name'           => 'conditions',
            'label'          => __('Conditions'),
            'title'          => __('Conditions'),
            'required'       => true,
            'data-form-part' => $formName
        ]
    );

    $form->setValues($model->getData());
    return $form;
}

When i do a print_r() on the getParams() in the Save-Controller, it just returns the data of the corresponding model, but not the custom input value. I also tried to add the conditions exactly like in the sales_rule_form.xml, but still nothing is posted.

I could not find out how the submit logic works here and where i maybe missed or need to add logic.


texts: Magento - Remove tax from all products quote. (Update)

texts:
I saw there are some post like this but I tried that answer and dit not work.

I am learning how to use magento, and What I wan to try is remove all the tax from the cliente when them have add 3 products to the cart.

I am using an observer event. And the function it run is:

Here is the config.xml

<events>
  <checkout_cart_add_product_complete> <!-- identifier of the event we want to catch -->
    <observers>
      <checkout_cart_add_product_complete_handler> <!-- identifier of the event handler -->
        <type>model</type> <!-- class method call type; valid are model, object and singleton -->
        <class>descuentoiva/observer</class> <!-- observers class alias -->
        <method>addCheckout</method>  <!-- observer's method to be called -->
        <args></args> <!-- additional arguments passed to observer -->
      </checkout_cart_add_product_complete_handler>
    </observers>
  </checkout_cart_add_product_complete>
<events>

And this is my actual code for the fuction:

public function addCheckout(Varien_Event_Observer $observer)
        {
            $cart = Mage::getModel('checkout/cart')->getQuote();
            if (count($cart->getAllItems()) >= 3) {
                $products = $cart->getAllVisibleItems();
                foreach($products as $item) {
                    echo $item->getPriceInclTax()."<br>";
                    if ($item->getTaxAmount() > 0) {
                        $item->setTaxPercent(0);
                        $item->setTaxAmount(0);
                        $item->setBaseTaxAmount(0);
                        $item->save();
                    }
                }
            $cart->save();
            }
            #die("patata");
        }

But when I look the checkout it did not work.


texts: Magento 2 : How can I see the email that are sending?

texts: In Magento 1 I can see the emails that will be sent in the core_email_quee, but how can I check this one in my Magento 2.1?


texts: How to remove cache from my Block class?

texts:
I need to remove the cache from my Block class, even if it removes the cache from the entire page.

How could I do it?


texts: 2.3 to 2.3.1 Upgrade showing sales_order_grid already exists

texts:
So far the upgrade went pretty smooth but now I have a few outdated modules and it's asking me to run the setup:upgrade on CLI but I keep getting an SQLSTATE general error:

1813 Tablespace for table 'db_mine.sales_order_grid' exists. Please DISCARD the tablespace before IMPORTsales_order_grid' exists. Please DISCARD the tablespace before IMPORT

Update

My sales_order_grid table is no longer in my DB.

I try to create the table again like so:

    CREATE TABLE `sales_order_grid` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity Id',
  `status` varchar(32) DEFAULT NULL COMMENT 'Status',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `store_name` varchar(255) DEFAULT NULL COMMENT 'Store Name',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Id',
  `base_grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `base_total_paid` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Paid',
  `grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Grand Total',
  `total_paid` decimal(12,4) DEFAULT NULL COMMENT 'Total Paid',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `order_currency_code` varchar(255) DEFAULT NULL COMMENT 'Order Currency Code',
  `shipping_name` varchar(255) DEFAULT NULL COMMENT 'Shipping Name',
  `billing_name` varchar(255) DEFAULT NULL COMMENT 'Billing Name',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',
  `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',
  `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method Name',
  `customer_email` varchar(255) DEFAULT NULL COMMENT 'Customer Email',
  `customer_group` varchar(255) DEFAULT NULL COMMENT 'Customer Group',
  `subtotal` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal',
  `shipping_and_handling` decimal(12,4) DEFAULT NULL COMMENT 'Shipping and handling amount',
  `customer_name` varchar(255) DEFAULT NULL COMMENT 'Customer Name',
  `payment_method` varchar(255) DEFAULT NULL COMMENT 'Payment Method',
  `total_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Total Refunded',
  `signifyd_guarantee_status` varchar(32) DEFAULT NULL COMMENT 'Signifyd Guarantee Disposition Status',
  `refunded_to_store_credit` decimal(12,4) DEFAULT NULL COMMENT 'Refund to Store Credit',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_ORDER_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_ORDER_GRID_STATUS` (`status`),
  KEY `SALES_ORDER_GRID_STORE_ID` (`store_id`),
  KEY `SALES_ORDER_GRID_BASE_GRAND_TOTAL` (`base_grand_total`),
  KEY `SALES_ORDER_GRID_BASE_TOTAL_PAID` (`base_total_paid`),
  KEY `SALES_ORDER_GRID_GRAND_TOTAL` (`grand_total`),
  KEY `SALES_ORDER_GRID_TOTAL_PAID` (`total_paid`),
  KEY `SALES_ORDER_GRID_SHIPPING_NAME` (`shipping_name`),
  KEY `SALES_ORDER_GRID_BILLING_NAME` (`billing_name`),
  KEY `SALES_ORDER_GRID_CREATED_AT` (`created_at`),
  KEY `SALES_ORDER_GRID_CUSTOMER_ID` (`customer_id`),
  KEY `SALES_ORDER_GRID_UPDATED_AT` (`updated_at`),
  FULLTEXT KEY `FTI_65B9E9925EC58F0C7C2E2F6379C233E7` (`increment_id`,`billing_name`,`shipping_name`,`shipping_address`,`billing_address`,`customer_name`,`customer_email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Order Grid'

I get the error message - Last Error Message
Tablespace for table db.sales_order_grid' exists. Please DISCARD the tablespace before IMPORT.

Then I run an ALTER Table: ALTER TABLE sales_order_grid DISCARD TABLESPACE;

I get the error message: Table 'db.sales_order_grid' doesn't exist


texts:
How can I programatically add Gift Card with message to cart ? I was able to add configurable and simple products; but not gif cards.

Thanks!


texts: I know out of the box the Magento search allows you to search by product sku. This is working fine on our site. However, if you have a product with a custom option that appends to the sku, searching by the whole sku does not return any results. So, for example, a simple product with the sku of 1234 with custom options set to add -S,-M, or -L depending on the selection, can be found in a frontend search using "1234" but not "1234-M" Is there any way to have the 1234-M return the correct product?


texts:
I have override a template file Magento_Payment::info/default.phtml using following method this template is declared only in
/Magento2/vendor/magento/module-payment/Block/Info.php

file.
The below code works fine, but i want to know how it actually works as i did not find toHtml method in the above file.
Any thoughts ?
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">
    <type name="Magento\Payment\Block\Info">
        <plugin name="module_paympent_view_override_template" type="Vendor\Module\Plugin\Payment\Block\Info" />
    </type>
</config>

Info.php
<?php
namespace Vendor\Module\Plugin\Payment\Block;

class Info
{
    public function beforeToHtml(\Magento\Payment\Block\Info $subject)
    {
            $subject->setTemplate('Vendor_Module::info/default.phtml');
    }
}


texts: How to delete folder after the order ends

texts:
Im new in Magento, I need to delete a file and its containing folder, which has a name generated by the following code:

$order = Mage::getModel('sales/order')->load($id_order);
$increment = $order->getIncrementId();

if (!file_exists(Mage::getBaseDir('base').'/Ocproveedores/'.$increment)) {
    mkdir(Mage::getBaseDir('base').'/Ocproveedores/'.$increment, 0777, true);
}

$tcpdf->Output(Mage::getBaseDir('base').'/Ocproveedores/'.$increment.'/OC-'.$nombreProveedor.'-'.$increment.'-'.$j.'.pdf', 'F');

How can I delete the folder after ending an order ?

Thanks a lot.