texts: We can't add this item to your shopping cart right now error on Add to cart in magento 2.3.3

texts:
I am getting an error "We can't add this item to your shopping cart right now" when I try adding products to cart.
In exception log I am getting this error

main.CRITICAL: Validate class not found from basename 'Magento\Framework\Validator\EmailAddress' {"exception":"[object] (Zend_Validate_Exception(code: 0): Validate class not found from basename 'Magento\\Framework\\Validator\\EmailAddress' at /vendor/magento/zendframework1/library/Zend/Validate.php:244)"} []
[2020-04-27 06:50:07] main.CRITICAL: No such entity with customerId = 541 {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with customerId = 541 at /vendor/magento/framework/Exception/NoSuchEntityException.php:52)"}


texts:
Have used the following code to display the saleable quantity on my product page:
How do I add the following?
The $qty must be in bold?
Quantity below 0 like -5 must be displayed as 0 because of backorder?
Quantity over 25 must be displayed as 10+
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
?>
<?php /* @var $block \Magento\Catalog\Block\Product\View\AbstractView */?>
<?php $_product = $block->getProduct() ?>

<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$StockState = $objectManager->get('\Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku');
$qty = $StockState->execute($_product->getSku());
echo "In stock&nbsp"; echo ($qty[0]['qty']);echo "&nbsppcs.";
?>


texts:
I re-enabled the frontend global search and while the autocomplete suggestion work, any query returns the following error.

I do notice the URL search does look like this when clicking any suggestion

domain.com/catalogsearch/result/?q=+truffle

1 exception(s):
Exception #0 (InvalidArgumentException): Invalid filter type
Exception #0 (InvalidArgumentException): Invalid filter type
/www/vendor/magento/framework/Search/Request/Cleaner.php(113): Magento\Framework\Search\Request\Cleaner->cleanFilter('visibility_filt...')
/www/vendor/magento/framework/Search/Request/Cleaner.php(212): Magento\Framework\Search\Request\Cleaner->cleanQuery('visibility')

When I dug deep, and check that class the visibility_filter did exist.  Is there some additional catalog search setting that needs to be changed?

I have been stump for a couple days now.

Similar to Unanswered overflow question (link below).

Search in Magento products error: Invalid filter type


texts:
When trying to install new extensions through Magento Connect Manager, the page shows a login prompt. Upon logging in the page will just reload without installing or doing anything. The same behavior happens when trying to update existing extensions.

I have tried various solutions and nothing seems to work. Please help.

I should also mention that this site was moved to a different IP and domain name than that of the original.


texts: magento website color changed to original theme color after applying Content delivery network

texts:
we bought a new magento theme and we customized as per our needs.

we changed color of lot of menus, texts...etc.

we want to speed up the site.

so we did CDN[content delivery network] for our site.

after we did CDN, color of our site changed to original theme color.

what is the problem.

please help me to find solution.

thanks in advance.


texts: Magento 2: Create Custom Tab in admin panel in magento 2

texts:
Can anybody help me to build this tab in admin panel by custom module.

i want to achieve something like above picture.


texts: How to Force user to login to view catalog

texts: I am beginner in Magneto and  I have install magneto 2.1.15 using WAMP server.  I want to force user to login first then redirect to home page to view catalog and other menu. Please suggest where exactly I need to change.


texts: Magento 2 Create an order using Integration token in REST API

texts:
I want to place orders on behalf of a customer. I have an integration token for this. I have followed the below steps.

Create Empty Cart = POST /V1/carts (Passing customer Id as param)
Add product to cart = POST "/V1/carts/".$quote_id."/items" (Passing product data)
Get Shipping methods = POST "/V1/carts/".$quote_id."/estimate-shipping-methods"
Set shipping and billing = POST "V1/carts/".$quote_id."/shipping-information"

The above steps are working fine. Now I need to set the payment method and place the order. How can I do it?


texts: How can I change Flat rate Shipping Method 'Method Name' for emails only

texts:
How can I change the Flat rate Shipping Method 'Method Name' for emails & also hide 'Title' for emails only?

For e.g. Currenlty,

Title - Fixed

Method Name - Flat rate shipping

In emails it is displaying Fixed - Flat rate shipping

I need to display in emails only Flatrate


texts:
Here We've used LESS and problem is when page load it's shows like above screenshot and CSS applied but after 10-15 Sec.

Currently site is in Production Mode and cache enabled. No any other caching mechanism used.

CSS are loaded in <head> tag.

So what should I do to load page properly with design?


texts: How can I unchecked default Save in address book checkbox checkout shipping address popup?

texts:
How can I show unchecked Save in address book at checkout when adding new shipping address?

Please suggest me.


texts: Downloading SUPEE 8788 V1 after v2 was released

texts:
I have installed the SUPEE 8788 V1 and now I need to revert the patch to install V2. I don't have the v1 sh file and the Magento download page only lets you download V2 now?

Where can I download the v1 version?


texts: Magento 2 - How to create double configuration of a product?

texts:
I'm searching for a solution that would allow user to add 2 separately configurable items at once to cart from product page (separate prescription for each eye), and admin to set for each configuration a separate SKU and stock.
Here's an example from VisionDirect

It's quite narrow niche to find plugin with that exact functionality.
I've found THIS extension but it doesn't allow to set stock for each configuration and customers could buy lenses that are not in stock.

Do you have any idea of using other plugin and remaking it slightly or some general step-by-step for developing an extension that would allow me to add that functionality? And if that second - which existing Magento functionalities would be useful for completing such a task?

I just have basic knowledge of extending Magento therefore no idea what solution would be best and where to start if I'd decide to build the plugin on my own.

Any help would be really appreciated.


texts: Custom Checkout Validation - Two fields must have the same value

texts:
I've created a module which adds an additional field to the checkout, called 'email-confirm'.
I want to check that the value in this field is equal to the first email entry, but I'm unsure how to do this.


texts: Magento 1.9.1 rwd : Custom Attribute Filter in Layered navigation

texts:
I am trying to add Filter attribute called building type for my book store.

Below is Category Structure with product.

    + Regional Books(4)
       - English (2)
            -- book-1
            -- book-2
       - German (3)
            -- book-3
            -- book-4

I have created a custom attribute of type dropdown and have set Filterable with result for Use In Layered Navigation.

Then configured the custom attribute value in product creation page.

Book-1

Book-2

But Still custom attribute is not appearing in layered navigation.
Parent page only show sub category and tags and products and not my custom filter. Sub category page shows only tags and products list.

Parent Category - Display setting

Any idea why Filter attribute is not appearing in the layered navigation.
Please advice I am using Magento 1.9.1 CE with default rwd theme.


texts: What is the proper way to override a core file(vendor/magento/framework/Filesystem/Io/Sftp.php) in Magento 2?

texts:
I ran into the bug seen here: https://github.com/magento/magento2/issues/9016.  Basically, the library was updated but the Sftp.php file was not. I don't think I'm in a position or ready to run a major update at the moment so I need to patch this file or override it. I didn't see anything in the documentation as to what the preferred method is.

Can I simply copy the vendor/magento/framework/Filesystem/Io/Sftp.php file to app/code/magento/framework/Filesystem/Io/Sftp.php and make the change there as I would have in Magento 1 to override the file? What is considered best practice?

Edit- per Asrar's answer I've added:

Vendor/Namespace/etc/di.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Framework\Filesystem\Io\Sftp" type="Vendor\Namespace\Model\Filesystem\Io\Sftp" />
</config>

Vendor/Namespace/Model/Filesystem/Io/Sftp.php:

...

/**
 * @var \phpseclib\Net\SFTP $_connection
 */
protected $_connection = null;

...

...

/**
 * Write a file
 *
 * @param string $filename
 * @param string $source string data or local file name
 * @param int $mode ignored parameter
 * @return bool
 */
public function write($filename, $source, $mode = null)
{
    $mode = is_readable($source) ? \phpseclib\Net\SFTP::SOURCE_LOCAL_FILE : \phpseclib\Net\SFTP::SOURCE_STRING;
    return $this->_connection->put($filename, $source, $mode);
}

...

But I'm still throwing the same error.

Notice: Use of undefined constant NET_SFTP_LOCAL_FILE - assumed 'NET_SFTP_LOCAL_FILE' in .../magento/vendor/magento/framework/Filesystem/Io/Sftp.php on line 187

This must mean it's not reading my overrides. Can you see what I'm doing wrong?


texts: Solution for collecting sales tax in California

texts: Has anyone found a good extension or solution for collecting sales tax in California? Our company has nexus in California. Taxjar keeps popping up but i am confused as to whether this is a free extension or signing up for a service. Thanks for any help!


texts: Find and clean-up unconfirmed customer accounts?

texts:
Is there a way to find and list the customer accounts in Magento's backend (or programatically) which have not been confirmed?

I would like to run this check and cleanup periodically as it often happens people make typos in their email address and register twice and one of the accounts is never used.


texts: Mage::getUrl returns admin url instead of frontend url

texts:
I have create an extension which used frontend as well as admin end.
My config code is below.

<frontend>
    <routers>
        <testimonial>
            <use>standard</use>
            <args>
                <module>Magentohelper_Testimonial</module>
                <frontName>testimonial</frontName>
            </args>
        </testimonial>
    </routers>
    <layout>
        <updates>
            <testimonial>
                <file>testimonial.xml</file>
            </testimonial>
        </updates>
    </layout>
</frontend>
<admin>
    <routers>
        <testimonial>
            <use>admin</use>
            <args>
                <module>Magentohelper_Testimonial</module>
                <frontName>testimonial_admin</frontName>
            </args>
        </testimonial>
    </routers>
</admin>

When i Call Mage::getUrl('testimonial/index/check/'); from my phtml file, It Returns the admin url which is testimonial_admin/index/check/
From the magento wiki i got the instruction to create extension, which says this

I guess the router is matching the admin Url first.How can i get the url of my frontend using Mage::getUrl function.?


texts:
I am trying to figure out what the equivalent of the following piece of Magento 1 code would be in Magento 2.

I am trying to include magento 2 into a external file as follows:

Magento 1 Code:

$MAGENTO_BASE_DIR = '/mySite.com/'
require($MAGENTO_BASE_DIR.'app/Mage.php');

Would the following Magento 2 Code suffice:

$MAGENTO_BASE_DIR = '/mySite.com/';
require($MAGENTO_BASE_DIR . 'app/bootstrap.php');

Not sure if the above magento 2 code is entirely correct?

Thanks in advance


