texts: Adding custom validation to checkout field

texts:
With Magento 2 I want to do everything the "clean" way, so without editing any layout files (if possible).

Currently, I am trying to add custom validations to fields at the checkout.

If I create my JS validation rules like this, how do I tell Magento for which fields to use these rules.


texts: Error of layout xml : Element 'update': This element is not expected

texts:
I'm upgrading a theme from 2.2.x to .2.3

there are so many xml in this theme have the following directive

    <?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <update handle="customer_account"/>
        <update handle="sales_order_item_renderers"/>
        <update handle="sales_order_item_price"/>
        <update handle="sales_order_info_links"/>
        <body>
        .........

error message display when i visit on front page:

Element 'update': This element is not expected

If update element is not supported, how can i migrate these statements to supported version?


texts: Magento 2 - Turn off Cart & Checkout off for 1 website

texts: I have a 1 Magento instance running 3 websites. Is it possible to turn off the cart and checkout functionality only for 1 website


texts: Adding mini cart to header not displaying

texts:
I'm currently trying to add the sidebar cart to the header of the website I'm working on, however it doesn't seem to be working. Here are my files:

page.xml:

<block type="page/html_header" name="header" as="header">
    <block type="page/template_links" name="top.links" as="topLinks"/>
    <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
    <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
        Navigation Bar
        <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
    </block>
    <block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
        Page Header
        <action method="setElementClass"><value>top-container</value></action>
    </block>
    <block type="checkout/cart_sidebar" name="cart_sidebar" as="topcart" template="checkout/cart/sidebar.phtml"/>
</block>

header.phtml:

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

Currently, I have the cache turned off in Magento, however I have tried flushing the cache in System->Cache Management. Any ideas?


texts: Magento Authorize.net - Authorize and Capture vs. Authorize Only

texts:
When setting up a new Magento configuration, in the payments section I am given a couple different options for Payment Action under Authorize.net. Specifically Authoize and Capture and Authorize Only.

According to the Magento docs, Authorize Only confirms that the payment method is valid and the funds are available, but it doesn't actually charge the card, where as Authorize and Capture also places a hold on the card. When does Authorize.net take the money when the setting is set to Authorize Only?


texts: view folder path confusion after overriding using Theme method

texts:
When i override the phtml using my custom theme in Magento 2, should i have to keep the view folder in the Module.

ie) view/frontend/templates and
    view/frontend/layout
folder?

If i have to keep the layout xml inside the view/layout folder, should it be inside view/.. or what is the correct path?

UPDATED QUESTION:

After keeping my template in the template folder and xml in the layout folder of my theme.

Whats the content of the xml here :  Vendor_Catalog::product/list/toolbar.phtml

Is it the my custom vendor_Catalog name or Magento_Catalog:: ...

<referenceBlock class="Vendor\Module\Block\Product\ProductList\Toolbar" name="product_list_toolbar" >
      <action method="setTemplate">
        <argument name="template" xsi:type="string">Vendor_Catalog::product/list/toolbar.phtml</argument>
      </action>
    </referenceBlock>


texts: How to resize images for list and single page in Magento 2

texts:
By default single page pictures is 700x700 px and list pictures is 270x270.

Does anyone know how can i set for example 2000x2000px for this picures?

Is there any xml where i can set this values or  is a resize function that handle this functionality?


texts: Component Manager - 500 Internal Server Error - Error in syncing packages for Install

texts:
I freshly installed a magento 2.1.7.

With PHP 7.0.19
Installing the first extension via the compenent manager did work ....
But now i get a 500 Internal Server Error with the message:

Error in syncing packages for Install

Here is the complete error:

An error occurred during execution; please try again later.
Additional information:
RuntimeException

File:

    setup/src/Magento/Setup/Model/PackagesData.php:88

Message:

    Error in syncing packages for Install

Stack trace:

    #0 setup/src/Magento/Setup/Controller/ComponentGrid.php(98): Magento\Setup\Model\PackagesData->syncPackagesData()
    #1 vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(82): Magento\Setup\Controller\ComponentGrid->componentsAction()
    #2 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
    #3 vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
    #4 vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
    #5 vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
    #6 vendor/zendframework/zend-mvc/src/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
    #7 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
    #8 vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
    #9 vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
    #10 vendor/zendframework/zend-mvc/src/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
    #11 setup/index.php(31): Zend\Mvc\Application->run()
    #12 {main}

I tried new keys in magento marketplace, clearing cache, clearing var/di, var/generation, recompling .... but all with no luck.

Can anyone help me?


texts: Block Page Title Showing Up In Wrong Places - Magento 2

texts:
I have a strange thing going on.  I have a module that adds a new page to the the site.  I have the block code's _prepareLayout() function setting the page title.  It works fine on the page, but that title also shows up on other pages.  The Wishlist, My Product Reviews, and also on our Blog's home page.  Its the Magefan Blog.

I thought it was a cache issue, but it is not.

Has anyone run into this issue, or can point me in the right direction?

protected function _prepareLayout()
{
    $this->pageConfig->getTitle()->set(__('My Garage'));
}

customer_account.xml:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="Customer My Account (All Pages)" design_abstraction="custom">
    <body>
        <attribute name="class" value="account"/>
        <referenceContainer name="sidebar.main">
            <block class="Magento\Framework\View\Element\Html\Links" name="customer_account_navigation_secondary" after="customer_account_navigation" template="Magento_Customer::account/navigation.phtml">
                <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-account-link-secondary"> <!-- duplicate this as many times as you need, just make sure the name is unique -->
                    <arguments>
                        <argument name="label" xsi:type="string" translate="true">My Garage</argument>
                        <argument name="path" xsi:type="string">mygarage/vehicle/index</argument>
                    </arguments>
                </block>
            </block>
        </referenceContainer>
    </body>
</page>


texts:
I'am adding a new validation rule.

The result should depend on storeview code.

How can I get the storeId in the following javascript code?

validator-mixin.js

define([
    'jquery'
], function ($) {
    'use strict';

    return function (validator) {

        validator.addRule(
            'validate-myrule',
            function (value, params) {

                //my rule logic which needs to know storeId

            },
            $.mage.__("rule error message")
        );

        return validator;
    };
});


texts: Table “catalog_product_super_link” has 4 records but in associated product list is showing only 1 product

texts:
In my Magento 1.9, the associated product section of a configurational product showing only 1 record. But in the table "catalog_product_super_link" has 4 records against the parent product id. Why this happening? Do I need to link child product id and parent product id in some other table?

Please help


texts: Issues with some URL's in Multistore Child Store

texts:
I have a store, mydomain.com, with a top-level category called Shop accessible via mydomain.com/shop.

Its child store, which we'll call "new", is at new-mydomain.com. This sub-store also has its own top-level category called "Shop" which I'd like to be accessible via new-mydomain.com/shop. In the "new" store view, "shop" has been set as the URL key, but even after all cache clears/reindexes/url regeneration/etc I can only access the category via the longform /catalog/category/view/s/shop-by-category/id/528/

Any ideas? Though the URL key is entered as "shop", when I save the category without altering it in any way I receive a

  Something went wrong while saving the category

error, so I'm thinking that could be a clue.

Any thoughts on how to fix this or what to look into would be greatly appreciated!


texts: Magento SOAP API add a custom column value to the salesOrderInfo and salesOrderList

texts: I have added a column 'leadsource' in 'sales_flat_order'. I have to pull this in api . Please help.


texts: Magento 2: How to add a browse button to upload file in admin section?

texts:
Working on Magento 2 custom module implementation and want to add a browse button to upload a file in admin form.

I have gone through the

Magento2 : Admin module Image upload code to display form

but it's not working for me.

Any help is appreciated.

Thanks!


texts: How To Test SSL On Development Server Without SSL Certificate

texts:
I'm testing some code that changes a link to use the secure base URL, but my development server does not have an SSL certificate. I'm trying to fake it and have so far been unsuccessful.

I have links that use https on my live site, which are using http on the development site. I'm assuming that these will change with the secure base URL (which is currently set to http).

I've tried simply setting the secure base URL to https, but this crashes the admin (easily fixed by changing it back in core_config_data and deleting var/cache) and doesn't change the links that I already know use the secure URL on the live site.

I'm not sure what else to try, short of actually going and purchasing the cheapest SSL certificate I can find for use on my development server.

Any ideas?


texts:
How would solve this? Magento is unable to send mail.
I am on a localhost and have the Mageplaza SMTP module installed.

Here is an excerpt  my controller code. the $to and $from emails are actual emails (just changed it for this post)

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

$storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;

$userSubject='test mail';

$from = [
    'name' => 'sample',
    'email' => 'from@gmail.com',
];

$to = [
    'email' => 'to@gmail.com',
    'name' => 'stuff',
];

$template = "course_request";
$transport = $this->_transportBuilder
    ->setTemplateIdentifier($template) // email template
    ->setTemplateOptions( [
        'area' => \Magento\Framework\App\Area::AREA_FRONTEND,  \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE
        'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID,
    ])
    ->setTemplateVars(['data' => $postObject])
    ->setFrom($from, $storeScope)
    ->addTo($to, $storeScope)
    ->getTransport();
$transport->sendMessage();

$this->messageManager->addSuccess(__('Email was succesfully sent!'));

I am a little new to Magento and it would help if you can explain a little. Thank you very much!


texts: Is there a way to add a pick 3 max in the multiple select form in the custom options page? It's got required but not any other validation.


texts: Copy live website to local server produces issues

texts:
I copied Magento project from server (live working server) to my local server and home page is displaying blank page.

Do I need any configuration before working with project (MySQL access credentials etc.)?

PS: I have my database file.


texts: Magento 2 - Cant buy product - "There are no source items with the in stock status"

texts:
If I try to buy a product, then I get "There are no source items with the in stock status" and "This product is out of stock."

So I opened the product and noticed that the Quantity is set to 0 and grayed out.

If I click on the link text "Advanced Inventory" and enter a value to Qty e.g. 1000 and press on Done and then on save, then it is 0 again after it saves.

What is going on?


texts: Magento2 : How to add delete button in custom form in backend

texts: I am working on the custom extension and I need delete button in the custom form at the backend. When I edit a record, there should be delete button above with other buttons like Back, Reset and Save and continue edit. Please see the screenshot to get more idea. Can someone guide me for it?


