texts: Upgrade magento 1.9.0.1 to latest version - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.status'

texts:
I know what you are thinking, another topic with the same problem. You should disable flag catalog, delete cache and re-index all. Well that's the problem, I did all of that but I keep on getting this error. Anybody? please

   SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.status' in 'where clause', query was: SELECT MAX(e.min_price -(e.min_price/(1+(CASE e.tax_class_id WHEN 1 THEN       0.2100 WHEN 2 THEN       0.0600 WHEN 4 THEN       0.2100  ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN       0.2100 WHEN 2 THEN       0.0600 WHEN 4 THEN       0.2100  ELSE 0 END)+((e.min_price-(e.min_price/(1+(CASE e.tax_class_id WHEN 1 THEN       0.2100 WHEN 2 THEN       0.0600 WHEN 4 THEN       0.2100  ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN       0.2100 WHEN 2 THEN       0.0600 WHEN 4 THEN       0.2100  ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN       0.2100 WHEN 2 THEN       0.0600 WHEN 4 THEN       0.2100  ELSE 0 END) ) AS m_max_price FROM `catalog_product_index_price` AS `e`

    INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=5 AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '49'
    LEFT JOIN `cataloginventory_stock_status` AS `cisi` ON (cisi.product_id=e.entity_id) AND (cisi.website_id = '1') WHERE (e.status = 1) AND ( e.website_id = '1' ) AND ( e.customer_group_id = 0) AND (e.min_price -(e.min_price/(1+(CASE e.tax_class_id WHEN 1 THEN       0.2100 WHEN 2 THEN       0.0600 WHEN 4 THEN       0.2100  ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN       0.2100 WHEN 2 THEN       0.0600 WHEN 4 THEN       0.2100  ELSE 0 END)+((e.min_price-(e.min_price/(1+(CASE e.tax_class_id WHEN 1 THEN       0.2100 WHEN 2 THEN       0.0600 WHEN 4 THEN       0.2100  ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN       0.2100 WHEN 2 THEN       0.0600 WHEN 4 THEN       0.2100  ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN       0.2100 WHEN 2 THEN       0.0600 WHEN 4 THEN       0.2100  ELSE 0 END)  IS NOT NULL) ORDER BY `m_max_price` DESC


texts: SQLSTATE[HY000] [1045] Access denied for user...after a restore; How to update the password in local.xml?

texts:
Magento 1.9.1
Porto theme

We were hacked, files deleted:

I asked the company to do a restore from the most recent full Cpanel backup but they said it was missing files.

I uploaded 5 other full Cpanel updates but they still weren't able to do the restore and make the site running.

It currently gives the following Error:

There has been an error processing your request
SQLSTATE[HY000] [1045] Access denied for user 'ourSITE_ourSITE'@'localhost' (using password: YES)

Trace:
#0 /home/ourSITE/public_html/lib/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /home/ourSITE/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(320): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /home/ourSITE/public_html/lib/Zend/Db/Adapter/Abstract.php(460): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 /home/ourSITE/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 /home/ourSITE/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 /home/ourSITE/public_html/app/code/core/Mage/Core/Model/Resource.php(179): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 /home/ourSITE/public_html/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#7 /home/ourSITE/public_html/app/code/local/Amasty/Fpc/Model/Fpc/Front.php(984): Mage_Core_Model_Resource->getConnection('core_read')
#8 /home/ourSITE/public_html/app/code/local/Amasty/Fpc/Model/Fpc/Front.php(107): Amasty_Fpc_Model_Fpc_Front->getDbConfig('web/url/use_sto...')
#9 /home/ourSITE/public_html/app/code/core/Mage/Core/Model/Cache.php(703): Amasty_Fpc_Model_Fpc_Front->__construct()
#10 /home/ourSITE/public_html/app/code/core/Mage/Core/Model/Cache.php(685): Mage_Core_Model_Cache->_getProcessor('Amasty_Fpc_Mode...')
#11 /home/ourSITE/public_html/app/code/core/Mage/Core/Model/App.php(340): Mage_Core_Model_Cache->processRequest()
#12 /home/ourSITE/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#13 /home/ourSITE/public_html/index.php(87): Mage::run('', 'store')
#14 {main}

Error log record number: 395790507641

I found this:

SQLSTATE[28000] [1045] Access denied for user 'balmain'@'localhost' (using password: YES)

When I locate the password in that file - it seems encoded? It shows something like: 34PV-(RF1h] Is that encoded? How can I put my password in there? Or what else can I try to make the site work?


texts: How to delete Billing Address, Shipping method at Checkout and how to delete Estimate Charges & Taxes  in cart section in magento 1.9 ?


texts:
I am getting product options by using below code.
$customOptions = $objectManager->get('Magento\Catalog\Model\Product\Option')->getProductOptionCollection($product);

Now I want to sort them in Desc order so the last inserted will render first.
Is there anyway to do the same.


texts: 503 Backend fetch failed after install an extension

texts:
I downloaded an extension from the magento markert and when I installed this extension the magento stopped working.I dont see any maintenance.flag so this is not the problem, some idea please?

I have tried everything that has occurred to me..

Thanks you so much!


texts:
I would like to ask you about translation Magento. I have translation to Polish but in version 1.9 during registration customer processs there is a text:

What's this?
Checking "Remember Me" will let you access your shopping cart on this computer when you are logged out

I have inline frontend translation turned on but this can't be translated. How can I do it? And where and how to find some text to translation?


texts: Connect Magento to Business Management Software via soap

texts:
I am looking to link Magento to our in-house Business Management Software (Inventory, Financials, Customer Accounts etc). I would like both systems to talk to each other. I know our Business Management Software has a Soap service that allows for this type of integration. I need our system to update after an order has been placed on Magento. I would need it to the customer account (if it's a new customer), create an order and post a payment (receipt) to the customer's account.

I don't really think it would be important to do it after every order but could probably set up a cron to check for new orders every 15/30 minutes and do it then?

How difficult would it be to achieve this? Would it be expensive?


texts: apply filter without join on custom column in sales order grid in magento 2

texts:
i have custom column in sales order grid and want to apply filter on this .

When i apply filter then generate log unknown column my_custom_column is not exist

My Custom Column is not exits in any table of the column .

my code is :

view\adminhtml\ui_component\sales_order_grid.xml

 <?xml version="1.0" encoding="UTF-8"?>
    <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
        <columns name="sales_order_columns">
          <column name="my_custom_column" class="Vendor\Module\Ui\Component\Listing\Column\CustomerDetail">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
                    <item name="editor" xsi:type="array">
                        <item name="editorType" xsi:type="string">text</item>
                        <item name="validation" xsi:type="array">
                            <item name="required-entry" xsi:type="boolean">true</item>
                        </item>
                    </item>
                    <item name="sortable" xsi:type="boolean">false</item>
                    <item name="sortOrder" xsi:type="number">3</item>
                    <item name="label" xsi:type="string" translate="true">Customer Detail</item>
                </item>
            </argument>
          </column>
        </columns>
    </listing>

Vendor\Module\Ui\Component\Listing\Column\CustomerDetail.php

<?php

namespace Vendor\Module\Ui\Component\Listing\Column;

use Magento\Ui\Component\Listing\Columns\Column;

class CustomerDetail extends Column
{
    /**
     * @param array $dataSource
     * @return array
     */
    public function prepareDataSource(array $dataSource)
    {
        $groupsName=array(
            '0'=>'NOT LOGGED IN',
            '1'=>'General',
            '2'=>'Wholesale',
            '3'=>'Retailer',
            '999'=>'Seller'
        );
        if (isset($dataSource['data']['items'])) {
            foreach ($dataSource['data']['items'] as &$items)  {
                $items['my_custom_column']='Customer Name : ' .$items['customer_name'].'

Email :' .$items['customer_email'].'

Group :' .$groupsName[$items['customer_group']];
            }
        }
        return $dataSource;
    }
}

It work good But i want to apply filter own my custom column that is not exist in any table column .


texts: Magento 2 : Wrong Count of Shop By on Search Result Page If there is Grouped Product

texts:
I've created a grouped product. And I created an attribute (multi select) that is in parent and children products attribute set.

This attribute has value selected only in children products. One option value is selected for each child product. The visibility of children products is Catalog (not Catalog, Search).

When I search the parent in frontend, if the count near my attribute option should be one (1), it counts two(2). Is it a bug or how should I configure my attribute to have correct count?

Additional information : it seems like it is related to visibility of the children products. If I put all of them to "Not visible individually", I have correct count; but if I put "Catalog" I have wrong count. However I do not choose "Search" or "Catalog, Search" in simple children product, so simple children products should not be included.


texts: restrict payment for loged in customer for specific products

texts: I have a category X that containe 2 subcategory and there are many products in those catgeory that are New so when a customer is not logged in i have to disable him to pay so how to dow that and what to override exactly. I am new in magento, if anyone have an idea please help me and thanks in advance


texts: Magento 2 - Customer Notifications don't disappear?

texts:
I'm running 2.0.7 production and I have a problem where by any notifications to customers remain on the site even when navigating to another page. For example adding to cart or adding an email to newsletter subscription generates the success message however the reappear on every page afterwards?

Anyone had this and know how to stop it?


texts: error "a:5:{i:0;s:71:Could not determine temp directory, please specify a cache_dir manually"

texts:
I have moved my magento files from local server to live server. The site is running correctly and admin side login is working correctly. But when I click any menu links like "System->Configuration", it shows the below error in var/report/ error file.

a:5:{i:0;s:71:"Could not determine temp directory, please specify a cache_dir manually";i:1;s:3902:"#0 /httpdocs/includes/src/__default.php(61923): Zend_Cache::throwException('Could not deter...'

I have specified var/tmp folder manually in lib/Zend/Cache/Backend.php like

if ($this->_isGoodTmpDir('\\temp')) {
            return '\\temp';
        }
    else{
        return 'var/tmp/';
    }

and

I have specified var/tmp path in lib/Zend/Cache/Backend/File.php like

'cache_dir' => 'var/tmp/',

And folder permission  of var folder is 777 and also created folder in root called 'tmp'. But Still I am facing the issue.

How can I fix this issue ? Any help appreciated.


texts: I have a Magento Webshop (CE 1.9) where I use a multi-select attribute. There seems to be a maximum number of multi-select options I can actually select in the product. I've read about a solution changing the backend_type from varchar to text. That works, but after that change the attribute is not showing on the layered navigation. Is there another solution?


texts: Hello World: Finally working but execute command visible on screen

texts:
I finally have the Hello World module working but the execute string is still visible even after I flushed cache and setup:uprade:

Everything I know of so far flushed and regenerated:

Thanks for any help, it's got to be something simple.


texts:
Hello I'm trying to fix this pixel in my success.phtml, can anybody help me so I can fill in the right value in TransactionID and TransactionAmount, the amount should be the subtotal.

<img src="https://ts.tradetracker.net/?cid=1XXXX&pid=2XXXX&tid={transactionID}&tam={transactionAmount}alt="" width="1" height="1" border="0" />

Thanks!


texts: How to identify a current subcategory (if any)

texts:
I've got the following piece of code

  $_helper = Mage::registry('current_category');
  $_categoryUrl = $_helper->getUrlKey();
  $_categoryId = $_helper->getId();
  $_subcategories = $_helper->getChildrenCategories();
  echo '<script>';
  echo 'var el = $(document.getElementById("'.$_categoryId.'"));';
  echo 'el.classList.add("active");';
  echo '</script>';

  $_categories = Mage::helper('catalog/category')->getStoreCategories();
  foreach($_categories as $_category) {
  $_subcategories = $_category->getChildrenCategories();
  foreach($_subcategories as $_subcategory){
   echo '<script>';
   echo 'var el = $(document.getElementById("'.$_subcategory->getParentCategory()->getId().'"));';
   echo 'el.classList.add("active");';
   echo '</script>';
  }
 }

What it does is to look for categories and their subcategories, in order to apply a script. The result is that the script -in the first part- is applied to the current category without checking if this is is a parent category or a child category. In the second part, the script gets applied to all subcategories which is not want I'd want.

I just want that Magento identifies the current category and then make a check:

If the current category is a parent category, then the script should apply the script only to it, adding the class 'active' to the element of that category.
If the current category is a child category, then the script should be applied only to that subcategory, adding the class 'active' to the element of its parent category.

Code so far (v2):

<?php
        /** @var \Mage_Catalog_Model_Category $category */
    $category = Mage::registry('current_category');
    $isChild = $category->getLevel() > 2;
    $isParent = (bool)$category->getChildrenCategories()->getSize();

    $categoryId = null;
    if($isChild) {
        $categoryId = $category->getParentCategory()->getId();
    } elseif($isParent) {
        $categoryId = $category->getId();
    }
?>

<?php if($categoryId): ?>
<script>
<?php
   echo 'if (( “#dropdown-menu” ).is( “.active” )) { ';
   echo 'var el = document.getElementById("'.$categoryId.'");';
   echo 'el.classList.add("active");';
   echo '}';
?>
</script>
<?php endif; ?>

The javascript does not seem to work, it is not to see in the browser's console when inspection the category page.


texts:
I am using Magento 2.2.8 and my server's error.log is full of below errors

  PHP Fatal error:  Method Magento\Framework\Phrase::__toString() must
  not throw an exception, caught Error: Class
  'Magento\Config\Setup\ConfigOptionsList' not found in
  /magento_setup/vendor/magento/framework/Phrase/__.php on line 0

AND

  PHP Fatal error:  Method Magento\Framework\Phrase::__toString() must
  not throw an exception,
      caught Error: Class 'Magento\Translation\Model\Inline\Config' not found in
  /magento_setup/vendor/magento/framework/Phrase/__.php
  on line 0

I have checked many related answers and blogs but didn't found any way to trace it.

Does anyone had faced such errors or have any idea how to trace it?


texts: When new address is selected billing address form is not showing in checkout magento 2.3.2

texts: When unchecking checkbox  My billing and shipping address are the same, if new address is selected the billing address form to add new billing address is not showing up. Anybody know its reason? Attaching image.


texts: Credit Card Hijack malicious javascript code continuously insert by someone in my site under HTML Head -> Miscellaneous Scripts

texts:
Someone continuously  inserts Credit Card Hijack malicious javascript into to my site under

  system->configuration->General->Design->HTML Head->Miscellaneous Scripts.

Note: I changed every thing like admin password, FTP, MAGMI everything.

But Still, insert Credit Card Hijack malicious javascript code.

How can I prevent my site from any other attack?

  Is any Security extensions available?


texts: How to edit/remove static blocks, cannot find anywhere

texts:
I have a lot of useless static blocks on my page that I would like to get rid of, the only thing is, I cannot find them in the normal CMS> Static Blocks or Configuration settings.

I would like to put more useful info in these boxes and get rid of some altogether.

Do I need to edit the template? if so, how and where do I find it?


texts: Admin Notifications in backend should not appear again after it been removed or marked as read in version 1.7.0.2

texts:
I am using following Magento version
Magento 1.7.0.2

I am getting an issue in Admin Notification. Every time the client logins in admin, Admin Notifications in back end appear again after it been removed or marked as read.

After research, I have found that this issue has already been fixed in version 1.7.0.0.I have seen this fixes on this URL that is :

https://github.com/SergeyCherepanov/Magento/commit/99c51a74bc29509eccc556a5160786bfc2f27e72#diff-f0bf4d87e8cc9681620b8a4632ebe403L61

As, I am using updated version than it should already be fixed but it’s not. So, please let me know what possible solution should be there to resolve this.

Thanks in advance!


texts: How to add the tier price in quantity range

texts:
I am using Magento 2.3

I have created one simple product and added tier price.I want to set the tier price in quantity range.ex .1-5 qty price is 6$, 6-11 qty price is 4$.

Can anyone guide me how can I do this.


texts: I see that in magento 2 form_key is set in cookies. Is this cookie present in every page?


texts: Magento 2.3 : issue in file uploading in backend

texts:
[2019-03-15 04:50:13] main.CRITICAL: Warning: count(): Parameter must
  be an array or an object that implements Countable in
  D:\xampp72\htdocs\mage230\vendor\magento\framework\File\Uploader.php
  on line 552 {"exception":"[object] (Exception(code: 0): Warning:
  count(): Parameter must be an array or an object that implements
  Countable in
  D:\xampp72\htdocs\mage230\vendor\magento\framework\File\Uploader.php
  on line 552 at
  D:\xampp72\htdocs\mage230\vendor\magento\framework\App\ErrorHandler.php:61)"}
  []

if (is_array($file) && count($file) > 0 && count($file[0]) > 0 && count($file1) > 0) {

Replace with

if (is_array($file) && count($file) > 0 && !empty($file[0]) && (isset($file1) && !empty($file1))) {


texts: Main Image not updating when swatch is selected Magento 2.0.8

texts:
Having an issue on Magento 2.0.8 where I have a configurable product and simple products associated with it.

The simple product have images and on the configurable product there are swatches shown for each one of the simple products. But when you select one the main image does not change.

I have checked the settings and everything looks okay. Has anyone else had this issue?


texts: how to expand the view "order" in magento backend?

texts:
we use Magento 1.7.0.2
i wish to expand the list "orders"(Bestellungen) in the backend.
how can i let me show the postal code from the customers there?


texts:
We are using Magento 1.9.0.1 and see that Magento catalog/seo_sitemap/product/ empty is completely empty. Whilst catalog/seo_sitemap/category/ is working fine.

Is there a known problem with seo_sitemap/product? [we sell configurable products with underlying simple products with sizes: so ideally I would expect a list of all configurable products that are active, visible and in stock]


texts: create Module for the Product Out of stock notification

texts:
with refered (https://github.com/Apptha/Out-Of-Stock-Notification)
but now problem is my entered data on product page not fetch in database no any entry in database table Plz give me some solution
I get particular solution is fetched Product_id,Product_name,Email,etc.. in database magento 1.9.2.4


texts: Magento 2 - Use of the Media Image Uploader

texts:
I created a new Block that renders a button to upload an image via Magento's Mediabrowserutility. This Module is also used for uploading images to a CMS Page. The Block is used to add Image Uploads to a Widget.

The Block Code is the following:

/**
 * Prepare chooser element HTML
 *
 * @param Element $element
 * @return Element
 */
public function prepareElementHtml(Element $element)
{
    $config = $this->_getData('config');
    $sourceUrl = $this->getUrl('cms/wysiwyg_images/index',
        ['target_element_id' => $element->getId(), 'type' => 'file']);

    /** @var \Magento\Backend\Block\Widget\Button $chooser */
    $chooser = $this->getLayout()->createBlock('Magento\Backend\Block\Widget\Button')
                    ->setType('button')
                    ->setClass('btn-chooser')
                    ->setLabel($config['button']['open'])
                    ->setOnClick('MediabrowserUtility.openDialog(\'' . $sourceUrl . '\', 0, 0, "MediaBrowser", {})')
                    ->setDisabled($element->getReadonly());

    /** @var \Magento\Framework\Data\Form\Element\Text $input */
    $input = $this->_elementFactory->create("text", ['data' => $element->getData()]);
    $input->setId($element->getId());
    $input->setForm($element->getForm());
    $input->setClass("widget-option input-text admin__control-text");
    if ($element->getRequired()) {
        $input->addClass('required-entry');
    }

    $element->setData('after_element_html', $input->getElementHtml()
        . $chooser->toHtml() . "<script>require(['mage/adminhtml/browser']);</script>");

    return $element;
}

As you see, the onClick Event triggers the MediaBrowser. I am able to use the MediaBrowser as expected, but as soon as I save the whole widget, the URLs from the Image refer to an image that is not reachable in the frontend, because an admin session is required.

This is what the URLs look like:

http://example.com/adm_folder/cms/wysiwyg/directive/___directive/e3ttZWRpYSB1cmw9Ind5c2l3eWcvanVsYm8vanVsYm8taG9tZS1zbGlkZS10ZXN0LmpwZyJ9fQ,,/key/b6dbd3aad4f2f5657f0c96d1ec948c30e543d5bd488274890670a408605b669c/


texts: Reindexing Magento 2 causes products to be missing on the frontend (not the backend)

texts:
We have added a sum of 8500 products to the Magento 2 store we are developing, with up to 5100 products in a single parent category.

The expected result would (of course) be that they all show up, granted, when their status is set to enabled.

The actual result is that at least 75% of the products do not show up on the front-end. They are however visible on the backend.

When I select all the products and set the status to disabled and afterwards back to enabled; all the products show up perfectly fine.

But only until a re-indexation is run, then it reverts back to showing only about 25% of the products in the categories at the front-end.

We have tried setting the "Use Flat Catalog Category/Product" to "No", to try and see if that even made a difference at all for the re-indexation issue. Which it didn't.

I have found a similar command to the following, which supposedly could solve the re-indexation problem, I have tried to set the memory limit to higher and lower numbers, to no avail.

  php -dmemory_limit=4096M bin/magento indexer:reindex

Magento ver. 2.1.5


texts: Add new option for existing bundle products

texts:
Can't find an example for adding new Bundle Items to existing Bundle products.
I'm looking for an implementation like Upgrade Script or something similar, but I found an implementation for magento 1 only.
Programatically add a new bundled item to an existing bundled product?
Tell me how you can implement this


texts:
I turned on Log Cleaning (under System -> Configuration -> System -> Log Cleaning). This is my configuration:

I set a Scheduled Task (I'm on Windows) to send a request to cron.php every 5 minutes. But nothing happens. I checked cron_schedule table and it didn't scheduled either. I also checked log_quote (and other log tables) and nothing cleaned.

What should I do to make it work?


texts:
We need to create a custom CSV Magento 2 Export. In particular, we need to add a column (or an attribute in additional_attributes column) that indicate the attribute’s position inside the category it is inserted.

Is there a way to do this?

Thanks


texts: Purpose of Sales->Sales->Invoice and Packing Slip Design->Logo for HTML Print View in Magento 2

texts:
What is the purpose of Sales -> Sales -> Invoice and Packing Slip Design -> Logo for HTML Print View in Magento 2

if the purpose is to change my account order print logo then why it's not updating on frontend my account order print.

I'm using Magento 2.1.2.


texts:
i have used the below  magento 2 custom extension for creating admin grid. its working fine as of now but i am unable to edit inline, getting 500 internal error.

did u anyone face the issue while using this extension. please suggest me thanks

Reference Link-1

Reference Link-2

Screenshot:

http://prntscr.com/g3ue8o


texts: Magento2:How to add a custom button that sends few edit form fields via ajax to call to an API to populate its response in another field?

texts: How to implement a custom button in edit form page that takes few edit form values,sends to ajaxURL and populates some API response in another field on same page in magento2?


texts: unable to edit Static blocks and Cms Pages

texts:
I am not able to edit the static blocks, throws an error on click

Fatal error: Class 'Varien_Data_Collection_Filesystem' not found in public_html/app/code/core/Mage/Widget/Model/Widget/Config.php on line 85

When i click on CMS pages it showing like below image


texts: Can't find my custom attribute in product collection

texts:
In catalog/category/product in

foreach ($_productCollection as $_product)

I want to getMy attribute to do some condition but it doesnt work

<?php

if ($_product->getPromo()) {
    echo 'Ok';
}
?>

instead to do my own collection with the ->AddAttributeToFilter('Promo', 1) to avoid another foreach


texts:
Magento2 how I am supposed to override renderer.phtml of module swatches?
I have already tried Magento_Swatches::product/listing/renderer.phtml, but doesn't seem to be working?
Any advice will be appreciated.


texts:
I added custom check box field in checkout 1st step below Shipping Methods section.

how to check is checked or not when i click next button,so based on this I  can add custom fee in order totals.

when I click next button its calling rest api ShippingInformationManagement.

i think i need to override  saveAddressInformation method in ShippingInformationManagement class.

Please find below for more details.

https://github.com/sivajik34/Delivery-Signature-Magento2


texts: Product images not load PWA setup magento 2.3

texts:
I had done a PWA setup on my local machine.

I am facing product and category images issue.

Images path :

src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAFCAQAAADIpIVQAAAADklEQVR42mNkgAJGIhgAALQABsHyMOcAAAAASUVORK5CYII="

src="/img/resize/300?url=%2Fmedia%2Fcatalog%2Fproduct%2Fv%2Fs%2Fvsk12-la_main_3.jpg"


texts: What stage does magento exactly send the "email copy of invoice"?

texts:
I would like to know at what stage in the invoicing process of magento does it send the the invoice email that it sends when you click the "email copy of invoice "? and hit "submit invoice"?

I have heard mixed information, with some suggesting the email is sent before the creation of the invoice.

I believe that the email is sent once an invoice is created and saved in the database/model.

If anyone would be able to explain this to myself I would thoroughly appreciate it.


texts: Placed order showing test Shipping and Billing Address

texts:
Everything is working fine in the checkout. When an order is placed, instead of the customer Shipping and Billing Address, the order details show the test information instead of customers.

Appreciate feedback. Thank


texts: How can I add items in UrlRewrite table?

texts: I want to rewrite an URL via code and I read that I need to write in core_url_rewrite table. How can I do that?


texts: Best way to setup a page with a form (questionnaire) on Magento 1.9.1?

texts:
Magento 1.9.1
Porto theme

I need to setup a kind of "Create your own custom basket" page where I ask the customers a few questions about what they would like in their baskets, how many etc. and then Email them an estimate.

What is the best way to do this in Magento 1.9.1?

Would a simple HTML form work? Is there a Send.php program inside Magento? I have the Porto theme and it has a contact page which gets sent by Email (it has sort of form fields) but I cannot figure out how that works?

Any suggestions are greatly appreciated.


texts:
Getting pretty frustrated so figured I'd seek help.

I have tried following multiple tutorials on how to do this but none of them are working.

Running Magento 2.1.5.

I am simply trying to create a customer attribute. my Setup/UpgradeData.php script is as follows:

namespace Wildcard\CustomerMods\Setup;

use Magento\Customer\Model\Customer;
use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\UpgradeDataInterface;

class UpgradeData implements UpgradeDataInterface
{

    /**
     * Customer setup factory
     *
     * @var CustomerSetupFactory
     */
    private $customerSetupFactory;

    /**
     * Init
     *
     * @param CustomerSetupFactory $customerSetupFactory
     */
    public function __construct(CustomerSetupFactory $customerSetupFactory)
    {
        $this->customerSetupFactory = $customerSetupFactory;
    }

    /**
     * Installs DB schema for a module
     *
     * @param ModuleDataSetupInterface $setup
     * @param ModuleContextInterface   $context
     *
     * @return void
     */
    public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {

        $installer = $setup;
        $installer->startSetup();

        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

        $customerSetup->removeAttribute(Customer::ENTITY, "customer_payment_type");

        $customerSetup->addAttribute(Customer::ENTITY, "customer_payment_type", array(
            "type"     => "varchar",
            "backend"  => "",
            "label"    => "Payment Type",
            "input"    => "select",
            "source"   => 'Wildcard\CustomerMods\Model\Config\Source\Customer\PaymentTypeOptions',
            "visible"  => true,
            "required" => true,
            "default"  => "",
            "frontend" => "",
            "unique"   => false,
            "note"     => ""

        ));

        $my_attribute    = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, ' customer_payment_type');
        $used_in_forms[] = "adminhtml_customer";
        $used_in_forms[] = "customer_account_create";
        $used_in_forms[] = "customer_account_edit";
        $my_attribute->setData("used_in_forms", $used_in_forms)
                     ->setData("is_used_for_customer_segment", true)
                     ->setData("is_system", 0)
                     ->setData("is_user_defined", 0)
                     ->setData("is_visible", 1)
                     ->setData("sort_order", 100);
        $my_attribute->save();
        $installer->endSetup();
    }
}

I have tried increasing the version number in my module.xml. This is picked up in the setup_module table but it just refuses to create the attribute! I am looking in the admin area (new customer and edit customer) and in the eav_attribute table in the database. The attribute is not appearing in either.

Is there something wrong with the code above?

It would be great to see some debug info from Magento about this but there is nothing at all in the logs.

Please can someone help out with this? I'm just about pulling my hair out!


texts: Sign In - following upgrade from 2.3.0 to 2.3.1 - Fatal error: Uncaught Error: Cannot instantiate interface

texts:
If you Sign In to your account and then Sign Out again whilst on the Home page or Category Page you get the following error :-
Fatal error: Uncaught Error: Cannot instantiate interface Magento\Shipping\Model\CarrierFactoryInterface in /var/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116 Stack trace: #0

If you Sign In when on a product page the error occurs straight away.

This started after updating from v2.3.0 to v2.3.1

Initially on updating I had to disable several Magento modules that were causing the following error when running the command to Re-index

PHP Fatal error:  Uncaught Error: Cannot instantiate interface Magento\InventoryIndexer\Model\StockIndexTableNameResolverInterface in /var/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116 Stack trace: #0

I solved the reindex issue by disabling a number of modules in config.php

I am assuming my current Sign In issue is similar but I'm not sure what to disable.

I have tried the usual commands to Update and Compile with no result.

Does anyone know what modules could be related to the error - Cannot instantiate interface Magento\Shipping\Model\CarrierFactoryInterface?


texts: Cross border trade is not working and displays different prices

texts:
We have a magento 1.9.2.4 with only one currency (€), 2 websites, one store per website and 2 views in one store and one on the other, we have the cross border trade enabled.

If we set a price to 10€ it displays it correctly in all the countries with 21% tax, except one of them that have 20%, and others with 0% that displays wrong prices.

By default the price displayed is from a country with 21% tax, but when logged it displays the price by the shipping address of the customer. So it displays a different price depending on the customer address.

expected result:

country 1 (tax 21%) price: 10,00€ tax: 1,73€
country 2 (tax 20%) price: 10,00€ tax: 1,66€
country 3 (tax 00%) price: 10,00€ tax: 0,00€

actual result:

country 1 (tax 21%) price: 10,00€ tax: 1,73€
country 2 (tax 20%) price: 09,92€ tax: 1,65€
country 3 (tax 00%) price: 08,26€ tax: 0,00€

It is supposed that when cross border trade is enabled then it should display same price for all the countries (10€) and then calculate the tax for each of them (1,73€ for 21%, 1,66€ for 20% and 0€ for 0%).

In the menu system -> sales -> shipping settings -> origin is configured a 21% tax origin country.

Why is showing different price? maybe I'm missing some configuration? So despite being enabled, it seems cross border trade is not working at all.

In admin menu sales -> tax -> Manage Tax Zones & Rates there are the countries and the taxes configured:

In admin menu sales -> tax -> Manage Tax Rules we have two tax rules configured:

The main tax rule is:

Edit: I just made a brand new blank project with the same magento 1.9.2.4 for testing, created 2 products, 3 countries with 3 different taxes, 3 customers with addresses in the 3 countries, same tax rules, same configuration and everything work as expected. I still can't figure why the other project cross border trade is not working correctly, it uses the price without tax and then add the tax of the shipping country, instead of showing the same price always and change the tax by the shipping country.

Edit2: I just moved the database of the actual project to the brand new one. Now in the brand new one I see the correct prices. So I think that the issue should be on the price.phtml template, but I copied the original price.html to te real project and still the same wrong result. So the issue must be in another place.


texts:
In Magento 2.2.5, I am creating admin grid by following this tutorial(Using layout Block method. Not UI Component).

In that I have a add button. I can't remove it. I need to remove it and add a new button with custom url. How to achieve this.

Screenshot:


texts: Configuring the local.xml file to connect securely to an external MySQL?

texts:
I was wondering how one might go about setting the local.xml file (if it's even possible) for a Magento install to connect to a MySQL server over a secure connection.

I currently have my webserver and MySQL server hosted on different machines (in the Amazon Web Services cloud), and so I wanted to make sure that Magento communicates with the database over a secure connection.

Unfortunately so far I can't seem to find any workable answers for this, and considering how important security is for ecommerce sites, I would think this sort of configuration would be available in Magento out of the box.

I know from the command line you can invoke a mysql secure connection to Amazon with the following sort of example statement:

mysql -h myinstance.amazonaws.com --ssl_ca=rds-ssl-ca-cert.pem --ssl-verify-server-cert

Where rds-ssl-ca-cert.pem is a reference to the public key.

I guess I was thinking Magento must make a similar call using the local.xml file, and that there ought to be a way to similarly invoke the secure connection.


texts: How to composer-require Magento2 develop branch?

texts:
I am currently installing the Magento 2 modules via a

"require": {
    "magento/product-community-edition": "*"
},
"repositories": [
    {
        "type": "composer",
        "url": "http://packages.magento.com/"
    }
],

in my composer.json - but this gets only the latest beta releases.

I try changing the version from "*" to "dev-develop" but this version is not found.

Is there a way to composer-install the latest development branch of Magento 2?

Edit

I gave this one a try:

{   "minimum-stability": "dev",
      "require": {
          "magento/magento2ce": "dev-develop"
      },
      "repositories": [
          {
              "type": "vcs",
              "url": "https://github.com/magento/magento2.git"
          },
          {
              "type": "composer",
              "url": "http://packages.magento.com/"
          }
      ]
}

But I end up without an app/ folder and it could not create app/etc/vendor_path.php. So I manually create app/etc before composer.phar install. composer install now succeeds but the pub/ folder is missing... Might be the wrong approach.


texts:
I'm using two modules to manage in stock/out of stock info and configurable product options (custom swatches). And there is also Ajax AddtoCart extension.
There three work perfectly on product view page.
However, on homepage there is Ajax popup for configurable products which renders streamlined product view with product options and add to cart button.
I've managed stock extension by calling its js lib from AjaxCart layout xml and it work fine:

        <reference name="head" >
        ...
            <action method="addJs" ifconfig="ajaxcart/viewsetting/enableview"><script>stonepath/configurablestock/varien/configurable.js</script></action>
        ...
        </reference>

So then I've tried adding with head reference js and css for configurable swatches extension and they also load. The original xml of the module looks like this:

<layout>
<PRODUCT_TYPE_configurable>
    <reference name="head">
        <action method="addJs" ifconfig="easylife_switcher/settings/enabled">
            <js>easylife_switcher/event.simulate.js</js>
        </action>
        <action method="addJs" ifconfig="easylife_switcher/settings/enabled">
            <js>easylife_switcher/product.js</js>
        </action>
        <action method="addCss" ifconfig="easylife_switcher/settings/enabled">
            <css>css/easylife_switcher/styles.css</css>
        </action>
        <action method="removeItem" ifconfig="easylife_switcher/settings/enabled">
            <type>skin_js</type>
            <name>js/configurableswatches/product-media.js</name>
        </action>
        <action method="removeItem" ifconfig="easylife_switcher/settings/enabled">
            <type>skin_js</type>
            <name>js/configurableswatches/swatches-product.js</name>
        </action>
    </reference>
    <reference name="content">
        <block type="easylife_switcher/catalog_product_view_type_configurable_config" template="easylife_switcher/catalog/product/view/type/configurable/config.phtml" />
    </reference>
</PRODUCT_TYPE_configurable>

The last part bothers me:

  <reference name="content">
        <block type="easylife_switcher/catalog_product_view_type_configurable_config" template="easylife_switcher/catalog/product/view/type/configurable/config.phtml" />
    </reference>

I've tried calling this block from ajaxcart layout xml and from local.xml like this:

    <PRODUCT_TYPE_configurable>
    <reference name="content">
        <block type="easylife_switcher/catalog_product_view_type_configurable_config" template="easylife_switcher/catalog/product/view/type/configurable/config.phtml" />
    </reference>
</PRODUCT_TYPE_configurable>

Both times it's being completely ignored. Using debugger I can see  handle is not loaded at all on the homepage.
So how do I call it on the homepage? Or my logic is maybe wrong?
Sorry if this may be a trivial question. I'm starting with Magento, have read a lot of answers here with similar problems but wasn't able to figure it out.


texts: I have one custom module. I want when we split the database then tables related to the specific custom module should go to the sales DB(segregation). Can you please help me how can I do it? Thank you very much.


texts:
I am struggling to understand why the msrp attribute is unavailable in
~/template/catalog/product/price.phtml

I can access it fine from within product/view.phtml

I have defined a custom attribute for a product and have no problem accessing it with (for example):

$_product->getAttributeText('custom_attribute');

However:

$_product->getAttributeText('msrp');

and

 $_product->getMsrp();

both return null.

I would really appreciate figuring out how to

a) access this value but more importantly

b) know why some attributes seem to be available via standard getters, while others aren't

EDIT: So attribute is actually available in price.phtml when viewing single product pages, however in this case i'm calling a category list view.


texts:
Basically I am setting up a music store for a client and on my main nav at the top I want to have the category 'genre' so that it doesn't actually have its own page, but still links to all of the genres and their pages instead. If you look at the picture I have included it says 'view all genre' but I don't want that link or page to exist. I still want it in the nav so that it drops down to the genres though.

How would I go about doing this? thanks


texts: Magento 2.4: Uncaught TypeError: base is not a constructor

texts:
After Magento update to 2.4, I'm getting this "base is not a constructor" error which is causing other grids to unable load in the admin.
When I run the command:
->sudo chmod 777 -R Var/ pub/static/ generated
then cache flush error stopped showing but it starts showing again when I  navigate other admin pages.
Please suggest some solution. Any help will be appreciated.


texts: magento 2.3.5-p1 radio product option checkable.phtml not working

texts:
Any one please let me know which template is responsible for product radio option value, I found a phtml file in below location but any changes in this template is not working.
vendor/magento/module-catalog/view/base/templates/product/composite/fieldset/options/view/checkable.phtml


texts: regular Export on Magento 1.9.1 exporting custom options 12 times

texts:
Magento 1.9.1

We are exporting products from Magento 1.9.1 and importing them into Magento 1.9.4

When this regular export/import was done - I noticed that custom options showed up 12 times. I thought it was due to my multiple times of trying the import so I deleted all imported products and started again with a clean file. When the import finished, the product once again had the custom options 12 times on the front and back end. I then checked the original exported file and it is there 12 times!

What can be done to resolve this?


texts: How to overwrite category page url to some specific cms page url?

texts:
How to overwrite category page url to some specific cms page url  ?

I have category with shop.html
But i want to change or overwrite it on cms page i.e shop-cms.

Even i want to make sure site-map doesn't create the old url in site map.
instead it will be new url which is overwritten.

I tried Marketing->url rewrite but doesn't work.
I'm using magento 2.0.4


texts:
We upgraded from Magento 1 to Magento 2.3.  In M1 the search feature in the frontend could be quite broad, while the search in the backend (looking for a specific product to edit) was fairly narrow, (with the search taking place in each column where we entered the search term.
But in M2, in the backend, you can't search by column as you could in M1.  There's only a single search box - 1 size fits all.
The consequence is that in M2, if you have the frontend set to search for product name, product short description (for example), then on the backend, if you enter product name as your search, you get all of the products that also had that term in the frontend description - sometimes resulting in 400 products being listed instead of 2-10 or so.  We want that wider search on the frontend.  We want that more precise search on the backend.
The developer doesn't know how to do it.  Suggestions?


texts: Shopping Cart rule to apply fixed discount on different product

texts:
I want to add a shopping cart rule which gives the discount of 21 when there are specific five products in my cart.
Eg: Five products with SKU S01, S02, S03, S04, S05, all having different product price. When added into cart total is 81 and Discount should be 21. The user should get these products in 60.
is this possible?
Thanks in advance


texts: Changed base URL in Magento 1.7 and can't log in now

texts: I changed my base URL from a local IP address to a hostname. Magento loads everything fine but when I attempt to login to the admin section the page refreshes without an error. If I type in the wrong password then the page refreshes and displays invalid credentials message.


texts: Why order_ids is an array instead of single orderId in checkout success action observer

texts:
After placing an order I want observer success event.Can any one clarify following one.

Is there any possiblity multiple orders ?

$this->_eventManager->dispatch(
            'checkout_onepage_controller_success_action',
            ['order_ids' => [$session->getLastOrderId()]]
        );


texts: POST /V1/order/:order_id/invoices,it gives wrong response in magento-2.1?

texts:
Suppose I have two products in order,one is simple product and other is bundle product.When i generate first simple product invoice using item_id of simple product using this body:

{
  "capture": false,
  "items": [
    {"order_item_id": 1249,"qty": 1}
  ],
  "notify": false,
  "appendComment": false,
  "comment": {
    "extension_attributes": {},
    "comment": "string",
    "is_visible_on_front": 0
  },
  "arguments": {
    "extension_attributes": {}
  }
}

It show response about simple product information and also bundle parent_item id.What is issue?


texts: How to reuse Block Product Video in magento 2

texts:
From Product edit tab in backend. I would like want to re-use this block for custom extensions
block location vendor\magento\module-catalog\Block\Adminhtml\Product\Helper\Form\Gallery\Content.php
Which is the best way to re-use it ?

I already extend this but get error non-object call method getMediaAttributes
Anyone can tell me why it return null?


texts: header my account dropdown not showing magento2.1

texts:
I have been trying to add my account drop down menu in my magento website. I found that it is there in luma theme by default. But my base theme is magento/blank. My account links are displayed in a single line one by one, not as drop down. I have created app/design/frontend/vendor/theme/Magento_Customer/layout/default.xml and added the below code.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <attribute name="class" value="oothu-body-test"/>

    <referenceBlock name="header.links">
        <block class="Magento\Customer\Block\Account\Customer" name="customer" template="account/customer.phtml" before="-"/>
        <block class="Magento\Customer\Block\Account\AuthorizationLink" name="authorization-link-login" template="account/link/authorization.phtml"/>
    </referenceBlock>

    <block class="Magento\Theme\Block\Html\Header" name="header" as="header">
        <arguments>
            <argument name="show_part" xsi:type="string">welcome</argument>
        </arguments>
    </block>

    <move element="header" destination="header.links" before="-"/>
    <move element="register-link" destination="header.links"/>
    <move element="top.links" destination="customer"/>
    <move element="authorization-link" destination="top.links" after="-"/>

</body>

Suddenly my account links are disappeared. I checked the

app/design/frontend/vendor/theme/Magento_Customer/templates/account/customer.php

file and I found out this page is not calling. I had added some sample data to that page before <?php if($block->customerLoggedIn()): ?>, but it is not showing on front end. Can any one please guide me?


texts: Remove ability to Paypal to change address delivery

texts:
Using Magento 2, I have an addon who set delivery address. (click & collect). Sadly, if customer use Paypal, he overrides the delivery address.

I don't want Paypal changing delivery address.

Any idea how to achieve that ?


texts: Layered navigation - show stock from two places

texts:
I´m looking for a way to make it possible for our costumers to have a filter in the layered navigation for products in stock in each of our stores.

It should be something like the following in the layered navigation:

Stock status:

Aalborg
Bronderslev

then the customer can select the store and should able to see what's in stock.

Don´t know if its possible to solve on the magento layered navigation or there is an extension for that.


texts: Prohibition of purchase for non login users

texts: I added my store. Also I created new group of users(Agent). And I would like, that all users who have not logged in as agents could not purchase products. How can I do it?


texts: how to fix error occurred during upgrade magento from 2.2 to 2.3?

texts:
Process :  Upgrade Magento version from 2.2 to 2.3

As per my client requirement, I tried to upgrade Magento from 2.2 to 2.3 as mentioned in this URL: https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html

All steps were run properly but after run composer update command it will throw following Fatal error after some time as per mention into the screenshot.

And then after exit from composer update command.

Please suggest me how can I fix this error ?.

Thanks in advance.


texts: How to upload Video using wysiwyg editor in Magento 2

texts:
I want to add video in Content Block like upload video from my pc not youtube or vimeo.

I want to add an option here to upload a video from my pc.
And like used it on anywhere like other blocks are used.
I have make a file ( app/design/frontend/Mgs/claue_child/Magento_Cms/etc/di.xml ) and added 1 on media_allowed types but it doesn't show video addition.
Will any one tell me how to do that ?


texts:
There is a Mage::reset() equivalent in Magento 2?
EDIT
The problem is:
I created a cli command that will create file to upload ebay listing...
Here I got a foreach loop:
protected function execute(InputInterface $input, OutputInterface $output)
{
    $this->_state->setAreaCode(\Magento\Framework\App\Area::AREA_ADMINHTML);
    $areaObject = $this->_areaList->getArea(\Magento\Framework\App\Area::AREA_ADMINHTML);
    $areaObject->load(\Magento\Framework\App\Area::PART_TRANSLATE);
----
    foreach ($input->getOption(self::C_EBAY_STORES) as $ebaystore){
        foreach ($input->getOption(self::C_EBAY_SITES) as $site){

            $locale = $this->_helper->getLocale($site);
            $this->_storeManagerInterface->setCurrentStore($locale['store']);
            $this->_storeManagerInterface->getStore()->setCurrentCurrencyCode($locale['currency']);
            $this->_coreSession->setCountryCode($locale['iso']);
            $this->_emulation->startEnvironmentEmulation($this->_storeManagerInterface->getStore()->getCode(), 'frontend');

            $collection = $this->getCollection($this->_helper->getEbayAttribute($ebaystore,$site));
            foreach($collection as $product){
                if($product->isSaleable()){

                    if(!in_array($product->getId(),$syncIds)){
                        $syncIds[] = $product->getId();
                    }

                    $product->load($product->getId());

                    $output->writeln("\t\t<info>SKU: ".$product->getSku()."</info>");
                    $output->writeln("\t\t<info>Minimal Price: ".print_r($product->getPriceInfo()->getPrice('final_price')->getAmount(),true)."</info>");
                    $output->writeln("\t\t<info>Core Session: ".print_r($this->_coreSession->getData(),true)."</info>");
                    $output->writeln("\t\t<comment>- - -</comment>");
                }
            }
            $this->_emulation->stopEnvironmentEmulation();
        }
    }

The problem is thet txtRates ara calculated only at the beginning, but i ned to refresh it every time after $this->_coreSession->setCountryCode($locale['iso']);
to get the corrects rates for each country.
In Magento 1.9 i used this:
            $locale = Mage::helper('ebaysync')->getLocale($site);
            Mage::reset();
            Mage::app()->setCurrentStore($locale['store']);
            Mage::app()->getStore()->setCurrentCurrencyCode($locale['currency']);
            Mage::getSingleton('core/session')->setCountryCode($locale['iso']);

but i can't find any solution for Magento 2;
Any help?


texts: Cant find Magento model used in block class

texts:
So, basically, I have a template that makes the following call.

$methods = $this->getMethods();
$oneMethod = count($methods) <= 1;

The corresponding block class simply has something like this

public function getMethods(){
    $methods = $this->getData('methods');
}

(I have only copied the relevant portion of the code)

The problem is that I cannot figure out where the getData is looking because no model has been instantiated in this block class or the one that extends to it. There is no call like Mage::getModel(?/?).

How does this know which table to look at in the database? The variables I'm trying to find are "payment methods" (like credit card, cheque, etc).
the Block classes I'm dealing with are:

Mage_Payment_Block_Form_Container
Mage_Core_Block_Template
Mage_Core_Block_Abstract

No models are instantiated in any of these classes and I cannot understand how the system is returning types of payment methods for $this->getData('methods');


texts: All best seller getting as per categorywise. Using Magento Ver 1.9

texts:
I did code as per instruction. Make query on app\code\local\Mage\Catalog\Block\Product\bestseller.php:

parent::__construct();
$storeId = Mage::app()->getStore()->getId();
$products = Mage::getResourceModel('reports/product_collection')
    ->addOrderedQty()
    ->addAttributeToSelect('*')
    ->addAttributeToSelect(array('name', 'price', 'small_image'))
    ->setStoreId($storeId)
    ->addStoreFilter($storeId)
    ->setOrder('ordered_qty', 'desc'); // most best sellers on top
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
$products->setPageSize(3)->setCurPage(1);
$this->setProductCollection($products);

and make phtml code on app\design\frontend\base\default\template\catalog\product and make layout code into catalog.xml file.

When I try to call all bestseller product then it showing page not found.
I am using URL: www.xxx.com/catalog/product/bestseller

Can you please guide me where i wrong ?


texts: Error when three fields are hidden on checkout page

texts:
<?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" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="steps" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="shipping-step" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="shippingAddress" xsi:type="array">
                                                    <item name="children" xsi:type="array">
                                                        <item name="shipping-address-fieldset" xsi:type="array">
                                                            <item name="children" xsi:type="array">
                                                                <item name="company" xsi:type="array">
                                                                    <item name="visible" xsi:type="boolean">false</item>
                                                                </item>
                                                                <item name="postcode" xsi:type="array">
                                                                    <item name="visible" xsi:type="boolean">false</item>
                                                                </item>
                                                                <item name="country_id" xsi:type="array">
                                                                    <item name="visible" xsi:type="boolean">false</item>
                                                                </item>
                                                            </item>
                                                        </item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

When I hide three fields from checkout in one time I see the following javascript error.

region.js:59 Uncaught TypeError: Cannot read property 'indexedOptions' of undefined

Company and postcode both are optional and only one country allowed for checkout proccess.

Can anyone hint me where I'm wrong? Or it is just magento bug?
Thanks in advance.


texts: Capture Order Cancellation from Admin via Observer

texts:
Magento ver. 1.9.1.0

I have a working module that observes checkout_submit_all_after, this logs the order, however I need to remove log entries when the order is
a) refunded
b) Cancelled in the admin

To monitor the change I am using sales_order_save_after, this is called when the order is placed but not when any actions are taken from the admin. i.e. I receive log entries when there is a new order but at not when I cancel an order

I can't figure out what I am doing wrong

app/etc/modules/Module_Followuporderemail.xml

<config>
    <modules>
        <Module_Followuporderemail>
            <active>true</active>
            <codePool>local</codePool>
        </Module_Followuporderemail>
    </modules>
</config>

app/code/local/Module/Followuporderemail/etc/config.xml

    <?xml version="1.0"?>
<config>
    <modules>
        <Module_Followuporderemail>
            <version>1.0.0</version>
        </Module_Followuporderemail>
    </modules>
  <global>
      <models>
        <followuporderemail>
            <class>Module_Followuporderemail_Model</class>
        </followuporderemail>
    </models>
    <events>
        <checkout_submit_all_after>
            <observers>
                <followuporderemail>
                    <type>singleton</type>
                    <class>followuporderemail/observer</class>
                    <method>logOrder</method>
                </followuporderemail>
            </observers>
        </checkout_submit_all_after>
        <sales_order_save_after>
            <observers>
                <watchorderstatus>
                    <type>singleton</type>
                    <class>followuporderemail/observer</class>
                    <method>checkCancelled</method>
                </watchorderstatus>
            </observers>
        </sales_order_save_after>
    </events>
  </global>
</config>

app/code/local/Module/Followiporderemail/Model/Observer.php

<?php
class Module_Followuporderemail_Model_Observer
{
    public function logOrder($observer)
    {
        $order = $observer->getEvent()->getOrder();
        $order_id = $order->getIncrementId();
        Mage::log('New Order Placed: ' . $order_id);
    }

    public function checkCancelled( $observer)
    {
        Mage::log('Order Status Change: ');

    }
}


texts: Community ed: sell some products, leave other products as "enquire now"

texts:
I am not very experienced in Magento. A client currently has all their products with an "enquire now" button, instead of "add to cart", which opens a model window with a form requesting their contact details.

The "enquire now" functionality is custom code inside app\design\frontend\default\modern\template\catalog\product\view.phtml.

They now want to sell some of their products in the traditional way, and leave the rest as "enquire now".

Can I serve the custom "enquire now" code to most products, and serve the default "add to cart" code to other products?

Thanks.


texts: Magento 2.1.0 How to use SAVED CC as the only payment type? And allow customers to use a different delivery address?

texts:
Magento 2.1.0
Enable Onepage Checkout = NO

I have 2 problems:

How to select a SAVED CC option as the only payment option? We do not want to use Paypal or any other real-time online processor. We process orders manually.
We deliver ALL products. How do we make the delivery address appear so that customers can fill that information in?


texts:
Referring to MIME type not valid when uploading image using REST API

I am trying to upload image for a product through REST api.

Request Code:

API: http://192.168.0.133/index.php/rest/V1/products/ABC_123456/media

METHOD: POST

BODY:

{
 "entry": {
 "media_type": "image",
 "label": "Image",
 "disabled": false,
    "types": [
        "image",
        "small_image",
        "thumbnail"
    ],
 "file": "string",
 "content": {
   "base64_encoded_data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQcAAAGGCAYAAAB2R0TaAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO2dd3hUxdfHv3fTKAmhiwhIEwFBbIAiSlGKiIoovoqoWEDABFAQseNPBV70lZJIVZqCCvwQRQVBukgTEKQovZdQEgglCdk97x+TwGbZcsvMnbub+TzPeZTs3pkzc+eenTtz5hxAoVAoFAqFQi+abAUU3EkE0AhAzTwpDaB43mcXAWQBOADgHwB/A9gFwGO/mgqFQjQagLsBDAOwFexBJwNyFMA4AA8AcNmsu0KhEEA8gP5gMwAjxiCY/A2gE5SRUCjCkhgwo3AC/IyCr/h+mlMRAh4JWmWH9/4CzEnHmxW4su1lN2fAXHXt5DcAx22u05scXPGN8EamkZ4K8XFGIxoexmE65N2EXPjPdUgwH8jVKt/C/lRnuTCf85IH34K5ufvyI8RmJwsEQUWXdgxLIeedMlgE4WqQE//1PGeZa5BvRTxsEgxaHf6SUb9gVqrQv9rzwesACu4YyR5La8/UuCYSSCmIzzLJMN6KeMgwn0Jre1O5y83m2+ZTbrJYLy0BdCTpR/SSCMGGkZ51n+V6duRmS5rS1wOPWgL+uy3VGVWuvQiQA8Z7NeopiA0G0V5V8SjHk69DoCOedZzC5eB5MvbG1BGPApgneYrKzIoWYPGwDESNKNN+UQelvzfgl63YLQ4etlGeiiYFnDeRoH0btxYUcsWKw/f511GkB1SXpdB+BgAL3SwM5jRBItwdZ2nPaL1j+ATgR2FkMmz4BfHNKjYGePFD4kgCVX9f71Wg+gtkylwGJQ5Kf1I7DzCD+B+WlEIs3Bzojkv+pdBPAxWJAYmXRBQbfq4wD6wRlbyM+AvdpYMQx7Adxlt+JmEOmBqIfSYMlw/KVvl0URABXAfPfPSdbFDqLBMlKdBNu+dArlwWaaR8B+sZ2CCyyalRljlQ3gMF91xPH/Y6G7EHnoGcUAAAAASUVORK5CYII=
    ",

  "type": "image/png",
  "name": "new_image2.png"
   }
  }
}

RESPONSE:

  "message": "Decoding error: \nUnable to unserialize value.\n#0 /var/www/magento221/vendor/magento/framework/Webapi/Rest/Request/Deserializer/Json.php(64): Magento\Framework\Serialize\Serializer\Json->unserialize('{\n  \"entry\": {\n...')\n#1 /var/www/magento221/vendor/magento/framework/Webapi/Rest/Request.php(141): Magento\Framework\Webapi\Rest\Request\Deserializer\Json->deserialize('{\n  \"entry\": {\n...')\n#2 /var/www/magento221/generated/code/Magento/Framework/Webapi/Rest/Request/Interceptor.php(37):

What could be the issue?

Using magento verion 2.2.1


texts:
weird bug - when we get a new order in Magento - the system sends an email to them but also sends a BCC to a previous customer?
This is slightly weird! Any idea why?

Also the shipment confirmation email doesnt go to customer...


texts: Magento 1.9 - out of stock RSS feed not working / not accessible

texts:
I am running a Magento webstore. Everything seems to work as expected. I would like to use the "Low stock RSS feed", but I can't get it working. What happens:

clicking the RSS link in admin menu opens a new tab and requires me to authenticate. I cannot authenticate with my administrator user or any other user. The auth windows just returns everytime.

Do I have to insert additional code or configuration parameters to get the Low Stock Notification RSS feed to work? I searched the web and magento stx, but couldn't figure out a solution.


texts: I'm adding products and slider only . I want what are things I need to know in magento 1.9.3 and where I can get material to learn.


texts: How to create Magento 2 custom carrier tracker?

texts:
I want to create custom carrier tracker in magento 2 as like this. I want to list my custom carrier tracker in the dropdown.
How can I do this?


texts: M2 - Get all attributes from attribute group

texts:
I have an attribute set for example "Camera" in that set, we have multiple groups like; General, Recording, Storage, Monitoring etc...

All those groups have attributes which are specifications from that product, it can be a drop down, open field, multiple select.

What I have on the product detail page on the front-end is an accordion with the groups General, Recording, Storage, Monitoring. But I need to get all the attributes per group. Now I will load all the attributes piece by piece but there will be more than 60 attributes so that will be too much to handle.

Is there a way to load all the attributes from a specific group (not a Set).


texts: Magento 2 : Mixed Content Error Block HTTP Request an HTTPS page

texts:
When I call the third party HTTP URL in my page. Then, I face the below error.

How can I solve it?

  Mixed Content: The page at 'https://*******************' was loaded over HTTPS, but requested an insecure resource 'http://***************************'. This request has been blocked; the content must be served over HTTPS.


texts: How do I Add a Search that Queries a Table in the Database?

texts:
I'm working in Magento 2, and want to add a search to my header that uses 4 dropdown select menus to query a table I added in the database.

The 4 dropdowns will search one table for an id, and then that id will be looked for in a pivot table, which will point to the products table, finally returning the products to the user.

I already have the tables, Models, and Controllers from the CRUD module I built in the backend, I'm just not sure what files I need to edit/create and what directories they're in to get the search up.

UPDATE

I found this file,
/app/design/frontend/TemplateMonster/framework/Magento_Theme/layout where the sections of the header are created, so I added my code, but the containers aren't appearing on my site:

....

<!-- Header Content -->
<referenceContainer name="header-wrapper" htmlClass="page-header__content">
    <container name="header-wrapper.grid-container" htmlClass="container" htmlTag="div" before="-"/>
</referenceContainer>
<!-- Header Content END -->

<!-- Added Code -->
<!-- Header Fitment Search -->
<referenceContainer name="header-fitment-search" htmlClass="page-header__fitment">
    <container name="header-fitment-search.grid-container" htmlClass="container" htmlTag="div" before="-" />
</referenceContainer>
<!-- Header Fitment Search END -->
<!-- Added Code END -->

...

Also not exactly sure how a .phtml file is called to be added into the container


texts:
Hello I am try to import csv for my german store product name other some information. so i export one product for getting csv. i tried with with singal record i just set my information inplace of other but i get problem like that "Skipping import row, required field "sku" is not defined."

For that i am searching on net and do this kind of step describe on this links.

http://tutorialmagento.com/magento-skipping-import-row-required-field-sku-is-not-defined-how-to-fix

But its not worked any one have idea i attached here my csv formate

Getting my csv here [http://dev.starcufflinks.co.uk/export_product_test.csv]


texts: append block to specific container programatically

texts:
I need to display the block in product detail page for bundle product only
so I just add preference to overwrite Magento/Catalog/Controller/Product/View

Then alter the product detail page controller execute method like below.

// Render page
$page = $this->resultPageFactory->create();

if($this->_type->getById($productId)->getTypeId()=='bundle')
{
    $block=$page->getLayout()->createBlock('Vendor\Module\Block\Index\Index');
    $page->getLayout()->getBlock('content')->append($block);
}

$this->viewHelper->prepareAndRender($page, $productId, $this, $params);
return $page;

but it always throws error like

  PHP Fatal error:  Call to a member function append() on boolean

I need to add my block to <referenceContainer name="content">


texts: Magento - UPS shipping returns error "Missing or invalid ship from address line 1" - Magento 1.9

texts:
I want to use UPS XML Shipping in one of my Magento Website.The website is from London, UK and we need to integrate UPS for UK.

We tried to integrate the same, and have cross-verified the credentials and all the other relevant information multiple times; yet, somehow the UPS XML Shipping is not working in it.

When I try to create a label for UPS (using button "ship" and checking "create shipping label") a popup appears (so far so good) BUT after I create my package and clicking "ok" I got below errors.

We are facing Error as below in UPS Shipping.

1) A shipment cannot have a KGS/IN or LBS/CM or OZS/CM as its unit of measurements

2) Missing or invalid ship from address line 1

3) Shipper Number 0847FE does not support pallet Contract Service

Post varilable with value as below.

packages[1][items][1611][...    10

packages[1][items][1611][...    HEAD LAMP

packages[1][items][1611][...    1611

packages[1][items][1611][...    10.0000

packages[1][items][1611][...    471

packages[1][items][1611][...    1

packages[1][items][1611][...    8.0000

packages[1][params][conta...    24

packages[1][params][conte...

packages[1][params][conte...

packages[1][params][custo...    10

packages[1][params][deliv...    0

packages[1][params][dimen...    CENTIMETER

packages[1][params][heigh...

packages[1][params][lengt...

packages[1][params][weigh...    8

packages[1][params][weigh...    KILOGRAM

packages[1][params][width...

shipment[comment_text]

shipment[create_shipping_...    1

shipment[items][1611]   1

I have changed as per descrive in LINK in below files for address lines but still didn't get shipping label and tracking number as well.

/public_html/app/code/local/Mage/Usa/Model/Shipping/Carrier/Ups.php

/public_html/app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php

Does someone have an idea about what is going on? please help me to clear out from it.

Thanks


texts: Magento 2.4.1 and Elasticsearch 7.6.2 "no mapping found" issue

texts:
I'm facing an issue with a fresh install of Magento 2.4.1 and Elasticsearch 7.6.2.
The products appear for a moment, and I have to reindex again to see them.
The main issue appears to be "No mapping found for [position_category_xxxx] in order to sort on"
[2020-10-31 08:15:23] main.CRITICAL: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [position_category_12] in order to sort on","index_uuid":"AWmVw6XqQsikmOu6IfXvNg","index":"magento2_product_1_v4"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_1_v4","node":"2Nx7OzfeT8OB1JixlyNJng","reason":{"type":"query_shard_exception","reason":"No mapping found for [position_category_12] in order to sort on","index_uuid":"AWmVw6XqQsikmOu6IfXvNg","index":"magento2_product_1_v4"}}]},"status":400} {"exception":"[object] (Elasticsearch\\Common\\Exceptions\\BadRequest400Exception(code: 400): {\"error\":{\"root_cause\":[{\"type\":\"query_shard_exception\",\"reason\":\"No mapping found for [position_category_12] in order to sort on\",\"index_uuid\":\"AWmVw6XqQsikmOu6IfXvNg\",\"index\":\"magento2_product_1_v4\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"magento2_product_1_v4\",\"node\":\"2Nx7OzfeT8OB1JixlyNJng\",\"reason\":{\"type\":\"query_shard_exception\",\"reason\":\"No mapping found for [position_category_12] in order to sort on\",\"index_uuid\":\"AWmVw6XqQsikmOu6IfXvNg\",\"index\":\"magento2_product_1_v4\"}}]},\"status\":400} at /var/www/vhosts/mywebsite.com/httpdocs/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:632)"} []
It's a clean install without any extension or custom theme.
Elasticsearch is running on a Docker container / Plesk. (3 nodes cluster).
I have 4 Magento 2.4.1 websites on the server.


texts: Invalid method Custom_Abc_Model_Custom::addFieldToFilter admin Panel of Magento CE 1.9.2

texts:
Hello In my grid file while filtering collection but it is showing error.

Here is the code of my grid file

protected function _prepareCollection() {

    $custom_id = Mage::getSingleton('adminhtml/session')->getCustom()->getId();

    $collection = Mage::getModel('custom_abc/custom')
            ->addFieldToFilter('custom_id',1)
            ->getCollection();

    $adminStore = Mage_Core_Model_App::ADMIN_STORE_ID;
    $store = $this->_getStore();

    $this->setCollection($collection);
    return parent::_prepareCollection();
}

Here is my model

Model/Custom.php

class Custom_ABC_Model_Custom extends Mage_Core_Model_Abstract
{
  public function _construct()
  {
    parent::_construct();
    $this->_init('custom_abc/custom');
  }
}

Model/Resource/Custom.php

class Custom_ABC_Model_Resource_Custom extends Mage_Core_Model_Resource_Db_Abstract
{
  public function _construct()
   {
       $this->_init('custom_abc/custom', 'custom_id');
   }
}

Model/Resource/Custom/Collection.php

class Custom_ABC_Model_Resource_Custom_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract{

  protected function _construct()
  {
      parent::_construct();
      $this->_init('custom_abc/custom');
  }

}


texts: How to get stock quantity for a given product_id

texts:
Does anyone know how to get StockItem by product_id in Magento 2.4.x? We have the following code that works most of the time, but sometimes it throws the following error: "The stock item with the "12399" ID wasn't found. Verify the ID and try again."
class AbstractTemplate extends \Magento\Framework\View\Element\Template
{

 protected $_stockItemRepository;

 public function __construct(

     \Magento\CatalogInventory\Model\Stock\StockItemRepository $stockItemRepository,
             array $data = array()
 ) {

     $this->_stockItemRepository = $stockItemRepository;

   }

 public function getStockItem($productId)
     {
     return $this->_stockItemRepository->get($productId);
 }
}

then we do:
$product = $this->_productFactory->create()->load($item->getId());
$stock_quantity = $this->getStockItem($item->getId());

$product_quantity = $this->or_else($stock_quantity->getQty(), 0);


texts: Unable to access magento admin due to security reasons

texts:
The problem started here. Before checking any available installed ssl certificates, I configured base urls to ssl. From then onwards, while accessing my magento admin site, I get SSL_ERROR_RX_RECORD_TOO_LONG error. I edited core_config_data columns where path=where path like '%base%url%' to set value to 0. Still I am not able to access the site.

How to troubleshoot this problem.


texts:
Setting current store in loop is not working for me. I want get product collection in loop filtered by store. Here is how i am doing it:

$allStores = Mage::app()->getStores();

foreach ($allStores as $_eachStoreId => $val)
{
    $_storeId = Mage::app()->getStore($_eachStoreId)->getId();
    Mage::app()->setCurrentStore($_storeId);

    $collection = Mage::getResourceModel('catalog/product_collection')
        ->addStoreFilter();

}

It always returning collection of first store id in loop.

Any help would be much appreciated.


texts: Deploy error in porto 2.1.0 Magento 2, _popus.less

texts: When I run php bin/magento setup:static-content:deploy those are the errors that will occur. by the way I just upgraded my magento version 2.0.7 to magento 2.1.1 and it gives error.


texts:
My magento2 back end URL is not working, I am not able to login into the back end. When I tried to open magento2 back end URL at that time it gives 403 error.This happened after I changed permission with

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 777 {} \;
chmod -R 777 pub
chmod -R 777 var

How can I resolve this?


texts:
I am trying to password protect one URL on a Magento site.

I have my .htpasswd setup

I have tried using the  directive - NO LUCK. I also tried the following:

SetEnvIf Request_URI ^/url-name require_auth=true
AuthType Basic
AuthName 'By Invitation Only'
AuthUserFile /var/www/vhosts/path/.htpasswd

Order Deny,Allow
Deny from all
Satisfy any
Require valid-user
Allow from env=!require_auth

But when I do the above it ends up doing the entire site. I am putting everything right before the  tag


texts: Problems with shipping methods - Magento 2.3.1

texts:
For the Shipping Method, I have configured the table rates with a CSV (to set a different price for the countries we send). This is the CSV that I am using ():

Country, Region/State, Zip/Postal Code,# of Items (and above), Shipping Price
NLD,*,*,0,4.55
BEL,*,*,0,5.74
DEU,*,*,0,6.57
FRA,*,*,0,9.88
ESP,*,*,0,11.53

My problem is that if the client has an added address, the system does not show the price of the shipping cost and I receive the following message:

  Sorry, no quotes are available for this order at this time

In the following image you can see it better:

If this client adds a new address, the price of the shipping method appears correctly, in the following image you can see it better:

Any idea why this happens and how to solve it?

UPDATE 1

When I display the option of Estimate Shipping and tax, the price for this country appears correctly, but below in the summary, the price is 0.00€.
This is what you see in the shopping cart summary:

On the next screen (EXPRESS CHECKOUT) I receive the error message that I put above in the SHIPPING METHODS section: "Sorry, no quotes are available for this order at this time). To obtain the correct shipping costs, I need to add a new shipping address every time. Is there a way to automatically take the default shipping address and the correct shipping price?

UPDATE 2

I have detected that when I click on the address that the customer has saved, the shipping form is updated and the same message that appears in the image reappears, but I also receive this error by the console. Any idea of the problem?


texts: Product recommendation duplicated when using Adobe Sensei

texts:
I'm using a Magento 2 Commerce Cloud + Adobe Sensei product recommendation
I did all the steps described in the DevDocs - Product Recommendations but when I enabled the AI product recommendations, it didn't stop my native product recommendations, so there are 2 recommendation blocks in my product page.
How could I void this?


texts: How to move product.price.render.bundle.customization from bundle.summary to product.info.price in Magento 2

texts:
Magento 2 bundle product has a set of simple products. If you click each simple product's checkbox, its bundle product's price is re-calculated and displayed in bundle.summary block.
I want to move it to product.info.price so that it is displayed at the top of product-info-main. If it is moved using layout xml, it is displayed at product.info.price block, but its calculation for changing checkboxes is not updated.

By debugging on browser, I found

priceBox.trigger('updatePrice', changes)

of _onBundleOptionChanged function in Magento_Bundle/js/price-bundle.js can't call updatePrice function of Magento_Catalog/js/price-box.js, so its price is not re-calculated on checkbox click event.
Could you help how should I do this? Thanks.


texts: EcomDev PHPUnit: Test if data is written to db

texts:
I want to test if the following method writes ( or deletes ) the data in the expected way:

Method:

protected function saveInstanceRelations( Mage_Core_Model_Abstract $object )
{

    $oldInstances = $this->lookupRelationIds( $object->getId(), $this->getTable('slider/slide_instance'), 'instance_id' );
    $newInstances = (array) $object->getInstances();

    $table  = $this->getTable('slider/slide_instance');
    $insert = array_diff($newInstances, $oldInstances);
    $delete = array_diff($oldInstances, $newInstances);

    if ( $delete )
    {
        $where = array(
            'slide_id = ?'     => (int) $object->getId(),
            'instance_id IN (?)' => $delete
        );

        $this->_getWriteAdapter()->delete($table, $where);
    }

    if ( $insert )
    {
        $data = array();

        foreach ($insert as $instanceId) {
            $data[] = array(
                'slide_id'  => (int) $object->getId(),
                'instance_id' => (int) $instanceId
            );
        }

        $this->_getWriteAdapter()->insertMultiple($table, $data);
    }
}

Test for that method:

/**
 * @test
 * @loadFixture
 * @doNotIndexAll
 */
public function testSaveInstanceRelations()
{

    $mock = $this->getMock('Mage_Core_Model_Abstract');
    $mock->expects($this->any())
        ->method('getId')
        ->will( $this->returnValue( 1 ));

    $mock->expects($this->any())
        ->method('__call')
        ->with('getInstances')
        ->will( $this->returnValue( array(1,2)));

    EcomDev_Utils_Reflection::invokeRestrictedMethod(
        Mage::getResourceModel('slider/slides'),
        'saveInstanceRelations',
        array( $mock )
    );

I could write a simple db-query to check if the data gets written correct, but i don`t think this is a clever way to do that.


texts: Intensity reduce of captcha image overriding in magento 2

texts:
I have changed number of lines and dots in native magento 2 captcha in

/vendor/magento/zendframework1/library/Zend/Captcha/Image.php.

but not impact in captcha


texts:
I want to  protect my site from DoS attacks and I want to change some http headers. At present I have the following headers:

Request URL:https://www.mysite.co.uk/
Request Method:GET
Status Code:200
Remote Address:127.0.0.1:12345
Referrer Policy:no-referrer-when-downgrade
cache-control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
content-encoding:gzip
content-length:11964
content-type:text/html; charset=UTF-8
date:Wed, 14 Mar 2018 20:52:31 GMT
expires:Thu, 19 Nov 1981 08:52:00 GMT
host-header:192fc2e7e50945beb8231a492d6a8024
pragma:no-cache
server:nginx
 set-cookie:frontend=e7cv00141jn6hn1ijipjss7aq1; expires=Thu, 15-Mar-2018
20:52:30 GMT; Max-Age=86400; path=/; domain=www.mysite.co.uk;
httponly
status:200
vary:Accept-Encoding,User-Agent,Origin
x-content-type-options:nosniff
x-frame-options:SAMEORIGIN
x-proxy-cache:MISS
x-sucuri-cache:MISS
x-sucuri-id:11005
x-xss-protection:1; mode=block

How do I change the cache control to this => Cache-Control: max-age=600 and Vary: Cookie  headers set on the most visited pages so my pages would be cached according to the session cookie?
Can this be done without installing any extension? Is it possible to do it from the htaccess file? ANy pointers is much appreciated.


texts:
I had to create a controller that added or removed an option from a quote item.

I succeeded but did not convince the solution. It seems strange to me that I have to manage the correct populating of the option: "option_ids". Can someone with experience tell me if there is a better solution?

// Add o remove optional.
$optionId = 1234; // Id optional.
$optionData = $product->getOptionByid($optionId);
foreach ($optionData->getValues() as $v) {
    $optionId = $v->getOptionId();
    $optionCode = 'option_' . $optionId;
    $itemOptionIds = $quoteItem->getOptionByCode('option_ids');

    if ($status) {
        $quoteItem->addOption(new Varien_Object([
          'product' => $quoteItem->getProduct(),
          'code' => $optionCode,
          'value' => $v->getOptionTypeId()
          ])
        );

        if ($itemOptionIds) {
            $optionIds = explode(',', $itemOptionIds->getValue());
            $optionIds[] = $optionId;
            $quoteItem->getOptionByCode('option_ids')->setValue(implode(',', $optionIds));
        } else {
            $quoteItem->addOption(new Varien_Object([
                'product' => $quoteItem->getProduct(),
                'code' => 'option_ids',
                'value' => $optionId
              ])
            );
        }
    } else {
        $optionIds = [];
        if ($itemOptionIds) {
            foreach (explode(',', $itemOptionIds->getValue()) as $itemOptionId) {
                if ($optionId === $itemOptionId) {
                    $quoteItem->removeOption('option_' . $optionId);
                } else {
                    $optionIds[] = $itemOptionId;
                }
            }

            if (!empty($optionIds)) {
                $quoteItem->getOptionByCode('option_ids')->setValue(implode(',', $optionIds));
            } else {
                $quoteItem->removeOption('option_ids');
            }
        }
    }

    $quoteItem->setDataChanges(true);
    $quoteItem->save();
}

// Save cart.
$this->_getCart()->save();


texts: Can I disable magereport and magescan scanning for my website?

texts:
I have a Magento 1 website and I don't want magereport or magescan to be able to scan this website.

How can I do this?

Any help would be appreciated.

Thanks.


texts: Magento 2.3.1 php 7.2 upgrade Parameter must be an array or an object

texts:
Getting this error when trying to complete upgrade of Mgaento 2.2.2 (running on PHP7.1) to Magento 2.3.1 (running on PHP 7.2)

  1 exception(s): Exception #0 (Exception): Warning: count(): Parameter
  must be an array or an object that implements Countable in
  /home/mytheme/public_html/app/design/frontend/Sm/topshop/Sm_Deals/templates/default.phtml
  on line 16

I managed to fix a lot of errors with researching but stuck with this one.

$start = ($start <= 0 || $start > count($list)) ? 0 : $start - 1;


texts: Sell different products in bunch of fixed quantity

texts:
I would like to sell a set of products as follows:
A set of 20 lipsticks where 10 color options are available:
The customer can purchase any combination of colors with any qty, but a total qty of 20.
For example

5 Red, 4 Yellow, 7 pink, 4 green

10 Red, 3 Yellow, 3 pink, 4 green

3 Red, 2 Yellow, 9 pink, 6 purple

15 Red, 5 Blue

2 Red, 2 Blue, 2 Yellow, 2 pink, 2 purple, 6 brown, 4 gold

How can I achieve this?


texts: Magento2: Warning: DOMDocument::loadXML(): Extra content at the end of the document in Entity

texts:
I added one custom HelloWorld module in a fresh Magento 2 installation and I got the following error:

  Warning: DOMDocument::loadXML(): Extra content at the end of the
  document in Entity, line: 8 in
  /var/www/magento2/vendor/magento/framework/Config/Dom.php on line 365

What can be the exact cause for this issue?

I get this error even when I install the sample module from Magento repo. I have not done any edits to the sample module.

It was my custom module causing the problem. Sample module from magento github works fine.


texts: How to add Two Header and Two Footer for Multi-Store

texts:
I have used the same theme for my multi-store, I need to change header and footer completely for my second store.

How can add 2 headers and 2 footers for my multi-store?


texts: Magento 2 - Cannot pass readiness check (Component Dependency)

texts:
I'm having a fight with the readiness check at the moment.
The only error I have to fix is the one below but I have no clue at the moment.

Please assist if you can.

Command "update" failed: Loading composer repositories with package information

[Composer\Downloader\TransportException]
The "https://repo.magento.com/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [packages1] ... [packagesN]

Currently running: TLS 1.2 with ssl 3.1
Cannot change this due to shared hosting.


texts:
Can anyone think of a way to achieve this? I want to offer a product that the customer can choose to receive physically or as a download.

I could set this as a custom option but then shipping will still show at checkout if the product hasn't been built as a virtual.

Any way around this?


texts: Magento 2: How to get welcome text in template

texts:
How I can get fetch the welcome text of Configuration in Template file.

For e.g. welcome text : "DEFAULT WELCOME MSG!"

I know I can get it in Magento 1.9 with:

<?php echo Mage::getStoreConfig('design/header/welcome') ?>

But now sure how to fetch it in Magento 2.x


texts: Increase front-end message appearance time

texts:
I have the following Javascript code and need to increase the time that these 3 messages are displayed on the Magento2 front-end. Customers cannot see them as they flash.
define([
        'Magento_Ui/js/grid/columns/select',
        'mage/translate'
    ], function (Column, $t) {
        'use strict';

        return Column.extend({
            defaults: {
                bodyTmpl: 'ui/grid/cells/html'
            },
            getLabel: function (record) {
                var columnVal = record.is_approved[0];

                if (columnVal === 'pending') {
                    return '' + $t('Pending') + '';
                } else if (columnVal === 'notapproved') {
                    return  '' + $t('Not Approved') + '';
                } else if (columnVal === 'approved'){
                    return  '' + $t('Approved') + '';
                }

                return '';
            }
        });
    }
);

Would the setTimeout be an appropriate method for tackling this problem?


texts: sales_order_grid join with sales_order_item

texts:
I extend function that return the order collection:

protected function searchResultToOutput(SearchResultInterface $searchResult)
    {
        $arrItems = [];
        $arrItems['items'] = [];
        foreach ($searchResult->getItems() as $item) {
            $itemData = [];
            foreach ($item->getCustomAttributes() as $attribute) {
                $itemData[$attribute->getAttributeCode()] = $attribute->getValue();
            }
            $arrItems['items'][] = $itemData;
            $arrItems['totalRecords'] = $searchResult->getTotalCount();
        }

  return $arrItems;
}

$arrItems['items'] this array return orders.

I want to join this with sales_order_item on the condition on sales_order_grid.entity_id=sales_order_item.order_id.
Any one help me please, am new in Magento 2.


texts: Customers receiving order confirmation with another customer's details

texts:
We recently upgrade out Magento 1.9.0.1 site to the latest patches through to SUPEE-10975.

We have started seeing a number of problems like so;

Some backend orders show customer email address and customer group from a previous order
Some customers have then received an order confirmation email with another customer's billing/shipping address, name and email address

I wondered if anyone else has seen similar issues?


texts: Magento ver. EE1.13.0.2 tmp table deleted frequently

texts:
The following error occurs in exception.log file

  exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or
  view not found: 1146 Table
  'catalog_category_product_index_tmp' doesn't exist' in
  /www/sites/www.test.com/files/html/lib/Zend/Db/Statement/Pdo.php:228

When I am trying to create the table catalog_category_product_index_tmp through phpmyadmin after running php shell/indexer.php reindexall the table is automatically deleted and through the exception like above.

Advance thanks


texts: How to replace the text "Ref:" to "SKU" under each of product pages on my site?

texts:
Somebody please help me to change the text "Ref:" to "SKU" just before the product code showing at each of the product pages on my magento site. My developer is unable to locate the input page or location of "Ref:" text within the whole system. Please help!

Sample page link: http://dewstem.com/index.php/special-sentiments.html


texts: Magento 2: Reset Password is taking previously used password

texts:
When checking the Reset Password in Magento, I can see that there is no validation when using the new password with already used passwords.
Is this the default functionality in Magento or is there any option to restrict this?
Please guide


texts: Clear a Product Collection \Magento\Catalog\Model\ResourceModel\Product\Collection

texts:
I have a widget that shows a few products on a category page. This works if there is one instance of the widget however if i have a second widget the filters seem to reapply to the existing collection leaving no products in every instance after the first.

public function getProducts() {
    //print_r(get_class_methods($this->_productCollection));
    $this->_productCollection->clear();
    $productcollection = $this->_productCollection
        ->addAttributeToSelect('*')
        ->addAttributeToFilter($this->getAttributeFilter(), $this->getAttributeValue())
        ->addCategoriesFilter(['eq' => $this->_registry->registry('current_category')->getId()])
        ->setPageSize($this->getProductLimit())
        ->setCurPage(1)
        ->load();

    return $productcollection;
}

I have attempted to clear with $this->_productCollection->clear(); however still I have empty collections.


texts:
Just a question. My frontend button on the customer dashboard to print an invoice prints the page itself and not the PDF of the invoice.

Anyone any idea if there is a quick fix or a setting for this?

How it looks now :

How the pdf looks when printed from admin:


texts: How can I change more images thumbnail image placement on product page?

texts:
I want to show more views images thumbnail in the left of the main image.

Anyone please suggest me how can I do that.


texts: Move Attributes from attribute group to Unassigned Attribute programmatically

texts:
Im trying to move attribute from Attribute group to unassigned, (should reflect in all attribute sets) in my controller.
I tried below code by its not removing, instead its deleted.
$eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]);
$eavSetup->removeAttribute( Product::ENTITY,'my_custom_attribute_code');

When i try below nothing happens to the attribute
$attribute = $this->_eavConfig->getAttribute( Product::ENTITY, 'manufacturer');
$id = $attribute->getAttributeId();
$options = $attribute->getSource()->getAllOptions();
foreach ($options as $option) {
           $options['delete'][$option['value']] = true;
            $options['value'][$option['value']] = true;
            }
           $eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]);
          $eavSetup->addAttributeOption($options);

Anyone help how to achieve this? Thanks!