texts: Change {{media url="wysiwyg/image.jpg"}} in frontend in custom module

texts:
I'm building a custom module, a very simple blog.
I already have everything working. The last thing I added, was de WYSIWYG image upload capability.

In the Admin, everything works fine. But in the fronted, I see the raw source code and the <img> tags are filled with: {{media url="wysiwyg/some_image.jpg"}}

If I navigate to /pub/media/wysiwyg/some_image.jpg, the jpg exists. But I can't figure out how to change this via some helper or function to get it right in the front end.


texts: How to write mobile number length validation in magento by prototype

texts:
I want to create mobile number validation in magento.
Number should to be not less then 10 (7428832128)....
i need to write this by prototype...
basically i don't know how to write this....


texts: How to get simple product id from selected configurable Attribute id and it's value in Magento 2?

texts:
I have configure product id 2671

And selected attributes with value

attributes id 280[color] and selected value 142[Black]
attributes id  757[size] and selected value 181[M]

Based on these values how can I get simple product id of above selected attributes ids and values.


texts: Converting image path to Zend_PDF_Image object

texts:
I have an issue where running the following function is returning the error report:

 "Cannot create image resource. File not found.";i:1;s:2101:"#0 /var/www/html/jack-london/lib/Zend/Pdf/Image.php(124): Zend_Pdf_Resource_ImageFactory::factory('http://127.0.0....')

Here is my code:

$imgPath = Mage::getStoreConfig('sales_pdf/firegento_pdf/factoryx_logo_image');
$logo = Mage::getBaseUrl('media') . "logo/" . $imgPath;

Which is returning me the correct image path:

http://127.0.0.1/media/logo/default/cat.jpg

If I paste it into my browser, the image loads as expected.

Here is my attempt to convert the path into a Zend Image Object:

$logo = Zend_Pdf_Image::imageWithPath($logo);

This is the place in my code where my error report gets generated. I have tried adding quotations around the $logo variable like so:

$logo = "\"" . $logo . "\"";

But it didn't help at all. Not sure what I'm doing wrong here.


texts:
I have a Magento 2.3.0 website that works correctly but suddenly (maybe after a products import, but also other various activities were done) when I try to call ANY (reindex, deploy...) command of "bin/magento" it returns me:

An exception was raised while creating "Request"; no instance returned

I tried to add more debugging output with -vvv but the error remain the same.

Anyone know what could be the cause or any method to further debug it?


texts: Magento2.2.5 : Layout override not taking priority over Magento_blank theme layout

texts:
I am new to Magento 2 and, to begin with, I try to change the header from default Magento_Theme. But I am stuck here.

I followed the doc to create my own theme in app/design/frontend/<my_vendor>/<my_theme_name>.

This theme has Magento/blank as parent in theme.xml.
This seems to work well as I can define website theme to <my_theme_name> in the admin panel.

Then, I tried to override the default Magento_Theme layout.
I copied vendor/magento/module-theme/frontend/layout/default.xml into my theme folder under app/design/frontend/<my_vendor>/Magento_Theme/layout/default.xml.

And to check if that worked, I tried to hide the Header, using the remove attribute as following :
<referenceContainer name="header.container" remove="true">.

This remove doesn't work, whereas it works well when I put the same remove attribute into the default.xml file from the Magento_Theme folder...

The thing is I don't understand why my theme layout seems to not take the priority over the Magento_Theme layout.
Could it be something about modules order in app/etc/config.php ?

I use php bin/magento cache:flush to clear my cache after each modification.

Update : After seeing this stack exchange issue I tried to put
my custom layout under app/design/frontend/<my_vendor>/<my_theme_name>/Magento_Theme/layout/override/theme/Magento/blank/default.xml but that didn't work either.


texts: Send dynamic data in the email for every new registration

texts: I need to send some data in the email which is sent to every new registered user. The data is a string which is to be fetched from the database or an excel sheet(whichever is possible). I was wondering is there is anyway to do that.


texts: magento2 apply patch prodsecbug issue found

texts:
seems simple enough to aplly prodsecbug patch but I get this ...

