texts:
How to keep this code result on single line (no split). The result is displayed on a table and the column width is splitting the result in two lines. How to keep the output on single line? How to use the echo to fix that problem?
Thank you!

$price = sprintf("%0.2f", $price);

$parts = explode('.', $price);

echo "$parts[0]  ,$parts[1] USD";


texts: Calling Controller action after running code

texts:
I am creating a custom form essentially from scratch. The form will be an alternative UI for a product page, which when submitted, does the same thing as the normal add to cart.

I'd like to borrow from the checkout/cart/add controller without copying or rewriting the code, but before I submit I need to run own custom function (to create a file).

Is there any way I can achieve this? Eg, is there an event for an Observer I can use or is it possible to have two Controllers execute one after the other?


texts:
I have created multiple website from magento admin, also as per the magento devdocs I've followed the instructions for multi website sub-folder architecture.

However its throwing me below error. also I found that my default magento website throwing me the same  error after processed with multi-website scenario. click here for error info

Also I've followed this link


texts: To generate mobile app in magento using mofluid

texts: i already configured mofluid to my magento(1.9 ver) local host,but the problem is while creating android mobile app it's showing "localhost or local IPs are not allowed. please use Mofluid with Staging or Production Environment." How to resolve this things.Thanks in advance.


texts: Magento2.2.2 : Custom Category Attribute value Not Saving?

texts:
I've create a module to add a custom attribute to my categories,the field shows on my category pages but it doesn't save the values?

Working on Magento ver. 2.2.2

Can anyone advise why this isn't working.

  /app/code/NameSpace/CategoryAttributes/Setup/InstallData.php

<?php

// File: Namespace/Module/Setup/InstallData.php

use Magento\Framework\Setup\{
    ModuleContextInterface,
    ModuleDataSetupInterface,
    InstallDataInterface
};

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;

class InstallData implements InstallDataInterface
{
    private $eavSetupFactory;

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

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(\Magento\Catalog\Model\Category::ENTITY, 'ss_category_color', [
            'type'          => 'varchar',
            'label'         => 'Category Color',
            'input'         => 'text',
            'source'        => '',
            'visible'       => true,
            'default'       => '',
            'required'      => false,
            'user_defined'  => false,
            'global'        => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
            'group'         => 'General Information',
        ]);
    }
}

  /app/code/NameSpace/CategoryAttributes/view/adminhtml/ui_component/category_form.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!-- Namespace/Module/view/adminhtml/ui_component/category_form.xml -->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="general_information">
        <field name="ss_category_color">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="sortOrder" xsi:type="number">100</item>
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="formElement" xsi:type="string">input</item>
                    <item name="label" xsi:type="string" translate="true">Category Color</item>
                    <item name="required" xsi:type="boolean">false</item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>


texts:
This is my first time posting on this forum. I have installed magento 2.0.7 in a cPanel hosting account. All is going well so far, I have added almost 1000 products already and I have also installed a new theme as well. The only problem I have are pages not loading completely every now and again on the backend doesn't matter what I'm doing, so I have to refresh the page for it to load fully, sometimes 2 or 3 times, it looks like and ajax issue. However that is a different problem.

The point of this post is post is to find out if I HAVE to run the
magento setup:static-content:deploy command or not. As stated I have installed Magento 2.0.7 successfully in a cPanel account and it has been working fine since the installation completed. I have installed magento 2.0.7 on a VPS as well but noticed that the storefront would not load correctly till I ran magento setup:static-content:deploy, which is not the case here. So please tell me whether It is still necessary to run the command or if it is fine the way it is.


texts: Limiting javascript includes by store within a module

texts:
I have a payment module that requires a bit of javascript on the checkout page for stores where it is enabled. The good news is that it is correctly including the link on the checkout page. Unfortunately, its also including the link on every other page and in every store.

How do you setup a javascript include to only appear in a certain section and only in stores where it is enabled?


texts:
What are pros and cons for observing following events?

entity_manager_save_after
controller_action_catalog_product_save_entity_after

Which one is better to use and why?
And which one is better if I need to make a list of modified fields of the saved object?


texts: How to prevent new order email from frontend and allow it only from backend for a particular website?

texts:
We have a multi-store ecommerce site. Each store is separate website. For one particular website (say website with id '6'), the new order email should not be triggered while the customer places the order.

But when the admin checks the order in the admin panel and then push the "sent email" button, now the email should go to the customer.

What I tried:

overriden Mage_Core_Model_Email_Template::sendTransactional method and replaced $this->setSentSuccess($this->send($email, $name, $vars)); with

if($storeId == 6){
        $this->setSentSuccess(false);
    } else{
        $this->setSentSuccess($this->send($email, $name, $vars));
    }

But this won't check if it is invoked from frontend or backend. Can someone give me a hint?


texts: Magento 2.3.5 - Category sorting is not saved when drag and drop

texts:
When we change the sorting of subcategories, by drag and drop in the admin panel, these new sorting is not saved. When we refresh the page, it randomize all subcategories and there is no logic in the sorting.
How can we solve this issue?


texts: How to use store credit for a cart in magento 2 api

texts:
Magento version: EE 2.2.5

I have a customer with store credit.

I created cart using

rest/default/V1/customers/:customerId/carts

And I added items to that cart using

rest/default/V1/carts/:cartId/items

And added shipping information using

rest/default/V1/carts/:cartId/shipping-information

But i need to apply store credit for this order using API.

How that can be done?
which API I have to hit ?
Or is there something i have to add in request body?


texts: How to add 3rd level category to scrolling dropdown list

texts:
I have long drop down list of subcategory which also includes third level subcategory. i have added using css tricks
reference: https://css-tricks.com/long-dropdowns-solution/
now im unable to display third level category... it has to display side of subcategory. provide me proper guidelines


texts: Unable to refresh the page after generating PDF file in order grid

texts:
We have kept one button in mass action in orders grid, upon clicking it should generate a PDF file, which is working fine, but after generating PDF the should refresh automatically. That's we are having issues, we are unable to refresh it after generating PDF file.

Actual Problem: Our goal is to generate PDF and refresh the page after PDF is generated. Our PDF is generated properly but after it get download the page is not refreshing.

1) We have tried to put header function of PHP to refresh/redirect. but is not working as header is already set to download data

$name= $this->fileFactory->create(sprintf('manifest_%s.pdf', $this->dateTime->date('Y-m-d_H-i-s')),$pdf->render(),DirectoryList::VAR_DIR,'application/pdf');
header("Location: http://google.com");
exit;

2) We have set the cookie while downloading the PDF and if cookie is set then we redirect page from JQUERY script with window function. but its not working as it is unable to facth cookie value.

setcookie("redirectCookie", 'test');
header("Content-Type: application/octet-stream");
$file = "mansi1.pdf";
header("Set-Cookie: fileLoading=true");
header("Content-Disposition: attachment; filename=" . urlencode($file));
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Description: File Transfer");
header("Content-Length: " . filesize($file));
flush(); // this doesn't really matter.
$fp = fopen($file, "r");
while (!feof($fp))
{
echo fread($fp, 65536);
flush(); // this is essential for large downloads
}
fclose($fp);

//jquery code//
setInterval(function(){ console.log($.cookie("redirectCookie"));  if ($.cookie("redirectCookie") )     {        $.removeCookie("redirectCookie");        window.location.href = "http://google.com";    }},1000);
//jquery code//

3) We have called curl url and in that url we have written code to download PDF and if response get true then redirection will be done but this is also not working

//curl called //
$url    = 'url_to_generate_pdf';
$params = array();
$this->_curl->get($url);
$this->_curl->post($url, $params);
$response = $this->_curl->getBody();
//this part not executing //
$resultRedirect = $this->resultRedirectFactory->create();
$resultRedirect->setPath("ordergrid/*/");
return $resultRedirect;
//curl called //

Note: We are exporting PDF using headers.


texts: Clear log files from database and cache/temp files from magento root

texts:
I want to deploy a magento site. But firstly I need to clear temp/cache files from magento directory as well as database.

I don't know how to do both by a single script.

  Note :- Need to remove only temp files from directory and database.


texts: Cannot Enter Magento admin panel and credentials are not working

texts:
http://lecoqcuisine.com/admin
This is website was created in magento  few years back and this magento version is also out-dated now.
i have a requirement to update few pages on website. But credentials i have is not working and forget password email id is also deactivated few years ago.
Please help how to get into admin panel , so i can change front end and fix website.
Thanks In Advance !


texts: Shipping cost not updating on state change for Spain website in multi-store

texts:
I'm using Amasty Checkout in multi-store website(Spain & Portugal).
In cart page default country and state was setting from Amasty_Checkout. But estimated shipping cost is displaying only in Portugal website, not in Spain website.
Also when state change shipping cost was not updating. Based on selected region shipping cost is updating only after page load.
We already checked that there is no console errors, but in network we find that the estimate-shipping-methods API was not sending region data in Spain website.


texts: I have failed my PCI scan and one of the issues is, "Indexable Web Directories". This included /errors/, /icons/, /icons/small/ etc. How do I resolve this without causing issues with my storefront?


texts: Fundamentals of Magento 2 Development - quizzes

