texts: Magento 2 - Cache warmer for multiple server

texts:
I have integrated a cache warmer module. Using cronjob it runs and creates cache for all the pages, and it's working properly.

I have multiple servers (Let's say 2 servers), until now there is no need to schedule cronjobs for all servers, I used to schedule cronjobs only on first server.

Since cache used local storage to save cached data, if I schedule cronjob on one server, then cache warmer wont work on other server.

Now my question is, how can I create cache for both servers while cron is scheduled on first server


texts: Data showing in Grid but not in export file Magento2

texts:
I have created a custom report,

Used below code in my ui_component listing file.

<column name="custom_tax_code" class="Vendor\Module\Ui\Component\Listing\Column\Quantity">
 <argument name="data" xsi:type="array">
  <item name="config" xsi:type="array">
  <item name="filter" xsi:type="string">false</item>
  <item name="label" xsi:type="string" translate="true">Tax Code</item>
 </item>
</argument>
</column>

<column name="shipping_amount_custom" class="Vendor\Module\Ui\Component\Listing\Column\Quantity" >
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">false</item>
                <item name="label" xsi:type="string" translate="true">Shipping Amount</item>
            </item>
        </argument>
    </column>

Then in Quantity.php

 class Quantity extends \Magento\Ui\Component\Listing\Columns\Column {

  public function prepareDataSource(array $dataSource) {
    if (isset($dataSource['data']['items'])) {
     foreach ($dataSource['data']['items'] as & $item) {

     $item['custom_tax_code'] = $taxcode; // used some logic to get this value
     $item['shipping_amount_custom'] = $lastItemShippingAmt;// used some logic to get this value
     }
  }
   return $dataSource;
  }
}

This code is working fine and it is showing properly in admin Grid, But when exported to CSV, values for these 2 columns are not showing. likewise i have many other custom columns. posted only 2 here.

How to resolve this issue? Can anyone help me out please. Thanks


texts: Copying Customers/Orders between Magento installations

texts:
I need to copy a subset of customers and orders from one Magento installation to another. While copying new entity IDs must be assigned thus existing ones are not overwritten.

What would be your suggested way of doing it?

This is M2 but I guess an approach would be the same for M1 also.

Regards


texts: New Product Widget not appearing when adding phtml to theme

texts:
I'm trying to add a New Product widget to my home page.  As soon as I had the new_list.phtml into my theme from the base theme, the widget disappear.

Has anyone encounter that issue in Magento ver. 1.9.2.2?


texts: Catalog > Manage Categories entrypoint not visible (Also tabs are missing)

texts:
I am making a custom module which has a functionality to sell products on magento website. I have used customer groups to define sellers and made a custom module, but suddenly categories entry point went missing. When i click on Catalog > Manage Catgories it shows products listing there, and when i click on Add Subcategory it does nothing but just refreshes itself, and product listing remains the same.

Also it is not showing the default tabs when we click on Add Subcategory

General Information
Display Settings
Custom Design

But it only shows Category products all the above 3 are missing.

I didn't change anything in my custom module related to categories. Please guide me what am i doing wrong here. Below is my screenshot.


texts: Dependant country state filter on magento 2 data grid using UI component

texts: Corresponding states to be shown on state filter while selecting a county.


texts: Shoot email after confirmation of purchase of 1 specific product

texts: I have a specific product that when it is purchased and payment confirmed, I need to send a personalized email just for this product, can someone help me please?


texts:
in magento 2.3.1 want to remove decimal place from price from whole website.

like price is 45355,00 than it is showing like 45.355,00 on category page and catalog page, cart page, checkout page everywhere.

So i want only 45355,00 is there any solution for it?


texts: Show Different prices for store views (magento prices at store view level)

texts:
How can we setup different prices for different stores in a website

can anyone help me on this


texts: Look up order with API with Phone number

texts:
I am trying to look up all orders for a user based on there Phone Number using the API.

I have built an application that uses Web Sockets inside of SugarCRM to do a Popup when a phone call is coming in.  The only Data I will have access to at first is a Phone number, so I hope I can look up a user and there orders through the API with just that phone number?

I have done a lot of searching and have not found any examples of looking up orders by phone number through the API.

Does anyone have an idea if this is even possible?  Or better how to do it?


texts:
Just after in need of a bit of help / advice on coding my magento 2 site! Basically I want to change parts of the catalog search results page by removing 2 lines of text that is automatically generated, or edit them to say my own message! If anyone could point me in the right direction that would be great! Please see the image below for the lines I want to remove/edit!

Thanks.


texts: How to limit the search result in Magento 2 with query string

texts:
How can I limit the search results in Magento 2 with query string,
we have something like this to perform the search

http://domain.com/catalogsearch/result/?q=search_term

Is there any query string parameter to limit the resulting rows?

ex : ?q=search_term&limit=5


texts: Create link dynamically in customer account navigation in Magento 2

texts:
Hi i have created account navigation link, and i have two customer groups in magento admin panel, and i only want to display that links to specific group rather than displaying all the time.

here is my xml code for displaying links.

    <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer_account_navigation">
            <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-new-product-link" after="-">
                <arguments>
                    <argument name="label" xsi:type="string">Some link</argument>
                    <argument name="path" xsi:type="string">customer/somelink/index</argument>
                </arguments>
            </block>
        </referenceBlock>
        <referenceBlock name="customer_account_navigation">
            <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-new-some-link" after="-">
                <arguments>
                    <argument name="label" xsi:type="string">new link here</argument>
                    <argument name="path" xsi:type="string">customer/somelinkhere/index</argument>
                </arguments>
            </block>
        </referenceBlock>
    </body>
</page>

please suggest a way for this.


texts: how to change getDateFormat() to only have date and month

texts:
So in my Customer edit form, I need to remove year , so on inspecting i found out the script code renders from

vendor/magento/framework/View/Element/Html/Date.php

code

$html .= '<script type="text/javascript">
        require(["jquery", "mage/calendar"], function($){
                $("#' .
        $this->getId() .
        '").calendar({
                    showsTime: ' .
        ($this->getTimeFormat() ? 'true' : 'false') .
        ',
                    ' .
        ($this->getTimeFormat() ? 'timeFormat: "' .
        $this->getTimeFormat() .
        '",' : '') .
        '
                    dateFormat: "' .
        $this->getDateFormat() .
        '",
                    buttonImage: "' .
        $this->getImage() .
        '",
                    ' .
        ($calendarYearsRange ? 'yearRange: "' .
        $calendarYearsRange .
        '",' : '') .
        '
                    buttonText: "' .
        (string)new \Magento\Framework\Phrase(
            'Select Date'
        ) .
        '"' . ($maxDate ? ', maxDate: "' . $maxDate . '"' : '') .
        ($changeMonth === null ? '' : ', changeMonth: ' . $changeMonth) .
        ($changeYear === null ? '' : ', changeYear: ' . $changeYear) .
        ($showOn ? ', showOn: "' . $showOn . '"' : '') .
        ($firstDay ? ', firstDay: ' . $firstDay : '') .
        '})
        });
        </script>';

and the generated html is

  require(["jquery", "mage/calendar"], function($){
                $("#dob").calendar({
                    showsTime: false,
                    dateFormat: "M/d/Y",
                    buttonImage: "https://x-bitbucket-pr-463-24lbvlq-aup5t2xnmlbog.us-3.magentosite.cloud/static/version1557136878/frontend/Mgs/yx_theme/en_US/Magento_Theme/calendar.png",
                    yearRange: "-120y:c+nn",
                    buttonText: "Select Date", maxDate: "-1d", changeMonth: true, changeYear: true, showOn: "both"})
        });

So how can I change getDateFormat() function so that my date format would be only month and date. And i guess i need to remove yearRange as well.


texts: Can I install magento in folder but view in domain root?

texts:
I have a Magento installation in /store  but I actually want the store to be visible from / without cluttering up my domain root.

Is this possible without 301 directs?

I know in Wordpress it's pretty simple, but I'm not overly familiar with Magento.

Thanks

EDIT:

I've tried using a rewrite e.g

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.co.uk$
RewriteCond %{REQUEST_URI} !^/store/
RewriteRule ^(.*)$ /store/$1

That works for everything except the home page i.e works with /index.php but not /


texts:
My config is now:

<?xml version="1.0"?>
<config>
        <module>
                <VMRReports_AdminHelloWorld>
                        <version>1.0</version>
                </VMRReports_AdminHelloWorld>
        </module>
        <admin>
                <routers>
                        <adminhtml>
                                <args>
                                        <modules>
                                                <helloworld before="Mage_Adminhtml">VMRReports_AdminHelloWorld</helloworld>
                                        </modules>
                                </args>
                        </adminhtml>
                </routers>
        </admin>
</config>

I was hoping that would show something in mysite.com/admin/helloworld but it doesn't.

I have tried turning on debugging but i dont see anything showing up in /var/log/system.log

Shouldn't this do something even if my controller is wrong?


texts: Edit link for default shipping address Magento 2 checkout

texts: I need to add the edit link for default shipping address at Magento 2 checkout page.


texts: Should order async be enabled on production?

texts:
I work for a project and "dev/grid/async_indexing" is enabled on production, should it be and for what reason ?

(It leads to an issue with "archive orders")

Ty


texts:
I'm creating theme to be added to my store but it doesn't work
here is default.xml in the following directory:
magento_directory\app\design\frontend\vendor_name\theme_name\layout

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="header-wrapper" remove="true">
        <block class="Magento\Framework\View\Element\Template" name="customtext" template="MyTheme::customtext.phtml" />
    </referenceContainer>
</body>
</page>

here is my customtext.phtml file in the following directory
magento_directory\app\design\frontend\vendor_name\theme_name\templates

<div class="block" style="float: right;margin-bottom: 0.5%;margin-top: 0.5%;">
   <?php echo __('This is Custom Text'); ?>
</div>

and theme.xml file in the following directory
magento_directory\app\design\frontend\vendor_name\theme_name

<?xml version="1.0"?>
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>My theme</title> <!-- your theme's name -->
    <parent>Magento/blank</parent> <!-- the parent theme, in case your theme inherits from an existing theme -->

</theme>


texts: Exclude Category when showing product collection

texts:
I am showing Most popular products and I want to be able to exclude certain products from showing.

I thought the best way would be to exclude a category and when I want to exclude a product I can put it it the exclude category.

I need this to work even if the product is in a different category.

I am showing Most popular products with this:

$storeId2 = Mage::app()->getStore()->getId();
    $products2 = Mage::getResourceModel('reports/product_collection')
        ->addOrderedQty()
        ->addAttributeToSelect('*')
        ->addAttributeToSelect(array('name', 'price', 'small_image'))
        ->setStoreId($storeId2)
        ->addStoreFilter($storeId2)
        ->setOrder('ordered_qty', 'desc');

Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products2);
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products2);