public_html$ bash PRODSECBUG-2198-2.2-CE.composer-2019-03-27-06-12-19.patch
diff: unrecognized option '--git'
diff: Try 'diff --help' for more information.
PRODSECBUG-2198-2.2-CE.composer-2019-03-27-06-12-19.patch: line 2: index: command not found
PRODSECBUG-2198-2.2-CE.composer-2019-03-27-06-12-19.patch: line 3: ---: command not found
PRODSECBUG-2198-2.2-CE.composer-2019-03-27-06-12-19.patch: line 4: +++: command not found
PRODSECBUG-2198-2.2-CE.composer-2019-03-27-06-12-19.patch: line 5: @@: command not found
PRODSECBUG-2198-2.2-CE.composer-2019-03-27-06-12-19.patch: line 6: =: command not found
PRODSECBUG-2198-2.2-CE.composer-2019-03-27-06-12-19.patch: line 8: syntax error near unexpected token `$actions'
PRODSECBUG-2198-2.2-CE.composer-2019-03-27-06-12-19.patch: line 8: `         foreach ($actions as $action) {'


texts:
I have a Magento store am trying out. When I signup as a user I received expected email. But the concern is that it shows the email sender server information like:

  ME me@mydomain.com via p3pl0129prod.phx.secureserver.net.
  What can I do to remove the

  via p3pl0129prod.phx.secureserver.net from the sender info on email a user receives.

I have checked through the Admin area with no success. I will appreciate any help.


texts:
I'm trying to add a conditional check to my New Order email template by using a helper to determine which Group a customer belongs to. My helper is loading fine, but it seems like the helper doesn't have access to any data (Customer or Order info).

sales.xml

<sales_email_order_invoice_items>
    <block type="sales/order_email_invoice_items" name="items" template="email/order/invoice/items.phtml">
        <action method="addItemRender"><type>default</type><block>sales/order_email_items_default</block><template>email/order/items/invoice/default.phtml</template></action>

Data.php

class Mbs_Emailbygroup_Helper_Data extends Mage_Core_Helper_Abstract {
    public function getEmailTemplate() {
    $customerGroupId = $this->getCustomerGroupId();
    $customerGroupName = Mage::getModel('customer/group')->load($customerGroupId)->getCustomerGroupCode();
        if($customerGroupName = 'Distributors5') {
             return 'email/order/items/order/discount.phtml';
        } else {
            return 'email/order/items/order/default.phtml';
        }
    }
}

The Error

Fatal error: Call to undefined method Mbs_Emailbygroup_Helper_Data::getCustomerGroupId() in /var/www/sites/mbs/app/code/local/Mbs/Emailbygroup/Helper/Data.php on line 5

I've tried calling variations replacing $this with $order or using $order = $this->getOrder() but nothing seems to be getting any data.

How can I check get the Customer Group within the transactional email template?


texts: Changed the Url of my Magento 2 and now getting cgi-sys errors

texts:
I have changed the URL of my Magento in admin panel.

After DNS updated, I'm trying to access the domain but I get following CPanel error page:

  http://www.xxxxxxx.co.il/cgi-sys/defaultwebpage.cgi

I doubled checked the core_config_data to make sure domain is changed and it is.

I have cleared cache, ran reindex, content deploy but
still same result.

Any suggestions?


texts:
Hi currently Magento 2 provide default tab in Product View Page. Now i want to add or change to custom product tab in view page.

Any one have idea how to change custom tab in magento 2.


texts: Magento 2 - Getting error while access the site

texts:
I'm getting the below error while access the website.

  Fatal error: Uncaught Error: Class 'DOMDocument' not found in /home/rugsahos/public_html/vendor/magento/framework/Config/Dom.php:384 Stack trace: #0 /home/rugsahos/public_html/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('__construct('_createConfigMerger('Magento\Framewo...', '_readFiles(Object(Magento\Framework\Config\FileIterator)) #4 /home/rugsahos/public_html/vendor/magento/framework/App/ObjectManagerFactory.php(275): Magento\Framework\Config in /home/rugsahos/public_html/vendor/magento/framework/Config/Dom.php on line 384

Can you please let me know the proper solution for this error?


texts: Add To Cart gives two same product instead of one

texts:
When I click Add to cart, a lightbox opens with the same product twice.

Kindly help.


texts:
When I am adding content to the Home Page via the CMS page named as such, my left column drops down as if it is part of the main content area.  It should stay static on the left.

Edit

My page is southernperformancparts.com if you want to take a look.  I added some gibberish to show my issue.


texts:
While clearing the cache error are came.

Fatal error: Call to a member function setActive() on a non-object in magento\app\code\core\Mage\Adminhtml\Controller\Action.php on line 104

logs created below

exception 'Mage_Core_Exception' with message 'Invalid block type:
Easylife_Pickup_Block_Page
Easylife_Pickup_Block_Page_Head
Easylife_Pickup_Block_Page_Notices
Easylife_Pickup_Block_Page_Header
Easylife_Pickup_Block_Page_Menu
Easylife_Pickup_Block_Notification_Baseurl
Easylife_Pickup_Block_Cache_Notifications
Easylife_Pickup_Block_Notification_Survey
Easylife_Pickup_Block_Notification_Security
Easylife_Pickup_Block_Widget_Breadcrumbs
Easylife_Pickup_Block_Page_Footer
Easylife_Pickup_Block_Notification_Toolbar
Easylife_Pickup_Block_Notification_Window
Easylife_Pickup_Block_Sales_Order_View
Easylife_Pickup_Block_Sales_Order_View_Tabs
Easylife_Pickup_Block_Sales_Order_View_Tab_Info
Easylife_Pickup_Block_Sales_Order_View_Messages
Easylife_Pickup_Block_Sales_Order_View_Info
Easylife_Pickup_Block_Sales_Order_View_Items
Easylife_Pickup_Block_Sales_Order_Payment
Easylife_Pickup_Block_Sales_Order_View_History
..........................
.............................
etc..

I don't know why it's came Can any one suggest me?

how can I resolve this?

Thanks.


texts: Are entity_id and order_id the same in magento 2?

texts:
I am creating a module that is going to save orders to a .csv file. The problem now is that I need both the name of the product and the name of the customer. As far as I know these are not stored in the same mysql table. I can get the customer name form the "sales_order" table and the product name form the "sales_order_item". "sales_order" has an id called "entity_id" and "sales_order_item" has an id called "order_id". Are these ids the same?

Or is there a better way of doing this?


texts: problem with module Magento_Customer after upgrade magento to 2.2.2

texts:
I have updated magento from 2.1.1 to 2.2.2.

The update was successful, but now when I enter the site I see the error:

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Please update your modules: Run "composer install" from the Magento root directory.
The following modules are outdated:
Magento_Customer db data version: defined in codebase - 2.0.12, currently installed - 2.0.9

Exception #0 (Magento\Framework\Exception\LocalizedException): Please update your modules: Run "composer install" from the Magento root directory.
The following modules are outdated:
Magento_Customer db data version: defined in codebase - 2.0.12, currently installed - 2.0.9
#0 /home/brandswearxv/ftp/vendor/magento/framework/Interception/Interceptor.php(121): Magento\Framework\Module\Plugin\DbStatusValidator->beforeDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Magento\Framework\App\Request\Http))
#1 /home/brandswearxv/ftp/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#2 /home/brandswearxv/ftp/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#3 /home/brandswearxv/ftp/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#4 /home/brandswearxv/ftp/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#5 /home/brandswearxv/ftp/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#6 /home/brandswearxv/ftp/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#7 /home/brandswearxv/ftp/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch()
#8 /home/brandswearxv/ftp/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#9 {main}

Anyone know how to solve it ?

EDIT:
error after run command: php bin/magento setup:upgrade

In log exception is code:

[2018-02-01 10:25:43] main.CRITICAL: Asymmetric transaction rollback. {"exception":"[object] (Exception(code: 0): Asymmetric transaction rollback. at /home/brandswearxv/ftp/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:316)"} []
[2018-02-01 10:44:36] main.CRITICAL: Asymmetric transaction rollback. {"exception":"[object] (Exception(code: 0): Asymmetric transaction rollback. at /home/brandswearxv/ftp/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:316)"} []


texts: Street address cannot contain more than 2 lines -- payment page

texts:
I changed shipping street address values 2 in the admin panel. Now I can't place order only for logged in users. It's working fine for not logged in user.

If I changed it into 3 lines of the street it's working fine.But not working for 2 lines.

for more details : https://github.com/magento/magento2/issues/13766

Kindly help me.

advance thanks


texts:
I am trying to integrate Magento 2 using SOAP services.  I am bit struggling on the initial steps to authenticate to the store.

My objective is to connect to Magento 2 store and get the customer details of the given E-mail address.

I created an Integration point with the proper privileges.  I got the 4 secret tokens and passwords as below.

Consumer Key: aaa
Consumer Secret: bbb
Access Token: cccc
Access Token Secret: ddd

How can I first authenticate?


texts:
I'm trying to install Doofinder on Magento 2 but the Readiness Check launch a lot of errors.

does anyone know the requirements for each case to install doofinder?

Thanks!!


texts:
We have very slow product detail pages.

In a blackfire trace I see, that a lot of time is spent in getIdentities.

Did anybody see this before?

If I return []; in \Magento\Catalog\Block\Product\ListProduct::getIdentities product pages which are not in FPC are down from 6-15 seconds to 900 ms on my dev machine.

Edit: I was giving that link on Twitter

https://youtu.be/PyDC9_dKZq8 at 50:15


texts: Magento 2.2.5 - Add wishlist to custom new page

texts:
We have a separate new page for listing the products, there we need a "Wishlist" option as like as in product catalog page.

Can anyone share the exact idea to implement it?.


texts: Magento Security Scan Erroneous Results (falses positive)?

texts:
The Magento Security Scan returned this vulnerability:

API ACL - Failed.
API ACL Patch not detected (APPSEC-1679)
Apply the Magento 2.0.14/2.1.7 Security Update immediately.

However, my site is running Magento 2.3.3 (released Oct 2019). The patch mentioned is dated May 31, 2017 and is for a much older version.

  APPSEC-1679: APIs vulnerable to CSRF
  Product(s) Affected:  Magento CE and EE prior to 2.0.14/2.1.7
  Fixed In: Magento CE and EE 2.0.14/2.1.7

Are other people seeing this error (false positive) with Magento 2.3.3 and the Magento Security Scan tool?

Is there anything else I should know about this particular reported issue with my site?


texts: Magento 1.9.3 Capture payment without invoice?

texts: Is it possible to add a Capture button in order view? It seems Magento can only capture the payment when invoice is created. But I need to already Capture the payment when order is made.


texts: Magento : sales_order_save_after gives memory allocation error

texts:
I have created one observer and its called when order placed. sales_order_save_after. Also i have created one sales attribute and try to set value when order placed. but it gives memory allocation error.

   Fatal error:  Allowed memory size of 268435456 bytes
  exhausted (tried to allocate 36 bytes) in
  D:\xammp\htdocs\magento-1.9.3.0\lib\Zend\Db\Statement\Pdo.php
  on line 228

Bellow is my code.

config.xml

<events>
      <sales_order_save_after> <!-- identifier of the event we want to catch -->
        <observers>
          <sales_order_save_after_handler> <!-- identifier of the event handler -->
            <type>model</type> <!-- class method call type; valid are model, object and singleton -->
            <class>customeraffiliate/observer</class> <!-- observers class alias -->
            <method>saveAffiliateId</method>  <!-- observer's method to be called -->
            <args></args> <!-- additional arguments passed to observer -->
          </sales_order_save_after_handler>
        </observers>
      </sales_order_save_after>
    </events>

Observer.php

class Looxis_Customeraffiliate_Model_Observer
{
    public function saveAffiliateId(Varien_Event_Observer $observer)
    {
        $order = $observer->getEvent()->getOrder();
        if($order->getId())
        {
            $orderModel = Mage::getModel('sales/order')->load($order->getId());
            //print_r($orderModel->getData());
            $orderModel->setAffiliateid(2);
            //print_r($orderModel->getData());die;
            $orderModel->save();
        }
    }
}

Please help me why its give this error.


texts: How do I get an array containing the ID's of all active categories?


texts: Which file do I have to edit to change the description text for the newsletter subscription box?


texts:
We have grouped products - rims. Now we want to sell it with tires.

Logical is to look up for needed tires and show them, although the problem is if we do that we get results for front and back. but we can get full page of tires that are only for front or for rear rim.

is there a way to rearrange this collection so it will show front, rear based on manufacturer for example.


texts: Magento1.9 - Cart page subtotal is wrong

texts:
I am facing on the issue in My Magento1.9 cart page where the product subtotal is different than expected.

Expected result:

Unit Price * QTY = Subtotal

Actual result:

Unite Price * QTY = Some other price

Please see the screenshot for more detail.

Magento 1.9.3.1

PHP 7.2.27

I have also tried https://github.com/hartmut-co-uk/magento-php7-totals-fix and https://magento.com/tech-resources/download#download2240


texts: Use Magento UI Form Component Outside Of Form? (Product Category Selector)

texts:
I need to use the Product Category Chooser:

But not inside of a usual UI Component form. Is this possible? Basically I want to call it from a .phtml file for a custom admin page I'm building.


texts: Adding specific system.xml to store config in Magento 2

texts:
I am trying to add fields for configuration to stores in my Magento 2 application with my module that i am building.

The problem is I cant find any documentation on adding it to store. I can only find that it can be added to global configuration and that is not the place i want to have it.

So i want to find a way to make this happen this is my normal configuration for my general config.

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="mageplaza" translate="label" sortOrder="10">
            Koppelingen
        </tab>

            <class>separator-top</class>
            Exact Online
            <tab>mageplaza</tab>
            <resource>Mageplaza_HelloWorld::hello_configuration</resource>
            <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                General Configuration
                <field id="exact" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
                    Id Of Exact
                    <comment>Exact Online Id</comment>
                </field>
                <field id="display_text" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
                    Secret Of Exact
                    <comment>Exact Online Secret</comment>
                </field>
                <field id="base_url" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
                    Base Url
                    <comment>Base Url For Callback</comment>
                </field>
                <field id="project" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
                    Project
                    <comment>The place to fill in your project for the store</comment>
                </field>
            </group>

    </system>
</config>


texts: How to join a calculated column from a table to collection

texts:
I have a table name stat_customer look like this:

I want to add a column page_view to customer collection to show at grid page. page_view is total page view of product page for each customer. My SQL query looks like:

  SELECT sum(page_view) as page_view, customer_id FROM stat_customer
  WHERE page_type = 'product' GROUP BY customer_id;

But I don't know how to join it with customer collection. Can anyone help me please ?

UPDATE

I'm trying this way:

protected function _prepareCollection()
    {
      $collection = Mage::getResourceModel('customer/customer_collection')
        ->addNameToSelect()
        ->addAttributeToSelect('email')
        ->addAttributeToSelect('created_at')
        ->addAttributeToSelect('group_id')
        ->joinAttribute('company', 'customer_address/company', 'default_billing', null, 'left');
      $collection->addExpressionAttributeToSelect("page_view", "sum({{page_view}})", "page_view");
      $collection->groupByAttribute("page_view");
      $this->setCollection($collection);
      return parent::_prepareCollection();
    }

But getting this error:

  Fatal error: Call to a member function getBackend() on a non-object in
  E:\XAMPP\htdocs\stat\app\code\core\Mage\Eav\Model\Entity\Collection\Abstract.php
  on line 513


texts: Magento2: How to override the Magento\Payment\Gateway\Command\GatewayCommand?

texts:
Because I want to send Notification with response error code by Payment Gateway) when transactions are isValid. And I found the Magento\Payment\Gateway\Command\GatewayCommand do the command with Payment Gateway.
below is my app\code\My\PaymentFaildNotification\Gateway\Command\GatewayCommand.php file.
public function execute(array $commandSubject)
{
    // @TODO implement exceptions catching
    $transferO = $this->transferFactory->create(
        $this->requestBuilder->build($commandSubject)
    );

    $response = $this->client->placeRequest($transferO);
    if ($this->validator !== null) {
        $result = $this->validator->validate(
            array_merge($commandSubject, ['response' => $response])
        );
        if (!$result->isValid()) {
            $this->doNotification($transferO->getBody(), $response)
            $this->processErrors($result);
        }
    }

    if ($this->handler) {
        $this->handler->handle(
            $commandSubject,
            $response
        );
    }
}

private function doNotification($request, $result)
{
    .......
}