texts:
Fundamentals of Magento 2 Development ( https://u.magento.com/fundamentals-of-magento-2-development#.WkajSSOBiqA ) contains quizzes. How many attempts is there to solve the quiz?
There is only vague information "Once you start, your attempt is considered as counted, even if you do not submit or answer any questions."
But can't find any info, if there is only single attempt allowed, or if the quiz can be repeated (if so - how many times)?


texts: customer login not working in magento 1.9.2.1

texts:
I used

<input type="hidden" name="form_key" value="<? echo Mage::getSingleton('core/session')->getFormKey(); ?>" />

Code to resolve the issue but not worked. Please help me


texts:
I am running a cron that will email the products sold report daily.
The issue I am having is that when I create the blocks in the cron model, the grid template attempts to load from frontend design path:

CRIT (2): Not valid template file:frontend/base/default/template/report/grid.phtml

The path for the template should be: adminhtml/default/default/template/report/grid.phtml

My code to build the block is:

$layout = Mage::app()->getLayout();
$block = $layout->createBlock('adminhtml/report_product_sold');
$grid = $block->getChild('grid');
$html = $grid->toHtml();

I am sure I am just missing something obvious, but cannot fathom what at this point :(


texts: JavaScript : All Magento Js to the bottom [Problem]

texts:
I have put on my page.xml a new block for add my minify magento scripts to the bottom.

<block type="page/html_head" name="javascript" as="javascript" template="page/html/javascript.phtml">
   <action method="addJs"><script>scripts.js</script></action>
</block>

And in my template just before </body> :

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

It's perfect and scripts.js load now to the bottom.

But I don't understand because when I load scripts.js to the bottom nothing works correctly on my frontend and if I move to the top it's perfect...

Thanks for your help.


texts:
Is there any free shipping method plugin for Canada Post . There are two plugins in magento marketplace for canada post but they are very expensive.
Thanks


texts: Can't disable Magento Extension - Cache cleared

texts:
Some of my website extension stopped working for some reason, yesterday i tried a full rollback to a day that i know it was supposed to work but still with error.

When i try to disable a custom magento extension .I generally disable it by changing the active node at the extension module config to false.

But this isn't working at all.

Also, if i change other things in the extension like it's name, IT WORKS!

I already clear the cache, but i am using  redis and memcache, maybe there is a problem at redis?


texts: Magmi Attribute Set Importer v0.0.2 - Attributes not appearing on product admin page after import

texts:
I am trying to Import a whole bunch of products with Magmi which is working fine however I need to import custom attributes for each product. To do this I am using Magmi Attribute Set Importer v0.0.2 where I have created 3 csv spreadsheets;

My product list which is working fine
My Attribute csv which creates all the attributes I need
and my attributeset csv which links the previously created attributes with the required group

After running the import I can see that the attributes have been created and exist in the correct attribute set/group.
The problem that I am having is when I go to a product page for a product using that attribute set, I cannot see the newly created attribute and cannot change its value.

Here are the data fields I am using to import the attribute:

attribute_code,frontend_label,is_visible_on_front
thickness,Thickness,1


texts: Where i can find these 2 buttons in magento 2 i want to translate these buttons


texts: How should I deal with multiple classes used in the same algorithm in Magento2?

texts:
I have a situation where I am building a module for Magento2 with 3 Models that kind of interact with each other depending on the situation.

I tried to inject the classes withing them selves but that doesn't seem correct, so I ended up putting all my business logic into the Helper class. I know I shouldn't do that (right?), so what else can I do in a situation like that?

My module is an endpoint API that receives a request, process it and return a response, so everything is done under the hood, with one view, one block and one controller.

Thank you


texts: i am opening localhost/candle/admin in firefox, but The requested URL /candle/admin was not found on this server. error is coming. how i solve this problem? please help


texts:
Recently we have discovered the problem in magento 2.1.8

When this command runs:

php bin/magento setup:cron:run

it logs error in log :

[2017-09-08 07:24:02] setup-cron.ERROR: Following required PHP extensions are missing:  zend-opcache [] []

I've confirmed that opcache is installed :


texts:
I need to achieve the next thing in my Magento store:
When I push the button On Hold in the admin for an order, the stock needs to be returned to the product (so increase). When I unhold the order the stock needs to be decreased again. This because I want to give the other customers the opportunity to buy this product.

Who can help me with this? I am php-programmer, but an extension doing this is also okay. Best would be an explanation how to do this in a programming way.

Thanks!


texts: How to go around "Incorrect namespace usage(s)" in static tests

texts:
I have a simple CRUD module for Magento 2.
When I run the static tests I get the following error/warning.

  "Incorrect namespace usage(s) found in file..... <Vendor>_<Module>".

The issue is caused by this line in my file

$resultPage->setActiveMenu('<Vendor>_<Module>::<menu_item_name_here>');

I also tried this approach:

const ADMIN_MENU = '<Vendor>_<Module>::<menu_item_name_here>';

...

$resultPage->setActiveMenu(self::ADMIN_MENU);

But I get the same result.
For core modules, this does not happen even if they have the same approach.

How can I get the static tests to shut up?

Ideally, I would like a clean solution, but I can go with "hiding the dirt under the rug".

Alternative: How can I set the active menu without upsetting the static tests?

Any clean approach would do.


texts: Get Attribute option Id by Attribute admin value

texts: For a Magento Dropdown Attribute, it is possible to get an Attribute option Id by Attribute admin value?


texts: Magento - Single Database, Multiple Sites

texts:
I want to know whether the below is possible with Magento and what I would need to do to set this up.

The Scenario

I have a Magento website. My Magento site has Categories, Sub Level Categories and Products. There are multiple resellers of my products and I would like each of them to have a basic website that includes all of my categories, sub level categories and products, fed from my websites database, however with each of their own websites I would like them to have the ability to change a product price and product part number on their own site.

All help is appreciated.


texts: SUPEE 9767 V2 fail on Magento 1.8.1.0 CE

texts:
I am getting this error while patching :

can't find file to patch at input line 433
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git app/code/core/Mage/Core/Model/File/Validator/Image.php app/code/core/Mage/Core/Model/File/Validator/Image.php
|index 7f7b9d0..8618bca 100644
|--- app/code/core/Mage/Core/Model/File/Validator/Image.php
|+++ app/code/core/Mage/Core/Model/File/Validator/Image.php
--------------------------

File app/code/core/Mage/Core/Model/File/Validator/Image.php is not there.
I also checked the original 1.8.1.0 and Image.php is also not in the zip.

What should I do?


texts: How to not allow certain characters in "street address" in users account?

texts: There's a problem where people will enter their e-mail address in the "street address" field, so I want to add validation/error message to the fields:


texts: Media images not showing in custom module

texts:
I have a problem, I have created a custom module in my Magento site, so in that module I'm calling custom attributes to display some content and images, but when I'm adding media image in this attribute image never shows on the frontend. In inspect element I can saw image in this format. Any suggestion?
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGP6zwAAAgcBApocMXEAAAAASUVORK5CYII=" data-amsrc="{{media url=" wysiwyg="" img-pages="" 2017device-benefits2.jpg"}}"="" style="margin-bottom:10px;" width="80" height="45" alt="Benefits">

Thank You


texts: Website has backdoor PHP/Small.m how to remove?

texts: I've one website which is affected by backdoor PHP/Small.m , how can I remove it?


texts: Can Magento2 Enterprise see admin revenue

texts: I want to know if Magento2 team can see my revenue or have any kind of share if my store is on Enterprise. What access do they have if I move to Enterprise.


texts: Copying extensions from one site to another

texts:
I'm new to Magento and currently need to stick with Magento 1.9, because of "reasons".

I have one site that I'm managing that's up and running well with a ton of extensions, that various people from years ago in my company purchased. I would like most if not all of those same extensions on brand new clients site.

I read Is it possible to copy an extension from one site to another but It wasn't enough to get the job done.

I can see all of the extensions now, but it is still unclear how I should effectively copy all of those extensions and load them on my new site.

Hunting each of these extensions down is not working out, some of the credentials from their sources have even been lost. Can someone with experience doing this help me get my new site up and running with the same extensions from my other site...?


texts:
Hi i want add order Programmatically using magento 2
So i need A custom REST API something like

/V1/order/add/:sku/:item_id/:qty/:user_id


texts: How to get the URL for the B2C website/storeview from a B2B website/storeview/product-page

texts:
In one magento installation I have multiple websites, stores and storeviews.

Storeviews are used for internationalisation (i.e. NL, DE, EN etc)

Most of our productranges are available in one, maximum two B2C websites/stores.

Part of this Magento installation is one B2B (resellers) website/store (with two storeviews, one NL, one EN) where all products are listed.

Pricing in this store is hidden using sitewards/b2bprofessional, but guests (not-logged-in) are able to browse the complete catalog.

On the product pages I'd like to show not-logged-in users a link to the other website(s)/storeview(s) (just those storeviews in their language of course) in this same magento installation where they as a B2C customer should/could buy.

I've got the easy part ("if(! Mage::helper('customer')->isLoggedIn()){};") covered ;)

Now for the hard part: How to query Magento for the correct URL(s) of the other storeviews this product is available in?


texts: Cache is being enabled even if it is set to disable

texts:
I set all the cache types to disabled but every morning i found them enabled. I've the default cron activated with the default cron.sh.
How i can set them to be disabled forever (until I put the site on production) ?


texts: Security Concerns: Sending HTTP Requests from Magento

texts:
I am currently developing an extension for Magento. One of the features of this extension is an Observer class that listens for the sales_order_credit_memo_save_after event. This event is fired once the store has issued a refund, thereby creating a credit memo.

I would now like to send the content of that credit memo to an external server using an HTTP POST request, sending the son_encoded string of the credit memo in the body;  however, I am concerned with security issues. Since the URL will be hardcoded into the extension, anyone who downloads the extension will be able to see the URL and make random requests to it.

One can of course get the store name and store url and pass those along with the request so that the external server can check whether the request "came from" a Magento Extension (provided we have a list of store names and urls that are valid). However, a man in the middle can still intercept all of these data and do bad things.

I guess what I am looking for is some sort of HMAC mechanism where I can send a code from Magento along with the request and then decrypt that code in my external server application. That way, I would be able to check whether the request really came from our Magento Extension and not some random dude abusing our url. However, to do something like HMAC, I would need some sort of secret key, which I don't see how one would include/implement in this case.

Having said all that, I am open to other suggestions on how to alleviate some of the security concerns raised above.


texts: What is "after_element_html" in magento 2

texts: In magento 2 What I need to use instead of "after_element_html". In magento2 form structure is in xml format, then how do I give note for a particular field in form ? Please provide me a solution


texts:
What's the best way to load the Mage.php (Magento) class within Symfony2. I've read documentation and and tried different autoloader and classloader configurations but the only thing works for me is below.. Ideally, I'd like to use "Best Practices" which my current solution doesn't do. This would probably involve not using the require_once and instead loading from autoload.php or using composer.json

/*
 * var/www/symfony/app/console -- THIS WORKS ONLY IN THE SYMFONY CONSOLE
 */
    if($env == 'prod'){
    require_once '/var/www/production/app/Mage.php';
}else{
    require_once '/var/www/development/app/Mage.php';
}

This code allows me to do Magento tasks ($product->save(), backoffice type things, batch updating products) from within the Symfony Environment without breaking down the Core Magento functionality and putting the data at risk.

For anyone curious why I would want to do this

The Symfony Framework is easier for rapid development of back-end processes and back-end reporting. Twig and the Symfony Form functionality works well for reporting.


texts: Magento 2 How to get layered navigation filter based on category id

texts:
I want to get category filters and its values when I send category id to rest Api But in my case I am getting errors please see the below screenshot and code as well. Thanks in advance.
    protected $_request;
      protected $_filterableAttributeList;
      protected $_layerResolver;
      protected $_filterList;
      protected $_storeManagerInterface;
      protected $_response;
      protected $_redirFactory;

      public function __construct(
        \Magento\CatalogGraphQl\Model\Resolver\Layer\FilterableAttributesListFactory $filterableAttributeList,
        \Magento\Catalog\Model\Layer\FilterListFactory $filterList,
        \Magento\Store\Model\StoreManagerInterface $storeManagerInterface,
        \Magento\Catalog\Model\Layer\Resolver $layerResolver,
        \Magento\Framework\Webapi\Rest\Request $request
      )
      {
        $this->_filterList                      = $filterList;
        $this->_filterableAttributeList         = $filterableAttributeList;
        $this->_layerResolver                   = $layerResolver;
        $this->_request                         = $request;
        $this->_storeManagerInterface           = $storeManagerInterface;
      }

      /**
        * GET  review by its ID
        *
        * @api
        * @return array
        * @throws \Magento\Framework\Exception\NoSuchEntityException
        *
        */
      public function getCategoryLayerNavFilterById($id)
      {
        // $categoryId   = $this->_request->getParam('categoryId');
        $categoryId = $id;
        $layer        = $this->_layerResolver->get();

        $layerType = "search";
        if ($categoryId){
          $layer->setCurrentCategory($categoryId);
          $layerType = "category";
        }

        // $filterArray['store_id']  = $this->_storeManagerInterface->getStore()->getId();
        $filterableAttributesList = $this->_filterableAttributeList->create($layerType);

        $filterList = $this->_filterList->create(['filterableAttributes' => $filterableAttributesList]);
        $filters    = $filterList->getFilters($layer);

        $i = 0;;

        foreach($filters as $filter)
        {
          if (!$filter->getItemsCount()) {continue;}
          $availablefilter = (string)$filter->getName();
          $items           = $filter->getItems();
          $filterValues    = array();

          $j = 0;
          foreach($items as $item)
          {
            $filterValues[$j]['display'] = strip_tags($item->getLabel());
            $filterValues[$j]['value']   = $item->getValue();
            $filterValues[$j]['count']   = $item->getCount(); //Gives no. of products in each filter options
            $filterValues[$j]['url']     = $item->getUrl();   //Gives filter url.
            $j++;
          }

          if(!empty($filterValues) && count($filterValues)>1)
          {
            $filterArray['availablefilter'][$availablefilter] =  $filterValues;
          }
          $i++;

        }

        if (!isset($filterArray["availablefilter"])) {
          $filterArray['availablefilter'] = "No filters to show.";
        }

        header("Content-Type: application/json; charset=utf-8");
        return json_encode($filterArray);
        // print_r($this->response,false);
      }
}


texts: Magento 2 Service Worker not registering in localhost

texts:
I have created a virtual host for my Magento site in my local
magento.site.local (my virtual host)
and I have also created a self-signed SSL certificate using OpenSSL and I have imported the certificate in chrome also.
but still, I am getting the URL as unsecure but it is showing https://magento.site.local and in this (https is in red and striked with a line horizontally) and shows unsecured.
in the console i am getting an error like this
DOMException: Failed to register a ServiceWorker for scope ('https://magento.site.local') with the script ('https://magento.site.local/firebase-messaging-sw.js'): An SSL certificate error occurred when fetching the script.


texts: Magento 2 Cart Price Rule -"Category does not contain" not working

texts: i have created cart price rule to give 10 percent off ,but have excluded few category as shown in screenshot , but does not works properly and 10 pc discount is applied for product category excluded also , please check if i am doing something wrong


texts: Magento 2: How to show the number of cart items in a custom block

texts:
The easiest way to show the number of cart items in a block would be via PHP, but that would mean disabling caching for the block (and hence the entire page)

Does anyone know how to display the cart item counter in a phtml file using knockoutJS? I've seen this (and equivalents) around:

<!-- ko text: getCartParam('summary_count') --><!-- /ko -->

But it returns the error:

Message: getCartParam is not defined

So I assume it needs to be prepared in the layout XML file or something.

I found that adding:

data-bind="scope: 'minicart_content'"

To the parent element got rid of the error, but it still doesn't output anything.

Any clues?


texts: I need add button link to a new page in Success.phtml (checkout process), how do I?

texts: I need to add a button in success.phtml page of checkout process. This button should redirect to a new page. How Can I achieve it?


texts: After running some commands Front end css not working

texts:
Frontend CSS not working after I ran some commands.
Backend working fine all css and js files are working in backend
Here's

Here's the link of the site:
http://testing2.dukaania.com


texts: How to change position of Regular price and Special price in product detail page?

texts:
I overriden product/price/amount/default.phtml file

<span class="price-container <?php /* @escapeNotVerified */ echo $block->getAdjustmentCssClasses() ?>"
    <?php echo $block->getSchema() ? ' itemprop="offers" itemscope itemtype="http://schema.org/Offer"' : '' ?>>
    <?php if ($block->getDisplayLabel()): ?>

            <?php /* @escapeNotVerified */ echo $block->getDisplayLabel(); ?>

    <?php endif; ?>
        <span <?php if ($block->getPriceId()): ?> id="<?php /* @escapeNotVerified */ echo $block->getPriceId() ?>"<?php endif;?>
            <?php echo($block->getPriceDisplayLabel()) ? 'data-label="' . $block->getPriceDisplayLabel() . $block->getPriceDisplayInclExclTaxes() . '"' : '' ?>
            data-price-amount="<?php /* @escapeNotVerified */ echo $block->getDisplayValue(); ?>"
            data-price-type="<?php /* @escapeNotVerified */ echo $block->getPriceType(); ?>"
            class="price-wrapper <?php /* @escapeNotVerified */ echo $block->getPriceWrapperCss(); ?>"
            <?php echo $block->getSchema() ? ' itemprop="price"' : '' ?>>
            <?php /* @escapeNotVerified */ echo $block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer()) ?>

    <?php if ($block->hasAdjustmentsHtml()): ?>
    <?php echo $block->getAdjustmentsHtml() ?>
    <?php endif; ?>
    <?php if ($block->getSchema()): ?>
    <meta itemprop="priceCurrency" content="<?php /* @escapeNotVerified */ echo $block->getDisplayCurrencyCode()?>" />
    <?php endif; ?>