$x = 1;
    foreach($products2 as $prod2){
        $inventory2 = Mage::getModel('cataloginventory/stock_item')->loadByProduct($prod2);
        $actual_stock3 = (int)$inventory2->getQty();

    if ($actual_stock3<1){
    echo $prod2->getName() . ' - ' . $actual_stock3 . ' - ' . number_format($prod2->getData('ordered_qty'), 0) . '</br>';
    if ($x++ == 10) break;
    }
    }

How do I exclude all products in, lets say category 151 even if the product is in another category?


texts: Warning: Cannot use a scalar value as an array in... SessionManager.php on line 492

texts:
now I have an error in Magento 2 that shows this error:
There has been an error processing your request

Warning: Cannot use a scalar value as an array in
/home/web/domains/web.com/public_html/vendor/magento/framework/Session/SessionManager.php
on line 492

Do you know how to solve this? I use Magento 2.3.5


texts:
I'm currently experiencing multiple errors on my site, i think that they are all related in some way, for the reasons i'm going to explain, the issues are:

removing an extension (mailchimp for magento) causes the backend and
the frontend to get messy and unusable, i've tried, for what i
know,to clean the cache and run the compilation process, but only
restoring a backup solved the situation.
Going in Payment methods > bank transfer payment > Istructions and
changing in any way the text causes the frontend to get messy and the
backend to be inaccessible. I've asked my server provider to know if
there were problems with permissions. The permissions were setted
right, he stated that he could see the link of the backend page
changing, and that this was the problem, he has gived me this error
from log. [access_compat:error] [...] AH01797: client denied by
server configuration:
Edit: I've actually found that the problem happens anywhere in configuration page.

Even if this errors seems disconnected (at least to me) I think they have a common source, because once i've copied the site to create a test environment i wasn't able to duplicate this issues. So, in my test site, copied from the same folders and with a copy of the same database, situaded in a subdomain in the same server, i can't get one of this errors.

Any one has any idea about what's going on? I'm kinda new to magento so i really don't know what to do.
Many thanks.


texts: Can't Override or Plugin Magento\Quote\Model\Cart\ShippingMethodManagement

texts:
I must be not understanding something. When I try to override or extend via plugin the Magento\Quote\Model\Cart\ShippingMethodManagement class it just doesn't work. Here's my code:

frontend/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Quote\Model\ShippingMethodManagement">
    <plugin name="vnsShippingmethodmanagement" type="VNS\Shippingquote\Model\ShippingMethodManagement" sortOrder="1"/>
</type>

Model/ShippingMethodManagement.php

public function __construct(
    \Magento\Catalog\Api\ProductRepositoryInterface $productRepository
) {
    $this->productRepository = $productRepository;
}

private function afterGetShippingMethods(Quote $quote, $output)
{
    error_log('test');
}

Module is installed/enabled, cache cleared, genereated/ deleted.


texts: Magento 2 : Upgrade Data Version of custom module using setup:db-data:upgrade

texts:
I created a custom module which has below UpgradeData.php.

<?php

namespace Akhil\Database\Setup;

use Magento\Framework\Setup\UpgradeDataInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;

class UpgradeData implements UpgradeDataInterface {

    protected $newsFactory = '';

    public function __construct(\Akhil\News\Model\NewsFactory $newsFactory) {
        $this->newsFactory = $newsFactory;
    }

    public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context) {
        if (version_compare($context->getVersion(), '1.0.1', '<')) {
        $data = [
            'news_title' => "News Title upgrade",
            'news_content' => "News content upgrade"
        ];
        $news = $this->newsFactory->create();
        $news->addData($data)->save();
        }
        if (version_compare($context->getVersion(), '1.0.2', '<')) {
        $data = [
            'news_title' => "News Title upgrade 1",
            'news_content' => "News content upgrade 1"
        ];
        $news = $this->newsFactory->create();
        $news->addData($data)->save();
        }
        if (version_compare($context->getVersion(), '1.0.3', '<')) {
        $data = [
            'news_title' => "News Title upgrade 2",
            'news_content' => "News content upgrade 2"
        ];
        $news = $this->newsFactory->create();
        $news->addData($data)->save();
        }

    }

}

Here is my module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Akhil_Database" setup_version="1.0.1" data_version="1.0.2" />
</config>

Now if I run below command:

php bin/magento setup:db-data:upgrade

It does not upgrade the data version. Even in the table setup_module I don't see upgraded version.

Although, I am able to make my work done by changing setup_version="1.0.1" to setup_version="1.0.2" and run php bin/magento setup:upgrade

But my question why php bin/magento setup:db-data:upgrade not working for me. What I am doing wrong here?

As per my knowledge:

  php bin/magento setup:upgrade //To upgrade both schema and data
  php bin/magento setup:db-schema:upgrade //To upgrade only schema
  php bin/magento setup:db-data:upgrade //To upgrade only data


texts: How to get the highest tax class from the the order id in magento 2?

texts: I need to get the highest tax class from the item ordered. So I need to show the shipping charge based on the highest tax class percentage.


texts: Magento 2 - Fetch Customer Address Attribute

texts:
I need to fetch the value of customer address attribute just like we have product attribute

I am using Magento\Customer\Api\AddressRepositoryInterface and created the instance from it

$addressRepository = $objectManager->create("Magento\Customer\Api\AddressRepositoryInterface");
$address = $addressRepository->getById($customerId);

From $address instance, I am able to fetch the default field or attribute just like

$address->getFirstname();

The problem is, I am not able to fetch the newly created customer address attribute

For Example:
My newly created customer address attribute is area but I am not able to fetch it from $address->getArea();

Any help, experience and knowledge sharing would be appreciated


texts: Multiple magento frontend servers and one Redis session cache

texts:
Right now I am using Magento 1.7.0.2 with Redis Session Storage. I am looking forward to adding additional frontend server behind a load balancer. Can I use the same Redis server for sessions for both frontend servers?

Idea:

Server1 = Apache + PHP + Redis
Server2 = Apache + PHP + Database

Varnish listens for connections and uses Server1 or Server2 to handle misses and esi stuff

Thanks!


texts: Unable to open admin panel after successful installation of magento on localhost in windows 10

texts: I'm using wamp server 2.5 and php version 5.5.12.,


texts: Get specific images for Facebook Product Catalog

