texts: Magento 2: Add additional attribute in mincart and checkoutcart after addToCart

texts:
I try to add aaditional attribute using below way, but i got error like this

  Invalid method Magento\Quote\Model\Quote::addOption

events.xml

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

observer.php

<?php
namespace Vendor\Module\Observer;

use Magento\Framework\Event\Observer as EventObserver;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\Serialize\Serializer\Json;
use \Magento\Checkout\Model\Session as CheckoutSession;

class CheckoutCartProductAddAfterObserver implements ObserverInterface
{
    protected $checkoutSession;
    protected $_layout;
    protected $_storeManager;
    protected $_request;
    protected $serializer;
    public function __construct(
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Framework\View\LayoutInterface $layout,
        \Magento\Framework\App\RequestInterface $request,
        CheckoutSession $checkoutSession,
        Json $serializer = null
     )
    {
        $this->checkoutSession = $checkoutSession;
        $this->_layout = $layout;
        $this->_storeManager = $storeManager;
        $this->_request = $request;
        $this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()
            ->get(\Magento\Framework\Serialize\Serializer\Json::class);
     }

    public function execute(EventObserver $observer)
    {
        $post = $this->_request->getParams();
        // $item =  $observer->getQuoteItem(); // also try this but don't work it.
        $item = $this->checkoutSession->getQuote();
        $additionalOption = $additionalOptions = array();
        $additionalOption = $item->getOptionByCode('additional_options');
        if (!empty($additionalOption)){
            $additionalOptions =  $this->serializer->unserialize($additionalOption->getValue());
        }
        if($post['attribute']){
            $additionalOptions[] = [
                        'label' => 'Test Attribute',
                        'value' => $post['attribute']
                    ];
        }
        if(!empty($additionalOptions))
        {
           $item->addOption(array(
                'product_id' => $post['product'],
                'code' => 'additional_options',
                'value' => $this->serializer->serialize($additionalOptions)
            ));
        }
    }
}

addtocart.phtml

<input type="hidden" name="attribute" id="attr_id" value="<?php echo $_product->getAttributeCode(); ?>" />

I also try all solution but can't get solution.

https://www.cloudways.com/blog/add-additional-options-in-magento-2/
https://magecomp.com/blog/add-additional-options-magento-2/
https://webkul.com/blog/additional-options-cart-item-magento2/


texts: delete or disable "SHOP BY" => Price , Color in magento

texts: I want to delete or disable "Shop by Color" and "Shop by Price" in magento frontend.


texts:
There has been an error processing your request
Exception printing is disabled by default for security reasons.
error ... what problem ?

a:5:{i:0;s:67:"Illegal scheme supplied, only alphanumeric characters are permitted";i:1;s:711:"#0 /home2/letmicro/public_html/app/code/core/Mage/Core/Model/Store.php(777): Zend_Uri::factory('www.letmicrowav...')
#1 /home2/letmicro/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(332): Mage_Core_Model_Store->isCurrentlySecure()
#2 /home2/letmicro/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(161): Mage_Core_Controller_Varien_Front->_checkBaseUrl(Object(Mage_Core_Controller_Request_Http))
#3 /home2/letmicro/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#4 /home2/letmicro/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#5 /home2/letmicro/public_html/index.php(87): Mage::run('', 'store')
#6 {main}";s:3:"url";s:121:"/www.letmicrowave.comindex.php/admin/dashboard/index/key/b93f7fcf9aa264fefeca8b933fa2b0a8/?SID=j5ei41mqapto3obhasn1rqf2u0";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}


texts: How to change image size on category page when click swatch

texts:
On Category page I have configurable product.
I set image resize on
/app/design/frontend/rwd/default/template/catalog/product/list.phtml

But  when i click swatch color images show size nomal

Help me, please


texts:
I've been programming Magento 1 for many years but I'm just getting into Magento 2 and I am a little confused about the theme folder structure.  From what I have found there's really no concept of theme-specific template files.  Templates are inside modules now.  To overwrite a parent theme's template, simply put your own template file in the same folder as the parent theme's file.

For example, let's say I have a theme called "Mytheme/Default" and I want to change the footer.phtml template for my theme.  The default one lives in [site_root]\vendor\magento\module-theme\view\frontend\templates\html\footer.phtml.  This tells me it's in the Magento Theme extension, so I need to put my override template in [site_root]/app/design/frontend/Mytheme/Default/Magento_Theme/templates/html/footer.phtml.

However, the part that isn't clear is where I'm supposed to put template files that are entirely custom but not related to any module at all.  I have since learned that these should probably reside under the Magento_Theme extension, howerver, while playing around and trying things I discovered that I can create a templates subdirectory in my theme folder (outside of any Module folders) and it actually works.  I can't find anything online about this so I'm wondering if it's a side effect of how Magento looks for template files or if this is actually a supported method for creating custom templates that aren't part of an extension.

I also read that if the template file you're trying to use lives in the same Module as the XML file providing the instructions you can avoid the Vendor_Module:: prefix on the template declaration in the XML.  For instance, if I create a new block inside the body of a page and I instantiate this using a default.xml file inside my theme under the Magento_Theme module directory, and if I put my template somewhere in the same Magento_Theme module directory, I should be able to use template="path/to/template.phtml in my layout XML instead of the longer version, template="Magento_Theme::path/to/template.phtml".  This, however, does not work in my experience and I always need the Magento_Theme:: directive.

...HOWEVER...

If I put my custom template in the (perhaps unsupported) templates subdirectory inside my theme's root folder (i.e. ...app/design/frontend/Mytheme/Default/templates) I don't need any module prefix and it actually works.

Is this supported or is it just by happenstance that it's working?


texts: Search box: which phtml is getChildHtml using

texts:
I am using Magento 1.7.
I am not sure of how getChildHtml() works. I have a piece of code in header.phtml,

echo $this->getChildHtml('topSearch');

used for showing the search box in my page. But I am not sure of which .phtml is using. First I thought it was using form.mini.phtml under app/design/frontend/default/custom_theme/template/catalogsearch/form.mini.phtml, but after enabling path hints in the Admin, it seems it's using another one.

I see that getChildHtml() is used a bit everywhere, and I see the idea of what it is used for, but I don't understand how it exactly works.

I need to know how can I define the string passed as parameter to getChildHtml(), and if there is an associated .phtml. Any help is much appreciated.


texts:
Any store related url I try to load on the dev site redirects to the live store.

1) dev is on a different server
2) local.xml mysql using new credentials
3) base urls have been changed
4) var/cache removed
5) browser history/cache/cookies wiped as well as using multiple browsers FF, Chrome and IE
6) fresh copy of .htaccess to ensure no redirects are setup

Any non magento urls will work just fine, such as any text or html file I create.

I don't know what else to do.


texts: Remove particular category name in default Layered Navigation in Magento 2.1

texts: I want to remove only one category name under Layered Navigation so how to proceed this?


texts: Cannot edit configurable product in Magento Admin

texts: I'm having trouble editing a configurable product. When I click "edit" for this specific product, I am re-directed to a page that looks like the one included below. I cannot expand the categories (i.e. General, Prices) and thus cannot update the product's information. Has anyone encountered this before? Thanks in advance for any advice.


texts: Magento 2 Full Page cache configuration in admin greyed out

texts:
The Full Page Cache from -

  Stores -> Configuration -> Advanced -> system -> full page cache

It's greyed out, like in screenshot.

I have chosen Default config from Store View,

I was able to change this configuration earlier. I don't know what went wrong that this is greyed out now.


texts: Magento 2 : Use aftersave and beforesave method

texts:
I want to add aftersave and beforesave method of Magento 2 in my model.

How can I do this and which model I have to called ?


texts: Magento 2 add column to sales returns grid

texts:
How to add column to sales returns grid,
returns grid using _prepareColumns to add columns to grid \Magento\Rma\Block\Adminhtml\Rma\Grid


texts:
We have a footer with icon (svgs) links to social media and I have asked to add another link for Instagram.

This is the code in the footer:

                <?php
                    $social_twitter = Mage::getModel('core/variable')->loadByCode('social_link_twitter')->getValue('plain');
                    $social_facebook = Mage::getModel('core/variable')->loadByCode('social_link_facebook')->getValue('plain');
                    $social_pinterest = Mage::getModel('core/variable')->loadByCode('social_link_pinterest')->getValue('plain');
                    $social_linkedin = Mage::getModel('core/variable')->loadByCode('social_link_linkedin')->getValue('plain');
                    $social_youtube = Mage::getModel('core/variable')->loadByCode('social_link_youtube')->getValue('plain');
                    $social_google_plus = Mage::getModel('core/variable')->loadByCode('social_link_google_plus')->getValue('plain');
                ?>

<a href="<?php echo $social_facebook; ?>">Facebook

<a href="<?php echo $social_pinterest; ?>">Pinterest

<a href="<?php echo $social_linkedin; ?>">LinkedIn

<a href="<?php echo $social_youtube; ?>">YouTube

<a href="<?php echo $social_twitter; ?>">Twitter

I found where the .svgs are kept on the server, but I don't know where the social_link_ are set so I can add a new one.  Where would I find that?

Thanks


texts: I can see attribute in Catalog -> Products grid but how to Shown Product attribute in Sales -> Orders grid in magento 2

texts:
I have created a custom attribute "item location" for every product.
It was created in Stores -> Attributes -> Product, then assigned to the default attribute set.

So every item has its own location in the warehouse which is shown in this attribute. I can see this attribute in Catalog -> Products grid, but I would like these data in Sales Orders grid as well.
Any idea?


texts: Remove block inside layout/xml from custom.phtml?

texts:
I need to remove a block that is set by the page.xml the rwd folder / default / layout. The code of one of them is this:

        <block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
            <block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label">
                <label>Page Footer</label>
                <action method="setElementClass"><value>bottom-container</value></action>
            </block>

In my research, I saw that it is possible to remove by creating a file called local.xml within the layout, but I have an option to hide/ visible within my module and must be removed through my file custom.PHTML, how as I do this? Thanks


texts: How to programatically assign multipe Bundle Products into one bundle product?

texts:
I have one project requirement, which have one Bundle product, in which requires multiple bundle products (nested levels) same as Simple Products Options association allows. Is there any way to customize this kind of functionality in Magento 2?
Please me give me some idea how to do it using code customisation.


texts: Get category image without object manager

texts:
I previously used ObjectManager to get current category image. but it sometimes caused problems to me. Like loading blank page without no content, slower loading time etc.. , also I saw in a few questions that people commented that using ObjectManager directly is not a good approach.