And My app\code\My\PaymentFaildNotification\etc\di.xml is just like below:
<?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\Payment\Gateway\Command\GatewayCommand"
         type="My\PaymentFaildNotification\Gateway\Command\GatewayCommand"/>
    </config>

And app\code\My\PaymentFaildNotification\etc\module.xml is just like below:
<?xml version="1.0" ?>
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="My_PaymentFaildNotification" setup_version="1.0.2" >
    <sequence>
        <module name="Magento_Payment"/>
    </sequence>
</module>

And app\code\My\PaymentFaildNotification\registration.php is just like below:
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'My_PaymentFaildNotification',
__DIR__);

After setup:upgrade and setup:di:compile and ....
It does'n work. Are there anything setting wrong ? or it can not be override with GatewayCommand ?
Thank you.


texts: Why Google can no longer find my homepage when I do a google search but in Google search console finds the URL and reports no issues

texts:
My website which is on a Magento 2.3 platform has ranked on the 1st page of Google around the number 4 position for several years so I know it functions well and is properly optimised. A week ago a 3rd party added 250 new products using a feed from a spreadsheet and FDP for the pictures. I also removed some categories from the homepage as the associated products were no longer being sold.
Google can no longer find my homepage when I do a google search although it lists many other pages from the website but not the actual homepage.. I have performed a Google search on the actual Homepage URL and it doesn't find it. Google search console however finds the URL and reports no issues.
Any ideas how to fix this issue.
Thanks


texts: magento2 minicart auto update the subtotal on qty change

texts:
The current default behavior of the mini cart is when the QTY box is changed an "update" button is displayed which when clicked, updates the subtotal. Is there a way to do this automatically when you change the qty? I commented out the button that appears when you change the QTY currently

-

                           <input data-bind="attr: {
                           id: 'cart-item-'+item_id+'-qty',
                           'data-cart-item': item_id,
                           'data-item-qty': qty,
                           'data-cart-item-id': product_sku
                           }, value: qty"
                           type="number"
                           size="4"
                           class="item-qty cart-item-qty qty-box-additions">

+


texts: "Phone" is a required value on Guest Checkout

texts:
I turned on "Checkout as Guest" and allowed one page checkout. I can't seem to get pass the 2nd tab "Billing" as it says "Phone" is a required field. Even after I add in a phone number, it says the same thing.

I have edited:

/template/checkout/onepage/billing.phtml
/template/checkout/onepage/shipping.phtml
/template/persistent/checkout/onepage/billing.phtml
/local/Mage/Customer/Model/Address/Abstract.php

and have:

removed the required class in the label field
removed the php code for validation
commented out the Zend_Validate lines for getTelephone
updated the db per the link below:

https://swarminglabs.com/magento-making-the-telephone-field-not-required-at-checkout/

I have flushed magento cache and cache storage too.

Any help would be greatly appreciated.


texts: Customer can edit the shipping address during checkout Magento 2

texts: How to Customer can able to edit the shipping address during the checkout in Magento 2?


texts: Magento 2 - Move Category Page Toolbar/Sorting Options Above Both Columns

texts:
What I'm trying to do is move the toolbar/sorting options on the category page above the left column and right column so it spans the full width of my content area.  I'm trying everything and nothing seems to work.  The page layout for my category page is using 2columns-left.  Here is my current markup:

...

...

Inside of
 is the toolbar I'm trying to move,
...

What I would like the markup to look like is:

...

...

...

So far in my catalog_category_view.xml I'm trying:

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

        <move element="product_list_toolbar" destination="columns" before="div.sidebar.main" />

</page>

And I'm also trying to completely remove the toolbar from the layout, but nothing is working.  It leads me to believe that product_list_toolbar isn't the correct handle to use to target the toolbar.  I've been struggling with this on and off for the past couple months and would definitely appreciate any and all help!


texts: In custom observer Data not updated or inserted in custom table but last insert id show and no error coming

texts:
I created custom observer and on event i called function. but nothing is add in database or updated nothing. But show successful insertion and also give me last insert id.

config.xml:-

   <events>
        <sales_order_place_before>
            <observers>
                <ip_prohibited_model_onepage>
                    <type>singleton</type>
                    <class>Ip_Prohibited_Model_Onepage</class>
                    <method>gardnerBookOrderPlace</method>
                </ip_prohibited_model_onepage>
            </observers>
        </sales_order_place_before>
    </events>

onepage.php :- (In Model)

$model = Mage::getModel('prohibited/prohibited');
$model->setUserid('123');
$model->save();
//Mage::log($model, null, "order.log", true);
try {
    $insertId = $model->save()->getId();
    //echo "Data successfully inserted. Insert ID: ".$insertId;
    Mage::log("Data successfully inserted. Insert ID: ".$insertId, null, "order.log", true);
} catch (Exception $e){
    //echo $e->getMessage();
    Mage::log($e->getMessage(), null, "order.log", true);
}

Can anyone can help me to sort out this issue.


texts: Fundamentals of Magento 2 Development (On-Demand): Unit One Course Missing File in Reinforcement Exercise (1.2.1)

texts:
In the first Reinforcement Exercise (1.2.1) of  Fundamentals of Magento 2 Development v2.0 - Unit One (FREE), it states to go to lib/internal/Magento/Framework/App/Bootstrap.php file to throw an exception. This path does not exist from the root of the site.

The only directories in the lib/internal/Magento folder are
Cm            Credis            LinLibertineFont

I’m really interested in purchasing the full course, but the training material isn’t matching the 2.0.5 version of the site. Can you please assist? Maybe this directory is in a different path?

Note: I have sent emails to training@magento.com (twice over the past 2 weeks) and posted on their forums to no avail. I hope the community here will be able to respond.

Thank you


texts: Created date (created_at) and Updated date (updated_at) are different in php and mysql

texts:
I have custom table and attachment is a structure of the database.

I Save data with

$post_data['created_date'] = now();
$model = Mage::getModel("rapnet/rapnet")->addData($post_data)->save();

Created date is now() and updated date is "CURRENT_TIMESTAMP". So why both are different on my localhost? How can we solve this to keep both same while creating a new record?


texts:
I have created some category using admin ui-component form and displayed in ui-component grid.

Also i want created a drop down field(Field name: Parent category) in this form which contains already created categories list ...

How to do this

Thanks


texts:
Can I use the URL parameter, for example: {{store direct_url="contact"}}, in the welcome message input in configuration > design in some way?

I know HTML can be used there, so why not the URL parameter?

I am talking about this input field in the backend, at 'Welcome Text':


texts: Trying to get name,sku,publisher from products with no category ids

texts:
What I m trying to do is a query with name,sku,publisher(custom attribute) for products with no category ids.

SELECT e.entity_id, e.sku  FROM catalog_product_entity AS e
LEFT JOIN catalog_category_product AS l ON l.product_id = e.entity_id WHERE l.category_id IS NULL

That code gives me only sku. How can I join another table to get the others that I want?
This is something I tried to do but doesn't work.
attribute_id=71 is name-Title and attribute_id=137 is Publisher

SELECT e.entity_id, e.sku , d.value FROM catalog_product_entity AS e
LEFT JOIN catalog_category_product AS l ON l.product_id = e.entity_id WHERE l.category_id IS NULL
Inner JOIN catalog_product_entity_varchar AS d ON d.entity_id=e.entity_id WHERE d.attribute_id=71 OR d.attribute_id=137

Of course I just need the result. I don't mind if the answer is magento way. I couldn't do it either way.


texts:
I am getting this error in magento 2. Please help me to solve this issue.
1 exception(s):
Exception #0 (InvalidArgumentException): Unable to serialize value. Error:  - Malformed UTF-8 characters, possibly incorrectly encoded
Exception #0 (InvalidArgumentException): Unable to serialize value. Error:  - Malformed UTF-8 characters, possibly incorrectly encoded
0 E:\xampp\htdocs\best4balls\Construction\Code\vendor\magento\framework\App\PageCache\Kernel.php(153): Magento\Framework\Serialize\Serializer\Json->serialize(Array)
1 E:\xampp\htdocs\best4balls\Construction\Code\vendor\magento\module-page-cache\Model\Controller\Result\BuiltinPlugin.php(96): Magento\Framework\App\PageCache\Kernel->process(Object(Magento\Framework\App\Response\Http\Interceptor))
2 E:\xampp\htdocs\best4balls\Construction\Code\vendor\magento\framework\Interception\Interceptor.php(146): Magento\PageCache\Model\Controller\Result\BuiltinPlugin->afterRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Magento\Framework\View\Result\Page\Interceptor), Object(Magento\Framework\App\Response\Http\Interceptor))
strong text


texts: Magento2 Catalog search result and product listing grid only sort by product name set

texts:
I need below condition to my website.

Magento2 Catalog search result and product listing grid only sort by product name to be set.

I have also back-end configuration done but
issue is like product listing page is show product name and when search any product then catalog search result page show relevant search .

so give me solution


texts: How to change the position of item availability left in stock in magento?

texts: I want to change the position of items left in stock to after quantity i tried all solutions but still its not working out


texts: magento 2 in select all products in update attributes not working?

texts:
i have try to select all products in admin panel side catalog but its not working?

selet all products and update attributes.

its come to some of issues ?


texts: Configurable Product Price field show only readonly in M2.3 admin panel

texts:
I am facing Catalog Price field not Editable. it shows only read-only.

Under Catalog=>Products

Show all Products Grid Section price are shown.
But edit specific product details field, not able to see the actual price.
Its Shows 0.00 price with read-only type.

I am also applying few Commands on my store.

bin/magento indexer:reindex

bin/magento setup:upgrade

bin/magento setup:static-content:deploy

Kindly Guide me this type of issue.

I have also attached Screenshot of my webshop products field.


texts: Magento 1.9.0.1 Can't get pass checkout step 3 shipping, process stops

texts:
Im currently on magento 1.9.0.1, In my store page www.misimpresiones.com, a lot of time the checkout process stops at step 3. It not display an error, but not allowed to continue the buying process, it is locked in the selection step shipping. In order to continue the buying process, we clean our cookies and cache, but sometimes it doesn't work, we still have the same problem.

Anyone? Any ideas?

.


texts: removeItemByKey not working in product collection - Magento 2

texts:
I have a product collection (\Magento\Catalog\Model\ResourceModel\Product\Collection $collection), I try to remove some of the item from the collection by using below code.

