texts: Remove controller name and action from custom route

texts:
In Magento 2:

I Want to change this route/URL in myproject
from
http://myproject.com/customstyle/index/index/parameter/paravalue

to
http://myproject.com/customstyle/parameter/paravalue

This is a custom Url

I have added the route in XML file i.e routes.xml

          <route id="customstyle" frontName="customstyle">
              <module name="modulename"/>
          </route>

n i have a layout file customstyle_index_index.xml where the template file is included.

/app/vendor/module/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\Framework\App\RouterList">
  <arguments>
      <argument name="routerList" xsi:type="array">
          <item name="customstyle" xsi:type="array">
              <item name="class" xsi:type="string">vendor\module\Controller\CustomStyle</item>
              <item name="disable" xsi:type="boolean">false</item>
              <item name="sortOrder" xsi:type="string">22</item>
          </item>
      </argument>
  </arguments>
 </type>
 </config>

Created the app/vendor/module/controller/CustomStyle.php

   namespace vendor\module\Controller;

    class CustomStyle implements \Magento\Framework\App\RouterInterface
    {
        protected $actionFactory;
        protected $_response;
        public function __construct(
            \Magento\Framework\App\ActionFactory $actionFactory,
            \Magento\Framework\App\ResponseInterface $response
        ) {
            $this->actionFactory = $actionFactory;
            $this->_response     = $response;

        }
        public function match(\Magento\Framework\App\RequestInterface $request)
        {

            $identifier  = trim($request->getPathInfo(), '/');
            $identifiers = explode('/', $$identifier);
            if (strpos($identifier, 'customstyle') !== false && count($identifiers) == 3) {
                $request->setModuleName('customstyle')->//module name
                    setControllerName('index')->//controller name
                    setActionName('index')->//action name
                    setParam($identifiers[1], $identifiers[2]); //custom parameters
            } else {
                return false;
            }
            return $this->actionFactory->create(
                'Magento\Framework\App\Action\Forward', ['request' => $request]
            );
        }

    }


texts:
I need to change all my product URLs and I would like to use a code snippet to use it. All I need is a simple code which is Magento 2 compatible and will change the URL for one product then saves it. I have this so far:

<?php
use \Magento\Framework\App\Bootstrap;
include('/var/www/html/app/bootstrap.php');

$bootstrap = Bootstrap::create(BP, $_SERVER);
$obj = $bootstrap->getObjectManager();
$deploymentConfig = $obj->get('Magento\Framework\App\DeploymentConfig');

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

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

$product = $objectManager->create('\Magento\Catalog\Model\Product')->load(2933);
$name = $product->getName();
print $name;
$url="new-product-url";
$product ->setUrlKey($url);
$objectManager->get('\Magento\Catalog\Model\Product')->save($product);
#$product->save();
?>

The code goes as far as the URL change then it fails with:

PHP Fatal error:  Uncaught Magento\Framework\Exception\LocalizedException: Area code is not set in /var/www/html/vendor/magento/framework/App/State.php:153
Stack trace:
#0 /var/www/html/vendor/magento/module-catalog/Model/Product.php(2415): Magento\Framework\App\State->getAreaCode()
#1 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Catalog\Model\Product->getIdentities()
#2 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Model\Product\Interceptor->___callParent('getIdentities', Array)
#3 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Model\Product\Interceptor->Magento\Framework\Interception\{closure}()
#4 /var/www/html/generated/code/Magento/Catalog/Model/Product/Interceptor.php(52): Magento\Catalog\Model\Product\Interceptor->___callPlugins('getIdentities', Array, Array)
#5 /var/www/html/vendor/magento/framework/App/Cache/Tag/Strategy/Identifier.php(25): Magento\Catalog\Model\Product\Interceptor->getIdentities( in /var/www/html/vendor/magento/framework/App/State.php on line 153

I am unsure why would I be defining any area codes when I am only changing a product not an order or a customer?!


texts: show html if products in the cart belong to a specific category

texts:
So I'm trying to show some html code on my order confirmation page IF
the products in the cart belong to a certain category. To clarify there are only two different categories and the user can only chose one of them, so all the products in the cart will be part of the same category.

I have tried this:

<?php
   $categoryId = 426;
$quote = Mage::getSingleton('checkout/session')->getQuote();
?>
     <?php if($quote->hasCategoryId($categoryId)): ?>
          <p>show text blah blah </p>
     <?php endif; ?>

But the text doesn't show even though all the products in the cart are from this category.
Any ideas how to do this or what I did wrong?


texts:
My webshop ships products every workday and evening except for saturdayevening. The problem is my customers can still click on evening delivery when they choos for a delivery on saturday. I want to disable that feature but I don't know how.
If anyone encountered the same problem please help.
Thanks in advance!


texts: Because in Magento 2.1.3 the category_after_save event is missing I created a afterExecute plugin for the category save plugin. If I save a existing category the request contains the entity_id, but if I create a new one the entity_id does not exist in the post parameters. Is there an other way to get this id?


texts:
I'm trying to create a shopping cart rule where free shipping will be given to certain products provided they have an inventory qty greater than 1.

Quantity (qty) is not a visible attribute in the attributes manager so I cant set it to use for promotion rules.

How do you enable the attribute inventory qty to be available for shopping cart rules?


texts: Module 'Magento_MsrpSampleData': [ERROR] while reinstalling magento 2

texts:
Getting error while installing
Module 'Magento_MsrpSampleData':
[ERROR] Magento\Framework\Setup\Exception: Rolled back transaction has not been completed correctly. in C:\xampp\htdocs\magento\vendor\magento\framework\Setup\Patch\PatchApplier.php:167
Stack trace: #0 C:\xampp\htdocs\magento\setup\src\Magento\Setup\Model\Installer.php(1002): Magento\Framework\Setup\Patch\PatchApplier->applyDataPatch('Magento_MsrpSam...') #1 C:\xampp\htdocs\magento\setup\src\Magento\Setup\Model\Installer.php(874): Magento\Setup\Model\Installer->handleDBSchemaData(Object(Magento\Setup\Module\DataSetup), 'data', Array) #2 [internal function]: Magento\Setup\Model\Installer->installDataFixtures(Array) #3 C:\xampp\htdocs\magento\setup\src\Magento\Setup\Model\Installer.php(367): call_user_func_array(Array, Array) #4 C:\xampp\htdocs\magento\setup\src\Magento\Setup\Controller\Install.php(109): Magento\Setup\Model\Installer->install(Array) #5 C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\Controller\AbstractActionController.php(84): Magento\Setup\Controller\Install->startAction() #6 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent)) #7 C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(490): call_user_func(Array, Object(Zend\Mvc\MvcEvent)) #8 C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(260): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure)) #9 C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\Controller\AbstractController.php(118): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent)) #10 C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\DispatchListener.php(118): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response)) #11 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent)) #12 C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(490): call_user_func(Array, Object(Zend\Mvc\MvcEvent)) #13 C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(260): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure)) #14 C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\Application.php(340): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent)) #15 C:\xampp\htdocs\magento\setup\index.php(39): Zend\Mvc\Application->run() #16 {main}


texts: How to Change Page Title for Product Page

texts:
I'd like to add a product's designer as part of the title on the product page.
I tried changing app/design/frontend///Magento_Theme/templates/html/title.phtml and added a sample designer name under it, and it appeared on the product page. However, it also appeared on other pages, such as "About us", and I don't know how to dynamically give it the name of the product's designer (a product attribute).
I figure that title.phtml gets its title from $block->getPageHeading(), which is in vendor/magento/module-theme/Block/Html/Title.php, which also gets its title from somewhere else, so how do I make it so this method also returns a product attribute of my choice?


texts:
Using magento from:

  -> Stores -> Configuration -> General -> Locale

Options, i can select the language from my country(Angola-Portuguese).

But using Magento command line for exemple: php bin/magento setup:static-content:deploy pt_AO -f

i get this error:

  pt_AO argument has invalid value, please run info:language:list for
  list of available locales

And running this command :  php bin/magento info:language:list
i can't find the language of my country (Portuguese - Angola).

What i'm doing wrong with mi website ?


texts:
I am trying to use newsletter promotion extension provided at GIT

https://gist.github.com/drewgillson/3009236

Ref for creating promotion condition: http://marius-strajeru.blogspot.ca/2010/04/create-bulk-discount-rules.html

Here I am trying following code for condition

   $conditions['1--2'] = Array
(
'type' => 'salesrule/rule_condition_product_found',
'value' => 0,
'aggregator' => 'all',
'new_child' => '',
);

$conditions['1--2--1'] = Array
(
'type' => 'salesrule/rule_condition_product',
'attribute' => 'special_price',
'operator' => '<',
'value' => '0',
);

Above code is not working if I try valid attribute code ( second condition ) like 'special_price', 'sku' or 'price'

But if I misspell attribute then it generate promotion rule only attribute is missing from it.

I don't know why attribute is not selected except everything else....


texts: Magento 1.9.3.7 Fedex shipping method not working

texts:
I have been battling with a client's magento store, all other shipping methods are working correctly but FedeX shipping method is not working, both at the back-end and front-end. It keeps giving the error message: "This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us."
I have tried different things (including rolling back the whole store to a day that everything was fine) in an attempt to resolve the issue but with no success.

I checked the var/log file and found the following:

[request] => Array
        (
            [WebAuthenticationDetail] => Array
                (
                    [UserCredential] => Array
                        (
                            [Key] => 720LsKGjPnK6nhZh
                            [Password] => wchEHJ9GClXDcYdw13lWrHq6W
                        )

            )

        [ClientDetail] => Array
            (
                [AccountNumber] => adetclement
                [MeterNumber] => 250017020
            )

        [Version] => Array
            (
                [ServiceId] => crs
                [Major] => 10
                [Intermediate] => 0
                [Minor] => 0
            )

        [RequestedShipment] => Array
            (
                [DropoffType] => BUSINESS_SERVICE_CENTER
                [ShipTimestamp] => 2020-06-02T12:58:01+00:00
                [PackagingType] => YOUR_PACKAGING
                [TotalInsuredValue] => Array
                    (
                        [Amount] => 95.99
                        [Currency] => USD
                    )...

I noticed that the [AccountNumber] => adetclement and [MeterNumber] => 250017020 are not the correct details of FedEx account, I'm not sure if that is normal to happen.

And at the end of the file there is error message saying authentication failed, as shown below:
 [result] => stdClass Object
        (
            [HighestSeverity] => ERROR
            [Notifications] => stdClass Object
                (
                    [Severity] => ERROR
                    [Source] => prof
                    [Code] => 1000
                    [Message] => Authentication Failed
                )

        [Version] => stdClass Object
            (
                [ServiceId] => crs
                [Major] => 10
                [Intermediate] => 0
                [Minor] => 0

I'm still battling with this, someone that has dealt with this kind of issue before should please help. Thanks


texts: How to add promotional banners in magento 2.1

texts: help to add promotional blocks or banners in Magento 2.1 thank you


texts: Magento2-How add multiple tabs in customer edit page and listing there in grid?


texts: Custom REST API returns duplicate "response" tag

texts:
I am struggling because I get an invalid response from my custom API module for Magento 2 (2.2.5). When I send a request to my endpoint via GET with the header "Accept application/xml" (which is totally valid for Magento 2) I get my XML reponse. However, the surrounding <response> tag pops up twice and I can't get rid of the second one. Here is a sample result:

<response>
    <test>value</test>
    <response/>
</response>

Problem here is the <response/> in line 3. Where does this come from/how can I get rid of this?

I'll only point out the most important files since the rest is just bare standard. For testing purposes I set the resource to anonymous (it's local so no worries here).

webapi.xml:

<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route url="/V1/xmlorderexport/get" method="GET">
        <service class="Vendor\XmlOrderExportApi\Api\XmlInterface" method="get"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>
</routes>

Api/XmlInterface.php:

<?php

namespace Vendor\XmlOrderExportApi\Api;

interface XmlInterface
{

    /**
     * Returns order data as XML.
     *
     * @api
     * @return string Returns the order as XML based on the given template.
     */
    public function get();
}

Model/Xml.php:

<?php

namespace Vendor\XmlOrderExportApi\Model;

use \Vendor\XmlOrderExportApi\Api\XmlInterface;
use \Vendor\XmlOrderExport\Model\WebapiInterface;
use \Magento\Framework\Webapi\Rest\Response\Renderer\Xml as Renderer;

class Xml implements XmlInterface
{

    private $webapi;

    private $renderer;

    function __construct(
        WebapiInterface $webapi,
        Renderer $renderer
    )
    {
        $this->renderer = $renderer;
        $this->webapi   = $webapi;
    }

    /**
     * Returns order data as XML.
     *
     * @api
     * @return string Returns the order as XML based on the given template.
     */
    public function get()
    {
        /**
         * Only for testing purposes!
         */
        //$order_id = 194;

        //$result = $this->webapi->getXml($order_id);
        //$xml    = simplexml_load_string($result);

        $this->renderer->render(['test' => 'value']);
    }
}

Can anybody help me out and point me in the right direction please?

Thanks in advance ...


texts: No .htacess file in my pub/static folder

texts:
I've received built website to continue working on. sometimes I got some unexpected behavior, So I decided to delete content of pub/static folder and deploy it again. When I opened it I didn't find .htaccess file inside it and storefront has no problem.

How can pub/static folder doesn't contain .htaccess and there is no problem.


texts: How to copy a product's attributes value to another attribute?

texts:
i want to copy a product's attribute (weight) to another atribute (general_weight).

i found this codes, but i don't know what to do with this codes? or where to copy them?

    $prod=Mage::getModel('catalog/product')->load($id);

    $val=$prod->getData('attribute_code');

assign the values to another attribute of that product with this code

    $prod->setAttreibuteCode($val);

    $prod->save();

i will thankful if you experts help me and explain by details.

  ** i want weight attribute value to be copied into general_weight always on product save.


texts: Magento: Product Catalog Images Not Upload


texts:
I am attempting to create my first Magento 2 theme.

I have created a new theme here:

/app/design/frontend/MyComp/MyTheme/

I copied the blank theme from /vendor/magento/theme-frontend-blank/ into MyTheme and then I created/edited various files, as per the instructions here.

In the Admin Panel I have gone into Stores > Configuration > Design and Ive set the theme to MyTheme.

However the front end it appears that my new theme isnt being used.

When I enable template path hints from the Admin Panel, the frontend shows that all the files are being got from here /vendor/magento/module-theme/view/frontend/templates/ instead of /app/design/frontend/MyComp/MyTheme/.

Can anyone explain why Magento 2 is ignoring my theme, and how I can fix this?

Many thanks in advance.


texts: Magento ver. 2.2.3 can't create order from backend

texts:
From the backend when I try to place a new order and when I try to add new products, I'm getting following error

PHP Fatal error:  Uncaught Error: Call to a member function checkData() on null in /public_html/vendor/magento/module-sales/Model/AdminOrder/Create.php:1046
Stack trace:
#0 /public_html/vendor/magento/module-sales/Model/AdminOrder/Create.php(1063): Magento\Sales\Model\AdminOrder\Create->addProduct(Object(Magento\Catalog\Model\Product\Interceptor), Object(Magento\Framework\DataObject))
#1 public_html/vendor/magento/module-sales/Controller/Adminhtml/Order/Create.php(229): Magento\Sales\Model\AdminOrder\Create->addProducts(Array)
#2 public_html/vendor/magento/module-sales/Controller/Adminhtml/Order/Create.php(134): Magento\Sales\Controller\Adminhtml\Order\Create->_processActionData()
#3 public_html/vendor/magento/module-sales/Controller/Adminhtml/Order/Create/LoadBlock.php(55): Magento\Sales\Controller\Adminhtml\Order\Create->_processData()
#4 public_html/generated/code/Magento/Sales/Controller/Adminhtml/Order/Cre in public_html/vendor/magento/module-sales/Model/AdminOrder/Create.php on line 1046

and in front, I'm getting following JS error.

POST https://test.test.com/admin/sales/order_create/loadBlock/key/9ef9328c45ba526d9cfffa10c9da9390cb3aa4e17a4b72c2c9fd1556b64432ec/block/search,items,shipping_method,totals,giftmessage,billing_method?isAjax=true 500 ()

I've made no changes to this process not even added in other modules for that.


texts: password doesn´t match after patch SUPEE 10415

texts:
I get an error message after applied the patch SUPEE-10415

At checkout as guest, trying to create a new customer account doesn't work.

Using a custom theme from template monster.


texts: Magento 2.2.2 admin Shippings action View Warning: Invalid argument supplied for foreach()

texts:
I am getting this weird one When an shipping is created then navigating to Shippings

I the Action column when click view I get the error:

  1 exception(s):
  Exception #0 (Exception): Warning: Invalid argument supplied for foreach() in ../../../../htdocs/vendor/magento/module-shipping/view/adminhtml/templates/order/packaging/packed.phtml on line 12

I looked at the packed.html  and this is the line

<?php foreach ($block->getPackages() as $packageId => $package): ?>

I debug by:

print_r(gettype($block->getPackages())); RETURNS string
print_r($block->getPackages()); RETURNS []

I am really confused I got dev environment which works fine and they return:

print_r(gettype($block->getPackages())); RETURNS array
print_r($block->getPackages()); RETURNS Array()

There is definitely a difference there but what caused this not sure

Looking at teh:

Magento\Shipping\Block\Adminhtml\Order\Packaging
public function getPackages()
{
   return $this->getShipment()->getPackages();
}

PhpStorn inspection definitely complaint about return string when should return array Anyone have any idea is this a bug?


texts: Can Magento be configured to ship multi cartons?  As an example, If I want to ship 4 cartons each weighing 5 pounds, I need to feed to FedEx that the weight of the order is 20 lbs but it is distributed over 4 cartons.  Our developer is telling us that standard Magento will only use 1 carton which will not give us the correct cost.


texts: how to get all credit memo items in magento 2

texts: how to get all credit memo items in magneto 2


texts:
I need to hide the sidebar in the page search result.

In file local.xml and catalogsearch.xml there is

<catalogsearch_result_index translate="label">
        <reference name="root">
            <action method="setTemplate">
                <template>page/2columns-left.phtml</template>
            </action>
        </reference>

    </catalogsearch_result_index>

i have changed this in

<catalogsearch_result_index translate="label">
        <reference name="root">
            <action method="setTemplate">
                <template>page/1column.phtml</template>
            </action>
        </reference>

    </catalogsearch_result_index>

but the sidebar remain also "The search returned no results"
I have tried also with

<remove name="left"/>

but "The search returned no results".

Another solution?
Thanks
Ale


texts: Magento 1.9 Impossible to log in on backend, said to be because of hosting space limitations. Is this true?


texts: Someone sends a link to a product - 404 page

texts: If someone sends me a link of a product from my 1.9.3.9 webstore and I open it on my computer, I get a 404 page. When I refresh it, the product page appears correctly. URL stays the same before and after refresh. No URLs changed. What could be the problem?


texts: Show error message on shipping method if not applicable in Magento 2

texts:
I have developed custom shipping module. Now I want to show error message on shipping module if anything wrong like city, state, phone number etc.

I follow this link to create shipping method: https://www.mageplaza.com/magento-2-create-shipping-method/

How do I achieve this?


texts: How can get custom table columns on product listing page using product_id of the custom table

texts:
On product listing page, I need to show visitor nearest product first.

I've a marketplace site and each product have different seller and there is a custom table having seller_id and product_id column.

Here is the structure screenshot of my custom table:-

So how can i get the seller id of each product on product lsiting page so that i can dispay nearest product first?I'm trying to use joins based on product_id on product collection here:-

Class:- vendor/magento/module-catalog/Block/Product/ProductList/Toolbar.php

Method:- setCollection()

But seems,there is some problem in the joining due to which filter is not working.

My Join Code:-

$collection->addAttributeToSelect('*');
$joinType = "inner"; // join type
$where = ""; // put condition
$fields = "*"; // fields
$collection->joinTable(
            ['custom' => 'marketplace_product'],
            'custom.mageproduct_id = e.id', //also tried "entity_id" instead of "id"
            $fields,
            $where,
            $joinType
        );

        echo $collection->getSelect() ; exit;

 Not printing anything on listing page.

So please let me know the code so that i can use the join and get the seller_id and then i can calculate nearest one.

UPDATE:-

After using like that:-

 $joinConditions = 'ust.mageproduct_id = e.entity_id';

                         $this->_collection->getSelect()->join(
                ['ust' => $this->_collection->getTable('marketplace_product')],
                $joinConditions,
                []
            )->columns("ust.seller_id");

Joining is working fine but now I'm getting "You cannot define a correlation name 'ust' more than once" problem so please help me to resolve this problem.

Waiting for your reply!

Thanks!!!


texts: Initialize a server side initialized section

texts:
I am loading some modules into a page with requirejs thats not served by magento but lives under same domain so I can access localStorage. I can load cart data there as it is client side initialized. However I also want to initialize "account" section upon page load. It is server side rendered on magento pages.

Is there a common way to initialize any section on client side?


texts: Attempted exploit via Catalog Advanced Search?

texts:
I just noticed a few suspicious crash reports on my site for someone accessing the "Catalog Advanced Search" page.  However, that link is not exposed anywhere on my site, so someone is accessing a known Magento URL and perhaps attempting some kind of exploit via that URL?

I have all the latest patches, are there known exploits using the Advanced Catalog Search?

I don't know if that URL is used under the covers at all by the Magento implementation, would it be safe for me to do a 403 redirect in my .htaccess for that URL?

Update: Someone suggested it would be useful to know the URLs of the strange requests I'm seeing.  I looked at the error reports and there were nine request during the same second that all resulted resulted in the same exception:

SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Here are the requests...

  /shop/catalog/product_compare/add/product/16/uenc/aHR0cDovL3d3dy5waWNrbC1pdC5jb20vc2hvcC9jYXRhbG9nc2VhcmNoL2FkdmFuY2VkL3Jlc3VsdC8_bW9kZT1saXN0/
  /shop/catalogsearch/advanced/result?description=1&jars=1&name=..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%afetc/passwd&size[]=8&price[from]=1&price[to]=1&short_description=1&sku=1&tax_class_id[]=0&width=1
  /shop/catalogsearch/advanced/result?description=1&jars=1&name=sekinchw&size[]=result&price[from]=1&price[to]=1&short_description=1&sku=1&tax_class_id[]=4&width=1
  /shop/catalogsearch/advanced/result?description=966869&jars=1&name=seehlqve&size[]=8&price[from]=1&price[to]=1&short_description=1&sku=1&tax_class_id[]=0&width=1
  /shop/catalogsearch/advanced/result?description=
  /shop/catalogsearch/advanced/result?description=1&jars=1&name=cpdqfrdc&size[]=9&price[from]=1&price[to]=1&short_description=1&sku=1&tax_class_id[]=2&width=1
  /shop/catalog/product_compare/add/..%5c..%5c..%5c..%5c..%5c..%5c..%5c..%5cwindows%5cwin.ini/17/uenc/aHR0cDovL3d3dy5waWNrbC1pdC5jb20vc2hvcC9jYXRhbG9nc2VhcmNoL2FkdmFuY2VkL3Jlc3VsdC8_ZGlyPWFzYyZvcmRlcj1uYW1l/
  /shop/catalogsearch/advanced/result?description=1&jars=1&name=obioeuth&size[]=8&price[from]=1&price[to]=1&short_description=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))&sku=1&tax_class_id[]=4&width=1
  /shop/catalogsearch/advanced/result?description=1'%22&jars=1&name=seehlqve&size[]=8&price[from]=1&price[to]=1&short_description=1&sku=1&tax_class_id[]=0&width=1


texts:
In my layout, I have this string:

<block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">

But I do not have a file in this package in this way.

But at the same time the code is executed in: /gamma/template/broadway/catalog/product/view.phtml

Why? Also in the documentation all examples with local.xml are written, but I have 2 layouts with different names. We can call our layout as we want?


texts: Which is this multi vendor panel in magento?

texts:
I want to extend magento to market place. I come across one vendor panel for magento
You can video here
http://www.youtube.com/watch?v=6U660bv3ACg

Anybbody know which marketplace / extension is this?


texts:
I have a multi-store setup with the german domain running on .de and the english on .com.

Now I need to move them both together to the .com domain utilizing the store codes in the urls.

www.example.de -> www.example.com/de/
www.example.com -> www.example.com/en/

The magento setup itself runs fine. What I have issues with is to redirect the existing urls (from google) to their new location:

www.example.de/category.html -> www.example.com/de/category.html
www.example.com/category.html -> www.example.com/en/category.html

So I setup a simple test site (not magento) only to create the proper htaccess rewrite rules. This is what I figured out and it works as expected:

RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} ^www.example.de$ [NC]
RewriteCond %{REQUEST_URI} !de/
RewriteRule (.*) /de/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteCond %{REQUEST_URI} !en/
RewriteRule (.*) /en/$1 [R=301,L]