texts:
I am checking in admin panel and want to know the importance of "Security Key" which is present into

System > Configuration > Admin >  Add Secret Key to URLs

What is the drawback if this field is set to "No". Is any big problem occurs on Admin Panel. Please let me know about this feature in admin panel.

Actually i am working on custom module in which email functionality is used. In email i send different different urls of admin panels like Manage Products , Manage Orders etc. When admin click on above urls then it opens again dashboard ( if admin is login ). I searched and find about this feature.If this value set to "No" then my links works perfectly.


texts:
magento v1.7.0.2
get this error when trying to install a new extension. I just want to take the site offline/ permanent maintenance mode.

any help?


texts: inheritance in knockoutJS components within magento 2's knockout framework

texts:
I have been experimenting with a custom module with KnockoutJs on the frontend in M2.
I've created two components: a ProductPackage and a ProductPackagePopop. Functionally, the ProductPackage triggers a modal that renders some details about the package's children.
These two components share quite the same logic which I would like to share between the components. For example, both have a function initTranslation which retrieves the right translations for this store id.
Since I am new to the magento2 Knockout implementation, is there some way to create a base component from which my two components inherit the shared logic? Or a trait like in PHP. I've looked at mixins, but it seems to me it's more fit to extend external is.
define(['uiComponent'], function (Component) {

    return Component.extend({
        store_id: 0,

        initialize: function (config) {
            this.store_id = config.store_id;
            this.initTranslations(config.productPackage);
        },
        initTranslations: function (productPackage) {
          //some logic here
        },
        children: function(){
         // retrieves children
        }

    });
});

I've found this: https://stackoverflow.com/questions/16569810/knockout-viewmodel-base-class-javascript-inheritance , but I find it hard to fit that in the M2 Knockout/RequireJs wrapper.


texts: Transactional Emails {Error in template processing}

texts:
We have a problem with our transactional emails in Magento they are including {Error in template processing} in the header and the footer. I think this was caused since we updated Magento from 1.7 to 1.9.2.4. Example below:

  {Error in template processing}

Dear Customer,

(Order information goes here)

  {Error in template processing}

I have seen this question asked on other forums but none of them seem to provide a clear answer. I have moved the files email-inline.css and email-non-inline.css to /skin/frontend/(Theme_name)/default/css but this has not done anything.

Would be grateful if someone could shed some light on this.


texts:
we are using following code for displaying review & ratings section. I want to display stars above Title This is really very good product