texts:
Fatal error: Allowed memory size of 792723456 bytes exhausted (tried to allocate 262144 bytes) in C:\XAMPP\htdocs\magento4\vendor\magento\module-store\Model\Config\Placeholder.php on line 146
Hi when trying to start magento 2 for the first time I get this error i tried changing the memory size in php.ini (XAMPP), in htaccess and also in the root folder of magento. I also tried fixing it in cli but i still get the error


texts: Magento Iphone theme jumps to top on reload category page

texts:
Out of the box the default iphone theme that comes with Magento jumps back to the top of the category page after a user clicks on a product and after viewing the product hits the back button. It is frustrating for the user to have to scroll back down to the point they were previously on the category page.

I have tried different javascript functions to correct this but no matter what I do the page keeps jumping to the top on reload. I am on a linux based server so asp.net is not an option. I don't have this problem on Safari, or Windows browsers but Chrome and Silk do have this problem.

Thanks for any help.


texts:
Our website ships to the UK only. We use parcel force as our courier which prices are decided by the 3 different zones of the UK.

How can I create a plugin which hides/shows methods depending on the post code, or do any plugins already exists.

I can't find any information on this.

Thanks


texts:
I am trying to run Magento2 with a Redis Cluster (running redis-sentinel) as cache and session backend.

I am not sure about how I should do this ? Is it even possible ?

As I see from Collin Mollenhour repository, it seems possible :

https://github.com/colinmollenhour/Cm_Cache_Backend_Redis#redis-sentinel

However, this part was written for Magento1.

But, since the library is the same in Magento2, maybe I can achieve ?

Here is my app/etc/env.php file :

'cache' =>
  array (
    'frontend' =>
    array (
      'default' =>
      array (
        'backend' => 'Cm_Cache_Backend_Redis',
        'backend_options' =>
        array (
          'server' => 'magento2-redis-sentinel', // A load-balanced host where my sentinel service resides.
          'sentinel_master' => 'mymaster',
          'sentinel_master_verify' => '1',
          'port' => '26379',
          'database' => '1',
          'compress_data' => 0,
        ),
      ),
      'page_cache' =>
      array (
        'backend' => 'Cm_Cache_Backend_Redis',
        'backend_options' =>
        array (
          'server' => 'magento2-redis-sentinel',
          'sentinel_master' => 'mymaster',
          'sentinel_master_verify' => '1',
          'port' => '26379',
          'database' => '2',
          'compress_data' => 0,
        ),
      ),
    ),
  ),

However, this does not work, here is what Magento says :

Unable to connect to a redis sentinel: Unknown sentinel subcommand 'setClientTimeout'

But, connecting directly via netcat is OK :

nc magento2-redis-sentinel 26379 (and then issue commands like "info" are properly showing redis-sentinel state).

Does anyone already achieve to get such setup to work?


texts: Magento doesn't detect child theme in different store view

texts:
I have a Magento website with one store view (ITALIAN) and a theme with the child theme and everything is working good.
Today I created a second store view (ENGLISH) but this doesn't recognize the child theme, but only the default theme.

Why?


texts: Add custom dropdown in mini Search magento 2

texts:
How to add this functionality
any one can help me


texts:
I want to know that is paypal standard supports recurring subscription ? That means once I will send all details to paypal and then paypal itself debit amount every defined schedule. and when paypal capture amount  from customer's account I will get an response that time.

Is is feasible with paypal standard recurring subscription ?

Please help me on this.


texts: Call to a member function getIdFieldName() on a non-object in /Core/Model/Abstract.php on line 151

texts:
I get this error message on products page, rest other pages are fine. I have absolutely no clue about this error.

 public function getIdFieldName()
{
    if (!($fieldName = parent::getIdFieldName())) {
        $fieldName = $this->_getResource()->getIdFieldName();
        $this->setIdFieldName($fieldName);
    }
    return $fieldName;
}


texts: How to get first item from product collection

texts:
On the category view.phtml if I get the category and then get a product collection, how can I get the first product form the collection assigned to $_product for use in the code? Here is what I have:

$_category   = $this->getCurrentCategory();
$_collection = $_category->getProductCollection();
$_product    =
$_resource   = $_product->getResource();

I tried using foreach but kept getting errors.


texts: Can't get it to work - Admin grid ui inline editor

texts:
I can't get the inline editing to work in my custom admin UI component grid. It looks like I am missing an important point. Any help would be nice, also a hint how to debug it. I am trying to make the column "customer_email" editable.

You can find the xml here:

https://gist.github.com/gewaechshaus/1f157991165a372634f4b346f2b11e15

Editor Config

https://gist.github.com/gewaechshaus/1f157991165a372634f4b346f2b11e15#file-gewaechshaus_uwp_index_listing-xml-L134

Field Action

https://gist.github.com/gewaechshaus/1f157991165a372634f4b346f2b11e15#file-gewaechshaus_uwp_index_listing-xml-L151

Editable Column

https://gist.github.com/gewaechshaus/1f157991165a372634f4b346f2b11e15#file-gewaechshaus_uwp_index_listing-xml-L223

I followed this tutorial:

https://www.magestore.com/magento-2-tutorial/how-to-code-inline-editing-grid-in-magento-2-backend/#code_inline_editing_grid_in_magento_2_backend

Cheers,
Jan


texts: Can Magento handle complex product options and bundles? (and some other specific needs)

texts:
My company is currently using Volusion and finding it doesn't meet our needs, so we're doing some research on switching.

We need to handle complex product bundles and options representing child products with their own SKUs. It's easiest to explain by example.

Let's say we have a product that includes a control unit, component A, and component B. For component A, they have several options of different sizes, some but not all of which increase the total price. Component B comes in several styles and sizes, but the size must match component A or they will not be compatible. Some styles increase cost as well. Style options are the same regardless of size.

Components A and B are both sold as individual items. Every option for component A has a sku, and every size/style combination for component B also has its own SKU (3 sizes, 3 styles, 9 SKUs). When the product is sold, it should decrease the stock for the control unit, as well as each component. And of course in our back end our shipping dept needs to know what components were selected to pack the correct items.

The ideal UX would be if the customer can choose component A from a dropdown then the dropdown for component B will only show style options and automatically assign the matching size, to prevent customers from purchasing an incompatible combination. Our lead time on these components is very long, so we do not want to allow them to order out of stock components - ideally they should not be listed in the dropdowns at all, though if that cannot be done they need to be made aware of what specific component(s) is/are out of stock so they can make another choice if they want.

Another specific need we have is that we sell to both retail and wholesale clients. Wholesale pricing is product-specific - it's not a flat percentage off or the like. We would like to avoid listing every product twice in a retail and wholesale version - is it possible to flag customer accounts as wholesalers and have them receive the reduced prices on the same listings? Ideally it would display both the wholesale and retail prices to wholesalers but only retail price to regular customers. Going a step further, can we have different pricing for product OPTIONS for customer levels? An example product might be $20 retail / $10 wholesale for the base version, but $22 retail / $11 wholesale with added color - retail customers add $2 to the base price, but wholesalers only add $1.

Going yet another step further, our distributor agreement with one of the brands we stock forbids online sale to retail customers and web only wholesalers but allows us to sell to wholesalers who maintain a brick-and-mortar store. Is there a way to further flag customer accounts as wholesalers with or without brick-and-mortar stores and only display these products to the proper audience? It's fine if we have to manually flag these accounts, but will the system handle pricing and display differences for different customer types?

Can Magento handle these (admittedly complex) specific needs or do we need to look into other providers instead?


texts: Magento 2 problem with remote DB connection

texts:
I have set host value to use a remote IP in my env.php file.
But I got an error saying "Access denied for user 'manager'@'localhost'(using password: YES)"

why Magento 2 still says I'm using the localhost?

I have tested the username and password for mysql, so I'm sure they are correct.
And the mysql user I used have remote access

I have cleared the Cache, di, generation folder.


texts:
I'm constantly getting this log in my var/debug.log file. I'm quite curious about this. I do not understand what it means.

  main.DEBUG: cache_invalidate:
  {"method":"GET","url":"http://127.0.0.1/m4/paym/redirect/?SID=rpgvdrc7v23j38i36i8a274ae1","invalidateInfo":{"tags":["vendor_payment_gateway_2","FPC"],"mode":"matchingTag"},"is_exception":false} []

I some how figured out that it has some connetions with my
 model which is as below:

class Createorder extends \Magento\Framework\Model\AbstractModel implements \Magento\Framework\DataObject\IdentityInterface
{
    const CACHE_TAG = 'vendor_payment_gateway';
    protected $_cacheTag = 'vendor_payment_gateway';
    protected $_eventPrefix = 'vendor_payment_gateway';
    protected function _construct()
    {
        $this->_init('Vendor\Gateway\Model\ResourceModel\Createorder');
    }

    public function getIdentities()
    {
        return [self::CACHE_TAG . '_' . $this->getId()];
    }

    public function getDefaultValues()
    {
        $values = [];

        return $values;
    }
}

Being a magento developer I must understand what my logs are saying.


texts: Get info from pop-up form into email template

texts: I want to get values from this form fields and put into email template. What I was suppose to do? For every field I need to create custom variable, and bind it on field? Documentation is not too informative, as I think.


texts:
Discount on all products in one category

I followed this tutorial and on conditions I selected all categories and applied it didnt apply sale on all products in the store

Then I removed categories with only the action tabs having the rule information and then saved and apply and it still isnt working. Any ideas? I am using 1.9.2.4


texts: Magento 2 installation & Linux file folder permission

texts:
I am using Linux Mint. I installed a quick package of Magento 2 Theme. I tried to browse Admin Panel. But I couldn't browse. Then I found I have to change file & folder permission. I tried below command to change file permission.

foysal@foysal-laptop /var/www/html/aloquick $ find . -type f -exec chmod 644 {} \;

I got below result.

chmod: changing permissions of './var/generation/Magento/Weee/Model/Tax/Proxy.php': Operation not permitted

I tried below command to change folder permission.

foysal@foysal-laptop /var/www/html/aloquick $ find . -type d -exec chmod 775 {} \;

I got below result.

chmod: changing permissions of './var/generation': Operation not permitted

Where is the issue ? Am I using wrong commands ?

