texts: Access Denied (Permission Issue) after upgrade 2.0.3 -> 2.0.4

texts:
Upgraded via admin, on composer installed Magento 2, upgrade reports success. Even though logo and menu and styles show, my store front page only displays this message, instead of the usual frontpage images. Everything is vanilla with sample products.

  Error filtering template: Unable to write file into directory /var/www/html/magento2/pub/media/catalog/product/cache/1/small_image/240x300/beff4985b56e3afdbeabfc89641a4582/m/b. Access forbidden.


texts: Approach to third party module customisation

texts:
I am trying to customize a third party module and I was wondering what is the general approach to doing so? (I'm assuming that I am not the only one who needs to modify a third party extension)

Currently I am just editing the files straight in the module and I had a feeling that there must be a better way.

Is there a way to override/make a higher priority file, instead of straight up editing the files?
How do you deal with module updates?
Do you try to minimise edits in the code by, for example, calling Models from your own extension?

I am just generally interested, because I cannot think of a pleasant approach to this.


texts: Magento 2 table name for product visibility

texts: In which db table magento is saving the product's visibility such as catalog/search , catalog, search, Not visible.


texts: How to add Customer custom attributes and address custom attributes

texts:
I had many issues trying to add new customer account and address fields.
Sometimes it wasn't showing up on the customer adminhtml form and on other times won't save the value.


texts:
I have a web store which I'm trying to link up to an API. The API returns XML, which I parse into custom variables.

The API has a link to an image that I'd like to take and either upload to Magento, or set Magento to look at the image link to find the image when displaying it.

Here's the below code for my custom image attribute.

$eavSetup->addAttribute($entityTypeId, $attribute, [
            'type'                    => 'varchar',
            'label'                   => 'BGG Image',
            'input'                   => 'media_image',
            'frontend'                => 'Magento\Catalog\Model\Product\Attribute\Frontend\Image',
            'required'                => false,
            'global'                  => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
            'user_defined' => true,
            'sort_order' => 140,
            'position' => 140,
            'group' => $groupName,
            'used_in_product_listing' => true,
            'visible'                 => true,
            'visible_on_front'        => true,
        ]);

How do I either:

a) Set the source path for this attribute in the backend

b) Fetch the image in php, and upload it to Magento for the custom product attribute


texts: How do I show drop down list in advanced search?

texts:
I added the advanced search on my homepage and this is my question:
Is there any way to show drop down lists instead of multiselect boxes?

Thank you very much.


texts: Multi Website/Store: On onepage checkout show base currency amount

texts:
I've Created 2 Store in site & both store have different currency

1st Store Currency: GBP

2nd Store Currency: US Doller

When I've purchase & one checkout at 2nd Store it show base currency amount with message "Your credit card will be charged for"

For payment it transfer base currency(GBP) price but I want to transfer US Doller price to payment gateway.


texts: Where are the template files of shipping method?

texts:
I am looking forward to making custom templates that can replace a few shipping method places:

1. Shipping method for registered users

This one I already found and made a custom version

  /app/design/frontend/COMPANY/THEMENAME/template/checkout/onepage/shipping_method/available.phtml

2. Shipping method for guests

Not found yet

3. Shipping method in admin Sales > Orders > Add/Edit Order

Not found yet

4. Not sure if there are anywhere else that I need to override.

Please list if you know any

Great thanks!


texts:
Can Magento make real-time calls to another system for item price and stock availability?

In other words, product catalog would be stored in Magento, but not pricing information, nor  stock availability.  These would be pulled from an external system.

Thank you.


texts:
I need to get order collection, Those orders have a specific product sku,
Like I have a series of sku's "NT", So get all orders which are starting with "NT"

$SKU = NP;
$orders = array();
$collection = Mage::getResourceModel('sales/order_item_collection')
    ->addAttributeToFilter('sku', array('like' => $SKU))
    ->load();
foreach($collection as $orderItem) {
  echo $orderItem->getOrder();
}


texts: Need to clear cache and reindex product by ids

texts:
I have an array with 500 products ids, I need to reindex these products and cache clean them. I don't want to reindex all because I have more than 100 000 products in DB, same for cache.

Do you know what is the best practice to do it quickly ?

I'm in Magento 2.1.10.

Thank you ! :)


texts: Magento 2 stop Magento updating the SKU on duplicate

texts:
When I try to create a product with an SKU the same as one that already exists Magento allows the creation but changes the SKU to be xxx-1.

Is there a way to stop this?


texts: How to define a dependency between data patch and upgrade script

texts:
As described in the DevDocs you can define data patch dependencies.

  To define a dependency in a patch, add the method public static function getDependencies() to the patch class and return the class names of the patches this patch depends on. The dependency can be in any module.

My goal is to make sure a upgrade script ran before a data patch.

Adding the upgrade script in the getDependencies() method won't work because it does not implement the \Magento\Framework\Setup\Patch\PatchInterface.

Is it somehow possible to require a upgrade script as dependency to make sure it ran before the data patch?


texts: How to setup permissions for Bitnami Virtual Machine and PhpStorm?

texts:
I downloaded Bitnami's Magento VM (OVA, using it in vmware on windows). It is a Debian 9 (Debian GNU/Linux 9.8 (stretch)) with Apache/2.4.39 (Unix), PHP 7.1.27. By default, it is configured to serve Magento from /opt/bitnami/apps/magento/htdocs

The user I can use to connect with SSH is the bitnami user, which does not have permission to modify files in magento's directory. All the services are configured to run with another user, like daemon or mysql.

What am I supposed to do to be able to open magento's directory through SFTP with an IDE on my host system and be able to deploy files too?

My understanding was I can connect with SSH, leave the terminal open, so I can run commands using bin/magento or use git in the directory and have PhpStorm on my host system edit and deploy files, while I can use the bitnami vm's ip to open the website in my browser.

Edit.: I jsut realized, there is a magento installation in ~/apps/magento/htdocs too, why?


texts: How to add discounts for unsold products in magento

texts:
I have more than 1000 products, but many products are unsold. So for promotion, I need to add discount for those unsold products.

In promotions we can add Product discount and Shopping cart rule. But for unsold products there are no options to add discount.

How to add it from admin panel?


texts: Is there a way to avoid whenever ricompile all?

texts: I need ricompile if change a bit one controller or block or view.


texts: not able to remove index.php from my local

texts:
I am trying to remove index.php from url. I followed every bit which I found online but if I make Use Web Server Rewrites : YES then it gives me 404:page not found error.
If I make that Use Web Server Rewrites : NO then index.php included in URL
So what else I can do to remove index.php from URL.
Please help.


texts: Turn Magento Footer Links into togglable List for Mobile Devices

texts:
Lets assume this is my footer link markup:

Links 1

xyz

xyz

xyz

Links 2

xyz

xyz

xyz

(Basically I just added unique ids to each title div and ul in the links template.)

Here is my js code:

I am hiding the ul element for specific resolutions and am turning the title into a clickable element which will toggle the hidden ul.

While this is generally working, for some reason I am experiencing a strange behavior, where my hidden uls visibility will be toggled twice and the ul will therefore be hidden again.
It seems this is only happening, if the enquire state has been matched, unmatched and matched again.

Can anybody explain this behavior? Or maybe there is a much easier approach to what I am trying to achieve.
Thank you!


texts: Magento 2 - How to add a background image for each category from a category attribute

texts:
I am working with Magento2 2.2.7 CE

I am Looking into the possibility of trying to set a page background image for each category. I am aware that I can setup category attributes through the setup script to hold image file path details.

I need some direction on which class / function I need to preference / plugin into to change the page background per category depending on the value that will be held in custom attribute for category background image.

This a research question at the moment but I am looking to code and keep the functionality changes in a module.


texts: jQuery is not defined in Checkout Magento 2.4.1

texts:
I'm in Checkout and sometimes I receive the following error:
Uncaught TypeError: jQuery is not defined

This error is thrown by file jquery-migrate.js in line 10 that contains this:
jQuery.migrateVersion = "1.4.1";

I don't know why this error is thrown, cause this file is not controller by me, and is thrown only in checkout, and breaks checkout page, preventing from load successfully and stay in infinite loading.
I'm in Magento 2.4.1
Any idea?
Thanks


texts: Magento 2 : Discount for shipping for specific product

texts: I want to add discount based on specified product. If I have Product A, and then user select the product so I give the discount for shipping. If in cart have Product A and Product B, so shipping just calculate shipping cost without any discount. So discount just for Product A. If user select Product A with quantity 2, shipping cost no discount. I try follow previous question from this link (How can I give discount on shipping costs?), but can't work.


texts:
I'm trying to find an event/observer which will fire once an order is paid in Magento (2.2.8).

checkout_onepage_controller_success_action - seems limited to frontend orders (ie not called for admin created orders)
sales_order_invoice_pay / sales_order_invoice_register - don't seem to be called for PayPal Express

Ideally I want to try to get something fairly universal which will cover any orders paid. Even better if we knew it was only going to fire once (ie not on sales order save, but worst case can get an order field).


texts: How to solve PHP Fatal error: Class 'Eltrino_DiamanteDesk_Helper_Data' not found in /home/abc/public_html/app/Mage.php on line 547

texts:
My Extension code is :

  Path :app/code/community/Eltrino/DiamanteDesk/Helper/Data.php

<?php
/**
 * Copyright (c) 2014 Eltrino LLC (http://eltrino.com)
 *
 * Licensed under the Open Software License (OSL 3.0).
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://opensource.org/licenses/osl-3.0.php
 *
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@eltrino.com so we can send you a copy immediately.
 */

class Eltrino_DiamanteDesk_Helper_Data extends Mage_Core_Helper_Abstract
{
    const XML_PATH_DIAMANTE_DESK_API_USERNAME = 'diamantedesk/api/username';
    const XML_PATH_DIAMANTE_DESK_API_KEY = 'diamantedesk/api/key';
    const XML_PATH_DIAMANTE_DESK_API_SERVER_ADDRESS = 'diamantedesk/api/server_address';
    const XML_PATH_DIAMANTE_DESK_BRANCH_CONFIGURATION_BRANCH = 'diamantedesk/branch_configuration/branch';
    const XML_PATH_DIAMANTE_DESK_CONFIGURATION_FOOTER_LINK_URL = 'diamantedesk/configuration/footer_link_url';