<?php $_items = $this->getReviewsCollection()->getItems();?>

    <?php if (count($_items)):?>

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

                <?php
            //  echo count($_items);
                ?>
                Ratings & Reviews

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

        <?php foreach ($_items as $_review):?>

                <a href="<?php echo $this->getReviewUrl($_review->getId()) ?>">
                    <?php echo $this->escapeHtml($_review->getTitle()) ?>

                <?php $_votes = $_review->getRatingVotes(); ?>

                <?php echo nl2br($this->escapeHtml($_review->getDetail())) ?>

                <?php if (count($_votes)): ?>

                    <colgroup>
                        <col class="review-label" />
                        <col class="review-value" />
                    </colgroup>

                        <?php foreach ($_votes as $_vote): ?>

                            <?php echo $this->escapeHtml($_vote->getRatingCode()) ?>

                                    <div class="rating" style="width:<?php echo $_vote->getPercent() ?>%;">

                        <?php endforeach; ?>

                <?php endif; ?>

                    <?php echo $this->__('Review by %s', $this->escapeHtml($_review->getNickname())) ?>
                    /
                   <?php echo $this->__('(Posted on %s)', $this->formatDate($_review->getCreatedAt()), 'long') ?>

        <?php endforeach; ?>

        <?php // echo $this->getChildHtml('toolbar') ?>
    <?php elseif($this->getParentBlock()): ?>
        <?php echo $this->getParentBlock()->getReviewsSummaryHtml($this->getProduct(), 'short', true)?>
    <?php endif;?>
    <?php echo $this->getChildHtml('review_form') ?>


texts: What is Factory in Magento2 and Why use?

texts: What is Factory in Magento2? Why use this. I want to know more details about Factory. When we can use Factory.


texts: Adding div around footer elements causes issue

texts:
I'm trying to add a simple div around the copyright & bug report links in the footer. I can achieve this by doing this:

<referenceContainer name="footer-container">
  <container name="footer" as="footer" label="Page Footer" htmlTag="div" htmlClass="footer content">
    <block class="Magento\Store\Block\Switcher" name="store_switcher" as="store_switcher" template="Magento_Store::switch/stores.phtml"/>
      <block class="Magento\Framework\View\Element\Html\Links" name="footer_links">
        <arguments>
          <argument name="css_class" xsi:type="string">footer links</argument>
        </arguments>
      </block>
      <container name="copyright-bug" htmlTag="div" htmlClass="bottom-links">
        <block class="Magento\Theme\Block\Html\Footer" name="copyright" template="Magento_Theme::html/copyright.phtml"/>
        <block class="Magento\Framework\View\Element\Template" name="report.bugs" template="Magento_Theme::html/bugreport.phtml" ifconfig="design/footer/report_bugs"/>
      </container>
  </container>
</referenceContainer>

This adds a div called bottom-links around the copyright and bug reports links but it removes all other elements such as footer links, header links, basket link. What am I doing wrong?


texts: An input appears when selecting an option

texts:
I'm trying to create a form that brings the order number to the client select "Yes" or "no" this is my code

Contato.phtml

...

            *<?php echo Mage::helper('contacts')->__('Já realizou sua compra?') ?>

                    <select id="f_f_compra" name="f_f_compra" class=" required-entry required-entry select">
                    <option value="" selected="selected">-- Selecione --</option>
                    <option value='Sim' >Sim</option>
                    <option value='Não' >Não</option>
                    </select>

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

                            <input name="increment_id" id="increment_id" value="" class="input-text required-entry" type="text">
                            <input name="pedido" id="pedido" value="0" type="hidden">

...

JQuery code

$jQuery('#f_f_compra').change(function(){
    if ($(this).val() == "Sim") {
        document.getElementById("pedido").style.display="block";
        //jQuery alternative
        //$("#attach").show();
    } else {
        document.getElementById("pedido").style.display="none";
        //jQuery alternative
        //$("#attach").hide();
    }
});


texts: cms pages not displaying properly on production website magento 1.8.10 [solved]

texts:
I'm having a magento 1.8.10 website on more servers, local, dev, staging and production servers, what I'm experiencing is that I'm trying to display the cms pages into the production website as the same in local, dev and staging. Once I go into the production pages I call a product group to display wrapped in divs which not appears; it seems to appear just the list of products look liking that there's an error in the list.phtml, everything is sepcified in the related cms pages, the databases are the same on each servers except the base url as you can easly imagine. Is there anything that could not be specified in the server settings or in the magento settings? I'm walking in the dark at the moment, let me know if you have any advice for it.

Thanks.


texts: How to create shipment using API (SOAP V1) with specific items in it?

texts:
I'm looking to find how should array of items look like.
I have found an example here:

$orderIncrementId = '200000006';
$itemsQty = array('3' => '3', '4' => '5');

$result = $proxy->call(
    $session,
    'order_shipment.create',
    array(
        $orderIncrementId,
        $itemsQty
    )
);

But that doesn't work for me. Plus there's misleading action name. It should be "sales_order_shipment.create" instead "order_shipment.create". So far I have found that passing empty array as second parameter works, but then a shipment is created for all ordered items. Not what I need.


texts:
I add to list.pthml:

    <?php /* @escapeNotVerified */ echo __('SKU') ?>
    <?php /* @escapeNotVerified */ echo __('Image') ?>
    <?php /* @escapeNotVerified */ echo __('EAN') ?>
    <?php /* @escapeNotVerified */ echo __('Brand') ?>
    <?php /* @escapeNotVerified */ echo __('Product name') ?>
    <?php /* @escapeNotVerified */ echo __('Size') ?>
    <?php /* @escapeNotVerified */ echo __('Leadtime') ?>
    <?php /* @escapeNotVerified */ echo __('MSRP') ?>
    <?php /* @escapeNotVerified */ echo __('Price') ?>
    <?php /* @escapeNotVerified */ echo __('Units') ?>
    <?php /* @escapeNotVerified */ echo __('To Add') ?>
    <?php /* @escapeNotVerified */ echo __('Actions') ?>

Now i try to translate to PL:
I use translate file from Mageplaza:
I add below code to vendor/mageplaza/pl_PL.csv
"BRAND","Marka"
"Product name","Nazwa produktu"
"Size","Rozmiar"
"Leadtime","Czas dostawy"
"Price","Cena"
"Units","Ilość"
"To Add","Do dodania"
"Actions","Akcje"

Now I ran deploy pl_PL but no result in frontned.
Also I create i18n in my custom template:
app/desing/i18n/pl_PL.csv
Still no result. Any solution?


texts: Get Category with a custom attribute programmatically

texts: How can I load a category with only the value of a custom attribute in a controller?


texts: Magento 2: What's relationship of getQuote() with getItemsCount()?

texts:
Magento version: 2.0.0

In ther Magento\Checkout\Block\Cart, there has a function is:

/**
 * @codeCoverageIgnore
 * @return int
 */
public function getItemsCount()
{
    return $this->getQuote()->getItemsCount();
}

getQuote() is from the Class AbstractCart because Cart is extends \Magento\Checkout\Block\Cart\AbstractCart.

According the Eclipse helping, getItemsCount() should be from Magento\Quote\Model\Quote.

In \Magento\Checkout\Block\Cart\AbstractCart, the Class Quote is just only invoked with use keywords but not initialize or extend.

So, I am confused the relationship of getQuote() with getItemsCount().
getQuote() is not extend from Quote class, why it can use the getItemsCount() of Quote?


texts: Custom Price appears in Cart just after refresh

texts:
The problem is that the custom price appears in Cart, only after refreshing this one.

I have the following code which sets custom price :

           $item->setBaseSubtotal($price);

           $item->setCustomPrice($price);
           $item->setOriginalCustomPrice($price);
           $item->setPrice($price);
           $item->setIsSuperMode(true);

           $item->save();

           $this->cart->getQuote()->setTotalsCollectedFlag(false);
           $this->cart->getQuote()->collectTotals();
           $this->cart->getQuote()->save();

           $this->cart->save();

In Cart I have the default price (not updated) but in the Total Order I have the right prices.
Once the cart is updated, both are correct.

Has someone any idea how to set this problem?


texts:
for my shop project i am working with Magento 1.9 Mobile Version. Everything works fine as i wish but there is one Problem i cant fix.

The Menu (Navigation) in the Mobile Version doesn't show Sub-Menu Category's.
Can i build them in, in an easy way?
I thought i destroyed the code during my creation Process but its the same as on the demo store:

enterprise-demo.user.magentotrial.com/

Think i have to include something in the CSS file or in the menu.js?

Cant figure it out. Might be interesting for others to.

The helper get a German beer.


texts:
When I try to do a setup upgrade using the below command, it throws a PHP Fatal Error:

$ sudo bin/magento setup:upgrade
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Magento\Framework\Config\Scope::__construct() must be an instance of Magento\Framework\App\AreaList, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 97 and defined in /var/www/magento2/vendor/magento/framework/Config/Scope.php:37
Stack trace:
#0 /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(97): Magento\Framework\Config\Scope->__construct(Object(Magento\Framework\ObjectManager\ObjectManager))
#1 /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#2 /var/www/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Framewo...')
#3 /var/www/magento2/vendor/magento/framework/App/ObjectManager/Environment/Com in /var/www/magento2/vendor/magento/framework/Config/Scope.php on line 37

When I launch the site in browser it's showing 500 error, and the same error message is shown on the apache error log.

Is there any way to reset Magento to fresh install state without any extra modules?


texts: Magento 2: add Validation on first name and last name so it only accept text value, not numeric

texts:
I want to add validation on first name and last name on registration page, So it only accept text value, not the numeric value.

Please help me how to achieve this in Magento 2 standard recommended way.


texts: Magento : get customer_id from salesOrderList

texts:
i try to get orderl list with this API :salesOrderList (SOAP V2)  i use this code :

env = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        env.dotNet = false;
        env.xsd = SoapSerializationEnvelope.XSD;
        env.enc = SoapSerializationEnvelope.ENC;
        SoapObject request = new SoapObject(NAMESPACE,
                "salesOrderList");
        request.addProperty("sessionId", sessionId);
        //request.addProperty("customerId", id.toString());
        env.setOutputSoapObject(request);
        androidHttpTransport = new HttpTransportSE(URL);
        androidHttpTransport.debug = true;
        androidHttpTransport.call("", env);
        result = env.getResponse();
        Log.d("order result", result.toString());

and result :