foreach ($collection->getItems() as $key => $d)
{
    $product = $objectManager->create('Magento\Catalog\Model\Product')->load($d['entity_id']);
    if(!$product->getIsSalable())
    {
        var_dump($d['entity_id']);
        $collection->removeItemByKey($key);
    }
}
var_dump($collection->getData());die();

but collection object still has that value. please help us to remove the item from the collection.


texts: Set default value for product attribute in magento 2.1

texts:
When i add configurable product with associated products, associated products types are changed to virtual product.

When i change weight field value is This item has weight then the product type was changed to virtual to simple

How to set default value to product has weight attribute for associated products.

Or

Change product type virtual to simple while adding associated product in create configurations.

<field name="product_has_weight" group="product-details" />


texts: I'm looking at implementing ElastiCache Redis (AWS) for a new Magento 2 implementation.  However, I have concerns because ElastiCache isn't covered under the BAA and I could have PII/PHI in my data.  So I'm wondering if Magento 2 and Redis have a tokenization process I could utilize.


texts: save custom field to database does not save value

texts:
I've got the folling problem:

I've got a new database field ( made with upgrade script ) to api/user table.

Now it's showing the field, but when I enter a value, it will not save.

Table field in db is called: ip_address, code to show in adminhtml:

File: Mage_Adminhtml_Block_Api_User_Edit_Tab_Main

I know, i know! Going to extend it later, first want it to work!

$fieldset->addField('ip_address', 'text', array(
    'name'  => 'ip_address',
    'label' => Mage::helper('adminhtml')->__('IP Adres'),
    'id'    => 'ip_address',
    'title' => Mage::helper('adminhtml')->__('IP Adres'),
    'required' => true,
));

Already TRIED/CHECKED:
I already tried logging out and back in, flushing all caches possible in backend and even delete contents of var/cache folder.

When I change an other value, it saves correctly. So I think I'm missing something.

Post is good, ip_address is in $data.
getData('ip_address') is set.
Also tried setData('ip_address', getData['ip_address'])) and setData('ip_address', $data['ip_address']), also did not work.
If I fill database field manually, it will return it in backend, so that's good too..


texts: Send a downloadable product as a gift to somebody else?

texts:
Is there a way in Magento itself or some plugin to allow people to send downloadable products as a gift to somebody else? In that case the person who bought the product won't have access to the download, but the receiver of the gift will.

Thank you for your help with this.


texts:
I'm trying to add a mini cart in a custom layout, but for some reason this cart's behavior is very strange. Sometimes it's gone, sometimes it still display's products after clearing all cache and sometimes it displaying in other layouts.

So it's never in sync with the other carts.

In made a custom block in template/page/html/storeMenu.phtml with this code:

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

This file is loaded in all layouts including the homepage layout.

In my checkout.xml file i placed this code to load the cart inside the homepage layout and to remove the sidebar cart:

<josil_homepage translate="label">
    <remove name="cart_sidebar"/>
    <reference name="catalog.topnav">
            <block type="checkout/cart_sidebar" name="cart.homepage" as="cart_homepage" template="checkout/cart/sidebar.phtml" before="-">
                <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
                    <label>Shopping Cart Sidebar Extra Actions</label>
                </block>
            </block>
    </reference>
</josil_homepage>

I tried several configuration options, emptied all the sessions in my browser and the magento installation, but nothing is working.

Where do i have to look further?

UPDATE: For some reason, an exact copy is working on my localhost and not online..?

UPDATE2: Moved the xml from checkout.xml to page.xml. This is only working when i disable my cache. Strange thing is that when i enable my cache and flushing it, changes from my xml have been made in my store.

UPDATE3: When i change the xml reference from catalog.topnav to right or root, it works in those blocks with the cache enabled. I think it has something to do with my custom store menu block..?


texts: Can't able to set custom price when product has custom option

texts: I am set custom price for all product and its like a charm but when product as contain custom option is not update my custom price i don't know what is problem with my code.


texts: how to call getCollection method for a custom table on index controller?

texts:
$pincode = $this->getRequest()->getParam('p', false);
$id = $this->getRequest()->getParam('id', false);
 $collection = $this->resultPageFactory->create();
            $collection = $this->getCollection();
            $collection->addFieldToFilter('pincode', array('eq' => $pincode));
            $codData = $collection->getData();

            if($codData[0]['pincode'] != '' && $codData[0]['cod'] != ''){
                echo 'Delivery Available';
                if($codData[0]['days'] != ''){
                    $final = ' within '.$codData[0]['days'].' days
'.$codData[0]['cod'].' ';
                }
                echo '.';
            }else{
               $final =  'Delivery Not Available';
            }

it always gives this error

  Fatal error: Uncaught Error: Call to undefined method
  Pradeep\PincodeChecker\Controller\Index\Index\Interceptor::getCollection()


texts: Disabled associated products after checking one product

texts:
Does anybody encounter in creating configurable product, in associated product tab, when I click one product then rest of the product in non-clickable or disabled?

What's the cause of this? Please help.

Thanks

Here's the example


texts:
I need to show all Subcategories and their products on category view page as

-- CategoryName 1

-- -- Product List for category1

--- Category Name 2

--- Product List for category2

The number of products is less hence we don't need toolbar as well as filters.

How can I join category table with ProductCollection so that I can get category name and it's URL on list page? I want the product collection to be sorted by category Id.


texts:
I'm confuse if cache with status invalid is actually used by magento or not ?

If not why Magento doesn't just refresh it ?


texts: M 1.9.0.1 - path hints showing in order email

texts:
Believe it or not but my customer forwarded an order-email where the template path hints of the single blocks are showing.

Nothing changed in config

Path hints disabled

Developer client IP set

It seems like it was only for this specific email. No other Emails affected.

Any suggestions would be much appreciated.

EDIT: To make it clear:
It was an order email sent for an order created manually in admin panel which has different store view and therefore different settings where "display path hints" was true.


texts: Exclude CMS page while creating sitemap.xml in magento admin

texts:
We have certain CMS pages in our magento e-commerce store. Now we need to create sitemap.xml and as we all know magento admin provides to create a sitemap.

But here, the problem is when I generate a sitemap, all the active pages are getting included. We don't want some certain CMS pages in sitemap.

So, how to exclude those page ? Please help.


texts:
Trying to currently work this out and understand it isn't default magento.

I have a product (Red Shoe) and I need to record the qty of different values of the product for example

Red Shoe is made up of:

2 Red Leather, 3 White Cloth

and another product to have the following:

White Shoe

2 White Leather, 3 White Cloth

So if 1 of each product is ordered it will take stock of 2 Red Leather, 2 White Leather and 6 White Cloth.

I understand magento would do the stock for 1 item per order but is there a way to do the above?


texts: Magento 2 - unable to clear generated/code in developer mode in order to disable module

texts:
I have this issue that is driving me crazy and has me going around in circles. I am unable to find anything relating to a solution online so hoping someone here will be able to answer this.
We have a 2.3.5p1 store that we put in production mode to test and then back into developer mode.
Since then, I am trying to disable a module but I get:
"The directory "/home/redacted/public_html/generated/code/Magento" cannot be deleted Warning!rmdir(/home/redacted/public_html/generated/code/Magento): Directory not empty"
So I ran rm -rf generated/metadata/* generated/code/* and this clears almost all of the generated/code contents except /generated/code/Magento/Framework because "Directory not empty".
A philosopher would argue as to the need to delete a directory that was already empty, but hey...
Anyway, I can see all other folders are gone but as I refresh my view they all start popping up again until the full folder and file structure is back to how it was. Nobody is visiting the front end of the site in order to create generated code on the fly and the site is definitely in developer mode (as deploy:mode:show tells me and also as I see inside env.php).
So I am stuck needing to empty the generated directory in order to disable the extension and not being able to empty it because "it's not empty".
Grateful for your feedback.


texts:
how can I change "AED - United Arab Emirates Dirham" to "AED - UAE Dirham" in Luma currency switcher?

I created en_US.csv file in my custom theme > i18n folder and added "united Arab Emirates" in the 1st column and "UAE" in the 2nd column. But still not working.


texts: Uncaught TypeError Cannot change property of 'changeSelection' of undefined Magento 1.9 bundle product

texts:
My bundled products aren't working properly.

On loading the product page it already goes wrong with the following error in the console:

Uncaught TypeError: Cannot read property 'reloadPrice' of undefined

When i select an option from the drop-down box, the amount field stays grayed out and i get an error in the console (Google Chrome) stating:

Uncaught TypeError Cannot change property of 'changeSelection' of undefined

The HTML from the amount field has the property disabled=""disabled", I guess this is supposed to change on making your selection thus enabling you to change the amount for the selection.


texts: How to set default sort order for custom listing uicomponent to use multiple columns

texts:
I created a custom admin grid using a lising uicomponent. I want the initial sort order to sort by 2 columns. This does the trick in the grid's Collection class for the initial page load of the grid:

protected function _initSelect()
{
    parent::_initSelect();

    $this->setOrder('zone_name', 'asc');
    $this->setOrder('zip', 'asc');

    return $this;
}

However, if you then sort the column in the admin by clicking any column header, it always maintains the above sorting.

I found that if instead of doing the above, I can set the default sort order in the listing uicomponents XML file like this:

<column name="zone_name">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="filter" xsi:type="string">text</item>
            <item name="label" xsi:type="string" translate="true">Zone</item>
            <item name="sorting" xsi:type="string">asc</item>
        </item>
    </argument>
</column>

The key line there is:

<item name="sorting" xsi:type="string">asc</item>

That works fine, but is there a way to use that method and also sort by two columns?


texts: Best practice for returning errors in WebApi

texts:
So let's say I have a model, responding to my webapi calls, whats the best way to return an error to the api consumer. For example, in the code below, the second line query the category factory (di-ed) for a specific category id, if not found, the function natively throws \Magento\Framework\Exception\NoSuchEntityException and the webapi will return 404 as below. This is all good, but should I as a best practice:

Just leave the exception thrown by the factory as below (might not be the best option, since I don't want to expose the trace to api consumers)
Catch it and throw the same exception type without the trace
Catch it and throw a webapi exception throw new \Magento\Framework\Webapi\Exception ( __("Category not found"), \Magento\Framework\Webapi\Exception::HTTP_NOT_FOUND)

/**
 * @param int $id
 * @return array
 */
