texts: I need to change compare link to checkbox in category page in Magento 2.4

texts: I need to change the compare icon link into the checkbox on the category page in magento 2.4.


texts: Need to Update Product Media Gallery Image Label

texts:
I am trying to update the media gallery image label with product_id. I have tried different different codes but didn't get any chance to update the image label. Is there any way of updating media gallery image label programmatically or using csv file ? I am using magento version 1.9.3.X

My Code

<?php
error_reporting(E_ALL | E_STRICT);
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(1);
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
Mage::init();

$productId = 142;
//load the product
$product = Mage::getModel('catalog/product')->load($productId);

$i = 1;
foreach($product->getData('media_gallery') as $each){
    foreach($each as $image){
        $i++;
        $attributes = $product->getTypeInstance(true)
            ->getSetAttributes($product);
    $attributes['media_gallery']->getBackend()->updateImage($product, $image['file'], $data=array('postion'=>$i,'label_default'=>'labelnametext'));
    }
}
$product->save();

IF anyone have any idea please share with me.

Thanks


texts: Need to add a pop-up on a particular arrtibute, which says a small line about it

texts:
Please check the screenshot below, there is a mouse hover pop-up showing on one of my attribute & this is my old website.

  I want to intergate something like this in my new website which is in
  Magento 2.


texts: file option not working in custom options for product import from csv

texts:
I am facing a very strange problem with custom options import for a product.
The custom option with file type is not creating in the product. I have also checked the database for this. There are no rows inserted for the file type whether the other options with other types are saved and also showing in backend and frontend.
Also there is another problem that when i import the products they do not show on the frontend because the Website is not set for the product. I didn't find any option to set the website for the product and i have do it manually from the actions dropdown using Update Attributes and setting the product to the website.
Please someone help me as it very urgent.


texts: Low Stock Report: How to Add a Manufacturer/Brand column?

texts:
In the low stock report I need to add the manufacturer/brand as a column for each ID or product name, so that I'm able to prepare stock requests per manufacturer.

Any help to accomplish this is very welcome.


texts:
I configured both the merchant account on the paypal payment (Paypal express) method and in purchasing, but I get the error as

  Sorry, your bank wasn't able to verify your VISA x-4445 at this time.
  Please choose another way to pay.

I have used the payment to accept only in India and there is no problem in that.
I have also configured the card cvv in sandbox.paypal.com .

Though when I try to make a payment it shows the same error .

I have also created other sandbox personal accounts but it still shows the same error when I try to make the payment.

Is there is any way to resolve this?

Thank you in advance for your answers.


texts: Magento 2.3.2 Unsupported operand types indexer

texts:
I'm using a custom module in magento 2.3.2

In one of my php files I have this code:

$queryResult =  $client->search($requestQuery);

    $offset = $queryResult['hits']['total'];
    if (!$offset) {
        return false;
    }

    return $this->load($index - $offset + 1, $offset - 1, $lower);

But this:

return $this->load($index - $offset + 1, $offset - 1, $lower);

returns error:

  PHP Fatal error:  Uncaught Error: Unsupported operand types

What I am doing wrong in syntax?


texts: How to use getFirstItem() in collection into magento 2

texts:
How to get first item of collection in magento 2

I am trying

    $infoColl = $this->_customFactory->create()->getCollection();
    $infoColl->addFieldToFilter('session_id', $id);
    $infoColl->addFieldToFilter('waiting_list', '');
    $infoColl->getFirstItem();

but its not working


texts: Magento 2.3.0 setup:upgrade error unexpected '?' in PHP 7.2

texts:
I am facing this type of error.Unable to access any CLI on Setup.
Version Compataible is also match but still no luck.

  Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)

PHP version : 7.2
Magento version : 2.3


texts: Magento2: How to update price with REST without changing category_ids attribute?

texts:
Does someone know how to update the product price with REST API without changing the category_ids attribute.

If i perform a PUT /V1/products/{sku}
With body

{
 "product":
 {
 "price":"123"
 }
}

It removes the category_ids but looks like all other attributes are left unchanged.

Does anyone know a way to just update the price?

I looked through the document at http://devdocs.magento.com/swagger/ but could not find any other way to change the price on the product.

/Thomas


texts:
I have integrated FedEx (Test Mode) in Magento CE 1.9 and also able to place order successfully.
Here is screenshot from One page checkout screen for FedEx shipping options..

How to get tracking number for placed order? and how FedEx shipping process can be initiated?


texts: Could not unserialize data of sales_flat_quote_item_option.value with record id 78558 Magento 2.3.5 Data Migration issue

texts: [2020-08-11 14:35:47][WARNING]: Could not unserialize data of sales_flat_quote_item_option.value with record id 78558


texts: After installing magento 2.3 Content is not loaded Properly also get console error 404 js and css not found

texts: Magento 2.3.1 i have install but in browser i have found that content ins not loaded properly and in console i have found multiple Error of Js and CSS is not found (404 js not found / css not found )


texts: How to remove the Breadcrumbs from the homepage

texts:
When Full Page Cache is on the breadcrumbs show up on the home page,

i've tried changing the line <?php if($crumbs && is_array($crumbs)): ?> to <?php if($crumbs && is_array($crumbs) && !$this->getIsHomePage()): ?> in \app\design\frontend\enterprise\[THEME]\template\page\html\breadcrumbs.phtml yet it still shows up

i've tried adding <remove name="breadcrumbs" /> to the "Layout Update XML" of the CMS page which is the homepage yet it still shows up

I've tried putting in Mage::log() or a <p> before the if statement however it works on every other page but the home page

a google search gives me nothing that i don't know (the Layout Update XML thing i got from one site) and most results are asking how to add the breadcrumbs when i search for "how to remove breadcrumbs from homepage

i'm wondering if there is any other way to remove the breadcrumbs from the homepage which i may have yet tried


texts: site - is currently unable to handle this request Http error Magento 1.9

texts:
This page isn’t working www.abc.com.au is currently unable to handle this request.
HTTP ERROR 500. In this site we use Magento 1.9


texts: Magento 2 custom customer attribute's values not getting saved in database?

texts:
I've added two custom attributes for customer registration page (Alternate email & Alternate number) in a new module (through : app/code/.../Setup/InstallData.php).

I have designed its 'view' inside a custom theme (by overriding register.phtml). I can now see new fields on the registration page. However the data inside new fields (alternate email and number) is not getting saved inside database.

'customer_entity_int' saves '0' value..
'customer_entity_varchar' saves nothing..

Here in the screen you can see the value is saved as '0'. The attribute_id 132 is for 'Alternate Contact Number' on the registration page. So I expect the value to hold the data which I'm entering on the frontend registration page.

What am I doing wrong ?


texts: Magento 2 headers already sent error in my controller

texts:
I am working through Alan Storm's tutorial about the first steps in setting up a Controller in Magento 2 and came across an odd little error on page load after setting up my route:

  Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/magento_blog/app/code/{Vendor}/{Module}/Controller/Hello/World.php:26)

where line 26 is the var_dump in the controller file:

class World extends \Magento\Framework\App\Action\Action
{
    protected $pageFactory;

    public function __construct(Context $context, PageFactory $pageFactory)
    {
        $this->pageFactory = $pageFactory;
        return parent::__construct($context);
    }

    public function execute()
    {
        var_dump(__METHOD__);
        $page_object = $this->pageFactory->create();
        return $page_object;
    }
}

So the "fix" is to comment this var_dump out and the file works without errors, but that's not what i'm interested in. This kind of error is very rare in Magento, as the rendering is really out of our hands. As long as the configs are right, the page will render.

The common reason for this is a UTF-8 error or some white space at the beginning of the PHP file, both of which aren't happening from my end, as i'm simply calling a controller and dumping the method name.

I have made sure to clear the cache and generation folders, and when i do and reload the page, the page factory does regenerate just fine. I'm not sure if this is where my error might be coming from, as i'm not too accustom to looking over these files (they are generated right???).

If i comment out the lines:

$page_object = $this->pageFactory->create();
return $page_object;

The var_dump will display on the constructed url of the controller. So, in a sense, the issue is is when the $page_object is outputted.

And ideas what might be causing this?


texts: magento admin redirecting to http://default/search/admin%20adminhtml

texts:
i ran setup:upgrade; di:compile; cache:flush; in staging server. then suddenly i can no longer access the magento admin. evrytime i hit the admin url it redirects me to http://default/search/admin%20adminhtml. does somebody knows whats happening?
frontend store is still working fine. only the admin.


texts: Magento 1.9 - cycle Foreach, result blank content

texts:
I'm trying to write cycle foreach, for insert my categories in the table with 3 rows and 4 columns. The code is this:

$i = 0;

if (mysql_num_rows($result) > 0) {
  while ($row = mysql_fetch_array($result)) {
    if ($i % 12 == 0) {
      // Table ID dont need to be rounded, because $i % 12 == 0, so $i / 12 is integer, not float...
      echo ''."\n";
    }

    if ($i % 3 == 0) {
      echo ''."\n";
    }

    echo ''.$row['name_file'].''."\n";

    if ($i % 3 == 2) {
      echo ''."\n";
    }

    if ($i % 12 == 11) {
      echo ''."\n";
    }

    $i++;
  }

  if ($i % 3 > 0) {
    echo ''."\n";
  }

  if ($i % 12 > 0) {
    echo ''."\n";
  }
}

When i reload home page content is empty, where is error?


texts:
In my extended LUMA theme , how to integrate Bootstrap JS and CSS .

So I can make my CMS page's layout on Bootstrap grid .

Already seen few post here : How to develop theme using twitter bootstrap in magento 2?

Any help will be highly appreciated.


texts: Magento 2 - URLs trailing slash redirection programmatically

texts:
I want to redirect automatically any url that comes as example.com/ to example.com or example.com/men/ to example.com/men

Could someone point me to the right direction.

I do not want to modify htaccess.

Thanks


texts: Magento 2.3.x how to add custom field in PayPal express review Page?

texts:
Magento 2.3.x, How can we add custom fields in Paypal express review page for guest users and save the value in order and invoice?
For example:
Paypal express review page needs to add the Contact Number for the guest user. Next, we need to show the contact number in order view page, invoice, order, and invoice emails also.
any suggestions...
Coding structure is like below
1.Add Contact number in review.phtml file
frontend\templates\express\review.phtml

  <?= $block->escapeHtml(__('Phone Number')) ?>
  <input type="text" name="guestphone-paypalexpress" id="phonenumber_paypalexpress" onkeypress='return restrictAlphabets(event)' required>

2.Add the events.xml
\app\code\Namespace\Modulename\etc\events.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
   <event name="sales_order_place_after">
        <observer name="sales_order_place_after" instance="Diageo\PaypalPhone\Observer\SavePhoneNumber" />
    </event>