texts:
I try to setup a XML feed so can add my products to Facebook Product Catalog. After search I found this but it get all product images.

    function getProductData($iProduct) {
      Mage::getmodel( 'catalog/product' );
        $aData['title'] = mb_substr( $oProduct->getName(  ), 0, 299, 'UTF-8' );
        $aData['description'] = strip_tags( $oProduct->getShortDescription(  ) );
        $oProduct->getFinalPrice(  );
        $_finalPrice = ;
        $aData['price'] = preg_replace( '/,/', '.', Mage::helper( 'tax' )->getPrice( $oProduct, $_finalPrice, true ) );
        $aData['link'] = mb_substr( $oProduct->getProductUrl(  ), 0, 299, 'UTF-8' );
        $aData['image_link_large'] = mb_substr( Mage::getbaseurl( URL_TYPE_MEDIA ) . 'catalog/product' . $oProduct->getImage(  ), 0, 399, 'UTF-8' );

What I want is to get only the images that the filename contain "facebook".
Something like this "image01facebook.jpg" or "image01_facebook.jpg"


texts: Magento 2.0: How to override the .phtml in vendor>magento>module-theme>view>frontent>templates>html

texts:
I already made a structure app>design>frontend>  > .
What structure do I need to make do override the .phtml in vendor>magento>module-theme>view>frontent>templates>html


texts: Magento 2.3: Installation time getting Fatal error

texts:
While installing Magento 2.3, I am facing below error.

  Fatal error: Uncaught Magento\Framework\Exception\FileSystemException:
  Directory "/var/www/html/M23/var/cache/" cannot be created
  Warning!mkdir(): Permission denied in
  /var/www/html/M23/vendor/magento/framework/Filesystem/Driver/File.php

I have given permission 770 for directory and 660 for file type,
As well as trying 775 and 664 for directory and file respectively.

Finally trying 777 for var folder but No Luck, still facing the same issue,
Deleted var/cache/*, var/di/* , var/generation/*  var/page_cache/* var/view_preprocessed/*

Have I missed something?

Can you please let me know the correct file and folder permission.


texts: Why save and duplicate completely messes up the product URL?

texts:
I usually use the save & duplicate option and I've noticed that whenever I do that it always uses the URL from the first product I created and then I will create other products by changing the product name and maybe another option and every URL will be the exact same with a different number at the end and I don't know how to fix this or if this is a known issue with Magento 2.1.6

Example:

I started by creating this product:

https://www.ooples.com/black-butler-ciel-pink-ballgown-5-plush-keychain.html

Here are the next 2 products I created using save & duplicate:

https://www.ooples.com/black-butler-ciel-pink-ballgown-5-plush-keychain-1.html
https://www.ooples.com/catalog/product/view/id/54914/s/black-butler-ciel-pink-ballgown-5-plush-keychain-2/

Not only are both URLs completely wrong but even the format for the second one is completely different from the others and all of my URLs are set to be like the first one. I don't change any settings other than product name and the product photo and maybe a category here or there.


texts:
If I go to System->Tools->Cache Management, flush page cache then it will flush all the pages cache. I need to figure out the way to flush single page specifically which I want.

Any help, experience and knowledge sharing would be appreciated.


texts: Search products with a specific attribute value

texts:
In my block code , I am trying programatically to search a list of products that have a attribute with a specific value. i am using this code for it.

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

//filter for products whose orig_price is greater than (gt) 100
$collection->addFieldToFilter(array(
    array('attribute'=>'orig_price','gt'=>'100'),
));

//AND filter for products whose orig_price is less than (lt) 130
$collection->addFieldToFilter(array(
    array('attribute'=>'orig_price','lt'=>'130'),
));


texts: Magento2: How to change the title of the delivery method at checkout using KnockoutJS?

texts:
Magento2: How to Changing the title of the delivery method at checkout using KnockoutJS ?

On checkout we see that is made access to "/ rest / store_view_pt_br / V1 / carts / mine / estimate-shipping-methods-by-address-id" containing the return of delivery methods

I believe that the Model is accessed and made the change should work but still do not know mess with KnockoutJS


texts: How to add recaptcha v2 for multiple forms on single page?

texts:
I am trying to configure re captcha for contact us form and newsletter form.

Both these form are on one page.

Now I have to configure common recaptcha for these two form and when on submit captcha should work for both forms.

I have tried to configure programmatically for both form but it is not working me. According to me captcha gives conflicts on form submission

I have following code for news letter form:

and

<button class="g-recaptcha action subscribe primary" data-sitekey="SITE_KEY" data-callback='onSubmit' title="<?php /* @escapeNotVerified */ echo __('Subscribe') ?>" type="submit">
   <?php /* @escapeNotVerified */ echo __('Subscribe') ?>
</button>

for the contact-us form:

and

<button class="g-recaptcha action submit" data-sitekey="SITE_KEY" data-callback='onSubmit' title="<?php /* @escapeNotVerified */ echo __('Subscribe') ?>" type="submit">
   <?php /* @escapeNotVerified */ echo __('Submit') ?>
</button>

is it possible to add recaptcha for multiple forms on same page programmatically?


texts: MAGENTO2: Discount Bug - Magento2 (2.3.3)

texts:
I have a fixed discount rule configured as follows:

Now the way I expected this to work is if you have >= $100 in your basket you can use the voucher COACH100. The actual outcome is the code will only apply if the cost of the basket is still going to be >= $100, is that the correct behaviour?
If it is correct behaviour, is it possible to acheive the outcome I require?


texts: How does routing work for product pages?

texts:
The Magento documentation says Magento URLs are built like <store-url>/<store-code>/<front-name>/<controller-name>/<action-name>, but I can't find anything about how routing is done when the URL isn't in that format.

When I have a catalog page that lists my products, each product has a destination URL like http://example.com/my-product.html.  How does the routing for that work, and how do I know what controller my request is being routed to?


texts:
Anyone out there know how to vault a Braintree card without having to create a payment ?

I need to be able to allow customers to change their card details on a recurring payment. To do so would require creating a new entry in the vault with a new public_hash and gateway_token for braintree.

Ideally i'd like to incorporate the Braintree card form onto a page in the account.

I haven't been able to find anything in the braintree controllers for actually making the requests with card details to the braintree API, so assume this must all be done in JS ?

If anyone could shed some light that would be great.


texts: The amount of people that currently have one product in their cart?

texts:
How to display how many times a product has been added to cart Including all users.

$quoteCount = Mage::getModel('sales/quote_item')->getCollection()->addFiledToFilter('product_id',123)->count();


texts: Use custom classes in Magento 2 controller

texts:
I'm migrating my module from Magento 1 to Magento 2, some code is no longer working.

Instantiating the class doesn't work anymore, is there a different way to do it in Magento 2?

include("pathtomyclass");
class Index extends \Magento\Backend\App\Action
{

public function execute() {

    $this->_view->loadLayout();
     $this->_setActiveMenu(
        'company_project::themenuitem'
    );
    $this->_view->getPage()->getConfig()->getTitle()->prepend(__(Title of my module'));
    $this->_view->renderLayout();
    $class = new myClass();

This doesn't work as it says cannot redclare myClass.

I tried to replace the last line with this one

$class = $this->_objectManager->create('company\project\Model\myClass');

It gives the same error.

Any help is appreciated. Thanks


texts: CLI Sample Data installation error - Magento 2

texts:
I'm unable to install the Magento 2 sample data via the CLI, this is after Magento 2 has already been installed. Currently on 2.1.1.

The steps I've taken:

php bin/magento sampledata:deploy
php bin/magento setup:upgrade

The setup:upgrade command fails with the following error:

...
Module 'Magento_GiftMessageStaging':
Module 'Magento_CatalogStaging':
Module 'Magento_GiftRegistrySampleData':
Installing data... PHP Fatal error:  Uncaught Error: Call to a member function getData() on boolean in /var/www/vhosts/projectname/production/htdocs/vendor/magento/module-gift-registry-sample-data/Model/GiftRegistry.php:192
Stack trace:
#0 /var/www/vhosts/projectname/production/htdocs/vendor/magento/module-gift-registry-sample-data/Model/GiftRegistry.php(144): Magento\GiftRegistrySampleData\Model\GiftRegistry->generateData(Array)
#1 /var/www/vhosts/projectname/production/htdocs/vendor/magento/module-gift-registry-sample-data/Setup/Installer.php(30): Magento\GiftRegistrySampleData\Model\GiftRegistry->install(Array)
#2 [internal function]: Magento\GiftRegistrySampleData\Setup\Installer->install()
#3 /var/www/vhosts/projectname/production/htdocs/vendor/magento/framework/App/State.php(171): call_user_func_array(Array, Array)
#4 /var/www/vhosts/projectname/production/htdocs/vendor/magento/framework/Setup/SampleData/Executor.php(50): Magento\Framework\App\State->emulateAreaCode('setup', Array)
#5 /var/www/vhosts/projectname/production/htdocs/vendor/magento/module in /var/www/vhosts/projectname/production/htdocs/vendor/magento/module-gift-registry-sample-data/Model/GiftRegistry.php on line 192

Does anyone know how this is resolved? I'm a front-end developer so I'm not too great at spotting the errors in PHP.

Thanks,

Ben


texts:
Maybe it's not a tough question but I'm not very practiced in magento, I hope you can help me :)

I installed a theme (unero, for those who know it) for magento V.1.9.3.6 that gives the possibility to create a multilingual site. I would like the default language to be Italian, so I deactivated all the other available languages.

Unfortunately, if I disable the English language, which is the default one, the site becomes unreachable. In fact, the English language has id: 1 (and is in bold) as you can see from the screenshot.

How can I set Italian to language which ALL users land (independently of geolocation)?

Of course the general options (ex: default country, locale options... are all setted on "Italy") Should I create a dedicated website or store?

Thanks for your help!


texts: Magento 2 - How to display a programmatically created attribute under SKU on the frontend?

texts:
I have created a custom module, which creating an product attribute, now I need to display this attribute on the frontend, right under product SKU

How I can I do this? Thanks everyone!


texts: Magento 1.9.2. - Get only last Tier Price in view.phtml

texts:
In my view.phtml i would get only last tier price of my product. For example for a my product i have this prices:
100 ($ 1,20) - 200 ($ 1,10) - 300 ($ 1,00)

I want see in my view.phtml only last tier price -> $ 1,00

I tried with this code: $_product->getTierPrice(1) but show only first tier price in page of product.

How can i do?


texts: Magento2 - Change customer Group Programatically for guest and logged in users

texts:
I have a form in which when a particular code is given, the customer group should be changed to apply discounts.

I have tried the following code, it changes the customer group. I can see the discounted prices in Product list page as well as Product detail page. But in the cart and checkout process it doesnt apply.

$this->session->setCustomerGroupId("3");

Can someone please help in solving the issue.


texts:
I am using magento community edition 1.9.0.1. I try the REST Client Example explained here: http://www.magentocommerce.com/api/rest/testing_rest_resources.html

But every time I send a request I got a 404

My server runs on localhost under the url : http://localhost/magento/

The rest api url I try is: http://localhost/magento/api/rest/products

For testing I am using the Firefox RESTClient Plugin.

What could be the reason for the error code 404?

Solution:

The reason for the 404 error message was a missing configuration in the apache2.con File (/etc/apache2/apache2.conf).

To enable rewrites it is necessary to add the option 'AllowOverride All'

<Directory /var/www/html/magento/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

Be careful with the directory path in the Tag 'Directory'. The path must match the location of your Magento installation on the file system.
After changing the configuration restart the apache server.


texts:
I am using "Sage Pay" for payment transaction in magento. But when I place order it show the following error:

  An sage pay error ocurred: SQLSTATE[23000]: Integrity constraint violation:1062 Duplicate entry '2000734" for  key 'UNQ_SALES_FLAT_INVOICE_INCREMENT_ID'


texts: Ultimo - 'Related products' owl Carousel

texts:
I am using Ultimo theme.

Does anybody know how to change the scrolling direction of the 'related products' slider? The slider is based on the popular Owl Carousel.

I would assume the code for this is inside: 'js/infortis/jquery/plugins/jquery.owlcarousel.min.js' but I am not 100% sure because I think it is a minified version of the original script which can be found on the Owl Carousel developer's site.

All I want to do is change the slider from scrolling horizontally to vertically if possible.

Any help would be most welcome, thank you.


texts:
I am building a module with Magento 2. I need to add custom font. All I did is to create a
Module/NameSpace/view/frontend/web/css/source/_typography.less
.lib-font-face(
  @family-name:'circular’,
  @font-path: ‘@{baseDir}fonts/lineto-circular-pro-medium’,
  @font-weight: @font-light
);

.lib-font-face(
  @family-name:'circular’,
  @font-path: ‘@{baseDir}fonts/lineto-circular-pro-book’,
  @font-weight: @font-normal
);

.lib-font-face(
  @family-name:'circular’,
  @font-path: ‘@{baseDir}fonts/lineto-circular-pro-bold’,
  @font-weight: @font-bold
);

I also added my fonts to Module/NameSpace/view/frontend/web/fonts
However, the fonts don't show up or load. Do you know why? Thanks


texts: Magento 2 - Add tree category selector on backend module

texts:
I'm trying to create my custom form on a backend module, I need to allow the admin to select some categories, so I wanted to use the magento standard category selector, well I add my field in this way:

$fieldset->addField(
        'input_id',
        'Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Category',
        [
            'name' => 'input_name',
            'label' => __('My label'),
            'title' => __('My title'),
            'required' => true
        ]
    );

then in the .xml of my custom module (where I call the block with the form) I also added this css in the head

<head>
    <title>
        Settings
    </title>
    <css src="Magento_Catalog::web/catalog/category-selector.css" />
</head>

In my module now I could find the input, but the css is not loaded (I get error 404 in the console log) and It not work fine.

I already tryed to clean the cache and run the deploy of static content, but I still get the same error.

If is possible I would like to know how to add a short description for each input to made easier to understand what they have to input.

Thank you.


texts: Magento 2: How to override Adminhtml "Shipping & Handling Information" Information

texts:
I'm following https://ranasohel.me/2015/10/02/how-to-overwrite-sales-view-order-phtml-file-in-magento2/

I would like to override magento\vendor\magento\module-shipping\view\adminhtml\templates\order\view\info.phtml

How to do this?


texts: magento2: how to put widget (slider) in header?

texts:
could anyone advise me how to put widget (slider) in header just next to logo? (as on screenshot below)?
Widget is ready and prepared by TemplateMonster extension, i just want to move it upstairs, like on screenshot:


texts:
I have tried migrating M1 with sample data & rwd theme to M2 luma theme & data from M1, which worked & now wanna migrate M1(real live site data) with extension(its data) & its theme to M2 & bit of confused to plan it, like what should I do first.

Install latest M2 without sample data
Migrate M1 data to M2
Install/configure M2 paid/3rd party theme & paid/3rd party extension

or

Install latest M2 without sample data
Install/configure M2 paid/3rd party theme & paid/3rd party extension
Migrate M1 data to M2

What should I do? As I dont want to loose any data added to magento1 tables(ie. in sales_flat_order_grid , sales rules, catalog_product_flat, etc) by extension & so I am assuming If I install M2 extension & then migrate data all extension data will be added to magento tables(some of mentioned above)

And after migration of category, products, customers & sales
How can I again migrate all data(from beginning of 1st record) for just only customer & sales? without delta migration


texts: Display "only X left threshold" and stock status on category view

texts:
I'm new to Magento(2) and I'm trying to display Stock Status, stock count, and quantity field in category view like in product view.
I don't know where to get theses values and where to put it...
I'm using magento 2.2.10 and I'm using the default luma theme

I found that if i comment some containers in catalog_product_view.xml at rootFolder/vendor/magento/module-catalog/view/frontend/layout, it disable it from the product page, so i suppose that i need to copy this code to some other file but i can't figure it out...

Thanks in advance for your help guys

Where I want to add information:

Where I want to copy values into category view:


texts: Error in using composer to install a module in Magento 2.0

texts:
I have used Composer for installing other modules specially from github and they worked fine. However I have problem installing the following module to Magento 2.0 .
The module I want to install is fireGento_FastSimpleImport2: https://github.com/firegento/FireGento_FastSimpleImport2

and the composer name is: firegento/fastsimpleimport2

However when I write in terminal the following command in Magento root directory:

sudo composer require firegento/fastsimpleimport2

I get the follwing error:

  [InvalidArgumentException]
  Could not find package firegento/fastsimpleimport2 at any version for
  your minimum-stability (alpha)     . Check the package spelling or
  your minimum-stability

I have contacted them and I'm waiting for their response, but sharing this here can also solve someone else's problem.

Update

This is our Magento 2.0.5 composer.json:

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "version": "2.0.5",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/firegento/FireGento_FastSimpleImport2.git"
        },
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    ],
    "require": {
        "magento/product-community-edition": "2.0.5",
        "composer/composer": "@alpha"
    },
    "require-dev": {
        "phpunit/phpunit": "4.1.0",
        "squizlabs/php_codesniffer": "1.5.3",
        "phpmd/phpmd": "2.3.*",
        "pdepend/pdepend": "2.2.2",
        "sjparkinson/static-review": "~4.1",
        "fabpot/php-cs-fixer": "~1.2",
        "lusitanian/oauth": "~0.3 <=0.7.0"
    },
    "config": {
        "use-include-path": true
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/"
        },
        "psr-0": {
            "": "app/code/"
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
        }
    },
    "minimum-stability": "alpha",
    "prefer-stable": true,
    "extra": {
        "magento-force": "override"
    }
}