texts:
I can't get an observer working, I'm using a fresh Magento install of 1.9.10.

My namespace: TM

My module: ProductConditions

app/etc/modules/TM_ProductConditions.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <TM_ProductConditions>

            <!-- Whether our module is active: true or false -->
            <active>true</active>

            <!-- Which code pool to use: core, community or local -->
            <codePool>local</codePool>

        </TM_ProductConditions>
    </modules>
</config>

app/code/local/TM/ProductConditions/etc/config.xml:

<global>
    <events>
        <catalog_product_save_before>
            <observers>
                <ProductConditions>
                    <type>singleton</type>
                    <class>TM_ProductConditions_Model</class>
                    <method>catalog_product_save_before</method>
                </ProductConditions>
            </observers>
        </catalog_product_save_before>
    </events>
</global>

app/code/local/TM/ProductConditions/Model/Observer.php:

<?php
class TM_ProductConditions_Model_Observer
{
    public function catalog_product_save_before($observer)
    {
        file_put_contents("C:\\mage test.txt", "test");
        //$product = $observer->getProduct();
    }
}


texts: Magento 2 send email programatically not working(error-Template file 'name_of_file.html' is not found.)

texts:
Magento 2 send email(adminhtml) programatically not working.
i am using this code -

$report = [
                'report_date' => date("j F Y", strtotime('-1 day')),
                'orders_count' => rand(1, 10),
                'order_items_count' => rand(1, 10),
                'avg_items' => rand(1, 10)
            ];

            $postObject = new \Magento\Framework\DataObject();
            $postObject->setData($report);

            $transport = $this->_transportBuilder
                ->setTemplateIdentifier('sendcredentials')
                ->setTemplateOptions(['area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID])
                ->setTemplateVars(['data' => $postObject])
                ->setFrom(['name' => 'Robot','email' => 'robot@server.com'])
                ->addTo(['test@gmail.com', 'test@test.in'])
                ->getTransport();
            $transport->sendMessage();

and email_templates.xml(location-etc)

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:Magento:module:Magento_Email:etc/email_templates.xsd">
    <template id="sendcredentials" label="Test email" file="sendcredentials.html" type="html" module="Vendor_Sendcredentials" area="adminhtml"/>
</config>

and HTML file sendcredentials.html(location-view/adminhtml/email) -

Report from {{var data.report_date|raw}}

Number of orders: {{var data.orders_count|raw}}

Items count: {{var data.order_items_count|raw}}

Average items per order: {{var data.avg_items|raw}}

I am getting this error -

Template file 'sendcredentials.html' is not found.


texts: List view option in catalog search page is not working in magento 2

texts:
By default, My catalog page load on grid view.

I can't switch to list view and Sort by from there. I didn't change any core files, some of the time the layered navigation to doesn't work.

Is there any solution to fix this type of issues in magento 2?


texts: Magento Admin Order Grid Filter by "Status" giving error while joined with "sales_flat_order" table

texts:
I am working on a project where there is custom column already installed on sales_flat_order table.

I know, in order grid magento uses sales_flat_order_grid table to fetch data.

I have used join technique and works fine, all filters are also working except filter by status.

My code on my Grid.php

   /**
    * @brief add custom_column
    * @param Mage_Sales_Model_Resource_order_grid_collection $collection
    */
    public function setCollection($collection)
    {
        $collection->getSelect()->join(array('s' => 'sales_flat_order'), 'main_table.entity_id=s.entity_id', 'custom_column');

         //Mage::log((string) $collection->getSelect(), null, 'order-grid.log');

        parent::setCollection($collection);
    }

    protected function _prepareColumns()
    {
        $this->addColumn('custom_column', array(
            'header'        => Mage::helper('sales')->__('custom column'),
            'index'         => 'custom_column',
            //'filter'        => 's.custom_column',
            'type'          => 'currency',
            'renderer'      => 'DigitalCinema_Pos_Block_Adminhtml_Sales_Order_Renderer_Grid',
        ));
        return parent::_prepareColumns();
    }

With this all filters work (not sure why it works even without filter tag in my custom column),
and when I do filter by status then it tells me

  Integrity constraint violation: 1052 Column 'status' in where clause
  is ambiguous

Now

When I put 'filter' => 's.custom_column', back, I get following error:

  Fatal error: Call to a member function setColumn() on boolean in
  \app\code\core\Mage\Adminhtml\Block\Widget\Grid\Column.php
  on line 370

I even tried putting 'filter_index' => 's.custom_column' too, but same result.

It's driving me insane.


texts: Magento 2 : Add wysiwyg editor in store configuration

texts:
I want to add wysiwyg editor in store configuration. I added also. But, when I click on "Insert Variable" it's return error :

  Uncaught ReferenceError: MagentovariablePlugin is not defined

How to solve this error?

Any help would be appreciated !!

Thanks!!


texts: How to show all coupon codes in cms page

texts:
I need to show all coupons codes in cms page. For this i have created a custom phtml in templete and in this template i have wrote the following code :

<?php
$rulesCollection = Mage::getModel('salesrule/rule')->getCollection();
foreach ($rulesCollection as $rule) {
    $coupon = $rule->getCoupons();
}

$rules = Mage::getResourceModel('salesrule/rule_collection')->load();
foreach ($rules as $rule) {
    $conditions = $rule->getConditionsSerialized();
    var_dump($conditions);
}
?>

and add a block in cms page :

{{block type="core/template" name="email_coupon" template="email/coupon.phtml"}}

But nothing is showing please help me .


texts: Admin side when Create Credit memo give error like No such entity with cartId = xxx in magento 2

texts:
when I am creating a new credit memo error generate like No such entity with cartId = xxx .so why this error generate anyone has a solution then give me. also, remove generated and var/*.
Thank You


texts:
I am trying call to web service, but when I load the code Magento return an Internal Error.

I only add this code:

$soapClient = new \Zend\Soap\Client('http://www.transzuri.com/ws/combx/st/?wsdl');

// $soapResponse = $soapClient->PresupuestosDisponibles( array('GUID' => '6BB98E9E-6131-4CB3-9C38-C93458B691F4', 'CodigoPostal' => '03440', 'PaisISO' => 'ES') );
$soapResponse = $soapClient->getTest(array('GUID' => '6BB98E9E-6131-4CB3-9C38-C93458B691F4'));

But the page load this:

The error is in exception.log:

Next Exception: Report ID: webapi-588b1719eb933; Message: Unknown Reason in /var/www/transzuri/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php:195
Stack trace:
#0 /var/www/transzuri/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(SoapFault))
#1 /var/www/transzuri/app/code/Magento/Webapi/Controller/Rest.php(219): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(SoapFault))
#2 /var/www/transzuri/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(37): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /var/www/transzuri/lib/internal/Magento/Framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /var/www/transzuri/lib/internal/Magento/Framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#5 /var/www/transzuri/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#6 {main} [] []

Where is the problem and Why?


texts: What does "Customer Notification Not Applicable " in Magento Order?

texts:
In the Magento Admin Panel, after a successful order under the Comments History tab I am getting the "Customer Notification Not Applicable" notice.

After this Magento will not send any order cancellation emails to customer.

My question is:

What does "Customer Notification Not Applicable" mean and why does Magento refuse to send out the order cancellation email to customer?


texts: Magento 2.3 customer form register template file override

texts:
I am working on Magento 2.3 version. I have create custom module for the override the register.phtml file but it is not working. I have provided some files details

  Kh/Registration/etc/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="Kh_Registration" setup_version="1.0.0">
        <sequence>
            <module name="Magento_Customer"/>
        </sequence>
    </module>
</config>

  Kh/Registration/view/frontend/layout/customer_account_create.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="customer_form_register">
        <arguments>
            <argument name="template" xsi:type="string">Kh_Registration::form/register.php</argument>
        </arguments>
    </referenceBlock>
</body>
</page>

  Kh/Registration/view/frontend/templates/form/register.php

<h1>New registration file </h2>

I have enable module, clear cache but it shows core magento file

  vendor/magento/module-customer/view/frontend/templates/form/register.phtml

Please advice me


texts: Magento2, How to pass product data as query string in Url using JSON template? Custom Module

texts:
I am trying to get product name, product SKU, Quantity in Url such that when I write 1 in Url 1-50 products should display, when writing 2 as page number 51-100 products should display. And data goes using JSON template. Also, I need to pass a key in Url.

I have retrieved required data as in Block using classes:

\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
\Magento\CatalogInventory\Model\Stock\StockItemRepository $stockItemRepository

As

public function getProductCollection()
{
    $collection = $this->_productCollectionFactory->create();
    $collection->addAttributeToSelect('*');
    $collection->setPageSize(10); // fetching only 3 products
    return $collection;
}
public function getStockItem($productId)
{
    return $this->_stockItemRepository->get($productId);
}

And in template for seeing data validness:

$productCollection = $block->getProductCollection();
foreach ($productCollection as $product) {
  //print_r($product->getData());
  echo 'Product ID:'.$product->getId();
  echo "
";
  echo 'Product Name:'.$product->getName();
  echo "
";
  echo 'Product SKU:'.$product->getSku();
  echo "
";
  //echo 'Product Qty:'.$product->getQty();
  $id = $product->getId();
  $_productStock = $block->getStockItem($id);
  echo 'Product Qty:'.$_productStock->getQty(); echo '
';
}

This is my JSON template:

{

“items”:

            [

                            {“itemID”: “1000”,”name”:”product name 1” },

                            {“itemID”: “1001”,”name”:”product name 2” },

                            etc

            ]

}

Like here is an example Url:

http://dummy.uk/pointsale?lastoid=15404

when I give page number 1, above mention data of products from 1-50 should be displayed.

Here is a tutorial that explains about Order data, but is not working for me.
https://www.human-element.com/order-data-json-custom-route-magento-2/
what should be done to achieve the result?


texts: magento 2.2.0 Error:: "you did not sign in correctly or your account is temporarily disabled"

texts: I Installed Magento version 2.2.0. But I am getting error "you did not sign in correctly or your account is temporarily disabled"


texts:
I am making rest api's for add product to cart for that I wrote this code:

public function _create(array $data) {

        $id = $data['id'];
        $qty = $data['qty'];

       $product = Mage::getModel('catalog/product')
                         // load the product object
                         ->load($data['id']);

       $quote = Mage::getModel('sales/quote');
       $quote->addProduct($product, $qty);

       $quote->collectTotals()->save();

 return json_encode(array("customer", $quote->getId()));

}

from this the product successfully adding in shopping cart(sales_flat_quote table) and it returns quote ID but I want to add this product to particular(logged in) user's cart for that I load quote from customer like this:

$customer = Mage::getModel('customer/customer')->load(21);

// Load quote by Customer
$quote = Mage::getModel('sales/quote')
             ->loadByCustomer($customer);

But still it is not associating with customer(in table customer ID is 0). Please let me know where I am doing wrong or I have to do more for that.


texts: Displaying all items which have been backordered within an order?

texts:
Using Magento EE 1.9, I've enabled backorders, but there's no way to see if an order contains backordered items in the Sales/Orders grid view.

How would I check if an item was backordered or not after an order has been placed?

(Code-based solutions are fine.)


texts: Suggest me Magento2 Theme development best tutorial

texts:
Please help me by suggesting a best tutorial for developing a theme in magento2.

I am searching on google for many hours but not find any decent one for this.
Thank you in advance for your time and help.


texts: How to use magento 2 rest api in react js

texts: I am learning react js with magento. I want to use magento rest api in my react js app how can i do that ?


texts: copying a URL with SID (while logged in) then pasting it (while logged out) re-loads the page

texts: While customer is logged in to the Customer Account page, for example, the URL looks something like https://www.oursite.com/customer/account/?SID=<randomstring>. URL is copied, customer account is logged out, then the copied URL is pasted. The Customer Account page is redisplayed, even though customer is already logged out. How do we get around this?


texts: After Migration inventory_source_item table is empty magneto 2

texts: This Table ( inventory_source_item ) is Empty and which all my product show out of stock, Can anyone, please help me solve this issue


texts:
I want suggestions regarding Magento store optimization :
Are these two Extensions  Useful which one between these two should be preferred to buy??
https://mirasvit.com/magento-2-extensions/full-page-cache-warmer.html
https://amasty.com/google-page-speed-optimizer-for-magento-2.html

What is you suggestion regarding optimization ???
We are using Varnish have configured it to our site , We are using Elastic Search ...
What other suggestions do you people give ::
Shall we go on buying extensions or go for advance java script bundling using baler ??


texts:
I have recently migrated our Magento 2 store to a new Instance in AWS after setting up Magento store in new instance the store loading time is increased to 22 seconds before In previous instance It was 12 seconds.
Some time It keeps on loading and displays 503 Gateway time out
Kindly help !!
After migration my menu was not displayed so I removed
TTL="330" Frm default.xml file of `Magento_theme`

The varnish from the Magento admin is configured but not at the server default.vcl FILE
Full page cache is enabled and store is in production mode , Kindly help with solution


texts: Element 'block', attribute 'class': 'about-us' is not a valid value of the atomic type 'blockClassType'

texts:
I migrated M1 data to M2 using ubertheme data migration pro.  When I install a theme to my site and load the home page, I am getting the following exception:

  1 exception(s): Exception #0
  (Magento\Framework\Config\Dom\ValidationException): Element 'block',
  attribute 'class': [facet 'pattern'] The value 'about-us' is not
  accepted by the pattern '[A-Z][_a-zA-Z\d](\[A-Z][_a-zA-Z\d])*'.
  Line: 710


texts:
I have suddenly noticed that all of the content (Which is in a static CMS page) on my home page has disappeared.

I can see the Header/Footer sections, and I can see from the HTML (The body class) that the corect page is being loaded, but none of it's content shows. It seems that even if I switch the page that's set as home, or preview it, nothing shows.

I haven't edited that part of the site for 3+ months, and certainly didn't change anything to affect it. I haven't updated any extensions either, as this was a live and stable site. Products are working correctly, and no error is showing anywhere.

Things I have tried:

Tested on 3 devices/browsers
Cleared all caches, browser and magento
Checked the right static block is being called
Checked that the Static Block has the content inside
Checked the code, nothing is being inserted into the main-container div apart from a little snippet of cart js that also appears in the correct version, it's not simply CSS hidden or anything
Rebooted the Ubuntu Server.

EDIT: It seems that if a customer logs in, then the home page displays correctly.


texts: Magento: Buy 3 pay for 2 does not work for me

texts:
I like to set a "Buy 3 pay for 2" item rule. I have created a "Cart Price Rules" but it does not seem to apply.

If I add 3 of the same items or 3 different items it still results in the original price.

What am I doing wrong? the changes does not show at all.


texts: Magento 2 : Change product price while moving to cart event and observer

texts:
I have created a custom module

but moving to cart
I want to add a custom price

which event i can use to change the price

how to change product price while moving to cart event and observer Magento 2


texts: How to fire a function after get data from another function in JQuery?

texts:
in my js file there is two function call CalculateAjax and Calculation like below,

require(['jquery'], function($) {

    var priceValue;

    //Ajax base price calculation
    var CalculateAjax = function(evt) {

        var set_width = jQuery('#width').val();
        var set_height = jQuery('#height').val();

        jQuery.ajax({
                showLoader: true,
                url: 'http://localhost/magento2/magento2/productconfiguration/index/ajax/',
                data: ({
                    Width: set_width,
                    Height: set_height
                }),
                type: "POST",
                dataType: 'json'
            })
            .error(function(err) {
                console.log(err);
            })
            .success(function(data) {
                priceValue = data.price_component;
                jQuery("#baseprice").html("Base Price: " + priceValue);
            });
    };
    $('#width,#height').on('change', CalculateAjax);

    //All other calculation
    var Calculation = function(evt) {

        var width = jQuery('#width').val();
        var height = jQuery('#height').val();

        //area calculation
        var area = (parseInt(width) * parseInt(height) / 1000000);
        jQuery("#area").html("Area: " + area);

        //circumeference calculation
        var circumeference = (2 * (parseInt(width) + parseInt(height)) / 1000);
        jQuery("#circumeference").html("Circumeference: " + circumeference);

        //frame color calculation
        var color = jQuery('#color').val();
        var framecolor = color * circumeference;
        jQuery("#framecolor").html("Frame Color Price: " + framecolor);

        //glass type calculation
        var glass = jQuery('#glass').val();
        jQuery("#glasstype").html("Glass Price: " + glass);

        //handle calculation
        var handle = jQuery('#handle').val();
        jQuery("#handles").html("Handle Price: " + handle);

        //post price calculation
        var centerposthorisontal = jQuery('#centerposthorisontal').val();
        var centerpostvertical = jQuery('#centerpostvertical').val();

        var HS = (parseInt(centerposthorisontal)) + 1;
        var VS = (parseInt(centerpostvertical)) + 1;
        var S = HS * VS;
        var postPrice = S * 102; //default bar price 102

        jQuery("#post").html("Center Post Price: " + postPrice);

        //bar price calculation
        var horisontalbars = jQuery('#horisontalbars').val();
        var verticalbars = jQuery('#verticalbars').val();

        var HS = (parseInt(horisontalbars)) + 1;
        var VS = (parseInt(verticalbars)) + 1;
        var S = HS * VS;
        var barPrice = S * 1.5; //default bar price 1.5

        jQuery("#bars").html("Center Post Price: " + barPrice);

        //total calculation
        var total = (parseFloat(framecolor)) + (parseFloat(handle)) + (parseFloat(glass)) +
            (parseFloat(barPrice)) + (parseFloat(postPrice));
        console.log(priceValue);
        jQuery("#total").html("Total Price: $ " + (parseFloat(total) + parseFloat(priceValue)));
    };
    $('#width,#height,#color,#glass,#handle,#centerposthorisontal,#centerpostvertical,#horisontalbars,#verticalbars,#total').on('change', Calculation);
});

Now before get the baseValue from ajax call the total will calculate

  After get the data from ajax call how to fire the other function


texts:
I'm new to Magento 2.3, I was trying to apply jQuery DataTable and it's done, after that, I want to add it's Button Extention, for that i need to add two more js,so i initialize it, now i'm getting error in my console, Here is my code:

/EC/Downloads/view/adminhtml/requirejs-config.js

 var config = {
    map: {
   '*': {
       dataTables: 'EC_Downloads/js/datatables.min'
     }
   }
 };

/EC/Downloads/view/adminhtml/templates/test.phtml

<script>
require(['jquery', 'jquery/ui','dataTables'], function($){
    $(document).ready(function($){
        $('#example').DataTable({
            dom: 'Bfrtip',
            buttons: [
            'print'
        ]
        });
    });
});
</script>

Initializing other two js button.js, button_print.js like this:

These Js files are located in:

/EC/Downloads/view/adminhtml/web/js/buttons.js

/EC/Downloads/view/adminhtml/web/js/buttons_print.js

<script type="text/x-magento-init">
    {
        "*": {
            "EC_Downloads/js/buttons":{},
            "EC_Downloads/js/buttons_print":{}
        }
    }
</script>

Getting This Error:


texts: Magento2: Not in value Category ids product collection issue

texts:
Product collection issue

$productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');

products  = $productCollection->addAttributeToSelect('*')
            ->addCategoriesFilter('category_id', array(
                array('nin' => $currentCategoryId),
            ))
            ->setOrder('price', 'ASC')
            ->load();


texts: Select all products using API - Magento 2

texts:
how can i select all products and one product by his SKU?
Line 23.

$serviceArgs = ["sku" => 'SKU'];

function getAuthToken($hostname, $username, $password)
    {
      $wsdlUrl = "http://$hostname/soap/default?wsdl=1&services=integrationAdminTokenServiceV1";
      $soapClient = new SoapClient($wsdlUrl, ['soap_version' => SOAP_1_2]);
      $serviceArgs = ['username' => $username, 'password' => $password];
      $response = $soapClient->integrationAdminTokenServiceV1CreateAdminAccessToken($serviceArgs);
      return $response->result;
    }

    $token = getAuthToken($hostname, $username, $password);
    $opts = [
      'http'=> [
          'header' => 'Authorization: Bearer ' . $token
      ]
    ];
    $wsdlUrl = "http://$hostname/soap/default?wsdl=1&services=catalogProductRepositoryV1";

    $serviceArgs = ["sku" => 'SKU'];

    $context = stream_context_create($opts);

    $soapClient = new SoapClient($wsdlUrl, array(
      'soap_version' => SOAP_1_2,
      'stream_context' => $context
    ));

    $response = $soapClient->catalogProductRepositoryV1Get($serviceArgs);

    print_r ($response);


texts:
I want to add phtml file in Grid\Edit which is contain image or other html part

Following Form.php file

<?php

namespace Vandor\Namespace\Block\Adminhtml\Grid\Edit;

use Magento\Backend\Block\Widget\Form\Generic;
use Magento\Backend\Block\Template\Context;
use Magento\Framework\Registry;
use Magento\Framework\Data\FormFactory;
use Magento\Cms\Model\Wysiwyg\Config;
class Form extends Generic
{
    protected $systemStore;
    protected $wysiwygConfig;

    public function __construct(
        Context $context,
        Registry $registry,
        FormFactory $formFactory,
        Config $wysiwygConfig,
        array $data = []
    )
    {
        $this->wysiwygConfig = $wysiwygConfig;
        parent::__construct($context, $registry, $formFactory, $data);
    }

    protected function _prepareForm()
    {
        $model = $this->_coreRegistry->registry('row_data');
        $form = $this->_formFactory->create(
            ['data' => [
                'id' => 'edit_form',
                'enctype' => 'multipart/form-data',
                'action' => $this->getData('action'),
                'method' => 'post'
            ]
            ]
        );

        $form->setHtmlIdPrefix('namegrid');
        $fieldset = $form->addFieldset(
                'base_fieldset',
                ['legend' => __('Edit Detail'), 'class' => 'fieldset-wide']
            );
        $fieldset->addField('id', 'hidden', ['name' => 'id']);

        $fieldset->addField(
            'title',
            'text',
            [
                'name' => 'title',
                'label' => __('Title'),
                'id' => 'title',
                'title' => __('Title'),
                'class' => 'required-entry',
                'required' => true,
            ]
        );

        $wysiwygConfig = $this->wysiwygConfig->getConfig(['tab_id' => $this->getTabId()]);

        $fieldset->addField(
            'content',
            'editor',
            [
                'name' => 'content',
                'label' => __('Content'),
                'style' => 'height:36em;',
                'required' => true,
                'config' => $wysiwygConfig
            ]
        );
        $form->setValues($model->getData());
        $form->setUseContainer(true);
        $this->setForm($form);
        return parent::_prepareForm();
    }
    public function getFormHtml()
    {
        $html = $this->setTemplate('Vandor_Namespace::grid/image.phtml')->toHtml();
        $html .= parent::getFormHtml();

        return $html;
    }
}

Its show top of the main container.
Which is better way to add phtml in between form container


texts: how to show Related product in magento soap api V2

texts:
I have written soap API for related product but this script is not working ,here is my code,i am totally new to this. please help me someone.Thanks

<?php
// Get related products in productId
require_once('../app/Mage.php');//Path to Magento umask(0);

if(isset($_GET["productId"])){
  $categoryId=$_GET["productId"];
    $proxy = new SoapClient('http:/www.prashant.com/index.php/api/v2_soap/?wsdl'); // TODO : change url
    $sessionId = $proxy->login('pras', 'prashant123@'); // TODO : change login and pwd if necessary

    $products= $proxy->catalogProductLinkList($sessionId,$productId);

    $itemDetails=array();
    Mage::app();

  foreach ($products as $item) {

    $product2 = Mage::getModel('catalog/product')->load($item->product_id);
    $productMediaConfig = Mage::getModel('catalog/product_media_config');
    $baseImageUrl = $productMediaConfig->getMediaUrl($product2->getImage());
    $price2=0;
    $price2=$product2->getFinalPrice();
    if($price2==0){
    $price2=$product2->getPrice();
    }

    $desc=$product2->getDescription();
           if($desc==""){
            $desc="blank";
           }

           $baseImageUrl = $productMediaConfig->getMediaUrl($product2->getImage());
           if($baseImageUrl=="http://www.prashant.com/media/catalog/product/"){
            $baseImageUrl="http://www.prashant.com/customApi/icon.png";
           }

           //"desc"=>$desc,

           $statusp=$product2->getStatus();
    $statusen= Mage_Catalog_Model_Product_Status::STATUS_ENABLED;

    if($statusp==$statusen){
         $itemDetails[]=array(
      "productId"=>$item->product_id,
      "name"=>$product2->getName(),
      "price"=>$product2->getPrice(),
      "spprice"=>$price2,
      "desc"=>$desc,
      "imageurl"=>$baseImageUrl,
      );
    }

  }
  //return array of products
  //echo "<pre>";
  //print_r($itemDetails);
  //echo "</pre>";
  echo json_encode($itemDetails);
  exit();
}else{
  echo "error";
  exit();
}
?>


texts: Programmatically create and append a block to another block

texts:
I've declared a plugin that creates and adds a block programmatically if a condition is true. However, my code outputs nothing, it's like if the created block is not rendered at all.

etc/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Framework\View\Element\AbstractBlock">
        <plugin name="Vendor_Module" type="Vendor\Module\Plugin\AppendBlockPlugin"/>
    </type>
</config>

Plugins/AddBlockPlugin.php

public function beforeToHtml(AbstractBlock $block)
{
    if (($block instanceof Block\Product\View)
        && $block->getNameInLayout() === 'product.info'
    ) {
        $template = 'Vendor_Module::block.phtml';

        $block->addChild(
            'custom_block',
            \Vendor\Module\Block\Block::class,
            compact('template')
        );
    }
}

I've made some debugging to this code to ensue that the custom block renders without any errors and that the ->addChild method is actually being called, but still no output for the block I added.


texts: Magento2 composer for component is not working

texts:
I am  trying to upload all my media files of module by composer.

The problem is it is not uploading properly, it is creating pub directory inside the pub folder twice and uploading all files there but it should be inside pub/media/

The structure this is creating is:

I have tried with by mapping pub/media/* in pub/media

But this doesn't works at all.

I tried creating a composer file like this :

and directories to upload are in following hierarchy:

pub/media/ves/
pub/media/wusiwyg/


texts: Magento 2 Catalog search results are not correct?

texts:
I have migrated data from magento 1 to magento 2.

I am searching product name: 4.0ct Round Morganite Diamond Engagement Ring Bridal Set 14k White Gold then it is showing lots of products on result page and searches product is not first. it is showing after many products.

When I have changed search_request.xml file and changed the clause="must" instead of "Should" in the XML.

Now, product is showing in autosuggestion but there is no results on the page.

If I removed number from starting of product name i.e. ct Round Morganite Diamond Engagement Ring Bridal Set 14k White Gold

The product is showing now on result page if I removed number from the starting of name

If I am searching product via SKU, it is working fine.

As I have checked, this issue only in migrated site. It is working in default magento 2.3


texts:
Fatal error: Class 'Helper_Data' not found in app\Mage.php

Fatal error: Class 'Mage_Parcelamento_Helper_Data' not found in

  C:\wamp64\www\magento\app\Mage.php on line 547

Error log:

  Warning: include(Mage\Parcelamento\Helper\Data.php): failed to open
  stream: No such file or directory in lib\Varien\Autoload.php on line
  94

I did what you said, but it's still with the same error.

https://drive.google.com/open?id=0B66I9AyUOaAnS21VMmNFSlEwSEk


texts: I have tried Joreon Vermeulen's method https://stackoverflow.com/questions/6417394/how-to-add-a-3rd-party-library-to-magento to autoload classes but to no avail. Now in my custom autoloader I get the class 'SnsClient.php' but this does not help Magento get the path. I can hardcode it for this particular file but then SnsClient.php uses a file in another folder. Magento is giving can't find error.  I understand that I have to only find a way to get these files path but I have zero ideas about it. Please help


texts: Magento 2: How to check if file is selected for upload or not without $_FILES

texts:
I want to check if user has selected file from form or not before saving data. I know that i can use isset($_FILES['field_name']) but i don't want to use this is their any other way to check this?

Is magento has any function to check this? If yes then please tell me how to implement it in magento 2.


texts:
I made multiple stores in the sub directories(language is store name).
And all the stores use https.
But the problem is that when i switch to another store, it become logged out automatically.
In normal case, SID should work properly across stores, but it is not working.

SID arguments looks normal.
ex)

https://www.domain.com/english/?SID=4ij4mjs9f71ct7m6rvod0vbjb0&___store=encode

But if i use http, not https, every thing works like magic, So SID works only for http, not https.

The setting that i use is these.

"Use SID on Frontend" - YES

"Use Secure URLs in Frontend" - YES

secure "Base URL" - https://www.domain.com

secure "Base Link URL" - {{unsecure_base_url}}english/

unsecure "Base URL" - https://www.domain.com

unsecure "Base Link URL" - {{secure_base_url}}english/

"Cookie Lifetime" - 86400

"Cookie Path" -

"Cookie Domain" -

"Use HTTP Only" - YES

"Cookie Restriction Mode" - YES

SSL certificate domain is "www.domain.com", "domain.com"


texts: Number of Adults and Number of Children as quantity in configurable products

texts:
I have tried various combination of configurable, bundled, grouped products and custom options but none of combinations could give me below output in Magento:

The final price should be:
(Rate for adult for the option selected * Adult Quantity) + (Rate for child for the option selected * Child Quantity)

Can anyone please help?


texts: Bundle or grouped product from configurable products

texts:
Note: I know this could be marked as duplicate as I have found many topics on this title.

What I would like to know is how this e-shop is doing the stock management in this case https://www.totallywicked-eliquid.co.uk/10ml-tw-titan-fluid-10-bottle-multipack-product.html as customers only order one product (a 10ml 10 bottle pack) and each bottle has 2 configurable options:strength and flavour.

This looks like a Bundle of Configurable products however what they have there does not look like a built-in set of features from Magento.


texts: Magento 2: Is it possible to have two stores with different views and same login for customers?

texts: I'm trying to create two store with different views and same login for customers. I read about configuring multiple stores with same backend admin panel. And I would like to create the same logins for two store for users(customers). Is it possible?


texts: Homepage for a new store : There was no Home CMS page configured or found

texts:
I've just created multiples 'Pro' stores like this one. The Mayotte store is already existing and working. The Mayotte pro is a new store based on the same website as the Mayotte one.

But when I go to my new store homepage I'm getting the error :

There was no Home CMS page configured or found.

Moreover this error is shown in the default magento Luma theme (while I guess I should have a custom theme like for the previous store).
If I go to the store specific view : Store >> Configuration >> General >> Web >> Default Pages >> CMS Home Page
The homepage is well filled with the same value as for the other store and of course the cache is cleared and flushed.
I guess I just miss some kind of layout or template definition or configuration somewhere, but I don't really know anything about front in Magento 2.
EDIT : Now I have the good theme after adding into Content >> Design >> Configuration the missing theme. But the error remains.


texts: How many types of Injection methods does Magento 2 support?

texts:
What types of Injection methods does Magento 2 support?

I am aware about,

Constructor Injection - consider as a Injection.
Method Injection - consider as a Injection.

  BUT

And Interface and Model preference from di.xml should be
consider as Injection ?

<preference for="Vendor\Module\Api\ManagementInterface" type="Vendor\Module\Model\Management" />

Does it consider as a Injection ?

  Note : If you read Constructor injection in Magento dev docs
  - It says Magento uses the di.xml file to determine which implementations to inject into the Builder class.


texts: How to implement a multilingual website with two other domains?

texts:
I have 2 domains: domain.com and domain.in
Server: ubuntu 16, nginx 1.10, magento 2.
Same product for both store, but diferent discription, url... The official documentation does not have this information with nginx config.
Try this:
Creat store view this code in. After:
./magento cron:run

Change config:

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

map $http_host $MAGE_RUN_CODE {
    domain.com default;
    domain.in in;
}

server {
    listen 80;
    server_name www.domain.com;
    return 301 $scheme://domain.com$request_uri;
}

server {
    listen 80;
    server_name www.domain.in;
    return 301 $scheme://domain.in$request_uri;
}

server {
    listen 80;
    server_name domain.com domain.in;

    set $MAGE_ROOT /var/www/domain.com/html;
    set $MAGE_MODE default;

    location = /robots.txt {
        alias /var/www/domain.com/html/robots.txt;
    }

    location = /sitemap.xml {
        alias /var/www/domain.com/html/sitemap.xml;
    }

    include /var/www/domain.com/html/nginx.conf.sample;
}

Insert to nginx.conf.sample:

fastcgi_param  MAGE_RUN_TYPE website;
fastcgi_param  MAGE_RUN_CODE $MAGE_RUN_CODE;

Site not open. Error: 2016/10/30 09:37:50 [error] 6345#6345: *29624 access forbidden by rule, client: 000.000.00.000, server: domain.com, request: "POST /app/etc/config.php HTTP/1.1", host: "domain.com"


texts: Data-migration-tool Invalid map filename

texts:
I am working with data migrate of customer data only from Magento Version 1.12.0.2 EE to Magento Version 2.2.3 EE using data migration tool.
 (https://devdocs.magento.com/guides/v2.0/migration/migration-tool.html)

Run this command:

php bin/magento migrate:settings -r /var/www/html/magento2/vendor/magento/data-migration-tool/etc/commerce-to-commerce/1.12.0.2/config.xml

This error came

  [Migration\Exception]
  Invalid map filename:
  /var/www/html/magento2/vendor/magento/data-migration-tool/


texts:
Custom Option - File Upload:

When uploading a file on a Custom Option of a Product it ends up at:

\media\custom_options\quote*

When you upload a file.jpg, it ends up being renamed into 123kjhkjhkjhdsk.jpg.

What I need:

I need it to be saved in Original Name.

What I have done so far:

Now, I was able to modify \lib\Varien\File\Uploader.php
https://github.com/varinen/solvingmagento_1.7.0/blob/master/lib/Varien/File/Uploader.php#L532

static public function getDispretionPath($fileName)
{
    $dispretionPath = '/orders';

    return $dispretionPath;
}

to store the files into a different folder.

But I cant find anywhere where the filename is being changed.

Any ideas?

PS: reason for Original Filename is because files uploaded need to be avaliable for download through FTP. So having original name and order # as a folder will solve current requirement.


texts: Unable to checkout with a downloadable product

texts:
Magento CE 1.8.0.0

I have a single downloadable product (i.e. an ebook). We have guest checkout disabled for downloadable products to prevent sharing. I attempt to checkout with a downloadable product and I can't proceed past step 2 (shipping information) UNLESS I have a physical, simple product in the cart. I monitor console logs and the /var/log directory. ZERO errors.

I monitored the process with Firebug and the last step I'm able to get to is POST https://www.website.com/checkout/onepage/saveBilling which has a 200 OK response. It looks like it is trying to skip right over the shipping rate information (which it should) and go directly to the credit card/payment step. Any thoughts?


texts:
I am trying to extend the following module: https://github.com/magespecialist/m2-MSP_CashOnDelivery (version 1.2.6).

That module adds a custom payment method (cash on delivery) and optionally adds a fee to the quote.

What I am trying to get is the correct tax applied to the fee. Totals are ok, but tax totals are not ok. I would expect a new row in the sales_order_tax_item table, but there isn't.

I suppose that it would be involved in the Magento\Tax\Model\Sales\Total\Quote\Tax::processExtraTaxables() method.

How can I declare the fee tax in a way that Magento would pick it up and add it to tax calculation?


texts:
My fellow devs!

I am attempting to change the standard "add to cart" functionality to include AJAX. I've taken on board advice that overloading addAction method in the Checkout/CartController.php methods is bad so I am now trying to do it via the events system.

I need to return a JSON response to my AJAX request. The response must have things like grand total, num items etc which I see I can get from the event checkout_cart_save_after (Ln 464 - Checkout/Model/Cart.php) but I cannot access the response object as this event is executed within Model.
Event checkout_cart_add_product_complete (Ln 230 - Checkout/controllers/CartController.php) does appear to have access to this so as I see it the logical thing to do would be to share the data between my event handlers.

I've only been using Magento for a few weeks now so does this logic sound correct and can I share this data?


texts:
After upgrading magento to 2.3.2 I can't see the Admin User Grid anymore.

System Log Shows This error

  [2019-07-01 10:22:00] main.CRITICAL: Item
  (Magento\User\Model\User\Interceptor) with the same ID "4" already
  exists. [] []

I'm still quite new to Magento and have no idea what this ID refers to

I've checked the admin_user table in database and all seems to be fine. No duplicate IDs. I'm guessing it's some other table but I have no idea which.

Any help would be appreciated. Thank you.


texts: External links from admin backend crashing Magento

texts:
I wanted to put some external links on my magento 2 admin page so users could easily acess intranet, mail and google spreadsheets.

I managed to get links in to the backend but as sooon as they were external the backend crashed and I couldnt login.

Is this a security measure? Can I work around it?

Its from http://alanstorm.com/magento_2_admin_menu_items/
When I try to change action into a link it breaks.

         parent="Pulsestorm_MenuTutorial::top_level_example"
         action="cms/page/index"
        />
    <!-- END:   new node -->
</menu>


texts: Magento 2 : How to add free item automatically to the cart

texts:
In Magento 2 after I created a free gift promo it will not add the free item to the cart automatically.

Users need to do that manually.
Is there any solution for this?


texts: magento2 addtocarturl problem in form action of product listing page

texts:
I had uploaded the product via XL using my custom module for simple and bundle products.

product is uploaded successfully and I check all the details on admin product page and DB tables.

ON FRONT END
But addtocarturl is coming worng on form action on product list page.


texts: Magento add submenu in customer dashboard left navigation

texts:
I have added my custom menu in left navigation of customer dashboard page but i also want to add sub-menu to my custom menu.

Is there any way to add sub-menu ?

I have created menu using below code

<customer_account>
  <reference name="customer_account_navigation">
    <action method="removeLinkByName"><name>billing_agreements</name></action>
    <action method="addLink" translate="label" module="test">
      <name>info_edit</name>
      <path>test/index/getinfo/</path>
      <label>Custom menu</label>
    </action>
 </reference>
</customer_account>


texts: Create Custom Product attribute in Magento 1

texts: I want one custom DateTime attribute to filter product data. So can anyone suggest how to create an attribute for the site?


texts:
I am trying to setup a new vagrant box for Magento 2 development, however when running composer install, I receive the following errors:

Problem 1
    - The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension.
  Problem 2
    - The requested PHP extension ext-mcrypt * is missing from your system. Install or enable PHP's mcrypt extension.
  Problem 3
    - The requested PHP extension ext-curl * is missing from your system. Install or enable PHP's curl extension.
  Problem 4
    - The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension.
  Problem 5
    - The requested PHP extension ext-xsl * is missing from your system. Install or enable PHP's xsl extension.
  Problem 6
    - The requested PHP extension ext-mbstring * is missing from your system. Install or enable PHP's mbstring extension.
  Problem 7
    - The requested PHP extension ext-openssl * is missing from your system. Install or enable PHP's openssl extension.
  Problem 8
    - The requested PHP extension ext-zip * is missing from your system. Install or enable PHP's zip extension.

I have already tried installing each of these extensions using sudo apt-get install php7.0-mcrypt etc, however I am still getting the errors above stating that the extensions I have installed are still missing. I have restarted Apache2. Any ideas?

PHP -v

PHP 7.0.8 (cli) (built: Jun 26 2016 15:14:18) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies


texts: Magento 2 Plugin Not Being called or var_dump/die not showing?

texts:
I created a module with a basic configuration option. I want to create a plugin that will act once that option is saved, but i can not tell if the plugin is not being called or my die(var_dump()) does not work on plugin code.
Here is what i have:

app/code/Pera/CustomerFreeShipping/etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Config\Model\Config">
        <plugin name="Magento_Config::before" type="Pera\CustomerFreeShipping\Model\ConfigPlugin" sortOrder="1" disabled="true" />
    </type>
</config>

app/code/Pera/CustomerFreeShipping/Model/ConfigPlugin.php

<?php
namespace Pera\CustomerFreeShipping\Model;

class ConfigPlugin {

    public function beforeSave(\Magento\Catalog\Model\Product $subject)
    {
        die(var_dump($subject));
    }

}


texts: Magento: add a button to the admin config

texts:
I am trying to add a button with a backend handler. Here's the code

Admin config: system.xml

<sync_now_button translate="label">
    <label>Sync Now</label>
    <frontend_type>button</frontend_type>
    <backend_model><namespace>_<module>/backend_syncnow</backend_model>
    <sort_order>40</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>1</show_in_website>
    <show_in_store>1</show_in_store>
</sync_now_button>

Backend model: <namespace>/<module>/Model/Syncnow.php

<?php$

class <namespace>_<module>_Backend_Syncnow extends Mage_Core_Model_Config_Data
{
    public function _afterSave()
    {
        Zend_Debug::dump('sync now');
        exit;
    }
}

When I load the section associated with my configuration, I get following error -

Invalid config field backend model: <namespace>_<module>/backend_syncnow

Trace:
#0 /home/measure9/public_html/demo.smartsearch.com/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(328): Mage::throwException('Invalid config ...')
#1 /home/measure9/public_html/demo.smartsearch.com/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(229): Mage_Adminhtml_Block_System_Config_Form->initFields(Object(Varien_Data_Form_Element_Fieldset), Object(Mage_Core_Model_Config_Element), Object(Mage_Core_Model_Config_Element))
#2 /home/measure9/public_html/demo.smartsearch.com/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(164): Mage_Adminhtml_Block_System_Config_Form->_initGroup(Object(Varien_Data_Form), Object(Mage_Core_Model_Config_Element), Object(Mage_Core_Model_Config_Element))
#3 /home/measure9/public_html/demo.smartsearch.com/app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php(92): Mage_Adminhtml_Block_System_Config_Form->initForm()
#4 /home/measure9/public_html/demo.smartsearch.com/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(107): Mage_Adminhtml_Block_System_Config_Edit->initForm()
#5 /home/measure9/public_html/demo.smartsearch.com/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_System_ConfigController->editAction()
#6 /home/measure9/public_html/demo.smartsearch.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#7 /home/measure9/public_html/demo.smartsearch.com/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#8 /home/measure9/public_html/demo.smartsearch.com/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#9 /home/measure9/public_html/demo.smartsearch.com/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#10 /home/measure9/public_html/demo.smartsearch.com/index.php(87): Mage::run('', 'store')
#11 {main}

Any pointers what could be wrong with my configuration?

Update #1:
I have managed to solve my issue partially. I changed the class name from <namespace>_<module>_Backend_Syncnow to <namespace>_<module>_Model_Syncnow and I can see the button on the UI. However, the button does not show text and clicking on the button does not invoke my model.

P.S. <namespace> and <module> are just placeholders.


texts:
Magento2 query displaying perfect result in database but wrong in collection while sorting by created_at
Query
SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, IFNULL(review_summary.reviews_count, 0) AS `reviews_count`, IFNULL(review_summary.rating_summary, 0) AS `rating_summary` FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_category_product_index_store1` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id=8 INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.customer_group_id = 0 AND price_index.website_id = '1' LEFT JOIN `review_entity_summary` AS `review_summary` ON e.entity_id = review_summary.entity_pk_value AND review_summary.store_id = 1 AND review_summary.entity_type = (SELECT `review_entity`.`entity_id` FROM `review_entity` WHERE (entity_code = 'product')) ORDER BY `e`.`created_at` DESC

For sorting
$this->_collection
      ->getSelect()
        ->order('e.created_at');


texts: Magento 2.2.5: Warning: Cannot modify header information - headers already sent by [custom_theme registration.php]

texts:
I'm developing a custom theme and running into errors. The theme has been tested and working on various servers but, for some reason, since uploading to siteground I get the following error (file paths, vendor name etc. have been redacted and replaced with notes contained inside square brackets).

Warning: Cannot modify header information - headers already sent

  "0":"Warning: Cannot modify header information - headers already sent
  by (output started at
  /[magento_root_directory]/app/design/frontend/[vendor]/[theme]/registration.php:1)
  in
  /[magento_root_directory]/vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php
  on line 148","1"

I've read that this is to do with whitespace before the <?php tag, but there is no whitespace.

My registration.php file is as follows (with vendor/theme name redacted):

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/[VendorName]/[themename]',
    __DIR__
);

This is copied exactly from the file. The <?php tag is on the first line and there is no whitespace following it.

The site is installed on a siteground shared hosting instance, though I don't think this should make a difference.

Does anyone know what the problem is?

There is a massive stacktrace following the error message, which I can share if this information is not enough.

When I visit the website homepage I see a blank page, with nothing logged in the console and the URL reads:

  http://[my_website].com/pub/errors/report.php?id=[error_id]&skin=default

The page reloads, looping indefinitely and creating a new report each time with the same error message.

Update

My theme.xml file is as follows:

<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>[ThemeTitle]</title>
    <parent>Magento/blank</parent>
    <media>
        <preview_image>media/preview.jpg</preview_image>
    </media>
</theme>


texts: Is there any way in magento 2 to prevent user to add more than 1 product in cart

texts:
I want to set a limit of 1 product in the cart.
Magento 2 C.E provides an option to set a limit of qty of a single product in the cart but that option allows two individual products in the cart.
I want to set vice versa.
Users can add only one product at a time in the cart. user cannot add any other product if he added a product in the cart unless and until he removes the first product or checkout that product.
I am sure there will be a solution for this.


texts: how to show uploaded image in mail to admin uploaded through form

texts: hello everyone I want shows the uploaded image of the form in the mail to admin in mail image name is coming but I want to show the image


texts: Locate source of error in system.log (src/__default.php)

texts:
Do you know how to fix error in System.log?

2015-04-23T22:47:45+00:00 ERR (3): Notice: Undefined index: HTTP_USER_AGENT  in /public_html/includes/src/__default.php on line 14331

We have an inventory management module that won't connect to our Magento store via API. Hoping this error in sytem.log will help us resolve the issue.

Your ideas will be appreciated.


texts:
Faced the problem that filterSearch does not search for all columns in the table ,but search only works in one column in the table grid.

I installed full text in database columns

My code filterSearch

<filterSearch name="fulltext" >
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="component" xsi:type="string">Magento_Ui/js/grid/search/search</item>
                <item name="displayArea" xsi:type="string">dataGridFilters</item>
                <item name="provider" xsi:type="string">magento_retailmanager_post_listing.magento_retailmanager_post_listing_data_source</item>
                <item name="chipsProvider" xsi:type="string">magento_retailmanager_post_listing.magento_retailmanager_post_listing.listing_top.listing_filters_chips</item>
                <item name="storageConfig" xsi:type="array">
                    <item name="provider" xsi:type="string">magento_retailmanager_post_listing.magento_retailmanager_post_listing.listing_top.bookmarks</item>
                    <item name="namespace" xsi:type="string">current.search</item>
                </item>
            </item>
        </argument>
    </filterSearch>

Example code created column on UI component

 <column name="model">
        <argument name="data" xsi:type="array">
            <item name="width" xsi:type="string">150px</item>
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
                <item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
                <item name="sortable" xsi:type="boolean">true</item>
                <item name="dataType" xsi:type="string">text</item>
                <item name="align" xsi:type="string">left</item>
                <item name="label" xsi:type="string" translate="true">model</item>
            </item>
        </argument>
    </column>

And is it possible to search for information by type LIKE ?
And is it possible to search for digital data in the table?


texts: I want to show a completely custom dashboard. I have a controller for that. I just want to show this page when Admin login. I don't want to show the default Magento dashboard controller I want my controller to be a default one.


texts: Magento 2 : Old product url to new product url redirect

texts:
Create a few new products. And set a URL for it (test1, test2, test3, etc.)
Change the URL via CSV import of that product (SKU, url_key) .. (change to 10test, 11test, 12test, etc)
. When using the old URL in frontend it must be redirected to the new URL.
Any help? Thank in advance.


texts: Magento 2 - How to add customer name in CMS page/block?

texts: I need to add the name of the customer into a CMS Site or Block. I tried to insert {{var customer.name}} as seen in the documentation, but it does not work.


texts: Magento 2 - How to display messages on ajax success change

texts:
What I am trying to do:
When I update the cart qty so that the qty is higher than the quantity available, I want my code to be able to show an alert ‘The requested qty is not available’ pop up or notification.
Situation now:
So I have created a custom module so that the shopping cart will automatically reload when the qty changes using AJAX.
Right now, I’m not sure why but I have to reload the whole cart page for the notification to show up (see picture).

What I found so far:
I think Magento/Ui/view/frontend/web/js/view/messages.js appears to be responsible for adding messages but I’m not sure. Is there any way so that I do not need to reload the whole page and it automatically gives the customer the alert on ajax change?
Also, found some things online, about customerData.get('messages'). But I’m still not able to use this on my cartQtyUpdate.js file to show the messages.
var customerMessages = customerData.get('messages')() || {},
    messages = customerMessages.messages || [];

messages.push({
    text: 'message to display',
    type: 'success'
});

customerMessages.messages = messages;

customerData.set('messages', customerMessages);

here is my whole js code:
define([
'jquery',
'Magento_Checkout/js/action/get-totals',
'Magento_Customer/js/customer-data',
'domReady!'
], function ($, getTotalsAction, customerData) {

$(document).on('change', 'input[name$="[qty]"]', function(){
    var form = $('form#form-validate');
    $.ajax({
        url: form.attr('action'),
        data: form.serialize(),
        showLoader: true,
        success: function (res) {
            var parsedResponse = $.parseHTML(res);
            var result = $(parsedResponse).find("#form-validate");

            $("#form-validate").replaceWith(result);

            //reload minicart
            var sections = ['cart'];
            customerData.invalidate(sections);
            customerData.reload(sections, true);

            //reload total summary
            var deferred = $.Deferred();
            getTotalsAction([], deferred);

            //for testing purpose - it returns null
            var customerMessages = customerData.get('messages')() || {};
            console.log(customerMessages);

        },
        error: function (xhr, status, error) {
            console.log("test");
            var err = eval("(" + xhr.responseText + ")");
            console.log(err.Message);
        }
    });
  });

 });

I think the error message shows up because it has something to do with the session messages. I think we can use this session message to show up after ajax change success. I'm not sure how to do this though.
I'm still so new to Magento, so any help would be appreciated. Thank you.


texts: Create Module to display stock status on Product listing Page

texts: I want to develop module which is able to display custom stock status on product list page when we can enable X-threshold option from admin side and that much quantity will be displayed with the custom status message.


texts: Magento 2.2.5: Save and Continue Edit Button doesn't work

texts:
I'm doing the Save and Continues button in "Slide" page.

So what I've done til now:

Everything was perfect, but my Save and Continue Edit button doesn't work.
After I click the button, it throws a success message and returns back to the index page, but what I want is detail page.

I know it because, in Save.php file, I've redirected it back to index page, but I can't remove that, because when I do that, the save throw an error about missing URI.

And I can't make another Save.php just for this Save and Continue button, right?
Please give me advice, thanks.

Here is my code:

  C:\xampp\htdocs\magento\app\code\Aht\BannerSlider\Block\Adminhtml\Slide\Edit\SaveAndContinueButton.php

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Aht\BannerSlider\Block\Adminhtml\Slide\Edit;

use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;

/**
 * Class SaveAndContinueButton
 */
class SaveAndContinueButton extends GenericButton implements ButtonProviderInterface
{
    /**
     * @return array
     */
    public function getButtonData()
    {
        return [
            'label' => __('Save and Continue Edit'),
            'class' => 'save',
            'data_attribute' => [
                'mage-init' => [
                    'button' => ['event' => 'saveAndContinueEdit'],
                ],
            ],
            'sort_order' => 80,
        ];
    }
}

  C:\xampp\htdocs\magento\app\code\Aht\BannerSlider\Controller\Adminhtml\Slide\Save.php

<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 20/07/2018
 * Time: 4:15 CH
 */

namespace Aht\BannerSlider\Controller\Adminhtml\Slide;

use Magento\Backend\App\Action\Context;
use Aht\BannerSlider\Model\SlideFactory;

class Save extends \Magento\Framework\App\Action\Action
{
    protected $slideFactory;

    public function __construct(
        Context $context,
        SlideFactory $slideFactory
    ) {
        $this->slideFactory = $slideFactory;

        parent::__construct($context);
    }
    /**
     * Save action
     *
     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
     * @return \Magento\Framework\Controller\ResultInterface
     */
    public function execute()
    {
        $data = $this->getRequest()->getPostValue();

        /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
        $resultRedirect = $this->resultRedirectFactory->create();
//
        if ($data) {
            try{
                $id = $this->getRequest()->getParam('id');

                $model = $this->slideFactory->create()->load($id);
                $data['id'] = $id;
                $model->setData($data);
                $model->save();

                $this->messageManager->addSuccessMessage(__('Update Slide Successfully.'));

                $resultRedirect->setPath('*/*/');

                return $resultRedirect;
            }
            catch (\Exception $e) {
                $this->messageManager->addErrorMessage($e->getMessage());
            }

        }
    }
}


texts: Magento 2: How to update customer reward points with createAccount API?

texts:
I am using Magento 2.3.1 Enterprise Edition.
I am using Magento2 default create Customer API to create a customer in Magento admin using API, I want to add rewards point with this API call.
API call:
/rest/V1/customers

data:
{
    "customer": {
    "email": "test@example.com",
    "firstname": "test",
    "lastname": "user",
    "storeId": "1",
    "websiteId": "1",
    "customAttributes": [
             {
                 "attributeCode": "customer_number",
                  "value": "1222222222"
             }
       ]
     },
  "password": "Password1"
}

Any one help me how to update reward points in this.


texts: Magento upgrade from 2.2.3 to 2.3.0 just blew Cheeze balls .. help

texts:
just finshed updating composer update,

bin/magento setup:upgrade
Cache cleared successfully
File system cleanup:

/home/pricesplitters/public_html/generated/code/Composer
/home/pricesplitters/public_html/generated/code/MSP
/home/pricesplitters/public_html/generated/code/Magento
/home/pricesplitters/public_html/generated/code/Symfony

The directory /home/pricesplitters/public_html/generated/metadata/ doesn't exist - skipping cleanup
Updating modules:
Schema creation/updates:

  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an
  error in your SQL syntax; check the manual that corresponds to your
  MariaDB server version for the right syntax to use near '-14dec WHERE
  Non_unique = 1' at line 1, query was: SHOW INDEXES FROM
  mp_vendor_registration_assign_group_bk-14dec WHERE Non_unique = 1

Boom .. cheezeballs.


texts:
My payment gateway (Ecorepay) requires customer address to include state/province.

It works when I pass the region_id (for countries where I have a drop down list) my question is where is the region stored if there is no drop down list and the value has simply been added as free text? Can see it in any of the order table in the database...


texts: How to move the field error element ".Mage-error" outside of the ".field" element? Magento 2.2

texts:
I am new to Magento, and am using Magento 2.2.

How can we move the error message that is generated to the outside of it's field parent.
Please note that I am looking for a way to do it through my custom theme.
Please see the screenshot for clarification.


texts: php bin/magento setup:di:compile command throws Source class "-------" for "-------" generation does not exist

texts:
I have added a Repository interface in my Api directory and it's implementation in located under Models directory.

I have setup the preference for the interface in etc/di.xml.

When I run bin/magento setup:di:compile the following error is thrown in the console.

  Source class "\Namespace\Module\Model\PostInterface" for
  "Namespace\Module\Model\PostRepository" generation does not exist.

I have no idea why the system is searching for "\Namespace\Module\Model\PostInterface" while I have mentioned clearly the location of the implementation class in di.xml.

Any suggestions are welcome with thanks !!

More Info:

  When I remove the Repository implementation file i.e;
  app/code/Namespace/Module/Model/PostRepository.php (imlpements
  app/code/Namespace/Module/Api/PostRepositoryInterface.php), the error
  disappears.

  Also, when I rename the file from
  app/code/Namespace/Module/Model/PostRepository.php to
  app/code/Namespace/Module/Model/PostRepositoryy.php, the error
  disappears.

Is there any conventions that needs to be followed while using Repositories ?


texts:
I am calling a css file from a theme skin folder located at

/skin/frontend/[myfolder]/default/css/reset.css

in a layout block

<block type="page/html_head" name="head" as="head" template="[mylayoutfolder]/html/head.phtml">
    <action method="addCss"><type>css</type><stylesheet>reset.css</stylesheet></action>
</block>

This appears in the HTML but incorrectly as

<link rel="stylesheet" type="text/css" href="http://ae2015.uk/skin/frontend/[myfolder]/default/css" reset.css />

If I change the < type > to be skin_css  then the output is:

<link rel="stylesheet" type="text/css" href="http://ae2015.uk/skin/frontend/base/default/skincss" reset.css />

Any clues as to what is going on gang?


texts: Is there a need in Magento 2.4 for Cache warmer extension or Google Page Speed Optimizer?

texts:
Magento ver. 2.4.2
4 x 2.50 GHz Cores
8 GB RAM
5 TB Bandwidth
5000 Mbps Network Out

We used to run Magento 1.9.4 but are switching to Magento 2.4.2. Every time I installed Magento 2.x it always seemed very slow on the back-end (we haven't set up the front end yet to see) even though I have done all the recommended optimisations.
Now I found 2 extensions created by Amasty:

Full Page Cache Warmer
Google Page Speed Optimizer

They are not the cheapest ones so I was wondering if this would help with Magento 2 or is Magento 2.x designed in such a way where this is no longer needed? Historically (on our Magento 1.9.4) we had a hard time with Caching extensions so we ended up disabling it (I guess we weren't able to configure them properly).


texts: Magento 2 : What step we have to follow for upgrade from 2.0.x to 2.1.x?

texts:
This is intended canonical question

When we are trying to upgrade our Magento store from 2.0.x to 2.1.x (2.0.7 to 2.1.1).

What changes we have to do in Admin panel OR what things we have to consider after upgrade so that our theme and custom module will work properly also which PHP ver required for this ?


texts: Magento 2.2.x cache disabled automatically

texts:
First of all, I couldn't find any info about this kind of issue anywhere on the web.

We have a production environment with git integration. We pull our changes to it only via git (git pull).

The problem is that , somehow in one of the steps Magento caches disables automatically (all zeros when checking cache:status). That causes a problem if this is missed via programmer further causing server overload due to high traffic 'bashing' to the Magento without cache.

Maybe some of you have seen this issue before? We do not know when or how it's exactly happens.
And it kinda appears randomly.

Usual steps we do:

enabling maintenance
git pull
composer install (if needed)
module enable Vendor_ModuleName (if needed)
setup:upgrade (if needed)
clearing static stuff
deployment command
clearing caches
clearing opcache
disabling maintenance

I would appreciate any valuable suggestions that could help to solve this kind of issue.


texts: How to hide the header_slider on all subpages, but want to keep it on home page?

texts:
Hi I've been reading on layout updates, on hide the block "header_slider" on all subpages, i.e., category, product and check out pages.  I would like to keep it on the home page.
I've looked at the file.

/app/design/frontend/myinterface/mycustometheme/local.xml

and found this:
<reference name="top.container">
<block type="cms/block" name="header_slider">
<action method="setBlockId"><block_id>header_slider</block_id></action>
</block>
</reference>
I was able to remove the slider from all pages under CMS>Pages, by adding this code in the Layout Update XML:
<remove name="header_slider"/>
However, all header_sliders disappear, even on the home page, when I try to add this line in either of these xml files:

app/design/base/default/layout/checkout.xml
app/design/base/default/layout/catalog.xml

I put it into between the <default></default> tags.
I'm not sure is I have the heiarchy of the theme correct?
Thanks for your help.


texts: GENERATE THIS REPORT: main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_

texts:
When I call a simple block in the cms home page
{{block class="Magento\Framework\View\Element\Template" name="test_file" template="Magento_Theme::html/test.phtml"}}


texts: Magento 2, how to get all product options with their price of configuration for view reorder by API?

texts:
Using Magento 2.2, API, Reorder. I need to get all cart item information from Product Detail page by programmatically.

  Step 1: Click Reorder from My Dashboard -> Recent Orders

I need belove information Programmatically

  Step 2: Cart Item status which got from Previous Ordered


texts:
I work on a Magento website and I recently saw a website (www.carid.com) that has a popup menu for specific products. So for example if a product is headlight specific you can click on the the product options and you'll be prompted with a menu that lets you pick year, make and model for that specific product type (for this example it being headlight).

Can this be done in Magento via backend? Here is an example of what I'm trying to explain, click on "Select Product Options":

http://www.carid.com/spyder/custom-headlights.html

I was thinking about perhaps creating custom options but they aren't dependent on each other, is there a way to create a similar feature on Magento?


texts:
for design purposes -css customization - I need to echo in my catalog list view the first category. Taking into consideration that the first category is Root (or default) all paths give me that category id number. consequently I need to retrieve the code of the second category starting on root.

example: default category (id=1) - electronics (id =2 )- mp3 players(id=3) - ipod (id=4). when I´m visiting category ipod I would like to echo in my view 2 (for id=2).

I tested this code

$_cat = new Mage_Catalog_Block_Navigation();
getCurrentCategory();
$curent_cat_id = $curent_cat->getId();

load($curent_cat_id)->getParentId();
echo $parentId;

but I´m receiving the first root category. Does anyone knows if I can pass any parameter to retrieve the root category + 1?.
brgds!


texts: Calling custom dynamic Blocks in transactional emails

texts:
in my transactional email page i've used this

{{block type='sales/dispatch' area='frontend' template='email/order/dispatch.phtml' order=$order shipment=$shipment}}

my block is under sales module which is like this

class Mypackage_Sales_Block_Dispatch extends Mage_Core_Block_Template {

        public function checkinout(){

            return 'testingg......';
        }
}

and my dispatch.phtml file looks like this

echo $this->checkinout();

but in the email i'm not getting this block printed, what am i doing wrong? thanks for the help


texts: SUPEE 6788 + Mage_Adminhtml_Permissions_BlockController + Controller file was loaded but class does not exist

texts:
My magento specifications are below:

Magento 1.9.0.1
PHP 5.3.3
centos 6.6 (final)

I applied patch 6788 which was applied successfully without any errors.
When I visit the new admin pages (block permissions, variable permissions) created by this patch, I get "There has been an error processing your request".
In var/report the file mentions "Controller file was loaded but class does not exist".

I have tried flushing caches, deleting cache files, disabling compiler, Reloading the front page and even upgraded php to 5.4.4 but I keep getting this error.

Please suggest.

Thanks in advance!!


texts:
I have created a Category with Special character called "Home Décor" http://puu.sh/k2ZOP/0267464f46.png. Now when I trying to import the products under this category, I got "Category does not exists in rows" error. http://puu.sh/k2ZRZ/be1e291542.png

Here is the CSV file screenshot: http://puu.sh/k2ZTX/5de537e978.png. I have try to save the file in UTF-8 Format, but still facing the same error.

Please help me.


texts: Create a custom product form based on user role in magento 2

texts:
I want to hide some field of the product creation form.

I know that i can do this with some xml file, but i want to hide them only for specific user role.

I found that the event adminhtml_catalog_product_edit_prepare_form is triggered when the product form is created, but it doesn't fire.

The events catalog_product_edit_action and catalog_product_new_action instead work, but they are triggered when the new or edit buttons are clicked.

How can i modify the form?


texts: Magento2 : CSS file path loaded but CSS file not created on folder pub/static

texts:
I have added css on custom phtml file using:

<link rel="stylesheet" type="text/css" href="<?php echo $block->getViewFileUrl('css/banner.css')?>">

and placed the CSS file in folder: Magento_Theme/web/css
When I load page and view the page content source it shows the CSS path as:

<link rel="stylesheet" type="text/css" href="http://xyz/magento-2/pub/static/version1530249778/frontend/Magento/mytheme/en_US/css/banner.css">

But not created any file on pub/static folder.
I have cleared the cache and run the upgrade command.

Thanks


texts: Magento 2 UI Component admin form conditional required validation

texts:
I need to create 2 fields(checkbox and input) in admin catalog form. I created both fields using UI Component.
I need to add a condition that when checkbox is checked then input field will be required. If checkbox is uncheck then this input field is not required.
How can I apply this required validation based on checkbox?


texts: Magento 2 - How to have a custom "add to cart" button in CMS page?

texts:
So I am trying to add "Add to Cart" button in my CMS page. In one CMS page, I will have one item and multiple "Add to Cart" buttons. I'm wondering how can I do this?
All the existing examples, they user objectManager in .phtml file which is not a good practice. I'm wondering if there is another way.
This is what I have done so far:
1.) Create a CMS page through the admin panel
2.) Create  .phtml file in app/design/frontend/{Vendor Theme}/{Theme name}/Magento_Catalog/templates/add-to-cart-custom.phtml
3.) Call the block in CMS page {{block class="Magento\Framework\View\Element\Template" template="Magento_Catalog::add-to-cart-custom.phtml" product-sku="VVXL10"}}
I want to pass product-sku and display the buttons using the product-sku, how can I achieve this?
Thank you.


texts: Magento 2 : Category products dynamic rules get scope between 10% and 20% discount

texts:
We have a category where we need to add all products from another category with between 10% and 20% discount. The problem is that some of the products have a special price AND a price-rule which overrule the special price.

Let say we have a cup with a price of 100$ and a special price of 80$ the discount is 20% but the products have an applied price rule which gives a 30% discount on the price.

The cup should appear on our 30% category and not the 20% category. How do we do that?


texts: create new orders does not work in magento

texts:
I use Magento 1.7 , when i click to "create new orders", it shows error [see image below- Error 1]. Also when i click "view" to see my old orders which are pending it shows different error. [see image below- Error 2]

thanks in advance.


texts:
I enable ssl certificate, then my site not loading.
I enable secure url from admin before ssl enabled. and also change core_config_data web/unsecure/base_url and web/secure/base_url to https://

What is the issue?here attach screenshot


texts:
I just wanted to find out if the there is a upgrade path to follow when upgrading a Magento 2 store via composer?

Example:
if I want to upgrade my magento 2 store from v2.0.18 open source to v2.3.1 open source, is it fine to directly upgrade to the latest version or should I upgrade to v2.1.0 first then to v2.2.0 then to v2.3.1 ?

Thanks in advance


texts: How to add a attachment to an email -Magento 2

texts: Does anyone know how to add an attachment to an email , The add attachment method in the transport builder is deprecated.


texts: 3rd party access to Magento CE downloadable products

texts:
Having migrated from a legacy system to Magento, I would like to allow access data on my magento store from an:

iOS app
Android app
Web app

for the following:

Product details inc image (straight-forward)
Downloadable product link so we can sell our products as inapp purchases via our existing ios/android apps our users already use (currently connected to legacy system for this purpose) and also potentially make this same api available to other 3rd parties wishing to sell our products
Most important is the functioning of the apps. Fulfilment of the sale would not be via Magento just data access.

Having looked at the documentation, it appears that REST (preferred) does not support this, but SOAP might http://www.magentocommerce.com/api/soap/catalog/catalogProductDownloadableLink/product_downloadable_link.list.html.

I would like to provide an api where 2 or 3 calls can achieve the above to make integration into a 3rd party app easy and REST would be best.

Are there any extensions or alternative products out there which could fulfill this need or should I focus on working with the SOAP api (no expertise there) or should I look at ways to simply connect directly to the underlying mysql database to retrieve the relevant data.


texts: Custom SQL for Reporting on catalogsearch_query Table

texts:
I'm having trouble writing a query for grouping and concatenating query IDs on Magento's catalogsearch_query table.

Summary: Can I "CONCAT" results of a GROUP_CONCAT?

Here's what I have:

SELECT
  DISTINCT query_text,
  store_id,
  GROUP_CONCAT(query_id ORDER BY query_id) AS queries
FROM catalogsearch_query
GROUP BY query_text
HAVING queries like '%,%'
ORDER BY query_text

Its purpose is to identify potentially duplicate entries on the table by returning unique results per query_text value across all stores. Here's a sample of my output:

*************************** 12597. row ***************************
query_text: blue shirt
  store_id: 5
   queries: 2332223,2332233
*************************** 12598. row ***************************
query_text: blue shirt
  store_id: 11
   queries: 2202093,2202103
*************************** 12599. row ***************************
query_text: hat
  store_id: 5
   queries: 2458333,2458343
*************************** 12600. row ***************************
query_text: hats
  store_id: 5
   queries: 2207433,2207443

So you can see that, per record, I have a list of queries values. What I want to do now is concatenate those values into a single resulting value, so that my result set looks like this:

*************************** 1. row ***************************
   queries: 2332223,2332233,2202093,2202103,2458333,245834,2207433,2207443

My goal would be to leverage this as part of a DELETE operation where these duplicates are removed. But the structure of my query does not allow for that in SQL. I realize that I can write a script to parse the results and build a new query to remove records, but I want to accomplish this purely with SQL as a self-learning point.

(note: I would be adding to the delete query a date range, so that results are based on records which have an updated_at value of prior to 2014).


texts:
I'm getting really frustrated with the tax settings within Magento 2.2.2

I have added products with a price, in the tax settings I set the setting to "Prices in catalog are within tax" also I set, show catalog prices incl. tax. But it keeps adding the tax to the product anyway.


texts: Why sequence_order_1 has many useless data

texts:
I used magento 2.1.5.

And I found the order increment id is not continuous.

Order increment id, increment to 75.

But the order id only 19.

So, why sequence_order_1 has many useless data?

Supplementary explanation

I used magento 2.1.5 to build a website.

I found that my order ID is not continuous, there will be an indefinite number of cross.

For example, the current order from the ID is 0000052, the next one is 0000062. Why is this?

I see through the phpmyadmin data table found, sequence_order_1 in the data will be a lot of useless.

My question is why the table(sequence_order_1) will be so abnormal.

thanks


texts: Where in mysql i can change language to default (eng)?

texts:
I change default language in user settings, and style CSS is broken.
Also i cant change it back - button "save" not work.

Where in mysql i can change language and how.

thanks


texts:
How to get url parameter : at this file
app/code/Vendor/Module/Model/ResourceModel/Module/Grid/Collection.php

My Url is like this
http://192.168.2.215/mtheme/admin/vendor_module/index/details/id/1/

i want to get ID in the collection.php
how to achieve same,
thanks,


texts: Magento 2 - Need to fetch all available Order statuses using REST API

texts:
There is REST API endpoint for specific order statuses

GET    /V1/orders/:id/statuses

Reference: https://devdocs.magento.com/guides/v2.3/rest/list.html

But I am looking for approach to fetch all available order statuses using REST API because I am working on external system in which I need to fetch the required magento data.

Any help, experience and knowledge sharing would be appreciated


texts: Configurable product price not changing. Help with Jquery conflict

texts:
I have set up my simple products for my configurable product to change the price based upon size. It is working and adds to the cart at the correct price, but the price doesn't change dynamically on the product page.

Here is the page to view it.

I do see a lot of JQuery errors on the Inspect console of Chrome. This is admittedly an area of weakness in my dev game, so can anyone help me to resolve the conflict?

I think it's with the Olark chat, but I'm really excited to learn more about this and fixing this seems as good a time as any.


texts: How do the changes to the frontend in magento 2.1

texts:
How do the changes to the frontend
For example, I want to make a new or Heder or Checkout or Search or Catalog...

What are the files and paths to allow me to amend the files?


texts: is there a way to rebuild /downloader/cache.cfg?

texts:
I have quite a messy installation on hand, that i would like to clean up.

the original installation has been updated and the package information in Magento Connect don't mirror the actual content of the installation. I now want to remove some extensions.

The obsolete extension files that need to be removed are stored in the package.xml file that comes with the extension, so my thought was to put this file into /var/package and remove the extension via Magento Connect.

Problem is, that Magento Connect doesn't recognize *.xml files I put there. I know that the information displayed in MC are stored in /downloader/cache.cfg. When I delete this file, the list of installed packages in MC is empty.

Is there a way to rebuild this list from the *.xml files stored in /var/package?