When I put this into my magento .htaccess things get weird though.

Of course there are more magento specific rewrites in there. The complete list of rules are these:

RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} ^www.example.de.dev$ [NC]
RewriteCond %{REQUEST_URI} !de/
RewriteRule (.*) /de/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^www.example.com.dev$ [NC]
RewriteCond %{REQUEST_URI} !en/
RewriteRule (.*) /en/$1 [R=301,L]

RewriteRule ^api/rest api.php?type=rest [QSA,L]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* /index.php [L]

Those extra rules are all from a default magento installation.

When I access https://www.example.com I end up at https://www.example.com/en/index.php with a browser error (endless redirect).

How to get this right?

Thank you


texts: How to update existing product category from csv programmatically in Magento?

texts:
Can anyone help me?

I have 100 product where category is blank.

Now I want to insert new category for those products via csv programmatically.


texts: how to import upsell products magento 2?

texts:
Actually i am trying to import upsell products magento 2? is there any
  way to import upsell products.

  But this way it is not working in magento 2

  below is the solutions for it


texts: How to check if product in cart is on sale (has a special price)?

texts: I'm trying to add an icon to all products with special price in a cart and I've to check if products are on sale. Anyone got any idea how to do it? It was simple to do in list and product cart but now I'm stuck.


texts: How to Prevent Negative Stock Qty Value In Magento?

texts: How do I prevent product stock qty value showing negative values in admin? I have set Backorders to "No Backorders" but still it's showing negative values. can anybody please help me on this. Thanks


texts:
I'm trying to get the category name in a block for the home page
so that when the visitor changes the language, the name of the category will translate depending on the selected language, like with the top menu.

I search for it and all I found is have to be done in .phtml file
Is there any way to do it in a block?


texts:
Magento2 loading products from external source with a cron job

I'm loading catalog products from external source to my Magento website for that i have wrote 2 processes (2 separate cron jobs).

1st Process : Loads all the products(approx 500+) from external source(with soap) into magento custom table.

2nd Process : At a time this will read first 10 products from the custom table and then it will create csv file with this 10 products and then import csv into Magento catalog . if this process completed successfully then it will delete this 10 records from the custom table . And then this should initiate next run as separate thread This process goes on till custom table becomes empty.

Here 2nd process connected with 1st process  ,so i need to setup cron job once 1st process(1st cron) completed then it should start initiating 2nd process(could be 2nd cron).

Suggest me how this can be achieved  ?


texts: How can I give first time customers a discount on their next order?

texts:
The conditions would be:

1) customers only

2) One time use only

3) must have previous order

#1 and #2 are straight forward, but what is a good approach to only giving this to customers that have placed an order?