We run the following command from root of our magento installation:
sudo composer require firegento/fastsimpleimport2

I still get the same error. Any thoughts?


texts: Shopping Cart Shipping Methods are Unavailable

texts:
I have to set shipping method to shopping cart , and i am able to display all the available shipping methods , and I have given valid shipping method as the input parameter to SOAP web service method "shoppingCartShippingMethod" so for this, Is there any need to change configuration at the Magento Admin Panel?

<?php
$proxy = new SoapClient('http://127.0.0.1/magento/index.php/api/v2_soap/?wsdl');

$sessionId = $proxy->login('cats', 'sudhir123');
echo "\nSession Id = ";
var_dump($sessionId);

$cartId = $proxy->shoppingCartCreate($sessionId, '3');
echo "\nCart Id = ";
var_dump($cartId);

$customerData = array(
"firstname" => "testFirstname",
"lastname" => "testLastName",
"email" => "testEmail@mail.com",
"mode" => "guest",
"website_id" => "0"
  );
$resultCustomerSet = $proxy->shoppingCartCustomerSet($sessionId, $cartId, $customerData);
echo "\nCustomer Set to Shopping Cart = ";
var_dump($resultCustomerSet);

$customeraddress = $proxy->shoppingCartCustomerAddresses($sessionId,     $cartId, array(array(
'mode' => 'billing',
'firstname' => 'Sudhir',
'lastname' => 'Belagali',
'street' => 'street address',
'city' => 'city',
'region' => 'region',
'postcode' => 'postcode',
'country_id' => 'US',
'telephone' => '123456789',
'is_default_billing' => 1
)));
echo "\nCustomer Address Set to Shopping Cart = ";
var_dump($customeraddress);

$shoppingcartproduct = $proxy->shoppingCartProductAdd($sessionId,    $cartId, array(array(
'product_id' => '917',
'sku' => 'cricketbat',
'qty' => '5',
'options' => null,
'bundle_option' => null,
'bundle_option_qty' => null,
'links' => null
)));
echo "\nProduct has been added to cart = ";
var_dump($shoppingcartproduct);

$cartInfo = $proxy->shoppingCartInfo($sessionId, $cartId);
echo "\nCart Information for this Cart Id is ( ".$cartId." )";
var_dump($cartInfo);

$result = $proxy->shoppingCartShippingList($sessionId, $cartId);
echo "\nAvailable Shipping methods = ";
var_dump($result);
?>


texts: What is the fastest way to get 'is_active' column value from 'customer_entity" table?

texts:
I'd like to ask for the fastest way to get the column value of 'is_active' from 'customer_entity' table. It could be using object_manager or something.
Thank you in advance


texts:
I change my admin URL to a custom URL and I cannot access my store admin anymore.

How can I revert the change that I made?


texts: what steps I need to follow if I want to migrate my 1.9.x theme to 2.x

texts: I want to migrate my old magento theme to a new Magento 2.x version. What I can do or how I can start with this process.


texts: Magento 2 : Override layout.xml File Within Custom Module

texts:
Looking at the Magento 2 docs, you can override a base/core layout.xml file - http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-override.html

Is it possible, to overide within a module rather than theme?

Alternatively, is it possible to bundle a theme within a module and extend that (and multiple other themes from multiple other modules) from the main website theme?


texts:
I am using Magento 2.3.5, and whenever i run any sales related api , i got error like
message: "DateTime::__construct(): Failed to parse time string (18/08/2020 12:36) at position 0 (1): Unexpected character"

can anyone help me, where should i check this. and how to solve this?


texts: Is it necessary to override _isAllowed in your Admin controller?

texts:
The _isAllowed method is where you, as a Admin Panel programmer,
  should place your ACL checks. As you can see, by default, this method
  returns true. That means if you don’t define your own _isAllowed
  method your Admin Panel features will be open to any user with an
  Admin Panel account, and people using your code will have no way to
  restrict access to your features. This may not be a problem, but it’s
  definitely something you should be aware of.

Source: http://alanstorm.com/magento_acl_authentication

Without overriding _isAllowed (so it always return true as inherited from parent class), I tried with another account as a role that doesn't have that resource checked in the Permission -> Role.

Using that account, I cannot see that resource in the admin menu. Also when trying to access that resource by modifying the URL, I got redirected to Dashboard.

So it seems pretty secured to me, just wondering what's the reason (if any) we better override that _isAllowed function?


texts: Override Magento_Ui modal-popup.html file

texts:
I need to override the modal-popup.html file in my custom theme (I want to remove the "Continue" button).

I've tried to create the following directory in the theme's directory:

argento-essence-custom/Magento_Ui/view/base/web/templates/modal

and then i ran on CLI

setup:static-content:deploy
cache:flush

but it didn't work,
Thank you in advance for the help.

Theme: local custom version of argento-essence.


texts:
I want all category in magento like under given structure.

parent1
   par2
     child1
   par3
     child2
     child3
     child4
   par4
parent2
   par5
     child5
   par6
     child6
parent3
parent4

Can any one help?


texts: Magento 2 How to move product swatches container

texts:
I am trying to change product swatches container and putting it in detailed info tabs.But it move whole option block.How to move only swatches.Table is a watches image.

<move element="product.info.options.swatches" destination="full.area.tabs" before="-"/>


texts: Magento 2 : How to filter customer group collection?

texts:
Anybody have idea about how can i filter customer group pragmatically ?

I can able to get customer group collection by using below code.