UPDATE

I executed (sudo find . -type f -exec chmod 644 {} \; sudo find . -type d -exec chmod 775 {} \;) this commands. But I can't browse both front end and back end of the site.


texts: How to add and use a custom font in Magento 2?

texts:
I purchased a magento 2 theme, but the theme uses the Google api font.

How can I use a custom local font?

Magento ver. 2.3.0


texts: What are the best blogs for Magento 2 tutorial?

texts:
I'm learning Magento 2 and would like to improve my skill in Magento. I can see that there are a lot of blogs available for Magento tutorial but, could you please suggest me the best blog for Magento 2 tutorial?.

Looking forward to hearing from you.


texts: Allowing external developers access to webservices

texts:
I am working on a project where we need to enable webservices within Magento so an external developer can work with them so that they can add, remove & update products.

Having read the docs it seems that either SOAPv2 or REST is the way forward however the item I wanted to confirm is this. If I have extensions installed that affect the catalogue for example hide product x from a,b & c groups I presume I will need to write a wrapper for the the official Magento webservice so that the extension data can also be added, removed or updated. Is that correct?


texts:
I have setup a Ratchet Server to communicate browser <-> server via a websocket.  The communication is working, however it seems the Ratchet service is using one Magento/MySQL connection because after ~8 hours (session lifetime) I get an error that MySQL has gone away.

Websocket Communication Script

<?php
namespace MyApp;
use Ratchet\ConnectionInterface;
use Ratchet\Wamp\WampServerInterface;
use Mage;
Mage::app();

class Pusher implements WampServerInterface {
/**
 * A lookup of all the topics clients have subscribed to
 */
protected $subscribedTopics = array();

protected $clients;

public function __construct() {
    $this->clients = new \SplObjectStorage;
    Mage::getSingleton('adminhtml/session');
}

public function onSubscribe(ConnectionInterface $conn, $topic) {
    $this->subscribedTopics[$topic->getId()] = $topic;
}

/**
 * @param string JSON'ified string we'll receive from ZeroMQ
 */
public function onBlogEntry($entry) {
    $entryData = json_decode($entry, true);

    // If the lookup topic object isn't set there is no one to publish to
    if (!array_key_exists($entryData['category'], $this->subscribedTopics)) {
        return;
    }

    $topic = $this->subscribedTopics[$entryData['category']];

    // re-send the data to all the clients subscribed to that category
    $topic->broadcast($entryData);

}

public function onUnSubscribe(ConnectionInterface $conn, $topic) {
}
public function onOpen(ConnectionInterface $conn) {
}
public function onClose(ConnectionInterface $conn) {
}
public function onCall(ConnectionInterface $conn, $id, $topic, array $params) {
    // In this application if clients send data it's because the user hacked around in console
    $conn->callError($id, $topic, 'You are not allowed to make calls')->close();
}
public function onPublish(ConnectionInterface $conn, $topic, $event, array $exclude, array $eligible) {
    // In this application if clients send data it's because the user hacked around in console
    //$conn->close();

        $helper = Mage::getSingleton('namespace_module/websocket_communication');
        if (strpos($topic, 'request_data') !== false) {
            $helper->requestData($event, $topic);
        } else {
            $helper->logEntry($event);
        }

}
public function onError(ConnectionInterface $conn, \Exception $e) {
}
}

My questions are:

Can I use the current session (admin/frontend) to make sure Ratchet gets a current connection each time it needs to "talk" to Magento? How would this work?
(We are using Redis for session storage)
If not, how can I "reopen" the connection to Magento to avoid the MySQL gone away error?

I also saw this question which looks extremely similar, but could not figure out how to implement the proposed solutions.  Any tips/hints appreciated!


texts: Why are both configurables and simples stored in sales_flat_order_item?

texts:
I am working with sales_flat_order_item using direct sql and I can't make sense of why both configurable and simple products are inserted into the sales_flat_order_item table. What is the reason behind this?

It seems like a lot of redundant data to just keep track of whether the product was added via a configurable product page vs a simple product page.

I'm just trying to understand this behaviour in case I'm missing something which could impact the accuracy of my queries.


texts: Use and change variable for blocks instead of directly hardcoding

texts:
I created a module for viewing bestseller products  :

In my Catalog/Block/Product/Bestseller.php, I have this line :

 $products->setPageSize(6)->setCurPage(1);
                 //-----^

In CMS-->pages-->Home-->contents, I have :

{{block type="catalog/product_bestseller" template="catalog/product/bestseller.phtml"}}

I want to use some sort of configuration instead of hard coding the '6' in my code.

By example, I want to add number_count="6" to the page's content (in block tag),And instead of using '6' in the Bestseller.php, I want to use something like : $this->number_count, How can I  achieve this ?


texts: Magento Add tax on Discount Price in cart

texts:
I want to apply tax on the total that comes after applying discount such as coupon.
Let me explain you further:
Suppose I have a product in cart that costs 1700 and applied a coupon of FLAT40 which is 40% discount. Now the cart totals are as follows:
Sub total = 1700
Discount (FLAT40) = -680
Grand Total = 1020

Now I want to apply a tax of 12.5% of Grand Total which is 1020. I am not able to achieve using magento's tax rules and tax settings.
Can someone help me how can I achieve my goal.
Thanks


texts: How to display ONLY products which associated products are in stock with custom collection

texts:
I'm having a hard time on how to display those configurable products which associated products are in stock only.

For example, if I have a configurable product and the quantity stock status of its associated products are out of stock, then when I create a custom product collection, that configurable product will not be displayed or will not be included in my query.

Here's my custom collection code:

<?php $attributeCode = 'violator_tags';
 // load attribute
  $attribute = Mage::getSingleton('eav/config')->getAttribute('catalog_product', $attributeCode);
  $categoryLink = Mage::getModel("catalog/category")->load(146)->getUrl();
     //146 category ID of BestSeller
     //get option id and label array
  if ($attribute->usesSource()) {
    $options = $attribute->getSource()->getAllOptions(false);
  }

  $products = Mage::getModel('catalog/product')
            ->getCollection()
                ->addAttributeToSelect('*')
                ->addAttributeToFilter(
                            array(
                                  array('attribute'=>$attributeCode, 'finset'=>132)
                            )
                        )
                ->addAttributeToFilter('status', 1);

  // show only enabled products
        Mage::getSingleton('catalog/product_status')
        ->addVisibleFilterToCollection($products);

        Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);

 // show only visible products
        Mage::getSingleton('catalog/product_visibility')
        ->addVisibleInCatalogFilterToCollection($products);
 ?>

Currently, it displays the configurable products with OUT OF STOCK associated products. Did I miss something?

Using Magento 1.9 CE
Please help.

Thanks.


texts: Error - "Object DOMDocument should be created" keeps appearing. Magento 2

texts:
I created a custom module, that was throwing back errors. So I disabled and removed it from the app/code dir.

Then I cleared pub/static, var/generation, var/cache, var/view_processed

But I still kept getting an error that the Block name of the removed module doesn't exist.

I tried redeploying the static files, reindexing and setup:upgrade in the hope that would fix it, but no luck.

So I ended up removing all the files and reverting to a back up from 4 days earlier.

But the error still shows up in my system.log?

main.CRITICAL: Invalid block type: Vendor\ProductSlider\Block\Catalog\Product\ProductSlider [] []


texts:
I need to solve this below error,

  Fatal error: Method
  Magento\Ui\TemplateEngine\Xhtml\Result::__toString() must not throw an
  exception, caught TypeError: Argument 1 passed to
  Webkul\Pos\Model\ResourceModel\Agent\Collection::__construct() must be
  an instance of Magento\Framework\DataObject\Copy\Config, instance of
  Magento\Framework\Data\Collection\EntityFactory given, called in
  /var/www/sqdelivery/app/code/Webkul/Pos/Model/ResourceModel/Agent/Grid/Collection.php
  on line 50 in
  /var/www/sqdelivery/vendor/magento/module-ui/Component/Wrapper/UiComponent.php
  on line 0

My collection file is below.

<?php
 namespace Webkul\Pos\Model\ResourceModel\Agent;
    use
Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;

class Collection extends AbstractCollection  {

    protected $_idFieldName = "id";

     protected $_fieldsetConfig;

     public function __construct( \Magento\Framework\DataObject\Copy\Config $fieldsetConfig)
     {
        $this->_fieldsetConfig = $fieldsetConfig;
     }

    protected function _construct()  {
        $this->_init("Webkul\Pos\Model\Agent", "Webkul\Pos\Model\ResourceModel\Agent");
        $this->_map["fields"]["id"] = "main_table.id";
    }

    public function setAgentData($condition, $attributeData)  {
        return $this->getConnection()->update($this->getTable("pos_agent"), $attributeData, $where = $condition);
    }

    public function groupByEmail()
    {
    $this->getSelect()->from(
        ['email' => $this->getEntity()->getEntityTable()],
        ['email_count' => new \Zend_Db_Expr('COUNT(email.id)')]
    )->where(
        'email.id = e.id'
    )->group(
        'email.email'
    );

    return $this;
    }

     public function addNameToSelect()
    {
    $fields = [];
    $agentAccount = $this->_fieldsetConfig->getFieldset('agent_account');

    foreach ($agentAccount as $code => $field) {
        if (isset($field['name'])) {
            $fields[$code] = $code;

        }
    }

    $connection = $this->getConnection();
    $concatenate = [];

    $concatenate[] = 'LTRIM(RTRIM({{firstname}}))';

    $concatenate[] = 'LTRIM(RTRIM({{lastname}}))';

    $nameExpr = $connection->getConcatSql($concatenate);

    $this->addExpressionAttributeToSelect('name', $nameExpr, $fields);

    return $this;
     }

     public function getSelectCountSql()
    {
    $select = parent::getSelectCountSql();
    $select->resetJoinLeft();

    return $select;
     }

    protected function _getAllIdsSelect($limit = null, $offset = null)
    {
    $idsSelect = parent::_getAllIdsSelect($limit, $offset);
    $idsSelect->resetJoinLeft();
    return $idsSelect;
    }

}

I don't known why it is happening.. please hep me to resolve this error Thanks in Advance


texts:
I have noticed that sometimes, even when I am logged in and want to review a product on my magento website, it asks me to log in. and this must have in one way or the other frustrated some of my website's users from leaving their review.