</config>

3.trying to get review.phtml form post data in observer file but its not getting.
\app\code\Namespace\Modulename\Observer\SavePhoneNumber.php
<?php
namespace Namespace\Modulename\Observer;

use Magento\Framework\Event\ObserverInterface;

class SavePhoneNumber implements ObserverInterface
{
    protected $_request;
    public function __construct(
        \Magento\Framework\App\RequestInterface $request,
        \Magento\Sales\Model\Order\Status\HistoryFactory $historyFactory,
        \Magento\Sales\Model\OrderFactory $orderFactory
    ) {
        $this->_request = $request;
        $this->_historyFactory = $historyFactory;
        $this->_orderFactory = $orderFactory;
    }
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        //$order = $observer->getEvent()->getOrder();
        $post = $this->_request->getParams();

        $logger->info('Params' . json_encode($post));
    }
}

i am not understand where i did a mistake.
Note:i have tried different events like sales_order_place_before,paypal_express_place_order_success but post date is not getting.


texts: Magento Restrict Tax for Specific Country

texts:
My Tax calculation is based on Shipping Origin. Example UAE is the default tax origin country, so for all the orders tax is applied. What I want is if the shipping address of customer is UAE or Saudi Arabia then tax should not be applied.

So basically i want to disable the tax for UAE or Saudi Arabia customers.


texts: Is there an AOE Scheduler for magento 2?

texts:
Or some equivalent?

It would be a great module to have for m2, no?


texts: How do i can extend or re-use Gallery Js Component of module Catalog in right way

texts:
This component is located in Magento_Catalog/js/product-gallery

map: {
    '*': {
        categoryForm:       'Magento_Catalog/catalog/category/form',
        newCategoryDialog:  'Magento_Catalog/js/new-category-dialog',
        categoryTree:       'Magento_Catalog/js/category-tree',
        productGallery:     'Magento_Catalog/js/product-gallery',
        baseImage:          'Magento_Catalog/catalog/base-image-uploader',
        productAttributes:  'Magento_Catalog/catalog/product-attributes'
    }
}

I already copied the same file with a different name but when my component runs, it does not work properly like the original one. Official docs mentions to extend it, but i can't make it work successfullyIt would be more helpful if the core teams explain more details for me as to how to implement it


texts: Magento 2.3.2 - PWA venia theme installed and working, Now how to use it as my default theme, without running yarn commands

texts:
Magento 2.3.2: PWA venia theme installed and working,
Now how to use it as my default theme, without running yarn commands.

I want to make it as my default theme for desktop or when i browse through mobile this theme will automatically applies...

Currently i need to run these commands

1. yarn run build
2. yarn run watch:venia

then a new url created and i can only see the venia theme on that url..

All suggestions appreciated...


texts: How to change City field to a dropdown in Checkout step Magento 2

texts:
I tried multiple solutions found in here, but none seem to fit, the closest one was this one Magento 2 : How to change UI field(s) dynamically, here is my implementation of it:

My\Module\view\frontend\web\js\set-city-mixin.js

define([
'jquery',
'mage/utils/wrapper',
'mage/validation'], function ($, wrapper, validation) {
'use strict';
$(document).ready(function () {
    $(document).on('change', '[name="country_id"]', function() {
       //for country
       var region = $('select[name="region_id"]');
       changeCity(this, region);
    });

    $(document).on('change', '[name="region_id"]', function() {
       //for province or region
       var country = $('select[name="country_id"]');
       changeCity(country, this);
    });
});
function changeCity(country, region) {
    console.log("change city");
    var cityObject = $('[name="city"]');
    if ($(country).val() == 'CO') {
        console.log('Colombia');
        //send request with country and region and recieve json object
        var response = '[{"name": "Medellin", "code": "50011100"},{"name": "Cali", "code": "50011122"},{"name": "Bogota", "code": "50011133"}]';
        var cities = JSON.parse(response);
        if (cityObject.is('input')) {
            cityObject.replaceWith(function(){
                var select = $("<select>", {
                    html: $(this).html()
                });
                $.each(this.attributes, function(i, attribute){
                    select.attr(attribute.name, attribute.value);
                });
              return select;
            });
        } else {
            cityObject.empty();
        }

        if(cities != 'undefined' && cities.length > 0 ) {
            for( var i = 0; i < cities.length; i++ ) {
                cityObject.append("<option value="+cities[i].code+">"+cities[i]. name+"</option>");
            }
        }
    } else {
        if (cityObject.is('select')) {
            cityObject.replaceWith(function(){
                var select = $("<input>", {
                    html: $(this).html()
                });
                $.each(this.attributes, function(i, attribute){
                    select.attr(attribute.name, attribute.value);
                });
              return select;
            });
        }
    }
}

return function (setShippingInformationAction) {
    return wrapper.wrap(setShippingInformationAction, function (originalAction) {

        return originalAction();
    });
}
});

My\Module\view\frontend\requirejs-config.js

var config = {
    config: {
        mixins: {
            'Magento_Checkout/js/action/set-shipping-information': {
                'Tcc_Shipping/js/set-city-mixin': true
             }
        }
    }
};

The result is what I expected to be, but the validation for that field stops working:

Any working alternative would be appreciated too, since what I need is to have a city dropdown with custom codes as values for them.


texts: magento 2 unknow column not found in category

texts:
In Magento 2 I created custom category attribute it working fine like Yes or No attribute

when I try to get in the collection

$collection = $this->_categoryModel->getCollection()
            ->addFieldToSelect('*')
            ->addFieldToFilter('status','0')
            ->addAttributeToFilter('searchcategory', 'Yes')
            ->setOrder('position','ASC');

it throws the error

**Column not found: 1054 Unknown column 'searchcategory' in 'where clause', query was: SELECT `main_table`.* FROM `mps_category` AS `main_table` WHERE (`status` = '0') AND (`searchcategory` = 'Yes') ORDER BY position ASC**


texts:
I want disable cache for price block. I was trying for last 2 days but I can't achieve it yet. I almost read all blogs and articles regarding this. And I realize that there is no block for price thing at all. I just looked up in my layout files and there is no block for this except only one thing,

<block type="catalog/product_price_template" name="catalog_product_price_template" />

But when I remove this nothing was happening. Is there any specific block for it ? Or I missed something ?

And I tried template path hints to view the block name. It shows the class name of that block like Mage_Catalog_Product_Price

Please help me guys.


texts: Magento 2 how to change order increment id?

texts:
I just migrate data from magento 1 to magento 2

Magento 1 order id start with 10000001 and magento 2 order id start with 00000001

So we need order id start from 100000062 in magento 2 (because in magento 1 last order id is 100000061)

i checked a stackexchange but they all start from they only suggest change default order id.


texts: ho-import 1: Import products using their categoryId instead of path?

texts:
Currently Im using ho-nl/magento1-Ho_Import to import product information in Magento 1.9.2.

I tried importing products using category path (eg:
Computers/Keyboards) with success.
Is there a way to import products
in magento 1.9 using their category ID (eg: _category=1405)?.

I cannot find the answer in their github site or issues area. Any help appreciated.

EDITED----------------------------------------------------------
additional info. an example of a file that worked ok with category path:

_store,ho_import_profile,sku,_attribute_set,_type,store,_category,is_anchor,_product_websites,cost,price,location,country_of_manufacture,name,short_description,description,manufacturer,qty,weight,status,is_in_stock,tax_class_id,visibility,_media_attribute_id,_media_image,_media_lable,image,image_label,small_image,small_image_label,thumbnail,thumbnail_label,gallery,media_gallery

electronics,141565030710,Default,simple,admin,"Electronics/AV Accessories & Cables/Surge Protection & Filtration",Yes,base,98.94,98.94,"White Plains, New York",US,"Panamax M8-AV-PRO 8 Outlet Power Line Conditioner and Surge protector","Shop By Manufacturer Other Add my Store to your Favorites and receive my email newsletters about new items and special promotions! Panamax M8-AV-PRO …","Shop By Manufacturer Other Add my Store to your Favorites and receive my email newsletters about new items and special promotions! Panamax M8-AV-PRO 8 Outlet Power Line Conditioner and Surge protector --> Description Payment Information Shipping Information Terms & Conditions Item Condition: NEW Warranty: 1 year Brand: Panamax Features: total of 8 protected AC power outlets in two isolated banksi…",###EMPTY###,1,1,1,1,2,4,88,###EMPTY###,,/141565030710.jpg,"Panamax M8-AV-PRO 8 Outlet Power Line Conditioner and Surge protector",/141565030710.jpg,"Panamax M8-AV-PRO 8 Outlet Power Line Conditioner and Surge protector",/141565030710.jpg,"Panamax M8-AV-PRO 8 Outlet Power Line Conditioner and Surge protector",,

ANSWER-------------------------------------------------------------------

using         '_category' => array(1, 3), if you want to assign products to multiple categories or

'_category' => '3', for single category must work.


texts: CSS changes does not affect on normal browser magento 2 issue

texts: I have made some css changes in my website, like hidden "Add to cart" option from everywhere on the website. This css gets only affected in incognito mode and not visible on normal browser. Customer visit the store in normal browser only. What can i do so that css changes are visible on normal browser also.


texts: How to move color swatch next to the qty?

texts: I want to move my color dropdown in product page to be placed next to the qty?


texts: Magento : System Config page is not loading properly

texts:
Its recently installed Magento on localhost. System config page takes long time to load, and return partially loaded page

Have tried to restart Apache and done setup:upgrade, but issue still there.
No errors are shown in Apache Log and Magento Logs.

Versions

Magento CLI version 2.2.5
PHP 7.1.21 (cli) (built: Aug 15 2018
23:20:07) ( ZTS MSVC14 (Visual C++ 2015) x86 ) Zend Engine v3.1.0,
Copyright (c) 1998-2018 Zend Technologies
Server version: Apache/2.4.34 (Win32) Server built:   Jul 10 2018
09:24:15

Partially Loaded System Config Page

If reset is clicked in screen above, and public and private key is entered, it return same partial loaded page with message Credentials Saved


texts: Review captcha error after removing recaptcha from the form

texts:
The recaptcha was using 1.0 which is disabled now by google.

The form.phtml in default/default/template/review had the following code:

require_once(__DIR__ . '/recaptchalib.php');

&

<?php echo recaptcha_get_html("some-key-was-here", null, true); ?>

I decided to just try and remove it instead of upgrading it.

I removed the two lines of code above and checked to see if the form was back to "stock" using an original file in diffcehcker, it was.

I'm still getting an Invalid captcha entered. Please try again. error when submitting the form though. I did not develop this website. Any ideas on why it would still be trying to validate the captcha after being removed? Where else should I be looking?