This is the page source when I get blank page error.

    <img class="img-responsive" src="

    Fatal error:  Uncaught Error: Call to a member function getImageUrl() on null in E:\xampp\htdocs\magento_projects\abc\app\design\frontend\abcvendor\abctheme\Magento_Catalog\templates\product\view\brandlogoimage.phtml:37
    Stack trace:
    #0 E:\xampp\htdocs\magento_projects\abc\vendor\magento\framework\View\TemplateEngine\Php.php(59): include()
    #1 E:\xampp\htdocs\magento_projects\abc\vendor\magento\framework\View\Element\Template.php(255): Magento\Framework\View\TemplateEngine\Php-&gt;render(Object(Magento\Catalog\Block\Product\View\Interceptor), 'E:/xampp/htdocs...', Array)
    #2 E:\xampp\htdocs\magento_projects\abc\var\generation\Magento\Catalog\Block\Product\View\Interceptor.php(544): Magento\Framework\View\Element\Template-&gt;fetchView('E:/xampp/htdocs...')
    #3 E:\xampp\htdocs\magento_projects\abc\vendor\magento\framework\View\Element\Template.php(279): Magento\Catalog\Block\Product\View\Interceptor-&gt;fetchView('E:/xampp/htdocs...')
    #4 E:\xampp\htdocs\magento_projects\abc\vendor\magento\framework\View\Element\Abstrac in E:\xampp\htdocs\magento_projects\abc\app\design\frontend\abcvendor\abctheme\Magento_Catalog\templates\product\view\brandlogoimage.phtml on line 37

This is the code I used to get category in my page, I used phtml file.

<?php
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $category = $objectManager->get('Magento\Framework\Registry')->registry('current_category'); ?>
    <img class="img-responsive" src="<?php echo $category->getImageUrl(); ?>" alt="brandlogo" />

How can I prevent that blank page loading error?

Is there any better approach to get category image than method I've used here?


texts: Custom option for each quantity item for team tshirt selling

texts:
I am working on a magento e-commerce website which sells t-shirts fro team or company. For each t-shirt we provide different color, sizes, neck-design etc., which is fine and I can easily achieve it using configurable products and custom options in magento.

Also, we want to provide two more options, front-text and back-number. Say some company wants to order 100 t-shirts for thier employees, with "ABC Company" written on front and number between 1 to 100 written on back side of t-shirts.

So, if customer ordering 100 qty, then I want to one main textbox which will have main company name, and also textbox against each qty so that they can modify the text or number for any tshirt they want. I am not able to understand how should I do this in magento.

I found a website which does the same: http://www.tshirtexpert.co.uk/tshirt-printing/Stag/LEFT_CHEST_STAG_%5Bstag%5D.aspx When you go to this link, choose options and click next, then you will see text option for each quantity.

Please check and advise if this is possible in magento? or if not, should I look for custom solution or any other CMS such as woocomerce can do this?


texts: Is it possible to dispatch the event admin_system_config_changed_section_XXX, for which I have an observer in my custom extension, from an external shell or PHP script?


texts: I want to remove the search bar completely from my website.  I've had a hard time trying to figure this out.


texts:
What is the difference between app/etc/config.xml and app/etc/local.xml?

I feel like some configurations are duplicated.  I always have to deal w/ local.xml, so what is the purpose of having all that other stuff in config.xml and when is it used?


texts: How to redirect to search page after login

texts:
I use force login. After login I need redirec to: https://mywebsite.com/catalogsearch/result/?q=__empty__
Any solution?


texts: No Order Summary on Checkout Page (Magento 2.3)

texts:
After upgrading to Magento 2.3.1, the order summary on the checkout page is not showing at all.

No error in the console and I have also checked the logs, nothing seems to be helping.

Current PHP Version: 7.1

Upgraded to Magento 2.3.1 from 2.1.3


texts: I tried to setup my magento to my hosting. So i created a new database and i did import my sql file and changed the settings in the local.xml for the database. but now i’m getting Exception printing is disabled by default for security reasons.


texts: Magento 2 caching currency till hit F5 key

texts:
I'm having a problem with the currency and the cache. I'm using Magento ver. 2.2.5 with Redis and Varnish.

Here are the steps to reproduce...

Go to homepage
Go to some PLP
Change the currency
Go to the homepage again (by clicking the logo)

Spected result:

The currency must be the selected one in the step 3

Actual result:

The currency is the same than step 1

Note: When I go to the home page by clicking the logo, the issue happens. But if I press F5 it works fine.

Then, I try to find the difference between clicking the logo and made an F5 refresh.
I can see a difference in the request. When I click the logo I can see this request header.

But when I do an F5 refresh I can see this request header.

I can solve this by adding this header on the server response.

  $resultPage->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0', true);

But I think that's wrong. I mean, I'm disabling cache right?.

If somebody have an idea it will be appreciated!
Thanks


texts: HOW TO Change # of products per row, specific for each page layout

texts:
Display more items per row in products/category pages

^ This post is a guide to set 4 products per row | For all pages.

I want to set a different amount of products for each page layout.

THE GOAL:

3 Products per row for 3 Column-Page Layout
4 Products per row for 2 Column ^
5 Products per row for 1 Column ^

Please provide instructions to customize products per row.

Thank you


texts: Get Categories collection in Helper file give 'Mage' not found error

texts:
I am trying to get categories in helper file I am using Mage::() to get categories in my helper file but it is throwing error. Here is the code to my helper file.

<?php
namespace Pulsestorm\HelloWorldMVVM\Helper;
use Magento\Framework\App\Helper\AbstractHelper;

class Data extends AbstractHelper
{

public function getCategoriesDropdown(){
    $categories=Mage::getModel('catalog/category')->getCollection()->addAttributeToSelect('name')->addAttributeToSort('path', 'asc')->addFieldToFilter('is_active', array('eq'=>'1'));
    $first = array();
    $children = array();
    foreach ($categories->getItems() as $cat) {
        if ($cat->getLevel() == 2) {
            $first[$cat->getId()] = $cat;
        } else if ($cat->getParentId()) {
            $children[$cat->getParentId()][] = $cat->getData();
        }
    }
    return array('first' => $first, 'children' => $children);
}
}

Now i am getting this error upon executing my code.

  Fatal error: Uncaught Error: Class
  'Pulsestorm\HelloWorldMVVM\Helper\Mage' not found in
  D:\wamp\www\alo_digi_quickstart\app\code\Pulsestorm\HelloWorldMVVM\Helper\Data.php:9
  Stack trace: #0

I have to use this result in my phtml file which is here.

  <?php $tree=$this->helper('Pulsestorm\HelloWorldMVVM\Helper\Data')->getCategoriesDropdown();?>

    <select id="first_cat" onchange="showCat(this, 2)">
        <?php foreach ($tree['first'] as $cat): ?>
            <option value="<?php echo $cat->getId() ?>"><?php echo $cat->getName() ?></option>
        <?php endforeach ?>
    </select>

can you help me resolve this problem


texts: Why should I (not) put my extension into app/code?

texts:
a dumb question.
From: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html

Magento installs third-party components in the <Magento install directory>/vendor directory. But we recommend adding your components to the <Magento install directory>/app/code directory. If you add your component to the <Magento install directory>/vendor directory, Git will ignore it because Magento adds the vendor directory to the <Magento install directory>/.gitignore file.

Why is it recommended to put code into app/code instead of creating a git repo and add it via composer.json?
All my code lives in repos. I do my changes there and just adjust composer.josn/composer.lock for my magento project.
I only see downsides using app/code directly. It's not update-safe as composer requirements are ignored. It makes my the repo bigger. I have an "unclean" commit log (even with squashed commits that only belong to extensions).

What are the PROs and CONs of using app/code?
What are the PROs and CONs of using composer?


texts:
How can I perform the same logic of filter_condition_callback of Magento 1 in Magento 2

I have a country column which I save comma separated values in db I have managed to create the filter but I am not able to get the result the values are stored comma separated.

How can I apply filter_condition_callback to get the result.


texts: How to move the Pincode checker extension above Add to cart button on product page

texts: I am developing the website called cravestore.in in Magento 1.9.4. I want to move my Pincode Checker extension above the add to card image like image#2. I was able to do that from inspect element but I can't find the exact file where I can do changes. Also, I have searched file using template path hints but I can't find the exact path or file. Attached are the screenshots. Also I want to know how do I know the exact source of the file I am editing in inspect console of Google Chrome. Any help will be appreciated. Any more details you want please suggest.


texts: Due to heavy traffic on site customer not able to loggedin/after reseting password not able to login Magento2

texts:
We are using Magento2.3.4-p2 cloud pro.
Client has reported everytime that her customer facing issue for login/after reseting password they are not able to login while promotions are running on site.
Can anyone faced the same or found any solution?


texts: How to add "Empty Cart" button to minicart

texts:
How can you add an "Empty Cart" button to the minicart in Magento 2.

Is it possible with layout xml?


texts: why deployVeniaSampleData.sh runs out of memory

texts:
Trying to run the Venia sample data deploy script

bash deployVeniaSampleData.sh --yes

but keeps getting