texts:
I tried for hours.. Even changed vendor files (from Zend framework).
How in this world can I change the country name "France", in address, to "France métropolitaine", in Magento 2?
I tried  i8n, database, vendor files ( Yes, it's bad, but still, does not work).
Of course, I did flush cache severa times, and even setup:upgrade / compile / content deploy.
Any tips would be really appreciated.


texts: Fetching Cart info for an existing user using Magento SOAP API

texts:
How do I get the cart details of an existing user using Magento SOAP API?

I have an e-commerce Application based on Magento. There is already a desktop webpage for this e-commerce application. My use case is this -

-> User logs in from desktop webpage and then adds an item to the cart -> User now logs in with the same credential from mobile

I want to be able to show the item that is being added from the desktop page. But right now I don't see any SOAP API which helps me query any existing cart info for a user.

Note: I am trying this from an Android Application. So please suggest anything that I can with the SOAP API's


texts: Custom attribute not appearing in EAV table

texts:
I've created a custom product attribute of type text.

When viewing the catalog_product_entity_varchar table, I'm slowly but surely noticing these records being inserted into that table (if I save new products, edit & save existing products etc.).

My question is this:

Why has Magento not created NULL values for all products in my catalog for this attribute?
I did choose to Used in Product Listing = Yes.


texts: add query parameters to an existing url string

texts:
In Magento if I have a URL string, is there any built in function that I can use to add query parameters to it?

In the exact case I am looking at I am generating a category URL and then I want to add a set of query parameters on top of it.

I am doing the following:

$categoryUrl = Mage::getModel('catalog/category')->load(1)->getUrl();

I want to then add the following query parameters:

array('param1' => 'myparam1','param2' => 'myparam2');

I then want to end up with:

http://mysite.com/mycategory.html?param1=myparam1&param2=myparam2


texts: I have an extension that is giving me an endless loop, and I can't figure out the cause. I tried to follow this (Fundamentals for debugging a Magento store) but can't understand how to do it ? Can anyone help me ?


texts:
I'm trying to edit customer data in bulk (a couple of thousand records) and Magento keeps running out of available memory to run the script.

After some testing with memory_get_usage() the culprit seems to be the $customer->save() method which seems to take 5M of memory for each save but doesn't release it when done.

As a result, when looping through a couple of thousand records it is running of memory.

Here is what I've tried so far:

$customer->clearInstance()

unset($customer)

This doesn't seem to help though.

Below is my code:

public function createCustomerAddress($customerAddressData, $email){
     $customer = Mage::getModel('customer/customer');

     $customer->setWebsiteId(Mage::app()->getWebsite()->getId());
     $customer->loadByEmail($email);

     $address   = Mage::getModel('customer/address');

     $address->addData($customerAddressData);
     $customer->addAddress($address);
     unset($address);
     try{
         $customer->save();
     }catch (Exception $e){
         var_dump($customerAddressData);
         var_dump($e->getMessage());
     }
    echo "\n" . "Before unsetting \n" . memory_get_usage() . "\n";
    $customer->clearInstance();
    unset($customer);
    echo "\n" . "After  \n" . memory_get_usage() . "\n";  // no difference than before
}

Any help would be greatly appreciated.

p.s. I'm not sure if the clearInstance() function (in the Mage_Core_Model_Abstract) does anything, if someone has some insight into this it would be greatly appreciated if its shared :)


texts: Add js file at the end of merged js file magento 1.9.3

texts:
I am using Magento 1.9.3. I merged js and CSS files.

I want to add order or if possible add js file at the end of the merged js file.

is this possible in merged js ?


texts: How to write magento 1.x config.xml to magento 2.0 config.xml?

texts:
i Had the magento 1.x config.xml file,i need that write into magento 2.0 structure.
For ex:

            2.0.0

<frontend>
    <layout>
        <updates>
            <FacebookComments>
                <file>socialshare/FacebookComments.xml</file>
            </FacebookComments>
        </updates>
    </layout>
</frontend>

<adminhtml>
    <acl>
        <resources>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <facebookcomments translate="title" module="facebookcomments">
                                        <title>Social Share - Facebook Comments</title>
                                    </facebookcomments>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
</adminhtml>

<global>
    <resources>
        <FacebookComments_setup>
            <setup>
                <module>SocialShare_FacebookComments</module>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </FacebookComments_setup>
        <FacebookComments_write>
            <connection>
                <use>core_write</use>
            </connection>
        </FacebookComments_write>
        <FacebookComments_read>
            <connection>
                <use>core_read</use>
            </connection>
        </FacebookComments_read>
    </resources>
    <blocks>
        <FacebookComments>
            <class>SocialShare_FacebookComments_Block</class>
        </FacebookComments>
    </blocks>
    <helpers>
        <facebookcomments>
            <class>SocialShare_FacebookComments_Helper</class>
        </facebookcomments>
    </helpers>
    <models>
        <facebookcomments>
            <class>SocialShare_FacebookComments_Model</class>
        </facebookcomments>
    </models>
</global>

<default>
    <facebookcomments>
        <conf>
            <enabled>0</enabled>
            <posts>5</posts>
            <width>500</width>
            <colorscheme>light</colorscheme>
        </conf>
    </facebookcomments>
</default>

this above config.xml is magento 1.x,this file convert into magento 2.0 structure.


texts: magento2 admin : generate controller url for form action

texts:
On a Magento2 admin page (order/view) I added a form using phtml file with block. I would like to define my form action to my controller url : www.xxx.com/admin_toto/foo/bar/index

How can I generate this url ?

<form id="test" method="post" action="<?php echo ADMIN_URL.'foo/bar/index'?>">
    <?php echo $block->getBlockHtml('formkey');?>
    <input>...</input>
    <button type="submit">Update</button>
</form>


texts:
In various extension, I saw package.xml file but I did not use that. I want to know that should I use that or not ? Basically what is the need of package.xml in magento. I always found that it is placed on root of site.
But Confuse about use that. Is it Harmful for site if I place that on root?Should I also create package.xml while creating extension in magento ?


texts: Show different sidebar image for different categories

texts: I have 5 root categories and I want different left sidebar image for each category. I'm using Porto theme in which I can fix a static block in my left sidebar but then it cannot change the image according to category. Example: poster of tshirts in Fashion category and poster of headphone in Electronics category. I'm using magento 1.9


texts: Braintree custom fields - How to add product data

texts:
I am using the Gene Braintree module on Magento 1.9, and I am trying to add some additional data points to the custom fields so I can reconcile the transactions.

I would like to pass order#, product sku, and product description.  Their is limited data available about which API names you would use to make this happen.

This article explains how to add the field in Braintree: https://articles.braintreepayments.com/control-panel/custom-fields

Thanks


texts: Should I go for M1 certification now or wait for M2 certification?

texts: Should I go for Magento Developer Certification now or should I wait for the Magento2 certification?


texts: Magento 2 :Embed youtube video in modal pop up

texts:
I am using a modal pop up. I want to embed a youtube video and a field to enter the code in the pop up. I ahve already dispalyed some content in the pop up.

This is my phtml file

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

// @codingStandardsIgnoreFile
?>
<?php if ($block->isPossibleOnepageCheckout()):?>
    <button type="button"
            data-role="proceed-to-checkout"
            id="checkout-button"
            title="<?php /* @escapeNotVerified */ echo __('Proceed to Checkout') ?>"
            class="action primary checkout<?php echo($block->isDisabled()) ? ' disabled' : ''; ?>"
            <?php if ($block->isDisabled()):?>disabled="disabled"<?php endif; ?>>
        <?php /* @escapeNotVerified */ echo __('Proceed to Checkout') ?>
    </button>
<?php endif?>

    <?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('terms-conditions')->toHtml();?>
    <fieldset class="fieldset">

            <?php echo $this->escapeHtml(__('I have read the terms and conditions')); ?>

                <input type="checkbox" name="checkbox" id="checkbox" class="checkbox" title="<?php echo $this->escapeHtml(__('Terms')); ?>">

    </fieldset>

How is it possible to do the above mentioned. Please help.

Thanks in advance.


texts: Magento 2 - Insert Customer Vat Number in Invoice PDF

texts:
My customer would like to deliver a complete PDF Invoice according to italian law.

In every invoice should be indicated the customer's vat number.

Where and how can i insert this variable?


texts: Product Price + First Custom Option Price in products list?

texts:
We sell product which, for some of them, must include one option (which has a fixed price of, say, 50$)

On the product list views + on the product page we would like to show the price as : "Starting at " (Product Price + First Option Price) $

For ex :
- product price : 100$
- First custom option : 50$

==> "Starting at 150$" in list of products and product page (anywhere in front end site in fact)

Can this be done natively or via an extension ?

Thanks a lot


texts: How to upload Multiple Images Of same product using CSV FIle in magento 2.0?

texts:
I am Trying to upload Multiple image of same product in magento 2 using csv file. I am adding one image each on  base_image, small_image, and thumbnail_image and other remaining images on additional_images .But after importing it is giving an Error :-

  Imported resource (image) could not be downloaded from external
  resource due to timeout or access permissions,General system exception
  happened.

Any Suggestion?


texts: simple product image in kart with configurable swatches

texts:
first of all, please excuse me for my english, i will do my best to be understandable.

the issue is with the configurale swatches extend : I have configured everything as explained and it works well but I have no change of image in the kart.

Is it something known??

Is it a mistake from me?

Is there a solution?


texts: Magento Theme Fall-back / Hierarchy in the light of custom theme and third-party extensions

texts:
I've been looking into how Theme Fall-back / Hierarchy works since CE 1.4 and I think I've fairly well understood it.

Then I move a legacy theme (the names purple-mix and purple_theme following are exemplary) which had been put inside the legacy locations:

app/design/frontend/default/purple-mix
skin/frontend/default/purple-mix

Those files have now been moved into the more appropriate, namespaced and currenlty as best-practice suggested ones:

 app/design/frontend/purple_theme/purple-mix
 skin/frontend/purple_theme/purple-mix

This so far looks fine to me and is more or less just context of my question. It gets more interesting when I add magento extensions / modifications into the mix.

Some third-party plugins now have placed files into the old (and according to What About default/default? (Magento's Theme Hierarchy Changes in CEv1.4 and EEv1.8) deprecated) location (even that plugin for example is a Feb 2014 release).

If I read the documentation it's now the case, since the moment I activate the new theme purple_theme, the fall-back to default/default will not be triggered any longer. Is this correct?

And so I now wonder what is best to do. Should I duplicate (copy) all those files into my own theme's default directory (purple_theme/default)? Or should I move those files?

Or should I copy/move them into base instead (the extension files in question are within their own sub-directory, e.g. for the Payone plugin, it's skin/frontend/default/default/payone/core/mandate.css)? What would be recommended practice here?

From my own (so far limited view, I don't have that much Magento experience), I tend to moving those files into base/default so that every theme will benefit from the extensions changes (I also have the full tree under Git version control, so I'm sort-of relaxed that file-changes are easily tracked).

Also is it good practice to discuss this with extension developers? What are common guidelines to give to them?

I've seen Custom Package/Theme for Admin module that falls back to default package? which is about admin configuration (and version 1.8) so I'm not sure if it would apply for frontend as well (and if already since version 1.4).

I even think about having something like Magento Enterprise Theme Fallback (Sonassi) with the difference, that I don't want to have fall-back to frontend/enterprise/default but frontend/default/default. Via Theming - starting from scratch.

(Exemplary extensions that are in use: One-Step-Checkout, Payone and Customer-Credit; Currently on an outdated 1.4 version, as you can imagine this is also in the light of upcomming Magento upgrades)


texts:
I want to create QTY dropdown in minicart but only on mobile view. In dropdown exit 10,000 QTY . so how to add dropdown in minicart.
Thanks.


texts:
All extensions are disabled from the admin panel and the admin panel is empty.

How to enable it again?
In the app/etc/modules all are set as active=true

So is there a way to enable it from the database?


texts: How to override filters.js in to custom theme?

texts:
How to override
vendor/magento/module-ui/view/base/web/js/grid/filters/filters.js into custom theme?


texts: How to Fix: Show Sub-Category on Category page

texts:
I'm having issues with my coding, I'm trying to show my category's sub-categories thumbnails on the category page in all categoies.

The problem is that it's showing the same sub-category on different categories instead of just showing it into only its parent category.

CMS Block:

{{block type="core/template" template="subcategories.phtml" }}

.PHTML File:

<?php
$category = Mage::getSingleton('catalog/layer')->getCurrentCategory();
$categories = $category->getCollection()
        ->addAttributeToSelect(array('name', 'thumbnail'))
        ->addAttributeToFilter('is_active', 1)
        ->addIdFilter($category->getChildren())
?>
<?php foreach ($categories as $category): ?>
<a href="<?php echo $category->getUrl() ?>"><img src="<?php echo Mage::getBaseUrl('media') . 'catalog' . DS . 'category' . DS . $category->getThumbnail() ?>"/>
<?php endforeach; ?>

This his my website where I have it set up, navigate to one of the categories in the Header menu.


texts: Magento2 Security: How to best filter GET parameters before they reach Magento?

texts:
I want to increase the security of one of our Magento2 installations by filtering GET parameters. It seems that, according to our WAF, especially "filter" parameters are often tried to be exploited; for example:

/sweets/candies/natural-flavours.html?product_filter_tryout=1133%25%27%20UNION%20ALL%20SELECT%20NULL%2CNULL%23

This happens, no matter if filters are used on the website or not. I therefore want to block all requests to ?product_filter_tryout*, or better whitelist all actually used parameters on the site (like ?p=* etc.). How can I achieve this?


texts: Magento's admin scheduled backups makes multiple backups on the server

texts:
I have setup of Database daily backup every night at 12:30am, through Admin's System>Configuration>Advanced>System>Scheduled Backup Settings.

Magento backs up the data base. But it creates 4 of the same backup files, instead of just one. I started this two nights ago, and it has done it consistently for the past 2 nights.  4 database backups every night at around 12:30, 12:31, 12:32 and 12:33!

How can I stop that from happening and make it to create one back up file?

System>Configuration>Advanced>System>Cron (Scheduled Tasks)

Generate Schedules Every: 15
Schedule Ahead for: 20
Missed if Not Run Within: 15
History Cleanup Every: 10
Success History Lifetime: 60
Failure History Lifetime: 600

The following is the cron i have on the server:

*  *   *   *   *   wget -O /dev/null -q http://domainDOTcom/path/to/magento/cron.php


texts: M2 Frontend goes blank after choosing any theme

texts:
I have imported a M1 installation into M2.

Changing the theme under Stores > Configuration > General > Design from the default setting -- No Theme -- to ANYTHING breaks the frontend completely. All pages return:

Array
(
)

regardless of what page is loaded. Even if I revert to -- No Theme --, no page loads. Nothing appears in debug.log or system.log, there are no mysql or Apache errors. PHP log only reports Unable to initialize module for a handful of modules, but its been spitting those out regardless of my theme problem.

The only way I can 'fix' this is by restoring the database from a backup. Does anyone have a clue whats going on?


texts:
i have tried a lot to get only small image from product collection of product object to create custom XML feed for my products.

but could not able to get succeed yet.

  $imgname = Mage::helper('catalog/image')->init($product, 'small_image',$product->getSmallImage())->resize(200, 115);

But Result is

http://domainname.com/media/catalog/product/cache/1/small_image/200x115/74bba6f65adf875ca0644363d646988a/images/catalog/product/placeholder/small_image.jpg

And my collection is

$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')
                 ->addStoreFilter($this->_storeId)
                 ->addAttributeToFilter(
                       'status', array('eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
                  );

it would be great if some one point me in right direction.


texts:
I am using Magneto 2.3.5-p1, I want to add some custom values in my New Order Transactional email template using block, for that, I have created a custom template from Marketing->Eamil Template and assigned that template from Store Configuration->Sales->Sales Email I have added below custom block in my email template
{{block class="Magento\\Framework\\View\\Element\\Template" order=$order name="sample_name" template= "VENDOR_MODULE::checkoutFieldsEmail.phtml" area = "frontend"}}

and in checkoutFieldsEmail.phtml have added below code even I removed all PHP code and put simple HTML for testing but not showing in email only default content is showing.
I have already added a new column in the sales_order table and the name of the column is Custom_column and added some JSON data.
<?php
    $helper = $this->helper('Vendor\Module\Data');
    $order = $block->getOrder();
    if($order):
    $_custom_value = $order->getCustom_column();
    $coafFields = json_decode($_custom_value,true);
?>


texts: what are the general front-end user cases can cause error?

texts:
A good working site gives error without changing the system a bit

i have a maegnto site with 12 third party extesions,

it was working fine for last 45 days.

today suddenly it says

  "There has been an error processing your request".

what may be the reason? we haven't change anything in admin and magento sysem for last 45 days

is there any general front-end user cases can cause error ?


texts: Fatal error: Out of memory after install module via composer

texts:
I try to install payment module from GitHub.

https://github.com/dotpay/magento2-payment

When I run first command:

composer require dotpay/magento2-payment

Then I get error:

Using version ^1.0 for dotpay/magento2-payment

    ./composer.json has been updated
    Loading composer repositorUpdating dependencies (including require-dev)
    mmap() failed: [12] Cannot allocate memory

    mmap() failed: [12] Cannot allocate memory
    PHP Fatal error:  Out of memory (allocated 553656320) (tried to allocate 4096 by                                                                                tes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.ph                                                                                p on line 220

    Fatal error: Out of memory (allocated 553656320) (tried to allocate 4096 bytes)                                                                                in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on                                                                                line 220

Anyone know how to solve it?

EDIT:
In php.ini I increased memory_limit to 2GB and 3GB.

Then I restart apache server (debian 9):

again try to install and still error:

EDIT2:

fsg@gerris:~/domains/aron.pl/public_html$ which php

/usr/local/bin/php

fsg@gerris:~/domains/aron.pl/public_html$ which composer

/usr/local/bin/composer


texts: How to Get Recently Viewed Products in Magento 2 Using Customer Entity Id

texts:
I want to display the recently viewed products name and products id of a particular customer using customer entity id.

How can I do that in Magento 2 programmatically?


texts: Relationship tables between Product and Store magento 1.9

texts:
I am importing products programmatically. I assign store and website id to products. Kindly look code as below

$product->setStoreId(0);
$product->setWebsiteIds(array(0,1));

for website I found the table: catalog_product_website. I want to see the relationship table for product and store.

Kindly help

Thanks in advance


texts: MYSQL Query to delete url rewrites for an old store ID

texts:
As per the title, can someone kindly tell me what query to use to delete all url rewrites in the core_url_rewrites table with store ID of '1'? The current store ID is 5 and i need those to stay.

Also if its possible to delete everything in the database from that store? Im getting pages on admin throw a "404 error: Page not found" which i strongly believe is something to do with the store issue.


texts: How to debug checkout_cart_product_add_after event on exit

texts:
I am trying to exit point on observer for checkout_cart_product_add_after event.

But it always refresh after item added to cart.

Any way to print data when debug this event and not refresh the page.

It happen when i print or echo something.it works with log file but everytime i have to check log so it would be easy if i can check it with exit on code.


texts: Magento 2: How to upload the product images from Gallery?

texts:
I have bulk images for product, so I have added those images to Gallery but in the product page in admin panel, I cannot see an option to choose the product images from Gallery.

How can I allow the admins to choose the images from gallery for products?
Any help will be appreciated!


texts:
I got this exception when installing Magento CE 1.9

Error in file: "~/app/code/core/Mage/Core/sql/core_setup/install-1.6.0.0.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'core_config_data' already exists

Trace:
#0 ~/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 ~/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.6.0.4')
#2 ~/app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('1.6.0.4')
#3 ~/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 ~/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 ~/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 ~/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 ~/index.php(90): Mage::run('', 'store')
#8 {main}

Any ideas? Because this is the most strange error I ever seen since I played with Magento CE. :-(


texts:
I can only find some suggestions for the 'old' pixel to get the correct values for amount and currency. How do I magento-fy this new version?

And should I really place it in head, not succes.phtml?


texts:
I'm really sorry about this but I'm at a loose end with no one able to help. I'm also a bit of a newbie so bear with me.

I've recently moved web hosts, since then my Magento site is not sending out emails.

I'm using the SMTP Pro extension with an email address managed by google apps. Not sure if it's relevant but my domain name is managed by Fasthosts & I have the Google MX records in there (Unchanged since server move) and an SPF record (unchanged)

My new web host has not set up any domain records etc in cpanel (and I don't know how to do it) they're going to do this but are not convinced it will help the issue as they do not manage the domain.

The error I'm receiving is as follows:

  SMTP Pro Self Test Results Sending test email to your contact form
  address: admin@motif8.co.uk from: noreply@motif8.co.uk. Unable to send
  test email. Exception message was: Incorrect authentication data
  Please check the user guide for frequent error messages and their
  solutions. Default templates exist. Email communications are enabled.
  Required database tables exist.

I've tried a PHP script and it sent a test email without any issues, Magento permissions are all set as should be.

Before I moved host, my email settings within magento were 'localhost' on port 25, I've tried all manner of ports, all smtp.gmail.com variants and many different email addresses & passwords within our company (and some throwaway gmail accounts) to no avail.

Really hoping for some suggestions as I'm at a complete loss! Thanks!


texts: Add event after user add the product to cart to update quantity

texts:
I am beginner in magento 2 and I am trying to create an event and observer that will update the qty of item to 2 from default which is 1 when user add the item to cart. For this I successfully created the module and registered it and event file is as below

app/code/My/Redirect/etc/frontend/events.xml

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

and observer as below
app/code/My/Redirect/Observer/MyObserver.php

<?php

namespace My\Redirect\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\RequestInterface;

class MyObserver implements ObserverInterface
{
    public function execute(\Magento\Framework\Event\Observer $observer) {
        $item = $observer->getEvent()->getData('quote_item');
        $item = ( $item->getParentItem() ? $item->getParentItem() : $item );
        $price = 100; //set your price here
        $item->setCustomPrice($price);
        $item->setOriginalCustomPrice($price);
        $item->getProduct()->setIsSuperMode(true);
    }

}

here the program is changing the price to 100 in base currency and its working fine but i want to update the qty with price according to that qty.


texts: Why does it matter in which order I add attributes to a filter?

texts:
Compare this code
    $productIdQuery = $this->productCollectionFactory->create()
        ->addAttributeToSelect('customer_group')
        ->addAttributeToFilter([
            ['attribute' => 'customer_group', 'finset' => (int)$customerGroupId],
            ['attribute' => 'customer_group', 'eq' => ''],
            ['attribute' => 'customer_group', 'null' => true],
        ]);

to this code
    $productIdQuery = $this->productCollectionFactory->create()
        ->addAttributeToSelect('customer_group')
        ->addAttributeToFilter([
            ['attribute' => 'customer_group', 'null' => true],
            ['attribute' => 'customer_group', 'eq' => ''],
            ['attribute' => 'customer_group', 'finset' => (int)$customerGroupId],
        ]);

It gives different results. In the old code, rows with missing attribute value entries in the data base are missing.
Is this intended?


texts: Random Search Terms Appearing in Last 5 Search Terms

texts:
Today I checked the admin dashboard of our Magento 1.9.2.1. There are some random strings and characters, for example;

  vvUf")(,[,"'"

Also, I see people searching for movies I have never heard of. For example, naseeb full movei hd. We do not have extensions. We are using the Universal built by Meigee.

What could be the issue and how do I resolve?


texts: Error after patches SUPEE-7405 and SUPEE-9767

texts:
I installed pathes SUPEE-7405 and SUPEE-9767 and when clicked on remove button then cant remove product on magento 1.9 and get below message:

  Cannot remove the item

Please help me.


texts: Magento 2.2. - Show subcategories on category page

texts:
After searching online, I found this approach to my problem of showing subcategories inside the category page. The above solution states to create a custom module, and then reference it with a cms-code.

So I created a static block with the reference cms-code inside it, and I added the block in a category, using the dropdown menu.

The module seems to work (I inspected the page and I can see there are

 html tags), but no list of subcategories is visible.

What am i missing?

Thank you


texts: How to add multiple prices to one product?

texts:
I want to set up a gift card product that has 3 point prices for the customer to choose from.

Product 1 - $100
Product 2 - $150
Product 3 - $200

Is there an option to do this on the backend? If not, how can I possibly do so?


texts:
I'm trying to update magento but I'm having several problems with the db. First of all i did a magento fresh install, then I imported my db from command line, and I renamed the tables indicated in this (http://www.venustheme.com/magento-2-database-structure/).
Now, magento gives me this error:

 Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Magento_Store schema: current version - none, required version - 2.0.0
Magento_Store data: current version - none, required version - 2.0.0
Magento_AdvancedPricingImportExport schema: current version - none, required version - 2.0.0
Magento_AdvancedPricingImportExport data: current version - none, required version - 2.0.0
Magento_Directory schema: current version - none, required version - 2.0.0
Magento_Directory data: current version - none, required version - 2.0.0
Magento_Theme schema: current version - none, required version - 2.0.1
Magento_Theme data: current version - none, required version - 2.0.1
Magento_Backend schema: current version - none, required version - 2.0.0
Magento_Backend data: current version - none, required version - 2.0.0
Magento_Backup schema: current version - none, required version - 2.0.0
Magento_Backup data: current version - none, required version - 2.0.0
Magento_Eav schema: current version - none, required version - 2.0.0
Magento_Eav data: current version - none, required version - 2.0.0
Magento_Customer schema: current version - none, required version - 2.0.9
Magento_Customer data: current version - none, required version - 2.0.9
Magento_BundleImportExport schema: current version - none, required version - 2.0.0
Magento_BundleImportExport data: current version - none, required version - 2.0.0
Magento_AdminNotification schema: current version - none, required version - 2.0.0
Magento_AdminNotification data: current version - none, required version - 2.0.0
Magento_CacheInvalidate schema: current version - none, required version - 2.0.0
Magento_CacheInvalidate data: current version - none, required version - 2.0.0
Magento_Indexer schema: current version - none, required version - 2.0.0
Magento_Indexer data: current version - none, required version - 2.0.0
Magento_Cms schema: current version - none, required version - 2.0.1
Magento_Cms data: current version - none, required version - 2.0.1
Magento_CatalogImportExport schema: current version - none, required version - 2.0.0
Magento_CatalogImportExport data: current version - none, required version - 2.0.0
Magento_Catalog schema: current version - none, required version - 2.1.3
Magento_Catalog data: current version - none, required version - 2.1.3
Magento_Rule schema: current version - none, required version - 2.0.0
Magento_Rule data: current version - none, required version - 2.0.0
Magento_Msrp schema: current version - none, required version - 2.1.3
Magento_Msrp data: current version - none, required version - 2.1.3
Magento_Search schema: current version - none, required version - 2.0.4
Magento_Search data: current version - none, required version - 2.0.4
Magento_Bundle schema: current version - none, required version - 2.0.2
Magento_Bundle data: current version - none, required version - 2.0.2
Magento_Quote schema: current version - none, required version - 2.0.3
Magento_Quote data: current version - none, required version - 2.0.3
Magento_CatalogUrlRewrite schema: current version - none, required version - 2.0.0

ecc...

Running bin/magento setup:upgrade i get the following errors:

[Zend_Db_Statement_Exception]
 SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY', query was: INSERT INTO `prod_store_website` (`website_id`, `code`, `name`, `sort_order`, `default_group_id`,`is_default`) VALUES (?, ?, ?, ?, ?, ?)

[PDOException]
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key  'PRIMARY'

How can I resolve it?


texts: How to i can fix issue in magento 2.1.2 (There has been an error processing your request)?

texts:
When i install magento 2.1.2, after complete installation when i open front view of website then i'm getting this error again and again... i install my magento again and again but same issue is occurred.

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

  Error log record number: 238886554

Please help me how to i can fix this issue.

 (Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY', query was: INSERT INTO customer_visitor (customer_id, session_id, last_visit_at) VALUES (?, ?, ?)";i:1;s:13034:"#0

Solution: TRUNCATE customer_visitor table from database.


texts:
I want to add this text on certain product pages:

Free gift with purchase.

Then I want to add that same text to the cart.

Only for certain products.

How can I do this?


texts:
I want to active an accordion tab on button click with activate() method https://devdocs.magento.com/guides/v2.1/javascript-dev-guide/widgets/widget_tabs.html#fedg_tabs_methods-activate

This is my test code

                Title 1

Content 1

                Title 2

Content 2

                Title 3

Content 3

    <button id="btn">Activate 1</button>

but i get this error

Uncaught TypeError: $(...).accordion(...).activate is not a function

what i'm wrong?


texts: Unable to get cronjob working with Magento2.4

texts:
Running Magento 2.4.
After installing Magento I get the following error in the admin panel:
One or more indexers are invalid. Make sure your Magento cron job is running.

I've logged into SSH as Magento user (non root). I've ran the following:
bin/magento indexer:reindex

Which produces ...
Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index has been rebuilt successfully in 00:00:00
Category Products index has been rebuilt successfully in 00:00:00
Product Categories index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Product EAV index has been rebuilt successfully in 00:00:00
Stock index has been rebuilt successfully in 00:00:00
Inventory index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:00
Catalog Search index exception: Could not ping search engine: No alive nodes found in your cluster

I cleared cache, yet the problem still exists.
I've ran bin/magento cron:install and my crontab looks like so:
#~ MAGENTO START 663d4cebd52acc169f7992767d6661404ecce65ca58a220ba7b032ca1dc11162
* * * * * /usr/bin/php7.4 /var/www/html/mage/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /var/www/html/mage/var/log/magento.cron.log
#~ MAGENTO END 663d4cebd52acc169f7992767d6661404ecce65ca58a220ba7b032ca1dc11162

I've also directly ran /usr/bin/php7.4 /var/www/html/mage/bin/magento cron:run to confirm everything is working and it produces: Ran jobs by schedule.
Yet when I log into admin panel the message is still there.
Any ideas?


texts: Magento 1.9.2.4 login error not displaying

texts:
My website - http://sdl2.alphalogichq.com/index.php/customer/account/login/ login works ok.

But if there is any invalid login like:

email: abc@abc.com
password: 123456

It doesn't show Invalid login error. I have to force reload (CTRL + F5) so it shows the error.

Why is it not working correctly?


texts: Stylesheet could not be loaded in magento 2.2

texts:
I am installing magento 2.2 on server. its install completely, but after that home page and admin panel could not loaded css.

i tried lots of thing, like:

1.php bin/magento setup:static-content:deploy

`

Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink

To:

 Magento\Framework\App\View\Asset\MaterializationStrategy\Copy`

buts still its not fix.
the same magento website is work perfectly on localhost, this issue is only on server.


texts: What is the magento way to hide an html element in a phtml until the page is loaded in Magento 2?

texts:
I'm trying to hide the customer register form until the page is loaded, I know I can use jQuery or plain javascript, but I'd like to do it using Magento2 own resources, the markup I'm using right now:

<div id="register-form">
<form class="form create account form-create-account" action="/customer/account/createpost/" method="post" id="form-validate" enctype="multipart/form-data">
...
</form>
</div>


texts: Display checkout success page print order in pdf

texts:
My checkout success page print order displays in html. When i print it using a webkit browser the table view is distorted. I think the best way to overcome this issue is to display the print order as PDF instead of html. How can i achieve this in magento?

The issue images available below

Normal view : http://postimg.org/image/xg4drghpz/

Print view : http://postimg.org/image/izh4cvs8n/


texts: Trying to add field to checkout with LayoutProcessor Plugin

texts:
I have been using a couple of guides to add a field to the shipping step in checkout:
https://devdocs.magento.com/guides/v2.2/howdoi/checkout/checkout_new_field.html
https://devdocs.magento.com/guides/v2.2/howdoi/checkout/checkout_custom_checkbox.html

I was able to successfully add my field by overriding the LayoutProcessor for a different extension, but when I try to just override Magento's LayoutProcessor, the field doesn't appear. So I think think it has something to do with how I'm creating the plugin, and not so much a problem with my code.

Below is the code I am trying to use to create the checkout field:

  Namespace\Module\etc\frontend\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\Checkout\Block\Checkout\LayoutProcessor">
    <plugin name="custom-checkout" type="Namespace\Module\Plugin\CheckoutLayoutPlugin" sortOrder="10"/>
</type>

</config>

  Namespace\Module\Plugin\CheckoutLayoutPlugin.php

<?php
namespace Module\Namespace\Plugin;
class CheckoutLayoutPlugin
{
    public function afterProcess(\Magento\Checkout\Block\Checkout\LayoutProcessor $processor, $jsLayout){

    $test2 = 'tli_test2';

    $newField = [
        'component' => 'Magento_Ui/js/form/element/abstract',
        'config' => [
            'customScope' => 'shippingAddress.custom_attributes',
            'customEntry' => null,
            'template' => 'ui/form/field',
            'elementTmpl' => 'ui/form/element/input',
            'tooltip' => [
                'description' => 'description'
            ]
        ],
        'dataScope' => 'shippingAddress.custom_attributes.' . $test2,
        'label' => 'Custom Label',
        'provider' => 'checkoutProvider',
        'sortOrder' => 0,
        'validation' => [
            'required-entry' => true
        ],
        'options' => [],
        'filterBy' => null,
        'customEntry' => null,
        'visible' => true
    ];

    $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']['shippingAddress']['children']['shipping-address-fieldset']['children'][$test2] = $newField;

    return $jsLayout;
    }
}

This alone should be enough to at least render the field, even if it doesn't do anything, but it still does not appear on the shipping step of checkout.


texts: How to update LayeredNavigation in ajax responce in Magento 2

texts:
Now i am user controller

  $navBlock = $resultPage->getLayout()
                    ->createBlock('Magento\LayeredNavigation\Block\Navigation')
                    ->setTemplate('Mymodul_Mypackage::layer/view.phtml')
                    ->toHtml();

Now call custom controller but not get response


texts:
After making a change to app/etc/di.xml

Am I required to take some additional steps in order for the change to take effect?

Like clean cache, deploy static files or compile code?


texts: How to get Attribute value in place of id?

texts:
'sales_executive' is my custom customer attribute. I'm using $collection->addAttributeToSelect('sales_executive');
This gives id of 'sales_executive' in the grid. How to obtain option label or value in place of id?


texts:
I am currently having an issue with my Magento 2.1.8 checkout where the header is not displaying the logo, search bar, etc. correctly.

It is also showing an error in my System.log file

[2018-03-08 10:25:31] main.CRITICAL: Invalid template file: 'Magento_Checkout::js/components.phtml' in module: '' block's name: 'checkout_page_head_components' [] []

I cannot find the specified template file anywhere. I have even downloaded all the magento core files from github and i cannot find the components.phtml file in there either.

does any one know where this file is located or how i access it?

thanks.

EDIT:

I have now found the file and it is identical the to the components.phtml file on github in the link below. This file has been unchanged so why would it say it is an "Invalid template file"?


texts: How to tally in stock and salable quantity in magento 2 every time

texts: How to manage Magento2 stock and salable quantity field in equally.


texts: Customers custom attribute with dropdown is not working

texts:
I need to create a custom attribute for customer entity with the Yes/No.

I tried to use boolean type and also select method. But nothing has worked.

Below are my work:

Try 1: (Type as select)

$customerSetup->addAttribute(
            \Magento\Customer\Model\Customer::ENTITY,
            'is_mobile_verified',
            [
                'type' => 'int',
                'backend' => '',
                'frontend' => '',
                'label' => 'Is Mobile Verified?',
                'input' => 'select',
                'class' => '',
                'source' => 'Ucs\Reson8\Model\Config\Source\Options',
                'visible' => true,
                'required' => false,
                'user_defined' => true,
                'default' => 0,
                'system'       => 0,
                'position'     => 1002,
            ]
        );

        $attribute = $customerSetup->getEavConfig()->getAttribute('customer', 'is_mobile_verified')
        ->addData([
                'attribute_set_id' => $attributeSetId,
                'attribute_group_id' => $attributeGroupId,
                'used_in_forms' => [
                    'adminhtml_customer',
                ]
        ]);
        $attribute->save();

Ucs\Reson8\Model\Config\Source\Options.php as below

<?php

namespace Ucs\Reson8\Model\Config\Source;

class Options extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
{
    /**
    * Get all options
    *
    * @return array
    */
    public function getAllOptions()
    {
        $this->_options = [
                ['label' => __('No'), 'value'=>'0'],
                ['label' => __('Yes'), 'value'=>'1'],
            ];

    return $this->_options;

    }

}

Try 2: (Type as boolean)

$customerSetup->addAttribute(
            \Magento\Customer\Model\Customer::ENTITY,
            'is_mobile_verified',
            [
                'type' => 'int',
                'backend' => '',
                'frontend' => '',
                'label' => 'Is Mobile Verified?',
                'input' => 'boolean',
                'class' => '',
                'source' => '',
                'visible' => true,
                'required' => false,
                'user_defined' => true,
                'default' => 0,
                'system'       => 0,
                'position'     => 1002,
            ]
        );
$attribute = $customerSetup->getEavConfig()->getAttribute('customer', 'is_mobile_verified')
        ->addData([
                'attribute_set_id' => $attributeSetId,
                'attribute_group_id' => $attributeGroupId,
                'used_in_forms' => [
                    'adminhtml_customer',
                ]
        ]);

Can someone help me?


texts:
I am installing magento 2 by cloning from github through Git commands and by installing composer. when 'Composer install' command is entered in git, I got the error ,

"the lock file is not up to date with the latest changes in composer.json"

and it asks for authentication for downloading process.I entered the username and password of Github account. The problem is, it is not accepting it as valid credentials. My doubt is that what credentials should be given there? I also tried giving bitbucket credentials.


texts: My DB file size over 700 MB Any problem?

texts:
I just exported my DB and found my DB file size 761 MB

I think this is too heavy and effect badly to admin performance

Am I something wrong while running store? Is it okay with this big db file size?

(I just also found I exported same commend and found my DB file size 665 MB this time strange..)


texts: Magmi import display 93sku but only load 1

texts:
I am facing a weird behavior using magmi. as you can see in the image, Magmi sql data-source processes 93 sku as it says in Global Stats but only 1/1 sku is imported into magento as it says in run-time infos.

Additionally, that imported record was loaded perfect into the catalog and displayed at frontend but no other record was loaded.

Any idea why this behavior could be happening? brgds!

my current database table have the following fields:

FieldName => FieldType => Value

sku = number
short_description = text
description = text
category_ids = text = 45
type = varchar = simple
attribute_set = varchar = default
thumbnail = text
small_image = text
image = text
thumbnail_label = text
small_image_label = text
image_label = text
price = varchar = 11
cost = varchar = 10
status = varchar = Active
name = varchar
meta_title = text
meta_description = text
country_of_manufacture = varchar = US
weight = varchar = 1
qty = varchar  = 1
visibility = varchar = Catalog and Search
tax_class_id = varchar = 1
is_in_stock = varchar = 1
store = varchar = admin
use_config_manage_stock = integer = 1
manage_stock = integer = 1

UPDATE: im sharing the .sql table with all the information at google drive https://drive.google.com/file/d/0B_L9grdMhRStSEszVnlyWWFsNTQ/edit?usp=sharing


texts: Magento 2: Product list for custom magento system configuration section

texts:
I want to get all product and display them in a system config multi-select field list.

I have created the system.xml and added

<field id="productlist" translate="label" type="multiselect" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
    <label>Select Product</label>
    <source_model>Rahul\HelloWorld\Model\Config\Productlist</source_model>
</field>

How to create toOptionArray() in the product list(Rahul\HelloWorld\Model\Config\Productlist.php)


texts: Magento 2: Mailchimp or Sendgrid; pros and cons?

texts: Based on your experiences with both extensions, which one would you recommend, and what would be the most important criteria for choosing?


texts: Marketplace extensions not available in setup wizard

texts:
I have a free Magento 2.3.2 installation, I have downloaded a free extension on the marketplace I have linked the keys to my setup.

The extension doesn't show available for installation.

I deleted my site and rebuilt it from scratch, I linked the keys again and it showed... then I downloaded another free extension from the marketplace which again isn't showing. I don't wish to rebuild my site every time I want to install an extension.

How can I get this update?

Thanks


texts: How to add Product name on current product page or any page in Magento 2?

texts:
I'm using magento 2.3, may i ask how can i made product name on others page.
Beacuse i tried this code but not working. Anyone can help? thank you!!

<?php echo $_product->getName(); ?>


texts: Magento2: what is the basic difference between plugin and preference?

texts:
I used both Plugin and Preference in Magento2 tutorial and both are working fine but what is the basic difference between them.
Code for plugin:
1.1) Add a plugin declaration into di.xml:
<type name="Magento\Catalog\Model\Product">
<plugin name="magento-catalog-product-plugin" type="Training\Test\Model\Product" sortOrder="10"/>
</type>

1.2) Create a plugin class:
<?php
namespace Training\Test\Model;
class Product {
public function afterGetPrice(\Magento\Catalog\Model\Product $product, $result) {
return 5;
}
}

Code for preference:
2.1) Create a preference declaration:
<preference for="Magento\Catalog\Model\Product"
type="Training\Test\Model\Testproduct" />

2.2) Create a new Product class:
<?php
namespace Training\Test\Model;
class Testproduct extends \Magento\Catalog\Model\Product
{
public function getPrice() {
return 3;
}
}


texts: How to enable persistent cart for GUEST users?

texts:
After enabling persistent cart in the Admin the cart stays active for logged in users only it appears. I want to keep the cart active for all users, including those who don't log in but come back to the site at a later date.

Is there a way to enable cart persistence for users who are not logged in?


texts: Magento 2, how to add 'textbox' into 'cancel modal'?

texts: Using magento 2.2, admin. I need to add textbox into dialog when confirm Cancel status in sale order.


texts: Magento 2: CronJob bug? MySQL is always running at 30% usage and many php processes are running

texts:
I am running magento 2 (2.2.1) on nginx and enable the cronjob by default.

php bin/magento cron:install

I don't customize any configuration regarding schedule of cronjobs.

after running the machine a few days, i saw that mysql service is always nearly 30-40% usage and machine is running a lot of "php7.1" processes

i reboot the machine and the error is the same, right now there are only a "few" php7.1 processes but it continue to raise

I already checked the logs, no errors there or exceptions.

I only found an issue on m2 backend

this indexer is always not "up to date"

can you please give me a hint how i can fix this problem?

attached a screenshot from the crontab


texts: Magento 2: Update payment methods on change billing address from existing billing options

texts: How to update payment methods on change billing address from existing billing options Magento 2 ?


texts: Magento : Custom Options fields position

texts:
Can you help me how can I change the position of Custom Options on product page. I mean: First product-options fields are displayed, then add_to_cart fields. I'm Very appreciated for your help.

Thanks Duarte for the the answer but, I have now another problem that I want the product-options block appear before add_to_cart block. thnks again !


texts:
I have been trying to override Mage_Adminhtml config.xml, so that Grouped Products do not appear while creating an order from admin.

I have checked line by line, don't know why its not working. The module is appearing in System Config > Advanced

Module Name: VMR_Hidegrouped

app/code/local/VMR/Hidegrouped/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <VMR_Hidegrouped>
            <version>1.0.0</version>
        </VMR_Hidegrouped>
    </modules>
    <adminhtml>
        <sales>
            <order>
                <create>
                    <available_product_types>
                        <simple/>
                        <virtual/>
                        <configurable/>
                    </available_product_types>
                </create>
            </order>
        </sales>
    </adminhtml>
</config>

app/etc/modules/VMR_Hidegrouped.xml

<?xml version="1.0"?>
<config>
    <modules>
        <VMR_Hidegrouped>
            <codePool>local</codePool>
            <active>true</active>
            <depends>
                <Mage_Adminhtml/>
            </depends>
        </VMR_Hidegrouped>
    </modules>
</config>


texts:
I'm discovering magento since 1 week. But i have a problem now.
I need to include a javascript file in my admin panel to sort a list according to another.
I'm using magento 1.9 and i really don't find any tutorial to do this.

Please can someone explain me clearly how to do this because i'm really stuck at this point.


texts:
I'm interested in adding a very large range of crowd-sourced digital products (in time, perhaps 500,000+) to my Magento setup. Each would appear on about 10 websites (one per country/region) via a single Magento instance.

From what I read elsewhere, resource requirements scale roughly in
proportion with the number of websites, so 500,000 products on 10
websites requires similar resources to 5 million products on a
single website. Is that correct?
Is supporting this many products a realistic aim? (If so,
are there companies out there successfully managing Magento
catalogs this large?)


texts:
Magento 1.9.1
Porto theme

Never had a problem with Paypal. Now I received an Email from the default Email address on the account with the Subject line:

Subject: Payment Transaction Failed Reminder

The body of the Email is as follows:

Payment transaction failed.
Reason
PayPal gateway has rejected request. The transaction was refused as a result of a duplicate invoice ID supplied. Attempt with a new invoice ID (#10536: Invalid Data).
Checkout Type
onepage
Customer:
(customer name here) <customer Email here>
Items
(products here)
Total:
USD 74.12
Billing Address:
(customer billing address here)
United States
T: (customer phone number)
Shipping Address:
(shipping address here)
United States
T: (phone number here)
Shipping Method:
Local Delivery
Payment Method:
Debit or Credit Card
Date & Time:
Aug 24, 2017 7:55:12 AM

Why did this happen and what do I need to do to prevent it from happening in the future?


texts: How to setup Magento 1.x (or 2.0) run with Oracle Database (instead of MySql)

texts: As title, i want to setup Magento 1.x (or 2.0) run with Oracle Database (instead of MySql). It possible?


texts: Magento2 : How to get quantity in dropdown for configurable product in cart page

texts:
I want quantity in dropdown, I wrote code in:

  app/design/frontend/Namespace/Theme/Magento_Checkout/templates/cart/item/default.phtml

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productStockObj = $objectManager->get('Magento\CatalogInventory\Api\StockRegistryInterface')->getStockItem($product->getId());
$qty = $productStockObj->getQty();
?>
<div class="field qty">
    <select id="cart-<?php /* @escapeNotVerified */
    echo $_item->getId() ?>-qty" name="cart[<?php /* @escapeNotVerified */
    echo $_item->getId() ?>][qty]" title="<?php echo $block->escapeHtml(__('Qty')); ?>" data - cart - item -
            id="<?php /* @escapeNotVerified */
            echo $_item->getSku() ?>">
        <?php for ($i = 1; $i <= $qty; $i++): ?>
            <option value="<?php echo $i; ?>"<?php if ($i == $block->getQty()) {
                echo 'selected';
            } ?>><?php echo $i; ?></option>
        <?php endfor; ?>
    </select>
</div>

But in cart page only simple product quantity showing, but configurable product not showing


texts: Assign inventory by customer group with MSI?

texts:
We have a site with B2C Customers and B2B customers. The Inventory of each came for different warehouses. So, the requirement is that B2C customer only watches and buy the products in stock on B2C Inventory and B2B Customer only watch and buy products in stock on B2B Inventory.

So, I see with MSI you can create different sources and stocks and assigns products to these. However, I don't see any configuration in production, source, or stock that allows me to restrict the Inventory by customers.

Is there something by default natively in Magento that allows me to do something like this?


texts: Apply product offer when subtotal grater or equal 1000 only for specific date

texts:
I want to add new product offer when cart subtotal >= 1000

This offer valid only for every month between day 1 to 7 (1-m-yyyy to 7-m-yyyy).

Therefore i used below event -

<event name="checkout_cart_save_after">
        <observer name="after_upfate_to_cart" instance="myvendor\mymodule\Observer\Updatetocart" />
    </event>

this event checkout_cart_save_after  only working when user doing any changes on cart(add,update,delete).

issue -> user can buy product offer using below activity -

user added offer on offer dates but buy when expired offer date without changes on cart.

stop this activity i did below two event -

<event name="controller_action_predispatch_onestepcheckout_index_index">
        <observer name="mymodule_before_checkout_page" instance="myvendor\mymodule\Observer\BeforeQuoteLoad" />
    </event>
    <event name="controller_action_predispatch_checkout_cart_index">
        <observer name="mymodule_before_cart_page" instance="myvendor\mymodule\Observer\BeforeQuoteLoad" />
    </event>

Anyone have best idea of this activity??

Thanks in advance.


texts: I am not able get destination city in collect rate method

texts:
I am trying to get Destination City in Collect rate Method of Magento 2

But its blank,

/**
 * Collect and get rates
 *
 * @param RateRequest $request
 * @return Result|bool|null
 */
public function collectRates(\Magento\Quote\Model\Quote\Address\RateRequest $request)
{
    if ($request->getDestCity()) {
        echo $request->getDestCity();
    }
}

Please Help me.


texts: Is Magento the right platform to sell downloadable products

texts:
My products are made of multiple files of approx 1GB each. Customers need to be able to download files by using a download manager. Resuming capabilities is a must, together with the possibility to download multiple files at once.

thanks


texts: How to add Upload Button for importing a csv file in the Custom Admin Grid

texts: Add import button in my custom admin grid using UI component, in magento 2.


texts: How to hide or remove state/province field from billing page

texts:
Hi guys i am new to magento.While dealing with the billing page in one page checkout i faced some troubles.There is state/province field which goes hide when page completely loads.When i inspect the page there is a console error "qwertykart.com/:792 Uncaught TypeError: $j(...).foundation"

In order to solve the error deleting state/province is better i think.Can anyone help me to remove it from billing page.

Thanks in advance.I searched a lot on this but didnt find a good solution/working solution thankyou..

check this link after adding item to cart http://qwertykart.com/checkout/onepage/index/


texts: Magento 2 : Display tier price for 1 quantity

texts:
I want to tier price with 1 quantity also.

I added it in Magento Admin Panel but it is not displayed.

Please check the image so you have batter idea.

Thanks in advance.


texts:
so as a still-newbie I came across the task to write a cron job for our ERP, which is supposed to run at 23:45 every day and put stock data from a .csv into the shop.

I am currently trying to test it with it being done every 10 minutes (which also seems to be the set standard, more about the "seems" later) so that I can see what happens.

However, it doesn't seem to do its job. I'm also trying to parse some string into a .log but as nothing changes there, I can assume it's not working.

I've run the function manually and it worked, so no problem there (atleast it shouldn't be).

My guess is I have a problem with the names in my config.xml, but I can't figure it out.

I'm also using another self-written module  which saves the orders, used for the ERP so they are in the same module. I will include them here.

paths

app/
    code/
        local/
            COMPANY/
                Erp/
                    Model/
                        Observer.php
                    etc/
                        config.xml

config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Company_Erp>
            <version>0.5.1</version>
        </Company_Erp>
    </modules>
<global>
    <models>
        <erp>
            <class>COMPANY_Erp_Model</class>
        </erp>
    </models>

    <events>
        <sales_order_place_after>
            <observers>
                <company_erp_model_observer>
                    <type>singleton</type>
                    <class>COMPANY_Erp_Model_Observer</class>
                    <method>writeOrderInfos</method>
                </company_erp_model_observer>
            </observers>
        </sales_order_place_after>
    </events>
</global>
<crontab>
    <jobs>
        <company_erp>
            <schedule>
                <cron_expr>*/10 * * * *</cron_expr>
            </schedule>
            <run>
                <model>erp/observer::updateStock</model>
            </run>
        </company_erp>
    </jobs>
</crontab>

file in app/etc/modules (COMPANY_Erp.xml)

<?xml version="1.0"?>
<config>
    <modules>
        <COMPANY_Erp>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Checkout />
            </depends>
        </COMPANY_Erp>
    </modules>
</config>

Observer.php

<?php

class COMPANY_Erp_Model_Observer {
    ...
    public function updateStock(){
        ...
        Mage::log('Cron job done!', null, 'company_erp.log', true);
    }
}

I know this is a long-a** post but I seriously don't know any further.

As I said, I don't know much about Magento, or CMS and stuff in general. I can work with them but understanding is a problem. I have no idea how to look whether cron.php is running on the server or not, but a co-worker said it is running. She tested it with "PuTTY" and said it runs every 10 minutes and writes the returns into nothing (null?), so I have a problem on my side.

I would appreciate any help or comments, as I do want to learn more. I like the structures in Magento but struggle very often.


texts: Im trying to get the browser to recognize a css.php file

texts:
I have this file:

<link src="http://mysite.com/theme/skin/frontend/default/beckin/css/options.css.php" rel="stylesheet" type="text/css">

Which shows in the source code. Also when I click on the link in the source code it shows the css as it should. However, the browser is not using this file and it doesn't show up in the Firefox inspector.

What can I do to get the browser to use this css file?

BTW: This is for a custom extension that allows you to change the theme colors. Again, the file is working properly but the browser ignores it ??

Thanks!