I have tried flushing the cache.

Thanks


texts: Quantity is less than 6 automatically out of stock selected in the admin grid

texts: For the particular attribute type If the Quantity is less than 6 then automatically Stock avaliablity from stock to Out of Stock


texts: How to pass variable value from phtml JS to block.php?

texts:
I have a phtml (system.phtml) with <script> in it and a variable like console.log(data).

<?php $checkcustomer = $block->Customerlogin(); ?>

 <script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script>
 <script type="text/javascript" charset="utf-8">

  var data= 12345;
   console.log(data);
  </script>

Now i am getting the variable value in console and i also want its value in my block to do further processing on it how can i get data variable value in block or controller?


texts: Migrating Magento 1 customer Reward points to Magento 2

texts:
I'm currently trying to Migrate My data from Magento 1 to Magento 2 and running into some issues with migrating reward points.

We have J2T installed on our current Magento 1.9 site which has been OK but unfortunately does not seem to be compatible with our Magento 2.2.7.

We have decided to transfer over to Mirasvit. We have Ubertheme which Migrates customers, products and sale data fine but does not migrate reward points.

As we have a large number of customers (over 18,000) it would obviously not be feasible to go through the records and add the rewards points manually so I'm hoping that someone has come across this issue before and can suggest a solution/workaround.

Mirasvit's website the following but I'm unsure of how to make it work with the J2T on Magento 1

https://mirasvit.com/docs/module-rewards/current/setup/migration


texts: How do I know when I should use ObjectManager's create() or get()?

texts:
I understand that I can create an object using the ObjectManager through either its get() or create() method.

From the docs, create() will always create a new instance whereas get() retrieves a cached version of an object instance.

My chain of thoughts are:

I wouldn't know whether an object has already been created somewhere
else in the cache, would I?
If I don't know whether an object is    already in the cache, how do
I know when I should use create() or    get() method when
creating an object? Will I end up creating multiple objects?
One possible use of get() I    can think of is for singleton      classes as they don't need to be    created again. However, being new
to Magento2, how would I know    whether an object I want to create     is an singleton or not? Similarly, will I end up creating multiple objects?


texts: Is it possible to develop a new custom checkout page as same as default Checkout page in magento

texts:
I  am trying to make a new checkout page exactly same as default
  checkout page, is it possible to do default checkout page to a custom
  checkout page, what are the initial steps to achieve that.


texts: Magento 1: Change Email Body from RAWBody to HTMLBody / TextBody

texts:
All emails sent by the Magento system have only a RAWBody according to IMAP. Is it possible to change the email body to HTMLBody or TextBody?

Can anyone tell if this problem affects Magento or the email server settings?

Anyway, I need to parse the emails for a CRM system, is there an easy way?

// Looks like an Zend_mail problem issue. Also i have problems with the encoding. Its stated utf-8 but i isnt utf-8. This is what the IMAP return looks like

RawBody:

Return-Path: Received: from localhost ([2a01:4f8:171:18e2::2]) by smtp.gmail.com with ESMTPSA id v16sm24477054wrt.12.2019.10.02.09.07.05 for
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2019 09:07:05 -0700 (PDT) Message-ID:
 Reply-To: email@email.com To: =?utf-8?B?aW5mbw==?= Subject: =?utf-8?B?SWhyZSBBbmZyYWdlIGF1ZiBSZWxhZ2lvLmRlIC0gQW50b25pbyBTYW5jaGV6ICYgQmVyZW5nYXIgU2NobWlkdA==?= From: email Date: Wed, 02 Oct 2019 16:07:05 +0000 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline MIME-Version: 1.0 =0A=0A=0AName: username=0AEmail: email=0ATelefon: 01234345=0ANachricht: rehgcghgf


texts: Error after upgrade, Failed opening 'Mage/Googlecheckout/Helper/Data.php' for inclusion

texts:
I upgraded Magento CE 1.7.0.2 to 1.9 and when I try to go to System > Configuration it just loads up blank.  I get the following errors in the system.log:

2015-03-13T19:27:52+00:00 ERR (3): Warning: include(Mage/Googlecheckout/Helper/Data.php): failed to open stream: No such file or directory  in /chroot/home/path/to/html/lib/Varien/Autoload.php on line 94
2015-03-13T19:27:52+00:00 ERR (3): Warning: include(Mage/Googlecheckout/Helper/Data.php): failed to open stream: No such file or directory  in /chroot/home/path/to/html/lib/Varien/Autoload.php on line 94
2015-03-13T19:27:52+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Googlecheckout/Helper/Data.php' for inclusion (include_path='/chroot/home/path/to/html/app/code/local:/chroot/home/path/to/html/app/code/community:/chroot/home/carbonfi/restore.carbonfibergear.com/html/app/code/core:/chroot/home/path/to/html/lib:.:/usr/share/pear:/usr/share/php')  in /chroot/home/path/to/html/lib/Varien/Autoload.php on line 94

Any ideas on what's causing the problem?


texts: Grouped Product - Catalog Pricing - Starting at

texts:
I have recently started to manage a new Magento store, It was built by an agency and there is very little documentation. We are currently running 2.2.3 Enterprise.

It's my understanding if I had several simples in a grouped product, In the catalog and the grouped product would show 'Price starting at ....' Starting with the lowest price. Currently, the site shows nothing at all, its just blank.

Does anyone have any ideas where I would start looking to rectify this?

Thanks! :)


texts: Last heartbeat older than x minutes - Cron issues

texts:
The cron tasks heartbeat doesn't appear to be active in my Magento. I'm not sure why this is, I use Plesk to control the server side of things and I've set the following scheduled task (with domain settings/scheduled tasks) in attempt to force the heartbeat. However, it doesn't seem to work. I'd really appreciate any assistance you can give.

Here's the setup:

Minute: */10
Hour: *
Day of Month: *
Month: *
Day of Week *
Command: wget http://www.mydomainhere.co.uk/cron.php

Cron (Scheduled tasks) in Magento admin has the following info (I haven't updated any of this):
Generate schedule every: 15
Schedule Ahead for: 1
Missed if not run within: 60
History clean up after: 120
Success history lifetime: 60
Failure history lifetime: 600
Mark jobs failed after: 120
Heartbeat task schedule: */5 * * * *

Any ideas?

Thanks very much.


texts: Display products in information tab product product page

texts:
In Magento's 1.9 theme you get tabs with information on the product page. I want one tab to display custom chosen products and I want below the tabs the related products.

I've added a couple of tabs before and have the template file ready, but I can't get the file to display.

Catalog.xml

<action method="addTab" translate="title" module="catalog">
    <alias>onderhoudsmiddelen</alias>
    <title>Onderhoudsmiddelen</title>
    <block>catalog/product_list_related</block> // Also changed it to <block>catalog/product_list</block> But that displays an error
    <template>catalog/product/view/middelen.phtml</template>
</action>


texts:
I can get the base query for a given grid view by calling var_dump in Mymodule_Block_Adminhtml_Myaction_Grid

protected function _prepareCollection() {
    ...
    var_dump($collection->getSelect()->__toString());
    $this->setCollection($collection);
    return parent::_prepareCollection();
}

...but this returns a "base" query before any pagination or filters are applied in creating the grid view. I'd like to be able to examine the query that is actually used to generate a specific grid view. Reason being is that while executing this base query in MySQL returns results I'd expect, the grid view in Magento does not, and I'd like to see what's actually in use.

Any ideas?


texts: Error in css and js in child theme in Magento 1

texts:
I'm having a problem loading style sheets and scripts. I created a child theme, and I did not add any css or js to it. Even so, the magento looks for them in the son theme instead of the father. I'll try to explain better in the code

  design/frontend/custom_theme/default/etc/theme.xml

<?xml version="1.0"?>
<theme>
    <parent>rwd/default</parent>
</theme>

This is the structure of the child theme:

  app/design/frontend/{packageName}/{themeName}/etc
  app/design/frontend/{packageName}/{themeName}/etc/theme.xml
  app/design/frontend/{packageName}/{themeName}/layout
  app/design/frontend/{packageName}/{themeName}/layout
  app/design/frontend/{packageName}/{themeName}/template

Here is the setting in the panel:

Note that I did not overwrite any parent theme files. Magento even renders the page, but does not take the css style sheets and js files from the parent theme:

<link rel="stylesheet" href="http://example.com/skin/frontend/custom_theme/default/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="http://example.com/skin/frontend/custom_theme/default/css/revslider.css" type="text/css" />
<link rel="stylesheet" href="http://example.com/skin/frontend/custom_theme/default/css/jquery.mobile-menu.css" type="text/css" />
<link rel="stylesheet" href="http://example.com/skin/frontend/custom_theme/default/css/style.css" type="text/css" />
<link rel="stylesheet" href="http://example.com/skin/frontend/custom_theme/default/css/countdowntimer/countdowntimer.css" type="text/css" />
<link rel="stylesheet" href="http://example.com/skin/frontend/custom_theme/default/css/internal.css" type="text/css" />
<script type="text/javascript" src="http://example.com/skin/frontend/custom_theme/default/js/revslider.js"></script>
<script type="text/javascript" src="http://example.com/skin/frontend/custom_theme/default/js/common.js"></script>

None of these files exist in the child theme, but they exist in the parent theme. Why does not Magento catch them from the parent theme? Am I doing something wrong?

I followed this tutorial: https://www.coderomeos.org/how-to-create-custom-child-theme-in-magento

Thank you very much in advance!


texts: How to include additional product attributes into custom PHP array

texts:
I am assembling a product array drop-down for an extension I am building. I was curious if it is possible to pull a few more attributes into the following code so that I can reference them elsewhere in my code at the same time.

Currently, I am pulling all product SKUs from Magento using the following:

$products = array();
$productCollection = Mage::getResourceModel('catalog/product_collection')->addAttributeToSort('sku', 'asc');
$i = 1;
$items = $productCollection->getData();
foreach($items as $item) {
$products[$i]['value'] = $item['sku'];
$products[$i]['label'] = $item['sku'];
$i++;
}

I would like to also include the product's entity_id, created_at & updated_at fields into this array.

ADDITIONAL NOTES: Currently I just reference the SKUs using the following code in my admin HTML:

$products = array();
$productCollection = Mage::getResourceModel('catalog/product_collection')->addAttributeToSort('sku', 'asc');
$i = 1;
$items = $productCollection->getData();
foreach($items as $item) {
$products[$i]['value'] = $item['sku'];
$products[$i]['label'] = $item['sku'];
$i++;
}


texts: Sorting Search Results by attribute that is not available (isn't listed in dropdown)

texts:
Just like my topic says: Is it possible to set default sorting order (eg. by setDefaultOrder() function) to attribute that is not available - isn't listed in "sort by" dropdown list?

What I want to achieve is to search results are default sorted by "my_attribute", but "my_attribute" isn't possible to choose from "sort by" select.

I hope that this is clear enough :)

Thanks!


texts:
How to unset shipping rate from _rates varible in Mage_Shipping_Model_Rate_Result?

object(Mage_Shipping_Model_Rate_Result)#663 (2) {
["_rates":protected]=>
array(2) {
  [0]=>
  object(Mage_Shipping_Model_Rate_Result_Method)#1585 (7) {
    ["_data":protected]=>
    array(6) {
      ["carrier"]=>
      string(5) "fedex"
      ["carrier_title"]=>
      string(15) "Federal Express"
      ["method"]=>
      string(20) "GROUND_HOME_DELIVERY"
      ["method_title"]=>
      string(13) "Home Delivery"
      ["cost"]=>
      string(5) "27.33"
      ["price"]=>
      float(27.33)
    }
    ["_hasDataChanges":protected]=>
    bool(true)
    ["_origData":protected]=>
    NULL
    ["_idFieldName":protected]=>
    NULL
    ["_isDeleted":protected]=>
    bool(false)
    ["_oldFieldsMap":protected]=>
    array(0) {
    }
    ["_syncFieldsMap":protected]=>
    array(0) {
    }
  }
  [1]=>
  object(Mage_Shipping_Model_Rate_Result_Method)#3391 (7) {
    ["_data":protected]=>
    array(6) {
      ["carrier"]=>
      string(8) "fred_3pl"
      ["carrier_title"]=>
      string(13) "Local Courier"
      ["method"]=>
      string(6) "b2c_a1"
      ["method_title"]=>
      string(24) "Free Delivery (Same Day)"
      ["cost"]=>
      float(0)
      ["price"]=>
      float(0)
    }
    ["_hasDataChanges":protected]=>
    bool(true)
    ["_origData":protected]=>
    NULL
    ["_idFieldName":protected]=>
    NULL
    ["_isDeleted":protected]=>
    bool(false)
    ["_oldFieldsMap":protected]=>
    array(0) {
    }
    ["_syncFieldsMap":protected]=>
    array(0) {
    }
  }
}