    public function getSupportLink()
    {
        return Mage::getStoreConfig(static::XML_PATH_DIAMANTE_DESK_CONFIGURATION_FOOTER_LINK_URL);
    }
}

Extension xml file path : app/etc/modules/Eltrino_DiamanteDesk.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Eltrino_DiamanteDesk>
            <active>true</active>
            <codePool>community</codePool>
        </Eltrino_DiamanteDesk>
    </modules>
</config>

Note : Magento return Order Blank Page

How can i solve the issue?


texts:
I am working on multi website for a single admin.

I need to change the store URL parameter after saving a product. In which function does the redirection after saving a product happen?


texts:
I am creating Form in Magento2 admin with UI Component.

I need to add dependency to fields and dependent field values what to load dynamically.

In Below link they are hard coding visible value but here i need to get selected value dynamically and from that value i need to get collection from database and append that collection to dependent drop down.

magento 2.1 How do i create form component field custom depends on another field value


texts:
Using 1.9.0.1 rwd

Hi,
I am trying without any success to add details from a product attribute to a CMS page. Basically I want to be able to select a product (say via its id number) and the display a selected attribute from that product (say short description) and then display it in a CMS page along with what ever else is on that page. I have seen lots of ways to create and add categories such as “featured Products” but none for a individual product. The products are all simple and not configurable etc. if that makes a difference?

Any ideas on how I can achieve this?
Many Thanks


texts: Magento Admin Session Issue after install SUPEE-10570

texts: We use Magento 1.7 and recently installed patch SUPEE-10570v2. After that when we use admin, some time it's session out and redirect to the front-end home page(not admin login page). Please let me know any one experience this issue and how can I fix this.


texts: Import and Update Existing Custom Option

texts:
I use the import/export functionality in order to import products each night. I additionally use AvS_FastSimpleImport, but this should not really matter. Many of my products have custom options. In the data I import, I set something like this in order to import the custom option:

'_custom_option_title'       => 'My super funky option title',
'_custom_option_type'        => Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX,
'_custom_option_is_required' => false,
'_custom_option_row_title'   => 'My super funky option row title',
'_custom_option_row_price'   => 50,
'_custom_option_row_sku'     => 'MY_SKU'

The problem is that the custom option is not updated, but always added again. Hence, I have the same custom option multiple times.

I tried to set a _custom_option_sku and hoped that this would work, but the SKU is ignored completely (source).

Another alternative would be to completely replace all products and not update them (Mage_ImportExport_Model_Import::BEHAVIOR_REPLACE instead of Mage_ImportExport_Model_Import::BEHAVIOR_APPEND), but I would rather like to avoid this.

So any idea how an existing custom option can be updated with the ImportExport module?


texts: Magento 2 category and attributes cleared after adding a configurable product

texts:
I'm trying to add a configurable product, but after generating configurations and saving the the product I get the following error:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '402-2154' for key 'CATALOG_PRODUCT_SUPER_LINK_PRODUCT_ID_PARENT_ID', query was: INSERT INTO `catalog_product_super_link` (`product_id`,`parent_id`) VALUES (?, ?), (?, ?)

Despite of the error, the Configurable product is saved. The main problem is, that sometimes, not always, all relationships for all products are cleared, so when I add configurable product I loose all categories, custom attributes relationships and so on.

Did anyone encounter this problem? How can it be related to the Duplicate entry error?


texts: Magento 2: Disable add to cart button for certain products in category page

texts:
I am doing a custom module and now I want to hide the 'add to cart' button for certain products.
I have followed the https://magenticians.com/magento-2-disable-add-to-cart-button/ documentation and i was able to hide it from the product's detail page but not from the home/category page. I need this button hidden from all the views.

I have added the addtocart.phtml file to app/code/Magenticians/Mymodule/view/frontend/templates/catalog/product/view path and also the corresponding layout file as the document link said.
It is working in detail page of the product only. I want it on all pages.

Thanks in advance!


texts: Custom Option File Value Json not decoding

texts:
I am trying to get the path of a Custom Option File. It is contained inside of the option_value index. It looks like this.

a:10:{s:4:"type";s:10:"image/jpeg";s:5:"title";s:25:"the-goose-will-attack.jpg";s:10:"quote_path";s:68:"/media/custom_options/quote/t/h/94b0992d58b4478d13a2376f645d3b7c.jpg";s:10:"order_path";s:68:"/media/custom_options/order/t/h/94b0992d58b4478d13a2376f645d3b7c.jpg";s:8:"fullpath";s:102:"/var/www/mageprodcory/mage-webroot/media/custom_options/quote/t/h/94b0992d58b4478d13a2376f645d3b7c.jpg";s:4:"size";s:5:"42421";s:5:"width";i:450;s:6:"height";i:600;s:10:"secret_key";s:20:"94b0992d58b4478d13a2";s:3:"url";a:2:{s:5:"route";s:35:"sales/download/downloadCustomOption";s:6:"params";a:2:{s:2:"id";s:3:"133";s:3:"key";s:20:"94b0992d58b4478d13a2";}}}

As I understand, this is suppose to be JSON that can be decoded, but it looks like something is wrong with it, some characters seem encoded incorrectly. I don't think ;s:25 and such is suppose to be there.

I've tried disabling magic quotes, but that's not the cause.

Any idea why the JSON is incorrect, or am I doing this wrong?


texts: website is not picking up changes that are done in customize option

texts:
where is the path by which I can customize my website from backend in Magento?
it seems like frontend and backend have been disconnected there CSS file and so the changes are not appearing in the frontend. please help


texts: Admin login: invalid form key after SUPEE 7405

texts:
My customer is running Magento version 1.6.2.0. After applying the security patches including SUPEE-7405, it's no longer possible to login to the backend because we get the error

  "invalid form key. please refresh the page".

That is because of the changes in the method actionPreDispatchAdmin() of the class Mage_Admin_Model_Observer.

I tried to delete all cookies and clean the session folder but it still doesn't work. The weird thing about this is: on the stage system all works fine. The difference between this two systems is the session storage. Stage system uses files, live system uses memcache. I tried to change the live system to files too but it doesn't work neither.