public function getById( $id ){

    $store_id = $this->request->getParam('store_id');
    $category = $this->category_repo->get($id, $store_id);

{
  "message": "No such entity with %fieldName = %fieldValue",
  "parameters": {
    "fieldName": "id",
    "fieldValue": 13
  },
  "trace": "#0 C:\\stage\\appfactory-magento2\\vendor\\magento\\module-catalog\\Model\\CategoryRepository.php(141): Magento\\Framework\\Exception\\NoSuchEntityException::singleField('id', 13)\n#1 C:\\stage\\appfactory-magento2\\app\\code\\AppFactory\\Basic\\Model\\Api\\Category.php(59): Magento\\Catalog\\Model\\CategoryRepository->get(13, NULL)\n#2 [internal function]: AppFactory\\Basic\\Model\\Api\\Category->getById(13)\n#3 C:\\stage\\appfactory-magento2\\vendor\\magento\\module-webapi\\Controller\\Rest.php(307): call_user_func_array(Array, Array)\n#4 C:\\stage\\appfactory-magento2\\vendor\\magento\\module-webapi\\Controller\\Rest.php(216): Magento\\Webapi\\Controller\\Rest->processApiRequest()\n#5 C:\\stage\\appfactory-magento2\\var\\generation\\Magento\\Webapi\\Controller\\Rest\\Interceptor.php(37): Magento\\Webapi\\Controller\\Rest->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#6 C:\\stage\\appfactory-magento2\\vendor\\magento\\framework\\App\\Http.php(135): Magento\\Webapi\\Controller\\Rest\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#7 C:\\stage\\appfactory-magento2\\vendor\\magento\\framework\\App\\Bootstrap.php(258): Magento\\Framework\\App\\Http->launch()\n#8 C:\\stage\\appfactory-magento2\\index.php(39): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http))\n#9 {main}"
}

In Magento 1.x, I used to do it like this:

if (!($category->getId())) $this->_critical(self::RESOURCE_NOT_FOUND);


texts: Error with the urlDecodeAndEscape and to delete an item from the cart

texts:
When I delete an item from my cart (I clicked on X) I have this error:

Fatal error: Call to undefined method Mage_Core_Helper_Data::urlDecodeAndEscape() in /var/www/vhosts/mywebiste/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php on line 787

The page is: http://mywebsite.com/checkout/cart/delete/id/6990/uenc/aHR0cDovL3d3dy5hcnRpc3NpbWFsdWNlLml0L2NoZWNrb3V0L2NhcnQv/

I have Magento 1.9.1.0.

Who can help me?


texts: Broken Edit address link in sales order admin

texts:
I am trying to fix the Edit Address links above Billing and Shipping addresses in Magento 1.6.1 Admin. They used to work, but stopped some time ago and I'm not sure why.

When you click either of the links, they try to go to the page to edit the chosen address as expected, but nothing loads - just a blank screen, and there is no source code behind it.

Nothing is logged in system or exception logs either!

I have found and followed this info: http://support.createhosting.co.nz/knowledgebase.php?action=displayarticle&id=55

But that didn't change anything on my development site (which is a replica of my live site to test this stuff on first).

How do I go about debugging and fixing this problem?
Cheers!


texts: Sort the product collection before load by attribute option in Magento2

texts:
I am trying to sort the Product collection based on the attribute option value,

I used below plugin

Vendor/Module/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
   <type name="Magento\Catalog\Model\Layer">
       <plugin name="custom_product_model_layer" type="Vednor\Module\Plugin\Layer" />
    </type>
</config>

Then in Vendor/Module/Plugin/Layer.php

namespace Vendor\Module\Plugin;

class Layer
{
    private $logger;

    public function __construct(
        \Psr\Log\LoggerInterface $logger
    ) {
        $this->logger = $logger;
    }

    public function aroundGetProductCollection(
        \Magento\Catalog\Model\Layer $subject,
        \Closure $proceed
    ) {

        $result = $proceed();
        $result->addAttributeToSort('brand', 'puma');

        return $result;
    }
}

Second Method:

di.xml

<type name="Magento\Catalog\Block\Product\ProductList\Toolbar">
    <plugin name="custom_product_toolbar" type="Vendor\Module\Plugin\Toolbar" />
</type>

Then Vendor/Module/Plugin/Toolbar.php

namespace Vendor\Module\Plugin;

class Toolbar
{

    protected $_objectManager;
    protected $request;
    private $logger;

    public function __construct(
        \Magento\Framework\ObjectManagerInterface $objectmanager,
        \Magento\Framework\App\Request\Http $request,
        \Psr\Log\LoggerInterface $logger
    ) {
        $this->_objectManager = $objectmanager;
        $this->request        = $request;
        $this->logger         = $logger;
    }

    public function aroundSetCollection(
        \Magento\Catalog\Block\Product\ProductList\Toolbar $subject,
        \Closure $proceed,
        $request
    ) {
        $result = $proceed($request);

        $this->_collection = $request;
        $currentOrder      = $subject->getCurrentOrder();
        $category          = $this->_objectManager->get('Magento\Framework\Registry')->registry('current_category');
        if ($category) {
            $page = $this->request->getParam('p');
            if ($page == '') {
                $page = 1;
            }
            $this->_collection->getCurPage();
            $this->_collection->setCurPage($page);
        }
        if ($currentOrder) {
            if ($currentOrder == 'relevance') {
                // Suggest me the logic here
            }
        }

        return $result;
    }
}

I have created a attribute called "brand" so whenever the product is searched, I need to load the products on top which are set as "puma" option for that particular attribute.

I am trying with Both methods, but both are not working, can I get any help on this. Thanks in advance!!


texts: product grid renderer multiselect attribute value

texts:
Following this tutorial, I try to get values of multiselect attribute in a product grid.

Products have some selected values for this attribute and the 'filter_condition_callback' for this column work.

In the renderer I use below code but in the grid I get an empty list.

I hope someone can help.

public function render(Varien_Object $row) {

    $colors=explode(',',$row->getColors());
    $suppstr="";
    if(count($colors)>0)
    {
        $suppstr="
";
        foreach($colors as $value)
        {
            $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'colors');
            if ($attribute->usesSource()) {
            $suppstr   .= "
".$attribute->getSource()->getOptionText($value)."
";
            }

        }
        $suppstr   .= "
";

    }
      return $suppstr;

}


texts: What is the best approach to extend SystemConfiguration.yml in TAF

texts:
Note: I originally asked this as an Issue in Github but then realized it makes more sense to ask in here

We are setting up a box for continuous integration testing for our multiple Magento solutions. As each project would have a different mix of modules and customizations we are shipping each project with their own unique tests and run the appropriate test suite for each along with the Core test suite (common for all of them). That much is easy.

The only problem we are not sure how to address is that each module comes with their own panel in the System->Configuration area and we would need to set up the UI mapping for each. However, as far as we can tell, there is only one unique UI map for the whole configuration area. It would be awesome to have some merging mechanism (as there is in every XML configuration in Magento) but as far as I can tell, there is none.

So, other than copying and tweaking SystemConfiguration.yml for each project, is there any way to "add" information to it without actually modifying it?


texts:
The mobile menu on this site nightskysecrets.com.au is not dropping down.

Not sure if this is an upgrade issue but can't find the problem in css wondering if it is a Javascript issue.


texts: One or more indexers are invalid. Make sure your Magento cron job is running. Not solved on mac

texts:
I have installed Magento2 on my machine, I am using osx yosemite, and on admin panel I am getting

One or more indexers are invalid. Make sure your Magento cron job is running.

I have tried

php bin/magento indexer:reindex

to re index the indexes, and

php bin/magento cron:run

to run cron job, every time I am getting

Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html

But I am using php 5.6.10 on MAMP


texts: Cart dropping all items / cart session clears

texts:
A site I manage suddenly (potentially 2 weeks ago - from GA stats, and only reported now) started dropping the cart items when you view the cart, or go to checkout.

The top 'mini-cart' shows the items in the dropdown, until you browse to cart/checkout, and you then end up on the cart, with 'There are no items in your cart' message.

Seems like a session issue.
It does not happen when logged in.

Removed all session validation options in 'system->web->session validation settings', and enabled the one that says 'Use SID on Frontend'. This did solve the issue, but since these settings did not change in the last 3 months, I know there is some underlying  issue.

This then points to issue with sore-id issue? Somehow the site is loosing what store-id it is on, and dropping the session/cart data? Maybe some observer/event/rewrite by some module.

I cannot replicate the issue on local dev, or on UAT server. DB on UAT is 2 weeks dated from live, so this could point to a db issue/setting?

Things I am trying:
I am busy pulling current live db over to UAT to get that up-to-date , to see if I can replicate the issue there. will update when that is done.

Once I can replicate the issue in a non-live area, I will systematically disable modules, see if something is mucking about with store id's (starting with MageMonkey and sweettooth, since they got updated 2 weeks ago)

Question is - what else can I try? Any pointers to where I can whack some breakpoints and step the code to see if I can trace this issue?

there are no extra cache systems like varnish or memcache installed. Server is a standard cpanel install.
testing on uat I disabled all cache.

further update :  it would seem that when I drop to the default theme I cannot reproduce. I am systematically moving theme override folders back.

I also used git to backtrack code and the issue remains with every hash.

Update:
Been a while since I had time to spend on this. High work load.

I moved the sessions to file based and the issue has gone away. Since the client is not intending to use multiple servers in the near future, and due to my work load, this was left at that. Will most likely come back to bite me later.

magento support suggested the issue is related to sweet tooth module extending the session classes, but I have disabled that module, and the issue remained.

will update when I get more results.


texts:
We use an API service that exports products to third party marketplaces like Bol.com. Since this specific marketplace has no shipment costs all product prices are raised by €2.95. So a product of €10,00 becomes €12,95 and so on. The problem we now have is that once a sale has been made the total sales prices is set to €12,95 and when the invoice is made the tax is calculated based on the price set in Magento, which is €10,00.

The API service is not able to change anything so we should have a solution for this apparently. Is there a way the taxes are recalculated or something? Or should we take a look at a more programmatic solution?


texts: Magento “Place Order” button redirection to custom Page before Order Succes Page