Does anyone knows what the cause may be and how I can rectify the issue?


texts: configurable product show as out of stock in front end but In stock in back end

texts:
The configurable product shows as out of stock in front end product details page. I checked its associated products, it contains 25 as quantity and status as In stock. Thus the drop down options are not showing in the product description page.

I've also done reindexing, still no changes

Please help


texts: Magento2 : Quantity filter not working properly in product grid

texts:
In magento2 admin panel, I want to filter all product which have quantity zero or no (empty/blank) value.

But when I filter by quantity from 0 to 0 then, it is returning all products.

When I filter from 0.00 to 0.00 then it is returning products with zero quantity.

But it should not happen.

What should I do so that if I enter zero in from and to field then it return all products with out of stock?


texts: Magento2: How to show breadcrumb on home page?

texts:
How to show breadcrumb on home page?
I have enabled breadcrumb option for all cms page from the Admin panle. But it's not apply for home page.
What is the standard way to display breadcrumb on home page also?


texts: enterprise_logging_event_changes table in the DB

texts:
Very general question, but is it okay to clear out the old data in this table prior to go-live? It has a bunch of old development data inside.

Pros / Cons?

Is it useful to keep around or better to just delete and start fresh?


texts: Magento 2 custom account edit form override by amazon pay module (core module)

texts:
I have an issue on magento 2 customer account edit form.

I think generally magento 2 customer account edit form was loaded from vendor/magento/module-customer/view/frontend/templates/form/edit.phtml

My create account templates also loaded from vendor/magento/module-customer/view/frontend/templates/form/register.phtml

For create account template shows the exact path and from there also my template was loading.

But on customer account edit template, I have faced one issue,that was I have enabled the template path hints and checked the template path for the customer account edit form, it shows the below path:
vendor/amzn/amazon-pay-module/view/frontend/templates/form/edit.phtml

I want to customize the customer account edit form, so I have tried to override the core customer module edit.phtml template (vendor/magento/module-customer/view/frontend/templates/form/edit.phtml)

But here it showing the amazon pay module core file.

If any of my extension override that edit.phtml file means, it will show that path. But unfortunately, it shows another core module path (amazon-pay-module).

I'm totally confused with that. Why it is showing the core file path and tested with default magento 2 package, it also shows the correct path from module-customer (core file).

Hereby I have attached the image.

Is I want to override the amazon-pay-module here? It was correct.

can anyone please help me to shootout the issue?

Thanks in advance!.


texts: Magento 2 : When adding 10 (or any number) products to cart with the same sku is there a way to not increment?

texts:
But instead build new line items. For instance if it's the same product just list it twice on the cart page.

As you can see in the picture: the "Portia Capri-29-Blue" have qty 2. But instead of it to increment in the qty box just list each one as a seperate line item.

And for the reason why. Here's what I'm trying to accomplish. using the b2b features in m2 commerce 2.2.3 I've created a way for the roles of buyers to add products to a cart and then save their cart. when their cart gets saved i've sent their cart back to the managers account. If he has all his buyers saved carts in his account. buyer A, buyer B, buyer C. let's say buyer A and buyer C have the same product in their cart. Well when i'm invoicing back to each buyers account how can I know which buyers had the same product if it just increments and merges.

I hope this makes sense and any help would be greatly appreciated. Thank you.


texts: Modify catalogsearch module to search by attribute values

texts:
I have attempted for quite a number of hours to solve this but I can't find the solution.

I want to allow users to search by certain attribute values, for example ingredients, brand OR product name. At the moment I can pass to the query string the type of search we are performing, e.g.

/catalogsearch/result/?q=potato&type=ingredients

I have tried to modify the controllers and helpers in catalogsearch so I can pass this variable on and search for that filter, but I just can't figure out a way to do it.

I would still like to search by name too, so there will need to be a switch e.g.

/catalogsearch/result/?q=potato&type=name

Would need to search product name still.

Any tips for accomplishing this? I've been editing

/app/core/Mage/CatalogSearch/

for hours without any real progress.

Thanks :)


texts: Editing an Existing Theme - Locating the XML

texts:
Sorry for the beginner question but I'm completely stuck, otherwise I wouldn't ask. I'm determined to learn Magento correctly and need pointing in the right direction before I can continue.

I'm editing an existing theme that was installed by another developer, I was looking to only do some CSS but it's apparent that I need to modify the structure of the layout.

Please see the website below:

dev.best-brilliance.com/?___store=ebay&___from_store=default

I've changed the logo but need this to be in the middle of the page like in this mockup below:

According to the Magento guide that I read I should be able to identify the location of the XML file by enabling template hints, however this doesn't seem to be the case. Here is a screenshot of the page with template and block name hints enabled:

The path for the header is frontend/ultimo/bb/template/page/html/header.phtml but this a PHP file. The block name is Mage_Page_Block_Html_Header which apparently should be the XML file but I cannot find this anywhere within my FTP folders. There's no reference to where this is located and I've searched through many of the folders to try and locate it. As far as I'm aware, once I open this file I will be able to modify the structure of the layout and achieve a central logo.

Could somebody please tell me what I'm doing/thinking incorrectly here and give me some advice on how to correctly find what I need to? Thank you so much for your time.


texts:
Hi guys I'd like to be able to give my CMS pages a PHP variable so that I can identify them and display a PHP array on the page (Basically giving me great control over the content that is displayed within my CMS pages).

Is this possible?


texts: How can I change order status to 'Pending'?

texts: Is there any way to change the status of an order from Processing to Pending in the admin? I know how to do this in the database, but can it be done in the admin and if so what it the process? Are there any drawbacks to doing this?


texts: Same root category, different category structure based on store views

texts:
I have 2 store views sharing the same root category.

Is it possible to change the category structure based on store view?

If I drag the category on a store view it makes the change in the other store view.

Maybe there is a setting that I don't know.

To be clearer, I need a sub-category to have different parents based on store view, without duplicating it.


texts:
I have created my own new theme in Magento 2 clone from blank theme of Magento2.

When I open up product view page,  It's showing blank page (Body totally blank).

I have re-checked all my settings through my new theme like (syntax error, html and layout files) but its seems good.

How to fix this this issue? Anyone getting same this problem ?


texts:
I have a requirement where I need to add my custom discount block only if the discount module is enabled from backend. I can obviously add it in using getStoreConfig() values, but I need to know is it possible to add IFCONFIG in our modules etc/config.xml file ?

Below is my sample config.xml file code but somehow its not working.

<global>
    <sales>
          <quote>
                <totals>
                    <testing ifconfig="mysettings/foo/sayhello">
                        <class>NameSpace_ModuleName_Model_Testing</class>
                        <after>subtotal</after>
                    </testing>
                </totals>
            </quote>
     </sales>
</global>


texts: Does magento 2.3.3 accept external image server?

texts:
After successfully completed data migration, extra slash added on image url if image get from other server.

Note :

If url like this -> magento1.com/media/catalog/product/2/9/29594114-1.jpg instead of magento1.com/media/catalog/product\cache\f2b44f5a43f5823dafd935ad802e62ad/2/9/29594114-1.jpg image visible.


texts: How to set different product attribute Default value for different store view?

texts:
I'm using magento 2.4, i just created a new product attribute like this:
     $eavSetup->addAttribute(
        \Magento\Catalog\Model\Product::ENTITY,
        'brand_history',
        [
            'type' => 'text',
            'label' => 'Brand History',
            'input' => 'textarea',
            'source' => '',
            'frontend' => '',
            'required' => false,
            'backend' => '',
            'sort_order' => '74',
            'global' => ScopedAttributeInterface::SCOPE_STORE,
            'visible' => true,
            'user_defined' => true,
            'searchable' => false,
            'filterable' => false,
            'comparable' => false,
            'visible_on_front' => false,
            'unique' => false,
            'group' => 'General',
            'used_in_product_listing' => false,
            'is_used_in_grid' => true,
            'is_visible_in_grid' => false,
            'is_filterable_in_grid' => false,
            'wysiwyg_enabled' => true,
            'option' => array('values' => array("")),
            'group' => $groupName,
            'apply_to' => 'brand',
            'default' => '
History:

Built in: 1992.

Can survive in the cold winter night.

',
        ]
    );

currently, when I create a new product, I can see the default value. The problem is i have a different store view that has a different language, and when i changed the store view when i create the product I need to have a different default value, how can I achieve this?


texts: Different Bundle Product prices per store view?

texts:
I'm attempting to set up bundle products with a main fixed price of 0 and prices and amounts specified in the "Bundle Items" section of product page. This is for promotions, so we can offer certain number of products or a set of products at reduced prices.

We have our prices set per store view, and it works fine for setting different prices of simple products. However, I can't seem to change the fixed prices of bundle items without it setting itself on every store view (including default). Does anyone have any tips/advice? To clarify, I set products and prices at the bottom of the left hand menu on the Bundle Product page titled "Bundle Items" and each is set to a fixed price of 0 in the "Prices" tab in this list.


texts:
I just want add a custom function in layered navigation block Magento\LayeredNavigation\Block\Navigation

the function :

public function getActiveFilters()
{
   $filters = $this->getLayer()->getState()->getFilters();
   if (!is_array($filters)) {
        $filters = [];
   }
   return $filters;
}

ive tried to create custom module to override block with preferences as well as plugin, but no luck its not working.

at first try, im using preference. I use this code in

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">
<preference for="Magento\LayeredNavigation\Block\Navigation" type="Vendor\Module\Block\Navigation" />
</config>

and create block in my custom module

<?php
namespace Vendor\Module\Block;

class Navigation extends \Magento\LayeredNavigation\Block\Navigation
{
    /**
     * Retrieve active filters
     *
     * @return array
     */
    public function getActiveFilters()
    {
        $filters = $this->getLayer()->getState()->getFilters();
        if (!is_array($filters)) {
            $filters = [];
        }
        return $filters;
    }
}

but its not working, as well as using plugin to override block.

am I missing something?
and what is the best way to override block?

Thanks in Advance.


texts: Backend automatically removes leading zeros / 0 from zip codes - Magento 2.3.4

texts:
In Germany, several cities have a leading 0 in the zip code e.g. 07907. When customers with such a zip place an order, magento removes the first zero and stores a 4-digit zip code with that customer and transaction even though the customer's input is a 5-digit requirement.