I think the reason the login fails is the fact that I have no adminhtml cookie on the admin login page of the live system. Therefore the comparison (if ($cookie->get(session_name()) == $this->getSessionId()) {) on line 126 of the class Mage_Core_Model_Session_Abstract_Varien fails!

Has anybody of you have an idea why the cookie is not getting created? Even if I try to set the cookie manually in the login-template it does not work. On the stage system I see the cookie.


texts:
I use bellow code to show number of articles from the category number 4 (in my case)! Magento is showing 65 articles from that category, but in the stock there are only 36 articles. What you would like to achieve is to show number of articles which are in stock. I don't want to include articles from out of stock.

<?php
$products_count = Mage::getModel('catalog/category')->load(4)
->getProductCount();
echo($products_count);
?>


texts: Magento Cache - confusion about Varnish, Redis, APC, Memcache

texts:
I'm try to improve Magento performances ( soon or later "MageDev" hit this point :)

I did some research and I found a lot of good, but not homogeneous, guides.

What I got is that:

MemCache or Redis are generic cache system, they cache data and they can be integrated directly with Magento (local.xml)
APC is a cache for the php code itself can only be integrated at server level.
Varnish is a reverse proxy, it cache the response can only be integrated at server level. ( there is a extension for Magento, turpentine,  but I'm not sure what exactly does )

After all this good reading I'm still a bit confused about what of the above cache systems is possible to use in combinations, for EX:

MemCache + APC ?
Redis + APC  ?
can I add Varnish to one of the above configuration ?

Just to be clear the question is not about how to configure Magento or the server but what
are the possibility allowed and some clearance about how to mix cache systems. ( beside that if anyone can come with a good recommendation I would appreciate it thanks. )


texts: Store view > Restrict or hide all clients groups display

texts:
We have multiple stores/websites to manage in one Magento 2 instance.

We're creating a backend role for every store, and the problem is that when going to Clients > All clients we can see all the clients groups in filter.

Any idea of how to restrict it to only current website>clients or simply hide it ?


texts:
Problem:

  Cannot override city component (current is input-text), want to change
  to select.

Current Status

Already tried to set custom component using javascript:

The script is triggered when checkout page is load, but all the config on script always revert back to the previous one (input-text). In this case, I cannot override from javascript.

Back to the problem above, I can override the city component from: %My_Module%/view/frontend/layout/checkout_index_index.xml but occur another problem, only show false for the option.

Need advise for this problem, thank you.


texts: Magento2.3 how the reservation concept works

texts:
I am facing issue after upgrading magento to 2.3

I had 5 products in stock but after migrating to magento 2.3 it got default stock to -14

can some one explain how reservations work in 2.3


texts: How to handle magento 1.9.1 email queue?

texts:
I have upgraded to 1.9.1
everything seems to be working perfect except that the order confirmation email is being queued?
How can I change the setting so that I would like the email to be fired as soon as the order  is placed?


texts: Magento2 - How to create cache files manually

texts:
What are the cache directories of Magento 2.

Just I need to remove those my rm -rf command without executing Magento cache:flush command.


texts: Enable/Disable shipping methods based on postcode entry?

texts:
I've seen the tablerate shipping method work based on a CSV with postcode entries.

My question is, can that similar process be used to enable or disable actual shipping methods based on postcode entry?

It can do it for country out of the box, so I reckon it wouldn't be much to change it to postcode and read from a CSV would it?

The website is viewable at www.asg.co.uk/gadgetclinic.

Can anyone help me please? Someone must have some knowledge on this, it seems quite a trivial thing to do...


texts: Magento2: Can't use OrderCommentSender to send an email

texts:
getting this error

    File:   /chroot/home/html/vendor/magento/framework/App/State.php
    Error:  Area code is not set
    Line:   139
    Stack trace:
    #0 /chroot/home/html/vendor/magento/module-theme/Model/View/Design.php(126): Magento\Framework\App\State->getAreaCode()
    #1 /chroot/home/html/var/generation/Magento/Theme/Model/View/Design/Proxy.php(103): Magento\Theme\Model\View\Design->getArea()
    #2 /chroot/home/html/vendor/magento/module-email/Model/AbstractTemplate.php(584): Magento\Theme\Model\View\Design\Proxy->getArea()
    #3 /chroot/home/html/vendor/magento/module-email/Model/AbstractTemplate.php(608): Magento\Email\Model\AbstractTemplate->getDesignConfig()
    #4 /chroot/home/html/vendor/magento/module-email/Model/Template.php(413): Magento\Email\Model\AbstractTemplate->setDesignConfig(Array)
    #5 /chroot/home/html/vendor/magento/framework/Mail/Template/TransportBuilder.php(257): Magento\Email\Model\Template->setOptions(Array)
    #6 /chroot/home/html/vendor/magento/framework/Mail/Template/TransportBuilder.php(267): Magento\Framework\Mail\Template\TransportBuilder->getTemplate()
    #7 /chroot/home/html/vendor/magento/framework/Mail/Template/TransportBuilder.php(227): Magento\Framework\Mail\Template\TransportBuilder->prepareMessage()
    #8 /chroot/home/html/vendor/magento/module-sales/Model/Order/Email/SenderBuilder.php(66): Magento\Framework\Mail\Template\TransportBuilder->getTransport()
    #9 /chroot/home/html/vendor/magento/module-sales/Model/Order/Email/NotifySender.php(34): Magento\Sales\Model\Order\Email\SenderBuilder->send()
    #10 /chroot/home/html/app/code/Bss/OrderDeliveryDate/Model/Plugin/Sales/Order/Email/Sender/OrderCommentSender.php(46): Magento\Sales\Model\Order\Email\NotifySender->checkAndSend(Object(Magento\Sales\Model\Order), true)
    #11 /chroot/home/html/pub/test.php(203): Bss\OrderDeliveryDate\Model\Plugin\Sales\Order\Email\Sender\OrderCommentSender->send(Object(Magento\Sales\Model\Order), true, '123456+SWOG')
    #12 /chroot/home/html/pub/test.php(355): Data->updateOrder('000001469', '2018-3-15', 'Complete', 'complete', 'yes', '123456', 'SWOG', 'SWOG')
    #13 {main}

when running this:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('\Magento\Sales\Model\Order')->loadByIncrementId($orderIncId);
$state =  $objectManager->create('\Magento\Framework\App\State');
$state->setAreaCode('frontend');
$notificationEmail = $objectManager->create('Magento\Sales\Model\Order\Email\Sender\OrderCommentSender');
$notificationEmail->send($order, true, "Order Completed!");

i can't figure out what i missing, i am setting the area code but it doesn't seem to see that


texts: Custom option file or image save with extension in magento2

texts:
I want to save custom option file save with extension.

Actually i make pdf and print image in this way

$optionvalue["fullpath"]=/var/www/html/magento2/pub/media/custom_options/quote/1/_/usO23kzyNEu62DMTwcOsB7XX6HHX0RVI
$image=\Zend_Pdf_Image::imageWithPath($optionvalue["fullpath"]);
        $page->drawImage($image, 300,300, 50,50);

It give error Unknown extension when i give use this $image=\Zend_Pdf_Image::imageWithPath($optionvalue["fullpath"]);

When use this $image=\Zend_Pdf_Image::imageWithPath($optionvalue["fullpath"].'png');
then it not found file

Now has any way to save custom option file save with extension


texts:
Name product: Box đựng HDD 2.5 di động WD USB 3.0   .
but url auto of magento 2: /box-d-ng-hdd-2-5-di-d-ng-wd-usb-3-0.html   .
i want /box-dung-hdd-2-5-di-dong-wd-usb-3-0.html
This is lang vietnamese
Word tite seo not frienlyy, word: đựng , động not convert to : dung , dong.
i need help. thank so much.


texts:
I have following problem. I am overriding \Magento\GroupedProduct\Block\Product\View\Type\Grouped with this way:

First i override it in the di.xml

 <preference for="Custom\Class\Block\Grouped\Kachel" type="Magento\GroupedProduct\Block\Product\View\Type\Grouped" />

Everything works fine like this:

<?php

namespace Custom\Class\Block\Grouped;

class Kachel extends \Magento\GroupedProduct\Block\Product\View\Type\Grouped {

  public function someCustomFunc(){

  }

}

But i get alot of errors if i try to inject some dependecys:

namespace Custom\Class\Block\Grouped;

protected $_storeManager;
public function __construct(
   \Magento\Store\Model\StoreManagerInterface $storeManager
){
   $this->_storeManager=$storeManager;
}

class Kachel extends \Magento\GroupedProduct\Block\Product\View\Type\Grouped {

  public function someCustomFunc(){

  }

}

How can i for example add this storemanager to my class here?

Is it also possible to extend this class with some other custom class?


texts: Where is the Magento2 Order Confirmation sender email address noted?

texts: I am experiencing an issue where the sender email address for the order confirmation email is not what is set in the admin panel for Magento 2.3. I have checked both SMTP settings and the store email addresses and none of them match what is being used to send emails. Where would I look in the file structure to find the appropriate file that may contain this email address?


texts: Child Theme Change Colors - Less Mixins in Magento 2

texts:
I would like to know how to change colors and follow the proper naming conventions in my _theme.less file.  I have grunt working on my local developer machine to compile the LESS files into css.

From the link below it states:

http://magento2-demo.nexcess.net/pub/static/frontend/Magento/blank/en_US/css/docs/index.html

@btn__color: @color-brownie;
@btn-primary__color: @color-white;
@btn-secondary__color: @color-white;

I also have been successful at using:

@page__background-color: @color-gray20;

@primary__color: @color-gray90;

Where can I find a list of knowing all of the color options for the available mixings.  For example
@page__background-color: @color-red; does not work and @page__background-color: @color-black; works also @page__background-color: @color-white; works.

Is there a place to find all of these colors available to me by extending Luma?  Also, what is the scenario (give example?) of proper way to define my own custom color as a mixin?  Does this go in the _theme.less file?


texts: How to create multi store (2) under main website

texts:
How can I create two store under the main website? please show in code, I need to create two stores with different names under one main site.
namespace RRRR\Store\Setup\Patch\Data;

use Magento\Store\Model\StoreFactory;
use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Store\Model\ResourceModel\Store;

class CreateStore implements DataPatchInterface
{
    /**
     * @var \Magento\Framework\Setup\ModuleDataSetupInterface
     */
    private $moduleDataSetup;
    private $storeFactory;
    private $storeResourceModel;

    /**
     * @param StoreFactory $storeFactory
     * @param Store $storeResourceModel
     * @param \Magento\Framework\Setup\ModuleDataSetupInterface $moduleDataSetup
     */
    public function __construct(
        StoreFactory $storeFactory,
        Store $storeResourceModel,
        \Magento\Framework\Setup\ModuleDataSetupInterface $moduleDataSetup
    ) {
        $this->moduleDataSetup = $moduleDataSetup;
        $this->storeFactory = $storeFactory;
        $this->storeResourceModel = $storeResourceModel;
    }

    /**
     * {@inheritdoc}
     */
    public function apply()
    {
        $this->moduleDataSetup->getConnection()->startSetup();

        $store = $this->storeFactory->create();
        $store->load('my_custom_store_code');
        $store->setCode('my_custom_store_code');
        $store->setName('Mu Custom Store ');
        $store->setData('is_active', '1');
        $this->storeResourceModel->save($store);

        $this->moduleDataSetup->getConnection()->endSetup();
    }

    /**
     * {@inheritdoc}
     */
    public static function getDependencies()
    {
        return [];
    }

    public function revert()
    {
        $this->moduleDataSetup->getConnection()->startSetup();

        $this->moduleDataSetup->getConnection()->endSetup();
    }

    /**
     * {@inheritdoc}
     */
    public function getAliases()
    {

        return [];
    }
}


texts:
Im currently running magento on a windows server, I have installed and configured wincache, I added the following to my local.xml file.

 <session_save><![CDATA[files]]></session_save>
    <cache>
        <backend>Zend_Cache_Backend_WinCache</backend>
        <prefix>file</prefix>
    </cache>

None of the files are caching within wincache though.


texts: How to fetch product attribute value in phtml file in Magento 2?

texts:
How can I fetch custom product attribute value such as size when it's added to the cart?

I want to show the size selected in an add to cart popup (which contains all product details)!

Any help will be appreciated.


texts: Magento 2 - What does the AbstractHelper do, and is it required?

texts:
All of the tutorials I'm looking at pretty much say the same thing.  To add a helper, just add the following code:

<?php

namespace YourName\YourModule\Helper;

class ClassName extends \Magento\Framework\App\Helper\AbstractHelper
{

...

}

It seems to be required in all of the tutorials, but no one explains it.  It also seems to work exactly the same if I remove it (though, my custom module is not quite as complicated as others).

Can any experts offer some insight?


texts: Add to cart URL not adding product to cart for Guest

texts:
My add to cart buttons on a home page widget are not adding product to the cart for users who are not logged in. The javascript call includes the form key and product info:

<button type="button" title="Add to Cart" class="button btn-cart" onclick="setLocation('http://www.zero-bars.com/checkout/cart/add/uenc/aHR0cDovL3d3dy56ZXJvLWJhcnMuY29tLw,,/product/109576/form_key/21vvM0yFWxRdBJoF/')">

                            </button>

.phtml file:

<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')">

                            </button>

The strange thing is it works fine on development server and if I am logged in. Is there a setting in config I am forgetting?


texts:
We have a Magento 2 (v 2.2.4) site where 17 multi store is configured. In recent days we observed that the site is performing slow. We tested the whole site in test lab and found that after removing all multi store the site is super fast.

We checked in everywhere that might cause problem for multi store but did not find a clue.

Could you please help?


texts: Configurable Products: Update Media Gallery - Not Just Base Image

texts:
I feel what I am trying to do is simple, but cannot find a still-supported method of doing this.

I would like to have the entire media-gallery update to the images listed on the associated SKU (via attribute selection). Instead, it only updates the base image and continues to show any other images in the parent configurable product's gallery.

This seems to be an open issue for M2, but their temporary fix (see below) is not working for me.

<!-- Insert this code on your theme's ../etc/view.xml: -->

  <vars module="Magento_ConfigurableProduct">
    <var name="change_only_base_image">false</var>
  </vars>
  <vars module="Magento_Swatches">
    <var name="change_only_base_image">false</var>
  </vars>

I see some old configurable swatch extensions that are no longer supported or in development ever since 1.9 was released with Configurable Swatches as a standard.

Yes I have my attributes selected and enabled as configurable swatches - so please don't ask.

Is there a way to rewrite the media.js that displays the gallery in such a way as to look at selected attributes and refresh the gallery? Any help is appreciated!


texts: Execute custom php file outside /pub folder in Magento2 Nginx

texts:
I would like to execute a custom php file (required for a validation and scan) on our Magento2 installation. The file however should remain and be located in the main /var/www/html/ folder and not in the /var/www/html/pub/ folder.
I have tried the following in my main vhost configuration but still getting a 404
    location /mycustomfile.php {
        try_files $uri $uri/;
        location ~* \.php$ {
        fastcgi_pass fastcgi_backend;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        }
    }

Also I have seen to "whitelist" the file in /var/www/html/nginx.conf.sample under:
    # PHP entry point for main application
    location ~

    (index|get|static|report|404|503|health_check|mycustomfile)\.php$ {

Some expert help would be greatly appreciated, thank you!
EDIT:
Okay I figured it out:
    location /mycustomfile.php {
        try_files $uri $uri/;
        root /var/www/html;
        location ~* \.php$ {
        fastcgi_pass fastcgi_backend;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        }
    }


texts: In Magento 2, many product fields have been shuffled off to a group called "Autosettings".  Does anyone know why this section is named Autosettings?


texts: Magento 2 - Product price change to 0.00 in product detail page for Non-US Locale

texts:
I am facing a very strange issue after the installation of Magento 2.0.4. I have create a product with the price $12 and change the locale from Magento configuration in backend.

Below is the screenshot for the listing page.

Also find the below screenshot for the detail page.

You might have noticed the difference between two screenshot. Yes, Product detail page shows $0.00 price while listing page has retain with the price what i have added.

Product details page automatically updates correct price to $0,00 After one or two seconds ( Javascript Updates).

Find the below code for it

$('[data-price-type="' + priceCode + '"]', this.element).html(priceTemplate({data: price}));

I have debug further in the code and find another javascript code that passes parameter to Magento 2 pricebox widget.

<script>
    require([
        'jquery',
        'Magento_Catalog/js/price-box'
    ], function($){
        var priceBoxes = $('[data-role=priceBox]');

        priceBoxes = priceBoxes.filter(function(index, elem){
            return !$(elem).find('.price-from').length;
        });

        priceBoxes.priceBox({'priceConfig': <?php /* @escapeNotVerified */ echo $block->getJsonConfig() ?>});
    });
</script>

Now i have checked the getJsonConfig() method,

  $product = $this->getProduct();

        if (!$this->hasOptions()) {
            $config = [
                'productId' => $product->getId(),
                'priceFormat' => $this->_localeFormat->getPriceFormat()
                ];
            return $this->_jsonEncoder->encode($config);
        }

        $tierPrices = [];
        $tierPricesList = $product->getPriceInfo()->getPrice('tier_price')->getTierPriceList();
        foreach ($tierPricesList as $tierPrice) {
            $tierPrices[] = $this->priceCurrency->convert($tierPrice['price']->getValue());
        }
        $config = [
            'productId' => $product->getId(),
            'priceFormat' => $this->_localeFormat->getPriceFormat(),
            'prices' => [
                'oldPrice' => [
                    'amount' => $this->priceCurrency->convert(
                        $product->getPriceInfo()->getPrice('regular_price')->getAmount()->getValue()
                    ),
                    'adjustments' => []
                ],
                'basePrice' => [
                    'amount' => $this->priceCurrency->convert(
                        $product->getPriceInfo()->getPrice('final_price')->getAmount()->getBaseAmount()
                    ),
                    'adjustments' => []
                ],
                'finalPrice' => [
                    'amount' => $this->priceCurrency->convert(
                        $product->getPriceInfo()->getPrice('final_price')->getAmount()->getValue()
                    ),
                    'adjustments' => []
                ]
            ],
            'idSuffix' => '_clone',
            'tierPrices' => $tierPrices
        ];

I did lot of debugging through the code and come to the conclusion that they are using ICUDATA for locale support.

I am stuck with this all thing, It seems it is PriceFormat issue.

Please make sure this issue arise only for certain Locale options like Persion (Iran).


texts: Magento 2 : How To Extend a Layout File From Third Party Module

texts:
I want to extend layout file of magfan_blog extension. I put my custom layout in theme folder, but it doesn't work. I'm guessing if this has anything to do with loading order of Magento2. When I extend third party plugin layouts. my customization will be overwritten by module layout file. If I want to extend third party extension layout. how should I do?

In source layout file, it works

But in my theme folder, it dons't


texts: How to make categories pages wise different headers and footer in magento 2.3.1?

texts:
Want to make categories pages wise different header and footer in magento 2.3.1

example like have 4 categories so  want make 4 different header and footer that make maintain end of them.


texts: Magento2.3.3 Payflow Pro CC method not working, clicking on place order button loader keeps spinning but order doesn't place

texts:
I am using magento 2.3.3 and I have enabled default magento Payflow Pro with Express checkout payment method. I have configured all required paypal merchant account details in admin area within payment method settings.

Now, if I try to place order with Express checkout method then it works fine. However, when I try to place order with credit card method then first paypal authorization request fired successfully with 0 amount. But then nothing happens and loader keeps spinning. I have also enabled debug mode and check logs in all log files but nothing relevant error information found.

This is default magento and I believe that there is no problem with paypal merchant account details configured at admin side otherwise Express method won't work. I have also found this issue created by someone on github magento2 repo at https://github.com/magento/magento2/issues/4408. However, no one had provided any exact solution over there as well.

Does anybody faced this issue in any project? Please help me as I am trying to resolve it since last few days.

Thanks in advance!


texts: Magento 2.0.2 Backend cms pages and blocks disappeared

texts:
After deleting a store my cms and static block pages have become unviewable under admin. Instead I'm left with the error below. I tried to reindex and delete any cache files I could find even though I'm sure this is a db problem. Just not sure how to approach it, any help would be appreciated.

  Notice: Undefined index: store_id in
  /var/www/html/magento2/vendor/magento/module-store/Ui/Component/Listing/Column/Store.php
  on line 82


texts: Adding custom discount adds 2 times in EE 2.2.6

texts:
I am adding custom discount to my cart but it seems it is adding 2 times in the cart.

Here is my model file code.

$discount = 10;
$baseDiscount = 10;

$total->addTotalAmount('plandiscount', -$discount);
$total->addBaseTotalAmount('plandiscount', -$baseDiscount);
$total->setPlanDiscount(-$discount);
$total->setBasePlanDiscount(-$baseDiscount);
$quote->setGrandTotal($total->getGrandTotal() - $discount);
$quote->setBaseGrandTotal($total->getBaseGrandTotal() - $baseDiscount);

$quote->setPlanDiscount(-$discount);
$quote->setBasePlanDiscount(-$baseDiscount);

It is really strange that if the value is positive, it is working fine but in case of negative, it is adding 2 times.


texts: original image resize shows only default placeholder image

texts:
I am trying to get this piece of code to work in magento 1.7.0...

it only displays the magento placeholder image...

if i change "image" to "small_image" it works fine

everything is set up in the back end the radio buttons are selected for the product images... I have cleared the cache also...

this is happening in the list.phtml file ...

can someone kind enough tell me what i am doing wrong or WHY its not working... i have been searching all over i found one solution after 3 days of searching and it didn't work....

$_item is not defined so a i get a call to a non object error...

here's a link to the answere

https://stackoverflow.com/questions/11995206/get-base-product-image-in-magento

<?php echo $this->helper('catalog/image')->init($_product, 'image')->resize(171, 259);


texts: How do i get active filters in observer method?

texts:
i want to check the currently applied layered navigation filters using an observer. When specific filter values are selected an additional layout handle should be added which adds a static block to the content.

For this i created a module which registers on the event controller_action_layout_load_before. In my observer method i call

  $appliedFilters = Mage::getSingleton('catalog/layer')->getState()->getFilters();

But somehow the filter array is always empty, no matter what i tried.

I thought allready of dispatching my own event and passing the filters as an argument, but that might be the dirty way.

Anyone has an idea why i can't access that data? I can access it in the template files.

Thanks a lot for your help!

config.xml:

<config>
    <modules>
        <My_CustomModule>
            <version>0.0.1</version>
        </My_CustomModule>
    </modules>
    <global>
        <models>
            <my_custommodule>
                <class>My_CustomModule_Model</class>
            </my_custommodule>
        </models>
    </global>
    <frontend>
        <events>
            <controller_action_layout_load_before>
                <observers>
                    <my_custommodule_observer>
                        <type>singleton</type>
                        <class>my_custommodule/observer</class>
                        <method>checkActiveFilters</method>
                    </my_custommodule_observer>
                </observers>
            </controller_action_layout_load_before>
        </events>
    </frontend>
</config>

Observer.php:

class My_CustomModule_Model_Observer
{
    public function __construct()
    {
    }

    public function checkActiveFilters($observer)
    {
        $layout = $observer->getEvent()->getLayout();
        $appliedFilters = Mage::getSingleton('catalog/layer')->getState()->getFilters();
        foreach($appliedFilters as $filter) {
            Mage::log('Yay! appliedFilters is not empty!');
            $layout->getUpdate()->addHandle('FILTER_'.$filter->getFilter()->getRequestVar());
        }
    }
}


texts: Add to cart not working for configurable products

texts:
Magento ver. 1.9.1.0, site is coolvape.co.uk

As far as I can tell all simple products will work fine however when a customer tries to add a configurable product to cart they just get a loading icon. I can't think of any changes that were made at the time it started occurring, it was working fine until a few days ago.
I've tried clearing the cache and reindexing.

If I disable Ajax for Add to Cart, you get directed to another url (e.g. /checkout/cart/add/uenc/aHR0cDovL2Nvb2x2YXBlLmNvLnVrL2dlbmVyYWwtY3VzdGFyZC5odG1s/product/1650/form_key/OAXh9Lk7RduomSs5/) which doesn't load, saying Unable to load the web page because the server sent no data.

1650 is the ID of the cofigurable product, if I change it to an ID (e.g. 1653) of a simple product associated with that configurable product it will direct me to cart with that simple product added but no thumbnail and the text badly formatted.

Thanks


texts: Magento 2 - How to add wysiwyg editor in frontend PHTML file?

texts:
I have one inquiry form on frontend custom module.
I wanted to use wysiwyg editor in frontend PHTML file.
I have read many thread on community which have tutorials for adding wysiwyg in backend form.
I am finding way for displaying them in frontend form.

Thanks.


texts: How can un-editable firstname, middlename, and last name in account information

texts:
I am using magento version 1.9.2.3.

In,edit account information section, i would not like to provide the fields first name and last name as editable.

How could i change that?


texts: magento 1.9 not redirecting to success page..

texts:
Magento 1.9 not redirecting to success page after placing order.
When i am going to sales -> order then i can see that order is saved there..
I have php_mbstring already enabled..

My php version is 7.
Any idea what is going wrong??


texts: Magento 2 Create Tab on product view page and show product attribute data in new tab

texts: How to create a new tab on product view page and show product attribute data in new tab?


texts: Anyone have an idea how to use PWA (Progressive Web Apps) in Magento2. I have found some blogs but didn't get success.


texts: How to send email from the custom module?

texts:
Guys I'm trying to create a module to send e-mail and I tried to follow this tutorial:Tutorial
however in the end it generates an error
"Unable to send mail: Unknown error" and I don't know what to do, I need help. Has anyone done this before, can you indicate a good tutorial or something?


texts: In the admin panel, the normal Web Setup Wizard page is not showing. But there is no error in the front end. What might be the cause of this?


texts: Sales Tax Exempt Extension for Magento 2.3

texts:
i have searched Sales Tax Exempt extension for Magento 2.3,
i have found for Magento 1.9,
but the same extension I want for Magento 2,
is there available the same for Magento 2 or any other extension like Magento 1?


texts: Remove default store code from URL, only?

texts:
mage 2.1.7 "use Store code in URL" set to YES.

Have 3 stores, one for our default/original store at "/" with code "france" and one for our south korea and north korea stores.

The default store is currently accessible on "/" and "/france" and the other 2 stores on "/south-korea" and "/north-korea" - that's fine. But the default store should only be accessible on "/"

We can use nginx to rewrite the URL "/france" to "/" but the URLs generated by magento2 include the store code. Where do I override this behavior? thank you.


texts: How to load the layout first in catalog category page?

texts: When Product list page gets loaded  layout should be loaded first (ie the grid) leaving space for images.Then the images should be loaded in their respective spaces. What should be done for that. kindly help.


texts: How to send mail from magento2 in localhost

texts: I need to sent mail from localhost but can't able to do.


texts: Spend $250 & Save $20% Promocode (excluding all sale items)

texts:
I am trying to create a promocode for my customers where they can save 20% if they spend over $250, but I would like to exclude the items I have on sale.

I don't have a sales category. My products that are on sale automatically show in the sales page which is setup as a content page and it not a cateogry so I can't use the sales category in the shopping cart rules.

Can someone please give me a hand. When do I use a condition and when do I use an action?


texts: Magento2: Unassigned category from product

texts:
I am trying to make script to unassign category from product while save or update product. but its not working properly.

ini_set('display_errors', '1');
ini_set('error_reporting', E_ALL);

// Increase memory limit
ini_set('memory_limit', '1024M');

use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';

$bootstrap = Bootstrap::create(BP, $_SERVER);
$obj = $bootstrap->getObjectManager();

$appState = $obj->get('\Magento\Framework\App\State');
$appState->setAreaCode('frontend');

$pid = 528;
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$_product = $objectManager->get('\Magento\Catalog\Model\Product')->load($pid);
$_product->setCategoryIds('')->save();

Does anyone know another way for it? except direct query.


texts: Add Google Structured Data availability, priceValidUntil, url in Magento 2.3.2

texts:
In my code current availability, priceValidUntil, url is missing. How to add this in below code

  /public_html/vendor/magento/module-catalog/view/base/templates/product/price/amount/default.phtml

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>

<?php /** @var \Magento\Framework\Pricing\Render\Amount $block */ ?>

<span class="price-container <?= /* @escapeNotVerified */ $block->getAdjustmentCssClasses() ?>"
        <?= $block->getSchema() ? ' itemprop="offers" itemscope itemtype="http://schema.org/Offer"' : '' ?>>
    <?php if ($block->getDisplayLabel()): ?>
        <?= /* @escapeNotVerified */ $block->getDisplayLabel() ?>
    <?php endif; ?>
    <span <?php if ($block->getPriceId()): ?> id="<?= /* @escapeNotVerified */ $block->getPriceId() ?>"<?php endif;?>
        <?= ($block->getPriceDisplayLabel()) ? 'data-label="' . $block->getPriceDisplayLabel() . $block->getPriceDisplayInclExclTaxes() . '"' : '' ?>
        data-price-amount="<?= /* @escapeNotVerified */ $block->getDisplayValue() ?>"
        data-price-type="<?= /* @escapeNotVerified */ $block->getPriceType() ?>"
        class="price-wrapper <?= /* @escapeNotVerified */ $block->getPriceWrapperCss() ?>"
    ><?= /* @escapeNotVerified */ $block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer()) ?>
    <?php if ($block->hasAdjustmentsHtml()): ?>
        <?= $block->getAdjustmentsHtml() ?>
    <?php endif; ?>
    <?php if ($block->getSchema()): ?>
        <meta itemprop="price" content="<?= /* @escapeNotVerified */ $block->getDisplayValue() ?>" />
        <meta itemprop="priceCurrency" content="<?= /* @escapeNotVerified */ $block->getDisplayCurrencyCode() ?>" />
    <?php endif; ?>


texts:
I have added a custom attribute say child_first_name to customer entity. When I try to access through rest API, I can able to get the attribute in the result-

snip..
    {
     "custom_attributes": [   {
          "attribute_code": "child_first_name",
          "value": "No name for student"
       }]
    }

However is it possible to group custom attributes like address in the api result. For example-

snip..
       {
         "child_info": [   {
              "child_first_name": "some name"
           }]
        }


texts: Is there a way that I can export all products on a certain category via CSV or excel file?


texts: Remove "Shipping & Handling" from order emails

texts:
I am trying to remove "Shipping & Handling" from the order confirmation email summary.
Hiding using CSS
.shipping {

   display:none!important;

}

only works in some email clients.
Any other suggestions?


texts:
As we all know that  Magento 2 uses XSD schema files to validate the contents of all module configuration files.

But at that point, I have one question in my mind. How does Magento validate XSD schema?

Is this validated by w3.org ? And, if yes, then what happens when w3.org server goes down ?

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


texts:
I've spend a lot of time to find simple solution for this problem:

I can access to magento site from my mobile app using REST
I have all customer data (email, pass, rest token, id), from APP
I can create cart with some items with REST

After this, i need open external browser without need login (using existing customer data) with "checkout" url

Thanks


texts: Magento 2.3 - Multistore Performance Optimization

texts:
I have Multistore website in Magneto 2.3, But i am facing very serious issues related Performance Optimization.
On 1 store Performance Optimization is Good, But on 2nd store Performance Optimization is very very Bad. can you please guide me why this is happening or i'll create seperate .htaccess file etc for that store or something else.
Thanks & Regards


texts: How to add the configurable product to cart from the product list page

texts:
I want to add the configurable product to cart from the product list page itself.
When I select a color from swatch and add the product to cart, It is Redirecting to details page and able to add the product to cart from there. I need to add it directly from list page.


texts: Module dependent js on/off backend config

texts:
I'm developing a module which depends on jquery and colorboxjs. And i'm doing this giving options on backend config to select yes/no for jquery/colorbox to embed or not individually. And now in the phtml file :

<?php if(Mage::getStoreConfig('Mymodule_options/section_one/jquery_state')): ?>
    jQuery CDN Link || Link to skin/frontend/base/default/Mymodule/js/jquery.js
<?php endif; ?>

And i did similarly with colorboxjs. Is this approach ok for developing module or i have to follow some other way ?


texts: Magento 2 - how to change "Please specify a payment method." message on checkout page?

texts:
I want to update
 "Please specify a payment method." with background color on checkout page.I have updated text in module-sales/i18n/en_US.csv file but this is not working for me.

Please help me.


texts: how to Remove available quantity validation?

texts:
We tried to remove the available quantity validation on "add to cart" and changed the setting "decreasing qty" is No.
Our Client request to remove the quantity validation while addto cart. They produce the product while order from customer. So they dont want available quantity validation.


texts:
How to show 404 for the unlogged user instead of page?
For now, I have: when the user is not logged the page link does not show in the main menu. But when I type the URL (page.com/my_page) I get redirect to my_page.

Any help would be appreciated. Thanks in advance.


texts: Cookie value not updating on homepage Magento 2

texts:
In Magento2.3, I have cookie value not updating on homepage while its updating on other pages.
Even on incognito browser close and reopen cookie value still exist.
Please suggest me way to make cookie working on homepage as well.
I have followed following tutorial to set/get cookie. link
Thank you


texts: Warning: Error while sending QUERY packet. - Magento Migration

texts:
I'm migrating from Magento 1.9.3.3 CE to Magento 2.3.0 EE, I'm facing the below error.

  Warning: Error while sending QUERY packet. PID=5859 in vendor/magento/data-migration-tool/src/Migration/ResourceModel/Adapter/Mysql.php on line 173

I have increased max_allowed_packet to 1G and wait_timeout to 28800 after that also it does not works, it throws the same error.

any help would be much appreciated. thanks


texts: How to use Magento Luma theme for a specific block in the product detail page - product info detailed

texts: I am using the Magento 2 Claue Theme for my Magento 2.3 store, I would like to know if I can use the Magento Luma theme for a specific block which is "product info detailed" in the product detail page?


texts: How to Get all Product Images From pub/media/catalog/product

texts:
I want to Get All Product Images From Catalog/Product Images Directory

I am trying this but not getting Success

use Magento\Framework\Filesystem\Io\File;
use Magento\Store\Model\StoreManagerInterface;

class Index
{
    public function __construct(
        StoreManagerInterface $storeManager,
        File $io
    ) {
        $this->storeManager       = $storeManager;
        $this->_io                = $io;
    }
    public function execute()
    {
        $dir = $this->storeManager->getStore()->getBaseUrl(
            \Magento\Framework\UrlInterface::URL_TYPE_MEDIA
        ) . 'catalog/product';
        $this->_io->chmodRecursive($dir, 0777);
        $images = $this->_io->ls($dir);
        echo $dir;
        print_r($images);
        exit();
    }
}


texts: Remove a city from being able to purchase product

texts:
So in my explorations I've found that Magento only has the States stored in the back end, but I don't want to remove the entire state, just one city in that state. I've seen options to include a city option, or remove city drop down, but I can't seem to find a way to just remove one city.

Am I just over looking something really basic, or am I going to need to dive into the code and log all the cities in every state and then exclude the one city I don't want to allow to order?

Thanks in advance for reading this, and I'm sorry if I'm asking a dumb question but I just can't seem to find an answer.


texts: Which file should be modified/created to enable OPcache?

texts:
Magento strongly recommends PHP OPcache is enabled for performance reasons.
PHP 5.6 with Zend OPcache is installed on my server but i dont know which file should be modified to enable OPcache features.


texts: Magento 2: Filter by custom product/category attribute returns 0 results

texts:
I created a bool (int) attribute with a default value of 0 for both category & product entities.
I reindexed, cleared cache, etc...
Now, no matter what I do, I can't filter the collection using this attribute. It always returns 0 results, no matter if the value is 0/1/null.
Also, when I tried to debug the issue I found out that my custom attributes are missing from catalog_category_entity_int & therefore - there is no default value for this attribute & the query returns 0 because it uses an inner join with this table (is that normal?).
This is how I created those attributes:

    $eavSetup->addAttribute(
        \Magento\Catalog\Model\Category::ENTITY,
        'my_attribute',
        [
            'type'        => 'int',
            'label'       => 'My Attribute',
            'input'       => 'boolean',
            'required'    => false,
            'default'     => '0',
            'sort_order'  => 100,
            'visible'     => false,
            'source'      => \Magento\Eav\Model\Entity\Attribute\Source\Boolean::class,
            'global'      => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
            'nullable'    => false,
            'filterable'  => true,
        ]
    );

    $eavSetup->addAttribute(
        \Magento\Catalog\Model\Product::ENTITY,
        'my_attribute',
        [
            'type'                    => 'int',
            'sort_order'              => 100,
            'label'                   => 'My Attribute',
            'input'                   => 'boolean',
            'source'                  => \Magento\Eav\Model\Entity\Attribute\Source\Boolean::class,
            'global'                  => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
            'visible'                 => false,
            'required'                => false,
            'user_defined'            => false,
            'default'                 => '0',
            'searchable'              => false,
            'filterable'              => true,
            'comparable'              => false,
            'visible_on_front'        => false,
            'used_in_product_listing' => false,
            'unique'                  => false,
            'nullable'                => false,
        ]
    );

-- Any idea?


texts: Need help with Augmented Reality plugin for Magento 2?

texts:
I want to use the Augmented Reality concept on our Magento 2 website. I have searched the plugin for AR but couldn't found.

Can anyone please help me to find out the plugin or point me out the plugin for AR?

Also, is there any demo for AR with Magento 2, please tell me the link to check it.

Any help will be greatly appreciated!


texts: Magento -How can i add static block to another store view

texts: Hello I am new to magento. I have installed magento theme named "galarainbow" and now i want to add Arabic store view for it, but my problem is static blocks I have recreate static blocks with same name and code and added each one to different store view, but the new store block doesn't appear how can i make it visible?


texts: Extension no longer exists. Why am I able to disable it in the Advanced area in Admin?

texts:
I have removed all records of my extension from the  file system and also the database. However, I am still able to enable or disable the output of it in the admin area.

How can I remove the option from 'Disable Module Output'?

I am trying to simulate what would happen on initial install of the extension.


texts: How to I enable Magento 2 developer mode with just Nginx directives?

texts:
I am using Nginx with 2 websites on.
The first Server Config I have is:

server {
   listen 80;
   server_name "sh.dev";
   access_log /var/log/nginx/sh-access.log;
   error_log /var/log/nginx/sh-error.log;
   include /var/www/sh/project/nginx.conf;
   set $MAGE_ROOT "/var/www/sh/project";
   set $MAGE_MODE "developer";
}

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

And it is in developer mode, the second site uses a direct name for upstream:

server {
   listen 80;
   server_name "magento2.dev";
   access_log /var/log/nginx/magento2-access.log;
   error_log /var/log/nginx/magento2-error.log;
   include /var/www/magento2-test/magento2/nginx.conf.sample;
   set $MAGE_ROOT "/var/www/magento2-test/magento2";
   set $MAGE_MODE "developer";
}

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

But I had to manually change the mode with:

bin/magento deploy:mode:set developer

Then if you throw an exception is Magento/Framework/App/Bootstrap.php:

public function run(AppInterface $application)
{

   throw new Exception('Break this thing');

    try {
        try {
            \Magento\Framework\Profiler::start('magento');
            $this->initErrorHandler();
            $this->initObjectManager();
            $this->assertMaintenance();
            $this->assertInstalled();
            $response = $application->launch();
            $response->sendResponse();
            \Magento\Framework\Profiler::stop('magento');
        } catch (\Exception $e) {
            \Magento\Framework\Profiler::stop('magento');
            if (!$application->catchException($this, $e)) {
                throw $e;
            }
        }
    } catch (\Exception $e) {
        $this->terminate($e);
    }
}

It should show the error on the front, but it does not.


texts: How to make a php file at Magento root directory through plugin

texts: I want to make a php file at plugin root directory by code . Is there some way that plugin could make a php file at root directory . If yes then what is the procedure.


texts: Remove all buttons from customer edit page in adminpanel magento 2

texts: I want remove all buttons from customer edit page in adminpanel in magento 2


texts: Currency not changing and price conversion not working as well

texts:
I have created multilingual website with two different storeviews, one in English and another in Chinese. I can say that I have installed the Chinese language package properly as result is visible.

I have even setup currency for Chinese storeview to Chinese in

  Store>Configuration>General>Currency Setup

I have imported the currency rates from

  Stores>Currency Rates

In this page I have clicked import by selecting Yahoo Finance Exchange from Import Service Dropdown.

On frontend whenever I click Chinese language I can see the change in language in most of the areas but currency is unchanged. '$' sign persists and price also remains the same and product names are same as well.

What else is needed to have a complete multilingual website?


texts: Magento 2, preference for Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection does not work

texts:
When filters  + Ancor is enabled for category, sorting by product name doesn't work. I know the fix as I tested in  Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection. So now I'm trying to override it in my module but below does not work. It still reads from core file.

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection" type="MyVendor\Mymodule\Model\ResourceModel\Fulltext\Collection" />
</config>

Below did not work too:

 <virtualType name="MyVendor\MyModule\Model\ResourceModel\Fulltext\CollectionFactory" type="Magento\Catalog\Model\ResourceModel\Product\CollectionFactory">
            <arguments>
                <argument name="instanceName" xsi:type="string">MyVendor\MyModule\Model\ResourceModel\Fulltext\Collection</argument>
            </arguments>
 </virtualType>


texts: How to call controller method from another controller/file in magento 2

texts:
I have controller with following functions,

<?php

namespace Custom\Module\Controller\Adminhtml\UpdateData;

class Save
{

    /**
     * @return void
     */
    public function execute()
    {
       /* ----------
        Code
       */
    }
     /**
     * @return void
     */
    public function getData($param1)
    {
       /* ----------
        Code
       */
    }

}

How to call getData from another controller/file in Magento 2.


texts: An error while passing a new order in magento2

texts:
I made a new installation of Magento 2.2.3, everything is working just fine.

However, when I do pass an order this error msg shows up:

An error occurred on the server. Please try to place the order again.

when I checked the log, this is the detailed msg:

Registry key "sales_order_status_before" already exists {"exception":"[object] (RuntimeException(code: 0): Registry key \"sales_order_status_before\" already exists at public_html/vendor/magento/framework/Registry.php:51)"} []

and there's nothing on the internet about it!

Any Help will appreciate.


texts: Is it possible to change the Magento 2 admin panel to a responsive layout?

texts: Are there any methods or tutorials to turn magento 2.0 admin panel as a mobile responsive template?


texts:
My product page is in 3 colums.

How do I put all my swatches in both colum 1 and 2?

I think I need to close a DIV in view.html.

But when I close DIV in view.html - my 3. colum goes down below all.
enter image description here


texts: Increase Max length of image name of Magento 2.3.5 error message:(was not uploaded. Filename is too long; must be 90 characters or less)

texts:
When I import product data or I upload image directly to a product I get the following message
(was not uploaded. Filename is too long; must be 90 characters or less)
Recently my magento has been updated and I didn't have this problem before.
Does anyone know how I can increase the number of characters slightly?


texts: Magento 2 : Newsletter Subscription Discount

texts:
I would like to implement something like,

If Customer/Visitor subscribe to newsletter than he will get discount worth 5.

How can i achieve this ? Need some guidance.


texts: magento 1.9 | how setStockData on collection

texts:
i have this code

$productCollection = Mage::getModel('catalog/product')->getCollection();
        $productCollection->addAttributeToSelect('SKU')
            ->addAttributeToFilter('modelnumber', $params['modelnumber'])
            ->addAttributeToFilter('attribute_set_id', '10')
            ->joinField(
                'qty',
                'cataloginventory/stock_item',
                'qty',
                'product_id=entity_id',
                '{{table}}.stock_id=1',
                'left'
            )
            ->getFirstItem();

        $productCollection->setStockData(array(
                'use_config_manage_stock' => 1,
                'manage_stock'=>1,
                'is_in_stock' => 1,
                'qty' => 25
            )
        );

        $productCollection->save();

But i have error

 Call to undefined method Mage_Catalog_Model_Resource_Product_Collection::setStockData()

How i can save stockData ?


texts:
I want to filter custom collections with JSON field filters. In the below image, there are 2 fields category and product. They have JSON value.

I am able to get collection by Direct SQL query by below code.
$connection = $this->resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);
$table=$this->resource->getTableName('table_name');
$data = $connection->fetchRow('SELECT * FROM ' . $table. ' where  JSON_CONTAINS(product,\'["2"]\')');

Below is the output
Array
(
    [xyz_id] => 19
    [xyz_with] => Syncro System
    [category] => ["2", "3"]
    [product] => [["1", "2"]]
)

But I want to filter this collection by Magento way like below example
$collection->addFieldToFilter('product', ['eq' ->> $id]);

Please let me know how can I do this by Magento way.


texts: How do I change color of arrow on product detail page

texts:
I need to change the color of the arrow on the product detail page.

I think that arrow is not an image.


texts: Magento 2.3.4, Checkout has no shipping Methods, and no way to continue

texts:
My Magento 2.3.4 site, has an error I cannot identify. The Checkout process has no shipping methods, and has no way to continue.  You can enter or select an address, but the shipping methods are blank, and there is no way to proceed to the next step.

I can find nothing in anything in any logs, and I don't know what this could be, or how I can troubleshoot this.  I can provide additional details on request, and will post them right away.


texts:
I'm working on a custom module to export any new orders periodically throughout the day. I've read through countless descriptions of how to set up cron with for a custom module and it seems like I'm doing everything right, but yet it doesn't seem to be doing anything. The module is showing as enabled in admin and the default cron jobs are running. I'm using a custom name for my module's cron group, but that group does not show up when I attempt to configure it under Stores > Configuration > Advanced > System and my job never shows up on the cron_schedule table.

Here is my vendor/module/etc/crontab.xml:

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

and my vendor/module/Cron/Test.php

<?php
namespace spinst\OrderExport\Cron;
use \Psr\Log\LoggerInterface;

class Test {
    protected $logger;

    public function __construct(LoggerInterface $logger) {
        $this->logger = $logger;
    }

    public function execute() {
        $this->logger->info('Cron Works');
    }

}

Does anyone have any tips as to what I could be doing wrong?


texts:
I have a multi site store with a third party payment system, Klarna.

The module works fine on one site, but on other stores, fails and generates the following error.

I have checked that the module output isn't disabled at the store level but am unsure how to proceed from here.

Any tips or pointers would be appreciated.

exception 'Mage_Core_Exception' with message 'Ugyldig bloktype: Mage_Klarna_Block_Frame' in /home/httpd/tapetstore/tapetstore.se/app/Mage.php:594
Stack trace:
#0 /home/httpd/tapetstore/tapetstore.se/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Ugyldig bloktyp...')
#1 /home/httpd/tapetstore/tapetstore.se/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('klarna/frame', Array)
#2 /home/httpd/tapetstore/tapetstore.se/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('klarna/frame', 'klarna_form')
#3 /home/httpd/tapetstore/tapetstore.se/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('klarna/frame', 'klarna_form')
#4 /home/httpd/tapetstore/tapetstore.se/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /home/httpd/tapetstore/tapetstore.se/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /home/httpd/tapetstore/tapetstore.se/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /home/httpd/tapetstore/tapetstore.se/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /home/httpd/tapetstore/tapetstore.se/app/code/core/Mage/Checkout/controllers/CartController.php(159): Mage_Core_Controller_Varien_Action->loadLayout()
#9 /home/httpd/tapetstore/tapetstore.se/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Checkout_CartController->indexAction()
#10 /home/httpd/tapetstore/tapetstore.se/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#11 /home/httpd/tapetstore/tapetstore.se/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /home/httpd/tapetstore/tapetstore.se/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#13 /home/httpd/tapetstore/tapetstore.se/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#14 /home/httpd/tapetstore/tapetstore.se/index.php(88): Mage::run('tapetdk', 'store')


texts: Magento 2 - How to Manage different theme for different store?

texts:
We have multi Stores site. And we have created 4 stores on a single website and we want a different design for all the stores.

Can anyone tell how to set different themes for the different store.?

And also I want to set the different domain for the different store in single Magento.

If anyone knows how to set multi stores with multi-domains? Then, please let us know.

Your help will be appreciated.

Thank you in advance.


texts: Forgot to change the url of store address when installing magento 2

texts: I was installing Magento 2 in name magento folder but some reason it was unsuccessful. So again I tried installing it in magento1 folder but while setup, I forgot to change the old store address that is http://localhost:8080/magento. Now magento installed successfully but with old address and there is no files in that magento folder. Then i copied all magento files from magento1 folder to magento folder. But problem not solved. Is there any solution for it or I have to again do the fresh magento installation?


texts: How to change customer price group on customer account update?

texts:
I have a custom customer attribute (registrationcode), on the registration form when the customer gives a code it automatically set the good group price.
How to update the group price when the customer gives a code when it updates the attribute on this account page?


texts: Error one page checkout with city and region "Please use letters only (a-z or A-Z) in this field."

texts:
When I have a customer with a city like New York, it gives this error: Please use letters only (a-z or A-Z) in this field.

Some with the region, you can not have a " " in it ? Where do I need to change this.

This is the site www.deli-discount.nl


texts: Magento 2 how convert package weight to Kilogram (KG)

texts:
I have a custom shipping method in Magento 2, i successfully got the package weight by using this code in Model/Carrier.php :

$weight = $request->getPackageWeight();

but the default system measurement is not in KG or grams,is there any way to detect the type of measurement for package weight and convert it to KG?


texts: Magento 2 site does not work after migrating to another server

texts:
I've recently moved a Magento 2 site to a new server. I'm facing a strange problem. Whenever I hit the URL in any browser, it downloads a system file instead of taking me to the site. It doesn't generate any error log. I've tried with different browsers but the problem persists.

I removed all the cache files and still doesn't work. I've never had this issue. Any idea what might cause this error?

Thanks for the help in advance!


texts: Special price for child products from configurable in cart promotions

texts:
I had some trouble setting up a promotion rule for configurable products. The rule is aplly a discount for all products with no special price. The rule is simple, but then I realized that the spoecial price is placed only in the configurable product and not in the child product associated to this configurable product. The result is that if I have a product with special price and someone buys size X, this product with size X soen't have special price and the rule doesn't work.
How can I solve it?
Many thanks!!!!

(Magento 1.9)


texts: OneStepCheckout - Add new step where I can add more products to Cart

texts:
I'm adding a new step in OneStepCheckout page, after Billing and before Payment, where the user can see and choose other special products just once.

But the problem is that I'm not able to add those to the cart.

In /app/code/local/Mage/Checkout/Model/Type/Onepage.php I'm adding

public function saveAddons($data){

    if ($this->getQuote()->hasProductId(113)) {
         $this->getQuote()->removeItem(113);
    }

    if ($data['newProduct'] == 1) {
        $product = Mage::getModel('catalog/product')->load(113);
        $params = array(
            'product' => 113,
            'qty' => 1
        );

        $this->getQuote()->addProduct($product, $params);
    }

    $this->getQuote()->save();

    $this->getCheckout()
    ->setStepData('addons', 'allow', true)
    ->setStepData('addons', 'complete', true)
    ->setStepData('payment', 'allow', true);

    return array();
}

There's something wrong on that piece of code. Any help would be much appreciated.


texts: How to move coupon code to shipping step of checkout in Magento 2?

texts:
I am trying to move coupon code to shipping step instead of payments & review step. how this can be implemented?

I need discount code form to appear in shipping step after shipping methods display.


texts: How to know if attribute is used for sortby or not from product listing page

texts:
Backend > Edit Product attribute > Frontend Properties > Used for Sorting in Product Listing => Yes allows products to sort by product attribute.

I'm building another view in product listing in tabular form, so while printing the products attributes and values, how can i know if the attribute is used for sorting or not ?

I'm getting products attributes as

<?php foreach ($_item->getAttributes() as $_attribute):
     if ($_attribute->getIsComparable() == 1): ?>
       <th>
          <?php echo $_attribute->getStoreLabel(); ?>
          <!--/ Right here i want to know if this attribute is used for sorting or not from backend with sort url-->
      </th>
<?php endif; endforeach; ?>


texts: Ignoring Child Product Attributes in Layered Navigation

texts:
How would I go about modifying layered navigation to only look at attributes on the parent configurable product, and not the child?

Child and parent products both have the attribute set and it is used in other places.  For example, products all have a color, including the parent.  The parent's color isn't always the same as the child's, but it is indicative of the default color.  When we filter to a specific color we only want to show items where the parent is set to that default color.  Configurable products are visible and simple (child) products are hidden.  There are some individual simple products which are not children and are visible which must also remain functional.


texts: image frontend_type field in system.xml does not upload, gives error

texts:
i made a custom module and in system.xml i have defined an image field like so:

<banner_image translate="label" module="my_theme">
    <label>Banner Image</label>
    <frontend_type>image</frontend_type>
    <backend_model>adminhtml/system_config_backend_image</backend_model>
    <upload_dir config="system/filesystem/media" scope_info="1">theme</upload_dir>
    <base_url type="media" scope_info="1">theme</base_url>
    <sort_order>1</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>1</show_in_website>
    <show_in_store>1</show_in_store>
    <comment>Press "Save Config" (upper right button) to upload the picture file</comment>
</banner_image>

the problem is that when i press "Save Config" to upload the file i get the following error in the log:

2015-05-05T14:24:25+00:00 ERR (3): Notice: Undefined index: groups  in /chroot/home/mysite/html/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php on line 51

and no image appears
(using Magento 1.9.1.0)

any help will be appreciated

thanks


texts: Help me understand how Google bots find product "id" links and how to block without negative impact

texts:
I've been periodically checking Google Webmaster Tools and recently noticed a large number of ERROR 500 messages for links to pages that do not exist.

Example:

http://www.mysite.com/eng/catalog/product/view/id/21826/s/URL_KEY/ RESPONSE CODE 500

The ID and URL KEY is valid on their own and correctly identify the product. The product does exist and if I change the URL to:

http://www.mysite.com/eng/URL_KEY.html

the page opens. Using the ID in the backend also shows the correct product.

All links to product pages in the frontend are in this format: http://www.mysite.com/eng/URL_KEY.html
 there is no reference to any URL that is using /catalog/product/view/id/21826/s/URL_KEY/.

How are Google bots finding these links if there is no reference in the frontend?

Can I safely Disallow: /catalog/ in my robots.txt to avoid error message in Google Webmaster Tools without negatively impacting my site?

Thanks!


texts: How to get field value in adminhtml grid based on other table? For example I have in table id of record from another table which have field "name" and need to show field "name" instead of id.


texts: Magento 2: Some products are out of stock

texts:
I don't understand why some products are out of stock (they have quantity and are in stock).
I imported an csv with all products. For some products the price is shown (they are in stock) and for some products is shown out of stock. I checked and is no difference (in admin and csv). I also checked orders and that products are not ordered.


texts: Override form.phtml to customize contact us form?

texts:
I am calling the contact form on my CMS page using this (as per this):

{{block class="Magento\Contact\Block\ContactForm"
 name="contactForm" template="Magento_Contact::form.phtml"}}

I duplicated:

/vendor/magento/module-contact/view/frontend/templates/form.phtml

and placed it in my theme folder:

app/design/frontend/[vendor]/[my Theme]/Magento_Contact/templates/form.phtml

Cleared caches but the form is still pulling from the core. Did I miss a step?


texts: I have multiwarehouse concept in my site. So I want to add 1.25 to shipping charge. I wrote the functionality so its adding 1.25 depends upon how much products I have added from warehouse.Suppose I have added three products from three warehouse so its adding 3.75(1.25+1.25+1.25= 3.75). But I want 1.25 if we add any products from multiple warehouse.


texts: Error while create customer attribute : Wrong attribute group ID

texts:
I am creating customer attribute but getting error run while setup upgrade command

Wrong attribute group ID

here is my code for create customer attribute

<?php
namespace Vendor\CustomerFeedBack\Setup;
use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\UpgradeDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Customer\Api\CustomerMetadataInterface;
use Magento\Customer\Setup\CustomerSetupFactory;
/**
 * @codeCoverageIgnore
 */
class UpgradeData implements UpgradeDataInterface
{
    /**
     * EAV setup factory
     *
     * @var EavSetupFactory
     */
    private $eavSetupFactory;
    private $eavConfig;
    private $customerSetupFactory;
    /**
     * Init
     *
     * @param EavSetupFactory $eavSetupFactory
     */
    public function __construct(EavSetupFactory $eavSetupFactory,\Magento\Eav\Model\Config $eavConfig,CustomerSetupFactory $customerSetupFactory){
        $this->eavSetupFactory = $eavSetupFactory;
        $this->eavConfig       = $eavConfig;
        $this->customerSetupFactory = $customerSetupFactory;
    }

    /**
     * {@inheritdoc}
     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
     */
    public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context){
        /** @var EavSetup $eavSetup */
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        if (version_compare($context->getVersion(), '1.0.1') < 0) {
            $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
            $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, 'customer_feedback', [
                'label' => 'Referral Sources',
                'input' => 'text',
                'type' => 'varchar',
                'source' => '',
                'required' => false,
                'position' => 0,
                'visible' => true,
                'system' => false,
                'is_used_in_grid' => true,
                'is_visible_in_grid' => true,
                'is_filterable_in_grid' => true,
                'is_searchable_in_grid' => true,
                'backend' => ''
            ]);
            $attribute = $customerSetup->getEavConfig()->getAttribute('customer', 'customer_feedback')
                ->addData(['used_in_forms' => [
                    'adminhtml_customer'
                ]]);
            $attribute->save();
        }
    }
}