texts:
Basically I want to display custom module page after "Checkout Page" and Before "Order Success Page".
I created the module manually and want to add a page between checkout page and order success page. On that page I have to collect some data from the users (data about the products that he/she selected), after place order button.
After collecting the data from the users, I have to redirect to the Order Success Page.
Any Solution would be much appreciated!
TIA!


texts:
I am using the cjm colorselectorplus module.

In their xml they have this line:

<action method="addJs"><script helper="colorselectorplus/data/canShowjQuery" /></action>

and in Data.php

class CJM_ColorSelectorPlus_Helper_Data extends Mage_Core_Helper_Abstract
{
public function canShowjQuery()
    {
        if(Mage::getStoreConfig('color_selector_plus/zoom/enabled') == true && Mage::getStoreConfig('color_selector_plus/zoom/zoomexists') == false) {
            return 'cjm/colorselectorplus/jquery-1.6.4.min.js';
        }
    }

what this does is loading js/cjm/colorselectorplus/jquery-1.6.4.min.js into the website if color_selector_plus/zoom/enabled == true.
I want to remove that file with my local.xml and I do this

    <default>
        <reference name="head">
            <action method="removeItem"><type>js</type><name>cjm/colorselectorplus/jquery-1.6.4.min.js</name></action>
       </reference>
    </default>

with no avail.

As I understand it, that js file is loaded through xml and should be removable through local.xml.

If I comment out <action method="addJs"><script helper="colorselectorplus/data/canShowjQuery" /></action> the file is being excluded. So I don't understand what's wrong.


texts: Magento 2: How to make Message Manager showing specific message one time only?

texts:
I have a page that welcomes a customer with a message manager like this:
$this->_messageManager->addSuccess(__("Welcome to test section"));

the problem is this message will keep appears if the customer reload the page again, how can i make sure this message wont show up again (not forever) , lets say for specific amount of time or i can put an identifier to the message manager??


texts: refund error using afterpay payment gateway

texts:
I used afterpay payment gateway test mode. when i refund my amount by magento admin i get an error:

Afterpay API Error: Not Found

Please help me what is this. I didn't get the reason behind this error.

I got this error in my afterpay.log:

2017-12-14T09:45:17+00:00 DEBUG (7): CRON JOB - fetchPendingPaymentOrdersInfo ...

Thanks.


texts: Magento 2, Soap as service reference, access to different Shops

texts:
I need to access to two different shops in one Magento 2 instance.

Haven't found out yet, how to tell the interface (using Visual Studio and Service References) which of the shops / frontends I want to access.

Is there an easy example?

Thanks in advance!


texts: Magento 2 Show customer attribute in ui_component form

texts:
I've created ui_component form where I need to show customer details, same as Customer Edit.
But, I am able to show their data from customer_entity table.

DataProvider.php

public function getData()
{
    if (isset($this->loadedData)) {
        return $this->loadedData;
    }

    // {Vendor}\{Module}\Model\GridFactory
    // Returns Customer Resource Model
    $items = $this->gridFactory->create()->getCollection();

   $items->getSelect()->join('customer_entity_text as second', 'main_table.entity_id = second.entity_id');
    //print_r($items->getData()); exit;
    foreach($items as $contact){
        $this->loadedData[$contact->getEntityId()]['contact'] = $contact->getData();
    }

    return $this->loadedData;
}

I've joined customer_entity_text table with my Factory in order to display status (Customer Attribute).
Now My Second attribute is file type. It's in customer_entity_varchar, Firstly I thought of adding another join but I think it's not the good way.

So, Is there any solution for this? I need to display both Customer Attributes in my form.

ui_component

<field name="value">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string">Status</item>
                <item name="visible" xsi:type="boolean">true</item>
                <item name="dataType" xsi:type="string">text</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="source" xsi:type="string">contact</item>
            </item>
        </argument>
    </field>

1). Above component is working good for Status but not for Profile Image that is Image type.
<field name="value">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string">Profile Image</item>
                <item name="visible" xsi:type="boolean">true</item>
                <item name="formElement" xsi:type="string">fileUploader</item>
                <item name="uploaderConfig" xsi:type="array">
                    <item name="url" xsi:type="url" path="path_controller"/>
                </item>
            </item>
        </argument>
    </field>

Even if I remove one field with same name form element it doesn't seem to be working.
Take a look at field name that is value for Status.
If I use the same thing for image field then image component disappears.
Note: I've no idea why Magento doesn't allow to use the name as value.

Cause I've joined in the collection so i am getting value as the array key.

**Question: How can I get customer attributes in this form without join in the collection ?
Also if you have other solution then most welcome.**


texts:
Problem with admin panel. See this, when I'm trying to enter it.

  Fatal error: Uncaught Error: Call to a member function setActive() on boolean in .../magento/vendor/magento/module-backend/Model/View/Result/Page.php on line 60

Have no idea, why that stuff had happened. I have cleaned the cache (from terminal), in git checkouted on the working revision before this stuff, upgraded modules and re-compile the project. Id hasn't helped.

Would be glad to hear any suggestions.

P.S. I was learning, how to override and extend core layouts (did NOT touched them).


texts: Magento2: Send Reset password link in custom email template

texts: I want to send reset password link to customer in my Custom Module Email template.


texts: Magento 2.2 Can we use Object Manager in Controller or Block?

texts:
To get product data, I am using object manager in my controller, but I read in docs that we should not use it directly.

<?php
 pubic function execute()
 {
     $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
     $id = '10';
     $product = $objectManager->create('Magento\Catalog\Model\Product')-load($id);
     // My code here
 }
?>

Please suggest me a way how to use Object Manager in controller or block?


texts: Magento 2.0.7 Where to start adjusting the main layout?

texts:
I'm still hanging in understanding how themes in magento 2.0.7. So far it seems one practically has not to touch a single template file, only design files it seems. Though I'm struggling to find where to start when I want to have my own design. Just a starting point where to start adjusting. Seems to be hard.

For example. I base my theme on blank. Blank has not a single template file. I found that instead module-theme delivers the template files for blank. Now I wanted to follow the conventions and create my page with design files. But it is hard to do. Template hints does not really help since it seems to only show small template parts, not the surrounding templates and it does not show the design files at all.

I then found that default.xml seems to define somewhat of a base layout. So I copied the default.xml from module-theme. I found that  seems to be defined in there and I can find it in sourcecode then. Though in sourcecode there are more surrounding divs:

It seems none of them is defined in default.xml, though I need to access those classes in order to put in my own classes to define my design.

So can someone tell me where to look at to finally find the real main design file where everything starts?

Thank you!

PS: I would like to write registered but it seems stackexchange has a problem with the email formats. It seems it does not understand that an email can contain a "-", which is a problem I came over on many sites. It leads to me not getting a single email from stackexchange. Unfortunately I can't even ask in meta, where the right place should be, because only registered users can post... ::)


texts: Magento 2 - How long does a cart session last?

texts:
My team and I are creating an email campaign to help reduce the abandon cart rate. The campaign spans over 3 days as a reminder to the customer there are items in their cart, if they come back then we'll take off 10% kind of deal. Currently we're using Foxycart and their session only lasts for about 12 hours, which doesn't help us. I'm looking into moving to Magento 2 but before we do that I wanted to get some information regarding this matter. I've seen some posts about cart sessions but they all seem to address Magento 1.9.X or under.

Also, would we be able to change the cart session time?

I appreciate the input!


texts: Displaying saving/discount price in cart page

texts:
/app/design/frontend/rwd/amaze/template/checkout/cart/item/default.phtml

In above file i have added the bellow snippet code to display saving amount for each product and its working good now in this loop i have to save addition of  $finaltot

suppose $finaltot displaying value 10 23 40 so i have to make like 10 + 23 + 40

I have tried with bellow code to make addition in  $finaltot+ but its no working

<?php
    $product_orignalprice = $this->getProduct()->getPrice();
    $discountedprice=$_item->getPrice();
    $todatlsaving=$product_orignalprice-$discountedprice;
    $finaltot+=$todatlsaving * $this->getQty();
    echo $finaltot;
?>

so it will display $finaltot=73

so how do I do this within loop to store all value of variable in one variable.

you can check code on pastebin.com/YMGvEmr7 on the line 96 to 100


texts: Authorize.net returning server error 500 while placing an order on magento 1.9

texts:
I'm having an issue with Authorize.net since Jan 18th 2019. I'm getting server error 500 when placing an order one default Magento onepage checkout, also when placing an order from the admin section; I got white page with error 500.

I'm able to see the payment/transaction on authorize.net but not on Magento (No orders)

Other symptoms surfaced:

Some customers get a white screen page
Browser redirection to the Cart page without any error message
Empty error message
Invalid email address after placing an order
duplicate transactions
Customer registration are not stored in Magento DB after placing order.

What is the best approach to tackle such issue?


texts: Why did Magento remove RefundOrderInventoryObserver.php from Magento 2.2

texts:
Magento had a useful observer class RefundOrderInventoryObserver, which was used to observe sales_order_creditmemo_save_after event.

The class was part of Magento core until Magento 2.1.x, but from Magento 2.2, it has been removed.

Can someone tell me why Magento team dropped this from Magento Core?

Is there any alternative to this class so that I can make some customizations when a credit memo is generated?


texts: Payment method showing as disabled in admin area despite being enabled

texts:
We're having an issue where PayPal Express checkout is shown as disabled in the Magento admin area regardless of what the actual status is in the database:

What's strange is that even the HTML on the page seems to show the status as enabled:

<select id="payment_express_checkout_required_enable_express_checkout" name="groups[express_checkout_required][fields][enable_express_checkout][value]" class="paypal-enabler paypal-ec-enabler shared shared-payment-paypal_express-active requires requires-payment_express_checkout_required_express_checkout select" disabled="">
    <option value="1" selected="selected">Yes</option>
    <option value="0">No</option>
</select>

We can also see in the database that this payment method is actually enabled:

# config_id, scope, scope_id, path, value
'425', 'default', '0', 'payment/paypal_express/active', '1'

Unfortunately, if we save the config from the admin area, it then sets this payment method to actually be disabled, and we can't change it back from the UI as the option is always disabled (as in the HTML element has a disabled attribute).

In the debugger, I can see that this select is disabled by line 14874 of the inline Javascript on that page, but it's not clear why.

My question is, why is this select getting disabled and displaying a misleading value?