Even if i try to edit the shipping address afterwards, it still won't save the first 0.

This causes massive validation errors with DHL or other fulfillment partners.
I can't beliebe that a shop software would not have thought about zips like this, this can't be a default setting?
Edit: I found a strange workaround. If I edit the address and add a 1 to it, making it 17907 and save, it changes the zip to 17907. If I then change 17907 to 07907 and save, it actually shows the right zip 07907... does that mean it is a storing issue ?


texts: Magento2 API : update product data not assign to All store view

texts:
API call : /V1/products/{sku}

  I'm Updating product by API.

  In which I'm passing website ids 0,1,2.

  It will update data only in stores, not to All store View.

  I don't want it to update storewise,it should update Globally to all
  stores.

How can I achieve this?

  UPDATE

  I want to get Product All Store View and Store wise, also want the
  same update product store wise and all store view. How can I achieve
  it by API?

  I want same for categories

Magento: 2.2.2


texts:
I got a copy of my Magento in another server, all checked permissions, vanilla installation, domain, but I don't find the issue, I keep seeing this error message below.
Error 503 Backend fetch failed
Backend fetch failed

I found this reference from Magento but didn't work.
https://support.magento.com/hc/en-us/articles/360034631211-Troubleshooting-503-errors
I'm sure the issue is in these lines below, when I removed them, it worked, but I know I need it to not serving content while PHP is down.
/etc/varnish/default.vcl.

How could I fix it?


texts: MAGENTO 2 - How to trigger function on the template after admin save?

texts:
I'm wondering it's possible to call (trigger) method on the frontend when admin changes something in backend (admin panel)

Suppose that I have banner which has image with 24h cache-validation time. I want to refresh local storage after admin's save action in the banner section and I know that I don't have possibility to get customer's local storage via PHP. I have been done plugin  which executed function afterSave only so far but what's next? do you have any ideas


texts: Magento 2: Advanced Custom Fields for CMS Pages

texts:
As in Wordpress, we have https://www.advancedcustomfields.com/.

So in Magento 2 we have http://www.advancedcontentmanager.com/download-acm-extension-m2.html

It helps Customer/Client to Manage their CMS Page WithOut knowing HTML/Technical Knowledge.

Is there any better way to manage this using a Free plugin of Customization?


texts: Paypal magento 2.3.5-p1 0000820SQLSTATE[23000]: Integrity constraint violation

texts:
I have a brand new Magento installatio 2.3.5.-p1
Payments with Banck Transfer or Cash on delivery give no error.
If I try to use Paypal method:

I am prompted to paypal
It collects my payment informations
I sucessfully pay
I am redirected back to my magento domain.compaypal/express/return/?token=EC-7D709576V4787045H&PayerID=SQNQ5MK5G7J3A