can anyone help me with same...

Magento version 2.2.6


texts: How to create Fields in Customer Address in magento 2.3 on Frontend and admin panel

texts:
I don't have any idea how to do that.
Can any one help me with this


texts:
Trying to add the new Facebook pixel to Magento 1.9.1.1.  So it can appear on all pages.

I have added the following to app/design/frontend/rwd/CustomTheme/layout/local.xml between

<?xml version="1.0"?>
  <layout version="0.1.0">
    <default>
      <reference name="head">
        <action method="addItem"><type>skin_js</type><name>js/facebook.js</name></action>
      </reference>
    </default>
  </layout>

also tried

<reference name="head">
  <action method="addJs"></action>
</reference>

and have added the following NEW Facebook pixel to js/facebook.js

It fails to load the Facebook pixel in my source code?  What have done wrong?

How do you add any script to the head area otherwise?


texts: Magento 2: How to get current shipping address country in shipping.html?

texts:
How to get current shipping country in below file?

magento\vendor\magento\module-checkout\view\frontend\web\template\shipping.html

<li id="opc-shipping_method"
    class="checkout-shipping-method"
    data-bind="fadeVisible: visible(), blockLoader: isLoading"
    role="presentation">
    -------- HERE ----------
</li>


texts: Confusion with Magento blocks and layouts