texts: Magento 2 - Get page cache by tag name in cache warmer

texts:
I am creating a cache warmer, before crawling page to re-generate cache, I want to check if page cache is created.

Let's say, I have a product with the ID 156 now cache tag would be catalog_product_156, now what would be the criteria to get cache by tag name?


texts: Negative price filter in Layered Nav Magento 2.2

texts:
Currently experiencing issue with layered Nav price filter. The price ranges are completely incorrect. Default filter is showing price range -10 to 395

http://prntscr.com/jp1r63

Applying price range filter just seems to throw random products in the results.

  Tried:  Reindexing via CL Disabling Side bar extension (native magento
  side bar still having same issue) Checked price attribute setup in
  admin

Env:

Magento 2.2.0
PHP 7.1
Centos 7

Any hints appreciated


texts: Magento 2 How to exclude Head Miscellaneous Scripts section from deferred?

texts:
I am using a free extension for defer javascript Magento 2 Defer Parsing of JavaScript, which is working fine.

But when I am adding Miscellaneous Scripts  in magento admin from head section which is also showing in footer but I want this script in head tag.

So how can I exclude head Miscellaneous Scripts from deferred?

I am using magento 2.3.0

Below code is used in this extension:

etc/frontend/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="controller_front_send_response_before">
        <observer name="meetanshi_deferjs" instance="Meetanshi\DeferJS\Model\Observer" shared="false" />
    </event>
</config>

Helper/Data.php

<?php

namespace Meetanshi\DeferJS\Helper;

use Magento\Framework\App\Helper\AbstractHelper;
use Magento\Framework\App\Helper\Context;
use Magento\Store\Model\ScopeInterface;

class Data extends AbstractHelper
{
    public function __construct(Context $context)
    {
        $this->scopeConfig = $context->getScopeConfig();
        parent::__construct($context);
    }

    public function isEnabled()
    {
        $active = $this->scopeConfig->getValue('deferjs/general/active', ScopeInterface::SCOPE_STORE);
        if ($active) {
            return true;
        }
        return false;
    }
}

Model/Observer.php

<?php

namespace Meetanshi\DeferJS\Model;

use Magento\Framework\Event\ObserverInterface;
use Meetanshi\DeferJS\Helper\Data;

class Observer implements ObserverInterface
{
    protected $_helper;

    public function __construct(
        Data $helper
    )
    {
        $this->_helper = $helper;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        if (!$this->_helper->isEnabled())
            return;
        $response = $observer->getEvent()->getData('response');
        if (!$response)
            return;
        $html = $response->getBody();
        if ($html == '')
            return;
        $conditionalJsPattern = '@(?:<script type="text/javascript"|<script)(.*)</script>@msU';
        preg_match_all($conditionalJsPattern, $html, $_matches);
        $_js_if = implode('', $_matches[0]);
        $html = preg_replace($conditionalJsPattern, '', $html);
        $html .= $_js_if;
        $response->setBody($html);
    }
}


texts: Get products directly assigned to a category

texts:
I am using following function to get product collection from a category with it's id.

public function getProductCollection($categoryId)
{
    $category = $this->_categoryFactory->create()->load($categoryId);
    $collection = $this->_productCollectionFactory->create();
    $collection->addAttributeToSelect('*');
    $collection->addCategoryFilter($category);
    $collection->addAttributeToFilter('visibility', \Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH);
    $collection->addAttributeToFilter('status',\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED);
    return $collection;
}

This returns all the products in the category and products in subcatgories. I've enabled anchor for the category. I have found this solution for magento 1 which suggests to disable anchor for the category. But I need it be enabled so as to implement layered navigation.

Any idea on how we can get products only in the category excluding those in subcategories?


texts: Display decrypted or empty value in configuration

texts:
I have a configuration value that I encrypt upon save, but when I look at it again in the configuration (UI), I get the encrypted string. I would like to show an empty string (production) or the correct decrypted value (for testing), but cannot quite figure out how to do this.

The logical way I know of is to write a source model, but those seem to only work for select elements. This is a simple text field. I need a way to receive the original data, decrypt with (with Magento\Framework\Encryption\EncryptorInterface), and display the decrypted value; either that or an empty value.


texts: Supee-9767 saveBilling returning 500 after v2 Patch applied to 1.9.2.3 (formkeys present)

texts:
After applying the Version 2 patch I'm having a problem with the patch where it seems that saveBilling() is returning 500 server error on checkout.

This is onepage checkout and I do use PayPal plus if that matters.

When I look at the form data the formkey value is there. So the missing formkey issue doesn't seem to be related to that.

I can disable formkey requirement in the admin side and the problem remains.

My template DOES NOT HAVE any /checkout/ stuff in it, so there are no files to add the often mentioned formkey's too --- that I can find.

Previously mentioned solutions I've tried:

  https://gist.github.com/schmengler/c42acc607901a887ef86b4daa7a0445b

-- My template doesn't have a /checkout/ override so nothing to patch

  Security Patch SUPEE-9767 - Possible issues?

Been through this thread a dozen times without success.

Any thoughts or suggestions would be greatly appreciated.

*** Update ****

I've chased the problem down to the following:

Call to undefined method Mage_Checkout_OnepageController::isFormkeyValidationOnCheckoutEnabled();

* I found this function in Action.php *

Any thoughts on why they undefined method call occurring.


texts: Magento 1 - How to get a products small image in the side cart?

texts:
I used this code to display a Thumbnail image :

<?php echo $this->getProductThumbnail()->resize(50, 50)?>

but i would like to display the small image. I used that to my sidebar cart


texts: Reference before_body_end doesn't work - after_body_start does?

texts:
Starting to think I've lost my mojo...

Both blocks named before_body_end and after_body_start are of type core/text_list. However, the following layout xml:

<layout>
    <default>
        <reference name="before_body_end">
            <block type="remarketing/ecjs" name="remarketing_ecjs" as="remarketing_ecjs" />
            <block type="remarketing/modal" name="remarketing_modal" as="remarketing_modal" />
        </reference>
    </default>
</layout>

Does not output the child blocks in the reference. If I swap the before_body_end for after_body_start, the blocks render as expected

Both child blocks extend from Mage_Core_Block_Text.

Any ideas why? I think I have Friday-osis...


texts:
I have a problem updating catalog/product/view.phtml with AJAX.
What I'm trying to do is get the selected value from a custom dropdown in view.phtml and then filter all the products that have a certain attribute equal to the selected option from the dropdown.

Here's my code:
(I've activated correctly the module with the Yui_Filterajax.xml in app/etc/modules.)

  View.phtml:

function getCustomAtt() {
    var selection = jQuery('.selectAttr').val(); //Gets the value of dropdown
    jQuery.ajax({
        url: "<?php echo $this->getUrl('filterajax/ajax/index') ?>",
        type: "POST",
        data: { myval: selection},
        success: function(data) {
            console.log('success')
            console.log(data);
        }
    });
}

  app/code/local/Yui/Filterajax/controllers/AjaxController.php

class Yui_Filterajax_AjaxController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();
    }
}

  app/code/local/Yui/Filterajax/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Yui_Filterajax>
            <version>0.1.0</version>
        </Yui_Filterajax>
    </modules>
    <frontend>
        <routers>
            <filterajax>
                <use>standard</use>
                <args>
                    <module>Yui_Filterajax</module>
                    <frontName>filterajax</frontName>
                </args>
            </filterajax>
        </routers>
        <layout>
            <updates>
                <filterajax>
                    <file>filterajax.xml</file>
                </filterajax>
            </updates>
        </layout>
    </frontend>
</config>

  app/design/frontend/MyTheme/default/layout/filterajax.xml

<?xml version="1.0"?>
<layout version="1.0">
    <filterajax_ajax_index>
        <block type="filterajax/filterajax" name="root" output="toHtml" template="catalog/product/view.phtml" />
    </filterajax_ajax_index>
</layout>

The problem is, that in the console I see the text 'success' and this error:

  Cannot send headers; headers already sent in
  ../magento/app/code/local/Yui/Filterajax/controllers/AjaxController.php,
  line 19

So I can't get the result.  I don't know what to try...


texts: continue button not working under checkout in Billing information step

texts:
"continue" button under "Billing information" in checkout is not working. I am trying below code and i got error as in image.

<?php

$id=rand().time();
if(isset($description)) {
    $description = str_replace(array("\r", "\n"), "", $description);
} else {
    $description = "";
}