and there i get this error:
0000820SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jeko_db`.`sales_invoice`, CONSTRAINT `SALES_INVOICE_ORDER_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE), query was: INSERT INTO `sales_invoice` (`store_id`, `base_grand_total`, `shipping_tax_amount`, `tax_amount`, `base_tax_amount`, `store_to_order_rate`, `base_shipping_tax_amount`, `base_discount_amount`, `base_to_order_rate`, `grand_total`, `shipping_amount`, `subtotal_incl_tax`, `base_subtotal_incl_tax`, `store_to_base_rate`, `base_shipping_amount`, `total_qty`, `base_to_global_rate`, `subtotal`, `base_subtotal`, `discount_amount`, `billing_address_id`, `state`, `shipping_address_id`, `store_currency_code`, `transaction_id`, `order_currency_code`, `base_currency_code`, `global_currency_code`, `increment_id`, `discount_tax_compensation_amount`, `base_discount_tax_compensation_amount`, `shipping_discount_tax_compensation_amount`, `base_shipping_discount_tax_compensation_amnt`, `discount_description`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

Payment is collected on Paypal but no sign of order in magento

Did anyone had the same issue?
Any Idea?
david


texts: Magento 2 strong performance issues (cron)

texts:
I'm having large performance issues with magento2. The pages takes several seconds (up to minutes) to load the front- and backend. Also the "cron:run" command takes quite a long time. I configured cronjobs as mentioned and after a while I have multiple instances of cron:run running and obviously this is consuming very much CPU and RAM capacities. The server gets stuck very soon.

I have the developer mode and all caches active and the code is reindexed.

I'm running PHP 7 and MySql 5.7 behind an Apache 2.4.10 on Debian 8. I tried to run Magento2 on a different machine and reinstalled it (on the same machine) but the problems are persistent.

Any ideas? I cannot run magento2 in production with this behavior.


texts: Image always loading placeholder in e-mail template

texts:
I'm trying to create some fancy e-mail template for the productalert (when a product returns back in stock) in our website, but I'm not able to load the product image, in any method. In the /template/email/productalert/stock.phtml file I've tried:

(string)Mage::helper('catalog/image')->init($product, 'thumbnail')->resize(130, 130)

using thumbnail/image/small_image
or

$product->getImageUrl()

both with or without a $product = Mage::getModel('catalog/product')->load($product->getId()); before.

All I get is always the placeholder. Images are loaded correctly in the website.

Any hints?


texts: Option product quantity is zero, not displaying in configurable product in magento 2.2

texts:
I tried admin panel settings

  Products -> Catalog ->inventory

Dispaly product if out of stock (yes). But still for configurable product of my swatch option quantity is (0) zero, that option(child) product was not displaying.

I like to display all child products it was In-stock and Out-stock

Please help to find this solution

Thanks


texts: On the checkout page, after entering in credit card information and clicking Place Order the page will show the loading icon and it will never stop. There are no errors in the magento logs or in the server logs. I turned on Paypal debug and the log shows Approved, but the transaction is not going through in paypal or magento.


texts: Magento showing Price Difference in configurable Products

texts:
I have a Magento website where I have set up many configurable products with the different price.

There configurable options drop-down shows its associated products with the price difference. While I want to show their exact price instead of their price-difference.

You can have a look at my website page "http://www.tuneablestest.com/cds-dvds" and also see below image to understand my problem clearly-

I hope my problem is clear to all and please suggest me anyway to show their actual price.


texts: Resizing Header Image to display full screen on all devices/screens

texts:
I am using Magento 2.1 and am trying with Modernizr to get my header image fill the full screen on all screens and devices.

I have followed the instructions from the link:
Magento2: use Modernizr in my custom theme

I don't get it working, and since there was no official solution given in the instructions I followed in the link am I hoping someone could help out.


texts: Magento 2: Details in checkout formatted with HTML-tags

texts:
For the title of an article, I am using HTML-code.
Unfortunately, the HTML-code in the cart is not written as formatted in HTML – it is written with the HTML-tags, like:

"This is a title.
Yeah, really!"

The item is rendered with the following command in "details.html"

data-bind="html: full_view"

I would like to show it like this:

This is an title.
Yeah, really!

The template comes from here:

vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml

and looks like this:

 <?php foreach ($_options as $_option) : ?>
  <?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?>

<?php echo $block->escapeHtml($_option['label']) ?>

     <?php if (isset($_formatedOptionValue['full_view'])): ?>
      <?php /* @escapeNotVerified */ echo $_formatedOptionValue['full_view'] ?>
     <?php else: ?>
      <?php /* @escapeNotVerified */ echo $_formatedOptionValue['value'] ?>
     <?php endif; ?>

 <?php endforeach; ?>

Does anybody know how to achieve this? Many thanks!

The problem seems to be "echo $_formatedOptionValue['full_view']" – but I do not understand where this value comes from.
I really appreciate any hint!


texts:
The theme exist in backoffice and in my code but when trying to add product i get this error : Required parameter ‘theme_dir’ was not passed
please help and thanks in advance


texts: Help with product images generated in cache

texts:
I have added clear, higher resolution images in admin panel but don't know why the images looks a lot transparent in front end.
URL: store.enconnex.com

Please help.


texts: Magento 2 , How to create new folder in var/log?

texts:
I wanted to add custom log files in separate folders. I have created one helper to create log and calling every time that helper.

Here is the helper file :

<?php

namespace Custom\Product\Helper;
use Magento\Framework\Filesystem;

class CustomLog {

    protected $_fileSystem;

    public function __construct(
        Filesystem $file_system
    ){
        $this->_fileSystem  = $file_system;
    }

    public function Clog($folder_name,$file_name,$data)
    {
        $directory = BP.'/var/log/'.$folder_name.'/'.$file_name;
        $writer = new \Zend\Log\Writer\Stream(BP . $directory);
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info($data);
    }

}

and I have tried with filesystem also still folder , files are not creating.

Here is the file system code :

public function Clog($folder_name,$file_name,$data)
    {
        $directory = BP.'/var/log/'.$folder_name;
        $writer = $this->_fileSystem->getDirectoryWrite($directory);
        $file = $writer->openFile($file_name, 'w');

    }

Please help me to resolve this issue .


texts: Removing manually updated extension from Magento Connect List (cosmetic fix)

texts:
Hi we want to remove an extension fom the Magento Connect list. Situation is

we installed via magento connect
since last year we updated this spec. plugin via FTP/zip file
but the magento connect keeps showing the "old" version

How can we remove the listing in magento connect? (maybe without actually touching any files, because everything works fine). I understand it is cosmetic only.

thanks!


texts: How to position the footer links in magento1.9?

texts: I want to remove the links in footer (below company, connect with us block) & move the newsletter block above the footer block in magento1.9 from below image:


texts:
I am on Magento ver. 1.9.1.0

I am trying to get a promotion rule to work "Buy X get Y free"

Meaning if customer buy Item OW-1 , the customer will get item WL-1 free.  I tried many times having both products in my cart to test but is not working after creating promotional rules.

My rule is:

If ALL  of these conditions are TRUE :
If an item is FOUND  in the cart with ALL  of these conditions true:
SKU  is  WL-1

Apply

Discount Amount *

Maximum Qty Discount is Applied To

Discount Qty Step (Buy X)

Apply to Shipping Amount

Free Shipping

Stop Further Rules Processing

Apply the rule only to cart items matching the following conditions (leave blank for all items)If ALL  of these conditions are TRUE :
SKU  is  OW-1


texts: Custom module, controller action trigger

texts:
I am developer, new to magento, and I just took over a project from another dev team so the code is totally strange to me.
They built a custom module, and I have trouble figuring out when/where a certain action from inside a controller is triggered.

Here is the file structure/path:
app -> code -> local -> FOLDER -> MODULE FOLDER -> controllers -> IndexController.php
Inside this index controller lies the indexAction() action.

When is this action triggered?
What should I look for?
Any idea is helpful


texts: Search engine randomly switch back to MYSQL

texts:
I have an issue with Elasticsuite and I really cant figure out what's happening !
(https://github.com/Smile-SA/elasticsuite)
Sometimes when editing products/category or others action in the admin the search engine is automatically switch back to MYSQL and so the site crash on category pages + search ...
The weird thing is when it happens it look like the indexer are removed from the table "mview_state" ... Also when it happens the page "Index managment" in the admin is empty.
The only solution to get it back is to flush the cache (sometimes 2 times) and magically it came back
Magento Version : 2.3.3 CE
ElasticSuite Version :~2.8.0
Environment : Production
Error I could catch into exception.log :
main.CRITICAL: elasticsuite_categories_fulltext view does not exist. {"exception":"[object] (InvalidArgumentException(code: 0): elasticsuite_categories_fulltext view does not exist. at /var/www/vhosts/****/htdocs/releases/20210211121420/vendor/magento/framework/Mview/View.php:182)"} []

And after flushing cache its back :

Any help would be much appreciated ! Thanks !


texts: Customer information not displayed in header after login

texts:
I am logged in my local machine as customer and magento header not displaying the name of logged in user.

I am also tried to add product but cart is empty.

Give me your suggestions to resolve this issue.

Thanks in Advance.


texts: Magento : Module With an Input to Database

texts:
I am creating module that would display estimated delivery time.

I want to have a section in admin panel under "system"->"configuration" for my module that would contain seven input fields (one for each day of week), similar to this:

The data should be stored in a database table.

I've tried searching for way to do this, but I couldn't find tutorials doing exactly this, and since i'm relatively new to Magento, I don't really know what needs to be changed.


texts: Overwrite magento 2 default customer rest api

texts:
I use magento 2 rest /V1/customers/me it get response like this

{
    "id": 2,
    "group_id": 1,
    "default_billing": "2",
    "default_shipping": "2",
    "created_at": "2018-03-30 07:53:13",
    "updated_at": "2018-03-30 08:53:10",
    "created_in": "Default Store View",
    "email": "test@test.com",
    "firstname": "test",
    "lastname": "test",
    "store_id": 1,
    "website_id": 1,
    "addresses": [
        {
            "id": 2,
            "customer_id": 2,
            "region": {
                "region_code": "test",
                "region": "test",
                "region_id": 0
            },
            "region_id": 0,
            "country_id": "IN",
            "street": [
                "test"
            ],
            "telephone": "123123123",
            "postcode": "123123",
            "city": "test",
            "firstname": "test",
            "lastname": "test",
            "default_shipping": true,
            "default_billing": true
        }
    ],
    "disable_auto_group_change": 0
}

I created custom module "Package_Subscription" and i created model function also $model->getActiveSubscription($customer_id); .

I need /V1/customers/me response like this

  {
    "id": 2,
    "group_id": 1,
    "default_billing": "2",
    "default_shipping": "2",
    "created_at": "2018-03-30 07:53:13",
    "updated_at": "2018-03-30 08:53:10",
    "created_in": "Default Store View",
    "email": "test@test.com",
    "firstname": "test",
    "lastname": "test",
    "store_id": 1,
    "website_id": 1,
    "addresses": [
        {
            "id": 2,
            "customer_id": 2,
            "region": {
                "region_code": "test",
                "region": "test",
                "region_id": 0
            },
            "region_id": 0,
            "country_id": "IN",
            "street": [
                "test"
            ],
            "telephone": "123123123",
            "postcode": "123123",
            "city": "test",
            "firstname": "test",
            "lastname": "test",
            "default_shipping": true,
            "default_billing": true
        }
    ],
    "package_subscription" :[
        [
            "subscription_id" :1,
            "subscription_type": "face",
            "lastMonthProduct" : 13,
            "nextMonthProduct" : 29,
            "totalDeliverd" : 10,
            "pandingProduct" : 2,
            "renew_link" : "http://localhost/magento2/subscription/renew/id/1"
        ],
        [
            "subscription_id" :2,
            "subscription_type": "body",
            "lastMonthProduct" : 56,
            "nextMonthProduct" : 67,
            "totalDeliverd" : 3,
            "pandingProduct" : 9,
            "renew_link" : "http://localhost/magento2/subscription/renew/id/2"
        ]
    ],
    "disable_auto_group_change": 0
}


texts: Magento 2: Why are there Multiple Calls to `_.extend`

texts:
The underscore javascript library contains a method named extend.  You can use extend to copy properties of one javascript object to another javascript object in a consistent way.  These properties can be data, or javascript functions.

Magento 2 uses this to give objects methods.  You can see any example of this here

#File: vendor/magento/module-ui/view/base/web/js/core/renderer/layout.js
_.extend(layout, {
    iterator: function (parent, node) {
    //...
});

By copying the interator property to the layout object, the underscore JS library gives the layout object an interator method.

What I don't understand is why Magento ends calling extend multiple times.  From the same file.

_.extend(layout, {
    iterator: function (parent, node) {
    //...
});

_.extend(layout, {
    waitTemplate: function (parent, node) {
    //...
});

_.extend(layout, {
    manipulate: function (node) {
    //...
});

I get that each of these extend calls copies a different set of properties -- but is there a compelling technical reason Magento's core developers have spread these out into three different calls?  Or is this just style (possibly laziness/busyness) showing its hand?


texts: Directory not being unloaded after adding it to the exclude portion of view.xml

texts:
I added this line to my view.xml file.
<exclude>
    <item type="directory">Lib::knockoutjs</item>
    <item type="directory">Lib::knockoutjs/kockout</item>
</exclude>

After that I ran the following commands
php bin/magento setup:di:compile
php bin/magento cache:flush
bin/magento setup:static-content:deploy

But when I visit the site again, I'm still seeings files like knockout.min.js being loaded. The full path to the knockoutjs directory is the following. What am I doing wrong?
/html/lib/web/knockoutjs


texts: What's the difference between `getCacheKeyInfo` and `_getCacheId`?

texts:
What's the difference between getCacheKeyInfo and _getCacheId?
Why _getCacheId is not enough to cache a block?


texts: Magento 2 USPS API estimated delivery date (standards and commitments api)

texts:
How can I add estimate delivery date for USPS shipping method? I am searching over google but no luck, how can I achieve this in Magento 2.

I did this in UPS and want the same in USPS.


texts: Export/import base images in Magento 1,9

texts: I would like to export ALL base images on my database in Magento 1.9 platform in order to edit them in an image editor and import them (rewrite) once edited.


texts: Are there any Magento Code Release Notes?

texts:
I have been looking for some kind of code release notes. I have browsed through the released notes information and through all the versions trying to find any kind of clear statement where they say which files have added, edited or deleted.

https://devdocs.magento.com/guides/v2.2/release-notes/bk-release-notes.html

The purpose of this is that I have Custom Modules which I need to modify in order to get them working for the Magento version that I need and the release notes are useful but it does take time to have a look at each change in an attempt to get the right code written in the modules.

In my case I'm trying to go from 2.1.9 to 2.2.5.

As I said, is there anywhere I could search? If there isn't, how do you guys do it? Just looking at the error logs and the release notes and working with all of it? Thank you for your time.


texts: Magento2: How to set pagination for wishlist?

texts:
As my default wishlist collection which is coming from block is not working due to the applied theme in my magento2 site.

So, I applied the collection on my list.phtml file. And the problem is I need to apply pagination for this.

How to apply pagination for the wishlist listing page.

Here is my code:

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

// @codingStandardsIgnoreFile

?>
<?php
/** @var \Magento\Wishlist\Block\Customer\Wishlist\Items $block */
$columns = $block->getColumns();
?>

    <?php if (count($block->getItems())): ?>

        <?php

        //NEW
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $customerSession = $objectManager->get('Magento\Customer\Model\Session');
        $customerData = $customerSession->getCustomer()->getId();
        $wishlist_collection = $objectManager->create('Magento\Wishlist\Model\Wishlist')->loadByCustomerId($customerData, true)->getItemCollection()->setOrder('added_at','DESC');

        //OLD DONT REMOVE
        //$wishlist_collection = $block->getItems();

        foreach ($wishlist_collection as $item): ?>
            <?php //print_r($item->getAddedAt());?>
            <li data-row="product-item" class="product-item" id="item_<?= $block->escapeHtmlAttr($item->getId()) ?>">

                    <?php foreach ($columns as $column): ?>
                        <?= $column->setItem($item)->toHtml();?>
                    <?php endforeach; ?>

        <?php endforeach; ?>

    <?php else: ?>

            <?= $block->escapeHtml(__('This Wish List has no Items')) ?>

    <?php endif; ?>

<?php foreach ($columns as $column): ?>
    <?= $column->getAdditionalHtml() ?>
<?php endforeach; ?>

Any help would be appreciated.


texts: Magento 1.9 createBlock('catalog/product_list') to show specific only products

texts:
Here is my code which show products based on specific category
echo $this->getLayout()->createBlock('catalog/product_list')
                        ->setData('category_id', '25')
                        // ->setAttribute('product_type', $category->getName(), 'text')
                        ->setData('column_count', '4')
                        ->setData('mode', 'grid')
                        ->setData('limit', '4')
                        ->setData('name', 'product_list')
                        ->setTemplate('catalog/product/checkout_list.phtml')
                        ->toHtml();

But what I am trying to implement is, say these are product ids 2,4 and Category Id 25 have products 1,2,3,4. So I would like to show only 2 product, but the above method shows all the 4 products. Any only can help me figure out this?


texts: How can I add new options to a product attribute from a helper in Magento 2?

texts:
I have a product attribute 'test' of with a type 'int' and input 'select'.

I'm trying to add new options to it from within a helper.

It seems like the following code should do this for me but it doesn't.

$option = $this->_optionFactory->create();
$option->setLabel('new_label');
$option->setValue(1);
$option->setSortOrder(0);
$this->_optionManagementFactory->create()->add(\Magento\Catalog\Model\Product::ENTITY, 'test', $option);

In the above code
$this->_optionFactory is\Magento\Eav\Model\Entity\Attribute\OptionFactory

and $this->_optionManagementFactory is \Magento\Eav\Model\Entity\Attribute\OptionManagementFactory


texts: My new module does not fire or I'm missing something obvious.. please help

texts:
I'm trying to rewrite Magento wysiwyg config class, specifically one constant,, all in the need to change the default upload location of images in admin (for products, cms pages etc..) and this is my code:

etc/modules/Mk_ImagePath.xml

<?xml version="1.0"?>
<config>
  <modules>
    <Mk_ImagePath>
      <active>true</active>
      <codePool>local</codePool>
      <version>0.1.0</version>
    </Mk_ImagePath>
  </modules>
</config>

in my app/code/local/Mk/ImagePath/etc

<?xml version="1.0"?>
<config>
  <modules>
    <Mk_ImagePath>
      <version>0.1.0</version>
    </Mk_ImagePath>
  </modules>
  <global>
    <helpers>
      <imagepath>
        <class>Mk_ImagePath_Helper</class>
      </imagepath>
    </helpers>
    <models>
      <imagepath>
        <class>Mk_ImagePath_Model</class>
        <resourceModel>imagepath_mysql4</resourceModel>
      </imagepath>
            <cms>
                <rewrite>
                    <wysiwyg_config>Mk_ImagePath_Model_Cms_Wysiwyg_Config</wysiwyg_config>
                </rewrite>
            </cms>
    </models>
  </global>
</config>

and in my app/code/local/Mk/ImagePath/Model/Cms/Wysiwyg

<?php
class Mk_ImagePath_Model_Cms_Wysiwyg_Config extends Mage_Cms_Model_Wysiwyg_Config
{
    const IMAGE_DIRECTORY = 'wysiwyg' . 'test';
}

I don't have any errors in console but I have a filling that my module is not fired at all?
I'm on magento 1.7.0.2 if that helps,, thanks!


texts: Magento 2: Product Custom Tab with Attribute WYSWYG shows broken image

texts:
I am running Magento CE 2.2.2 and I need to create another TAB in the product information page near the details and review tabs.

I created a new Attribute, named it "Tab". In the attribute, options set the input type to Text Area and enabled WYSIWYG Editor.

When I put Text in the field, the text shows fine. When I insert an image, in backend shows fine, but in frontend, it shows broken.

When inspected the code noticed that the code is generated wrong.

the code shows like this:

when it should show like this:

I am thinking that I missed some link to convert the link from the editor to the actual link. Does anyone know how to fix this?

This is a link to download the code of my block:
https://www.dropbox.com/s/xmi7pvkd206s7vd/Test_Tab.zip?dl=0


texts: Magento 1.9.3.2 - Exception printing is disabled by default for security reasons

texts:
I have just moved a Magento install from one server to another and now when I try to access the frontend I get the "Exception printing is disabled by default for security reasons" error.

I have already tried the following, but none work:

Added reference to tmp folder magento_directory/lib/Zend/Cache/Backend/File.php
and also created the folder in the root directory.
Delete everything is cache and session folders.

The output from the error report is below:

Fatal error: Uncaught Error: Class name must be a valid object or a string in /home/samplesite/public_html/app/code/core/Mage/Core/Model/Resource.php:225
Stack trace:
#0 /home/samplesite/public_html/app/code/core/Mage/Core/Model/Resource.php(188): Mage_Core_Model_Resource->getConnectionTypeInstance('{{db_type}}')
#1 /home/samplesite/public_html/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('{{db_type}}', Array)
#2 /home/samplesite/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(141): Mage_Core_Model_Resource->getConnection('core_setup')
#3 /home/samplesite/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(234): Mage_Core_Model_Resource_Setup->__construct('core_setup')
#4 /home/samplesite/public_html/app/code/core/Mage/Core/Model/App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/samplesite/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules()
#6 /home/samplesite/public_html/app/Mage.php(683): Mage_Core_Model_App in /home/samplesite/public_html/app/code/core/Mage/Core/Model/Resource.php on line 225

Could anyone help with understanding the issue and possible solutions please?


texts: When did data install/upgrade scripts get introduced

texts:
What version of Magento first allowed data install/setup scripts i.e. mymodule/data/mymodule_setup...

It looks like in 1.5 CE data scripts do not work - but a cursory look at the core resource setup class i can see references to them?

I am wondering when they were introduced and from what version they can be used?


texts:
I would like to override a specific block of a module that I've downloaded, because there is a specific methods I would like to add, and I don't like the idea of modifying module's core files.

I have hard time to structure my xml correctly, which is why my block does not gets loaded instead of the original one. I've tried following the tips provided by @Joseph in this question, but no luck.

Now, let me provide some file structure.

The interesting part of the downloaded module config.xml

<?xml version="1.0"?>
    <config>
        <modules>
            <EM_Megamenupro>
                <version>1.0.0</version>
            </EM_Megamenupro>
        </modules>
        <blocks>
            <megamenupro>
                <class>EM_Megamenupro_Block</class>
            </megamenupro>
        </blocks>
    </config>

The block I am trying to modify is located in app/local/EM/Megamenupro/Block/Megamenupro.php

Now, my module is located in app/local/Acme/Demo, my block is located in app/local/Acme/Demo/Block/Megamenu.php

My module is active(I checked it up in Administrative panel, its there)

In my config.xml file I've added the following nodes, but it does not appear to be working.

<global>
    <blocks>
        <megamenupro>
            <rewrite>
                <megamenu>Acme_Demo_Block_Megamenu</megamenu>
            </rewrite>
        </megamenupro>
    </blocks>
</global>

Any kind of help would be kindly appreciated. Thank you.


texts: Get quote discount total for each applied discount/promo

texts:
I want to display each  promo name and total applied for current quote in checkout/cart , right now i'm able to display the name of each promo like this:

$quote = Mage::getSingleton('checkout/session')->getQuote();
$discountTotal = 0;
$discounts = array();

foreach ($quote->getAllItems() as ){
  if($item->getAppliedRuleIds() == '' || $item->getDiscountAmount() < 1) {
    continue;
  }
  $discountTotal += $item->getDiscountAmount();
  foreach(explode(",",$item->getAppliedRuleIds()) as $ruleId){
      $rule = Mage::getModel('salesrule/rule')->load($ruleId);
      $ruleName = $rule->getName();
      if (!empty($rule->getCouponCode())) {
        $ruleName = $ruleName . ' - <b>' . $rule->getCouponCode() .'</b>';
      }
      if (array_key_exists($ruleName,$discounts)) {
        $discounts[$ruleName] += $item->getDiscountAmount();
      } else $discounts[$ruleName] = $item->getDiscountAmount();
  }
}
return $discounts;

But the total amount for each promo is wrong, how can i get total for each promo applied in my quote


texts: Google Chrome is failing in loading require.js files in time

texts:
On Magento 2 (ver 2.2.5), with Google Chrome (ver 72.0) I'm getting a wired error I wasn't getting withe previous Google Chrome version (ver 71).
When I visit a product page, I get more then one Uncaught TypeError: from the Console, which makes several JS actions failing.

For instance, the first I got is:

Uncaught TypeError: Cannot read property 'RFC_2822' of undefined

The error is referring to this bit of code:

<script>
require([
    "jquery",
    "jquery/ui"
], function($){

//<![CDATA[
    $.extend(true, $, {
        calendarConfig: {
            dayNames: ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],
            dayNamesMin: ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],
            monthNames: ["January","February","March","April","May","June","July","August","September","October","November","December"],
            monthNamesShort: ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],
            infoTitle: "About the calendar",
            firstDay: 0,
            closeText: "Close",
            currentText: "Go Today",
            prevText: "Previous",
            nextText: "Next",
            weekHeader: "WK",
            timeText: "Time",
            hourText: "Hour",
            minuteText: "Minute",
            dateFormat: $.datepicker.RFC_2822, // << Here what's triggering the error
            showOn: "button",
            showAnim: "",
            changeMonth: true,
            changeYear: true,
            buttonImageOnly: null,
            buttonImage: null,
            showButtonPanel: true,
            showWeek: true,
            timeFormat: '',
            showTime: false,
            showHour: false,
            showMinute: false
        }
    });

    enUS = {"m":{"wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}}; // en_US locale reference
//]]>

});
</script>

The problem here is that that code comes from the Magento core, so I'm not very keen on changing it.
I found that code in the following two files:

vendor/magento/module-theme/view/frontend/templates/js/calendar.phtml
vendor/magento/module-backend/view/adminhtml/templates/page/js/calendar.phtml

Now, the code (<script>....</script>) is in the product page, while the missing object comes from the library datepicker.js which is loaded by require.js as I can see from the browser network inspector, but I guess too late to be used by that block of code.
The require.js is in the <header> block

<script  type="text/javascript"  src="http://website.com/static/frontend/vendor/my-module-theme/en_GB/requirejs/require.js"></script>

Is anyone experiencing the same thing?
Which one is the best way to fix it?


texts: Getting default billing address telephone by Mage::getModel

texts:
I want to get customers Primary Billing Address Telephone number in my module.

I use this code to get customer attributes, (email for example):
$customer = Mage::getModel('customer/customer')
                        ->getCollection()
                        ->addAttributeToFilter('email')

Does Mage::getModel('customer/customer') return Billing Address info, too?
If yes, how can I filter it by addAttributeToFilter()?

Magento 1.9


texts: Magento2: mini-cart not empty after programmatically placing an order on success page

texts:
I have a custom payment gateway module.
When you click on the Place Order button on checkout, it redirects you to an external payment page & after that you return to a custom controller on that module.
This controller handles the payment response & if it's all good - it converts the current quote to an order using placeOrder() from Magento\Quote\Api\CartManagementInterface. Then it redirects you to the normal success page ('checkout/onepage/success/').
The problem is, although the order has been placed & it all worked as it should - the minicart on the header is not empty (You get to the success page, see a link to the order details, but the mini cart stays full).
I tested other payment methods like checkmo, etc... & they always clear the carts somehow, it only happens with this payment method.
*I know that I can use customerData.invalidate(['cart']); on the success page as a workaround (that's my current solution actually, and it works), but I don't like it. I assume that there's something that happens on the other methods/flows that triggers the minicart refresh.What am I missng here?Any idea?


texts: Magento2 Fatal error: Uncaught Error: Call to undefined function Aws\manifest()

texts:
Magento2 getting following error
Fatal error: Uncaught Error: Call to undefined function Aws\manifest() in /mnt/data/home/mo2te673/public_html/vendor/aws/aws-sdk-php/src/AwsClient.php:188
Stack trace:
#0 /mnt/data/home/mo2te673/public_html/vendor/aws/aws-sdk-php/src/S3/S3Client.php(327): Aws\AwsClient->__construct(Array)
#1 /mnt/data/home/mo2te673/public_html/app/code/Thai/S3/Console/Command/StorageExportCommand.php(98): Aws\S3\S3Client->__construct(Array)
#2 [internal function]: Thai\S3\Console\Command\StorageExportCommand->Thai\S3\Console\Command\{closure}()
#3 /mnt/data/home/mo2te673/public_html/vendor/magento/framework/App/State.php(187): call_user_func_array(Object(Closure), Array)
#4 /mnt/data/home/mo2te673/public_html/app/code/Thai/S3/Console/Command/StorageExportCommand.php(133): Magento\Framework\App\State->emulateAreaCode('adminhtml', Object(Closure))
#5 /mnt/data/home/mo2te673/public_html/vendor/symfony/console/Command/Command.php(255): Thai\S3\Console\Command\StorageExportCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Obj in /mnt/data/home/mo2te673/public_html/vendor/aws/aws-sdk-php/src/AwsClient.php on line 188

after running following command

php bin/magento s3:storage:export

I have installed this module

https://github.com/thaiphan/magento2-s3


texts: Mod_rewrite rule - [L] not working as expected

texts:
I am trying to create a mod_rewrite rule that will handle transparently rewriting a friendly URL to a query string redirect behind the browser.

Every  tutorial says to use the last flag [L]

but this does not work, per se. or it seems not to.

The original URL that works looks like this

http://<domain>/locations?state=123&city=343

my friendly URL looks like this

http://<domain>/locations/123/343

my rewrite rule looks like this

RewriteCond %{THE_REQUEST} ^GET\ /locations/
RewriteRule ^locations/(.*)/(.*)$ /locations?state=$1&city=$2 [L]

I get a 404 error when I try to his my friendly URL

however, if I add the redirect flag [R]

RewriteCond %{THE_REQUEST} ^GET\ /locations/
RewriteRule ^locations/(.*)/(.*)$ /locations?state=$1&city=$2 [R, L]

The URL redirects  and  the page loads, however the address bar gets updated to read

http://<domain>/locations?state=123&city=343

Why does the redirect work but the non-redirect not?
is it because it's too late for Apache to consume the rewritten URL and re-parse it to the actual final URL?

How might I get around this?


texts: Magento 2.3: Orders Status not updating.All new orders stuck at "Processing" status

texts:
In SALES > ORDERS Status should be "Complete". But Status still shows as "Processing".
i have run :

  php bin/magento indexer:reindexphp bin/magento cache:clean

Still show Processing state.How can i Resolve this.
Temporary solution available :

  UPDATE sales_order_grid as t1 LEFT JOIN sales_order as t2 ON
  t1.entity_id = t2.entity_id SET t1.status = t2.status WHERE t1.status
  != t2.status"

But i want permanent solution for this issue.


texts: How to load my javascript file before other javascript file from addJs

texts:
I am facing some javascript issues by loading order of custom module Javascript files, so i want to change the loading order of my Javascript files located at magento root root/js/.

But the Javascript files are added by Helper as i mentioned below.

 public function addAssets(Mage_Core_Model_Layout $layout)
    {
        $head = $layout->getBlock('head');
        $content = $layout->getBlock('content');

            $head->addCss('webforms/form.css');
            $head->addJs('prototype/window.js');
            $head->addItem('js_css', 'prototype/windows/themes/default.css');
            $head->addItem('js_css', 'prototype/windows/themes/alphacube.css');
            // logic
            $head->addJs('webforms/logic.js');

            // multistep
            $head->addJs('webforms/multistep.js');

            // stars
            $head->addJs('webforms/stars.js');
            $head->addCss('webforms/stars.css');

            // tooltips
            $head->addJs('webforms/HelpBalloon.js');
            $head->addCss('webforms/helpballoon.css');

            // wysiwyg
            $head->addJs('tiny_mce/tiny_mce.js');

            // calendar
            $head->addJs('calendar/calendar.js');
            $head->addJs('calendar/calendar-setup.js');
            $head->addItem('js_css', 'calendar/calendar-blue.css');

        }

I want to load above jsvascript files before js/varien/product.js.

Can anyone tell me how to change the sort order or loading order of the Javascript files.


texts: Magento 2.2.4 - Breadcrumbs do not show on product pages when default navigation is not present

texts:
I have a Megamenu extension installed replacing the default navigation menu. This however when added breaks breadcrumbs on product pages.

I have debugged by also removing both navigation and this also breaks the navigation so I believe the issue lies with default navigation being required somehow for breadcrumbs to work now. I could of sworn however this was working on 2.2.4 earlier this week as had below issue:

Issue with Magento 2.2.4 - quotation mark in product name break product pages

This i resolved however am sure did not break breadcrumbs as the time. Reverting does not fix breadcrumbs either.

How do breadcrumbs work now? They seem to load asynchronously and not sure they did before.

From what i can tell the below function in breadcrumbs.js renders the breadcrumbs:

    _render: function () {
        var html,
            crumbs = breadcrumbList,
            template = mageTemplate(tpl);

        this._decorate(crumbs);

        html = template({
            'breadcrumbs': crumbs
        });

        if (html.length) {
            $(this.element).html(html);
        }
    },

However im not sure how it grabs the data for the html variable and why it breaks when i remove the default navigation.


texts:
When I use a bullet to increase qty then I use ajax to update cart. After call ajax how to update cart summary. I am stuck here please help me out from this.

also, I used

$("#cart-totals").trigger('contentUpdated');

line in response but its not working :( :(


texts: configurable products attributes not showing in layered navigation unless saved

texts:
I have imported a large amount of configurable products via Magmi. However even after reindexing the whole site via SSH to avoid timeout issues, the attirbutes tied to the configurable products won't show on the layered navigation unless you go into the product in the backend and save it.

This would be fine if it wasn't for the 5,000 products I'd need to do this for. Is there any script or automated way I can fix this.


texts: Update to magento 2.3.5 and doesn't let me change the categories

texts:
I recently updated the magento 2 to 2.3.5 and the Categories have a problem.
if i just click the save button in any category i receive this message:
Argument 1 passed to Magento\Catalog\Model\Category\FileInfo::removeStorePath() must be of the type string, array given, called in /home/adminpsol2016/public_html/vendor/magento/module-catalog/Model/Category/FileInfo.php on line 167


texts: Backend - Created item not showing value in Grid

texts:
Edit: I found the mistake. I'll mark answer as soon as I can (2 day's waiting time)

Hope the titel is clear enough...
I made a small backend module created with 'Magento UMC'. In one of my Tabs I added a dropdown field with a dummy value which I planned to swap with a collection of all Attribute titles. I actually managed to get that done and I also modified the following file so the right value gets saved in the database:

<?php

class MP_Search_Model_Element_Attribute_Source_Attribute extends Mage_Eav_Model_Entity_Attribute_Source_Table
{

    public function getAllOptions($withEmpty = true, $defaultValues = false)
    {
        $options = array();
        $attributeCollection = Mage::getSingleton('eav/config')
                                ->getEntityType(Mage_Catalog_Model_Product::ENTITY)
                                ->getAttributeCollection();

        foreach ($attributeCollection as $attribtue) {
            array_push($options,
                array(
                    'label' => Mage::helper('mp_search')->__($attribtue->getName()),
                    'value' => $attribtue->getId()
                )
            );
        }

        if ($withEmpty) {
            array_unshift($options, array('label'=>'', 'value'=>''));
        }

        return $options;
    }

    public function getOptionsArray($withEmpty = true)
    {
        $options = array();
        foreach ($this->getAllOptions($withEmpty) as $option) {
            $options[$option['value']] = $option['label'];
        }
        return $options;
    }

    public function getOptionText($value)
    {
        $options = $this->getOptionsArray();
        if (!is_array($value)) {
            $value = explode(',', $value);
        }
        $texts = array();
        foreach ($value as $v) {
            if (isset($options[$v])) {
                $texts[] = $options[$v];
            }
        }
        return implode(', ', $texts);
    }
}

I only changed the getAllOtions() method. This is how the original looked:

public function getAllOptions($withEmpty = true, $defaultValues = false)
{
    $options =  array(
        array(
            'label' => Mage::helper('mp_search')->__('All Attributes'),
            'value' => 1
        ),
    );
    if ($withEmpty) {
        array_unshift($options, array('label'=>'', 'value'=>''));
    }
    return $options;

}

I changed the $fieldset->addField() in the /Tab/Form.php to show all Attributes in the dropdown menu:

class MP_Search_Block_Adminhtml_Element_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
{

    protected function _prepareForm()
    {
        $attributeCollection = Mage::getSingleton('eav/config')
                                ->getEntityType(Mage_Catalog_Model_Product::ENTITY)
                                ->getAttributeCollection();

        $attributes = array();
        foreach($attributeCollection as $attribute) {
            array_push($attributes, $attribute->getName());
        }

        $fieldset->addField(
            'attribute',
            'select',
            array(
                'label' => Mage::helper('mp_search')->__('Attribute'),
                'name'  => 'attribute',
            'note'  => $this->__('Choose Attribute'),
            'required'  => true,
            'class' => 'required-entry',

            'values'=> $attributes,
           )
        );

I left the Grid.php untouched since all Attributes are shown in the dropdown field. But if I create an item with an Attribute, for example color, the attribute name doesn't appear in the Grid. If I set the attribute filter to 'color' the item also doesn't get shown. So I'm probably missing something here. I checked all the files but I can't tell which one is responsible for this. If more detail is required please tell me, I didn't wanted to post to much at once.