texts:
I'm trying to move my upsells out of the product 'content' view and into their own section within the template.

My XML looks something like this:

<catalog_product_view translate="label">
    <reference name="root">
        <action method="setTemplate">
            <template>page/2columns-left.phtml</template>
        </action>
    </reference>
    <reference name="content">
        <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
            ...other blocks...
            <block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml" />
            ....other blocks...
        </block>
    </reference>
</catalog_product_view>

Then, within 'page/2columns-left.phtml' it calls $this->getChildHtml('content') which renders the catalog/product/view.phtml, and then within THAT file a call is made to $this->getChildHtml('upsell_products').

What I'm trying to do is move the 'upsell_products' out of the main 'content' view (because that is wrapped in the right column of the template), and move it into the main 2column template, so that the upsells can actually sit below the 2 column layout and span the full width of the page, rather than being constrained to the right column. I know I should probably create a new template as this is more than just 2 columns now, but what is the proper way to set this up? I thought I could just call '$this->getChildHtml('upsell_products')' from within 2columns-left.phtml, but it doesn't do anything. I've tried a bunch of different stuff like moving it to its own block outside of reference, and a few other things, and none of it seems to work. I hope I've included all the pertinent information.


texts: Is there a way to assign a default image to an option in Option Templates?

texts:
I have created several custom option templates, all of which have images that I have loaded for each value in a given option.