?>
<div id="map-canvas<?php echo $id; ?>" style="width:<?php echo $width; ?>; height:<?php echo $height; ?>;max-width:100%;" >


texts:
i'm debugging a email function, the there is an exception terminate the program

<?
public function merchantEmailAction( )
    {
        $r = $this->getRequest();
        $id = $r->getParam('id');

        $deal    = Mage::getModel('deals/deal')->load($id, 'product_id');

        $merchant_id = $deal->merchant_id;
        $merchant = Mage::getModel('deals/merchant')->load($merchant_id);

        $name = $merchant->getMerchantName();
        $merchant_email = $merchant->getMerchant_email();

        if ( !name )
        {
            $to_name = "Merchant";
        }
        else
        {
            $to_name = $name;
        }

        $emailTemplate  = Mage::getModel('core/email_template')->loadByCode('dailydeals_notification_merchant_email_template');

        $storeId = Mage::app()->getStore()->getStoreId();

        $sender = array("email" => Mage::getStoreConfig("deals/general/sender_emailid", $storeId), "name" => Mage::getStoreConfig( "deals/general/sender_name", $storeId));

        $mail = Mage::getModel('core/email_template');

        $emailInfo = Mage::getModel('core/email_info');

        $emailInfo->addTo((string)$merchant_email, (string)$to_name);

        $mail->addEmailInfo($emailInfo);
        die();

    }
?>

report generated

a:5:{i:0;s:1124:"Invalid method Mage_Core_Model_Email_Template::addEmailInfo(Array
(
    [0] => Mage_Core_Model_Email_Info Object
        (
            [_bccNames:protected] => Array
                (
                )

            [_bccEmails:protected] => Array
                (
                )

            [_toNames:protected] => Array
                (
                    [0] => Array
                        (
                            [0] => ABC
                        )

                )

            [_toEmails:protected] => Array
                (
                    [0] => Array
                        (
                            [0] => test@abc.com
                        )

                )

            [_data:protected] => Array
                (
                )

            [_hasDataChanges:protected] =>
            [_origData:protected] =>
            [_idFieldName:protected] =>
            [_isDeleted:protected] =>
            [_oldFieldsMap:protected] => Array
                (
                )

            [_syncFieldsMap:protected] => Array
                (
                )

        )

)
)";i:1;s:1090:"#0 /home/test1/public_html/app/code/local/customext/Deals/controllers/Adminhtml/DealController.php(461): Varien_Object->__call('addEmailInfo', Array)
#1 /home/test1/public_html/app/code/local/customext/Deals/controllers/Adminhtml/DealController.php(461): Mage_Core_Model_Email_Template->addEmailInfo(Object(Mage_Core_Model_Email_Info))
#2 /home/test1/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): customext_DailyDeals_Adminhtml_DealController->merchantEmailAction()
#3 /home/test1/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('merchantEmail')
#4 /home/test1/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#5 /home/test1/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#6 /home/test1/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 /home/test1/public_html/index.php(87): Mage::run('', 'store')
#8 {main}";s:3:"url";s:95:"/index.php/deals/adminhtml_deal/merchantEmail/id/172/key/5da1fd615e59adf472a55947b67ae5f0/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

anyone know what is the problem?


texts: Magento - Sort Products in Cart in Alphabetical Order

texts: How can I sort the products in the cart in alphabetical order?


texts: Magento2 composer module:uninstall: Does it make sense and why does it take so long?

texts:
We want to streamline a magento installation managed via composer.

So, for example we have no need for Magento_SendFriend module, nor Magento_Review, and maybe other not essential / small modules.

So following the documentation I would issue the following command:

php bin/magento module:uninstall -r -c Magento_SendFriend

So far so good, as it starts to rattle through ..

You are about to remove code and/or database tables. Are you sure?[y/N]y
Enabling maintenance mode
You are removing data without a database backup.
No data to clear in Magento_SendFriend
Removing Magento_SendFriend from module registry in database
Removing Magento_SendFriend from module list in deployment configuration
Removing code from Magento codebase:

However, it has been stuck there for the past hour and a half, with the only edits I have found having been done to the app/etc/config.php.

-    'Magento_SendFriend' => 1,

Does it make sense to use this new option to remove unused or unneeded modules?

Is it normal for it to take this long?


texts: Subtotals shows in base Currency even if I have selected another currency for payment using Magento 1.9

texts:
There are 3 currencies being used in my website, which are INR, Dollar, and AED.

My base currency is INR, but when customer proceeds for payment and selects Dollar to pay, it shows Base currency in Subtotal and also in Payment Gateway Page, it shows the base currency itself instead of Dollar(the selected currency).

Please help me out... it's very very urgent.

I have also replaced displayBaseGrandTotal()  to displayGrandTotal   but it didn't work.


texts: Get javascript value without html or script tags

texts:
I'm trying to get a product id value inside a add to cart button. The below code works getting the value in an alert.

<input type="button" value="Get Values" id="getChkBoxValues" />

Is there any way to get the value inside this button (below) where the number 5 is without any additional span, div, or script tags?

 <button id="product-addtocart-button" class="button btn-cart" onclick="location.href='<?php echo Mage::getStoreConfig(Mage_Core_Model_Store::XML_PATH_SECURE_BASE_URL); ?>checkout/cart/add?product=5&qty=1'"><?php echo $this->__('Add All to Cart') ?></button>


texts:
First time posting here for Magento2, so if this is not correct method or place, please let me know how to rectify. Using version 2.1.0 currently.

Hitting http 500 error on product page URL in browser. All other pages of the Magento 2 install are loading fine and as they should. Developer mode turned back on and errors showing in browser as below:

2 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid block type: Magento\Catalog\Block\Product\ProductList\Item\Container
Exception #1 (ReflectionException): Class Magento\Catalog\Block\Product\ProductList\Item\Container does not exist

Have tried the solutions that suggest it's a cache issue. We have cleared the var/generation folder. Not a permissions issue, as all other pages loading fine and have set permissions to be as they need to be following those relevant guides.

Potential for one of the catalog database tables to be corrupt? Missing files?


texts:
I'm trying to modify the address template in Magento through admin>stores>configuration>customer>customer configuration>Address Templates> HTML

Can someone tell me the use of {{depend}} and {{if}} in the template or help me modify this one.

In the checkout page, I want to interchange the position of the postcode and city. Also, put the country on top of it and put the street below. This is the order:

Country
Postcode
Region
City
Street

This is the default:

{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}
{{/depend}}
{{depend company}}{{var company}}
{{/depend}}
{{if street1}}{{var street1}}
{{/if}}
{{depend street2}}{{var street2}}
{{/depend}}
{{depend street3}}{{var street3}}
{{/depend}}
{{depend street4}}{{var street4}}
{{/depend}}
{{if city}}{{var city}},  {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}

{{var country}}

{{depend telephone}}T: {{var telephone}}{{/depend}}
{{depend fax}}
F: {{var fax}}{{/depend}}
{{depend vat_id}}
VAT: {{var vat_id}}{{/depend}}

This is my my modified version:

{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}
{{/depend}}
{{depend company}}{{var company}}
{{/depend}}
{{var country}}

{{if postcode}}{{var postcode}},  {{/if}}{{if region}}{{var region}}, {{/if}}{{if city}}{{var city}}{{/if}}

{{if street1}}{{var street1}}
{{/if}}
{{depend street2}}{{var street2}}
{{/depend}}
{{depend street3}}{{var street3}}
{{/depend}}
{{depend street4}}{{var street4}}
{{/depend}}
{{depend telephone}}T: {{var telephone}}{{/depend}}
{{depend fax}}
F: {{var fax}}{{/depend}}
{{depend vat_id}}
VAT: {{var vat_id}}{{/depend}}

But it is not working.


texts: Magento rest API configurable product and category list

texts:
I am having a project using Magento rest API V1, I have read through the documentation and looking for the answer around the web but cannot find the solution.

** First: **

I want to show list of configurable products and user will select the size before adding to cart, I am using :

{{domain}}/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=has_options&searchCriteria[filterGroups][0][filters][01][value]=1&searchCriteria[pageSize]=10

**The response I get: **

{
  "items": [
    {
      "id": 1,
      "sku": "AA0001",
      "name": "Sample Product",
      "attribute_set_id": 1,
      "price": 0,
      "status": 1,
      "visibility": 4,
      "type_id": "configurable",
      ....
   },
   ....
]
   }

The problem is the price is 0, and I only want to show configurable product list.

** Second: **

I want to do a filter by size, color and another attribute for a specific category, how can I get a list of available attributes by category?
Like category_id = 1 and show what sizes are available only for that category.

Thanks in advance


texts: setup:upgrade command set all themes parent id to 1

texts:
lately, every time I run the setup:upgrade command, I notice that inside the "theme" table all the parent_id are overwritten and set to 1 (magento blank).On backoffice side, the themes are shown with the right inheritance and also inside the theme.xml file of the child themes, I don't see particular problems.
here is an example of the theme.xml file of a child theme:
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Theme4 - Magento 2 Theme</title>
<parent>custom_theme/theme1</parent>
<media>
    <preview_image>media/preview.jpg</preview_image>
</media>

in the last year it has always worked. I've been getting this error for a couple of days. I think due to activity on the machine. at the moment I don't know what could be the causes for which the parent_id are set to 1


texts: Magento2.4.2 Create order Programmatically not working using cronjob

texts:
I've tried a viral solution and followed this https://webkul.com/blog/create-quote-and-order-programmatically-in-magento2/
The quote is created successfully but error occurred when place order through cronjob only.
$orderId = $this->cartManagementInterface->placeOrder($quote->getId());

And the following error occurred
 Type Error occurred when creating object: Magento\InventoryIndexer\Model\Queue\ReservationData, Argument 2 passed to Magento\InventoryIndexer\Model\Queue\ReservationData::__construct()
must be of the type int, null given, called in /var/www/html/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121


texts: Setup customer creation across multiple websites

texts: We are running a Magento instance that is running three websites. Each website representing a country.  We want to know is there an easy way , in admin console in 2.1.x ,to allow a customer to register across the three websites ? When I go to customers in the admin console I see that I can assign a customer to one of the 3 websites using a drop down menu


texts: Magento 2: I want to get product id from getCartItems function in minicart.js

texts:
Here is the function in minicart.js
getCartItems: function () {
            var items = this.getCartParam('items') || [];
            console.log(items);
            // want to get product id from items here
            items = items.slice(parseInt(-this.maxItemsToDisplay, 10));
            return items;
        }

Items are showing JSON array in console with all mini cart items data. But I am not able to get only product IDs from that.
Does anyone have any idea for the same?
Thanks!


texts:
I am developing an extension that will be probably used by 1000+ stores and needs to add 1 extra field into table sales_flat_order.