increment_id=100000001;
                store_id=1;
                created_at=2013-12-12 07:36:52;
                updated_at=2013-12-12 07:36:57;
                tax_amount=0.0000;
                shipping_amount=0.0000;
                discount_amount=0.0000;
                subtotal=246.0000;
                grand_total=246.0000;
                total_qty_ordered=2.0000;
                base_tax_amount=0.0000;
                base_shipping_amount=0.0000;
                base_discount_amount=0.0000;
                base_subtotal=246.0000;
                base_grand_total=246.0000;
                billing_address_id=1;
                billing_firstname=?????;
                billing_lastname=????;
                billing_name=????? ????;
                store_to_base_rate=1.0000;
                store_to_order_rate=1.0000;
                base_to_global_rate=1.0000;
                base_to_order_rate=1.0000;
                weight=0.0000;
                store_name=Main Website

i have big problam ! there is no "customer_id" in result ! how can i get order list with id of order customer ?


texts: In a custom module I override the cart item template

texts:
How do I correct my code to fix this?

In my custom module I have the file app/code/MyCompany/MyModule/view/frontend/layout/checkout_cart_item_renderers.xml with the following code:

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.cart.item.renderers">
            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="MyCompany_MyModule::cart/item/default.phtml">
                <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions" name="checkout.cart.item.renderers.default.actions" as="actions">
                    <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Edit" name="checkout.cart.item.renderers.default.actions.edit" template="Magento_Checkout::cart/item/renderer/actions/edit.phtml"/>
                    <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Remove" name="checkout.cart.item.renderers.default.actions.remove" template="Magento_Checkout::cart/item/renderer/actions/remove.phtml"/>
                </block>
            </block>
            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="simple" template="MyCompany_MyModule::cart/item/default.phtml">
                <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions" name="checkout.cart.item.renderers.simple.actions" as="actions">
                    <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Edit" name="checkout.cart.item.renderers.simple.actions.edit" template="Magento_Checkout::cart/item/renderer/actions/edit.phtml"/>
                    <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Remove" name="checkout.cart.item.renderers.simple.actions.remove" template="Magento_Checkout::cart/item/renderer/actions/remove.phtml"/>
                </block>
            </block>
        </referenceBlock>
    </body>
</page>

My custom template is in /app/code/MyCompany/MyModule/view/frontend/templates/cart/item/default.phtml.

I have tried removing the block first, then it doesn't load anything. Any help how to do this the right way is appreciated.


texts: How to make and install my module via composer with two private repositories in magento 2

texts:
Problem Description:
I have created two private repositories in github under same user name.
Each repository contains different modules. But while trying to install the package via composer throws error.

Repository 1 :
 Composer.json

{
  "name": "xxx/module-abc",
  "description": "N/A",
  "type": "magento2-module",
  "version": "1.0.0",
  "autoload": {
    "psr-4": { "VENDOR\\Abc\\": "" },
    "files": [ "registration.php" ]
  }
}

Repository 2:
composer.json

{
    "name": "xxx/module-psr",
    "description": "N/A",
    "type": "magento2-module",
    "version": "1.1.0",
    "require": {
        "xxx/module-abc": "*"
    },
    "autoload": {
        "psr-4": { "VENDOR\\Psr\\": "" },
        "files": [ "registration.php" ]
    }
}

While tring to install to my instance , I have added below code in my
Magento root's composer.json
composer.json

 "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        },{"type": "git",
        "url": "https://github.com/xxx/module-psr"}
    ],

Running the below command in terminal
composer require xxx/module-psr:dev-master

It throws below error

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for xxx/module-psr dev-master -> satisfiable by xxx/module-psr[dev-master].
    - xxx/module-psr dev-master requires xxx/module-abc * -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

Please provide me a solution to install the module via composer


texts: Magento 2, How to respond array in API without sort

texts:
Using Magento 2.2, API. I need to return array sort by value but although I try to sort by value the result still return array sort by key.

CODE

$listStore = array();
// Store locator collection
$storeLocatorCollection = $this->getStoreCollection($storeRestriction);
$storeLocatorCollection->setCurPage(0);
$storeLocatorCollection->setPageSize(null);

foreach ($storeLocatorCollection->prepareJson() as $store) {
    if (isset($store['storelocator_id'])) {
        $storeId = $store['store_id'];
        $storeLocator = $this->storeLocatorFactory->create()->load($store['storelocator_id']);
        // Location
        $latitude = $storeLocator->getData('latitude');
        $longitude = $storeLocator->getData('longitude');

        $distant = 0;
        if (null != $storeRestriction->getLatitude() && null != $storeRestriction->getLongitude()) {
            $distant = $this->mapUtil->greatCircleDistance($latitude, $longitude,
            $storeRestriction->getLatitude(), $storeRestriction->getLongitude());
            $distant = $distant / 1000; // Convert m to km;
        }
    }
    $listStore[$storeId] = $distant;
}

asort($listStore);

ARRAY listStore

[23]    2.4107568853165
[20]    3.3449976265865
[21]    3.4099968711001
[18]    3.4131865924907
[15]    3.9950328677024
[19]    4.1591698565672
[11]    4.1692511579133
[12]    4.2306940706562
[2]     4.2889366130284
[6]     4.3575747958034
[8]     4.4132784969975
[10]    4.4158903167744
[5]     4.4233937790811
[16]    4.5939586847546
[4]     4.675968479996
[3]     4.8981886399144
[9]     5.0217300555084
[22]    5.4732324269605
[17]    5.4825053338869
[7]     5.5024903893259
[14]    5.8161618466356
[25]    8.1384613125899
[24]    11.943478996118

ARRAY Respond

[
    {
        "2": 4.2889366130284,
        "3": 4.8981886399144,
        "4": 4.675968479996,
        "5": 4.4233937790811,
        "6": 4.3575747958034,
        "7": 5.5024903893259,
        "8": 4.4132784969975,
        "9": 5.0217300555084,
        "10": 4.4158903167744,
        "11": 4.1692511579133,
        "12": 4.2306940706562,
        "14": 5.8161618466356,
        "15": 3.9950328677024,
        "16": 4.5939586847546,
        "17": 5.4825053338869,
        "18": 3.4131865924907,
        "19": 4.1591698565672,
        "20": 3.3449976265865,
        "21": 3.4099968711001,
        "22": 5.4732324269605,
        "23": 2.4107568853165,
        "24": 11.943478996118,
        "25": 8.1384613125899
    }
]


texts: Get a product collection ignoring variations

texts:
I'm trying to get a list of products filtered by categories, get all products from categories "Tees" plus all products from "watch" for example. The code:

$ids = ['16', '6'];
$productCollection = $this->_productCollectionFactory->create();
$productCollection->addAttributeToSelect('*');
$productCollection->addCategoriesFilter(array('in' => $ids));

return $productCollection;

This works correctly, but it returns all variations of my configurable products, and I want just the main product, how can I get it? Thanks in advance.


texts: How to remove the old cart product after customer login

texts:
Customer visit website and add the product,

then customer login.

if customer already have cart items, its removed old items, newly added items only showing

Example:

Customer already have 5 products in cart > Visit the site > add newly 2 products in cart > login customer account > show the cart newly add 2 product (old cart products are removed)

Any suggestions will be appreciated.


texts: How Text Attribute display in Layerd Navigation in Magento2

texts:
Magento2 in creating custom attribute like as 'event-date' type is text and set Layered is yes but it's not working.

I want to display Event Date attribute in layered navigation with two dates between products filter. Thanx in advance.


texts:
Facebook is picking up the wrong image from my Magento web site when shared. I have added the following line to my head.phtml

<meta property="og:image" content="https://www.sturdykids.co.uk/skin/frontend/default/megashop-blue/images/logo.gif" />

It is definately in the right place when I view source of web site but the facebook debugger is still saying there is no og:image property.

What can I do to fix this?


texts: Right way to create butons in uiComponent form in Magento 2

texts:
I've created an uiComponent form but there is no save button. In every form coponent example there is no save buttons and all the examples with save button that I found are FULLY created in Magento 1 way (I mean they are all generated by a php block).

I created a normal button using code below which looks like save one but I can't make him save the form.

    <item name="buttons" xsi:type="array">
        <item name="save" xsi:type="array">
            <item name="name" xsi:type="string">save</item>
            <item name="label" xsi:type="string" translate="true">Save</item>
            <item name="class" xsi:type="string">primary</item>
        </item>
    </item>

If there is no other way to make the savable form as UI Component then what's the point of their partial existance?


texts: Auto Apply Discount on Product Page based on URL

texts:
I am wondering if anyone can offer advice on the best/easiest way to accomplish the following:

I would like to be able to change the price of a product based on a URL parameter.  So for example if the regular price of a product is $100, I would like to be able to specify some sort of URL parameter that would allow me to have the price of the product be a lower amount.

I am currently considering creating coupon codes and auto applying them using the linksture extension and then having some logic lookup what the discount is and then apply it on the product page.  I think this will accomplish the goal, but wondering if there is a better/simpler/cleaner way.


texts: Varnish stopped caching - caused by Magento headers?

texts:
I had Varnish caching working for many months (staging environment), but just before launch I realised it is no longer caching any page.
- My thoughts -
I've generated a PHP file with randomised output. Unlike Magento pages, Varnish seems to cache this page just fine. Therefore I'm thinking this has something to do with the headers being set by Magento.
- Magento headers -
I have disabled Varnish for now, to look into the original headers being set by Magento. Below is a screenshot of the headers on a basic product page. I have no idea where to start looking. What could be causing Varnish not to cache the page?

I've read something about Varnish not caching a page where cookies are being set. Seems like Magento is setting three different cookies on this page. Can this be the cause? How do I disable those cookies?
Cache-Control mentions no-cache, no-store. Would be fine if those were Varnish headers to the client, but Magento passing this to Varnish instead doesn't look good to me?

I'm unsure what to do, because I know Varnish caching on Magento pages worked just fine before. I have no idea when exactly things stopped working, so I'm having a hard time tracking down the the cause of the issue.
System:

Apache
Nginx (SSL reverse proxy)
Varnish


texts: Deadline for Upgrading from Magento (EE) 1x to Magento (EE) 2x?

texts: How long can we stay on Magento (EE) 1x before we would absolutely have to move to Magento (EE) 2x? I can't find a definite answer to this if there is one. I did read that security patches & support for Magento (EE) 1x will end the 4th Quarter of 2018. Perhaps that is the deadline date everyone is using or hearing? I'd imagine that PCI scanning vendors could start showing hesitance to approving applications that are no longer receiving security updates. Huge concern!!! If so, that would make the 4th Quarter of 2018 everyones deadline to upgrade for sure. I'd rather stay on Magento (EE) 1x for another 5 years but I don't think it's possible. Any definitive answers out there?


texts: 400 Bad Request 'Allowed JavaScript Origins' in Magento 1.x

texts:
i install amazon v3.0.10 on magento 1.x.

When click checkout by amazon, it show this error

I tryed add application in amazon account but it not working.

Please help me, thanks


texts: Magento 2.1 Sorry, but something went wrong. Please contact the seller. Issue : when checkout with credit card (Authorized.net)

texts:
I am using Magento ver. 2.1 Some of our customer complain that they can't checkout with Credit Card (Authorize.net). A sorry message "sorry but something went wrong" showing when checkout. We have checked the issue also found the problem using credit card live mode

But when I check in admin, order was placed as Processing status.
Customer payment has been deducted but do not redirect to thank you page.


texts: After uninstalled extension confirmation email send

texts:
Can you please tell me how can i send confirmation email to our server if someone uninstalled our extension or package.

Thanks.!


texts: Adding a new column to flat table for "file upload"

texts:
I have a flat table that I would like to add a column to, and upload an image file in the admin. How would I achieve this via installer/upgrade script?

Also as a side note, does it make more sense to create a separate table for this?


texts: Magento 2 - How to show not visible individually products in mini cart?

texts:
I have create a ajax call and added a product to cart programmatically. After that i have redirected to direct checkout page. Now mini cart shows similar to attached image. Point to be noted is cart display like below attached image if i add "Not Visible Individually" item in cart.
However it works perfectly if product is set visible on catalog and search from admin.

How can it populate correctly ?

Attached Image:

Add to cart code:

        $productId = $this->getRequest()->getParam('id');
        $params = array(
            'form_key' => $this->formKey->getFormKey(),
            'product' => $productId,
            'qty' => 1
        );
        $_product = $this->product->load($productId);
        $this->cart->truncate();
        $this->cart->addProduct($_product, $params);
        $this->cart->save();


texts: Change configurable product price on Listing Page

texts:
I have a configurable product with 3 configurations (Small, Medium, Large).
Each configuration has different prices:

Small = 10$
Medium = 11$
Large= 12$

When I click the configurations in the Product Listing I do not see the price change. It is working as expected on Product Page.

Is it possible to make the price update when I click the configurations?


texts: Magento 2.4.0 sort products by is_salable on product list

texts:
I want to products on product list will always be sorted from salable to not salable. Products which have "Add to cart" button should be show firstly(It should work for simple and configurable products)
I tried created plugin as is written in [https://magento.stackexchange.com/questions/178061/magento2-sort-products-and-search-result-by-stock-availability][1] :
//di.xml
    <type name="Magento\Catalog\Model\Layer">
            <plugin name="product_sort_by_stock" type="Company\Module\Model\Plugin\Layer"/>
    </type>

//app/code/Company/Module/Model/Plugin/Layer.php
    <?php declare(strict_types=1);

    namespace Company\Module\Model\Plugin;

    class Layer
    {

        public function aroundgetProductCollection(\Magento\Catalog\Model\Layer $subject, \Closure $proceed)
        {
            $selectedDirection = 'DESC';
            $collection = $proceed();
            $collection->getSelect()->order('is_salable '. $selectedDirection);
            return $collection;
        }
    }

But it not works for me. Products are not sorted in a correct order.
Could you advice me how to  sort product collection by is_salable attribute? I have Magento 2.4.0 and Elasticsearch 7.9.2. I use multi source inventory.
[1]: Magento2 sort products and search result by stock availability


texts: After installing magento2.0.4 version, dashboard is not working properly

texts:
After installing Magento 2.0.4 version, it logged in properly but products, system and other options on dashboard are not accessible. When I click on product it is not responding, same with other. I am unable to find any solution for it.

Can anyone guide me on this please?


texts: Magento 2 : How to remove price decimal from product details page

texts:
I have successfully remove price decimal from product listing but unable to remove it from product details page. How to remove it.

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

<?php if ($block->hasAdjustmentsHtml()): ?>
    <?php echo $block->getAdjustmentsHtml() ?>
<?php endif; ?>
<?php if ($block->getSchema()): ?>
    <meta itemprop="priceCurrency" content="<?php /* @escapeNotVerified */ echo $block->getDisplayCurrencyCode()?>" />
<?php endif; ?>


texts: How does a 3rd party email deliverability company such as SendGrid pulls the information from the order page to send Confirmation emails?

texts:
Magento 1.9.1

We use Sendgrid to send out our Emails because we had a problem with the Confirmation Emails NOT being delivered to customer's inboxes (they ended up in the SPAM folder a lot) and now it works great! (they get delivered into the customer's INBOX).

We use a very expensive solution for our mobile website - Shopgate and they are not able to put all the information they need into the Confirmation Email. They keep asking this:

  "....what we need to know is where we can access the information on
  Sendgrid within Magento, and how it pulls the information from the
  order page to send these confirmation emails. Please advise."

I don't know what to tell them anymore. I tried to tell them the Confirmation Email is being created in the standard way and then it just gets sent through SendGrid INSTEAD of smpt.myDOMAIN.com but that's not a good enough answer for them.

We have the SMTP Pro Email Extension from ASCHRODER.com and I think that's what handles the connection with Sendgrid.

How would you explain this process to Shopgate?


texts: Error Notification "Design config must have area and store" in backend

texts:
In the M2 backend when I am trying to enable "Front-end Builder Account" in System > All Users > a user and save it is giving me error Notification "Design config must have area and store" in the backend.

From the notification can you suggest me is there anything I missed setting up?


texts: Magento 1.9.4 : Prevent the css and js of the skin folder to load in a cms page

texts: I want to style its elements by myself (for example, I want to style the header different from the rest of the website) but Magento loads the styles from the skin folder. How can I prevent Magento from loading styles in a page?


texts: Magento2 error "There are no export file with such name" but file exists

texts:
Magento 2.3.3
Go to System -> Exports -> Select "Customer address" -> Generate export.
A new file is generated and is visible in the table, but when I try to export or delete the file, I get the error
1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): There are no export file with such name customer_address_20200612_122735.csv

But the file exists in var/export folder. There is issue with the permissions of the newly generated file.
The permissions are
-rw-rw-r--

Which means the file has no permissions to execute. I research a lot on this issue but go nothing.
FYI: I already did
chmod -R 777 var
But the issue is for newly generated files, after giving permissions.
Can anyone help?


texts: Getting TypeError: $(...).AddFotoramaVideoEvents is not a function in magento 2.3.3

texts:
The image gallery is not loading on product detail page getting an error like

Uncaught TypeError: $(...).AddFotoramaVideoEvents is not a function
    at $.<computed>.<computed>.updateBaseImage (swatch-renderer.min.js:50)
    at $.<computed>.<computed>.updateBaseImage (widget.min.js:15)
    at $.<computed>.<computed>._loadMedia (swatch-renderer.min.js:24)
    at $.<computed>.<computed>._loadMedia (widget.min.js:15)
    at $.<computed>.<computed>._OnClick (swatch-renderer.min.js:28)
    at $.<computed>.<computed>._OnClick (widget.min.js:15)
    at HTMLDivElement.<anonymous> (swatch-renderer.min.js:23)
    at HTMLDivElement.dispatch (jquery.min.js:338)
    at HTMLDivElement.elemData.handle (jquery.min.js:311)
    at Object.trigger (jquery.min.js:332)

I followed this solution Magento2: AddFotoramaVideoEvents is not a function on PDP? also. but it does not helped.


texts:
At the top of Mage.php we have a few constants defined:

define('DS', DIRECTORY_SEPARATOR);
define('PS', PATH_SEPARATOR);
define('BP', dirname(dirname(__FILE__)));

I am coding something which will set values in the core_config_data such as values for currency/options/allow (e.g. GBP,EUR,USD). This is being populated by a YAML file parsed/decoded by Zend_Config_Yaml. Once decoded into an array, the value for GBP,EUR,USD is actually being outputted as so: G/var/www,EUR,USD where /var/www is obviously my BP path.

What would be the best way to overcome this?

YAML file is as so

    core_config:
      -
        path: general/locale/code
        value: en_GB
      -
        path: general/locale/timezone
        value: Europe/Paris
      -
        path: currency/options/allow
        value: GBP,EUR,USD
      -
        path: currency/options/default
        value: EUR
      -
        path: general/country/default
        value: FR


texts: Magento 2: How to set Tier Pricing Programatically Group Wise

texts:
I'm following Programmatically add tier prices

On top of below post i'm trying to add Tier Pricing

Magento 2: Save all product data outside Magento with Images

I have done below thing

$tierPrices = array(
      [ 'customer_group_id' => '2', // GROUP ID
        'price_qty' => 1,
        'price' => 100,
        'website' => 'all'
       ]
);
$_product->setTierPrice($tierPrices);

But above code is not working. It's not showing on Admin Side.

While running script it's not giving any kind of error.

For Customer Group Id price will be 100 & for all other groups it will be 150


texts: Where can I see the amount of my sales without tax and sales?

texts: I've got different amounts on the dashboard and at reports. which one is the right one?


texts: Magento get all product attribute from report collection without load