However, what I want to do is have a default image for the option that will show until an option is selected. I know that I can set an option to be selected by default. That works fine but we do not want to preselect an option for a customer in this way. Unfortunately, if we do not have a value selected for the option, then no image shows up as shown in the image below.

Obviously I can include some text in the Note field for the option, but I also need a way to include a default image in the General Information screen (shown below) and I have no idea how to add that functionality.

Thanks to anyone who can/will help with this issue.


texts: Install 3rd party livechat script into our Magento store

texts:
We want to install a live chat tool onto our Magento store.
The tool is from LiveChatInc.com and requires you to add their javascript snippet before the closing  tag of the site.

Is this as simple as adding the code snippet to: System > Configuration > Design > HTML Head > Miscellaneous Scripts ?

There code snippet is JavaScript


texts: Class Magento\Eav\Model\Entity\Increment\Numeric does not exist in magento 2.0.7

texts:
After Migration from Magento 1.9.2.4 to Magento 2.0.7 when I go to create a customer and fill all the information and click on submit, it show me error

We can\'t save the customer.

After debug I found the error below:-

Class Magento\Eav\Model\Entity\Increment\Numeric does not exist

How can I solve it.

Where I get the missing file.


texts: How to translate static content within CMS

texts:
I have a language pack installed and its working but it does not work for my own static content I have created within the CMS.
For example I created a page within the CMS.