texts:
I want to add child of configurable product in a cart with magento 1 api and my child product is adding in a cart but the problem is its also adding main product like I am adding boots and boots have a child products like (size 6 ,7 ) and I am able to add size wise products but the main product is also adding with each size like if I am adding 6 then first it adds main product then size 6 and in a same cart i am also adding 7 then it adds main product then 7 here is the output of my code

Array
(
    [0] => Array
        (
            [product_id] => 5654
            [sku] => 56662
            [name] => boots
            [set] => 4
            [type] => configurable
            [category_ids] => Array
                (
                    [0] => 19
                    [1] => 28
                    [2] => 422
                )

            [website_ids] => Array
                (
                    [0] => 1
                )

        )

    [1] => Array
        (
            [product_id] => 3618
            [sku] => 56662
            [name] => Boots 6
            [set] => 4
            [type] => simple
            [category_ids] => Array
                (
                    [0] => 19
                    [1] => 28
                    [2] => 422
                )

            [website_ids] => Array
                (
                    [0] => 1
                )

        )

    [2] => Array
        (
            [product_id] => 5654
            [sku] => 56661
            [name] =>  Boots
            [set] => 4
            [type] => configurable
            [category_ids] => Array
                (
                    [0] => 19
                    [1] => 28
                    [2] => 422
                )

            [website_ids] => Array
                (
                    [0] => 1
                )

        )

    [3] => Array
        (
            [product_id] => 5390
            [sku] => 56661
            [name] =>  12
            [set] => 4
            [type] => simple
            [category_ids] => Array
                (
                    [0] => 19
                    [1] => 28
                    [2] => 422
                )

            [website_ids] => Array
                (
                    [0] => 1
                )

        )

)

and here is the code

$arrProducts = array(
                        array(
                            "product_id" => $product_id,
                            "qty" => $qty,
                            "super_attribute" => $options_arr
                        )

                    );
$resultCartProductAdd = $client->call($sessionId,"cart_product.add",array($cart_id,$arrProducts));
                echo json_encode($resultCartProductAdd);

thanks


texts: Upgrade (1.9.1) results in white screen for admin but working frontend

texts:
I did an upgrade from Magento CE 1.9.0.1 --> 1.9.1 in my staging environment The frontend is just working fine but the backend gives me the headache. * I can't login. It only shows a white screen and no errors.

I've read that this could be caused by bad themes or plugins. So install it once again in 1.9.0.1 and setup the default/deafult theme and remove all the plugins (set to false in /etc/modules). Did the upgrade once again but sadly with the same result.

I followed the hints on this page: Fundamentals for debugging a Magento store but still no login possible and neither clues or errors.

I've a log-file during the upgrade and all seems well but 2 issues:

    Checking dependencies of packages
Package community/Mage_Core_Modules failed: Detected Mage_Core_Modules conflict of versions: 1.9.0.1-1.9.0.1 and 1.9.1.0-1.10.0.0
Installing package community/Mage_All_Latest 1.9.0.1
Package community/Mage_All_Latest 1.9.0.1 installed successfully
Installing package community/Interface_Adminhtml_Default 1.9.0.0
Error:
install: Failed to open file /home/schapenv/public_html/staging/downloader/.cache/community/Interface_Adminhtml_Default-1.9.0.0/app/design/adminhtml/default/default/template/downloadable/sales/order/invoice/create/items/renderer
Installing package community/Interface_Frontend_Default 1.9.0.0

Is this a clue why I can't login?


texts: How to create a addnametoselect function for custom tables

texts: I need to create an addnametoselect function (like in customer collection) for filtering purpose in the custom collection filter by the fields in custom Table on DB in magento2. Please, anyone, help me.


texts: I upgraded my magento2.2.8 to 2.2.3 after that I open system configuration and try to open configuration but some configuration shows a blank page and some option showing normal.


texts: How to change uploaded file name in Magento?

texts:
I am using system.xml configuration to upload a file via backend. It works perfectly.

But I need to change the uploaded image's name to the current store id. How Can I? Now it is uploaded with its original name.

My system.xml is

<?xml version="1.0"?>
<config>
  <tabs>
    <restaurant translate="label" module="restaurant">
        Upload Logo
        <sort_order>999999</sort_order>
    </restaurant>
  </tabs>
  <sections>
    <restaurant_options translate="label">
      Upload Logo
      <tab>general</tab>
      <frontend_type>text</frontend_type>
      <sort_order>1000</sort_order>
      <show_in_default>1</show_in_default>
      <show_in_website>1</show_in_website>
      <show_in_store>1</show_in_store>
       <groups>
            <SAMPLE translate="label">
              Upload Your Store's Logo
              <frontend_type>text</frontend_type>
              <sort_order>100</sort_order>
              <show_in_default>1</show_in_default>
              <show_in_website>1</show_in_website>
              <show_in_store>1</show_in_store>
              <fields>
                    <ENABLED translate="label comment">
                        Logo
                        <comment>file types: jpeg, gif, png.</comment>
                        <frontend_type>image</frontend_type>
                        <backend_model>adminhtml/system_config_backend_image</backend_model>
                        <upload_dir config="system/filesystem/media" scope_info="1">theme</upload_dir>
                        <base_url type="media" scope_info="1">theme</base_url>
                        <sort_order>1</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                    </ENABLED>
            </fields>
            </SAMPLE>
      </groups>
    </restaurant_options>
  </sections>
</config>

Please If any know a solution.


texts:
I am trying to install magento-1.8 on local server. Its takes so much time to installation process. I am trying install half an hour but still is process is not complete.

Process running during Database Configuration.

I have configure database like

Host: localhost:9292 (9292 is my port)

Database Name : magento

User : root

I am facing this situation first time. I don't know, why is happing.


texts: How to setup magento facebook login with facebook app create and configure step by step?

texts:
All step complete but some problem?
app id = XXXXXXXXXXXXX and app secrate = XXXXXXXXXXXXXXXXXXXX setup but not working?


texts: Product page attributes are missing in add product page

texts: While adding Products some of the attributes and attribute groups are missing. Below I will add the screenshot of the page. Can anyone help?


texts: Creating block in cronjob looks for template in admin instead of frontend html

texts:
In a custom modul that creates cronjobs I create a block like this

Mage::app('default')->loadArea('frontend');
    $layout = Mage::getSingleton('core/layout');
    $layout->getUpdate()->load('default');

    $block = $layout->createBlock('catalog/product_view_type_configurable');

and run $block->getJsonConfig();

In there, another block is created

$this->getLayout()->createBlock('catalog/product_view_attributes');

and its template set

$childBlock->setTemplate('catalog/product/view/attributes.phtml')

But I get the error:

Not valid template file:adminhtml/base/default/template/catalog/product/view/attributes.phtml

the file is in my frontend/template1/template2/catalog/product/view/attributes.phtml

How can I fix this? Obviously, I just don't want to copy the file to that directory.


texts: ERP changes visibility status of products

texts:
We are facing a stupid problem. Our Magento 2 shop is connected to an external ERP system. Our ERP system sends back the status to the shop as it should, once the products are shipped and sets the order to "Complete" from "Processing".

Now, whenever this happens, our sample articles, which are set to "Not visible individually" change the status to "Catalog Search". Articles remain the same but visibility status gets changed constantly.

Does anyone of you out there understands the logic of this setting and can give a hint, how I can prevent this change?

Best regards


texts: Retrive the Shipping method and shipping rates programmatically

texts:
I had overwriten the shipping Model , I need a carrier rates from the carrier codes for the further calculation in model class.

Thanks in advanced.


texts: Magento2. Knockout. Translation doesn't work

texts:
Please advice is there any pre-requirements to translate in *.html files

Works:

<button type="submit" class="action primary">Send link to a Friend</button>

Don't want to work:

<button type="submit" class="action primary"></button>

Translation in i18n/en_US.csv exists. Am I doing something wrong?


texts: FileUploader.js throws TypeError: postData.data.set is not a function in Safari

texts:
In my custom form I use the file uploader element:
<field name="image">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string">Image</item>
            <item name="visible" xsi:type="boolean">true</item>
            <item name="formElement" xsi:type="string">fileUploader</item>
            <item name="allowedExtensions" xsi:type="string">jpg jpeg gif png svg</item>
            <item name="maxFileSize" xsi:type="number">20000000</item>
            <item name="uploaderConfig" xsi:type="array">
                <item name="url" xsi:type="url" path="path/to/imageUpload"/>
            </item>
        </item>
    </argument>
</field>

It works fine in the Chrome & FireFox, but in the Safari it throws an error:

TypeError: postData.data.set is not a function. (In ‘postData.data.set(‘param_name’, this.paramName)‘, ‘postData.data.set’ is undefined)
file-uploader.js:307

Investigating the code I have found that all is ok in the Magento 2.1.8 (in my opinion):
    /**
     * Handler which is invoked prior to the start of a file upload.
     *
     * @param {Event} e - Event obejct.
     * @param {Object} data - File data that will be uploaded.
     */
    onBeforeFileUpload: function (e, data) {
        var file     = data.files[0],
            allowed  = this.isFileAllowed(file),
            target   = $(e.target);

        if (allowed.passed) {
            target.on('fileuploadsend', function (event, postData) {
/** Line 307 */ postData.data.set('param_name', this.paramName);
                $(event.currentTarget).off('fileuploadsend');
            }.bind(data));

            target.fileupload('process', data).done(function () {
                data.submit();
            });
        } else {
            this.notifyError(allowed.message);
        }
    },

But code in the Magento 2.1.7 looks different, and it does not use the FormData.set method directly:
    /**
     * Handler which is invoked prior to the start of a file upload.
     *
     * @param {Event} e - Event obejct.
     * @param {Object} data - File data that will be uploaded.
     */
    onBeforeFileUpload: function (e, data) {
        var file     = data.files[0],
            allowed  = this.isFileAllowed(file);

        if (allowed.passed) {
            $(e.target).fileupload('process', data).done(function () {
                data.submit();
            });
        } else {
            this.notifyError(allowed.message);
        }
    },

Then I have found a similar bug report on the github:
https://github.com/magento/magento2/issues/10520
Unfortunately it has been closed by magento team without an any information.
Future investigation leaded me to the developer.mozilla.org page where I have found interesting information: they say that Safari does not supports the FormData.set method at all:

So question is: how in this case it can be used in the core magento? Is any known workaround for this error or I missed something?
PS: Tested in the Content > Design > Configuration > Header > Upload Logo and the standard file uploader does not works too - throwing the same error.
PPS: Safari Version 10.1.2 (12603.3.8)
PPPS: I have found the similar question on the StackOverflow (not in Magento context), but it has been asked more than year ago...


texts: Can't get custom attribute value magento 2

texts:
I have created custom attribute to product called thickness  and i set visible in catalog product to yes but still getting null of this attribute

I am going to store / product and created a new attribute then i set the value of my attribute as below

$_product->setCustomAttribute('epaisseur', $namep);

and then i called the attribute in my phtml :

$epaisseur = $_product->getData('epaisseur');

any help please


texts: Uploading new paid version of extension license type?

texts:
We have one free version CE extension uploaded on magento connect .Now we need to upload new version as paid.Free version license is OSL.
So, What would be the license name for Custom License?
And we want to put our website's terms & condition link to "license Url" field.


texts:
is it possible to use magento core files as fallback?

Example: I really need to make a change in this file:

app/code/core/Mage/Core/Controller/Varien/Action.php

It will work if I create a copy at

app/code/local/Mage/Core/Controller/Varien/Action.php ?

Thanks!


texts: Magento2 AheadWorks StoreLocator - add custom field

texts:
I'm trying to extend the Magento2 AheadWorks StoreLocator module by adding an additional field - store type. All works fine on the FE side. On the admin side however I've encountered some obstacles when adding/editing locations - the new field is not being saved.

On a high level, the Magento2 StoreLocator Grid save logic is based on the \Aheadworks\StoreLocator\Api\Data\LocationInterface and the ReflectionClass to produce the location entity data model and then intersect it with the submitted form data. This means that if I want to add another field I need to add the corresponding setter and getter for the field I want to add. I tried the following:

below is a sample of the AW Module interface definition; it contains setters and getters for all database fields;

namespace Aheadworks\StoreLocator\Api\Data;

use Magento\Framework\Api\ExtensibleDataInterface;

/**
 * Location interface.
 */

interface LocationInterface extends ExtensibleDataInterface
{
    const LOCATION_ID = 'location_id';

    /**
     * Get location id
     *
     * @api
     * @return int|null
     */
    public function getLocationId();

    /**
     * Set location id
     *
     * @api
     * @param int $id
     * @return $this
     */
    public function setLocationId($id);

below is how I'm trying to add the extra field following the implementation in the parent interface;

namespace MyCustomModule\StoreLocator\Api\Data;

interface LocationInterface extends \Aheadworks\StoreLocator\Api\Data\LocationInterface
{
    const STORE_TYPE = 'store_type';

    /**
     * Get Store Type
     *
     * @api
     * @return mixed|null
     */
    public function getStoreType();

    /**
     * Set Store Type
     *
     * @api
     * @param $storeType
     * @return $this
     */
    public function setStoreType($storeType);
}

The issue is that Magento\Framework\Reflection\MethodsMap::getMethodMapViaReflection method is not picking up the extending MyCustomModule\StoreLocator\Api\Data\LocationInterface.

Any thoughts on how I can overcome this. Is there a M2 way to extend interfaces?


texts: sales_flat_order_payment and column: method = null last 2 orders

texts:
Hoping a seasoned Magento guy can help out here.

So for any new orders all of a sudden the table: sales_flat_order_payment and column: method is not being updated for ONLY the last 2 orders. It was working perfectly fine and then over the weekend something has gone a miss. We are using v1.9.2.2 with no changes having been done over. It was working perfectly fine with a custom file which we use to call the following:

("SELECT `method` FROM `sales_flat_order` LEFT JOIN `sales_flat_order_payment` ON `sales_flat_order`.`entity_id` = `sales_flat_order_payment`.`entity_id` WHERE `sales_flat_order`.`increment_id` = '" . $row['increment_id'] . "'");

Was working fine. Values were pulled in to our custom script with no isses. I can also manually go to phpmyadmin view: sales_flat_order_payment and column: method which does have the payment method used inserted. HOWEVER on doing a query:

SELECT  `method` , increment_id, remote_ip, updated_at, customer_email
FROM  `sales_flat_order`
LEFT JOIN  `sales_flat_order_payment` ON  `sales_flat_order`.`entity_id` =  `sales_flat_order_payment`.`entity_id`
WHERE sales_flat_order.updated_at >  '2016-02-23'
ORDER BY updated_at DESC

returns the last 2 orders on that sales_flat_order_payment and column: method as being NULL


texts: Getting Price of Custom Option that does not have values

texts:
I am trying to get at the prices for custom options that do not have predefined values. For example, you can have a checkbox custom option that has some option values and you would assign a price to each.

However, you might have a textarea (which obviously does not have predefined values). In admin, you can attach a price to that textarea.

My question: How do I get to that price. My preference would be with the SOAP v2 API; however, I am open to PHP code solutions as well as I would simply extend the core API.


texts: cron_schedule table not emptying itself (deadlock error)

texts:
I just realized after cheking my logs that all the queries supposed to clean my cron_schedule table are not being executed properly. My table just keeps on growing.

Here are the three exception types being thrown (several times each) :

[Zend_Db_Statement_Exception]
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction, query was: DELETE FROM `cron_schedule` WHERE (status = 'missed') AND (job_code in ('ddg_automation_customer_subscriber_guest_sync', 'ddg_automation_importer', 'ddg_automation_status', 'ddg_automation_abandonedcarts', 'ddg_automation_reviews_and_wishlist', 'ddg_automation_campaign', 'ddg_automation_order_sync', 'ddg_automation_cleaner', 'ddg_automation_catalog_sync', 'ddg_automation_email_templates')) AND (created_at < '2019-11-27 03:30:08')

[PDOException]
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

cron:run [--group GROUP] [--bootstrap BOOTSTRAP]

[Magento\Framework\DB\Adapter\DeadlockException]
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction, query was: DELETE FROM `cron_schedule` WHERE (status = 'missed') AND (job_code in ('ddg_automation_customer_subscriber_guest_sync', 'ddg_automation_importer', 'ddg_automation_status', 'ddg_automation_abandonedcarts', 'ddg_automation_reviews_and_wishlist', 'ddg_automation_campaign', 'ddg_automation_order_sync', 'ddg_automation_cleaner', 'ddg_automation_catalog_sync', 'ddg_automation_email_templates')) AND (created_at < '2019-11-27 04:18:02')

Can you help ?


texts: Leverage browser caching having Varnish installed

texts:
Magento is running on 1.9.x, and web server is Nginx having Varnish installed on it using Turpentine plugin. Site speed is very fine when running from any browser due to Varnish cache but page speed showing in Google PageSpeed Insights, GTmetrix or Pingdom all are specifically suggesting to "Leverage browser caching". I made the changes in /etc/nginx/conf.d/default.conf & /etc/nginx/conf.d/mysite.conf and restarted all services

location ~*  \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires 365d;
log_not_found off;
}

But still getting the exact same result on page speed sites, so since I am running Varnish on port 80 I googled around and changed settings in /etc/varnish/default.vcl & in /var/www/vhosts/example.com/httpdocs/var/default.vcl to include and restarted all services

sub vcl_backend_response {
    if (bereq.url ~ "\.(png|gif|jpg|swf|css|js)$") {
    unset beresp.http.set-cookie;
    set beresp.http.cache-control = "max-age = 2592000";
  }
}

But intrestingly there is no change in page speed sites and all of them are still explicitly sugesting heavily to 'Leverage browser caching'. I even tried with different network connection/location thinking that there may be some issues with these websites but still the same result.

  http://www.example.com/media/wysiwyg/images/image.PNG (expiration not
  specified) http://www.example.com/media/wysiwyg/images/image2.PNG
  (expiration not specified) http://www.example.com/widgets.js (30 minutes)
  http://www.example.com/analytics.js (2 hours)
  http://www.example.com/media/wysiwyg/images/image7.jpg (8 hours)

can someone please shed light on this and help me to resolve this issue? also Turpentine plugin is being used for having Varnish with Magento, do we need to look into that maybe?


texts: Hide Radio button for custom payment method

texts:
we are using custom payment module.  we want to keep that payment method enable .

but we don't want to show this payment under Checkout > payment method. so we deleted the design part of that module.

but the Radio button is still displaying under "payment method " at the last.

How to Hide that radio button only for that payment method?


texts: In the rest api, how to return records that match any condition?

texts:
I am developing a single page aplication that need to access some resources in Magento.

In this application, I need to return all customers that match any of the search fields the user filled.
Example: Get every user that the group_id id 1 or the website_id is 3.

Is there any way to do this in the rest or soap api or do I need to implement a custom api endpoint?


texts: Magento 2.3 Ajax Breadcrumb Product-Detail

texts:
When the Product-Detail Page is loaded, on Magento 2.3 the Breadcrumb is loaded via an Ajax request. This causes a large delay, because of the amount of requests on the product page.

How could I disable this Ajax request and change the load of the breadcrumb within the product detail request?


texts: How can I change the City Name to Drop Down on Checkout Page. Magento 2

texts: I want to change the city name to dropdown menu like in dropdown it shows specific cities name like NYC, Mumbai,HongKong,Karachi and etc how is it will be possible?


texts: Magento2 - How to create Text Field On Cart Page and Save data in Sales Order?

texts: How to create Custom Text field on Cart Page ? And how to save that value After Checkout text field value save in Sales Order?


texts: Export Orders from Magento 2 database to another Magento 2 database

texts:
Is it possible to move orders from one Magento 2 database to another? Or can I manually add the information in the database table (if so what is the table(s) called?

I only have 10 orders to move across but would like them to show identical information (i.e. including the payment gateway transaction details).

Thank you.


texts:
Does anyone have experience with cancellation of Magento Enterprise? I notified them of our plan to cancel the service about 15 days prior to our renewal date instead of more than 30 days in advance. Magento is now demanding that we still pay for the full year, even though we have been completely off the platform...

Is this normal? I will also add that our renewal manager did NOT mention this cancellation policy in any emails, until we were outside of the policy. As soon as it was mentioned, I responded. Though they assure this wasnt done purposefully, I couldn't help but feel that it should be mandatory to recount this fine detail of your contract in renewal reminder emails. It feels like a predatory cancellation policy IMO and I would've expected better from an Adobe backed company.