texts:
$store = Mage::app()->getStore();
$products = Mage::getResourceModel('reports/product_collection')
                ->addAttributeToSelect('*')
                ->addAttributeToFilter("status", Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
                 ->addPriceData()
                ->addOrderedQty()
                ->setOrder("ordered_qty", "desc")
                ->setStore($store)
                ->addStoreFilter($store);

I used this product collection but when I use foreach for this collection I can not fetch all product attributes like(small_image).I know one solution in foreach $product=Mage::getModel('catalog/product')->load($_product->getId()); But I do not want to use load in foreach loop. Any alternative soltution ?


texts: Get products to display based on custom attribute

texts:
I have an custom attribute on each product called 'sidebar' which is a yes/no option. All the products that are set to 'yes' I would like to appear inside a div I have in 3columns.phtml. All I want to display is:

title
image (hyperlinked)
price

I tried the answer in https://stackoverflow.com/questions/1332742/magento-retrieve-products-with-a-specific-attribute-value just to get a basic idea of the query but this didn't work for me. I tried:

$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToSelect('sidebar');
$collection->addAttributeToSelect('orig_price');

$collection->addFieldToFilter(array(
    array('sidebar'=>'orig_price','eq'=>'yes'),
));

foreach ($collection as $product) {
    //var_dump($product);
    var_dump($product->getData());
}

Any help is appreciated


texts: Category update during module installation

texts:
During my research on question 2 module setup scripts dependence I tested following: I tried to update already created category in module setup file (mysql4-install-0.1.0.php):

$installer = $this;
$installer->startSetup();
$defaultCategory = Mage::getModel('catalog/category')->load(3);
$defaultCategory->setData(array('cool_new_attribute' => 'cool_value', 'name' => 'test'))->save();
$installer->endSetup();

But this line creates new category instead of updating old category. And in system.log file appended following error trace:

exception 'Exception' with message '$_FILES array is empty' in Z:\home\magento.ce\www\lib\Varien\File\Uploader.php:467
Stack trace:
#0 Z:\home\magento.ce\www\lib\Varien\File\Uploader.php(149): Varien_File_Uploader->_setUploadFileId('thumbnail')
#1 Z:\home\magento.ce\www\app\code\core\Mage\Catalog\Model\Category\Attribute\Backend\Image.php(57): Varien_File_Uploader->__construct('thumbnail')
#2 [internal function]: Mage_Catalog_Model_Category_Attribute_Backend_Image->afterSave(Object(Mage_Catalog_Model_Category))
#3 Z:\home\magento.ce\www\app\code\core\Mage\Eav\Model\Entity\Abstract.php(657): call_user_func_array(Array, Array)
#4 Z:\home\magento.ce\www\app\code\core\Mage\Eav\Model\Entity\Abstract.php(1648): Mage_Eav_Model_Entity_Abstract->walkAttributes('backend/afterSa...', Array)
#5 Z:\home\magento.ce\www\app\code\core\Mage\Catalog\Model\Resource\Category.php(235): Mage_Eav_Model_Entity_Abstract->_afterSave(Object(Mage_Catalog_Model_Category))
#6 Z:\home\magento.ce\www\app\code\core\Mage\Eav\Model\Entity\Abstract.php(1124): Mage_Catalog_Model_Resource_Category->_afterSave(Object(Mage_Catalog_Model_Category))
#7 Z:\home\magento.ce\www\app\code\core\Mage\Core\Model\Abstract.php(318): Mage_Eav_Model_Entity_Abstract->save(Object(Mage_Catalog_Model_Category))
#8 Z:\home\magento.ce\www\app\code\local\Test0\Test0\sql\test0_test0_setup\mysql4-install-0.1.0.php(13): Mage_Core_Model_Abstract->save()
#9 Z:\home\magento.ce\www\app\code\core\Mage\Core\Model\Resource\Setup.php(624): include('Z:\home\magento...')
#10 Z:\home\magento.ce\www\app\code\core\Mage\Core\Model\Resource\Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '0.1.0')
#11 Z:\home\magento.ce\www\app\code\core\Mage\Core\Model\Resource\Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('0.1.0')
#12 Z:\home\magento.ce\www\app\code\core\Mage\Core\Model\Resource\Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#13 Z:\home\magento.ce\www\app\code\core\Mage\Core\Model\App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#14 Z:\home\magento.ce\www\app\code\core\Mage\Core\Model\App.php(343): Mage_Core_Model_App->_initModules()
#15 Z:\home\magento.ce\www\app\Mage.php(685): Mage_Core_Model_App->run(Array)
#16 Z:\home\magento.ce\www\index.php(93): Mage::run('', 'store')
#17 {main}

How I can update the category during module setup, or I am doing something wrong?


texts:
When I try to add a product for first time,  using incognito tab and Full Page Cache, I get redirected to an empty cart.

Then, if I return the page and add the product again, or if I I select another product, I can add it. but not the first time.

My button code is this

<button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart form-key" onclick="setLocation('<?php echo Mage::helper('checkout/cart')->getAddUrl($_product) ?>')"><?php echo $buttonTitle ?></button>


texts: Default select option in product magento 2

texts:
I have a configurable product.
I want to default select product have max price like this:

Any help? Thank in advance.


texts: Massaction to ship/notify/invoice + print label for labels (aka dymo or zebra)

texts:
as an intermediate solution to waiting for logistics update I was tinkering about the following.

Can we easily create a massaction to send all orders to a dymo (or any other) label printer in 1 go?
or does a simple extension exist that can do this

So I have seen many mass actions extension like from xtento, amasty and probably also AW. But I have not seen one that also combines 'printing the label'

So in the end it should do something like:
-- Massaction to ship/notify/invoice + print label for dymo/zebra in 1 go

Also 'printing the label' may also result in a simple PDf that we can send to the label printer ourselves

Any help appreciated


texts:
I am confused. What is the point of that label if I always get Admin label? I want to get Default Store View title.
I want this title to be displayed for configurable products.
I can get it through <?php echo $_product->getResource()->getAttribute('test')->getStoreLabel() ?> but I still have to see how to get attribute code. Is there any simpler solution to achieve this?


texts: how to inject custom template in extension in default page layout

texts:
I am trying to inject template code in default customer account login page.

I have created a template file under

vendor_name/module_name/view/frontend/templates/custom_template.phtml

How can I inject it in default customer login page ? I tried to inject it by creating a layout file under vendor_name/module_name/view/frontend/layout/ directory but after clearing cache and checking storefront, it does not seem to be working.

Can anyone provide suggestion on how to accomplish it ?


texts: Remove Category filter from Shop By Filter Renderer in Magento 2

texts:
Our designer has made a layout that was supposed to be based on the default theme, however me made one diversion with categories and designed something more akin to what we did once in Magento 1. I need to display a custom block in the sidebar with category links and a current category selection. This is all fine and easy enough for me to do with one problem, I need to remove the default category option form the layered navigation filter.

I've been looking through the XML for a way to remove specific filters from the layered navigation with no luck. I've also tried looking through the renderer class, implementation and filter interface but I can't find any way to stop categories from coming out under the layered navigation.

TLDR I need to remove Categories from the layered navigation but keep all the other filters


texts: Magento 2.4.2 How to attched PDF in Email?

texts:
I want to attach PDF in custom Email template but it not working having some error like
 PHP Fatal error:  Uncaught Error: Call to a member function createAttachment() on null in /var/www/html/app/code/Magento360/Base/Model/Mail/TransportBuilder.php:8
Stack trace:
ù0 /var/www/html/generated/code/Magento360/Base/Model/Mail/TransportBuilder/Interceptor.php(23):

I have tried following solution but non of are working for me

https://webkul.com/blog/attach-pdf-file-magento-2-email/
https://meetanshi.com/blog/programmatically-attach-pdf-file-in-magento-2-email/
https://github.com/mageplaza/magento-2-email-attachments/issues/4

Does anyone have an idea what's wrong with my code? is there anything changed in 2.4.2 for File Attachment.


texts:
How to sell a coupon code in Magento.

The coupon code that can be the gift to a friend, so that he can buy products with that code?


texts:
I've been trying to create an override for the addto.phtml file but it doesn't seem to be working.

I have this theme file:

  /app/design/frontend/Vendor/theme/Magento_Catalog/product/view/addto.phtml

With this in the file:

    <?php echo $block->getChildHtml(); ?>

        View Compatibility

I've run:

$ php bin/magento setup:upgrade
$ php bin/magento setup:di:compile
$ php bin/magento setup:static-content:deploy -f
$ php bin/magento cache:clean

Everything was a-ok but refreshing the product view page had no changes. What am I missing from my override?


texts: Magento 1.9 : Admin Edit Form with Left and Right Column?

texts:
=> My Edit Form currently showing like below.

But I want to show it Left and Right side,I don't want in bottom.

=> For example like below :

What I need to do for that.?


texts: Magento2: Import images & set hidden status ?

texts:
I import images in Magento 2 via CSV and this works for base, small and thumb image, just fine! However, in the product view, all three images are shown, as opposed to only the base image. This way, I see three different versions of the same picture in each product page.
When I manually change this and export the product via CSV, i don't see any difference.
Any ideas?
Thanks :)
Mike


texts: Can anyone help me to get all available customer groups? I want to find customer group names and their ids.


texts: How to add a text column to magento dropdown attribute option in Magento 2?

texts:
I would like to extend the options grid for a dropdown product attribute with a new text field which will appear as a new column.

In that field I'm going to store the matching ERP_ID but I would also like to have it visible on the backend here:

This is the first time I'm attempting this so I'd like to know if it's possible and how to proceed with it. Even links to study on the procedure would help a lot.

Any ideas?

Thanks in advance


texts: Changes in Parent Luma theme is not reflected in Child Luma theme in Magento 2.3.0?

texts:
I have created seven child themes and one parent theme for these seven child themes.
All seven child themes points to their parent theme, we've named "Master".

<theme>
    <title>Child Theme 1</title>
    <parent>Company/Child1</parent>
</theme>
<theme>
    <title>Child Theme 2</title>
    <parent>Company/Child2</parent>
</theme>
<theme>
    <title>Child Theme 3</title>
    <parent>Company/Child3</parent>
</theme>

...and so on...