Hello world

How can I get that to translate?


texts: Dynamic value not working in addFieldToFilter

texts:
I have a data provider to filter data in admin grid magento2, so I do:

namespace vendor\module\Ui\Component\DataProvider\SearchResult;

class Items extends \Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult
 protected function _initSelect()
    {
    //$name is a varible get data from Request URL like:
     $name = substring($_SERVER["REQUEST_URI"], 5, 6);
    // and ..
    $this->addFieldToFilter('name', $name); // not working
    // but with static $name like
    $this->addFieldToFilter('name', "john"); // working
}


texts: Magento 2 - How do I track login/register/subscribe with JavaScript?

texts:
In Magento 2 I need to invoke some JS tracking when the following things happen:

customer logs into site
customer registers account
newsletter subscribe success
customer updates account details
order success

Apart from order success which has an actual page to trigger the JavaScript, I'm not sure on the best way to track the other events seeing as their success seems to be fully handled by PHP only.

Regarding the login/register requirement I have seen that there's a JS handler in module-customer/view/frontend/web/js/action/login.js which has this:

action.registerLoginCallback = function(callback) {
        callbacks.push(callback);
    };

But I'm not sure how this can be hooked into in my module. Are there any resources that could help here? I'm just looking for suggestions on the best practice way to approach this.