$customerGroupsCollection = $objectManager->create('\Magento\Customer\Model\ResourceModel\Group\Collection');

print_r($customerGroupsCollection->getData()); exit;

Output

[6] => Array
    (
        [customer_group_id] => 9
        [customer_group_code] => first
        [tax_class_id] => 3
        [custom_shipping_amount] => 1200
        [group_creator] => newnew
        [group_creator_id] => 10
        [group_code] => first
        [total_members] =>
        [group_validity] =>
        [members_name] =>
        [member_profile_image] =>
        [group_shopping_amount] =>
        [group_image] => /k/o/koala_1.jpg
        [group_link] => first
    )

Now i am trying to apply addAttributeToFilter but its not working !?

Anyone know what is missing ?

$customerGroupsCollection = $objectManager->create('\Magento\Customer\Model\ResourceModel\Group\Collection');

$customerGroupsCollection->addAttributeToSelect('*')->addAttributeToFilter('group_link',['eq'=>'thisisfreshgroup']);
print_r($customerGroupsCollection->getData()); exit;

Getting unDefined Method addAttributeToFilter.


texts: How to hide the Cart Subtotal amount in mini cart popup in magento 2

texts:
Please suggest the solution to hide the Cart Subtotal amount and product price in the mini cart popup.

Only i need to show the number of quantity items in the popup.


texts:
How can i change checkout,cart messages?

Example

1:Product Name was added to shopping cart I want cart to be replaced with bag.

2.Are you sure you want to remove item from shopping cart.


texts: Fatal error after installation of Magento 2.2.3

texts:
After installation of Magento 2.2.3
store shows below error. I am using php version 7.2

Fatal error: Uncaught Error: Class 'Magento\Framework\Autoload
\AutoloaderRegistry' not found in /home/user/public_html
/app/autoload.php:37 Stack trace: #0 /home/user/public_html
/app/bootstrap.php(30): require_once() #1 /home/user/public_html
/index.php(22): require('/home/Fatal error/...') #2 {main} thrown in
/home/user/public_html/app/autoload.php on line 37

Thanks for your answer


texts: Magento CE 2.3.1 - uptimerobot.com causes 404 errors on configured URLs

texts:
I have configured Homepage, Contact us, etc. to be monitored by uptimerobot.com.
But randomly it causes 404 error. And after clearing the cache it fixes the issue (but reappears later).
Note that 404 happens to only those pages which are configured to be tracked by uptimerobot.com

FYI, I am using

Magento CE 2.3.1
Redis
FPC (Filesystem)

I believe it has something to with the request headers sent uptimerobot in order to access those pages.

"HEAD /s HTTP/1.1" 200 0 "https://www.magepsycho.com/" "Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)"

Have anyone faced such issue with some kind of crawlers/bots?

NOTE: The issue is not occurring when the cache is disabled.


texts: Installing sample products in a extension using data setup

texts:
I am developing an extension (Magento EE 1.14.1.0) in which I have the standard data setup script to

create a website, store group and store
create categories for the new store
create products under the categories

When products are being created, I get the following error - Fatal error: Call to a member function getStoreIds() on boolean in /app/code/core/Mage/Catalog/Model/Resource/Abstract.php on line 257

On researching I was able to find that the problem when occurs when Status attribute is being saved. This attribute has as Website scope and the system is trying to assign the attribute to all stores under the website I created. But there is a logic in getStore function that returns a default store (with just the store id and code set - and the website not being set - which I think is a bug) when the installation process is not complete (which the system determines based on the creation date of local.xml file). So there are 2 issues:

getStore function returns the default store (with store_id = 1) even if object being saved has a different store_id provided if the install process is still running; so how do we install products during the data setup process
getDefaultStore does not set website_id when creating a default store (just sets the store id and code)

This issue does not occur when I keep the module disabled and then later on enable it after setup is complete.

I want to keep the extension enabled by default and have a clean install first time - is there a work around or is the approach flawed?


texts: Replace "Add to cart" with "Contact us" for some product (not all) - Magento CE 1.9.2.2

texts:
I'm new here and also I'm new in using Magento. :)
I found this question Replace "Add to Cart" button with an "Enquire" button linking to the "Contact Us" page is very similar to my problem - I need to replace "Add to cart", but only for some products (not all).
I think create a new Attribute is the right way, but I also need to edit the frontend side (I'm not so good with php).
Can someone help me?
Thanks!


texts:
In Magento 2, you can have some config files be scoped.
For example di.xml can be present in the etc folder of a module and/or etc/frontend and/or etc/adminhtml.
Same goes for events.xml and maybe others.
I know that the one from etc/frontend does not get loaded in the admin area and etc/adminhtml is not loaded in the frontend.
But what is the order of loading them in an area?

etc/di.xml
etc/frontend/di.xml

or

etc/frontend/di.xml
etc/di.xml

Please support your answer with some code or at least a link to the code.
Don't provide a simple "this way/that way" answer.


texts: Access $this from PHP outside of Magento

texts:
I am playing around with the Mini Cart content from outside of Magento.

This section of code uses $this:

<?php foreach($cartItems as $_item): ?>
    <?php echo $this->getItemHtml($_item) ?>
<?php endforeach; ?>

get_class($this) tells me that it is using Mage_Checkout_Block_Cart_Sidebar

How can I access this?

For example I know you can replace $this with Mage::helper('checkout/cart'), is there an equivalent for Mage_Checkout_Block_Cart_Sidebar?


texts: How do I stop further controller processing when using a controller before="OtherController"?

texts:
I have a controller which is configured to handle requests prior to the core controller using a config.xml similar to this;

<frontend>
  <routers>
    <catalogsearch>
      <args>
        <modules>
          <myextension before="Mage_CatalogSearch">My_Extension</myextension>
        </modules>
      </args>
    </catalogsearch>
  </routers>
</frontend>

The action it overrides should occasionally pass-through to the next (CatalogSearch) controller, and other times should execute it's own action and return--without running the CatalogSearch action.

class My_Controller extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        if ($this->shouldRun())
        {
            $this->loadLayout();
            $this->renderLayout();
            // Stop further processing
        }

        // Continue to next controller
    }
}

In my controller action how can I prevent the next controller from being called?


texts: How to modify the model data after it loaded?

texts:
I have the model that needed to modify serialized data to array after the form loaded. What is the best way I can use for it?
I tried to use _afterLoad() method, but it worked only for collections.


texts: When we are applying credit to an order and there is a zero balance there is not an invoice created

texts:
When we are applying STORE CREDIT to an order and there is a zero balance at the end of the order, magento does NOT create an invoice for some weird reason. We need to be able to print out an invoice to send to the customer even if they have not had to pay anything.

Basically MAGENTO isn't creating an invoice on an order which has a 0 balance. The reasons why some orders have a 0 balance is because the customer used store credit.

Is this related to our settings? Can someone help?


texts:
I want to override file from module.
vendor/mageworx/module-storelocator/view/frontend/web/js/locations-modal.js
I create file
app/design/frontend/Mgs/claue_child/MageWorx_StoreLocator/web/js/locations-modal.js
That wont work for me so i add file
app/design/frontend/Mgs/claue_child/MageWorx_StoreLocator/web/js/requirejs-config.js
    map: {
        '*': {
            'locations-modal': 'js/locations-modal.js',
        }
    }
};