mmap() failed: [12] Cannot allocate memory
PHP Fatal error:  Out of memory (allocated 1293950976) (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223

Fatal error: Out of memory (allocated 1293950976) (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223
deployVeniaSampleData.sh: line 15: 20987 Killed                  ${composer} require ${composerParams} $(printf "${moduleVendor}/%s:dev-master@dev " "${moduleList[@]}")

my cli/php.ini contains lines

max_execution_time = 3600
max_input_time = 3600
memory_limit = -1

Should something be changed in the script ? Thank you

EDIT:
tried without the --yes argument as well


texts: Magento2: How to add Paypal checkout and Paypal credit button on custom .phtml file?

texts:
How to add the Paypal checkout and Paypal credit button in the custom .phtml file?

I want to add the same as a mini cart/my cart PayPal button on the custom page.


texts: Magento . 2.3.5-p1: third party payment methods not displaying in Backend: Stores > Configuration > Sales > Payment methods

texts:
I want to use / install 3rd party payment methods on the Magento v 2.3.5-p1.
I am aware that in this version the payment methods that were previously included, have been removed: https://devdocs.magento.com/guides/v2.3/release-notes/release-notes-2-3-5-open-source.html
When I was using the Magento version 2.3.1 I would use some external/3rd party payment methods installed via composer, namely:
 composer require mercadopago/magento2-plugin:2

and
composer require moip/magento2

In previous Magento 2.3.x versions, I would successfully install either/both modules above, and they would display (in the backend) as payment method options under Backend:  Stores > Configuration > Sales > Payment methods.
However, I have installed both modules via composer on the versions 2.3.5-p1, and although they were successfully installed via composer (ran bin upgrade, cache:cache, cache: flush and static-content:Deploy), neither display on the Payment method area (image below).
Do I need to do something 'extra' on this Magento version for 3rd party payment methods/modules to display in the backend configuration area?
To confirm: I am able to see the module installed in the front-end when I go to the checkout and try to place an order. The issue is not being able to see and configure them in the backend.


texts: Magento_Amqp and Magento_MysqlMq errors during setup:upgrade

texts:
I have M2.3.4 and Porto 3.2.3 installed. I've recently changed Quickview modules and now when I run setup:upgrade, i get 2 errors:

Magento_Amqp: Topic "inventory.source.items.cleanup" is not configured
Magento_MysqlMq: Error while checking if topic is synchronous

I see that this has to do with Magento messaging but have no idea why I would get these messages all of a sudden.

In the system.log, I see this message:
main.INFO: Consumer "async.operations.all" skipped as required connection "amqp" is not configured. Unknown connection name amqp [] []

Anyone got any ideas?


texts:
I'm looking to get links to the products in the customer's My Orders page.

The implementation is for adding the product review link on the "My Orders Page".

I have the following code to fetch the URL of the product using the SKU.

    <?php
       $sku = $this->htmlEscape(Mage::helper('core/string')->splitInjection($this->getSku()));
        $url = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku)->getProductUrl();
    ?>
    <a href="<?php echo $url; ?>/#add-my-review" target="_blank" class="rate-me"><?php echo $this->htmlEscape('Rate this Item') ?>

But I'm getting the following error

PHP Fatal ErrorGET /sales/order/view/order_id/20494
Call to a member function getProductUrl() on a non-object

Any thoughts on fixing this?


texts: Magento2 Using 2 different layout for 1st level vs 2nd level category

texts:
I will try to explain as best as I can. I found a few posts here but I didn't see one that explained what I wanted to do.

There are 3 different layout that I'd like to use.

First level category page (localhost:8888/equipments.html)
Specific category page (localhost:8888/equipments/solar.html)
Product detail page (localhost:8888/solar-product.html

I got #2 and #3 working but I can't figure out how to make the first level category page a different layout.

I've edited catalog_category_view.xml so that the layout="3columns"

How would I go about making the first level use a 1column layout?

Right now, I had to change the first level category page to be a regular cms page in order to use the 1 column and in order for the page to not display the layered navigation.

I hope that made sense


texts: How disable auto reindex after edit product or catalog

texts:
I have a problem when in edit catalog, product and save it. My website will reindex, that do my website run very slow. I want to disable reindex after save catalog,product

But when i created new catalog, product other. Website will reindex again

Thanks,


texts:
Is Tax included or excluded from Price in Rest API Products when backend settings:

Sales/Tax/ Catalog Prices: Including Tax (This sets whether catalog prices entered from Magento Admin include tax.)


texts: 502 bad gateway when adding a new simple product to a configurable product at a later stage

texts: i'm using magento 1.7.2 I have configurable products with simple products (not individual visible). If a product is some time in the database and new other configurable products (with simple) have been added to magento and there has to be added a new extra simple product to a older configurable product this result in a 502 bad gateway in the front site for that specific product. Is this a issue with magento or is there something else going on and if so can it be solved other then deleting the whole product and import or create it again with the extra simple product.


texts: Migrating Magento 1.9.1.1 to Magento 2 using Migration Tool error

texts:
I have been following the Magento2 developer documents http://devdocs.magento.com/guides/v2.0/migration/migration-migrate-settings.html to migrate 1.9.1.1 database to new magento2.

I am running magento in APACHE, CENTOS, AWS. Now, having trouble moving forward to migrate settings and stuck here.

I am in the folder /bin and using the command below

php ./magento migrate:settings [-r|--reset] {/var/www/html/magento2/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.1.1/config.xml}

but getting errory everytime

-bash: --reset]: command not found

[Migration\Exception]

Invalid config filename: [-r

migrate:settings [-r|--reset] config

Please put me in right direction


texts:
When I run setup:di:compile command in M2, I got this error in one of my modules.

  Extra parameters passed to parent construct: $context

File name : edit.php
Location : /app/code/Vendor/Module/Controller/Adminhtml/Attachment/Edit.php

        <?php

            namespace Vendor\Module\Controller\Adminhtml\Attachment;

            use Magento\Framework\Controller\Result\JsonFactory;

            class Edit extends \Vendor\Module\Controller\Adminhtml\Attachment{

                protected $_resultPageFactory;
                protected $_resultJsonFactory;

                public function __construct(
                    \Magento\Backend\App\Action\Context $context,
                    \Magento\Framework\View\Result\PageFactory $resultPageFactory,
                    JsonFactory $resultJsonFactory,
                    \Vendor\Module\Model\AttachmentFactory $attachmentFactory,
                    \Magento\Framework\Registry $registry
                )
                {
                    $this->_resultPageFactory = $resultPageFactory;
                    $this->_resultJsonFactory = $resultJsonFactory;
                    parent::__construct($context, $resultPageFactory, $resultJsonFactory, $attachmentFactory, $registry);
                }

Which params are extra in this code ?

Please help. My other modules are not installing due to this error.


texts: I am trying to add jQuery code in phtml file but its not working in magento 1

texts:
I am trying to add jQuery code in phtml file but it's not working in Magento 1, But it's working in console.
Please help me.
Here is my code...

<script type="text/javascript">
var $j = jQuery.noConflict();
 $j(document).ready(function($) {

    $('div.itemSubMenu.designer.level1').hide();
       $("a.itemMenuName.designer.level1").hover(function () {

            $(this).next('div.itemSubMenu.designer.level1').slideToggle('slow');

        });
    });
</script>


texts: Magento 2.3.5 - Remove Page Title Suffix for homepage

texts:
We want to remove the page title suffix for the homepage in our Magento 2.3 store.
Therefore I already created a Custom Layout Update in our theme folder with the following xml.
But that does not seem to work. What am I missing here? How can I overwrite the page title without the suffix?
XML:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
     <body>
        <reference name="head">
            <action method="setData"><key>title</key><value>Home</value></action>
        </reference>
    </body>
 </page>


texts: Magento 2: How to Override File in Vendor Folder

texts:
I installed a 3rd party PHP sdk via composer and need to override a couple files in my own module. However, I'm not quite sure what the best practice is to override these files from the vendor folder.

The 2 files I'm looking to override are located in:

vendor\quickbooks\v3-php-sdk\src\DataService\DataService.php

and

vendor\quickbooks\v3-php-sdk\src\sdk.config

Here is how the composer.json file looks:

{
"name": "quickbooks/v3-php-sdk",
"description": "The Official PHP SDK for QuickBooks Online Accounting API",
"type": "library",
"keywords": ["api", "http", "rest", "quickbooks", "smallbusiness"],
"homepage": "http://developer.intuit.com",
"require": {
    "php": ">=5.6.0"
},
"require-dev": {
    "phpunit/phpunit": "^5.7"
},
"autoload": {
    "psr-4": {
        "QuickBooksOnline\\API\\": "src/"
    }
},
"license": "Apache-2.0",
"authors": [
    {
        "name": "hlu2",
        "email": "Hao_Lu@intuit.com"
    }
]
}

My question is, how do I override these 2 files in app/code/MyCompany/MyModule/


texts: How to create custom api with parameters in magento1?

texts:
How to create custom api with multiple parameters passed in the api call file in magento1. I have added the code in request call. But it is not working.

Thanks in advance

wsdl.xml file

    <?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:typens="urn:{{var wsdl.name}}" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             name="{{var wsdl.name}}" targetNamespace="urn:{{var wsdl.name}}">
  <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
      <complexType name="testPushNotificationCreateArray">
          <complexContent>
              <restriction base="soapenc:Array">
                  <attribute ref="soapenc:arrayType" wsdl:arrayType="typens:testPushNotificationCreate[]"/>
              </restriction>
          </complexContent>
      </complexType>
       <complexType name="testPushNotificationCreate">
        <all>
          <element name="token" type="xsd:string" minOccurs="0"/>
          <element name="customer_group_id" type="xsd:string" minOccurs="0"/>
          <element name="channel" type="xsd:string" minOccurs="0"/>
        </all>
      </complexType>
    </schema>
  </types>
  <message name="dzPushnotifTokenCreateRequest">
    <part name="sessionId" type="xsd:string"/>
    <part name="data" type="typens:testPushNotificationCreate"/>
  </message>
  <message name="dzPushnotifTokenCreateResponse">
 <!--    <part name="result" type="typens:testPushNotificationCreateArray"/> -->
    <part name="result" type="xsd:int"/>
  </message>
  <portType name="{{var wsdl.handler}}PortType">
     <operation name="dzPushnotifTokenCreate">
            <documentation>TEST</documentation>
            <input message="typens:dzPushnotifTokenCreateRequest"/>
            <output message="typens:dzPushnotifTokenCreateResponse"/>
        </operation>
  </portType>
  <binding name="{{var wsdl.handler}}Binding" type="typens:{{var wsdl.handler}}PortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="dzPushnotifTokenCreate">
            <soap:operation soapAction="urn:{{var wsdl.handler}}Action"/>
            <input>
                <soap:body namespace="urn:{{var wsdl.name}}" use="encoded"
                           encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </input>
            <output>
                <soap:body namespace="urn:{{var wsdl.name}}" use="encoded"
                           encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </output>
        </operation>
  </binding>
  <service name="{{var wsdl.name}}Service">
    <port name="{{var wsdl.handler}}Port" binding="typens:{{var wsdl.handler}}Binding">
      <soap:address location="{{var wsdl.url}}" />
    </port>
  </service>
</definitions>


texts: Magento 2.2 store view switching add ___store=default to url

texts:
Preconditions:

Magento 2.2
With 2 store views ( default and en )

Steps to reproduce:

Load home page: url = myeshop.com/
Switch store view: url = myeshop.com/?___store=en
Switch again store view: url = myeshop.com/?___store=en?___store=default

Result:

There has been an error processing your request

When I set "Add Store Code to URL" to 'Yes' in Stores > Configuration > General > Web it works properly. But it is not accepted.

Previously, at 2.1.9 the url remained the same after any store view switch.

Any advice?


texts: Magento PWA Studio - That page could not be found. Please try again - for every product

texts:
I started playing with PWA Studio and installed Venia theme.
I managed to setup it, but for every product route I get "That page could not be found. Please try again.".
Data is fetched from Magento correctly.

Example of route https://magento-venia-concept-tfwxw.local.pwadev:8038/book-1.html

What could be the issue?
Thanks.


texts: how to Import category, attribute and product through API call?

texts:
I'm a web developer of a company that produce ERP software.
I would like to integrate the ERP software with Magento ecommerce solution with automatic synchronization function through API call.
I've read a lot of information about SOAP Api call but i didn't understand if that will be possible.

I read something about "createacategory" SOAP method, but nothing about attributes.

I need to create a function that can be usefull for every single client-company.

That's why i need to put all the necessary information about product through auto import method.

How can i do that? it's possible? there is a method for importing attributes?


texts:
I want to redirect my site to home page (base URL) in Controller.

$this->_redirect();

Using above mentioned function gives me the warning to specify the argument.

  Warning: Missing argument 1 for Mage_Core_Controller_Varien_Action::_redirect()

When I use the following as argument

$this->_redirect(Mage::getBaseUrl());

It just append the base url in my site url which results something like this

http://example.comhttp://example.com

Which is obviously a 404 page. Please help me to figure this out.


texts: Menu with categories and brands :Magento

texts:
How to create a navigation menu with brand(manufacturer) attribute?
Reference site is

http://www.demon-tweeks.co.uk.

Please reply guys its mega urgent and i need help .
thanks


texts: Magento statuses and states and reviews through kount/braintree (GENE)

texts:
I'm working on changing various "order states" based on their statuses in magento when they come in via kount Ens.php. I've had some success with a couple of them but I can't seem to figure out the last three.

When approved manually the state code needs to change to processing
instead of payment_review.
When declined maually the state code needs to change to holded
instead of payment_review.
When auto declined the state code needs to changed to canceled
    instead of payment_review.

Here's what I have currently:

/**
 * Approve an order from Kount
 *
 * @param \Mage_Sales_Model_Order $order
 *
 * @return bool
 */
protected function _approveOrder(Mage_Sales_Model_Order $order)
{
    // Ensure the status has not moved from it's payment review state
    if ($order->getStatus() == Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW) {

        // Inform the system that this update is occurring from an ENS update
        Mage::register('kount_ens_update', true);

        try {
            $order->setStatus("fraud_cleared");
            $order->save();
        } catch (Exception $e) {
            Gene_Braintree_Model_Debug::log('Accept Kount transaction failed to be accepted in Magento: ' . $e->getMessage());
            Gene_Braintree_Model_Debug::log($e);
            return false;
        }

        Mage::unregister('kount_ens_update');
        $order->addStatusHistoryComment('Order approved through Kount.')->save();
        return true;
    }

    return false;
}

/**
 * Decline an order in Magento
 *
 * If the payment is only voidable, we void the invoice cancelling the order. If the payment has settled we create
 * a credit memo and close the order that way.
 *
 * @param \Mage_Sales_Model_Order $order
 *
 * @return bool
 */
protected function _declineOrder(Mage_Sales_Model_Order $order)
{
    // Ensure the status has not moved from it's payment review state
    if ($order->getStatus() == Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW) {

        // Inform the system that this update is occurring from an ENS update
        Mage::register('kount_ens_update', true);
        try {
            $order->setState(Mage_Sales_Model_Order::STATE_HOLDED, "suspected_fraud_after_review");
            $order->save();
        } catch (Exception $e) {
            Gene_Braintree_Model_Debug::log('Declined Kount transaction failed to be declined in Magento: ' . $e->getMessage());
            Gene_Braintree_Model_Debug::log($e);
            return false;
        }

    }

    return false;
}

Here's some things i'm working on to fix:

try {
                $order->setStatus("fraud_cleared")
                    ->setState(Mage_Sales_Model_Order::STATE_PROCESSING)
                    ->save();
            } catch (Exception $e) {
                Gene_Braintree_Model_Debug::log('Accept Kount transaction failed to be accepted in Magento: ' . $e->getMessage());
                Gene_Braintree_Model_Debug::log($e);
                return false;
            }


texts: How to get Product name in phtml file in magento2

texts:
I want to get Product name in Phtml file and i checked this three collection but in that there are no product name available.

$productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
$productPrice = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
$productimageCollection = $objectManager->create('Magento\Catalog\Api\ProductRepositoryInterfaceFactory');


texts:
I am migrating Magento 1.9.4.5 to Magento 2.3.3.
I have followed all the mentioned steps to install and configure Data Migration tool as per the instruction in https://devdocs.magento.com/guides/v2.4/migration/migration-tool-install.html.
I have successfully migrated Settings but while migrating data, i got the error
In ClassReader.php line 19:
   Class Migration\Handler\CleanMultiselect does not exist

and Migration stopped. Check the screenshot attached
I checked and found all the customers, Categories and Products are migrated but orders are not there.
I am unable to fix this issue. Can anyone help me for the same


texts: Change title of payment method programmatically

texts:
I need to change the title of my custom payment gateway programmaticaly based on some conditions.
How to do it I could not figure out? I tried to capture paymentfilter_payment_method_is_active event but that event did not have anything related to title.


texts:
I am using "Magento EE". I have a problem here: "If someone buys two products, they should get 10% of the total amount added to his account for use on the next order"

Condition is here:- Buy any two products & you get 10% amount credit in your account. Please tell me the condition I should setup in the shopping cart rule.

Is there a [free] third part module to credit amount in customer account?


texts:
I need to add several different flat rate shipping methods to Magento. First, I need a way to offer flat rates for standard and express shipping methods (carrier independent). Secondly, I need to charge a flat handling fee per-item, with the option to charge an extra fee per each additional item.

For example, I want to charge a customer $1 for standard shipping on an order. Then I want to tack on a $10 handling fee for specific items, and $5 for each additional specific item - let's say the item is a jar of jellybeans.

If a customer orders a candy bar and two jars of jellybeans, I want to charge $1 for standard flat-rate shipping, plus $10 for the first jar and $5 for the other jar. So the total shipping and handling charge would be $16.

(Sorry, I know this may sound confusing.)

Can anyone please tell me how I can achieve this in Magento, or recommend an extension that will help me with this?

Thanks!


texts: I would like to remove the login pop up from the checkout(Magento 2)

texts:
I would like to  remove the login pop up from the checkout:
The login appears on the checkout page(like this)
I wanna remove this option from the checkout page.
What is the best way to achieve this?


texts: Magento 2.3.0: product with quotation mark crashing

texts:
I'm trying to upgrade from Magento 2.2.6 to 2.3.0.

I have the two instances side by side running the same data, and in 2.3.0 my javascript is failing on products with double quotes (") in their titles.

The javascript error I'm getting is:

  Uncaught SyntaxError: Unexpected token S in JSON at position 80
      at JSON.parse ()

The error is behind enough anonymous functions that I can't seem to trace it back any further, but it's definitely only products with " marks in their titles.

Additionally the product page doesn't load any further: no picture, no dropdowns, no descriptions.

Removing the quotes is not an option because there are lots of products with quotes and because it works in 2.2.6 just fine. Some change in 2.3.0 regressed and introduced this issue.

Thanks in advance!


texts: Magento: Display Inventory Levels, filtered by category

texts:
Looking at this page and code snippet to display qty on hand on a product page, I'd like to apply this to only certain categories - effectively filter this code snippet by category ID.

http://www.woolleydesign.net/2012/06/magento-show-inventory-levels-on-product-pages/
http://www.woolleydesign.net/wp-content/uploads/downloads/2012/06/default.txt


texts: How to Access Protected Data in Magento Object

texts:
I want to pull the file location of a user's upload through a Magento observer, but I can't seem to break into some protected data in this output:

[_product:protected] => Mage_Catalog_Model_Product Object
 *RECURSION*
                                                                    [_eventPrefix:protected] => core_abstract
                                                                    [_eventObject:protected] => object
                                                                    [_resourceName:protected] => sales/quote_item_option
                                                                    [_resource:protected] =>
                                                                    [_resourceCollectionName:protected] => sales/quote_item_option_collection
                                                                    [_cacheTag:protected] =>
                                                                    [_dataSaveAllowed:protected] => 1
                                                                    [_isObjectNew:protected] =>
                                                                    [_data:protected] => Array
                                                                        (
                                                                            [option_id] => 203
                                                                            [item_id] => 71
                                                                            [product_id] => 3
                                                                            [code] => option_3
                                                                            [value] => a:9:{s:4:"type";s:24:"application/octet-stream";s:5:"title";s:19:"EatingBreakfast.jpg";s:10:"quote_path";s:68:"\media\custom_options\quote\E\a\9884fbc76ede5ddb9ef991b83c17f8ae.jpg";s:10:"order_path";s:68:"\media\custom_options\order\E\a\9884fbc76ede5ddb9ef991b83c17f8ae.jpg";s:8:"fullpath";s:93:"D:\Our Files\Web\lifewall\media\custom_options\quote\E\a\9884fbc76ede5ddb9ef991b83c17f8ae.jpg";s:4:"size";s:7:"8050795";s:5:"width";i:3000;s:6:"height";i:3997;s:10:"secret_key";s:20:"9884fbc76ede5ddb9ef9";}
                                                                            [product] => Mage_Catalog_Model_Product Object

I'm stumped and frustrated. Just want that URL (for the .jpg file). Thoughts?


texts: Magento 1.9 duplicate images being saved

texts:
I am updating product's attributes and images through program. The problem is that, it is adding new images everytime and appending _1 or _1_1 to the file. Hence a lot of duplicate files in the drive.

I searched in the forum for the solution. They say not to save the product twice. You can see below code that I have a function downloadAndImportImage() that adds images and later on I save the product.

What am I missing ? Thanks in advance.

function downloadAndImportImage($image_url, $_product, $num, $sku){

    try{
        .
        .
        .

        if (file_exists($filepath_to_image)) {
            $_product->addImageToMediaGallery($filepath_to_image, array('image', 'small_image', 'thumbnail'), false, false);

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

function updateProduct(){
...
if($record[14]){
    if ($record[14] != $record[13]){
       downloadAndImportImage($record[14], $_product, 14, $record[0]);
   }
}
if($record[15]){
   if ($record[14] != $record[15]){
      downloadAndImportImage($record[15], $_product, 15, $record[0]);
 }
}

$_product->save();

}


texts:
I am using Magento 2.1.0, and i am trying to create tab on frontend by using knockout js. i checked so many tutorial, in which one i refer

http://jsfiddle.net/NLGm8/32/

I created Phtml file

<div id="block-priscription-requested" data-bind="scope:'tab-prereq'" class="block">

<!-- ko template: getTemplate() --><!-- /ko -->

<script type="text/x-magento-init">

{

    "#block-priscription-requested": {

        "Magento_Ui/js/core/app": <?php /* @escapeNotVerified */ echo $block->getJsLayout();?>

    }

}

and Layout file:

<body>
    <referenceContainer name="content">
        <block class="XXXX\XXX\Block\Index" name="doctor.index" template="XXXX_XXX::index.phtml">
            <arguments>

                <argument name="jsLayout" xsi:type="array">

                    <item name="components" xsi:type="array">

                        <item name="tab-prereq" xsi:type="array">

                            <item name="component" xsi:type="string">XXXX_XXXXX/js/view/prereq</item>

                        </item>

                    </item>

                </argument>

            </arguments>

        </block>

    </referenceContainer>
</body>

js code:

define(
[
    'jquery',
    'ko',
    'uiComponent',
],
function ($, ko, component) {
    "use strict";

ko.bindingHandlers.jqTabs = {
init: function(element, valueAccessor) {
    var options = valueAccessor() || {};
    setTimeout( function() { $(element).tabs(options); }, 0);
}
  };

    function Tab(id, title, titleTmpl, content, contentTmpl) {
 return {
    id: ko.observable(id),
    titleData: ko.observable(title),
    titleTmpl: titleTmpl,
    contentData: ko.observable(content),
    contentTmpl: contentTmpl
};
        }

       var viewModel = {
tabs: ko.observableArray([
    new Tab(1,
            { name: "one", date: new Date() },
            "normalTitleTmpl",
            { content: "one content", date: new Date() } ,
            "normalContentTmpl"),
    new Tab(2,
            { name: "two", special: "special title!" },
            "specialTitleTmpl",
            { content: "two content", date: new Date() } ,
            "normalContentTmpl"),
    new Tab(3,
            { name: "three", date: new Date() },
            "normalTitleTmpl",
            { content: "three content", special: "special content" } ,
            "specialContentTmpl")
])
    };

ko.applyBindings(viewModel);

But on frontend nothing is showing.


texts: Website is not redirecting to respective domain name

texts:
When the site (only database not the full theme) is migrated to hosting environment(Nexcess) and even after changing the base urls in the core_config_data the site is not available. It is displaying error like The page isn’t working.

Note: when I give some other domain name in the core_config_data it is finely redirecting with respect to the provided domain name. Only one particular url is not working and displaying error.

So is there anything that should be done at the admin panel after moving the site to hosting environment? Or is there anything I should do additionally to redirect to my site's link?


texts:
All I want to do is allow a discount if someone buys 2 of these products.

If they just buy one it is full price.

I thought this would be easy and set up a Price Rule that says:

 If ALL  of these conditions are TRUE :

 If total quantity  is  2  for a subselection of items in cart matching ANY  of these conditions:
     SKU  is one of...

and then I added all of the products I wanted this to work for.

The Price Rule works if I add two DIFFERENT products from this small group to the Cart and the discount applies. But if I add two of the same product (with same SKUs) this doesn't work.


texts: Not seeing changes made to page.xml or local.xml

texts:
I don't understand what's going on here. I have a theme in:

app\design\frontend\THEME_NAME\default\layout

I've tried adding a JS files to both page.xml and local.xml but when I refresh the page I cannot see the file I've added.

In fact, no changes to the page.xml or local.xml files are being reflected when I refresh the page. I can see other JS files being added, and even if I change those then the changes aren't being seen in the source code.

What could be possibly going wrong?


texts: Password Access by storeview and different price

texts:
i have few store-view, i want for my second Exclusive store-view add access with password, and then add different price by products

Let me know how i can do better?

Thanks


texts: Magento 2 : How to add custom zipcode field in braintree payment form and send in payment request?

texts:
I want to add a custom input field in the Braintree payment method form and send that field value to Braintree, for validate on Braintree side. How can I achieve this?

I want the input field for zip code and it should be required and it should be sent to Braintree when we click on the "Place Order" button.

Does anyone have any idea? please share.


texts: I want to add time (hh:mm:ss) picker to admin system config using system.xml file. Is this possible to do?


texts:
I have an AWS EC2 server and some users are getting an email, some users are not.

I have my DNS records setup from Amazon SES.

I can confirm SMTP is working (Also since I get all my emails!)

$ openssl s_client -crlf -quiet -starttls smtp -connect email-smtp.us-east-1.amazonaws.com:587
depth=4 C = US, O = "Starfield Technologies, Inc.", OU = Starfield Class 2 Certification Authority
verify return:1
depth=3 C = US, ST = Arizona, L = Scottsdale, O = "Starfield Technologies, Inc.", CN = Starfield Services Root Certificate Authority - G2
verify return:1
depth=2 C = US, O = Amazon, CN = Amazon Root CA 1
verify return:1
depth=1 C = US, O = Amazon, OU = Server CA 1B, CN = Amazon
verify return:1
depth=0 CN = email-smtp.us-east-1.amazonaws.com
verify return:1
250 Ok


texts:
I am working on magento 2.3.0

When I try to edit a cms page on the admin, the content section is blank, with console error that tinymce is missing or 404. please see attached screenshots.


texts: Where can I change the "add to cart" text on product page?

texts: Where can I change the "Add to cart" or in German "Zum Warenkorb hinzufügen" Text on the product page? Where is that template file and where do i need to copy it in my custom theme?


texts:
I work with blog extension that has it's own layout file. I need to insert my own block inside blog post.

My problem is that if I try to reference post block in my own xml file it doesn't work and getChildHtml returns nothing.

Here is my xml code that adds my block:

<blog_post_view>
...
<reference name="post">
    <block type="core/text" name="test">
        <action method="setText"><text>Hola!</text></action>
    </block>
</reference>
...
</blog_post_view>

If I add this block directly into extension's layout file:

<blog_post_view>
...
<reference name="content">
...
    <block type="blog/post" name="post" template="blog/post.phtml">
        <block type="core/text" name="test">
            <action method="setText"><text>Hola!</text></action>
        </block>
    </block>
</reference>
...
</blog_post_view>

It works properly, getChildHtml returns text block content.

If I add <remove name="post" /> to my own xml it removes post, so my xml file works and the name is correct.

What else can prevent reference from working?

I'm using Magento CE 1.9.1.


texts: Getting Maximum function nesting level error in magento 1.8

texts:
I m stuck with

  Fatal error: Maximum function nesting level of '400'reached

in magento version 1.8.0.0. When i recalculate total in sales_quote_collect_totals_after event.The code of observer is as below

public function recalculateTotal($observer){
 $quote=$observer->getEvent()->getQuote();
 $quote->setTotalsCollectedFlag(false);
 $quote->getShippingAddress()->unsetData('cached_items_all');
 $quote->getShippingAddress()->unsetData('cached_items_nominal');
 $quote->getShippingAddress()->unsetData('cached_items_nonnominal');
 $quote->collectTotals();

}

and the same error occur when i submit my custom form.but if i change form method POST to GET it works fine.

I can't understand what's going inside it.Please can somebody get out from it.


texts: how do use UrlRewrite for Custom module in magento2?

texts:
I have custom a module.
When I do getUrl, it shows:

http://localhost/magento2_beta/index.php/faq/category/view/tags/abc/

So I want an url like: http://localhost/magento2_beta/tag.phtml

How to do it?


texts: how to auto fill tracking number in create shipment page in magento 2

texts:
I want to auto fill in carrier info like name, title, number by using call REST or updating code in module.

I tried to update code in module like this

$order = $this->_objectManager->create('Magento\Sales\Model\Order')
->load('1');

// Check if order can be shipped or has already shipped
if (! $order->canShip()) {
    throw new \Magento\Framework\Exception\LocalizedException(
                    __('You can\'t create an shipment.')
                );
}

// Initialize the order shipment object
$convertOrder = $this->_objectManager-
>create('Magento\Sales\Model\Convert\Order');
$shipment = $convertOrder->toShipment($order);

// Loop through order items
foreach ($order->getAllItems() AS $orderItem) {
    // Check if order item has qty to ship or is virtual
    if (! $orderItem->getQtyToShip() || $orderItem->getIsVirtual()) {
        continue;
    }

    $qtyShipped = $orderItem->getQtyToShip();

    // Create shipment item with qty
    $shipmentItem = $convertOrder->itemToShipmentItem($orderItem)-
>setQty($qtyShipped);

    // Add shipment item to shipment
    $shipment->addItem($shipmentItem);
}

// Register shipment
$shipment->register();

$shipment->getOrder()->setIsInProcess(true);

try {
    // Save created shipment and order
    $shipment->save();
    $shipment->getOrder()->save();

    // Send email
    $this->_objectManager->create('Magento\Shipping\Model\ShipmentNotifier')
        ->notify($shipment);

    $shipment->save();
} catch (\Exception $e) {
    throw new \Magento\Framework\Exception\LocalizedException(
                    __($e->getMessage())
            );
}

But after run this code, it will create shipment and insert data into database.

I just want to populate carrier info before create shipment in GUI.

Anyone please help me?


texts:
we bought magento extension for uploading the products through excel sheet.

we are uploading Products using csv file. now uploading speed is too much less.

I am trying this query to increase upload speed of the upload :

TRUNCATE log_url; TRUNCATE log_url_info; TRUNCATE log_visitor;
 TRUNCATE log_visitor_info;  TRUNCATE dataflow_batch_import;
 TRUNCATE dataflow_batch_export; TRUNCATE index_event;
 TRUNCATE report_event;

but i am getting this error :

#1701 - Cannot truncate a table referenced in a foreign key constraint
(`database`.`index_process_event`, CONSTRAINT
 `FK_INDEX_PROCESS_EVENT_EVENT_ID_INDEX_EVENT_EVENT_ID` FOREIGN KEY
 (`event_id`) REFERENCES `database`.`index_event` (`event_id`))


texts:
I loaded up our site to take a look at it but it is coming up blank. I made some modifications the the index.php file to show the error and this is what I've received:

Fatal error: Method Varien_Object::__tostring() cannot take arguments in /chroot/home/vpwindow/[domain name]/html/lib/Varien/Object.php on line 488

I'm not sure what to do from here. Any help would be great!


texts: Quick simple product creation autogenerate title for both store view?

texts: Is there any way to make auto create the name of the simple products when using the quick create feature for both store view?


texts: How to get image and price in shipping email template in Magento2.3?

texts:
How to get product image and price in shipping email template.

For image i add a code in shipping/default.phtml

<?php
$productId = $_item->getProductId();
$objectManagerHere = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManagerHere->get('Magento\Catalog\Model\Product')->load($productId);
$productImage = $this->helper('Magento\Catalog\Helper\Image')->init($product, 'category_page_list')->getUrl();
?>

    <img height="80" width="80" src="<?= $productImage ?>" alt="<?= __('Product Image');?>">

but i get's only placeholder image


texts:
I am developing my custom module. I have the html template look like this

  This is a text that I need to translate

Read more: google.com

How can I translate these nested texts? I know how to use i18n to translate but I don't know how to translate the text in
 tag that has  tag in the middle
I used this but not work

{{trans "This is a"}} {{trans "text that I need to translate."}}

I can do this and it works but I really don't like the extra span tag

NOTE: My file is the js component template so it's HTML. It is not phtml file


texts: how to add multiple rules for a pincode in table rates

texts:
I want to add multiple rules for a pincode . for eg:

if the

Order Subtotal (and above) is 10,0000   then the Shipping Price will be 0

and

if the

Order Subtotal is less than 1000 then the Shipping Price will be 100

for the

pincode 673302 , how can i apply these rules in table rates or how i apply

multiple rules ?

Now my table rate csv is this , is there any workarounds , can i add

cityname too in the table rates ,so that i can change shipping rate

according to cities ?


texts: Attribute is not loaded on Product_List and Layered Navigation

texts:
I have a development system, here is everything working as expected. And I have a staging system, here the attribute is not loaded. It feels like, the sytem don't know, that the attribute doesn't exist in the store/attribute_set/...?

I have an attribute artist_id and this attribute is not loaded.

The collections are initialized with the attribute:

if (!is_null($this->_productCollection)) {
    return $this->_productCollection;
}
$collection = parent::_getProductCollection();
$collection->addAttributeToSelect('artist_id');

I checked wether the attribute is in the collection and it is:

[_selectAttributes:protected] => Array
    (
        [name] => 71
        [short_description] => 73
        [price] => 75
        [special_price] => 76
        [special_from_date] => 77
        [special_to_date] => 78
        [small_image] => 86
        [thumbnail] => 87
        [news_from_date] => 93
        [news_to_date] => 94
        [status] => 96
        [url_key] => 97
        [required_options] => 110
        [image_label] => 112
        [small_image_label] => 113
        [thumbnail_label] => 114
        [msrp_enabled] => 118
        [msrp_display_actual_price_type] => 119
        [msrp] => 120
        [tax_class_id] => 122
        [price_type] => 124
        [weight_type] => 126
        [price_view] => 127
        [shipment_type] => 128
        [links_purchased_separately] => 129
        [links_exist] => 132
        [artist_id] => 146
    )

But when I try to get $_product->getArtistId() there is no id.

Debugging on this system is really hard. I tried to find the part where the query is built but didn't find it yet.

UPDATE: Flat tables are OFF.

And now the bad part:
A little

<?php $_product->load($_product->getId()); ?>

in the foreach of the product/list.phtml fixes the problem ;-)

To be honest: I think I broke something in the database while changing settings directy in the tables.

Is there any connection between attributes and stores?
Any ideas on this problem?


texts: Getting "Command line user does not have read and write permissions on var/generation directory" when trying to access php bin/magento

texts:
Trying to get a basic grasp of ssh and cli on Magento 2.1 to "easily" install themes and extensions, but I'm dead in the water from the get go.  I have a working version of 2.1 running on a VPS.

Ran into this error and can't find how to address it before using the Magento Command line.

When trying to access php bin/magento

Any help would be appreciated.


texts: Magento display tiered pricing for each product on cart page

texts:
I am having an issue getting the tierPriceHtml to display for each item on the cart page.

This is what I have inside checkout/cart/item/default.phtml:

$custom = Mage::getModel('catalog/product')->load($_item->getProductId());
$tierPrice = $custom->getTierPriceHtml();
echo $tierPrice;

However this will not echo out anything. I also tried this with no luck:

echo $this->getTierPriceHtml()

How can I do this? Should I do something to modify the checkout.xml file in order to display it?

Here is my entire checkout/cart/item/default.phtml file:

http://pastebin.com/4wK2P9zU


texts: Magento 2 CMS Page getList() repository methods does not return expected object

texts:
I need to delete all CMS pages.

Here is the code:

namespace Soon\Core\Setup;

use Magento\Cms\Api\PageRepositoryInterface;
use Magento\Framework\Api\SearchCriteriaInterface;

class Cms
{
    /**
     * @var SearchCriteriaInterface
     */
    private $searchCriteria;
    /**
     * @var PageRepositoryInterface
     */
    private $cmsPageRepository;

    /**
     * Cms constructor.
     * @param SearchCriteriaInterface $searchCriteria
     * @param PageRepositoryInterface $cmsPageRepository
     */
    public function __construct(
        SearchCriteriaInterface $searchCriteria,
        PageRepositoryInterface $cmsPageRepository
    )
    {
        $this->searchCriteria = $searchCriteria;
        $this->cmsPageRepository = $cmsPageRepository;
    }

    /**
     * Delete all existing CMS pages
     */
    public function cleanCmsPages()
    {
        $cmsPageCollection = $this->cmsPageRepository
            ->getList($this->searchCriteria)
            ->getItems();

        foreach ($cmsPageCollection as $cmsPage) {
            $this->cmsPageRepository->delete($cmsPage);
        }
    }
}

So, calling \Soon\Core\Setup\Cms::cleanCmsPages should delete all CMS pages.

But when doing so, I get this error:

Argument 1 passed to Magento\Cms\Model\PageRepository::delete() must implement interface Magento\Cms\Api\Data\PageInterface, array given

So I dumped the $cmsPage used in my foreach ($cmsPageCollection as $cmsPage) and it appears that, indeed, $cmsPage is an array.

I digged into the code:

\Magento\Cms\Api\PageRepositoryInterface::getList is implemented by \Magento\Cms\Model\PageRepository::getList.

Then in \Magento\Cms\Model\PageRepository::getList, we can see this bit of code:

            $pages[] = $this->dataObjectProcessor->buildOutputDataArray(
                $pageData,
                'Magento\Cms\Api\Data\PageInterface'
            );
        }
        $searchResults->setItems($pages);

If I am correct, this code creates an array that populates the $pages array.
So this code may explain why $cmsPage is an array!

BUT...

By reading @return statement of \Magento\Cms\Api\PageRepositoryInterface::getList, we can see @return \Magento\Cms\Api\Data\PageSearchResultsInterface.

And, then by reading the @return statement from \Magento\Cms\Api\Data\PageSearchResultsInterface::getItems, we can see \Magento\Cms\Api\Data\PageInterface[]!

So the $cmsPage in my foreach loop should be an implementation of \Magento\Cms\Api\Data\PageInterface which then can be passed properly to \Magento\Cms\Api\PageRepositoryInterface::delete.

Who's wrong?

Me who cannot read / understand @api comments and code properly
Magento who whether does not give the right comment in their @api classes... or does not implements the interface as it should.

This analysis is for the CMS Page API but also applies to the CMS Block API.


texts: Help make a condition involving an array

texts:
I have data from the server: $this->getConfigData('groups') = "1,5,9,10"
I need to make a condition, if one of these id matches the id from the custom group of the current user, then continue, if not, then deny.
I tried this approach, but it doesn't work, tell me how you can implement this logic
$customerGroup = $this->_customerSession->getCustomer()->getGroupId(); -> 1
$array_key = array_keys((array)$this->getConfigData('groups'));        -> {0}[1]
if(!in_array($customerGroup, $array_key)){
    return false;
}


texts: PageSpeed Insights "Leverage browser caching" Google Analytics

texts:
I'm trying to get my load times down using Google PageSpeed Insights as one of my tools. I noticed that there are 2 files that it keeps complaining about:

  Leverage browser caching

  Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.

https://apis.google.com/js/api.js (30 minutes)

https://ssl.google-analytics.com/ga.js (2 hours)

I'm assuming that the above files are referenced as part of the default Magento package and looking around the admin panel I can only find where to put my analytics code.

Where do I go or which file do I need to modify to extend the expiry of the above files?


texts:
Position need to change of  top menu after the search bar in magento2.

Can any one help me?


texts: Could Magento share the only available database with wordpress when the two are hosted with different domains?

texts:
In godaddy, I am trying to install magento corresponding to my main domain www.shoppox.com and simultaneously wordpress corresponding to my subdomain blog.shoppox.com.

Could I do this if I have already purchased a hosting plan with single database because each one is requiring a separate database ?

Please suggest a way out (I don't want to spend more in upgrading my hosting plan).


texts: Magento 2 - Use RequireJS in custom module within adminhtml

texts:
Apologies if this has been asked and answered already.

My objective is to create a Magento 2 custom module that adds a character counter to the edit product page within the Magento 2 Admin. I want to do this by hooking in to RequireJS and add the character counter to the Meta Title and Meta Description fields. I am assuming I have to hook in to RequireJS so that I can access the meta title and description fields. If this is not the way to target those fields and add JavaScript to it, can you recommend how to do this?

With my attempt, I keep getting the "Mismatched anonymous define() module" error.

In my module's view/adminhtml/layout/default.xml file, I have the following set:

<?xml version="1.0"?>
<page
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    layout="admin-1column"
    xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <head>
        <link src="LinkDigital_CustomInjections::js/metaCounterCode.js"/>
    </head>
    <body/>
</page>

In my module's requirejs-config.js file, I have the following:

var config = {
    map: {
        '*': {
            metaCounter: 'LinkDigital_CustomInjections/js/metaCounterCode'
        }
    },
    deps: ["jquery"]
};

In my module's view/adminhtml/web/js/metaCounterCode.js file, I have the following:

function textCounter( field, countfield, maxlimit ) {
       if ( field.value.length > maxlimit ) {
          field.value = field.value.substring( 0, maxlimit );
          field.blur();
          field.focus();
          return false;
       } else {
          countfield.value = maxlimit - field.value.length;
       }
  }
define(["jquery"],function($){
  //Target meta title and description fields under "Search Engine Optimization" section

});


texts: How to add a title to sidebar in Magento 2?

texts:
I have moved my navigation menu to the sidebar by using
<move element="catalog.topnav" destination="sidebar.main" before="catalog.leftnav"/>

I wonder if I can add a title to it?
Right now, it looks like this and I want to add "Categories" on top of the menu:
I wonder if I can add this.


texts: REST API is deprecated for versions v2.1 and higher (12)

texts:
In the last days i got this error on my magento.
Problems are on my checkout/onepage that returning to cart instead of success.

I saw that it can be a facebook problem with the upgrade (after 7th aug 2016) but I have disabled all extensions that uses API.


texts: Magento 2 re-index clearing catalogsearch_fulltext_scope1 table

texts:
Every time I re-index the table catalogsearch_fulltext_scope1 gets emptied. Since the table is empty we're unable to search product names or descriptions on the front end. All search results come up with no results.

If we use advanced search SKU and custom Attributes work.

If I add a manual entry into catalogsearch_fulltext_scope1 then it is searchable. As soon as the site is re-indexed it empties the table.

The server did crash (due to host having issues) and it's been happening every since.

No errors running re-index and no errors in any of the logs.

As far as Magento is concerned it thinks it's all working, but something is stopping the catalogsearch_fulltext_scope1 table from filling up with entries.

Which means search on the front end doesn't work at all. It's strange that SKU still works in advanced search.

Products are all showing correctly in their categories both front end and back end. Adding new products and editing existing products are all updating correctly as well - it's just the search.

Has anybody faced this issue before?

Magento 2.2.1, 600 odd products, MariaDB, standard MySQL search

Everything was working fine pre-crash.


texts: What is the fastest way to retrieve the product collection - Magento 2?

texts:
I want to get the product collection to the home page for different sections.

Method 1

Assign the product into a category and get the category collection.

Method 2

Assign the product into attribute and sort the collection by attribute.

What is the fastest way to collect the data in Magento 2?


texts:
I have Magento 2 installed on ubuntu 16.04 with nginx webserver. The site is working pretty good, then i try to enable whole site SSL from letsencrypt and I run into problems.

my root dir is /var/www/html with the magento install directly in there

I change the settings in magento so the secure url is https://example.com/ and I set nginx up as per https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04.

In sites-enabled i have

upstream fastcgi_backend {
        server  unix:/run/php/php7.0-fpm.sock; }  server {

        listen 80;
        server_name www.sxcmarket.com;
        set $MAGE_ROOT /var/www/html;
        set $MAGE_MODE developer;
        include /var/www/html/nginx.conf.sample;  }

When I do nginx -t it shows no problems. Then when i try to go to either www.example.com or example.com i get 403 error

when i check the nginx/error.log I get the following

  2016/10/10 06:12:23 [error] 8335#8335: *11 directory index of
  "/var/www/html/" is forbidden, client: xxx.xxx.xxx.xxx, server: _,
  request: "GET / HTTP/2.0", host: "example.com"

Ive tried a number of different SSL setups and get the same result each time


texts: Magento 2 add background image in custom theme

texts:
I have extended Magento blank theme and placed _theme.less in css/source folder of my theme.

I want to add background image. So I added this code in _theme.less.

@page__background-image:"url('@{baseDir}images/index.jpg')";
@sidebar__background-color: @color-gray40;

My image is in web/images folder. Sidebar color changes but background image does not appear.

What can be issue?


texts: Layered Navigation on Custom Product Collection Page

texts:
I am developing module "Shop By Brand". So on the Brand details page it's displaying Brand details with Product Collection related to brand. All things are working except "Layered" navigation.

I have added "Layered Navigation" by XML file.

<referenceContainer name="sidebar.main">
    <block class="Magento\LayeredNavigation\Block\Navigation\Category" name="catalog.leftnav" before="-" template="layer/view.phtml">
        <block class="Magento\LayeredNavigation\Block\Navigation\State" name="catalog.navigation.state" as="state" />
        <block class="Magento\LayeredNavigation\Block\Navigation\FilterRenderer" name="catalog.navigation.renderer" as="renderer" template="layer/filter.phtml"/>
    </block>
</referenceContainer>

Layered Navigation is displaying there with all the filterable options but not working properly. It's displaying filters according to "Default Category", not according to current brand.

Please provide some solution or help.


texts: EcomDev_PHPUnit displaying errors after setup

texts:
I have set up EcomDevs' Magento testing solution using this manual. I have found it a bit of a struggle to get everything that I need to work, so when I ran phpunit in the root of my project and it returned

  FAILURES!
  Tests: 32, Assertions: 43, Failures: 14.

along with all the details of those failures I have been left wondering have I set it up incorrectly or is it areas that the framework is not able to test? I cant find anything online about this problem, so i'm guessing i've done something wrong.

Looking through the list of problems they all seem very similar (install and upgrade arrays are the only area that are failing, example below):

14)     EcomDev_PHPUnitTest_Test_Lib_Constraint_Config_Resource_Script::testGetVersionScriptsDiff with data set "to_1.0.5_one_invalid" ('directory_one_invalid', 'scheme', NULL, '1.0.5')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
 'expected' => Array (
-        0 => 'install-1.0.0.php'
-        1 => 'upgrade-1.0.0-1.0.1.php'
-        2 => 'upgrade-1.0.1-1.0.5.php'
+        0 => 'install-1.0.5.php'
 )
 'actual' => Array (
-        0 => 'upgrade-1.0.0-1.0.1.php'
 )
)

/Users/myName/Sites/magentoDevTest/app/code/community/EcomDev/PHPUnitTest/Test/Lib/Constraint/Config/Resource/Script.php:82
/usr/local/Cellar/phpunit/3.7.28/libexec/phpunit-3.7.28.phar:614

Obviously I dont want to ignore failures, so how do I resolve this issue?

===EDIT===

I found the cause of my problem by reviewing this link (don't know how i missed it)

installation (step 4)

  If it shows that there was no tests found, it means that extension was successfully installed. If it shows some errors, then it means, that your customizations has install scripts that relay on your current database data and you should fix them. Or use your dev database as a base for the tests, but prior first time running the suite.

After reading this I

deactivated all custom modules (unsuccessful)
re-copied the dev db and applies it for the test db (incase of any errors) (unsuccessful)
tried to use the dev db for my tests (returns: "Test DB cannot be the same as the live one. You can change this option by running ecomdev-phpunit.php with magento-config action")(unsuccessful and can only find a reference to magento-config, but can't find the action in any file)
set my site to the testdb and applied the devdb in local.xml.phpunit and the same failures returned

I am now out of ideas


texts: after using varnish and nginx ssl termination, all the online customer ip changed to 127.0.0.1

texts:
after using varnish and use Nginx SSL termination for varnish, today I found that all the online customer IP changed to 127.0.0.1

Apache2 8080 port

Varnish 80 port

Nginx 443 port

location / {
proxy_pass            http://127.0.0.1;
proxy_read_timeout    90;
proxy_connect_timeout 90;
proxy_redirect        off;

proxy_set_header      X-Real-IP $remote_addr;
proxy_set_header      X-Forwarded-For $remote_addr;
proxy_set_header      X-Forwarded-Proto https;
proxy_set_header      X-Forwarded-Port 443;
proxy_set_header      Host $host;
proxy_set_header X-Nginx on;
proxy_redirect     off;

extension: Turpentine for Varnish

Magento set both secure and unsecured URL to "https://"

how to fix this problem, I want to show the original IP of the customer


texts: Product is available to buy in increments of x

texts:
In Magento 1.x, a pop up used to appear when the shopping cart did not contain the correct quantity increment according to the inventory setting in the backend.

In M2, I do not see that message.
Instead, there is only a hardly noticable red-frame around the Qty block.

Is there a back-end setting that should generate the quantity increment error message in case the shopping cart quantity does not match the backend increment setting?


texts: Magento 2 Import - General system exception

texts:
I try to import customer data into Magento2 which got exported from a Magento2 store, but something wont work...

Since its a 1:1 Magento export, the import should be perfectly fine or am I wrong about this ?

Once i check within Magento if the import-file is valid it tells me it is valid but after the import statup i get the "General system exception happened" and the import stops as shown in the image below:

So, how to fix this issue ?

What do i do wrong ?

Thanks in advance,


texts: Magento - Custom Product Information at the session

texts:
I'm trying to set a custom information for the product on the Catalog (product detail page) and retrieve this information at the checkout. Note: I need to associate with the specific product so I can get the information for every product at the cart.

At the product page I'm using this logic:

$_product  =  Mage::Registry('current_product');
$customInfo =  "teste 123";
$_product   -> setData('seller', $customInfo );

And to retrieve the information at the cart page, I'm using this logic:

$cart = Mage::getModel('checkout/cart')->getQuote();
foreach ($cart->getAllItems() as $item) {
     $customInfo = $item->getProduct()->getData('seller');
}

The logic is not working.

What is the best way to associate specific values for specific products during the user session and retrieve this information?

Thx


texts: Magento2: Minicart is full while Cart is Empty

texts:
A lot of our customers are complaining that they add stuff to the cart & then when they proceed to checkout they are redirected to an empty cart.
We thought that it might be a result of too short session time, so we tried increasing the cookie/session lifetime to 86400 (on both admin & server).
After that, I tried to reproduce the problem & managed to achieve the weird behavior as you can see on the attached screenshot.
I added products to cart, came back after about 20-30 minutes & saw my items in the minicart. then I proceeded to checkout & it redirected me to this empty cart while the minicart is still showing my items (refreshing the page also didn't work):

-- Any Idea?
UPDATE: So far we managed to solve this issue by changing back the session configuration to use files (disabled Memcached). I know that Magento recommends using Memcached & have no idea what caused this issue...


texts: magento2, Child theme in different language

texts:
Using below command I have created the csv file for translation. I set the settings for locale in admin panel. After running upgrade and deploy command, I get 404 for all css and js files. In Pub/static I see still files are generated under en_US! What step is missing here?

php bin/magento i18n:collect-phrases --output="app/design/frontend/Vendor/childtheme/i18n/sv-SE.csv" /app/design/frontend/Vendor/maintheme/

Edit:

Running below did not help either :(

php bin/magento setup:static-content:deploy sv_se


texts: "discount_tax_compensation_amount" attribute in Sales Order Item (Magento 2)

texts: I see there is discount_tax_compensation_amount field in the sales_order_item table. For what purposes this attribute is?


texts: Migrating Magento from Magento 1 to Magento 2

texts:
I got two e-commerce stores running on Magento version 1.9.3.8, what are the difficulties I am going to face in future, if I don't upgrade them to Magento 2, the business said they don't want to upgrade to Magento 2.

It would be helpful for me if anyone specifies all the problems we are going to face if we don't upgrade?


texts:
I'm making a module in which the user can add review scores from another site.

It currently looks like this.

And I want to add a function like this:

Does anyone know how I can achieve this?


texts: Magento 2.3.5-p2 cloud custom cron job not working auto

texts:
I have created one cron group and cron but module cron not seems to be working(not working automatically ). When I use below command cron run working .
php bin/magento cron:run --group="my_google_ads_conversions"

Here code and file name
.magento.app.yaml

cron_groups.xml

crontab.xml


texts: Unable to get salesorders and Customers From Magento 2.2 using REST API

texts:
We have Magento Store having Version 2.2.0
Store URL:- https://www.sehrawatbrother.com
Token get through REST API:- 7mrn16lrsi51exjp563c13fdi10c0b1e
We also have created API Username and Password and assign proper Role them
Using this token we can retrieve the products but not sales orders and customers. We are getting the error :
Array
(
    [message] => Consumer is not authorized to access %resources
    [parameters] => Array
        (
            [resources] => Magento_Sales::sales
        )

)
We have checked all the permission to resources and all are correct Still we are getting the error.


texts: Adding new countries to the possible delivery regions

texts:
In terms of delivery, I am trying to split up the United Kingdom into its containing countries, England, Northern Ireland, Scotland and Wales.

Each country has different bank holidays and therefore different shipping logic can be applied to them.
At the moment I have found a solution which involves directly editing /lib/Zend/Locale/Data/en.xml, this isn't the most elegant solution and would not work long term. I attempted to override the file by copying it to /app/code/local/Zend/Locale/Data/en.xml however that doesn't seem to work.

What I am wondering is there a long term, safe way to add a country without touching files which are not supposed to be touched?


texts: Why my server is not working after reverted from SUPEE-6788

texts: I had installed the SUPEE-6788 and tested but it has not worked.So,I reverted my code and tested the server but it not working it is showing page not found when I click on anyone.Please help me.


texts: Move login pop up form above shipping address magento 2 checkout

texts:
I have to move login pop above shipping address in magento 2 checkout.

I have found popup sign in form code in checkout_index_index.xml.

How can I move sign in form above shipping address.

 <item name="authentication" xsi:type="array">
    <item name="sortOrder" xsi:type="string">1</item>
    <item name="component" xsi:type="string">Magento_Checkout/js/view/authentication</item>
    <item name="displayArea" xsi:type="string">authentication</item>
    <item name="children" xsi:type="array">
         <!--Additional authentication fields-->
         <item name="errors" xsi:type="array">
         <item name="sortOrder" xsi:type="string">0</item>
         <item name="component" xsi:type="string">Magento_Checkout/js/view/authentication-messages</item>
         <item name="displayArea" xsi:type="string">messages</item>
    </item>
  </item>


texts: Magento Product1 shows In Stock in Website1 & Product1 shows Out Of Stock in Website2

texts:
I've created multi website using different root category.
But added the same product in both website.

Product1 shows In Stock in Website1(default store) &

Product1 shows Out Of Stock in Website2.

help me to tackle this issue.


texts: Magento 2 Wysiwyg editor adding admin/cms/wysiwyg/directive links to store url

texts:
I am adding {{store url="about-us"}} to CMS block page but it ends like below

http://192.168.1.72/pneumatic-plus-categoryprototype/admin/cms/wysiwyg/directive/___directive/e3tzdG9yZSB1cmw9ImFib3V0LXVzIn19/key/7924ccb3f612214d2ba914a766df997c69513aaa31020334484941ca784f5e24/

Why its adding such static fixed url.

Anyone page suggest


texts: Products are not updating programmatically Magento2

texts:
I'm trying to update product details by this code -
public function updateProducts(){
            $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // instance of object manager
            $product = $objectManager->create('\Magento\Catalog\Model\Product');
            $product->load(3734);
            $product->setStoreId(1);
            $product->setSku('sku'); // Set your sku here
            $product->setName('name'); // Name of Product
            $product->setStatus(1); // Status on product enabled/ disabled 1/0
            $product->setWeight(10); // weight of product
            $product->setVisibility(4);
            $product->setPrice(100); // price of product
            $product->setCustomAttribute('case_back','Black');
            $product->setCustomAttribute('case_material','Silver');

            $product->save();

    }

Some of the values are updated like Sku and Price but Name and others are not. I tried to update custom attributes also but it results same. For example - case_back updated but case_material not.
I found out that fields with Global scope are updating but Store View scope are not even though I set storeId also.
So how can I update all of the details of product?


texts: Magento2: generate url keys and meta data

texts:
A backend user created hundreds of products by cloning one product. Now URL keys and meta data are all wrong because they are based on the first product name. Is it possible to regenerate all url keys and meta data using the actual product name ?

Doing this by hand would take hours...


texts: magento getLoadedProductCollection is empty

texts:
I'm trying to create a block in controller from block Mage_Catalog_Block_Product_List and use getLoadedProductCollection() but it is always empty

    $productList_block  = Mage::app()->getLayout()
                         ->createBlock('catalog/product_list');
    $collection = $productList_block->getLoadedProductCollection();
    $collection->clear();
    $_productCollection->getSelect()->reset(Zend_Db_Select::ORDER);

    $collection->setOrder('entity_id','asc');
    $collection->getSelect()->limit(100, 0);
    $collection->load();

    $select=$collection->getSelect();
    echo "select =".$select."\n";

    $l=0;
    foreach($collection as $_product){
       echo ++$l." --- ".$_product->getName()."\n";
    }


texts: Can't access AJAX controllers from cart page

texts:
Followed this tutorial: http://www.atwix.com/magento/ajax-requests-in-magento/

Though dated, people seem to be using it just fine. I'm using Magento CE 1.9.0.1.

After creating app/code/local/MichaelHarper/Upseller/controllers/AjaxController.php:

<?php

// Filename app/code/local/MichaelHarper/Upseller/controllers/AjaxController.php

class MichaelHarper_Upseller_AjaxController extends Mage_Core_Controller_Front_Action {

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

And app/code/local/MichaelHarper/Upseller/etc/config.xml:

<?xml version="1.0"?>
<config>
  <modules>
    <MichaelHarper_Upseller>
      <version>0.1.0</version>
    </MichaelHarper_Upseller>
  </modules>
  <frontend>
  <global>
     <blocks>
         <upseller>
              <class>MichaelHarper_Upseller_Block</class>
         </upseller>
      </blocks>
  </global>
    <routers>
      <upseller>
        <use>standard</use>
        <args>
          <module>MichaelHarper_Upseller</module>
          <frontName>upseller</frontName>
        </args>
      </upseller>
    </routers>
    <layout>
      <updates>
        <upseller>
          <file>ajaxlayout.xml</file>
        </upseller>
      </updates>
    </layout>

  </frontend>
</config>

I'm able to go to my local site with controller namespace without error and it loads my theme's header and footer (blank body): http://localstore.dev/upseller/ajax/index

I then create app/design/frontend/mytheme/default/layout/ajaxlayout.xml:

<upseller_ajax_index>
    <reference name="content">
        <block type="upseller/ajaxblock" name="root" template="upseller/default.phtml" />
    </reference>
</upseller_ajax_index>

And finally my template file app/design/frontend/mytheme/default/template/upseller/default.phtml:

<?php
// app/design/frontend/mytheme/default/template/upseller/default.phtml
echo "Hello World";
?>

Not getting anything when I load my site URL with namespace - still empty body. Any idea what I'm doing wrong? Also, once I can get my Hello World working I have these two provided methods for calling this AJAX controller:

xmlhttp.open("GET","upseller/ajax/index/someval/"+value,true);

-or-

jQuery.post(“upseller/ajax/index”, {someval: value}, function(data){...});

But testing them in the console renders errors.


texts: Magento 2 : How to remove my account navigation links?

texts: How to remove Stored payment method links from the navigation menu on customer account page?


texts:
I'm going to start by apologizing because I'm a little fuzzy on the terminology here.

I'm evaluating PHPStorm for use at work.  Normally I use Eclipse because it's free and it works well most of the time.  But I thought I'd give PHPStorm a shot.  It's got some really nice features and integrates with Git pretty nicely.

But for whatever reason, I can't get code tracing/ctrl-click-on-a-function-and-it-takes-me-to-the-function-definition working on PHPStorm.  I'm working in Magento 2 and that's a bit of a deal breaker for me.

So as an example, let's say I've got this phtml file

<?php

/** @var $block \MyCompany\MyModule\Block\Foo */

$helper = $block->_fooHelper;
$bar = $helper->doSomethingCool();

?>

<?php echo $bar; ?>

In Eclipse, I can ctrl-click on the doSomethingCool() function and it'll open up the class for _fooHelper and take me right to the function definition.  But in PHPStorm all I get is a message saying

"Method 'doSomethingCool' not found. Referenced method is not found in subject class."

I've searched around and ran the 'Detect PSR-0 Namespace roots" which came back and labeled the vendor and app/code folders as PSR-0 roots and then ran "Invalidate Cache/Restart" to reindex but I still get the same message.

Any ideas what I need to do to get the code tracing functionality I described working in PHPStorm?

EDIT: I just found that code tracing (i.e. ctrl-click on a function call) works with a type hinting pointing to the vendor folder like

/** var $block \Magento\Backend\Block\Template */

but does not work if it's pointing to something in the app/code folder like

/** var $block \MyCompany\MyModule\Block\Foo */


texts: Filter Productcollection by min_sale_qty

texts:
i'm working on a productlisting with filterable on Minimum Selling Quantaty (min_sale_qty).

As i can see, the problem is, that this field isn't an normal Product Attribute, but an Stockitem Attribute.

Thus the normal way with $_productCollection->addAttributeToFilter('min_sale_qty', ...) or similar does not work. Can anybody help?


texts: remove item from minicart in magento 1.9x

texts:
i want to remove item from minicart but using  custom jquery ui popup.
here is the default code

template/checkout/cart/minicart/default.phtml

        <?php if (!$this->isOnCheckoutPage()): ?>
            <a href="<?php echo $this->getAjaxDeleteUrl() ?>" title="<?php echo $this->__('Remove This Item') ?>"
               data-confirm="<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>"
               class="remove">
                <?php echo $this->__('Remove Item') ?>

        <?php else: ?>
            <?php echo $this->__('Remove Item') ?>
        <?php endif; ?>
    <?php endif ?>

This works fine.but i want custom popup instead of default alert. so i used jquery popup.

                Are you sure you would like to remove this item from the shopping cart?

            <a href="<?php echo $this->getAjaxDeleteUrl() ?>" title="<?php echo $this->__('Remove This Item') ?>" class="remove-this-item">
               <?php echo $this->__('Remove Item') ?>

using this popup only i have to perform ajax delete operation.
above code redirects to next page when confirmed YES.


texts: Show product only within a date range (between start date and end date)

texts:
I want to create a product with start date and end date.
Once the end date comes the product should be hidden from the product listing.
Are there any methods to complete this task?

I tried with product new from date and  product new to date, it is not giving me the desired result.


texts:
I'm new to Magento and Composer.  After being directed by the Magento site to  https://github.com/magento/magento2-samples/tree/master/sample-module-payment-gateway, I noticed there was no way to clone the repo (at least none that I could figure out).  I read that you're supposed to install it using composer.  Sadly, I have no idea how to do that.  It would be nice if the readme provided steps.  I'm sure it's probably as simple as

composer install sample-module-payment-gateway

Any instructions anyone could offer would be greatly appreciated.