ALTER TABLE `".$obj->getTable('sales_flat_order')."`
               ADD `new_field` TINYINT NULL DEFAULT NULL

sales_flat_order is very important table I am wondering if there ANY risk with this operation? If there is any even tiny risk for that, than I will rather create extra table with fields order_id | new_field.

Tnx!


texts: Error SQL[HY000] Error 1205 with import_products

texts:
I have a problem with a job which manage import products and customers every night.

Randomly return an error when import products from SAP.

If u see the picture u can see the material "SB-FHA125A-F_ASLV" which was imported rightly but the product "SB-FBA125A-F_GLY" return an error when try to modify the attribute sap_model.

I mustn't modify the value of timeout in InnoDB.

Any idea about what is the problem?.

Thanks!


texts: magento 2 logged in one browser , open another browser support session

texts: Magento 2 logged in one browser , will open another browser account page support session how?


texts: Magento 1.9.2. - Display attribute value in his current language

texts:
My code is this:

$simple_product->getAttributeText('attribute')

I would display attribute text value in his different language in my view.phtml. If i use getAttributeText('attribute') it shows me the value of the admin column of the attribute and not in other languages. I attached a screen for this:

This operation I want to perform on the associated products of the configurable product and therefore I extracted the value of the attribute as follows:

$simple_collection = $conf->getUsedProductCollection()-
>addAttributeToSelect('*')->addFilterByRequiredOptions();

foreach($simple_collection as $simple_product){$simple_product-
 >getAttributeText('color');
}

How can i do?


texts: Fatal error: Uncaught TypeError: Argument 1 passed to __construct() must be of the type array, null give

texts:
Urgent help needed!

After migrating data from M1 to M2 (Magento v2.2.5) using UB Data Migration Pro, when I click edit to any Customer at the Magento 2 Admin Panel, I get these error messages:

  Fatal error: Uncaught TypeError: Argument 1 passed to
  Magento\Eav\Model\Entity\Attribute\Source\Config::__construct() must
  be of the type array, null given, called in
  /home/91647.cloudwaysapps.com/fvrpgyvmqm/public_html/aandhcom/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
  on line 111 and defined in
  /home/91647.cloudwaysapps.com/fvrpgyvmqm/public_html/aandhcom/vendor/magento/module-eav/Model/Entity/Attribute/Source/Config.php
  on line 26

  TypeError: Argument 1 passed to
  Magento\Eav\Model\Entity\Attribute\Source\Config::__construct() must
  be of the type array, null given, called in
  /home/91647.cloudwaysapps.com/fvrpgyvmqm/public_html/aandhcom/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
  on line 111 in
  /home/91647.cloudwaysapps.com/fvrpgyvmqm/public_html/aandhcom/vendor/magento/module-eav/Model/Entity/Attribute/Source/Config.php
  on line 26

I have tried running below commands:

rm -rf var/page_cache/* var/cache/* generated/code/* var/log/* var/report/* generated/metadata/* var/view_preprocessed/* pub/static/*
php -d memory_limit=-1 bin/magento setup:upgrade
php -d memory_limit=-1 bin/magento setup:db-schema:upgrade
php -d memory_limit=-1 bin/magento setup:di:compile
php -d memory_limit=-1 bin/magento setup:static-content:deploy -f
php -d memory_limit=-1 bin/magento cache:clean
php -d memory_limit=-1 bin/magento cache:flush
php -d memory_limit=-1 bin/magento indexer:reindex
php -d memory_limit=-1 bin/magento cache:clean
php -d memory_limit=-1 bin/magento cache:flush

All commands executed successfully, but still, the error exists. Have a look at the screenshots below:


texts:
How to change the size of Fotorama zoom on magento2.1 to 700px?
I tried it on gallery.phtml but nothing changed.


texts: Automatically switch store from category/view and product/view

texts:
Magento site with multiple store setup, different root category for each store, yet all products are visible from anywhere within the same website. Product url rewrites are enabled.

Say I'm browing a store in my Magento site, and I navigate to a category page:

example.com/furniture/living-room.html

Say I bookmark this link for later, or to share on social networks. Then I switch stores and go to Electronics. I look at some items and then go away. My session saves the last store I visited. I then come back by click the url on Facebook, or by going to the bookmark. I get a 404 Error because the category page for Furniture / Living-room doesn't exist in Electronics. The router doesn't find any categories of that name in that store so it redirects to noroute. If I switch back to the first store manually (through the store switcher) and try the link again it works just fine.

How can I switch to the appropiate store so that the category page will display correctly? My guess is it would have to be before the url is passed to the routers but I don't know whether that's possible.

With products it is not the case; I can still view the product but I stay in the different store (electronics) so I would also like to be able to switch the store automatically.

Just by looking at the url http://example.com/furniture/living-room.html I cannot tell if it's a product url or a category url from the code. If I knew what I was trying to look at, I could find the appropiate store from the root category and switch to it programmatically.

Note: I do know how to switch stores programmatically. I just need to figure out how to do it from a rewriten url.


texts: Magento 2 : Show product ratings for each star, average ratings and % of 5 star ratings on product page

texts:
I want to display ratings on the product page like this:

How many users selected 5/4/3/2/1 star ratings
The average rating, displayed as stars
Percentage of users selected a 5 star rating

  I need to add custom code for that, so please don't suggest getReviewsSummaryHtml.


texts: $.widget is not a function jquery error in magento 2

texts:
I know this question has been around a lot with solution but none worked in my case.

I have installed Sm Revo theme with Magento v 2.1.0 and I'm getting this error.

So far I have tried following things

  /app/design/frontend/Sm/revo/Magento_Theme/layout/default_head_blocks.xml

In this file I have following content

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <!-- ADD JQUERY -->
        <meta name="x_ua_compatible" content="IE=edge"/>
        <script src="jquery.js" />
        <script src="js/bootstrap/bootstrap.min.js" data-requiremodule="jquery"/>
        <script src="js/owl.carousel.js" data-requiremodule="jquery"/>
        <script src="js/lightslider.js" data-requiremodule="jquery"/>
        <script src="js/jquery.elevatezoom.js" data-requiremodule="jquery"/>
        <script src="js/jquery.cookie.min.js" data-requiremodule="jquery"/>
        <script src="js/jquery.fancybox.pack.js" data-requiremodule="jquery"/>
        <script src="js/jquery.fancybox-buttons.js" data-requiremodule="jquery"/>
        <script src="js/jquery.fancybox-thumbs.js" data-requiremodule="jquery"/>
        <script src="js/jquery.mousewheel-3.0.6.pack.js" data-requiremodule="jquery"/>
        <script src="js/easyResponsiveTabs.js" data-requiremodule="jquery"/>
        <script src="js/yttheme.js" data-requiremodule="jquery"/>

        <!-- ADD CSS  -->
        <css src="css/styles-m.css" />
        <css src="css/styles-l.css" media="screen and (min-width: 768px)"/>
        <css src="css/print.css" media="print" />
        <css src="css/css-fix.css" />
        <css src="css/ytextend.css" />
        <css src="css/yttheme.css" />
    </head>
</page>

I have tried replacing <script src="jquery.js" /> with <remove src="jquery.js" />
 as mentioned somewhere as a fix but it worked on my local but didn't work on test server hosted on google.
Also tried with different magento version but same error occurred.


texts: set customer attitude to required in one site and not on other site

texts: In the multi-website, Can we set customer attitude to required in one website and not required in other website


texts: How to add bitcoin to allowed currency list

texts:
System->Configuration->Currency setup->Allowed currencies

How am i supposed to add a new currency(say bitcoin) to this list.


texts:
we have in our shop an Voucher with a $. In the old CE it works but now in the 1.7.0.2 the voucher code doesn't work.
The big problem is, thousand of this vouchers are at our customers and ready to send.
What can I do, that Magento accept the Code?

Thanks


texts: How to add the shipping TITLE to admin sales grid

texts:
I want to add the shipping method ( shipping title NOT shipping description ) to the admin sales grid.

I've already added the shipping description using this code

$collection->getSelect()
       ->join('magento_sales_flat_order',
              'main_table.entity_id = magento_sales_flat_order.entity_id',
               array('shipping_description'));
$this->setCollection($collection);

but this is not what i want, i want only the shipping title whithout the method name.


texts: Magento invoice printing error after a custom theme installed

texts:
My problem is printing invoice issue,I noticed that this started since i installed a new theme, i installed a theme (from EMThemes website) and whenever i try to print a sales invoice from the customer dashboard or during after checkout, i get an error titled as follows:

"There has been an error processing your request"

and followed by the follow error codes:

Invalid method Mage_Page_Block_Html_Head::addEMItem(Array
(
    [0] => skin_css
    [1] => css/em_variation.css
    [2] => Mage_Core_Model_Layout_Element Object
        (
        )

    [3] => general_disable_frontend_variation
    [4] => 1
)
)

Trace:
#0 [internal function]: Varien_Object->__call('addEMItem', Array)
#1 [internal function]: Mage_Page_Block_Html_Head->addEMItem('skin_css', 'css/em_variatio...', Object(Mage_Core_Model_Layout_Element), 'general_disable...', '1')
#2 /homepages/45/d633723370/htdocs/reficcocontrol/app/code/core/Mage/Core/Model/Layout.php(348): call_user_func_array(Array, Array)
#3 /homepages/45/d633723370/htdocs/reficcocontrol/app/code/core/Mage/Core/Model/Layout.php(214): Mage_Core_Model_Layout->_generateAction(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#4 /homepages/45/d633723370/htdocs/reficcocontrol/app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#5 /homepages/45/d633723370/htdocs/reficcocontrol/app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /homepages/45/d633723370/htdocs/reficcocontrol/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /homepages/45/d633723370/htdocs/reficcocontrol/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /homepages/45/d633723370/htdocs/reficcocontrol/app/code/core/Mage/Sales/Controller/Abstract.php(181): Mage_Core_Controller_Varien_Action->loadLayout('print')
#9 /homepages/45/d633723370/htdocs/reficcocontrol/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Sales_Controller_Abstract->printAction()
#10 /homepages/45/d633723370/htdocs/reficcocontrol/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('print')
#11 /homepages/45/d633723370/htdocs/reficcocontrol/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /homepages/45/d633723370/htdocs/reficcocontrol/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#13 /homepages/45/d633723370/htdocs/reficcocontrol/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#14 /homepages/45/d633723370/htdocs/reficcocontrol/index.php(87): Mage::run('', 'store')
#15 {main}

Please I need help rectifying this error,am very new to magento,a detailed instruction would be appreciated,am on magento 1.8.1,thanks


texts: Why does the default VCL produced by Magento force search requests to bypass Varnish?

texts:
The default VCL produced by Magento from the admin has the following few lines in it:

# Bypass shopping cart, checkout and search requests
if (req.url ~ "/checkout" || req.url ~ "/catalogsearch") {
    return (pass);
}

Now I understand why Magento would want requests to bypass Varnish for checkout URLs, but why search requests? Is it purely because search results can change frequently?


texts:
I need to migrate my magento 2 EE to CE. I have found many posts regarding this but all of them are of Magento 1. Can anyone please suggest how to do this for Magento 2?

Thanks in advance.


texts: CMS page code being "rewritten" upon save

texts:
Magento CE 1.9.0.1 on dev environment running Ubuntu, Apache, PHP, MySQL - that's it.

Not a lot to this one: I'm trying to add some attributes to an input field within my CMS homepage. It's a single CMS page.

I try to change this:

<input class="form-control" type="text" />

To This:

<input class="form-control" placeholder="Enter your email address" type="text">

And it continuously reverts back to the first example. Sometimes it will save, allow me to refresh the page 2 or 3 times showing the second, correct version and then it will show me the first version again. I don't get it and I can't explain it. The CMS section is also stripping white space out of my CMS pages that I intentionally insert to make the code more readable but that isn't my primary concern right now. Has anyone seen behavior like this in a vanilla install of Magento on a minimal development environment (or otherwise)? Thanks.


texts: Multiselect attribute created not saving in Db

texts:
I have created a custom Multiselect product attribute. It has been created successfully but the value are saved when assigned store view specific.

But if i select an option and save in global it is not saving.Anything else i am missing?

Step1: setup file InstallData.php

namespace Vendor\Module\Setup;

use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;

class InstallData implements InstallDataInterface
{
/**
 * @var \Magento\Eav\Setup\EavSetupFactory
 */