texts: Magento2 custom module redirection on catalogsearch page issue

texts:
I have created one custom module Coupon_DiscountCoupon in Magento 2.2.3 but after accessing it from URL it is redirecting me on catalog search module https://alice-dorsia.betaroiup.com/index.php/catalogsearch/result/?q=Coupon_DiscountCoupon
Can anyone help me in finding valid URL for accessing that custom module in Magento 2.2.3?


texts: Magento 2 - Is it safe to remove the DEFINER=.. statement from sqldump?

texts:
I have a web server that serves Magento2 and a MySQL Server that hosts the database and both of these servers are in a single ubuntu instance.
I would like to move the MySQL server to a separate RDS MySQL instance, so I have dumped the database with mysqldump as root user and while uploading it to RDS MySQL instance I get:
"ERROR 1227 (42000) at line 2873: Access denied; you need (at least one of) the SUPER privilege(s) for this operation"
I have checked for the solution and removed DEFINER with sed 's/\sDEFINER=[^]*@[^]*//g' -i dumpedfile.sql and after removing DEFINER the upload worked without any error.
My question is, what exactly definer is, is it safe to remove it from the dumped file of a Magento 2 database?


texts: How to charge different $ amounts for different time (delivery) intervals?

texts:
Magento 1.9.1
Amasty Delivery Date extension

I have the Delivery Date extension from Amasty

( https://amasty.com/media/user_guides/delivery_date_user_guide.pdf )

It allows me to setup different time intervals (for example 8 a.m. - noon) for delivery. I would like to charge for this - something like:

before 10 a.m. = $10
before noon = $7
same day afternoon = $5

I can set the time intervals no problem but how to change the code in order to assign the dollar value to the time interval and add it to the shopping cart total? I will have a friend help me with this but he is not familiar with Magento and I hope to get some info to point him in the right direction.

Updated January 15th, 2018:

I am looking for any which way to accomplish this. It doesn't necessarily have to be through the delivery date extension from Amasty. Just to be able to setup delivery time intervals and charge for them when the customer selects this. Paying for a custom solution is not an option for us.


texts: How to get the stock quantity of simple products associated with configurable product?

texts:
I can get the stock quantity of simple products but not for simple products which is attached with configurable products.
Below is my code for simple product
<?php echo $StockState->getStockQty($product->getId(), $product->getStore()->getWebsiteId());?>

How can I get the stock quantity for simple products which is associated with configurable product. Please help