texts: Magento 2 no Layered Navigation after filter collection

texts:
We've added a default filter for our product collection by adding a plugin:

<?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="filterCatalog" type="Silvan\StockStatus\Plugin\Catalog\Model\Layer" sortOrder="10"/>
    </type>
</config>

And the class:

<?php namespace Silvan\StockStatus\Plugin\Catalog\Model;

class Layer
{
    /**
     * afterGetProductCollection method
     *
     * @param                                                                $subject
     * @param \Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection $collection
     *
     * @return mixed
     */
    public function afterGetProductCollection($subject, $collection)
    {
        $collection->addAttributeToSelect('bgs_stock_status');
        $collection->addAttributeToFilter(
            [
                ['attribute' => 'bgs_stock_status', 'is' => new \Zend_Db_Expr('null')],
                ['attribute' => 'bgs_stock_status', 'lt' => 3],
            ]);

        $collection->getSize();

        return $collection;
    }
}

But as soon as we add the 'addAttributeToFilter' part, all Layered Navigation filter options are gone. If we remove this code it's shown again.

How can we filter our product collection, without losing the filter attributes? There are enough products to show filters.

UPDATE

I found out that the moment I add this filter, an error is thrown: https://www.dropbox.com/s/y71a032fe3n1pvr/Schermafbeelding%202017-11-30%20om%2010.21.17.png?dl=0

The filter does work fine, only this error is the real cause that the filter attributes don't show up.


texts:
I have a module which I have written for my company. It takes data from our back office solution and imports it into Magento. It also takes orders from Magento and imports them into the back office software. I have done some reading up on the types of licences I can use but don't know which one to use. My basic requirements are:

I don't want someone copying / distributing the code as their own work.
The code is written by myself but calls core magento functions.
The module will be free to download but in order to use it you will need a web service Url which my company will provide (after payment has been received).
I want to be able to distribute this to all versions of Magento (except GO (I think)).

Two questions with the above in mind:

Which licence would best suit my needs? (I haven't found a definitive list of them all to read them).
How do I enforce this licence? Is adding some terms to the top of each script enough to ensure the licence is in place?

If this information is contained somewhere then please feel free to link me to it but I couldn't find anything after my searches that answers my situation specifically.


texts: Magento 2.1 google analytics, IP anonymization

texts:
How can I make the google analytics code IP anonymous?

like this

ga('send', 'pageview', {
  'anonymizeIp': true
});

In the code?


texts: Additional option to create an account after place an order

texts:
I am using Magento 1.9.2 and often customers checkout as guest because they are involved in a process and do not want to create an account in the checkout. I want to set a second possibility on the success message page after place the order.
the customer is relaxed and maybe it's easier to get a new reg. customer then.
any help appreciated.


texts: Magento create order via API works - but we can i send a confirmation email to the Customer

texts:
I am using API V2 for creating order - It's works fine but Magento not sending   confirmation emails to the customer for new orders create via API!

I am using Magento 1.9.1.1. is there any flag to set for sending a email?

Any Ideas?


texts: How to fix corrupted sales_flat_order_item data

texts: Some of our installed modules have messed up our sales_flat_order_item data, and now I'm trying to fix the data. Some items only have configurable records and no simple records, I need to add the simple record so that our reports can work again, I'm thinking of taking the configurable record's data and create a record for the simple but I don't know how to get the correct data for product_options column. Does anyone have any thoughts on what function to use so that I can serialize the correct data for product_options column?


texts: Custom Module ACl not working in Magento

texts:
<config>
    <menu>
      <report>
            <title>Reports</title>
            <sort_order>80</sort_order>
             <children>
               <customreport>
                 <title>Category base Reports</title>
                 <action>customreports/report_index/customreport</action>
                 <sort_order>10</sort_order>
               </customreport>
             </children>
      </report>
    </menu>
    <acl>
        <resources>
            <all>
                <title>Allow everything</title>
            </all>
            <admin>
                <children>
                    <report>
                        <children>
                            <customreports translate="title" module="customreports">
                                <title>Category base Reports</title>
                                <sort_order>60</sort_order>
                            </customreports>
                        </children>
                    </report>
                </children>
            </admin>
        </resources>
    </acl>
</config>


texts: How to add placeholder in system.xml for custom admin configuration fields in magento 2

texts:
I am creating field by using this code in my system.xml file of custom module

<field id="SenderCity" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1">
    <label>Physical address</label>
    <validate>required-entry</validate>
</field>

The result of this code is as:

Now i want to add placeholder for that custom field. Should i use some custom JS or is there any tag for placeholder?


texts:
What is the difference between these two dB tables?

I can see for the data, the sales_order_grid appears to be a subset of sales_order. Is this true? What is the purpose of having duplicate tables (I assume it is to prevent lock ups).

If I have a custom module by which I want to add a field to an order, which table do I need to add the field to? And how do I ensure the data is consistent?


texts: Magento 2 : How to add additional field in Email Template?

texts: I have created my custom Payment Method in Magento2 and also 2 fields in Payment method now everything working fine now I want send the 2 additional field data in sales order email so how can I do that?


texts:
Good day to all the readers.
Is there any way to migrate data between two Magento 2?
I think that data migration tool doesn't allow to do that.
Any suggestions?
Thanks in advance.
EDIT 1:
EXPLANATION:
I have an old Magento 2.2.7 version and I have to migrate to a 2.3.4 version (not 2.4, for unexplained customer reasons) the new version contains a new theme and a completely different logic. I didn't start from the original database because I didn't have access to the production database when I started developing the theme.


texts: I'm looking to make a page similar to This site, so each image will represent a category of items. Im just not sure where to start looking . Any ideas


texts: Apply discount Block moving issue in magento2 cart page

texts:
I need to move apply discount block to the summary block in cart page.

I have used below code in
Vendor/Module/view/frontend/layout/checkout_cart_index.xml

<move element="checkout.cart.coupon"
destination="checkout.cart.totals.container" before="checkout.cart.totals" />

It is not moved to summary block.

Is there anything to achieve like that.


texts: how to change sending e-mail address newsletter

texts:
I have configure the sending newslatter from my basic store email address, e.g. sales@store.com

After confirm sending the newsletter, the magento sends from the email address from the server (eg. user@myserverprovider.com) no from my email.

therefore, all newsletter sent to clients do not reach.

How to solve this to set up shipping directly from my email account?


texts: How can I create and retrieve default billing address programatically?

texts:
Our site imports customers from external data sources. Part of this import is creating a default billing address from external data if none exists.

I have followed advice from other questions, as wells as tutorials, all of which seem to say the same thing for creating/saving a default billing address.
This seems to work at least partially.

// $c is the customer
$data_source  = array(
    'street'   => '',
    'city'     => '',
    'postcode' => '',
);

$a = $c->getPrimaryBillingAddress();

// Create a new default billing if none found
if (!$a)
{
  $a = Mage::getModel("customer/address");
  $a->setCustomerId($c->getId())
    ->setIsDefaultBilling('1')
    ->setSaveInAddressBook('1');
}

foreach ($data_source as $k => $d) $a->setData($k, $d);

$a->save();

After this code has been run, the address is visible on the customer's page in the backend and is marked as the default billing.

However, the following time data is fetched from our external source and the code is run,
the address that was saved is not retrieved (getPrimaryBillingAddress returns false).
This results in a new address being created every time this code is run.

The exception is when a customer has a default billing address set by magento.
In this case, getPrimaryBillingAddress correctly finds the address and the address data is updated and saved.

How can I programatically create a default billing address in such a way that I can retrieve it with $customer->getPrimaryBillingAddress()?

UPDATE

After receiving a possible answer, I have adjusted to code to set customer's default_billing.
The main problem persists with the changes.

$a = $c->getPrimaryBillingAddress();

// Create a new default billing if none found
if (!$a)
{
  $a = Mage::getModel("customer/address");
  $a->setCustomerId($c->getId())            // <-- variations of customer/customerID
    ->setCustomer($c)                       //     don't seem to affect
    ->setIsDefaultBilling('1')
    ->setSaveInAddressBook('1')
    ->save();                               // <--- SAVE SO WE CAN ACCESS ID

  $c->addAddress($a)                        // <--|
    ->setDefaultBilling($a->getId())        // <--+ SAVE default_billing IN CUSTOMER
    ->save();                               // <--|

}

foreach ($data_source as $k => $d) $a->setData($k, $d);

$a->save();

// ---------------- SUBSEQUENT RUNS --------------

$c->getDefaultBilling();                    // null
$c->getPrimaryBillingAddress();             // false

References

Variations on this method for creating/setting a customer default address were found at these locations:

SO - Magento : Add customer default billing address
Programatically create customer and order in Magento with full blown One Page Checkout process under the hood


texts:
I would like to re-order the left side bar menu in the admin page.
I am running VneComms V-Admin Theme

Below is how is currently looks. I would like to re-order the headings. For example, put 'General' at the top.Thanks in advance.


texts:
We need product personalization feature as here, means we want customers to upload the product image and add text & color from product view page.

Then when customer buys product, we will send a product with same image.
How we can use ImageMagick to implement this kind of feature. How to install imagemagick to magento site and use it.

Edit

I want to know how we can use imagemagick for creating particular feature.

Is we need place imagemagick folder in magento root or is we have to create any modules to implement the features. please give examples to implement some features.

Edit 2

as a 1st step, we are using magento default custom options to upload files [images] in product view page, now we want to replace the Product images by  images uploaded through custom option.


texts:
I have built a plugin but for for me to checkout I have to send all the details as a part of a hidden form can anyone on how I can bind the the order details,customer details and merchant details to the hidden from.

Thanks.


texts: Magento 2 product list widget, randomize

texts:
How can I change the sort order of the product list widget to random()?
I am talking about the Product list widget you can insert on CMS pages.

Thank you.


texts: How to make my own module for attribute sets for magento backend?

texts:
Hello I´ve made my own module for magento backend for a new attribute set module from the menu just like the one magento uses, but I don´t know how to get the list for the attribute sets to print it, in order for it to appear, when someone enters the module.

I used this tutorial to create the new module
Creating a Magento admin page tutorial.

But when I try to call the block from magneto, in the xml to get the attribute sets list and print it, I get an empty search.

(in layout) <block class="Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Toolbar\Main" name="adminhtml.catalog.product.set.container"/>

So im lost into how to make this work with the same structure from the example in the turotial.

File structure

I´ve tried these, to no success
How to get all attribute set list Magento 2?
How do I get attribute set name?


texts: How filtered attribute hides in layered navigation?

texts:
If I select the color as a filter in layered navigation, then it hides that color attribute and displays the remaining attributes regarding  that color.
I want to make this function for layered navigation Magento 2 rest API.
If someone knows please help me.


texts: I cannot access my Magento website and even the admin section

texts:
I was trying to install, in Magento connect, a extension called Multisite Integration for WordPress from FISHPIG.

Then I click refresh. Then it send me this message: Module "Fishpig_Wordpress_Multisite" requires module "Fishpig_Wordpress"...

So I try to go back with the back button on the browser but the only thing I could see was the same message. So then I tried to access the admin section of my Magento. Then I got this error message: Service Temporarily Unavailable.

The server temp. unable to service your request due to maintenance downtime or capacity problems. Please try again later.

My question is: how can I get out of this?

I tried this in my MySQL: SET FOREIGN_KEY_CHECKS=0; but with no luck.

UPDATE

I was able to access my admin panel by removing: maintenance file.

But when I access the Magento connect I just get this message:  Module "Fishpig_Wordpress_Multisite" requires module "Fishpig_Wordpress"

With no options. What do I do to get out?


texts:
I have a form in my .phtml file with the following form tag:

<form id="coupon-form" action="<?php echo $this->getUrl('checkout/cart/couponPost') ?>" method="post">

and the javascript:

<script type="text/javascript">
//<![CDATA[
var couponForm = new VarienForm('coupon-form');
couponForm.submit = function (isRemove) {
    if (isRemove) {
        $('coupon_code').removeClassName('required-entry');
        $('remove-coupon').value = "1";
    } else {
        $('coupon_code').addClassName('required-entry');
        $('remove-coupon').value = "0";
    }
    return VarienForm.prototype.submit.bind(couponForm)();
}
//]]>
</script>

When the user clicks the submit button, the following error gets spat out:

Uncaught ReferenceError: couponForm is not defined

UPDATE

I checked that prototype is the first script loaded on the page. Also, tried to put the javascript in a document ready handler:

$(document).ready(function(){ /*code here*/ });

But it didn't help.

Any ideas? Thanks.


texts: Magento 2 How to add custom validation rules and apply them?

texts:
I'm trying to modify some validation rules for the State input in shipping address. I want to add an error message if user selects 'Texas'.

I created a mixin for Magento_Ui/js/lib/validation/rules in requirejs-config.js

I can add a new rule called 'customTexasValidationRule' in the rules collection. However i don't know how to apply this rule to the select input.

I see that i can declare the rules in the select template at vendor/magento/module-ui/view/frontend/web/templates/form/element/select.html but i don't want to create a new template file for such a small task.

Is there any quick and easy way to add such a small custom validation in Magento 2?


texts: Magento Facebook Login (belvg) stoped working

texts:
We are using the belvg "Facebook Connect and Like" module on magento1 and noticed that login functionality is not working anymore. The error thrown at frontend is:

 Facebook Connect attempt failed

In the log files we can see this error.

2017-06-02T17:24:26+00:00 DEBUG (7): Access Token not found

PS. I did find the solution, so i made this post just to help others..


texts: Injecting model in controller not working

texts:
I have created a custom module and I want to inject my model in a constructor , but when I inject the model class then my controller stops working.

namespace DD\Reservations\Controller\Url;

use Magento\Framework\App\Action\Context;
use Magento\Framework\App\Action\Action;
use DD\Reservations\Model\QuoteReservation;
use Psr\Log\LoggerInterface;

class TestResponse extends Action{

    private $logger;

    public function __construct(
        Context $context,
       // QuoteReservation $quoteReservation,
        LoggerInterface $logger
    )
    {
        $this->logger = $logger;
        parent::__construct($context);
    }

    public function execute()
    {
        echo 'This is from test response';
        $this->logger->debug('This is debug from test response');
    }
}

If i uncomment the commented line from constructor my controller won't display the echo message anymore , neither the log message.

This is my model file:

<?php

namespace DD\Reservations\Model;

use Magento\Framework\Model\AbstractModel;

class QuoteReservation extends AbstractModel{

    protected function _construct()
    {
        $this->_init(\DD\Reservations\Model\ResourceModel\QuoteReservation::class);
    }
}


texts: what is the event in magento 2 when store configuration save?

texts: what is the event that is triggered after the save config action is performed in magento 2 Stores - Configuration, and how to write a simple observer method after the save is done.


texts: Magento 2 How to remove what is paypal? text?

texts:
I'd like to remove what is paypal text and paypal logo from checkout.

I found it in
vendor\magento\module-paypal\view\frontend\templates\payment\mark.pthml

I tried comment out the codes but nothing has changed.
I flushed all caches and browser history.

Thank you


texts: Change magento backup folder from /var/backup to different/external folder

texts:
Is it possible to change the default Magento backup folder (var/backup/) to a different/external folder?

We want to keep the Magento folder as small as possible and save those backups in a different location.


texts: How to integrate ReactJS with Magento 2 frontend

texts:
For example

I have to build a contact form in header.

I want to create a module and then call that module in header


texts: Magento 2 : how to use TinyMCE v4 in Magento 2.2.6?

texts:
I want to use TinyMCE Editor Version 4 in Magento version 2.2.6 Which are use in magento version 2.3.1.

If any one have solution then Pleas Provide me..

in place of


texts: magento2 how to override or custom input checkout

texts:
I have problem to edit checkout page

I can't find path to edit

I want edit input and add custom css to filed in
checkout page magento2

Can help me to edit or override checkout page?


texts: Magento 2: Plugin not working on \Magento\Swatches\Block\LayeredNavigation\RenderLayered

texts:
I'm trying to create a plugin for \Magento\Swatches\Block\LayeredNavigation\RenderLayered in order to modify the return of getOptionViewData()
It's not working.

My di.xml looks like that:

...

<type name="Magento\Swatches\Block\LayeredNavigation\RenderLayered">
    <plugin name="vendor_plugin_block_swatches_layerednavigation_renderlayered" type="Vendor\Module\Plugin\Block\Swatches\LayeredNavigation\RenderLayered" sortOrder="10"/>
</type>

...

My plugin looks like that:

...

/**
 * @param \Magento\Swatches\Block\LayeredNavigation\RenderLayered $subject
 * @param callable $proceed
 * @param FilterItem $filterItem
 * @param Option $swatchOption
 * @return array
 */
public function aroundGetOptionViewData(
    \Magento\Swatches\Block\LayeredNavigation\RenderLayered $subject,
    callable $proceed,
    FilterItem $filterItem,
    Option $swatchOption
) {
    $data = $proceed($filterItem, $swatchOption);
    $data['test'] = 'working!';
    return $data;
}

...

I'm using Magento version 2.2.4

I don't want to override the entire class, I prefer to use a plugin.

Of course, I did setup:di:compile, cache:flush

Does anyone have the idea about this?


texts:
I just installed Magento 2.3.3 with a theme which includes MGS Frontend Builder.

If I try to open Catalog - categories or products
Try to login as a customer or just try to change the configuration to flat products and categories Im getting this error:

  Fatal error: Declaration of
  MGS\Mpanel\Helper\Swatches\Data::getProductMediaGallery(Magento\Catalog\Model\Product
  $product) must be compatible with
  Magento\Swatches\Helper\Data::getProductMediaGallery(Magento\Catalog\Model\Product
  $product): array in

Does anybody know how to fix this error ?


texts:
I am trying to fetch customer addresses on a custom page using below code.

$shipId = 'VALID SHIPPING ADDRESS ID';
$billId = 'VALID BILLING ADDRESS ID';
$addressObject = Mage::getModel('customer/address');
$shipAddress = $addressObject->load($shipId);
$billAddress = $addressObject->load($billId);

But I don't know why I am getting only the billing address data in $shipAddress and $billAddress.
Actually I am getting the address which is lower in the order. For example if modify the code like below

$billAddress = $addressObject->load($billId);
$shipAddress = $addressObject->load($shipId);

Now I am getting the shipping address in both the variables.
Please let me know what is the issue here and how this can be fixed.


texts:
I am trying to make a couple of things working with bundle products.
But i cant seem to get it working properly.
Also i cant seem to find the correct module that does this with bundle products.

What i am trying to reach is the following:

On the product page of a bundle product you have an image gallery.
I want to add the product option main images to this gallery.

After that i want to be able to select a option and when i do that it updates the selected gallery image to the main image from that option.

However until this point i have searched for a solution online and inside the code. But i cant seem to figure it out how i should approach this correctly to make it all work. I was mostly testing on the gallery.php of the category/view/product folder.

If anyone knows how i can make this work i would appreciate it.
Or if you know a module that does this work i would love to hear that too.


texts: Magento 2 dropdown attribute options not showing up in admin

texts:
In admin :
Stores -> Attributes -> Product -> Color

When I add new option it is allowing to add new options. But unable to edit existing option and also not showing options in "Manage options section"

Please check attached screen shot:


texts:
Is there a way to exclude a js file from the magento merge js file?

We are using Lesti Merge and merging with handles. Everything works fine but I want to exclude jquery from the merge file and load it from the google cdn. Is this possible and ultimately worthwhile?


texts: Magento 2 - Product displaying takes so much of time

texts: Product displaying takes so much of time in Magento 2. I click on the product it takes so much time to display the product.


texts: Claue theme and image positioning in Google

texts:
A few months ago we migrated from 1.9.2 to Magento 2.2.4 and also changed the template, using Claue. Before we had an average of 120 clicks a day in the images positioned in Google and now 20 on average. The developers of Claue have modified several times code but still do not come up with the problem of positioning my images since they remain the same.
I show you how was the average position a year ago when I was in Magento 1.9 with another template and how it is now with Claue.

I thought the problem could be using Lazy Load with the images and I stopped using it three weeks ago but the behavior is the same.
The store is www.shopmami.com. Someone could help me?


texts: Unable to edit product when it is backorderd in magento 2.1.4

texts:
I have migrated my site from 1.9.3.0 to 2.1.4. Almost all of the migrated products are back-ordered, that means the quantity is below 0.

The new 2.1.4 site is configured to support back orders as it is described in the documentation: Store - Configuration - Catalog - Inventory - Product Stock Options - Backorders -> 'Allow Qty Below 0'.

the problem:

When I try to edit a product that is back-ordered (i.e. Qty < 0) it is impossible I to save it. There is a error message below the Qty box: 'Please enter a valid number in this field.'


texts: Magento notifications are not showing in the frontend

texts:
I am using Magento 2. I am trying to display magento notifications on the page of custom module. I have followed these posts:
How to show session messages at front end in magento 2 beta
How to use messageManager to show an error after redirect
How to show success message in session Magento2

I am using messageManager and message block is being rendered in the page, but messages are still not displayed. While these messages (that I add) are displayed in regular magento page.

I notice that scripts messages.js and messageList.js are not present in the page. Does it have anything to do with that? If yes how to add them?


texts: Avs_FastSimpleImport - Log not Imported Products

texts:
short question. Is there a way to log the not imported products (sku, or whatever) ? I import from csv. The following functions are for this task useless, and a cannot get the failed products:

// echo $import->getErrorMessage() . PHP_EOL;
// echo $import->getErrorMessages() . PHP_EOL;

thanks in advance


texts: Create and Save Simple Products with Configurable Products Images

texts:
I loop through a list of products on a CSV mixed with simple and configurable products.  I can successfully create all products how I want them with the exception of one thing.

$product->setWebsiteIds(array(1))//website ID the product is assigned to, as an array
                    ->setAttributeSetId($attributeSet)//ID of a attribute set named 'default'
                    ->setTypeId($typeId)//product type
                    ->setCreatedAt(strtotime('now'))//product creation time
                    ->setSku($sku)//SKU
                    ->setName($name)//product name
                    ->setWeight($weight)
                    ->setStatus(1)//product status (1 - enabled, 2 - disabled)
                    ->setTaxClassId(2)//tax class (0 - none, 1 - default, 2 - taxable, 4 - shipping)
                    ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)//catalog and search visibility
                    ->setCountryOfManufacture('US')//country of manufacture (2-letter country code)
                    ->setPrice($price)//price in form 11.22
                    ->setMsrpEnabled(1)//enable MAP
                    ->setDescription($description)
                    ->setShortDescription('')
                    ->setData('metal_type', $metalType)
                    ->setMediaGallery(array('images' => array(), 'values' => array()))//media gallery initialization