private $eavSetupFactory;

/**
 * Constructor
 *
 * @param \Magento\Eav\Setup\EavSetupFactory $eavSetupFactory
 */
    public function __construct(EavSetupFactory $eavSetupFactory)
    {
        $this->eavSetupFactory = $eavSetupFactory;
    }

    public function install(ModuleDataSetupInterface $setup,  ModuleContextInterface $context)
    {

       $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
       $eavSetup->addAttribute(
           \Magento\Catalog\Model\Product::ENTITY,
           'attr_code',
           [
              'type' => 'text',
              'label' => 'Attr Label',
              'input' => 'multiselect',
              'sort_order' => 2,
              'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend',
              'source' => 'Vendor\Module\Model\Config\Source\Options',
              'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
              'visible' => true,
              'required' => false,
              'user_defined' => false,
              'filterable' => true,
              'used_in_product_listing' => true,
          ]
      );
   }
}

Step2: Source Model

namespace Vendor\Module\Model\Config\Source;

class Options extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
{

   public function getAllOptions()
   {
       $this->_options = [
            ['label' => __('Label1'), 'value'=>'0'],
            ['label' => __('Label2'), 'value'=>'1'],
        ];
        return $this->_options;
   }

   public function toOptionArray()
   {
       $arr = $this->getAllOptions();
       $_options = [];
       foreach ($arr as $key => $value) {
          $_options[] = [
              'value' => $key,
              'label' => $value
          ];
       }

      return $_options;
   }
}


texts: Magento 1.9 Some Products not showing in a category

texts:
Hello I am struggling with my category and search pages.

If you look at this image:

There should be 4 products in each row.


texts: Magento Catalog Search extension for searching local products

texts:
I am working on an extension that duplicates the Mage Catalogsearch module. The end goal is to  run two different searches on the same Magento store - catalog search for all regular searches and the new "localsearch" extension to find products that are located near the user.

I've copied over the catalogsearch files into their new folders and everything seems to be working fine. My question is: Where in Catalog Search is the collection of items searched created? I have a SQL statement prepared that will give a list of all sellers in the store (it is a marketplace) within a radius of a specific latitude and longitude. Once I have all of the seller IDs I can build a list of all the products that the keyword search should be limited to. I am just not sure in the rather complex layout of catalogsearch where that collection is being built.


texts: ScopeConfigInterface as parameter in constructor - Magento 2

texts:
I'm working with Magento 2, I'm still new. I have this constructor inside a controller class:

public function __construct(Context $context, PageFactory $pageFactory, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig)
{
  $this->pageFactory = $pageFactory;
  $this->scopeConfig = $scopeConfig;
  return parent::__construct($context);
}

It was working until I added the ScopeConfigInterface. Now, when I load my page I get this error:

  Recoverable Error: Argument 3 passed to xxx\Customer\Controller\Login::__construct() must implement interface Magento\Framework\App\Config\ScopeConfigInterface, none given, called in...

Any ideas?... Thanks!


texts: How to get Hash value from url in magento

texts:
my Url is like this

http://localhost/b/index.php/review/product/list/id/27/#review-form

how can i get value after #

$val="review-form";


texts: Magento 2 Get all the colors of a single Product?

texts: How can I get all the available colors of a single product in Magento 2?


texts: How to get rule id with respect to customer group id

texts:
class CouponCode extends \Magento\Framework\View\Element\Template
{

  protected $_customerSession;

  protected $_customerGroupCollection;

  public function __construct(
  \Magento\Customer\Model\Session $customerSession,
  \Magento\Customer\Model\Group $customerGroupCollection,
  \Magento\Framework\View\Element\Template\Context $context)
  {

    $this->_customerSession = $customerSession;
    $this->_customerGroupCollection = $customerGroupCollection;
    parent::__construct($context);
  }

    public function getCouponCodes()
    {

        $currentGroupId = $this->_customerSession->getCustomer()->getGroupId(); //Get customer group Id , you have already this so directly get name
        $collection = $this->_customerGroupCollection->load($currentGroupId);

        return $collection->getCustomerGroupCode();//Get group name

    }


texts: Magento 2 How to Make 3rd party API request?

texts:
I am trying to make a request to a third party webservice then using the response I would like to save the data/order in Magento 2 using the webApi

My approach so far hasn't worked as Magento cannot find the class I am trying to autoload from the vendor folder:

Here is what I have so far:

In my webapi.xml file I've declared the classes and method to use for the request I want to make

<route method="GET" url="/V1/namespace-module/orders">
    <service class="Namespace\Module\Api\OrdersManagementInterface" method="createOrders"/>
    <resources>
        <resource ref="anonymous"/>
    </resources>
</route>

Then in the OrdersManagementInterface class

namespace Namespace\Module\Api;

use Third\Party\Library\Client\ShopApiClient;
use Third\Party\Library\Request\Order\Get\Request;

interface OrdersManagementInterface
{

    /**
     * GET for Orders api
     * @param array|Request $param
     * @param ShopApiClient $shopApiClient
     * @return array
     */

    public function createOrders(
        ShopApiClient $shopApiClient,
        Request $param
    );

    /**
     * PUT for Orders api
     * @param string $param
     * @return string
     */

    public function putOrders($param);
}

What I would like to do is call the third party service the save the response using the webapi but when I try to run the code using curl

/index.php/rest/V1/namespace-module/orders I get an error saying
Class Third\Party\Library\Client\ShopApiClient does not exist

Even though it is in the vendor folder - can anyone help?


texts: How to get order id and other details of order for given event observer

texts:
How to get order id and other details of order for sales_order_payment_cancel event observer. i know how to get them for checkout_onepage_controller_success_action. But that method is not working in it. And showing this error.

Fatal error: Call to a member function getId() on a non-object in /home/orderitonline/public_html/includes/src/Barcatsia_Smsntf_Model_Observer.php on line 108

<sales_order_payment_cancel>
                <observers>
                    <Barcatsia_Smsntf_Model_Observer_cancelOrder>
                        <type>singleton</type>
                        <class>Barcatsia_Smsntf_Model_Observer</class>
                        <method>smsntf_cancel_order</method>
                    </Barcatsia_Smsntf_Model_Observer_cancelOrder>
                </observers>
           </sales_order_payment_cancel>

-

public function smsntf_cancel_order($observer){

        $order = $observer->getEvent()->getOrder();
        $orderIds = $order->getId();

        if(Mage::getStoreConfig

('testsection/cancel_order/Smsntf_module_activation')){

        $layout = Mage::app()->getLayout();

            $order     = Mage::getModel('sales/order')->load($orderIds);

        $message_for_send = Mage::getStoreConfig

('testsection/cancel_order/Smsntf_text_field_msg');
        $http_url = Mage::getStoreConfig

('testsection/cancel_order/Smsntf_text_field_api_calling_url');
        $arr_params = array('Smsntf_text_field_authkey', 'Smsntf_text_field_mobile',

'Smsntf_text_field_senderid', 'Smsntf_text_field_routeid', 'Smsntf_text_field_additional',

'Smsntf_text_field_additional', 'Smsntf_text_field_additional1',

'Smsntf_text_field_additional2', 'Smsntf_text_field_additional3',

'Smsntf_text_field_additional4');

        //replaceing %O% with Order Number
        $message_for_send = str_replace('%O%',100000000+intval($orderIds[0]),

$message_for_send);

        //replaceing %N% with Mobile Number
        $message_for_send = str_replace('%N%',$order->getdata

('customer_firstname'),$message_for_send);

        //replaceing %A% with Grand Total
        $message_for_send = str_replace('%A%',$order->getdata('grand_total'),

$message_for_send);

        $http_url .='?'. Mage::getStoreConfig

('testsection/cancel_order/Smsntf_text_field_Msg_prm').'='.urlencode($message_for_send);
        for($a=0; $a<sizeof($arr_params); $a++){
            if(trim(Mage::getStoreConfig('testsection/cancel_order/'.

$arr_params[$a]))!=''){
                if(trim($arr_params[$a])!='Smsntf_text_field_mobile')
                    $http_url .= '&'.Mage::getStoreConfig

('testsection/cancel_order/'.$arr_params[$a]);
                else
                    $http_url .= '&'.Mage::getStoreConfig

('testsection/cancel_order/'.$arr_params[$a]).'='.$order->getBillingAddress()->getData

('telephone');
            }
        }

        //printing system->configuration inputs value
        //      echo Mage::getStoreConfig

('testsection/cancel_order/active');
                $this->send_sms($http_url);

        }else{
            return false;
        }
    }


texts: Magento 2 - get Current Country Code in Cart Page

texts: I want to Fetch Current Country Code in Cart Page Section (js)


texts:
I set a layout for a category(parent) and then I want to set this layout for all the sub category(child), in addition I want to set a particulary layout for all product of this categories.
For the first (parent) category I set:

-anchor
-2 column
-layout:

<reference name="category.products">
    <action method="setTemplate"><template>catalog/category/bacheca.phtml</template></action>
</reference>
<reference name="product_list">
     <action method="setTemplate">
         <template>catalog/product/bacheca-list.phtml</template>
     </action>
</reference>
<reference name="product.info">
     <action method="setTemplate">
         <template>catalog/product/confronta-view.phtml</template>
     </action>
<block type="catalog/product_view_media" name="product.info.media" as="media" template="/catalog/product/view/media_bacheca.phtml" />
</reference>

for child category I set get design from parent, it is all perfect but I need to set 1column on product view, how can I do this?


texts: Save custom Customer attribute in observer using customer session Magento 2

texts:
I am working in Magento2.1 and created a custom module which changes the customer's group id and now i want to display the date when the customer's id changed in admin customer listing So i have created a custom attribute and want to save the date when the customer's id changed in that attribute. Below is my observer file code