I try move require-config.js in serveral locations still not working.
orginal requirejs config
vendor/mageworx/module-storelocator/view/frontend/requirejs-config.js
    map: {
        '*': {
            'locations-modal': 'MageWorx_StoreLocator/js/locations-modal',


texts: Is it possible to change product attribute type in magento 2?

texts:
I created one attribute programmatically and set input type of attribute Multi Select.

Now I want to change that attribute input type Multi Select to Dropdown.

Is it possible? If yes than how can I change that


texts: How to add Account-dashboard menu to newsletter/manage/ page

texts:
I tried to add the Account dashboard menu on the left side in newsletter/manage/ page.

The phtml for this menu is /template/customer/account/navigation.phtml

Account dashboard menu it's added like this:

 <reference name="left">
            <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml">
                <action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path>Account Dashboard</action>
                <action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path>Account Information</action>
                <action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path>Address Book</action>
            </block>
        </reference>

Does anyone know in which xml I need to add this block to appears on the newsletter/manage page?


texts: How to install another theme in magento 2.1.7?

texts:
I have just installed magento 2.1.7 in windows 7 , in xampp 127.0.0.1:8080 domain and by default it has a luma theme on it , i have downloaded a new theme called home interior .zip format and since i am new to magento i have no idea how to install this theme? anyone please help me,

Thank you.


texts:
Is there a way to set dynamic meta-descriptions by changing the Magento code.
For instance:

  "Buy PRODUCT_NAME online and save PERCENTANGE% today. Free shipping
  and secure payments"

In the above case PRODUCT_NAME would be the actual prodcut name. But PERCENTAGE would require some coding as its changed over time. (In my case it would be something like 1-(price/suggested_price). As you understand the percentage would not be the same for all products so it needs to be updated dynamically and this is just for the products.


texts:
How do I add the value of an order attribute to the New Order Email template. Specifically an attribute called delivery_date stored in sales_order_grid.

I tried to reverse engineer how {{var order.getShippingDescription()}} works but with no success.

EDIT: I should add that another method I tried was by editing the Email Templates...

vendor/magento/module-sales/view/frontend/templates/email/items/order/default.phtml

...and adding this line to it.

$deliverydate = $order->getDeliveryDate()

(Hoping that I could grab the data the same way that I'd grab a Product Attribute). But that method also returned no value.


texts: Magento 2: Implementing a template through JS

texts:
I'm trying to add a javascript file with a HTML template at the end of the checkout page but it doesn't seem to be working.

I tried to duplicate the way  "Magento/SalesRule/view/frontend/web/template/payment/discount.html" is implemented.

And the result in code is this:

[module-folder]/view/frontend/web/js/javascript.js

define(
    [
        'jquery',
        'ko',
        'Magento_SalesRule/js/view/payment/discount'
    ],
    function ($, ko, Component) {
        'use strict';
        return Component.extend({
            defaults: {
                template: '[vendor]_[mymodule]/template'
            }
        });
    }
);

[module-folder]/view/frontend/web/template/template.html

     content

[module-folder]/view/frontend/layout/checkout_index_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

        <referenceBlock name='checkout.root'>
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="steps" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="billing-step" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="payment" xsi:type="array">
                                                    <item name="children" xsi:type="array">
                                                        <item name="afterMethods" xsi:type="array">
                                                            <item name="children" xsi:type="array">
                                                                <item name="discount" xsi:type="array">
                                                                    <item name="children" xsi:type="array">
                                                                        <item name="templatetest" xsi:type="array">
                                                                            <item name="component" xsi:type="string">[vendor]_[mymodule]/js/javascript</item>
                                                                        </item>
                                                                    </item>
                                                                </item>
                                                            </item>
                                                        </item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>

</page>

The .js file is actually implemented (I tested this with an alert, and it's visible in the network tab of the element inspector) but the html template doesn't show up.

Also, I cleared my cache, generation folder, and the statics.


texts: Magento 2.3: How to solve the message “Unable to send email”?

texts:
I have a problem with Magento 2.3 on the contact page and also on admin with email not been send.

I'm getting this error on the contact page " “Unable to send email”.

I have flow up email extension that when i try to go into the email I get this errors:

  2 exception(s): Exception #0 (ReflectionException): Class
  Magento\Email\Model\Source\Variables does not exist Exception #1
  (ReflectionException): Class Magento\Email\Model\Source\Variables does
  not exist

Also on confirmation order that been send out it shows FROM: decornmo@ca-apro2.aspirationcloud.com and not FROM: sales@babybeddingdesign.com

Preconditions:
A Magento 2.3.x instance with at least one product. Reproduced on 2.3.x
Steps to reproduce:

I tried update Magento with recently get the recent update and ran
the commands to set up upgrade, di:compile, deploy static contents,
clear cache, etc to check the issue. It could not solve the error. I
checked and found that many of them reported the mail issue with
Magento 2.3.0. In there, I can see that some class removed from
latest Magento(2.3.0) which was included in the older version. Also,
it generate compatibility issue with SMTP module. Please see the URL
below for more details. Also, I noticed some compatibility issue
mentioned with Magento 2.3.0, Porto theme and MagePlaza extension. I
am sure about this and how to solve the error as well.
mageplaza/magento-2-smtp#127
after reading this:
https://stackoverflow.com/questions/52054370/magento-2-email-sender-incorrect
I've disabled Amazon plugin and deployed static file. This not
affect anything.
I've uploaded old jquery version to v3 from v1. Magento2.3.0 core
not using latest jquery version.


texts: Magento 2 - State/Province dropdown and Country Dropdown in Contact form

texts: I need to add these 2 dropdowns to the contact form.  How would I pull in those values for each dropdown?


texts: Magento2 | How to call Template from a Controller

texts:
I got this controller:

<?php
class MyClass extends \Magento\Sales\Controller\Adminhtml\Order
{
    public function execute()
    {
        echo "TEST";
    }
}
?>

I want it to call a template. How can I do that?


texts: Set new order paid via PayPal Express to 'Pending'

texts:
We dispatch our goods using a 3rd party fulfillment company and have a sales order export module which fires over all orders with the status of Processing.

We currently accept card payments with a card facilitator using their hosted form, and when payment has gone through successfully the order is given the status of Pending. We can then manually change this to Processing when we're confident the order is fully in stock and good to go.

When customers pay via PayPal Express, the order is automatically given the status of Processing.

How can I change this to Pending?


texts: Magento 2 : How do I hide a Customized Checkout Step

texts:
I have added a custom step in checkout. I would like to use some JS to hide or disable the step based on if the associated shipping option is selected or not.
I tried to wrap it in if statement but failed, so I might just be placing the if statement incorrectly.
The error returned in console was "document.getElementById(...) is null".

define(
[
    'ko',
    'uiComponent',
    'underscore',
    'Magento_Checkout/js/model/step-navigator'
],
function (
    ko,
    Component,
    _,
    stepNavigator
) {
    'use strict';
    /**
    *
    * mystep - is the name of the component's .html template,
    * <Vendor>_<Module>  - is the name of the your module directory.
    *
    */
    return Component.extend({
        defaults: {
            template: 'ICA_Customshipping/mystep'
        },

        //add here your logic to display step,
        isVisible: ko.observable(true),

        /**
        *
        * @returns {*}
        */
        initialize: function () {
    //My attempt to wrap it in an if statement has failed
    if(document.getElementById('s_method_icacustomshipping_icacustomshipping').checked) {
            this._super();
            // register your step
            stepNavigator.registerStep(
                //step code will be used as step content id in the component template
                'step_code',
                //step alias
                null,
                //step title value
                'Step Title',
                //observable property with logic when display step or hide step
                this.isVisible,

                _.bind(this.navigate, this),

                /**
                * sort order value
                * 'sort order value' < 10: step displays before shipping step;
                * 10 < 'sort order value' < 20 : step displays between shipping and payment step
                * 'sort order value' > 20 : step displays after payment step
                */
                15
            );

            return this;

            }
        },

        /**
        * The navigate() method is responsible for navigation between checkout step
        * during checkout. You can add custom logic, for example some conditions
        * for switching to your custom step
        */
        navigate: function () {

        },

        /**
        * @returns void
        */
        navigateToNextStep: function () {
            stepNavigator.next();
        }
    });
}
);


texts: Magento-1.9 mage.js file issue with Google Adwords

texts:
I am new to Magento and here I am facing issue with Google AdWords.
There is a script file which is causing the issue

  https://magentocore.net/mage/mage.js

when I am running in local this script file is not coming but in the server, this file is coming in all the pages.
I checked my project but didn't find the mage.js file and have no idea where it is coming from
Please guide me on this ...
any help would be appreciated, thanks in advance ...


texts:
I have created a Newsletter template and place that in newsletter queue. But not sending newsletter in sender gmail address.
How to solve ?


texts: Include Authorizenet library into Magento 2

texts:
I have been trying for a long time on how to include this library into my custom module. I have tried this answer but no use. May be I have put it wrong.

{
  "name": "Vendor/module-name",
  "description": "N/A",
  "require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
    "authorizenet/authorizenet": "1.8.9",
    "jms/serializer": "serializer-master-dev as 1.0"
  },
  "repositories": [{
    "type": "vcs",
    "url": "https://github.com/goetas/serializer.git"
  }],
  "type": "magento2-module",
  "version": "100.0.1",
  "license": [
    "OSL-3.0",
    "proprietary"
  ],
  "autoload": {
    "files": [
      "registration.php"
    ],
    "psr-4": {
      "Vendor\\Name\\": ""
    }
  }
}

in registration.php I added these code at the end of file

$vendorDir = require BP . '/app/etc/vendor_path.php';
$vendorAutoload = BP . "/{$vendorDir}/autoload.php";
/** @var \Composer\Autoload\ClassLoader $composerAutoloader */
$composerAutoloader = include $vendorAutoload;
$composerAutoloader->addPsr4('authorizenet\\', array(__DIR__ . '/authorizenet/authorizenet'));

Please help me fix this. Thank you.


texts: How to Create Custom Error Message in Magento 2 Cart

texts:
I am trying to create custom validation for products in the Magento 2 cart.

I have created a plugin:

<type name="Magento\Checkout\Controller\Index\Index">
    <plugin name="checkQuantityGroups"
            type="Wildcard\QuantityGroups\Plugin\CheckoutIndexPlugin"
            sortOrder="0"/>
</type>

With the following code:

public function beforeExecute()
{
    // Get quote from session

    /** @var Quote $quote */
    $quote = $this->checkoutSession->getQuote();

    // Get items in quote
    $cartItems = $quote->getAllItems();

    $quantityGroupsInCart = [];

    /** @var Quote\Item $item */
    foreach ($cartItems as $item) {
        $productId            = $item->getProductId();
        $product              = $this->productRepository->getById($productId);
        $productQuantityGroup = $product->getQuantityGroup();

        if ($product->getTypeId() == Configurable::TYPE_CODE) {
            continue;
        }

        $quantityGroupsInCart[$productQuantityGroup][] = $productId;
    }

    foreach ($quantityGroupsInCart as $quantityGroupId => $quantityGroupProducts) {
        // Get number allowed for QG
        $quantityGroup = $this->quantityGroup->load($quantityGroupId);

        $minAllowed = $quantityGroup->getNumberAllowed();

        if (count($quantityGroupProducts) < $minAllowed) {
            throw new LocalizedException(__("You need to add more {$quantityGroup->getTitle()}"));
        }
    }
}

I am using LocalizedException as I don't know what else to use. All this exception does is show the message and stack trace.

Can someone please let me know what I can use to show a styled error message in the cart instead?


texts: Cannot Log Back into Magento admin 1.9.x

texts:
Today I tried installing an extension called simitracking to track my store using my mobile phone. After I copied all the files included into my home/public_html/ as instructed, I tried logging back into magento admin and nothing happened. After inputting my user and password it just showed blank on the screen with this address:

"http://www.something.com/index.php/admin/dashboard/index/key/3a996847750ef2d43c9dbca5e1bb0a62/"

I heard this could be a cookie problem and I tried following instructions here but also to no avail:
"https://stackoverflow.com/questions/9075539/cant-login-to-magento-admin"

and here:

"http://www.magentocommerce.com/wiki/how_to_fix_login_for_admin_on_local_install"

I tried everything including clearing cookies and using different browsers and it still didn't work. I've also searched through the internet for at least 6 hours yet I'm still lost. There is no problem loading the front end but I cannot access the back end admin pages.

I look forward to anyone's help. Thank you.


texts: How to copy Magento 2 extensions to fresh installation

texts: Newbie here. Is there a way I can copy, transfer and redeploy Magento 2 extensions to a new Magento 2 setup? Kindly assist.


texts:
I found a handful of posts that talked about upgrading Magento 1.x from CE to EE, but nothing about Magento 2. Currently, we are on Magento 1.9 and ultimately will be on Magento 2 EE. While I wait for budget etc; I wanted to start at the very least creating themes and setting up the basic configuration.

Are Magento 2 CE themes compatible with EE?
Is there an upgrade path that keeps store settings?
Is it possible to upgrade from CE to EE after I migrate 1.9 data?

I will likely do all this upgrading without modules, since thats obviously going to be the major pain point. Is there anything else I should be aware of?


texts:
Can anybody provide a link for a guide on using selenium webDriver for magento , Like the one below, which is for using Selenium firefox IDE.

http://aionhill.com/setup-selenium-automatic-tests-for-magento

Or brief on the steps included for accomplishing.


texts: Magento 1.9 Recently viewed products not displaying

texts:
<?php echo $this->getLayout()->createBlock('reports/product_viewed')->setTemplate('reports/product_viewed.phtml')->toHtml(); ?>

This code suppose to output the recently viewed products on category page or product page (by inserting the code in .phtml files). and this has been always working for me on my Magento sites.

However I have experienced that for one site (Magento 1.9.3.3), this code isn't working at all. and for this site, the widget to show recently viewed product doesn't work either.

Any ideas what can cause the "recently viewed products" isn't working?


texts:
In my Magento Admin Panel

System > Permissions > Users > choose any Users > User Info

I want to add an attribute that's a number called Calc_Code.
That the admin user can change in the backend.

Is it possible to add a custom attribute to an Admin user that they can change in the backend?


texts: Uncaught TypeError: Unable to process binding "html: function(){return getInstructions() }" ( Magento 2 )

texts:
I'm using a third party one page checkout module on this system. And added an observer "payment_method_is_active" event for the cash on delivery and bank transfer methods to enable them only for local orders.
This is how payment method hiding works at the observer.
if($observer->getEvent()->getMethodInstance()->getCode()=="cashondelivery"){
        $checkResult = $observer->getEvent()->getResult();
        $checkResult->setData('is_available', true);
        if($getCountry == 'LK'){
            $checkResult = $observer->getEvent()->getResult();
            return $checkResult->setData('is_available', true); //this is enabling the payment method at checkout page
        }
        else {
            $checkResult = $observer->getEvent()->getResult();
            return $checkResult->setData('is_available', false); //this is disabling the payment method at checkout page
        }
    }

When the cart page loads: If the country is selected to a foreign country, cart page loads hiding both payment methods without any errors, then if I change it to the default country, it loads the two methods with this error.

The same error appears for the bank transfer method also.
When the cart page loads: But, If the country is selected to the default at page reload, both payment methods shows on the page without any errors. And the hiding / showing methods working nicely according to the country selection without any error.
Please help to fix this error. Any help would be appreciated.


texts: Hi is there any way to import and export orders? By default  can import and export the products and customers data but not he orders.


texts: Mangeto 2.1.5 app/locale folder missing for language Files

texts:
I am trying to create a custom translation of my Magento Store.

I have created two separate store views - Deutsch and English. Both reference to a separate store language in the backend.

I was able to translate the Deutsch Store with frontend-inline translation, but It doesn't allow me to change everything I need.
I have read in other posts, that one way is to directly write into the language files itself - they are located in app/locale, which sadly doesnt exist on my server.

Is there a way to implement it or create translations differently?

I am new to Magento - so I'd appreciate detailed answers if possible :)


texts: Pass order directly and skip checkout and payment method

texts: I have two groups of customer so according to customer group:if customer from group 1 so skip payment and checkout step so when he click go on checkout he directly place order and it's saved else if customer from group 2 then he should have the checkout and payment method step so how to proceed step by step thanks in advance


texts:
I have my Magento's file and folder structure inside a folder. I uploaded that folder to the www directory of my server. Now I am able to access my store with the URL myUrl.com/myMagentoFolder, where myUrl.comis the URL of my domain, and myMagentoFolderis the folder that I uploaded to wwww.

I need to be able to access my store with the URL myUrl.com, without /myMagentoFolder. I already created an .htaccess file and tried writing different directives but none of them works.

Any ideas on how to solve that? Any help is much appreciated.


texts: Magento 2 product image is not displaying after unselecting swatch

texts: When I unselect the swatch once after selected the product image went blank. when I inspected and the image src went undefined in Magento 2.2?? and the console show no error


texts: Magento new product widget overlap image and title

texts:
I use the new product widget in mangento 1.9.
but the title is overlap on image.
I don't know why.


texts: How to get current product attributes on product view page using widget

texts:
I have bought a theme that allows a custom tab in product view. It uses a static block for this. Now I have some products that come with documentation in pdf format. I was thinking I want to add links to the documentation in that custom tab. So I've created widgets before and I thought the easiest way was to create a widget that puts out the links, and place it in the static block used for the custom tab. That way I don't have alter theme files.

Now I managed to create the widget and have it render in the custom tab. So far so good. Now I want to display the links to the pdf's (which I have as a product attribute), but I can't find a way to get the current product's attributes (that is the product viewed on the frontend) within the widget (class).

I would like to know a way to get the id or model of the product being viewed, or something alike, so I can get the product attributes. This, of course, within the widget class.

I am currently using Magento CE 1.9.1.1

Some thoughts on this? I have searched the deepest of the interwebs but wasn't able to find anything. Hope someone can get me on the right track.
Thanks in advance.


texts:
I just started at developing extensions for Magento and trying to create a simple module that alert when the main page load.

So I created an extension in app/code/local/namespace/mymodule and  PopupBlock.php file in block folder:

<?php die("1");
    class Michael_Popup_Block extends Mage_Core_Block_Template{
        die("1");
        protected function _construct()
        {
            die("1");
            parent::_construct();
        }
    }
?>

Also, in my etc/config.xml:

<?xml version="1.0" encoding="utf-8" ?>
<config>
    <modules>
        <Michael_Popup>
            <version>0.0.1</version>
        </Michael_Popup>
    </modules>
    <global>
        <blocks>
            <popup>
                <class>Michael_Popup_Block</class>
            </popup>
        </blocks>
    </global>
    <frontend>
        <routers>
            <popup>
                <use>standard</use>
                <args>
                    <module>Michael_Popup</module>
                    <frontName>popup</frontName>
                </args>
            </popup>
        </routers>
    </frontend>
</config>

Why my block didn't load? how tell magento to load my block?
Thanks a lot!


texts: What function is the equal of the php’s unset to a Varien_Object?

texts:
a.  Unset($param)
b.  uns{$param}()
c.  remove($param)
d.  unregister($param)


texts: how to add custom js to end of footer on every page

texts:
I want to add a custom js file to all pages before the footer
i want to pass script through phtml
Is it possible to do this?


texts: How to create a CMS page that is a sumbission form that when filled out generates an email?

texts:
I am looking to create a CMS page and translate an application so that each field can be filled with a submit button that when hit, generates an email with the content of the application that was just submitted.

Is this possible within a standard CMS page or would there be outside development work involved on such a page.

Thanks in advance.


texts: How to change Product Website programmatically?

texts:
My code can add new product to website, but I can't seem to find way to define product website value, e.g default to 'base'.

$product = $this->_productFactory->create();
$product->setSku($column['requestcode']);
$product->setAttributeSetId(10)
->setWebsiteIds(array(0))
->setStoreId(0);
$product->setPrice($column['price'])
->setDescription($column['description'])
->setName($column['name'])
->setTypeId('virtual')
->setStatus(1);


texts: Product Images are all different sizes? How to fix

texts: My product images or certain pages are all different sizes. Anyone know why? Image below.


texts: Magento 2: How to display brand name above product name

texts:
I want display brand name above product name on product list something like that:

Additionally, it needs an additional inscription before the sale price text: "Retail price":

can anyone help me which files should I edit?

I have found in
app/design/frontend/{yourpackage}/{yourtheme}/template/catalog/product/list.phtml

                        <a class="product-item-link" href="<?php echo $_product->getProductUrl() ?>">
                            <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>
                            <?= /* @escapeNotVerified */ $_helper->productAttribute($_product, $_product->getBrand(), 'brand') ?>

                    <?php if(!$themeHelper->getStoreConfig('mpanel/catalog/review')): ?>
                        <?php echo $block->getReviewsSummaryHtml($_product, $templateType,true); ?>
                    <?php endif ?>

                    <?php echo $block->getProductPrice($_product) ?>

                    <?php echo $block->getProductDetailsHtml($_product); ?>
                    <?php if ($themeHelper->getStoreConfig('mpanel/catalog/disable_add_to_cart') == 0 && $themeHelper->getStoreConfig('mpanel/catalog/disable_hover_effect') == 1): ?>
                        <?php if ($_product->isSaleable()): ?>

                                <?php $postParams = $block->getAddToCartPostParams($_product); ?>
                                <form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $this->getUrl('checkout/cart/add', ['uenc'=>$postParams['data']['uenc'], 'product'=>$postParams['data']['product']]); ?>" method="post">
                                    <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
                                    <input type="hidden" name="uenc" value="<?php /* @escapeNotVerified */ echo $postParams['data']['uenc']; ?>">
                                    <input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
                                    <button class="action tocart btn-cart hover_effect" type="submit" title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>">

                                        <?php /* @escapeNotVerified */ echo __('Add to Cart') ?>
                                    </button>
                                </form>

                        <?php endif ?>
                    <?php endif ?>

and add this line but after replace file still no work. Can you confirm  that I put it in the right place?


texts: Magento 2.3.1 : Checkout success page - Create an account button is not displaying

texts:
I am working on a Magento 2.3.1. In checkout success page, the Create an Account button is not displaying.

I have checked all the files but it's not disabled from code.

How to solve this one. Please tell me.

I have also checked into the whole project but no any checkout.registration field is removed into the file.


texts: Does Magento 2 have an app/etc/applied.patches.list file like Magento 1

texts:
Apologies if this is a duplicate.  Searched SO and couldn't see that this has been asked before.

In Magento 1 you have a app/etc/applied.patches.list file which is updated when applying security patches.

Does Magento 2 have something similar?


texts: How can I update the selected Item price in manage categories?

texts:
I am new to magento, In magento admin panel -> manage categories-> I have added the new action as Update Price. when I given a amount and submit the button the selected item price will be update/decrease?

but it's not working for me can any one tell me how can I do this?

this is my code

  array_unshift($statuses, array('label'=>'', 'value'=>''));
    $this->getMassactionBlock()->addItem('price', array(
        'label'=> Mage::helper('catalog')->__('Update Price'),
        'url'  => $this->getUrl('*/*/massPrice', array('_current'=>true)),
        'additional' => array(
            'visibility' => array(
                'name' => 'price',
                'type' => 'text',
                'class' => 'required-entry',
                'label' => Mage::helper('catalog')->__('Price'),
                'values' => $statuses
            )
        )
    ));

see image

thanks in advance.


texts: Magento 2.2.2 : Redirect not working from plugin

texts:
di.xml

<type name="Magento\Framework\AppInterface">
  <plugin sortOrder="1" name="noroute_redirect" type="Namespace\ModuleName\Plugin\AppInterfacePlugin"/>
</type>

AppInterfacePlugin.php

<?php

namespace Namespace\ModuleName\Plugin;

use Magento\Framework\App\State;
use Magento\Framework\AppInterface;
use Magento\Framework\Controller\Result\RedirectFactory;

class AppInterfacePlugin
{

    private $state;
    private $redirectFactory;

    public function __construct(
        State $state,
        RedirectFactory $redirectFactory
    ) {
        $this->state = $state;
        $this->redirectFactory = $redirectFactory;
    }

    public function aroundLaunch(AppInterface $subject, \Closure $proceed)
    {
        if (condition == true) {
            $this->state->setAreaCode('frontend');
            return $this->redirectFactory->create()->setPath('no-route');
            //exit(0);
        }

        return $proceed();
    }
}

How do I redirect user to 404 page not found page?


texts:
we have an automatic file-based backup script (from provider), we need to restore a backup done last night. Is it safe to stop mysql service, restore just the /var/lib/mysql folder and overwrite the current one, and then restart the mysql service again?

Thanks you!


texts:
When I launch data migration tool, I encounter the following error :
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'm1.prefix_core_directory_storage' doesn't exist ...

My old magento don't use any prefix and y configure my config.xml like this :

what can I do for DMT stop adding prefix and find my table ?

Thanks


texts: Magento Cache in two places, tmp and var/cache

texts:
I was changing my secure Base Skin URL, Base Media URL,Base JavaScript URL to a cdn url yesterday and had a typo, which messed everything up on Secure pages, including the Admin.

So I went in to DB and changed the core_config_data entries to correct it. Cleared my var/cache in my magento directory. And it kept showing the incorrect url for css,js and images.

When I looked in Admin -> Configuration -> Web the entries were all changed, so it was a caching issue.

I couldn't figure out where it was caching, because I would clear var/cache and then Magento would recreate the cache files in var/cache.

So eventually, I figured out that it was caching on the server at /tmp/magento/var/cache
But the weird thing is, that it seems to cache in var/cache and /tmp/magento/var/cache
It also seems to be doing this for sessions!
And some logs go to /tmp/magento and some to var/log

I have var/cache in my magento directory set to 777

Any ideas why it is splitting the cache? why is going to tmp if I have var/cache set to 777?


texts: Magento 2 upgrade from 2.0.10 to 2.1.2 - broken pages style on User Account Information/Dashboard

texts:
did anyone experience this issue after upgrading from magento 2 2.0.10 to 2.1.2?

after the upgrade, it breaks the display of the page. It sends the page top heading to the very bottom of the page. In this case, the heading "My Orders" ends up at the bottom of the page.

Is there anyway to fix this?

Thanks.


texts: Get Image URLs (and prices) of product attributes (color)

texts:
I need the images for all color options of a product (and also prices in case they are different in different color options). I figured out how to get the color options of a product:
$colorAttribute = $product->getResource()->getAttribute('color');
$colorAttributeId = $colorAttribute->getId();
$configurableAttrs = $product->getTypeInstance()->getConfigurableAttributesAsArray($product);

$values = $configurableAttrs[$colorAttributeId]['values'] ?? [];

But how do I now get the product image URL (and price) in all color options?


texts: How to proper extend variables and override module style?

texts:
I am new to Magento and currently developing a child theme inherited from the Magento blank theme. I read the developer documentation and doing okay.

I created my own style.less in my web directory and load it besides the style-l.less and style-m.less from the parent theme. I also created a variables.less where I put my own variables.

In the theme.less I just override existing variables from the child-theme. Right now I am thinking it might be better, if there would be a way extending the variables instead of creating my own file. Also if I want to overwrite the styles of a module, I just define the style in my own style.less instead of overwriting the less file from the module itself, because I found no way doing that, only for the .phtml files.

How can I achieve above without loosing best code practices ?


texts:
after entering the command

php -dmemory_limit = 5G bin / magento setup: di: compile

php -dmemory_limit = 5G bin / magento setup: static-content: deploy -f

This error appeared :-

  There has been an error processing your request
  Exception printing is disabled by default for security reasons.

Error log record number: 1129520105273


texts:
I have products in three subcategories

parent category: my-products:

subcategory-1
subcategory-2
subcategory-3

Now the URLs are like:

http://hostname/my-products/subcategory-1/product-name

How can I get rid of the subcategory name in the URLs so the are like:

http://hostname/my-products/product-name


texts: Different Payment Information for Specific Products - Magento MultiStore

texts:
I want that a product have a different payment method  information on checkout.

When the customer choose that product, when he goes to checkout, the payment method will appear, but in the backend, it will go to another paypal account.

I thought about making a new store view, then I can change the informations on the payment method. I think I could disable the product for one view and enable to another.

But how would it change the store view automatically?


texts: I'm new to Magento I'm using owl carousel in home page for new products but it does not work?

texts:
<script>
         var $fz = jQuery.noConflict();
          $fz(document).ready(function() {
           var owl = $fz('.owl-carousel');
           owl.owlCarousel({
            loop: true,
             nav: true,
            margin: 10,
            responsive: {
               0: {
                items: 1
               },
               600: {
                 items: 3
               },
               960: {
                 items: 5
               },
               1200: {
                 items: 6
               }
             }
           });
           owl.on('mousewheel', '.owl-stage', function(e) {
             if (e.deltaY > 0) {
               owl.trigger('next.owl');
             } else {
              owl.trigger('prev.owl');
            }
             e.preventDefault();
           });
         })
   </script>

the error shown when running

  (index):632 Uncaught TypeError: jQuery(...).owlCarousel is not a function
      at HTMLDocument. ((index):632)
      at n (jquery.min.js:2)
      at Object.fireWith (jquery.min.js:2)
      at Function.ready (jquery.min.js:2)
      at HTMLDocument.B (jquery.min.js:2)
  (anonymous) @ (index):632
  n @ jquery.min.js:2
  fireWith @ jquery.min.js:2
  ready @ jquery.min.js:2
  B @ jquery.min.js:2


texts:
I have a magento site on a VPS. This VPS runs plesk and backs up to an external FTP server.

I have an intermittent problem in that if the FTP server is unavailable, the backup is stored instead on the VPS itself. This is fine if there is sufficient storage available. If not, the backup simply consumes all the available space, and any visitors to my Magento site get the default magento maintenance / error page('There has been an error processing your request').

I like the idea of using phpQuery on a remote server to monitor and alert me (via email probably the best way) if the site slips into unavailability, but wondered if anyone has some predefined scripts I can plagiarise.?


texts: Magento 1.9.x - Compiler Error after install Extension

texts:
I tried a new extension for Magento Community (https://github.com/integer-net/solr-magento1) , after is produce many errors I deleted all the files.

Now, its cause error when Magento-Compiler is turned on, with an other extension and just on admin/categories page.

Following ERROR :

Fatal error: require_once(): Failed opening required 'Mage/Adminhtml/Block/Catalog/Category/Tabs.php' (include_path='/var/www/vhosts/domain.tld/httpdocs/includes/src:.:/opt/plesk/php/5.5/share/pear') in /var/www/vhosts/domain.tld/httpdocs/includes/src/Vishwasnature_Editableproduct_Block_Adminhtml_Catalog_Category_Tabs.php on line 34

I tried already to clear and re-compile, but is doesnt help. Before I tried the solr extension, everything was normal.

Update: Tried also delete all database entries

How can I fix this? I tried several solutions from the deep internet.


texts: I would like to find any extensions for Product lables for Magento2?


texts: Magento2.3.2: Cache is not writable error

texts:
Suddenly I am getting the following error on my website : Depoto.

  Fatal error: Uncaught Zend_Cache_Exception: cache_dir
  "/opt/bitnami/apps/magento/htdocs/var/cache/" is not writable in
  /opt/bitnami/apps/magento/htdocs/vendor/magento/zendframework1/library/Zend/Cache.php:209
  Stack trace: #0
  /opt/bitnami/apps/magento/htdocs/vendor/magento/zendframework1/library/Zend/Cache/Backend/File.php(180):
  Zend_Cache::throwException('cache_dir "/opt...') #1
  /opt/bitnami/apps/magento/htdocs/vendor/colinmollenhour/cache-backend-file/File.php(87):
  Zend_Cache_Backend_File->setCacheDir('/opt/bitnami/ap...') #2
  /opt/bitnami/apps/magento/htdocs/vendor/magento/zendframework1/library/Zend/Cache.php(153):
  Cm_Cache_Backend_File->__construct(Array) #3
  /opt/bitnami/apps/magento/htdocs/vendor/magento/zendframework1/library/Zend/Cache.php(94):
  Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true) #4
  /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/Cache/Frontend/Factory.php(156):
  Zend_Cache::factory('Magento\Framewo...', 'Cm_Cache_Backen...',
  Array, Array, true, true, true) #5 /opt/bitnami in
  /opt/bitnami/apps/magento/htdocs/vendor/magento/zendframework1/library/Zend/Cache.php
  on line 209