//HERE IS THE IMPORTANT PART BELOW

 ->addImageToMediaGallery('media/lees_catalog/BSST1.jpg', array('image','thumbnail','small_image'), true, true);

//Above here

                    ->setStockData(array(
                            'use_config_manage_stock' => 0, //'Use config settings' checkbox
                            'manage_stock' => 0, //manage stock
                            'is_in_stock' => 1, //Stock Availability
                        )
                    )
                    ->setCategoryIds(array($category)); //assign product to categories

The issue arises when you try to save products with the same image, Magento goes and deletes the image then if the product is saved then it takes it away for both.  I've tested this with one product it uploads the image fine, with multiple products with different images it uploads all the images and products fine.  This problem only occurs when a product, doesn't matter if its simple or configurable shares the same image(file path).  Is there any way to easily fix this?


texts: Get order data when invoice is being create from admin

texts:
How to get order data of which admin is creating invoice.

I am using this code

observer call on config.xml

<events>
<sales_model_invoice_pay>
    <observers>
       <Karmick_Refer_Model_Observer>
          <type>singleton</type>
          <class>Karmick_Refer_Model_Observer</class>
          <method>changeStatus</method>
       </Karmick_Refer_Model_Observer>
   </observers>
</sales_model_invoice_pay>
</events>

Observer.php

<?php
class Karmick_Refer_Model_Observer{
public function changeStatus(Varien_Event_Observer $observer){
    $due = $observer->getEvent()->getInvoice()->getOrder()->$order->getBaseTotalDue();
    Mage::log($due.'@@@');

}
}
?>

but it seems that nothing is being printed on log


texts:
I'm getting an error Call to undefined method Magento\Customer\Api\Data\CustomerExtension::getIsSubscribed() when running integration tests on my local development environment.

For some reason it seems that some extension attributes are not generated. In this case, Magento_Newsletter should add getIsSubscribed() method to CustomerExtension, but the method is missing. Any ideas why this is happening?

Log output:

Call to undefined method Magento\Customer\Api\Data\CustomerExtension::getIsSubscribed()
 /var/www/html/vendor/magento/module-newsletter/Model/Plugin/CustomerPlugin.php:157
 /var/www/html/vendor/magento/framework/Interception/Interceptor.php:146
 /var/www/html/vendor/magento/framework/Interception/Interceptor.php:153
 /var/www/html/generated/code/Magento/Customer/Model/ResourceModel/CustomerRepository/Interceptor.php:52


texts: Move Category Description to the bottom after product list Magento 2.0.4

texts:
How can I move Category Description to the bottom after product list in Magento 2.0.4?

I have followed every single advice on this URL:how to get Category description after product listing
how to get Category description to the bottom of the page magento 1.9

But, They don't work because the advice is for Magento 1.9 and not for Magento 2.0.4.

I have tried to modify list.phtml but it seems there is another file that is controlling the category image and description feed. Please help.


texts: How do I add a parameter to wrapResult in FinalPriceBox?

texts:
I've extended \Magento\Catalog\Pricing\Render\FinalPriceBox and overwritten the function wrapResult, to get the styling I want for my product prices.
protected function wrapResult($html)
{
    if($this->getRequest()->getControllerName()=='category'){
        return '
getData('css_classes') . '" ' .
            'data-role="priceBox" ' .
            'data-product-id="' . $this->getSaleableItem()->getId() . '" ' .
            'data-price-box="product-id-' . $this->getSaleableItem()->getId() . '"' .
            '>' . $html . '
';
    }else{
        return '
getData('css_classes') . '" ' .
            'data-role="priceBox" ' .
            'data-product-id="' . $this->getSaleableItem()->getId() . '" ' .
            'data-price-box="product-id-' . $this->getSaleableItem()->getId() . '"' .
            '>' . $html . '
';
    }
}

It works well on the category page. On my Product page though, I have 2 types of prices that I show. I have the price for the product, but I also have a collection of similar products that also have prices. What I want is that the collection of products should have the same styling as prices on the category pages. But the main product price should remain as it is.
How can I add a parameter so I know in FinalPriceBox.php which class I should add?
The way I render the product price is:
use Magento\Catalog\Pricing\Price\FinalPrice;
use Magento\Framework\Pricing\Render;

class ListProduct
{
    protected function getPriceRender()
    {
        return $this->getLayout()->getBlock('product.price.render.default')
            ->setData('is_product_list', true);
    }

    public function getProductPrice($p)
    {
        $priceRender = $this->getPriceRender();

        $price = '';
        if ($priceRender) {
            $price = $priceRender->render(
                FinalPrice::PRICE_CODE,
                $p,
                [
                    'include_container' => true,
                    'display_minimal_price' => true,
                    'zone' => Render::ZONE_ITEM_LIST,
                    'list_category_page' => true
                ]
            );
        }

        return $price;
    }
}

Could I add a value after 'list_category_page', and if so how can I get it in FinalPriceBox.php ?


texts: Redirect to a Catalog Page Filter by specific Categoy Id

texts:
i'm a beginner so excuse me in advance!
I've made a custom module for create a nested categories dropdown.

My module solution is differnet from this https://stackoverflow.com/questions/23168353/nested-categories-dropdown-in-magento but I've start with this one. It's done with a same logic.

Now I've got a big problem.
When i post the form i would like to redirect to a catalog page filter by the category id that i passed with post method of my form.

So if I undersand I have to make a function "saveAction" on my IndexController.

but what I have to write in it? How can make a redirect to this specific page?

i've try it but it doesn't Work

    public function saveAction()
 {
    $catID = ''.$this->getRequest()->getPost('CatId');
    if(isset($catID)&&($catID!='') )
   {
        $_category = Mage::getModel('catalog/category')->load($catID);
        $redirect = $_category->getUrl($_category);
        $this->getResponse()->setRedirect($redirect);
   }
}


texts: getQty() is not working i can not take each quantity per Item?

texts:
I have tried getTotalQtyOrdered() but still not success, Any idea guys?

    $dirPath = Mage::getBaseDir('var') . DS . 'export';

if (!is_dir($dirPath)) {
mkdir($dirPath, 0777, true);
}

foreach ($order->getAllVisibleItems() as $item){

  $data[] = array(

        'ID'    => $item->getSku(),
        'QTY'   => $item->getQty(),
        'PRICE' => $item->getPrice()

        );

     }

    $xml = new SimpleXMLElement('<root/>');
    foreach ($data as $item) {
    $xmlItem = $xml->addChild('item');
    foreach ($item as $key => $value) {
            $xmlItem->addChild($key, $value);
        }
    }

    file_put_contents($dirPath. DS .$order->getIncrementId().'.xml', $xml->asXML());


texts: In magento 2 what is $F in js.phtml file

texts:
Please open file "vendor\magento\module-catalog\view\adminhtml\templates\catalog\product\attribute\js.phtml".

Go to the function updateRequriedOptions(Line Number 258)

 function updateRequriedOptions()
{
    if ($F('frontend_input')=='select' && $F('is_required')==1) {
        $('option-count-check').addClassName('required-options-count');
    } else {
        $('option-count-check').removeClassName('required-options-count');
    }
}

Please, what is $F here?


texts: Magento redirecting the page url to the home page when i am clicking from outside. if you click here ,it will redirect to home page the link is http://whiteboardsnz.com/porcelain-whiteboards-3.html but when i am clicking in website it is working correctly.


texts: How to extend private function getTierPriceStructure($tierPricePath) in class AdvancedPricing

texts:
I am having some trouble here. I need to extend private function getTierPriceStructure($tierPricePath) in class \Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AdvancedPricing.

How do I achieve this?

PS: I am trying to add new field in tier_price section of product edit page.

This is what I want to do:

private function getTierPriceStructure($tierPricePath)
{
    //since below line is calling parent's private function, it will throw error.
    $result = $this->getTierPriceStructure($tierPricePath); //this is private function
    $newColumn = [
        'children' => [
            'record' => [
                'children' => [
                    'value_cost' => [
                        'arguments' => [
                            'data' => [
                                'config' => [
                                    'componentType' => Field::NAME,
                                    'formElement' => Input::NAME,
                                    'dataType' => Price::NAME,
                                    'label' => __('Cost'),
                                    'enableLabel' => true,
                                    'dataScope' => 'value_cost',
                                    'addbefore' => $this->locator->getStore()
                                                                 ->getBaseCurrency()
                                                                 ->getCurrencySymbol(),
                                    'sortOrder' => 80,
                                    'validation' => [
                                        'required-entry' => true,
                                        'validate-greater-than-zero' => true,
                                        'validate-number' => true,
                                    ],
                                    'imports' => [
                                        'priceValueCost' => '${ $.provider }:data.product.value_cost',
                                    ],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ];
    $result = $result + $newColumn;

    return $result;
}


texts: How can we get customer shipping address based on address id in magento 2

texts: How can we get address id based get address details! I got all address details getting based on customer id but i need to get address details based on address id?How can i achieve this


texts: Magento 2: How to add multiple AND conditions to one single attribute that could be used to join other condition groups?

texts:
I could filter a product collection by (attribute A: condition A OR condition B) AND (attribute B: condition C OR condition D) with the following codes:

$collection->addAttributeToFilter('attribute A', [
  [condition here...], //e.g. ['neq' => 'x']
  [condition here...] //e.g. ['gt' => 'y']
]);
$collection->addAttributeToFilter('attribute B', [
  [condition here...],
  [condition here...]
]);

But I have no idea how to achieve this:
(attribute A: condition A AND condition B) OR (attribute B: condition C and condition D)

I have also tried to use search criteria builder, but still no luck so far.


texts: Magento Custom Options / Associated Products Order

texts:
I have a configurable product which has associated simple products, but on the configurable there is also two custom options.

I would like the custom options to display first rather than the associated dropdown options.

By default custom options display after associated options list.

I saw a reference call in the XML which relates to the block

'product.info.options.wrapper'

However looking into how the option types are loaded, I cannot see how they are chosen to loaded in with an order without a position call.

Any advice would be grateful.


texts: Change admin backend password minimum length

texts:
I set my frontend password minimum lenth to 6 from backend via

Store > Configuration > Customers > Customer Configuration > Minimum Password Length

But i can't find setting to manage backend admin password length from every configuration, i want to change backend admin password length to 8.


texts:
I am having a Product Id, which is a configurable product. For this product I am getting the options I can choose from like you can see below:

    $productAttributeOptions = $Product->getTypeInstance(true)->getConfigurableAttributesAsArray($Product);
    $attributeOptions = array();
    foreach ($productAttributeOptions as $productAttribute) {
        foreach ($productAttribute['values'] as $attribute) {
            $attributeOptions[$productAttribute['label']][$attribute['value_index']] = $attribute['store_label'];
        }
    }
    $product['options'] = $attributeOptions;

With that code I get something like that:

But now I want to get the assigned product Id of the options. So I want to know the product Id if you choose the color "Grey" and size "M" for instance.


texts:
I added a text area in the admin form and want to show pre-defined text in that. So is it possible and How?
$fieldset->addField(
                'approval_note',
                'textarea',
                [
                'name' => 'approval_note',
                'label' => __('Thank you Note'),
                'title' => __('Thank you Note')
                ]
            );

I want to show text with the below data by default.

Need Help !!


texts:
The tax won't process even if everything is set correctly. Magento 2.2.3
  ![1]: https://i.stack.imgur.com/1RGqz.png
  ![2]: https://i.stack.imgur.com/nKcXz.png
  ![3]: https://i.stack.imgur.com/sN4QN.png


texts:
i'm new to magento. In my custom module I'm getting list of available shipping methods.

Shipping Methods are getting but available shipping services are not getting.

my code is:

<?php

class Easylife_Ship_Model_Cart extends Mage_Checkout_Model_Cart
{
    public function services()
    {

      $servers =  $this->_getCart()->getQuote()->getShippingAddress()->setCountryId('India')
            ->setCity('Hyderabad')->setPostcode('500073')->setRegion('Andhra Pradesh')
            ->setCollectShippingRates(true);
                 //$this->getQuote()->save();
        return $servers;

    }

    protected function _getCart()
    {
        return Mage::getSingleton('checkout/cart');
    }

    public function shpmethods()
    {
        $methods = Mage::getSingleton('shipping/config')->getActiveCarriers();

        $options = array();

        foreach($methods as $_code => $_method)
        {
            if(!$_title = Mage::getStoreConfig("carriers/$_code/title"))
                $_title = $_code;

            $options[] = array('value' => $_code, 'label' => $_title . " ($_code)");
        }

        return $options;
    }

}


texts: Add responsive custom footer in Magento 2

texts:
I created a custom footer but I want it to be responsive.
My code is:

LOCATION

Map

SUPPORT

Technical Support

CONTACT

Contact

MY ACCOUNT

Sign In

FOLLOW US AT

Normal preview:

Mobile preview:


texts: How to change price for all products in magento

texts:
we are trishlaemart.com we do have some products for example

existing product JulietBra = price is 10o$
                             associate products is 120$

need to change price now for all product as 120$ in single shot how to do it ? any easy way is there or i need to do each and every product. manually

same wise one product is 10$ i need to change all price to 20$ includes associate products.


texts: Magento 2.3.1 server resources requirements

texts:
I have a Magneto CE 2.3.1 installation whit 7 stores and a total of 24 store views, in each store I got ~60 000 product's, so that's almost ~1.440.000 of different product data. I'm using multi-source inventory with 8 sources.
Running indexer on schedule. If I import a CSV  file with 8000 rows ( SKU / price / custom_attribute ) it takes 1 days to reindex all the data.

What would be the server requirements to run this site in a decent manner?

Any suggestions or recommendations about what I can do to optimize is deeply appreciated!

Current SV  specs:

1 Dedicated DB SV (20cores) running MySQL 5.6.43

1 Hosting (master) SV running LiteSpeed

-php 7.2.4
-64 ram
-16 cores

1 Load balance SV

1 Slave SV (an HTML copy of master SV)


texts: Magento 2: How to make the forgotten password captcha input field's label a placeholder?

texts:
I am trying to make captcha input label a placeholder, not label.

I followed the following instructions for doing the same thing on the checkout:
https://diweirich.com/magento-2-using-placeholders-in-form-fields/
Add placeholder and remove all labels in Magento 2 Checkout.

But it doesn't affect the captcha input field. Can any suggest where I need to edit to achieve a placeholder as opposed to label for the captcha input field?


texts:
In System->Configuration->Web->Default Pages I can set the default homepage and others.
I can even set different homepages on different store views. So far so good. That's very useful.
But here is what I don't understand.
The dropdown that allows me to select the pages looks like this:  (generated by Mage_Cms_Model_Resource_Page_Collection::toOptionIdArray).

<select class=" select" name="groups[default][fields][cms_home_page][value]" id="web_default_cms_home_page">
    <option value="no-route">404 Not Found 1</option>
    <option value="home">Home page</option>
    <option value="home|5">Home page</option>
    ...
</select>

As you can see, when I hage 2 pages with the same identifier (home) the second one has the value identifier|page_id. The rest just use the identifier.

Now on the frontend, when the homepage should be rendered, the config value is read and passed to the Mage_Cms_Helper_Page::_renderPage method, that renders the page.

But in the method mentioned above this is how the page is determined:

   if (!is_null($pageId) && $pageId!==$page->getId()) {
        $delimeterPosition = strrpos($pageId, '|');
        if ($delimeterPosition) {
            $pageId = substr($pageId, 0, $delimeterPosition);
        }
        $page->setStoreId(Mage::app()->getStore()->getId());
        if (!$page->load($pageId)) {
            return false;
        }
    }

So the id after | is never used.
Is there any advantage of generating the options like this identifier|page_id that I'm missing?
It seams to me that it would have worked fine with only the page identifier or just the page id as option values.


texts: magento 2.1.1 checkout page logo not showing

texts:
i have set logo in header but not show in proper way please tell how to set it.
i have change it code to:


texts: Magento 2 : Getting Interface Error on Frontend

texts:
I'm getting following error on frontend.

Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\App\RequestSafetyInterface in C:\xampp\htdocs\Magento\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php:73 Stack trace: #0 C:\xampp\htdocs\Magento\vendor\magento\framework\ObjectManager\ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...') #1 C:\xampp\htdocs\Magento\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(126): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...') #2 C:\xampp\htdocs\Magento\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'requestSafety', 'Magento\\Configu...') #3 C:\xampp\htdocs\Magento\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Configu...', Array, Array) #4 C: in C:\xampp\htdocs\Magento\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php on line 73

How to fix this error?

I have installed fresh magento v2.1.3 and enabled couple of my modules and got this error. So I disabled those modules but error persists, what is root cause of this error and how to fix it?


texts: Display tabs on product display page horizontally

texts:
I am using magento 1.9.2.3, I want to display the tabs(i.e., Description, Review, Videos etc) in the product display page horizontally. The tabs are currently being displayed vertically.

My website is :

www.ciaotrips.com


texts: How to get the child product ids from a product id in magento 2

texts:
How to get the child products id from a product id in magento 2.

I am saving the products with its custom attributes. And it saved successfully.
But

I wish to check what type of product i have using a product id.
If i have  a simple product save the product as it is. But if it is a configurable product , I wish to get all the child products and need to assign the attributes to the child also.

So My question is How to check whether the product is simple or config ?

If it is configurable product, How to get its child product Ids?


texts: Plugin To Update Configurable Product Attributes

texts:
I have looked all over Google for something like this, but I cant seem to find this. I know I can do it programatically or via the database, but I wouldn't trust anyone else doing this apart from me, but I've got around 100+ products that require a new selection on the front end.

So far we have Size selection, but we also need a finish selection on the front end. Now I have 3 options:

Delete the current product and start from scratch
Create a script that does this
PHPMyAdmin modification

2-3 are out the question, as I would like others to do this too, so a backend plugin would be perfect (if there are any?)

This may have to be a possibility, but with so many images and categories to save out and re-upload and apply, this will become quite time consuming.

There must be something out there?


texts: How to restore M1.9 database to pre-migration state?

texts:
I'm testing data migration from 1.9.1.0 to 2.3.3 and was wondering if there is a way to restore M1.9 database to pre-migration state somehow without restoring it from backup? Is there some operations that could be done in the database in order to achieve this?

I'm afraid that when I start the migration process with initial data migration and prepare the M2 shop, some new additions in M1.9 installations during the M2 preparation cause the later delta migration to fail and we no longer are able restore M1.9 DB from backup (because we don't want to lose the new data) and migration fails completely. In that case I need a way to restart the migration from the beginning.


texts: Is there a Magento v.1.x developer reference like is Codex for WordPress?

texts: Is there something like https://developer.wordpress.org/reference/ (Code Reference) for Magento CE v.1.x like this is for WordPress?


texts:
I need to override the template:module-checkout/view/frontend/web/template/shipping.html
I have created requirejs-config.js

var config = {
    map: {
        '*': {
            'Magento_Checkout/template/shipping.html':
                'Anime_Shipping/template/shipping.html'
        }
    }
};

I have created the copy of template file in: app/code/Anime/Shipping/view/frontend/web/template/shipping.html.
I have copied the whole code from original file to my own. I deployed the satic-content, cleared cache, compiled the code. The template does not seem to load. It is neither taking the original nor mine. What might be the problem?


texts: Magento 2: How to move product attribute group tab

texts:
I want to move 'Discogs Listing' tab after the content tab. I dont know how to do it. drag and drop from attribute set move my tab after the 'Product Reviews' but i want after the 'content' tab

Any help would be appreciate. thank you


texts: "frontend_input" is null against attribute I have loaded

texts:
I assume I am doing something wrong when loading this attribute but when I do: $attribute->getFrontendInput() it's null. I have also tried: $attribute->getData("frontend_input") to no avail.

When debugging I can also see the value is null.

I am loading the attribute like:

$attribute = Mage::getModel('eav/entity_attribute')
        ->getResourceCollection()
        ->setCodeFilter($code)
        ->load()
        ->getFirstItem();

Edit

Interestingly, I have dug into the loadByCode method and the SQL it runs: SELECTeav_attribute.* FROMeav_attributeWHERE (eav_attribute.attribute_code='udaattr_choice') AND (entity_type_id = 4) returns frontend_input as null as well.

I will have to check my code that creates the attribute.


texts: Hide Custom Grid Mass Action for non administrator user

texts:
Currently I am working in Magento version-2.2.3. I have prepared one custom grid page using ui-component and added mass action on it which will be useful for admin. But now I want to hide Mass action option from users other then administrator role.

Any help will be appreciated. Please let me know.


texts: Magento watermark Display only first image

texts:
Each product in my web watermark showing first image only :

Here is the link - https://www.mustthai.com/index.php/our-products/desserts-processed-fruits/sun-dried-banana-with-honey-lantong-155g.html

I want show all Base Image Watermark for each product.

Sorry to some difficulty with foreign language.

Thank you for your support.

*Magento 1.9
*themeforest


texts: multi store using magento 2 website admin not able to access

texts: I created multi store in magento 2. but not able to access website admin. Kindly help me to get the solution of my problem.


texts: I want to ask those who made the Migration from version 1.9 to version 2.0.2 what are the most database changes the names of tables affected and the attributes.


texts: Error when creating or editing Products: magesetup/source_revocationProductType not found for attribute "revocation_product_type"

texts:
I have the following error when creating / editing Products:

a:5:{i:0;s:120:"Quellen-Modell "magesetup/source_revocationProductType" not found for attribute "revocation_product_type" in app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(387): Mage::exception('Mage_Eav', 'Quellen-Modell ...')

The full trace:

a:5:{i:0;s:120:"Quellen-Modell "magesetup/source_revocationProductType" wurde nicht gefunden für das Attribut "revocation_product_type"";i:1;s:3616:"#0 /app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(387): Mage::exception('Mage_Eav', 'Quellen-Modell ...')
#1 /app/code/core/Mage/Adminhtml/Block/Widget/Form.php(201): Mage_Eav_Model_Entity_Attribute_Abstract->getSource()
#2 /app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php(70): Mage_Adminhtml_Block_Widget_Form->_setFieldset(Array, Object(Varien_Data_Form_Element_Fieldset), Array)
#3 /app/code/core/Mage/Adminhtml/Block/Widget/Form.php(144): Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes->_prepareForm()
#4 /app/code/core/Mage/Core/Block/Abstract.php(918): Mage_Adminhtml_Block_Widget_Form->_beforeToHtml()
#5 /app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php(79): Mage_Core_Block_Abstract->toHtml()
#6 /app/code/core/Mage/Core/Block/Abstract.php(293): Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs->_prepareLayout()
#7 /app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#8 /app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('adminhtml/catal...', 'product_tabs')
#9 /app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('adminhtml/catal...', 'product_tabs')
#10 /app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#11 /app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#12 /app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#13 /app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#14 /app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(Array, true, true)
#15 /app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(207): Mage_Adminhtml_Controller_Action->loadLayout(Array)
#16 /app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_ProductController->newAction()
#17 /app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('new')
#18 /app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#20 /app/Mage.php(684): Mage_Core_Model_App->run(Array)
#21 /index.php(87): Mage::run('', 'store')
#22 {main}";s:3:"url";s:96:"/index.php/admin/catalog_product/new/set/4/type/simple/key/f7ed55518848130fb6fee36d50ddccf6/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

I can't think of when or why this may have happened.

How do I go about fixing this issue?


texts: Magento 2: Captcha overwrite fatal error on PHP 7

texts:
Magento 2: How to override Zend library files function only?

I overwrite Captcha module on my WAMP PHP 5.X & it works fine.

On linux server which has PHP 7 gives below error

  Fatal error:  Declaration of
  Custom\Captcha\Model\CustomCaptcha::render(Custom\Captcha\Model\Zend_View_Interface
  $view = NULL, $element = NULL) must be compatible with
                   Zend_Captcha_Adapter::render(Zend_View_Interface $view = NULL, $element = NULL) in
  /var/www/html/magento/app/code/Custom/Captcha/Model/CustomCaptcha.php
  on line 156 Segmentation fault (core dumped)


texts: Paypal Giving Error on Magento Cart - 10486 and 11084

texts:
When my custumers try to buy on my store, the choose Paypal, are redirected to Paypal, insert their card, but after that, they are redirected back to my store cart with these errors:

  This transaction couldn't be completed. Please redirect your customer
  to PayPal (#10486: This transaction couldn't be completed).

  PayPal gateway denied the request. User does not have a good funding
  source with which to pay (#11084: User does not have a good funding
  source with which to pay).

Shouldn't this error be presented direct on Paypal?

Check the Print Screen.

It's a production store, on a public domain with https.

On paypal support they say that it can be redirect again to Paypal, but Magento is not doing it:
https://developer.paypal.com/docs/classic/express-checkout/ht_ec_fundingfailure10486/


texts: How to call Direct SQL Queries and join to collection In Magento2

texts:
I just want to call direct sql query in Magento2
as like in magento1.x


texts: How to get bundle product ID by its child id in magento 2

texts:
Hi I am trying to get the bundle product ID by its child id in Magento 2 but I cant
for config and grouped product I use
$configProduct = $objectManager->create('Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable')->getParentIdsByChild($_item->getProductId());

$groupParentId = $objectManager->create('Magento\GroupedProduct\Model\Product\Type\Grouped')->getParentIdsByChild($_item->getProductId());

how can I get the same for the bundled products?


texts: Magento 2 Join Product Collection with Custom CollectionFactory

texts:
In Magento 2.2.5, I have Custom Model Collection (followed this tutorial).

In that I want to add the Product Collection into this custom collection by default. How to achieve this.


texts: Remove rating box from category page(RESOLVED)

texts: I have try to remove rating box in frontend category listing but i have no idea. Someone can help ?


texts:
I would like to overwrite getSpecialPrice function.

I found this "tutorial":
Change getFinalPrice () function magento

It works perfectly but only when i load one product. If i get collection of products, my new function doesn't work. Why ?


texts:
Customers on my website are getting a recurring shipping error which results in a payment being taken, but the order not generating in Magento. Error code is as follows:

"Please check shipping address. Invalid code of "543" entered in
RegionID field."

Does anyone know how I can fix this?
Please bear in mind I don't code, I have outsourced my Magento management so I will need to send them the fix.
Look forward to any assistance anyone can offer.


texts:
I've tried absolutely everything I can think of to move the bundle options but for some reason they won't move.

When you click the customize and add to cart button it's those options that I want to move to below the button. See below....

In my catalog_product_view.xml I've tried the below and many other combinations:

<move element="product.info" destination="product.info.main" before="-" />

<move element="product.info.form.content" destination="product.info.main" before="-" />

<move element="product.add.form" destination="product.info.main" before="-" />

<move element="bundle.options.container" destination="product.info.main" before="-" />

As a different approach, I tried moving the product description below the bundle options instead:

<move element="product.info.overview" destination="product.info.main" after="product.info" />

<move element="product.info.overview" destination="product.info.main" after="product.info.form.content" />

<move element="product.info.overview" destination="product.info.main" after="product.add.form" />

<move element="product.info.overview" destination="product.info.main" after="bundle.options.container" />

Nothing is working :(

Can someone help me with this please? Many thanks in advance.

Requested catalog_product_view.xml

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

<body>

   <!-- Remove compare products -->
  <referenceBlock name="view.addto.compare" remove="true" />

  <!-- Remove social share links -->
  <referenceBlock name="product.info.social" remove="true" />

  <!-- Move product short description after price  -->
  <move element="product.info.overview" destination="product.info.main" after="-" />

  <!-- Move related products before short description -->
  <move element="catalog.product.related" destination="product.info.main" before="product.info.overview" />

  <referenceContainer name="before.body.end">
      <block class="Magento\Framework\View\Element\Template" name="welpixel.quickview.beforebodyend" template="Magento_Catalog::beforebodyend.phtml" />
  </referenceContainer>

  <block class="Magento\Catalog\Block\Product\View\Options\Type\DefaultType" name="product.info.options.default" as="default" template="Magento_Catalog::product/view/options/type/default.phtml"/>
 </body>


texts: magento 2 ; How do I create and call a block in a phtml without using a layout xml

texts:
In magento 1 I could create a block/ attach a phtml to it and then call it as follows ;

<?php print $this->getLayout()
                 ->createBlock("catalog/product_view")
                 ->setTemplate("catalog/product/view/addto.phtml")
                 ->toHtml(); ?>

is it possible in magento 2 to create a block and then attach a phtml file without using a layout.xml.

the reason for asking is that i dont want to attach the layout to a specific page/default but wish  to call it in whatever location I want


texts:
I created a multi store but I have a problem.

I use magento 1.9.2.2 - can you tell me if i need to modify the index.php and the htaccess?

I modified the htaccess as follows:

SetEnvIf Host www\.magento\.zweitedomain\.de MAGE_RUN_CODE=neuestorecode
SetEnvIf Host www\.magento\.zweitedomain\.de MAGE_RUN_TYPE=website
SetEnvIf Host ^magento\.zweitedomain\.de MAGE_RUN_CODE=neuestorecode
SetEnvIf Host ^magento\.zweitedomain\.de MAGE_RUN_TYPE=Website

The second domain points to the mainserver via a-Record and IPv4. But it doesnt work!

Do I need to make other changes? I read that the domain should Point to the document_root of the main store - is the way via a-Record enough?

I also tried to Change the index.php and added the following code above Mage::run($mageRunCode, $mageRunType);:

switch($_SERVER['HTTP_HOST']) {
    case 'domain.de': Mage::run('MEIN_STORECODE_DE','store'); break;
    case 'zweitedomain.de: Mage::run('MEIN_STORECODE','store'); break;
    case 'www.domain.de': Mage::run('MEIN_STORECODE_DE','store'); break;
    case 'www.zweitedomain.de': Mage::run('MEIN_STORECODE','store'); break;
    default: Mage::run($mageRunCode, $mageRunType); break;

how to do setup of multi store?


texts:
A Google Page Speed Insights test has revealved that I need to remove render-blocking JavaScript.

I am following this tutorial - https://varvy.com/pagespeed/defer-loading-javascript.html which explains that I need to add the below code in my sites HTML just before the  tag and to name my 'JS external file' in the code.

<script type="text/javascript">
function downloadJSAtOnload() {
var element = document.createElement("script");
element.src = "NAME_YOUR_JS_EXTERNAL_FILE.js";
document.body.appendChild(element);
}
if (window.addEventListener)
window.addEventListener("load", downloadJSAtOnload, false);
else if (window.attachEvent)
window.attachEvent("onload", downloadJSAtOnload);
else window.onload = downloadJSAtOnload;
</script>

Can someone advise me how I add this code to my HTML? Is there a specific file in my root directory I need to edit?

Also, how do I identify the name of my external JS file?

Thanks


texts: Magento2 : How to add new text field in Store->Configuration->General->store Email Address?

texts:
Its being created under

  System->Config->General->Customers:

<config>
<system>

            <class>separator-top</class>
            Trade Customer
            <tab>customer</tab>
            <resource>Magento_Customer::config_general</resource>
            <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                General Configuration
                <field id="error_used_message" translate="label" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
                    Error ID Used Response Message
                    <comment>The error message will display when certificate ID has been previously used</comment>
                </field>
            </group>

    </system>
</config>


texts:
First, I wanted to ask for the fastest way to get a list of all existing SKUs in the shop (Magento 1.9.0.1), but while writing the post, I already managed to write a good deal of the solution.
This is a combination of two ways - one is fast (raw sql, 0.02s), one is reliable (collections, 2s):

$ProductCollection = Mage::getModel('catalog/product')->getCollection();

if ($ProductCollection->getFlatHelper()->isEnabled()) {
    $TableName = 'catalog_product_flat_1';

    $result = Mage::getSingleton('core/resource')
        ->getConnection('core_read')
        ->query("SELECT sku FROM `{$TableName}`");

    $rows = $result->fetchAll();
    $shopSKUs = array();

    foreach ($rows as $row)
        $shopSKUs[] = $row['sku'];

} else {
    $shopSKUs = $ProductCollection
        ->addAttributeToSelect('sku')
        ->getColumnValues('sku');
}

But it will only work if catalog_product_flat_1 is always the correct name of the flat table.

I tried to get the table name, but with no success:

$readConnection = Mage::getSingleton('core/resource')->getConnection('core_read');
$TableName = $readConnection->getTableName('catalog/product_flat');

This results  in $TableName being the literal string catalog/product_flat, while

$TableName = Mage::getModel('core/resource')->getTableName('catalog/product_flat');

ends up with $TableName being catalog_product_flat - notice the missing _1.

So, the question it all boils down to is this:
How can I get Magento to give me the correct name of the flat product table?

Background:
I'm currently preparing a pre-import sanity check of CSV product data which will then be imported using Magmi.
The import will be done every few days with new products, so I'd like to have the workflow as foolproof as possible.
I already do check if all given SKUs in the CSV-file are unique, but I also want to check if any of those SKUs already exists in the shop.


texts:
Is it possible to get check if cart has any product been added in. I want to check if a product been added to the cart in a phtml page.
If the user click the page I want to show how many product they added in just the quantity
If there is nothing show 0

Is this possible


texts:
Im building a custom carrier and i need to show this one only when the cart total is less than the number added on dashboard, i have done all of that, but i have some issues getting a claer value from the totals on the cart, this is my code :
$items = $request->getAllItems();
        $quoteId = false;

         foreach ($items  as $item)
         {
             $quoteId = $item->getQuoteId();
             break;
         }

         $quote = $this->getCurrentQuote($quoteId);

         $totals = $quote->getTotals();

This is what im getting:
229834.0000

And the real value should be: 229.937
So for example, if the value needs to be more than 300 i cant handle using that value.
Ideas?


texts: Does Magento have a fallback for default email templates?

texts:
Hi I have created a module with a custom transactional email, which works fine when I place the default template file in

app/locale/de_DE/template/email/sales/mymail.html

but I need to place it into my template

app/design/frontend/ultimo/custom/locale/de_DE/templete/email/sales/mymail.html

but on this path it isn't found, I even tried other places like

app/design/frontend/base/default/locale/de_DE/templete/email/sales/mymail.html
app/design/adminhtml/default/default/locale/de_DE/templete/email/sales/mymail.html

but neither works. Isn't there any fallback mechanism for these file? If yes, can anyone explain it to me?


texts: How to display the product reviews without tab in magento 2?

texts:
I want to display the products review below the product without Tab.

like this revies in the red box:

Please suggest something for the same


texts: Update cart using Ajax Magento not working?

texts:
<script type="text/javascript">     jQuery(document).ready(function(){ jQuery('#shopping-cart-table')
    .on(
        'change',
        'input[name$="[qty]"]',
        function(){
            var form = jQuery(jQuery(this).closest('form'));

            jQuery.ajax({
                url: form.attr('action'),
                method: form.attr('method'),
                data: form.serializeArray()
            });
        }
    ); });  </script>

I used this function for the Ajax update cart, ajax request is working but it is not updating in the cart, anybody done this ajax update cart please help me.


texts: I have installed rabbitmq on my server. Now want test the rabbitmq, how do i do that, want to send some sample text and see does it saved in rabbitmq. And also want to get response from it.


texts: Magento 2 - Authorize.net - Transacation fails - Order created with Cancel Status

texts:
I would like to know the possibility; when a customer clicks on place order and authorize.net rejects the payment giving a Gateway error, but the order is still created in the back-end with a Cancel status. I do not want the order to be placed/created, when the payment is rejected by Authorize.net, I want it to be rolled back.

Can anyone please share their thoughts on how we can possibly achieve this?


texts: Update wizard says always_populate_raw_post_data is on 0, but it is already on -1

texts: I try to update my Magento 2.0.2, but the servercheck says wrong always_populate_raw_post_data = 0. But it is already correct on -1. I can confirm it in phpinfo. And there is no other ini file.


texts: How to resize image of product view page in Magento 2?

texts:
I want to resize product view gallery image. I want to resize main product image to 500X500 size?

How can we achieve this?


texts: Google Tag Manager Advanced Data Layer Integration

texts:
I am using the https://github.com/magepal/magento2-google-tag-manager extension for GTM Data Layer integration. But unfortunately I am not able to capture data on Google Analytics.
I have just installed the extension and added configurations in the admin. It is showing in Google Tag Assistant (Chrome Extension) that I have Google Analytics and Google Tag Manager tags on the web page. Which is correct. But I am not getting dataLayer tab and no event is fired.
Can someone tell what am I missing here? Could there be any conflict with any other extension?
Expected Result: dataLayer should be integrated after installing the above extension
Actual Result: No dataLayer is passed :(
Looking for recommendations and experienced feedback if anyone has faced similar problem
Using Magento 2.3


texts: magento 1.9 not getting the correct product url in sub category page

texts:
I created menu like category1 having product1 and product2 category2 having sub-category1 and  sub-category2. In home page product links are showing product1.html as well as category page but in sub-category page in showing like this

  catalog/product/view/id/9/s/test/category/15/

Please help me for this one. My code:

 $_helper = Mage::helper('catalog/category');
   $_categories = $_helper->getStoreCategories();
$currentCategory = Mage::registry('current_category');

if (count($_categories) > 0):

foreach($_categories as $_category):

            getCategoryUrl($_category) ">
                 echo $_category->getName()

          $cur_category = Mage::getModel('catalog/category')->load($_category->getId());

        $subCats = Mage::getModel('catalog/category') ->load($_category->getId())->getChildren();
        $subCatIds = explode(',',$subCats);

          if (count($subCatIds) > 1):

           foreach($subCatIds as $subCatId):
            $subCat = Mage::getModel('catalog/category')->load($subCatId);
             if($subCat->getIsActive()):

              getUrl(); ">
               echo $subCat->getName();

             endif;
            endforeach;

         endif;

         $_productCollection = Mage::getResourceModel('catalog/product_collection')->addCategoryFilter($cur_category)->setOrder('entity_id','ASC');
             if (count($_productCollection) > 0):

                     foreach($_productCollection as $_product):
                     $cur_product = Mage::getModel('catalog/product')->load($_product->getId());

                     if ($cur_product->getStatus()) {

                         getProductUrl();"> echo $this->htmlEscape($cur_product->getName())

                 }
                     endforeach;

              endif;

     endforeach;

 endif;


texts:
I've just started writing Magento 1.9 plugins and I started with a basic example of writing a basic Shipping Method plugin that will return static rates.

Here is what the structure of the model file looks like :

class X_Y_Model_Carrier
extends Mage_Shipping_Model_Carrier_Abstract
implements Mage_Shipping_Model_Carrier_Interface {

protected $_code = 'x_y';

public function collectRates(Mage_Shipping_Model_Rate_Request $request){
    $result = Mage::getModel('shipping/rate_result');

    [...]
    $address = $request->getDestStreet();
    $city = $request->getDestCity();
    [...]

    $rate = Mage::getModel('shipping/rate_result_method');
    $rate->setCarrier($this->_code);
    $rate->setCarrierTitle('Carrier');
    $rate->setMethod('x_y_1');
    $rate->setMethodTitle('Method 1');
    $rate->setPrice(12.34);
    $rate->setCost(1.23);

            [...]
    return $result;
}

[...]
}

I noticed that i don't have the detailed address in the $request so getDestCity returns null for example.

I've done some research and according to this answer in order to have such details, I would need to override EstimateAddressInterface.

Could anyone guide me on how to achieve that? How exactly does one override an interface (the proper way) in Magento 1.9

EDIT 1
removed typo duplicate $request in getDestStreet call


texts: Magento2-Fatal error:Class 'IntlDateFormatter' not found in /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116

texts:
Transfer site from server to dedicated server.
I am getting Fatal error: Class 'IntlDateFormatter' not found in /home/uscvuy32bk5d/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116


texts: Magento 1.8 - Display block in email template

texts:
I try to display a custom block in email template and pass the order object. I tried

  {{block type='module/blockname' area='frontend' order=$order
  template='template/module.phtml'}}

Block is like:

  Namespace_Module_Block_Blockname extends Mage_Core_Block_Template

The module.phtml exists and using it in another phtml with

  Mage::app()->getLayout()->createBlock("module/blockname");

works fine. But in email template the block won't show up. Do i miss some configuration in layout.xml? I tried so many things to get this working, perhaps someone can give me a hint how to manage this.

I also tried with layout handle:

<some_handle>
    <block type="module/blockname" name="blockname" template="namespace/template.phtml"></block>
</some_handle>

and call with:

  {{layout area="frontend" handle="some_handle" order=$order}}


texts: Uploading image issue in magento 1.9.3.1

texts:
Before posting this question, I have made changes as describe in Security-Patches/SUPEE-8788.
After make changes as described, now "Browse" and "Upload" buttons appears but it is not working. When I click on upload button it shows some progress bar but it appears as progress shows upload completed, it not move to above images gallery, it's look like something is still broken. Please let me know if some one have fix this issue in magento 1.9.3.1


texts: Override price methods but stop special price appearing?

texts:
I need to override the existing price of a product.

I have extend the Mage_Catalog_Model_Product_Type_Price class and overridden the following methods getPrice & getFinalPrice.

This does have the desired result, but it is also diplaying the special price. How do I disable this functionality?


texts: Magento2 :Unable to create new service: ChromeDriverService

texts:
I've been trying to implements functional testing in magento using mftf i followed the same steps from this documenation
but i keep getting :

[Facebook\WebDriver\Exception\UnknownErrorException] unknown error:
Chrome failed to start: exited abnormally.   (unknown error:
DevToolsActivePort file doesn't exist)   (The process started from
chrome location /usr/bin/google-chrome is no longer running, so
ChromeDriver is assuming that Chrome has crashed.) Build info:
version: '3.141.59', revision: 'e82be7d358', time:
'2018-11-14T08:25:53' System info: host: 'ubuntu', ip: '127.0.1.1',
os.name: 'Linux', os.arch: 'amd64', os.version: '5.8.0-41-generic',
java.version: '1.8.0_275' Driver info: driver.version: unknown remote
stacktrace: #0 0x55d212e1e199

chrome driver: 88.0.4324.96
chrome browser: 88.0.4324.96
selenium : selenium-server-standalone-3.141.59.jar

I don't know how to fix it I've tried even changing my java to 11 but it's the same.
is there anyone familiar with this error, please.
xvfb-run java -Dwebdriver.chrome.driver=/usr/bin/chromedriver -jar selenium-server-standalone-3.141.59.jar  -debug


texts: Change order increment id while submitting order

texts:
Is there any method to change the order increment id while submitting the order? My client wants to change the prefix of order_id if the order is paid through a particular payment gateway.

Please let me know.
Thanks!


texts: Adding link to the Checkout button in magento2

texts:
I need to add external link to the "New Address" button in checkout.

Found the button html is loading from this file.

  vendor\magento\module-checkout\view\frontend\web\template\shipping.html

How can I add external link to the button instead of showing the pop up once it is clicked.

I need to add anchor (<a>) tag for it.

Can this be done?


texts: How to create an admin grid with non auto increment field?

texts:
I want to create an admin grid which is editable. The problem is that the id column of this grid will be a non auto increment value. Is this possible to implement?

Can any one suggest tutorials or articles related to this?

  UPDATE: I'm using a collection which is gained by joining the magento
  attribute collection with my custom table. Butin the  provided code below it contains only product attribute collection. ID column will contain the attribute_id

Grid.php

<?php
class BalanceAP21Connector_ProductSync_Block_Adminhtml_Attributemapping_Edit_Tab_Attribute
    extends Mage_Adminhtml_Block_Widget_Grid
{
    /**
     * Constructor, ensures pagination is hidden
     */
    public function _construct()
    {
        $this->setId('attribute_edit');
        $this->setUseAjax(true);
        $this->setDefaultSort('attribute_id');
        $this->setPagerVisibility(true);
        $this->setSaveParametersInSession(true);
        parent::_construct();
    }

    /**
     * Prepare grid collection object. Collection object populated
     * based on Apparel 21 module settings in admin configuration section.
     */
    public function _prepareCollection()
    {
        $collection = Mage::getResourceModel('catalog/product_attribute_collection');
        $collection->addFieldToFilter('frontend_label', array('notnull' => true));
        //echo $collection->getSelectSql();exit;
        $this->setCollection($collection);
        parent::_prepareCollection();
        return $this;
    }

    /**
     * Prepare columns for the grid
     */
    public function _prepareColumns()
    {
        $helper = Mage::helper('productsync');
        $this->addColumn('attribute_id', array(
                'header' => $helper->__('ID'),
                'index'  => 'attribute_id'
        ));

        $this->addColumn(
            'frontend_label',
            array(
                'header' => $helper->__('Reference Type Name'),
                'index'  => 'frontend_label'
            )
        );

        $this->addColumn(
            'attribute_ids',
            array(
                'header'   => $helper->__('Attribute'),
                'width'    => '1',
                'type'     => 'options',
                'index'    => 'attribute_ids',
                'editable' => true,
                'options'  => Mage::getModel('productsync/attributemapping_system_config_source_attributes')
                    ->toOptionArray(),
                'renderer' => 'productsync/adminhtml_attributemapping_widget_grid_column_renderer_options',
            )
        );

        $this->addColumn(
            'note_code',
            array(
                'header' => $helper->__('AP21 note code'),
                'index'  => 'note_code',
                'type'   => 'input'
            )
        );

        $this->addColumn(
            'note_regexp',
            array(
                'header' => $helper->__('Note regexp'),
                'index'  => 'note_regexp',
                'type'   => 'input'
            )
        );
        return parent::_prepareColumns();
    }

    public function getGridUrl()
    {
        //return $this->getUrl("*/*/edit", array("attribute_id" => $row->getId()));
        return $this->getUrl('*/*/grid', array('_current'=>true));
    }
}

My grid is as below.


texts: Duplicated Eav attribute in Product Edit form

texts:
I want to add a new attribute to the product edit form using the UI components, so I created a product_form.xml file in my module, and added the attribute with the code below:
<field name="activate_meta_robots" sortOrder="170" formElement="checkbox">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="source" xsi:type="string">product</item>
            <item name="default" xsi:type="number">1</item>
        </item>
    </argument>
    <settings>
        <dataType>boolean</dataType>
        <label translate="true">Activate Meta Robots</label>
        <scopeLabel>[STORE VIEW]</scopeLabel>
    </settings>
    <formElements>
        <checkbox>
            <settings>
                <valueMap>
                    <map name="false" xsi:type="number">0</map>
                    <map name="true" xsi:type="number">1</map>
                </valueMap>
                <prefer>toggle</prefer>
            </settings>
        </checkbox>
    </formElements>
</field>

Then, I had to create also the eav attribute in the database in order to save the attribute value. Thus, I created a Data Patch file and added the following code:
$eavSetup->addAttribute(
    Product::ENTITY,
    'activate_meta_robots', [
        'type' => 'int',
        'label' => 'Activate Meta Robots',
        'input' => 'checkbox',
        'source' => Boolean::class,
        'sort_order' => 170,
        'global' => ScopedAttributeInterface::SCOPE_STORE,
        'group' => 'General Information',
    ]
);

But, when I access the Product Edit form, I see the attribute duplicated: one comes from the ui_component:

and the other is the one I add through the addAttribute() method:

I know that I could just remove the ui_component, but I need it. I tried to put 'visible' => false in the addAttribute() method, but in this way the attribute from the ui_component doesn't save its value anymore.
Does anyone know a way to add the attribute created in the ui_component to the db in order to save its value without duplicating the attribute?


texts: Data migration tool installation error Magento 2.3

texts:
I am facing below error when try to install data migration tool from command line.

I have fresh magento installation and I am trying to install data migration tool from repo.magento.com and following official link.

Did anyone face this issue before?


texts: Magento 2.2.4 Product URLs show Category path even If Use Categories Path for Product URLs is turned off

texts:
In my Magento 2.2.4 setup some products of some categories show the category path and some do not. I checked all settings but I don't see the difference.
In all store views (Default, etc.) I have setup NO for the below setting: Stores/Configuration/Catalog/Catalog/SearchEngineOptimisation/Use Categories Path for Product URLs

Could someone help me?


texts: Estimated shipping not showing on cart and checkout page in Magento-2

texts:
I am not getting shipping on either cart or checkout page and I got this error on console: Cannot read property 'is_zipcode_optional' of undefined.

When I click on city and zipcode input filed on checkout page than it starts displaying shipping method.

I have tried to solve this issue but didn't get any solution.

Thanks in advance for your help.


texts: How to access a function in block class from phtml?

texts:
i have a class see

class Magestore_RewardPoints_Helper_Block_Spend extends Magestore_RewardPoints_Helper_Calculation_Abstract {

}

which with a function

getCheckboxRules() inside, i need to access this function in a
app\design\frondend\default\mytheme\template\catalog\product\view.phtml

how can i do that?


texts: How to set the popularity of a product to 100 automatically on creation

texts:
At the moment I have a category of say 20 products and I have popularity on them all (they are all in a set order)
If I then add a new product to this category, it sets the popularity of this new product to 0.
I want to default the popularity of new products to 100.

How can I do this?


texts: Magento manual uploading of product- image issue is child item

texts: I have uploaded a product having red & Yellow color. Parent item has yellow color image, when we select red swatch child image is not changing even its image is uploaded in the backend


texts: Magento 1: Cron fatal error in app/code/core/Mage/Cron/Model/Observer.php

texts:
One of my client's CRON daemon recently started sending those errors:

  PHP Fatal error: Call to a member function addFieldToFilter() on a
  non-object in
  /app/code/core/Mage/Cron/Model/Observer.php on line 105

Running Magento 1.8.1.0

This corresponds to the following lines:

$this->_pendingSchedules = Mage::getModel('cron/schedule')->getCollection()
            ->addFieldToFilter('status', Mage_Cron_Model_Schedule::STATUS_PENDING)
            ->load();

I've already ensured that the Mage_Cron_Model_Resource_Schedule_Collection class exists and the file is at the right location.

I've also checked the cron_schedule table and cron is running fine, most of the scheduled job are in the success status and there's a few pending jobs as well.

I'm not quite sure where I should start debugging. Any clue where I should start looking to narrow down the issue ?


texts: Magento2: How to install PWA Studio in windows.Can you explain in step by step process. What are libraries and tools we need ? I need to install it in windows?


texts: Magento 2.2.2 - Rename Sort By Options Label

texts:
On product listing page, I need to rename the label of Sort by Option Position to Most Popular.

Below are the two files responsible for sorting

\vendor\magento\module-catalog\Block\Product\ProductList\Toolbar.php
\vendor\magento\module-catalog\Model\Config.php

In Toolbar.php you can see

$this->_availableOrder = $this->_catalogConfig->getAttributeUsedForSortByArray();

which in turn calls getAttributeUsedForSortByArray() from Config.php that returns array of available attributes to sort listing collection.

In Config.php it has below function where Position label is given

public function getAttributeUsedForSortByArray()
    {
        $options = ['position' => __('Position')];
        foreach ($this->getAttributesUsedForSortBy() as $attribute) {
            /* @var $attribute \Magento\Eav\Model\Entity\Attribute\AbstractAttribute */
            $options[$attribute->getAttributeCode()] = $attribute->getStoreLabel();
        }

        return $options;
    }

To change the label do I need to extend Model/Config.php in my
custom theme and change $options = ['position' => __('Position')]; to  $options = ['position' => __('My Custom label')]; ?
Can this be done by extending sorter.phtml ?
Can we change sort by options label from admin ?


texts: customize cart view with product bundle options

texts:
I want to remove/modify the string that I get in the cart view inside the table (s. picture)

In my shop it says "1 x optionname €10.00" for example. I want to delete the "1 x"
I also recognized, that if there are two options selected the output is one string separated by <br/> tag. Is there also a way to get the options as single strings, so that I maybe could add a "+"?

I'm trying stuff within default.phtml and looked into Default.php but I'm not fit enough with php to understand what is done there.


texts: I want to have two grid of products one that contain the products that belong to categ 1 and the second for the product that belong to categ 2. I don' t know the name of the table that contain all the attributes of products for example for customer we have the customer_grid_flat but for product every type of product have a different table that store the data please help me it's an emergency and thanks for help in every case


texts: We are using Magento 1.9.1 in my website i tried to send cancel order email but i am not able to send mail to customer. How to send mail to particular customer?


texts: how to override AbstractCarrierOnline class function in Magento 2

texts:
I want to override "proccessAdditionalValidation" function of app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php file in custom module.
Please help me and thanks in advance.


texts: how to get products for an attribute - magento

texts: I have created a attribute fresh arrival with two values yes or no in dropdown and I am creating a block which is reading from a phtml file. How can I show all products which have fresh arrival set as yes in phtml file.


texts: Contact us form not display in Block list of Magento 2

texts:
I have enabled Contact us form by Stores => Settings => Configuration => General => choose Contacts =>  Contact Us and set Enable Contact to 'Yes'.

But Contact Us Info block not display in Block section.
What went wrong please suggest.


texts: RuntimeException during New theme Installation

texts:
I have installed magento 2 and previously working on default Luma theme. Now I am trying to install new free theme in my magento. But when I am using below command:

php bin/magento setup:upgrade –keep-generated

It shows an error:

  RuntimeException Too many arguments.

Theme is visible under: Content > Theme & Content > Configuration section in admin panel. But my theme Design section is not visible under Stores > Configuration > General > Design section.

Please help me out. I am new to magento 2 and trying to learning about magento 2


texts:
Just upgraded to 1.9.2.2 and am getting this error when trying to view the customer grid in the backend.

I tried replacing:

/MYSITE/app/code/local/Mage/Adminhtml/Block/Customer/Grid.php

With a fresh copy with no luck!

  Fatal error: Call to a member function getBackend() on a non-object in /var/www/vhosts/MYSITE/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php on line 514

Having a real headache trying to fix this error.


texts:
I am trying to get the "-1" to show as "5" which would be 1 less than the 6-9 quantity.

My code...

            <?php
            $_product = $this->getProduct();
            $_tierPrices = $this->getTierPrices();
            if (count($_tierPrices) > 0):
                $_data = array();
                $_prevQty = 0;
                $_counter = 0;
                $_tierPrices = array_reverse($_tierPrices);
                foreach ($_tierPrices as $_index => $_price){
                    $_counter++;
                    if($_price['price_qty']>$_prevQty){
                        $label = $_price['price_qty']. '+';
                        $_data[] = array('prev'=>$_prevQty,'next'=>$_price['price_qty'],'label'=>$label,'price'=>$_price['formated_price'],'save'=>$_price['savePercent']);
                        $_prevQty = $_price['price_qty']-1;
                    } else {
                        $label = $_price['price_qty'] . '-' . $_prevQty;
                        $_data[] = array('prev'=>$_prevQty,'next'=>$_price['price_qty'],'label'=>$label,'price'=>$_price['formated_price'],'save'=>$_price['savePercent']);
                        $_prevQty = $_price['price_qty']-1;

                    }
                }
                $_data = array_reverse($_data);

            ?>
<?php $calculate=intval($_row['label'])-1; ?>

                            Quantity
                            Price
                            Save

<?php echo "1-".$calculate ?>
<?php echo $this->getPriceHtml($_product, true) ?>
--
                    <?php foreach ($_data as $_row): ?>

                            <?php echo $_row['label']; ?>
                            <?php echo $_row['price']; ?>
                            <?php echo $_row['save']."%"; ?>

<?php endforeach; ?>

                          *Prices will reflect in cart.

            <?php
            endif;
            ?>


texts:
I've been trying (in vain) to add another tab to my product information page accordian. I've got an image as an example:

http://tinypic.com/r/246q1rl/8

I've been trying to add another tab (where the red block indicates), is there anyway of doing this? I'm trying to get this on all of my products.

Any help would be greatly appreciated!


texts: Changing text of customer "edit address" field

texts:
Please see this image:

I would like to change the "Middle Name/Initials" text to just "M.I." because it currently ruins the formatting. Where is the file located in order to change this?

Also, if it's a core file, will I need to edit it with each update of Magento?


texts: Can't change Customer Address Attribute visibility

texts: Any idea why these aren't editable? I just want the City to show under a specific store scope. I edited the template to only show the city then had problems with javascript validation. Any suggestions would be greatly appreciated.


texts: How to filter products by rating in Magento 2?

texts:
I want to get all products by rating filter.
here my code

$getProducts = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
$getProducts->addAttributeToSelect('*');
$getProducts->addAttributeToFilter('visibility', 4);

So, how can I add here filter for rating so I need not to first get all product and then check all product with that rating issue.

thanks


texts: magento2 shipping method :Table Rates import issue

texts:
Right now I am trying to import table rates, shipping method rates in Magento 2 in windows environment.But whenever I am trying to import it throw me error like

The file "C:/Windows/Temp/E:/wamp/tmp/php9B36.tmp" doesn't exist

I have already set upload_tmp_dir to E:/wamp/tmp, I don't know why it appends C drive directory.

Can anyone drive me to right direction?

Any help will be appreciated.

Thank you


texts: Magento 2 | Should "Guest" customer have a session ID?

texts:
I am trying to find out the session Id number.

I am using object manager for this (temporarily):

<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customerSession = $objectManager->get('Magento\Customer\Model\Session');
$customerName = $customerSession->getCustomer()->getName();
?>

Customer Session:<?php echo $customerSession->getCustomerId() ?>

Now, when I am logged in, the customer session display a number (expected behaviour), however, when I am logged out, there is no output.

My question is, should not-logged-in ("guest") customer have a session ID?


texts: How to display an image using raw controller?

texts:
I'm new to magento and learning hard thesedays.
I have a task to display an image using raw controller but couldn't really find out how to do this.
I have my image on etc/frontend/web/images as shown on the screenshot.
[1]: https://i.stack.imgur.com/JMNmW.png
and my raw controller code is as below.
'''
class Raw extends Action
{
protected $raw;
public function __construct(
    Context $context,
    Raw $raw
){
    $this->raw = $raw;
    parent::__construct($context);
}

public function execute()
{
    $result = $this->raw->create();
    $result->render('<img src="../etc/frontend/web/images/Japan_bg.png"/>');
    return $result;
}

}
'''
I know this code is really bad... I have found a way to print image URL but display...
is there anyone who can help me out with this please?
Many thanks!!