   <?php
    namespace vendor\module\Observer;
    use Magento\Framework\Event\ObserverInterface;

    class customeramount implements \Magento\Framework\Event\ObserverInterface
    {
     public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig )
        {
         $this->_scopeConfig = $scopeConfig;
        }
    public function execute(\Magento\Framework\Event\Observer $observer)
      {
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
         $customerSession = $objectManager->create('Magento\Customer\Model\Session');

     if($customerSession->isLoggedIn())
     {
       $customer_id = $customerSession->getCustomer()->getId();
       $initial_group_id = $customerSession->getCustomer()->getId();
       $customer_group =  $this->decide_group_id($total,
        $customer_group, $quantity);
       if ($initial_group_id != $customer_group){
          $customerSession->setMemebrCustomAttr(date('d/m/Y'));
          }
    }
  }

}
?>

"decide_group_id" is a custom function which gives the "customer group id" depending on desired conditions.

Please guide me.


texts: How Do I Locate the Order Confirmation Email Item Renderer?

texts:
I'm having difficulty updating the order confirmation emails that our site is sending. I can find and modify the template in the admin interface and I can find the corresponding items.phtml file in on the server, but I can't seem to figure out where the individual items in the order are being rendered.

The items.phtml file contains the line:

$this->getItemHtml($_item)

which, as I understand things, must be calling a function to render the item's HTML for display. I've looked everywhere I can think of, but none of the files I try are resulting in any changes in the resulting emails.

Location of the aformentioned items.phtml file:

app/design/frontend/base/default/template/email/order/items.phtml

A Few of the Files I've tried:

app/design/frontend/base/default/template/email/order/items/order/default.phtml

app/design/frontend/default/myCompany/template/email/order/items/order/default.phtml

app/design/frontend/base/default/template/sales/order/items/renderer/default.phtml

app/design/frontend/default/myCompany/template/sales/order/items/renderer/default.phtml


texts:
I use this for displaying a contact form on the website:

{{block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml"}}

But there I would like to edit this form for different purposes and have multiple templates that I can use on different pages. When copying the module-contact/view/templates/form.php to a new form2.php and changing the code according to  {{block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form2.phtml"}}, it does not display on the page. Do you know why?

Thanks,
Valentin


texts: Multiselect attribute in back-end should show as dropdown in front-end

texts:
Okay , so I want something like this

and in the back-end I want to have the attribute(Marime -- size) showing as multi-select when adding/editing an product.

How can I make this work? I'm using magento 1.9.3.


texts: How to override Add to cart functionality in Magento 2.2 using custom extension?


texts:
When I try to update a product nothing happens and I got the following messages in logs:

2019-05-16T07:19:30+00:00 ERR (3): Warning: array_key_exists() expects parameter 2 to be array, null given  in /home/mywebsite/public_html/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php on line 507
2019-05-16T07:19:30+00:00 ERR (3): Recoverable Error: Argument 1 passed to Varien_Object::addData() must be of the type array, null given, called in /home/mywebsite/public_html/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php on line 513 and defined  in /home/mywebsite/public_html/lib/Varien/Object.php on line 243
2019-05-16T07:19:30+00:00 ERR (3): Warning: Invalid argument supplied for foreach()  in /home/mywebsite/public_html/lib/Varien/Object.php on line 245
2019-05-16T07:19:31+00:00 ERR (3): Strict Notice: Declaration of PushAlert_WebPush_Codeblock_Addblock::getData() should be compatible with Varien_Object::getData($key = '', $index = NULL)  in /home/mywebsite/public_html/app/code/local/Pushalert/WebPush/Codeblock/Addblock.php on line 209

And the browser console gives the error (403 Forbidden):

POST
https://mywebsite.com/index.php/admin/catalog_product/validate/id/5531/key/5123ac4d9bd8d537002640b4716398ee/?isAjax=true 403 (Forbidden)
request @ prototype.js:1530

I have tried to clear and disable the cache and the compilation with no result.

What do you think is the problem?


texts: Cannot export customer list in Magento 2

texts:
I was trying to export a customer list to a CSV file in Magento 2 (2.2.7).

But every time I try it comes up with a 500 error regardless of how many customers are included in the export.

Exporting sales works fine so it's not an error with exporting generally.
I've checked the developer console and it comes up with a js error.

Looking in the logs I also found the following error message:

  GET
  /myadmin/mui/export/gridToCsv/key/a07f4aed6c1179773233c13c4e984264d2309de49d34d35fe8580a8c42ca54cb/?filters%5Bplaceholder%5D=true&filters%5Bcreated_at%5D%5Bfrom%5D=02%2F01%2F2019&filters%5Bcreated_at%5D%5Bto%5D=02%2F07%2F2019&search=&namespace=customer_listing&selected=false
  HTTP/1.0

I'm not very experienced with Magento so I'm not sure what is causing this error. I'd appreciate some help to resolve this situation please.


texts: How to add layered navigation in Magento 2 on Top After Menu

texts: I tried to move layered navigation from left-side to top of the products.But Nothing displays When I changed the page layout from 2 column layout to 1 column layout then it shows only product list.


texts: Store View Switch Stopped Working After Magento 2.2 Upgrade

texts:
Since I have upgraded my website to Magento 2.2.0 (from 2.1.9), the store view switch stopped working on all the pages save for the homepage and the contact page.

I have 2 store views for 2 languages, and whenever I am on a page and I try to switch to the other language version of that page, I get a 404.

How to make this switcher work again?


texts: Magento get product collection via custom observer

texts:
I have a custom observer in Magento 1.8.1.0 that is called on Product view page when current product having any upsell products. I have verified (using Mage::log()) that the observer is working, however when I try the following:

public function updateUpsells(Varien_Event_Observer $oObserver)
{
    $iCurrentCategory = Mage::registry('current_category')->getId();
    $oUpsellCollection = Mage::getModel('catalog/product')->getUpSellProductCollection();
    foreach ($oUpsellCollection->getItems() as $key => $oUpsellProduct) {
        $aCategoriesIds = $oUpsellProduct->getCategoryIds();
        if (!in_array($iCurrentCategory, $aCategoriesIds)) {
            $oUpsellCollection->removeItemByKey($key);
        }
    }
}

On echo $oUpsellCollection; i got nothing returned ?

Is anyone know how to get upsell products collection ? Is this a proper way to do it ?


texts: setCustomPrice is reset in checkout process

texts:
I want to add a product to a cart and change its price to 0.

Currently I have :

$request = new Varien_Object([
    'qty' => 1,
]);
$cart->getQuote()
     ->addProductAdvanced(Mage::getModel('catalog/product')
     ->load($productId), $request)
     ->setCustomPrice(0)
     ->setOriginalCustomPrice(0);

That work, but in the DB, I have only the product, not the linked configurable (and I need it). So I try the same thing with the configurable :

$request = new Varien_Object([
    'qty' => 1,
    'super_attribute' => array(
        $sizeAttributeId => $sizeValue,
        $priceAttributeId => 0,
    )
]);
$cart->getQuote()
     ->addProductAdvanced(Mage::getModel('catalog/product')
     ->load($configurableProductId), $request)
     ->setCustomPrice(0)
     ->setOriginalCustomPrice(0);

Now, that work too : when I go on the cart, I have my product with 0 in price (and if I valid the order, I have my configurable in DB). But then, if a go in the checkout process, my price is reset to the original price... Someone now why ?
May be I did something bad ?


texts: LESS w/ Grunt - Solutions For M2's Terrible LESS Workflow?

texts:
M2 has a grunt / LESS workflow that allows you to automatically compile and view your changes in the browser. However, I can rarely get the live reload to work with the Chrome extension, and when it does work (which is super rare) it takes soooo long to compile. Has anyone out there found a more efficient way to write LESS for M2? Is there a way to use Gulp, while still utilizing M2's fallback system and variables? Is there a trick to speeding up Grunt's compilation and ensuring live reload works?

Magento Version: 2.1.7
Dev Environment: Vagrant / VM,
Ubuntu, php 5.6
Client Side Compile: On


texts:
We have a single product with single price of 365 EUR and the store is located in EU. No matter where the customer is located, the price must always be 365 EUR and VAT is to be calculated from that total. Shipping is free.

I set the following options:

set Tax Zones with all EU countries and their VAT and then a single
entry for "non-EU" countries with 0% VAT
set single Tax Rule that is applied to the product
enabled "cross border trade"
tax calculation based on "shipping address"
have set default country destination (and have set store's location)
set "including tax" to: catalog prices, shipping prices, display product prices in catalog, display shipping prices, display prices, display subtotal, display shipping amount
set "yes" to: include tax in order total, display full tax summary

Problem is that when viewing cart, product price is correctly shown as 365.00, but subtotal and total is shown as 301.65 which is wrong, total should always be 365.00 and VAT should be calculated from that total.

How to set Magento to always show desired price? By now I read a lot about this topic and latter also changed all the settings at random, reindexed and cleared cache countless times and still no joy.

Examples:

Netherlands:
VAT 21%: 63.35
Total: 365.00

Germany:
VAT 19%: 69.35
Total: 365.00

Non-EU:
VAT 0%: 0.00
Total: 365.00

As I pointed out, total must always be 365.00 and it must show that everywhere but VAT also needs to be calculated from total and shown appropriately. At the moment, total is shown as 301.65, which is wrong.


texts: Magento 2.3.2 sends me to an empty cart instead of thank you page after the payment

texts: I'm using Magento 2.3.2, and I noticed that I get sent to an empty cart page after I do the payment. The money are taken and the order gets done, only thing, I want it to get sent to the thank you page, and not an empty cart..


texts: Magento2: Create toggle button yes/no in admin product page

texts:
I want to create a toggle button yes/no in the product or category admin side page. also eager to know its description of flow and binding process. I followed many tutorials but don't get the exact solution that I need.
 like the below images.