The "Master" parent theme points to "Magento/Luma".

<theme>
    <title>Master</title>
    <parent>Magento/luma</parent>
</theme>

Theme locations:

app/design/frontend/Company/Master
app/design/frontend/Company/Child1
app/design/frontend/Company/Child2
app/design/frontend/Company/Child3

Now to the problem

In the Parent theme "Master" layout file:
app/design/frontend/Company/Master/Magento_Catalog/layout/theme.xml

I have added:

<referenceBlock name="catalog.compare.link" remove="true" />
<referenceBlock name="catalog.compare.sidebar" remove="true"/>
<referenceBlock name="catalogsearch.product.addto.compare" remove="true"/>
<referenceBlock name="category.product.addto.compare" remove="true"/>
<referenceBlock name="crosssell.product.addto.compare" remove="true" />
<referenceBlock name="related.product.addto.compare" remove="true" />
<referenceBlock name="upsell.product.addto.compare" remove="true" />
<referenceBlock name="view.addto.compare" remove="true" />

But nothing happens in the seven child themes?
Changes does not reflect.

Some questions:

app/design/frontend/Magento is empty, no luma theme, nor blank for the parent theme "Master" - is this correct?
The parent theme "Master" is pointing to "Magento/Luma" - should it be "Magento/Blank" instead?

Greatly appreciated if someone can help me shed some light on this,
Thanks,


texts: How to add custom information on product Grid/List view page?

texts: I want to add a description on product Grid/List view page as the picture shows (The "Order Online" and "Delivery Available" part). Is there any way I can achieve this? Or any extension can help me with this? I am using Magento2.3.


texts: Magento 2 API GET comment field from Aheadworks One Step Checkout extension?

texts:
We are using the AheadWorks One Step Checkout extension in our Magento 2 Shop.
Our problem is that in the Magento2 API

https://www.shop.com/rest/V1/orders/12345

The comment field is not activated by Aheadworks and they write they have no solution.

I even looked into

/V1/orders/:id/comments

But that is only showing the order comments which is something completly different.

So how could I retrieve the order comments?


texts: Why does Magento give us the option to disable Form Key Validation on Checkout?

texts:
I've noticed Magento provides us with Form Key validation on Login, Registration and Checkout pages.

However only in the Checkout are we given the option to disable Form Key Validation.

My question is: why does this option exist?

In what scenario would we want to disable Form Key Validation and why are we only given that option for the checkout?


texts: Set different catalog price rules/promotions for each language on a multi-language store

texts:
I have a magento eccommerce with 3 different languages (3 store views).
Prices are the same in each language/store view (and all in euro), but I would like to apply different catalog discounts for each language, for example 10% discount for italian site, 20% discount for french and 25% for english.
How can I do this?
Do I need to install an extension?

Thanks a lot for your help.

P.S. I'm not a magento specialist, so I hope I can do this without code changes.

Thanks a lot
Carlo


texts: How can i solve - No valid data sent - Error

texts:
I am export my products after hosting its not working, but from my localhost its working fine. I can not export from import/export,

am increased max_exe_time

  my store consist 30,000 products

When i try to export products, am faced 500 internal error


texts:
I have copied the file located in: vendor/magento/module_checkout/view/frontend/web/template/minicart/item/default.html
to my theme dir:app/design/frontend/MyVendor/Mytheme/Magento_Checkout/web/template/minicart/item/default.html
After clearing the cache and generating static-content, the template doesn't render and the file does not appear in pub static folder.
Is the path wrong? Is there a command i need to run?
I found this question, where the path was correct:
Magento 2 Rewrite minicart default.html with phtml


texts: How to use 2 third party jquery plugins in one custom module Magento 2

texts:
Slick for slider.
  Fancybox for Custom HTml forms ( SignIn,signUp ...)

In /var/www/html/magento2/app/code/Custommodule/ReviewRating/view/frontend/requirejs-config.js
var config = {

deps: [
    "Custommodule_ReviewRating/js/main",
],

 map: {
    '*': {
        'slickjs': 'Custommodule_ReviewRating/js/slick/slick',
        'fancyboxhb': 'Custommodule_ReviewRating/js/fancybox/fancybox'

    }
},

shim: {
    "slickjs": ["jquery"],
    "fancyboxhb": ["jquery"]
}

};

IN /var/www/html/magento2/app/code/Custommodule/ReviewRating/view/frontend/templates/homehorizontalwidget.phtml

// I want to show popup form when user clicks on below link.

........
click to open

...........

UPDATE I created below main.js and moved all js to this file

IN /var/www/html/magento2/app/code/Custommodule/ReviewRating/view/frontend/web/js/main.js

define([
  "jquery",
  "slickjs",
  "fancyboxhb"
],
function($) {
  "use strict";

    $(document).ready(function(){
        console.log("DID IT! jQuery log complete.");
    // $(".modalbox").fancybox(); // to trigger pop up currently it's not worling

    jQuery('.horizontal-center-home').slick({
                          vertical: false,
                          verticalSwiping: false,
                  dots: false,
                  infinite: true,
                  speed: 300,
                  slidesToShow: 3,
                  slidesToScroll: 1,
                  mobileFirst:true,

                   responsive: [
                        {
                          breakpoint: 1024,
                          settings: {
                            slidesToShow: 4,
                            slidesToScroll: 4,
                            infinite: true,
                            dots: true
                          }
                        },
                        {
                          breakpoint: 600,
                          settings: {
                            slidesToShow: 2,
                            slidesToScroll: 2
                          }
                        },
                        {
                          breakpoint: 480,
                          settings: {
                            slidesToShow: 1,
                            slidesToScroll: 1
                          }
                        }
                  ]
            });

    });

  jQuery('.vertical-homePage').slick({
                  vertical: true,
                  verticalSwiping: false,
                  dots: false,
                  infinite: true,
                  speed: 300,
                  slidesToShow: 3,
                  slidesToScroll: 1,
                  mobileFirst:true,

                   responsive: [
                        {
                          breakpoint: 1024,
                          settings: {
                            slidesToShow: 4,
                            slidesToScroll: 4,
                            infinite: true,
                            dots: true
                          }
                        },
                        {
                          breakpoint: 600,
                          settings: {
                            slidesToShow: 2,
                            slidesToScroll: 2
                          }
                        },
                        {
                          breakpoint: 480,
                          settings: {
                            slidesToShow: 1,
                            slidesToScroll: 1
                          }
                        }
                  ]
            });

    });

    return;
});

  IN console i have error after using fancybox in requirejs-config.js

  fancybox.js:1463 Uncaught ReferenceError: jQuery is not defined
      at fancybox.js:1463


texts:
I have a custom module and I have created the email template for the module too.

I want to cc the email from the module to some specific emails.

Below is my code which I have tried, but CC email is not working.

$emailTemplate  = Mage::getModel('core/email_template')->loadDefault('customer_product_return_template');
$emailTemplateVariables = array();
$emailTemplateVariables['return_ref']  = $return_ref;
$emailTemplate->addBcc("abc@gmail.com");
$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
/* Sender Name */
$sender = Mage::getStoreConfig('trans_email/ident_general/name');
/* Sender Email */
$sender_email = Mage::getStoreConfig('trans_email/ident_general/email');

$mail = Mage::getModel('core/email');
$mail->setToName('Manufactures');
$mail->setToEmail(array($manufacture_email,'xxxxxx@gmail.com'));
$mail->setBody($processedTemplate);
$mail->setSubject('Product Return Request from the customer');
$mail->setFromEmail($sender_email);
$mail->setFromName("abc trades ");

$mail->setType('html');
try {
    $mail->send();
}catch (Exception $e) {

    Mage::getSingleton('core/session')->addError('Unable to send.');
    //$this->_redirect('');
}

I tried to add these lines too, but nothing works for me

//$mail->addBcc('xxxx@gmail.com');
//$mail->setCc(array('a1h1is@gmail.com.com','xxssxx@gmail.com'));

I hope definitely someone has faced the same issue and fixed it, Please help me on this.

UPDATE

Here my issue is , i guess that i am using both

$emailTemplate  = Mage::getModel('core/email_template');

and

$mail = Mage::getModel('core/email');

It would be great pleasure if some one explain this point. Thanks


texts:
Is it possible to retrieve data from the observer and then display it on the page through custom block?
I'm displaying some products in the home page of Magento through my custom block. I've created a custom observer which listens to the event when the product is clicked. The below code in Observer.php gets the product's data which was clicked on, for example the ID and the Name of the product. When I use Mage::log($pName) for example I can see the clicked product's Name appear in the system.log file. So that's all good. What I want to do next is get the exact same product data from this Observer file and pass it on to my block file so I could use the data in block file. For displaying the product which was clicked on in other block. Right now I have two blocks. One is responsible for all products display and the other one should only show the product which was clicked on. That's why I need to get the data to my block from the Observer.

Observer.php

public function getProductData($observer)
{
    $product = $observer->getProduct();
    $pId = $product->getId();
    $pName = $product->getName();

    //Mage::log($pId);
    //Mage::log($pName);
}

Block file

public function recommended()
{
  //code to retrieve data from observer goes here
  //and then priting the data out
}

Phtml file

<?php
$this->recommended();
?>


texts: how to check the customer is logged in or not on server level?

texts:
What i am trying to achieve is: Abandoned Customer Email Notification using 2 ways.
1). when customer logged out or closed his browser,
2). After X no. of days

ON Both ways cron will work.

For 2nd Way i have the solution.

But for the 1st way i am not getting how to check the customer is logged out or not, on the external php page or in module.

Kindly suggest, Please.


texts: Any Drawback on running setup:upgrade, di:compile, static deploy everytime code level edit on Magento 2

texts:
Is it ok to run the following set of commands by default everytime I make a code level edit (layout edits, module creation, extension update)
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static:content:deploy -f
php bin/magento c:f
find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento

I believe that not all edits require, setup upgrade or di:compile.
But, does running all above set of commands even if not required cause any issue.
EDIT: Should not use 777
chmod -R 777 generated/ var/ pub/