texts: Make entire product tile clickable in list / grid view

texts:
I've been collecting data and have found that most users are not clicking through on my products when browsing my site. I suspect that it is because the clickable areas on list and grid view (list.phtml) are small and specific (image, name). I have removed the links to add to compare / add to favorites and have removed the add to cart button in favor of a "More Info".

Since tablets and touch devices are becoming more and more popular I would like to make the entire tile clickable.

        <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
        <?php // Product Image ?>
        <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
        <?php // Product description ?>

                <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>

<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?>

                <?php if($_product->getRatingSummary()): ?>
                <?php echo $this->getReviewsSummaryHtml($_product) ?>
                <?php endif; ?>
                <?php echo $this->getPriceHtml($_product, true) ?>
                <?php if($_product->isSaleable()): ?>

<button type="button" title="<?php echo $this->__('More Info') ?>" class="button btn-cart" onclick="setLocation('<?php echo $_product->getProductUrl(); ?>')"><?php echo $this->__('More Info') ?></button>                    <?php else: ?>

<?php echo $this->__('Out of stock') ?>

                <?php endif; ?>

                    <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
                    <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?>

I've tried to use the products html link but it breaks the sites layout.

<a href="<?php echo $_product->getProductUrl() ?>  PRODUCT LIST CODE

Using the default theme as an example, how can I make the entire tile clickable?


texts:
I have created a custom invoice in that invoice  total amountfield is there.Now it is coming in numbers.How to convert that into Words.

//write onto XL

$totalWeight = $weight * $qtyOrdered;
    $vat55 = $order->getTotalVatOne();
                        $totalAmount = $order->getTotalAmount();
                        $totalBasePrice = $order->getTotalBasePrice();
                        $poNumber = $order->getpoNumber();
    //echo "vat55" . strval($vat55);
    //print_r($vat55);
    $vat145 = $order->getTotalVatTwo();
    //echo "vat145". $vat145;
    $objPHPExcel->setActiveSheetIndex(0)
    ->setCellValue('A32', $index)
    ->setCellValue('B32', $productName)
    ->setCellValue('E32', round($weight) .' Kg x '.round($qtyOrdered))
    ->setCellValue('F32', 'Kg')
    ->setCellValue('H32', round($totalWeight))
    ->setCellValue('J32', $unitBasePrice)
    ->setCellValue('I53', 'Sub Total')
    ->setCellValue('I54', 'VAT 5.5%')
    ->setCellValue('K54', $vat55)
                        ->setCellValue('K53', $totalBasePrice)
                        ->setCellValue('K58', $totalAmount)
                        ->setCellValue('K32', $totalBasePrice)
                        ->setCellValue('D51', 'po:')
                        ->setCellValue('D52',$poNumber)
    ->setCellValue('I55', 'VAT 14.5%')
    ->setCellValue('K55', $vat145)
    ->setCellValue('I49','C.Ex.  12.50 %');
    $centralExcise = $order->getTotalCentralExcise();


texts: After Social login,product is not adding to wishlist niether not redirecting to wishlist page

texts:
I am facing issue adding product in wishlist (magento version 2.2.3).

Here is scenario,

Step 1 :- Make sure customer not logged in.

Step 2 :- Go to product list page and click "Add to wishlist"

Step 3 :- it will redirected to login page.

Step 4 :- Now after social login it may be facebook,google you can check product not added in wishlist.


texts: Magento local to live migration database error

texts:
After migration, I have moved Magento from local server to live server, I get this error when I want to save any setting,

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY', query was: INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`) VALUES (?, ?, ?, ?)


texts: Magento 2: 403 error when visiting website in browser

texts:
When I connect from my local machine to a live instance of Magento 2, I get a 403 Error with the following message:

Forbidden
You don't have permission to access / on this server.
Server unable to read htaccess file, denying access to be safe
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


texts: Paypal express checkout not working in Magento2.1.7?

texts:
In my site I am using three types of payment method.

Paypal express checkout
Payments pro
COD

After enabling the payments pro. The Paypal express checkout Configure button automatically gets disabled.
Refer screenshot.

I don't know what is the problem, As because of this issue the paypal transaction is not being done, which occurs in my live magento2.1.7 site.

Any help would be appreciated


texts:
How collections are working in magento? I have a bit idea about it, can anybody explain this in brief?

Thanks.


texts:
I am not sure what should I have done to not get in this situation.
Comments history:

Jul 11, 2014 10:06:27 AM|Processing
Customer Notification Not Applicable
Authorized amount of $50.24. Transaction ID: "xxxx".

Aug 10, 2014 2:06:45 PM|Processing
Customer Notification Not Applicable
IPN "Expired". Registered a Void notification. Amount: $50.24. Transaction ID: "xxxx-void".

I know that 30 days passed and that's why expired. I don't understand why the money weren't taken. Are they taken only when a shipment and then the invoice are created?


texts: How to add a custom block or template to specific 2columns-left layout only

texts:
We are trying to add newsletter template to pages that are only have 2columns-left layout, for that we have created a custom module and added below code, but it seems it is not working. Can any one tell help us, what could be the issue.

app\code\Vendor\Module\view\frontend\layout\default.xml

 <?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <body>
            <referenceContainer name="page.bottom.container">
        <block class="Magento\Newsletter\Block\Subscribe" template="Magento_Newsletter::subscribe.phtml"/>
            </referenceContainer>
        </body>
    </page>


texts: How to remove specific column from the customer edit form view?

texts:
I have this form with many columns.
I'd like to remove the specific column which is Enable Delivery Order Service.
In what kind of way I can achieve this?


texts:
i have disable extension after i can remove extension via composer like this way

php bin/magento module:disable <ExtensionProvider_ExtensionName> --clear-static-content
php bin/magento setup:upgrade
composer remove VendorName/VendorExtensionRepository

but still not working for me
also i have correct credential add but still below error showing

  [Composer\Downloader\TransportException]   Invalid credentials for
  'https://repo.wyomind.com/packages.json', aborting.


texts: Checkout without CC and Bill Customer at the End of Each Month

texts:
I have 2 customer groups that i use, General and Business. I am trying to find the best solution to put through transactions and bill business customers at the end of the month.

This will allow business customers to checkout without a credit card (CC) and get the product/service they purchased. once the business customer is logged in, no CC or other payment methods should be shown except the one set. At the end of each month, i can then print/email a bill of all the purchases and send to them for payment.

I have checked for extensions for this but wasn't able to find any. Please advise me on the best way to achieve this. I am all open so any ideas will be appreciated.

Thank you in advance!


texts: Magento 2 Design Configuration edit action not shows

texts:
I'm new in Magento so I follow YouTube tutorials to change design but Edit action not shows on Configuration Page.
I just open Content / Design / Configuration
Action are empty, I'm unable to find edit action. How can I edit this.
Any help will be appreciated.


texts:
I keep getting this error and don't know how to clear it. Is it a production mode vs developer mode problem?

Please see below:

Uncaught RangeError: Unable to process binding "scope: function (){return 'minicart_content' }"


texts: Magento Checkout Street Line Autofill Bug

texts:
I've noticed recently that a number of orders in our Magento store have street line 1 copied into street line 2.

I did some digging and it appears to be related to Chrome's autofill.  If you look at the form fields, Magento uses billing[street][] and shipping[street][] as the field names for both street lines.  So Chrome can't figure out which one is which and autofills address line 1 into both fields.

There's some info floating around that you can use the autocomplete attribute on the form input field to indicate which field it should link to, but this isn't supported and doesn't work.  In fact, if you try to do that, it disables autocomplete on the entire form.  I also tried changing the field name, but that breaks checkout.  It seems I'd need to dig deep into the code and change the field name on the form and anywhere it is referenced, submitted to PayPal, saved in the DB, etc.  This seems like a nightmare.

Has anyone dealt with this and/or have a suggestion?


texts: How to add product selection grid in admin form?

texts:
I'm creating a Magento module in which there is a section with a form for placing new purchase orders. In this form I would like to add a grid containing products from the database, just like the 'Please Select Products to Add' in the new order section of Magento (see image).

This product selection grid should be added in my personal form on the same page as the other fieldsets. The product selection should be at the red arrow and the selected products need te be added to the section with the blue arrow (see image below).

The question now is where (and partially how) do I create this grid and add it to my form, and add the selected products to a section of the same form?


texts: Manipulating the Rate Request Object via a ajax call

texts:
In my attempt to recalculate shipping rates , I want to pass-in a bunch of parameters to the original rate calculate request.

What would be a best practice in Manipulating the Mage_Shipping_Model_Rate_Request object that is passed in to my shipping module. Below is the code that I am using in my ajax controller to recalculate the shipping.

    $params = array('my','parama','to', 'pass');
    $shipping = $this->getOnepage()->getQuote()->getShippingAddress();
    $this->getOnepage()->getQuote()->setTotalsCollectedFlag(false);
    $this->getOnepage()->getQuote()->collectTotals();
    $this->getOnepage()->getQuote()->save();


texts: IE 11 out of stack space issue es6-collections js with advanced bundling

texts:
We have enabled advanced JS bundling on magento 2.2.7. It works well in all browsers except IE11.

On IE11, it throws the following error on browser console.

Error Message : Out of stack space

file : es6-collections.js


texts: How to update position of many products programmatically magento 2

texts: I have inserted 4000 products and now our client want the inverse order so how to reorder them programatically? any help please


texts: Magento 2 - Categories dissapear from the left side

texts:
I add a block the Contact page in the left side, when the page appear the categories are there then disappear instant.

I add this in my theme Magento_Contact/default.xml

<referenceContainer name="sidebar.additional">
    <block class='Magento\Contact\Block\ContactForm' name="contact_categories" as="contact_categories" template="Magento_Contact::categories.phtml"/>
</referenceContainer>

and here is my function:

function categoryLoop($id, $is_sub = false){
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$categories = $objectManager->create('Magento\Catalog\Model\Category')->load($id);
if($categories->hasChildren()){
echo '
getId().'"' : '') . '>';
        $subcategories = explode(',', $categories->getChildren());
        foreach ($subcategories as $category) {
            $subcategory = $objectManager->create('Magento\Catalog\Model\Category')->load($category);
              echo '
getUrl().'">';
            echo $subcategory->getName();
            echo "
";
            if($subcategory->hasChildren()){ categoryLoop($category, true); }
        }
    echo "
";
    }
}

Where is the problem with this code?

Update:

I found something strange in the console, there is loading this link:

curl 'http://example.com/page_cache/block/render/id/85/?blocks=%5B%22contact_categories%22%5D&handles=%5B%22default%22%2C%22catalog_category_view%22%2C%22catalog_category_view_type_default%22%2C%22catalog_category_view_id_85%22%5D&originalRequest=%7B%22route%22%3A%22catalog%22%2C%22controller%22%3A%22category%22%2C%22action%22%3A%22view%22%2C%22uri%22%3A%22%2Fpriming.html.html%22%7D&version=d3dea50753cd897b6f6b4f7a47549f6d' -H 'Host: qpaints.edreamag.co' -H 'User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:49.0) Gecko/20100101 Firefox/49.0' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate' -H 'X-Requested-With: XMLHttpRequest' -H 'Referer: http://example.com/priming.html.html' -H 'Cookie: store=default; mage-translation-storage=%7B%7D; mage-translation-file-version=%7B%7D; form_key=9t3LSEkpkUjYf4bQ; mage-cache-storage=%7B%7D; mage-cache-storage-section-invalidation=%7B%7D; mage-messages=; recently_viewed_product=%7B%7D; recently_viewed_product_previous=%7B%7D; recently_compared_product=%7B%7D; recently_compared_product_previous=%7B%7D; product_data_storage=%7B%7D; section_data_ids=%7B%22cart%22%3A1508761022%2C%22customer%22%3A1508761022%2C%22compare-products%22%3A1508761022%2C%22last-ordered-items%22%3A1508761022%2C%22directory-data%22%3A1508761022%2C%22wishlist%22%3A1508761022%2C%22recently_viewed_product%22%3A1508761022%2C%22recently_compared_product%22%3A1508761022%2C%22product_data_storage%22%3A1508761022%2C%22paypal-billing-agreement%22%3A1508761022%7D; private_content_version=d3dea50753cd897b6f6b4f7a47549f6d; PHPSESSID=770b4c79f687007539699ef59cda09f5; mage-cache-sessid=true'

and after this the categories dissapear.

Thank you


texts: Hi i have recently changed the magento theme. i was using rwd default theme now i decided to switch to sns_sport theme i have uploaded all the theme files to FTP i have solved all the errors and warnings but i don't know how to hide this warnings.


texts: Conditionally add CSS file in layout XML (local.xml)

texts:
I need to add a CSS file in local.xml based on some custom variables. I have 5 CSS files but each time only one needs to be loaded.

I only know how to check if a single variable is set in the config. If config returns TRUE, the CSS file will be loaded in the frontend:

<action method="addItem" ifconfig="my_module/settings/variable"><type>skin_css</type><name>css/a.css</name><params/></action>

So for now I must put my code in head.phtml in app\design\frontend\my_theme\default\template\page\html\ to load CSS files like this:

<?php
  $my_var = Mage::helper('my_module/my_helper')->getFileName();
?>
<link href="<?php echo $my_var; ?>.css" rel="stylesheet" type="text/css" media="all" />

But it has a drawback: my CSS files will not be merged by Magento's CSS/JS merge function.

So, is there any way to do the same but inside local.xml? Is there any way to call a method from the helper which would return the name of the CSS file which should be loaded (based on some calculations inside that helper)?

SOLUTION CANDIDATE :)

I tried something similar to what Alan Storm described in this thread: https://stackoverflow.com/a/5601579/1647291

I tried this in my local.xml file:

<action method="addItem">
    <type>skin_css</type>
    <name helper="my_module/my_helper/getFileName" />
    <params/>
</action>

Helper method getFileName() returns file name a.css. But Magento searches for that CSS file inside "base" theme, not in the current theme. Magento loads CSS file with this path:

  http://example.com/skin/frontend/base/default/a.css

So my file name is prefixed with example.com/skin/frontend/base/default/. But the correct path should be:

  http://example.com/skin/frontend/my_theme/default/a.css

Does anyone know how to achieve this?


texts:
I am trying to create a module for magento. I have placed it in 'local' codepool, 'Sample' namespace, 'Practice' folder . It appears in admin panel but when I type the url I get 404 response.

config.xml

 <config>
    <modules>
    <Sample_Practice>
     <version>0.1.0</version>

    </Sample_Practice>
    </modules>

    <frontend>
        <routers>
            <practice>
                <use>standard</use>
                <args>
                    <module>Sample_Practice</module>
                    <frontName>practice</frontName>
                </args>
            </practice>
        </routers>
    </frontend>

    </config>

module config file name is Sample_Practice.xml

   <config>
    <modules>

       <Sample_Practice>

         <active>true</active>
         <codepool>local</codepool>

       </Sample_Practice>

    </modules>

    </config>

IndexController.php

<?php

   class Sample_Practice_IndexController extends      Mage_Core_Controller_Front_Action {
   public function indexAction() {
    echo 'Practice module';
   }
 }

?>

Where is my code breaking ?


texts: I have around 8000 customers to import via the API. It works like a dream besides from its really slow. Is there any ways in which I can speed it up?


texts: Magento 2: How to execute custom cronjob before default cronjob execute?

texts: How to call cronjob before default cronjob execute?


texts: Can any one tell me how exactly Magento 2 grid works ?

texts:
I have integrated properly magento grid from one tutorial but I am not getting how it is structured, what are the things are require to make grid work ?

any help will be appreciated


texts:
I have custom option in my product i want to show selected custom option with price in order.
i have used below code to get all custom option

foreach ($sales_model->getAllItems() as $item) {

     $opts = $item->getProductOptions();

}

when print option array it will give array without price.so how can i get option price.

[options] => Array
    (
        [0] => Array
            (
                [label] => Tour Date
                [value] => 10/04/2014
                [print_value] => 10/04/2014
                [option_id] => 3433
                [option_type] => date
                [option_value] => 2014-04-10 00:00:00
                [custom_view] =>
            )

        [1] => Array
            (
                [label] => Adult
                [value] => 4
                [print_value] => 4
                [option_id] => 3434
                [option_type] => drop_down
                [option_value] => 14224
                [custom_view] =>
            )

        [2] => Array
            (
                [label] => Adult - Cruise + Lunch
                [value] => Yes
                [print_value] => Yes
                [option_id] => 3435
                [option_type] => checkbox
                [option_value] => 14231
                [custom_view] =>
            )

any help would be much appreciate.


texts:
I have more than 20 thousand products in my website. Whenever i reindex the Product flat data, Catalog URL rewrite it taking too much time and suddenly the site going down. After i have to restart the database server to bring the site to live.

I tried reindexing the data's using terminal also throwing error
SQLSTATE[HY000] [2006] MySQL server has gone away


texts: Magento 2.2.7 Order confirmation email missing payment method

texts:
In my Magento 2.2.7, we have three payment methods Eway, Zipmoney, and PayPal express checkout. All payment methods are working fine. However, in the order confirmation email, the payment method is missing when we process the payment through PayPal. For all other methods its coming good.
Thank you for your help.


texts:
I am new to Magento 2. Trying to implement new theme here -

  http://new-site21.comfortcity.com.au

and it just redirects to

  http://new-site21.comfortcity.com.au/pub/index.php/

I guess, it's production mode, How do I go to default or developer mode?

Thanks in advance.


texts: In which table in database Magento 2 product will insert with image and custom attribute?

texts:
What are the basic tables which need to use, so Product data will be inserted with image and custom attribute.
Which is visible both in frontend and admin.
Please Any one point out the table name for the products entry.
Any help is appreciated.


texts: Uploaded image blocked by client Magento 2

texts:
i created an extension to upload image, the way i save the image is like this:

$uploader = $this->_uploaderFactory->create(['fileId' => 'image']);

$uploader->setAllowedExtensions(['jpg', 'jpeg', 'gif', 'png']);

$imageAdapter = $this->_adapterFactory->create();

$uploader->addValidateCallback('banner_image', $imageAdapter, 'validateUploadFile');
$uploader->setAllowRenameFiles(true);
$uploader->setFilesDispersion(true);

$mediaDirectory = $this->_objectManager->get('Magento\Framework\Filesystem')
                        ->getDirectoryRead(DirectoryList::MEDIA);
$result = $uploader->save(
$mediaDirectory->getAbsolutePath(\Test\Bannermanager\Model\Banner::BASE_MEDIA_PATH)
                    );
$data['image'] = \Test\Bannermanager\Model\Banner::BASE_MEDIA_PATH.$result['file'];

the file was save successfully, but when i want to display it, the html img tag always add display:none !important; and in browser console i always got this error Failed to load resource: net::ERR_BLOCKED_BY_CLIENT, but when i opened the image url, it shows the image, and when i downloaded it failed and the browser says it blocked


texts: How to change order in the summary order?

texts:
in my file phtml I have method:
     <?php echo $this->renderTotals(null, $_colspan); ?>.

I want to change order from

subtotal,
combined order
shipping
grandtotal

to

subtotal,
combined order
shipping
grandtotal.

How to make this? I looking for xml to this, but I have not found.

Any hints?

This not work form me, bacuse in admin I don't have 'connected orders'

This is my method in my custom module:

  protected function _initTotals() {
    parent::_initTotals();
    $amount = $this->getSource()->getOrder()->getConnectedSubtotal();
    if ($amount > 0) {
        $this->addTotal(new Varien_Object(array(
            'code' => 'connection',
            'value' => $amount,
            'base_value' => $amount,
            'label' => Mage::helper('orderConnection')->__('Orders connected'),
        )));
    }

    return $this;
}

How to change order?


texts: Remove toolbar from product list via local.xml

texts:
I am used to using local.xml for my layout updates, however I cant seem to remove the toolbar from the product list block using either the remove or unsetChild methods.

Can anyone say if this is actually not possible or am i doing something wrong?

I have tried:

<action method="unsetChild">
    <alias>toolbar</alias>
</action>

and

<action method="unsetChild">
    <alias>product_list_toolbar</alias>
</action>

and also the <remove name="" /> methods too but nothing works.


texts:
As in title, how can I get a list of all users in Magento ?
Found already some examples but none of those works. All I managed to get was either only one user (myself) or nothing while I was expecting at least 3!
Using this code as a result I'm getting ONE

$users = Mage::getModel('admin/user');

$usersCollection = $users->getCollection()->load();

foreach($usersCollection as $user){
    echo 'User: ' . $user->getFirstname() . '
';
    echo 'User: ' . $user->getLastname() . '
';
    echo 'User: ' . $user->getName() . '
';
}

What am I doing wrong ?


texts: how to get customer information using event observer?

texts:
I have already posted a question regarding this,
how to update customer and order details from magento to ERP using event observer?

my files are as follows:

Config.xml   [app/code/local/Wli/Checkoutdemo/etc]

    <config>
  <modules>
    <Wli_Checkoutdemo>
      <version>0.1.0</version>
    </Wli_Checkoutdemo>
  </modules>
  <global>
  <events>
    <sales_order_place_after>
      <observers>
        <Wli_Checkoutdemo_sales_order_place_after>
          <type>singleton</type>
          <class>Wli_Checkoutdemo_Model_Observer</class>
          <method>Checkoutdemo</method>
        </Wli_Checkoutdemo_sales_order_place_after>
     </observers>
    </sales_order_place_after>
  </events>
  </global>
</config>

Wli_Checkoutdemo.xml[app/etc/modules]

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

Observer.php   [app/code/local/Wli/Checkoutdemo/Model]

<?php

class Wli_Checkoutdemo_Model_Observer {

    public function Checkoutdemo(Varien_Event_Observer $observer) {
        $event = $observer->getEvent();
        $customer = $event->getCustomer();
        $order = $event->getOrder();
        print_r($order);
        exit();
    }

}

I need to get the details which are entered by the customer here.

after placing the order I didn't get anything?

what's wrong here?

what are the steps I have to follow here?
(I am new to Magento, if anyone has any idea pls share here)


texts: Magento 2 how to add a field to a model that is natively returned in a collection (Bundle Option)

texts:
How do I add a new field to a Model that is natively retrieved when a collection is called on the Model? I would like to do it on Bundle Option - but also understand generically how to do this.
There are lots of questions/answers showing how to inject a field into a view, but this is only a small part of the total task. For example, I have a bundle product that has option groups, and then products within the groups. I want to add a text field to the option group that can be edited, saved in the admin, and also shown on the front end.
In order to add the field to the view in admin panel, I would create a plugin or preference to the Ui/DataProvider/Product/Form/Modifier/BundlePanel class. Doing this would only display the field and store it in the database assuming the field exists.
Next,
If I want to read the values from the database to show what saved in the admin, I could modify/override the modifyData method
"\Magento\Bundle\Ui\DataProvider\Product\Form\Modifier\Composite". But this only will retrieve my custom field when viewed in the admin, nowhere else. It also requires loading or doing some extra database operation.
Next,
If I want to show the same value in the front end in a template by just using magic methods such as getTitle or getRequired, it doesn't work. This is because the field is not apart of the default collection, and the previous method to retrieve the field only works in the context of admin.
I would prefer to add the field to the collection itself so anywhere I would access the options from a bundle, it would automatically be retrieved. IMO, it would be a much better solution to add the field to the collection then have to write multiple modifications to get it's value depending on where I am in the system. I also didn't see how to load a bundle product option directly. All answers I found are loading the bundle product, then iterating over it's options - which is expensive.


texts: Is it possible to generate a dependency graph of files included via RequireJS?

texts:
In Magento 2 lots of JavaScript files are loaded via RequireJS.
Those files, themselves, can also require more JavaScript files, and so on.
This can make it difficult to determine where a specific .js file actually comes from.
Is there a way we can view a hierarchical-style depdency tree of RequireJS calls, to see which file called require on the file currently being loaded?


texts: Error running SQL Query - Cannot truncate a table referenced in a foreign key constraint

texts:
I am trying to clear all test orders from Magento 2.2.x using this SQL query in my PHPMyAdmin but I'm getting an error.
Here's the query I am running:

SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE `sales_order`;
TRUNCATE `sendfriend_log`;
TRUNCATE `wishlist`;
TRUNCATE `report_event`;

ALTER TABLE `sales_order` AUTO_INCREMENT=1;
ALTER TABLE `sendfriend_log` AUTO_INCREMENT=1;
ALTER TABLE `wishlist` AUTO_INCREMENT=1;
ALTER TABLE `report_event` AUTO_INCREMENT=1;

The error I am getting is:

  SQL query:

  TRUNCATE `sales_order`
  MySQL said: Documentation

  #1701 - Cannot truncate a table referenced in a foreign key constraint (`store`.`downloadable_link_purchased`, CONSTRAINT `DOWNLOADABLE_LINK_PURCHASED_ORDER_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `store`.`sales_order` (`entity_id`))


texts: Can't run composer command programmatically in magento 2

texts:
I am using php shell_exec method to run the magento commands in my controller.
Below is my controller code.
<?php
 namespace Vendor\Module\Controller\Adminhtml\Migrate;
 use Psr\Log\LoggerInterface;
 class Index extends \Magento\Backend\App\Action
{
 protected $resultPageFactory;
 protected $migrationHelper;
 protected $logger;

public function __construct(
    \Magento\Backend\App\Action\Context $context,
    \Magento\Framework\View\Result\PageFactory $resultPageFactory,
    LoggerInterface $logger
) {
    $this->resultPageFactory = $resultPageFactory;
    $this->logger = $logger;
    parent::__construct($context);
}

/**
 * Execute view action
 *
 * @return \Magento\Framework\Controller\ResultInterface
 */
public function execute()
{

    $commandCache = "php bin/magento cache:enable";
    shell_exec($commandCache);

    try{
        $m2version = 2.3.4;
        $commandRepo = "composer config repositories.magento composer https://repo.magento.com";
        $this->logger->info('--commandRepo--'.$commandRepo);
        shell_exec($commandRepo);
        $commandVersion = "composer require magento/data-migration-tool:".$m2version;
        shell_exec($commandVersion);

    }catch(\Exception $e){
        $this->logger->info('--exception--'.json_encode($e->getMessage()));
    }
  }
}

In the above code, cache enable command is working, but I am downloading data-migration tool using composer, but that command is not working, if I run the command manually in shell prompt, its working.
Is there anything else I have to make change?
Can someone please help me on this. Thanks in advance!!


texts:
I am using Magento 2.1.5, and I created 4 customer attribute. I need to set the condition like if any one of the fields is filled, customer session will start.

for one field I am getting the result, but I don't understand how to put this condition for 4 fields.

$customerCollection=$this->customerObj->getCollection()
    ->addAttributeToSelect("*")
    ->addAttributeToFilter("customer_attr1" ,$this->_customerSession->getCustomerId());

foreach ($customerCollection as $value) {
        array_push($arry,$value->getData("entity_id"));
    }

In this "customer_attr1" is one attribute. like same 4 other field is there "customer_attr2" "customer_attr3" "customer_attr4".

How to set a condition like if any one field is true, return true.


texts: Dynamic code for logo src for use in email templates, possibly using short tags?

texts:
Please correct my terminology.

Magento apparently allows "pseudo-code" like this in email templates (and elsewhere I suppose):

{{htmlescape var=$order.getBillingAddress().getName()}}

It mixes right in with the html to create dynamic output.

Now, I know you can do this in php to get the logo src:

<?php echo $this->getLogoSrc() ?>

Is there any way I can do this in the email templates? Every time we change our logo, we have to change the hard-coded img src in the email templates as well.


texts: Remove or Stop item to cart from observer

texts:
Is there any way that we can remove the Items from the cart. Actually I have dynamic Grouped products were I need to allow the user to buy the item inside the grouped product. Now when someone only select the Item under the grouped product then it allow to buy that and need to stop or remove the group product from the cart.

I had tried with checkout_cart_product_add_after Observer and used below logic, but it is not working

$cartHelper = Mage::helper('checkout/cart');
            $items = $cartHelper->getCart()->getItems();
            foreach ($items as $item) {
            if ($item->getProduct()->getId() == $productId) {
                $itemId = $item->getItemId();
                $cartHelper->getCart()->removeItem($itemId)->save();
              break;
           }
       }
return;

Please help me guys.

Thanks in advance.


texts: Magento and Review (5 star rating- delete extra bullets)

texts:
Facing a problem, in the review section I have 5 stars, but there are additiona bullets. These blank bullets also show in the admin panel  in the review section when someone places a review. Any idea how to remove the remaining 5 bullets?

Path
app/design/frontend/base/default/template/review/form.phtm

    <form action="<?php echo $this->getAction() ?>" method="post" id="review-form">
    <fieldset>
        <?php echo $this->getChildHtml('form_fields_before')?>

<?php echo $this->__("You're reviewing:"); ?> <?php echo $this->htmlEscape($this->getProductInfo()->getName()) ?>

        <?php if( $this->getRatings() && $this->getRatings()->getSize()): ?>

<?php echo $this->__('How do you rate this product?') ?> *

                <col />
                <col width="1" />
                <col width="1" />
                <col width="1" />
                <col width="1" />
                <col width="1" />

                        &nbsp;
                        <?php echo $this->__('1 star') ?>
                        <?php echo $this->__('2 stars') ?>
                        <?php echo $this->__('3 stars') ?>
                        <?php echo $this->__('4 stars') ?>
                        <?php echo $this->__('5 stars') ?>

                <?php foreach ($this->getRatings() as $_rating): ?>

                        <?php echo $this->escapeHtml($_rating->getRatingCode()) ?>
                    <?php foreach ($_rating->getOptions() as $_option): ?>
                        <input type="radio" name="ratings[<?php echo $_rating->getId() ?>]" id="<?php echo $this->escapeHtml($_rating->getRatingCode()) ?>_<?php echo $_option->getValue() ?>" value="<?php echo $_option->getId() ?>" class="radio" />
                    <?php endforeach; ?>

                <?php endforeach; ?>

            <input type="hidden" name="validate_rating" class="validate-rating" value="" />

        <?php endif; ?>


texts: Main site categories that refer to pages of a subdomain

texts:
I have my main site www.example.com and a subdomain site.example.com

I need to make sure that from the main site, by clicking on certain categories of the menu, you are redirected to pages of the subdomain (site.example.com)

Are you able to do this?

With the URLs rewrite I can not get anything.
Thank you!


texts: Store code url not changed by saving from backend as well as change value in database(core_config_data)

texts:
UPDATE core_config_data SET value=0 WHERE path='web/url/use_store' and scope_id=0

i want to remove store code from website url but it doesn't work. even i change value in database and it revert to previous after change. it solved problem initially but it revert it value automatic.


texts: Redirecting to different customer account dashboards based on there customer groups

texts:
We have 4 groups namely

1.customer
2.Logistics
3.service provider
4.printer

The task is to get different dashboards based on customer groups when they login to the Frontend.

So please guide me step by step for redirecting to different dashboards according to the customer group they belong.

I have tried creating a views for each dashboard and using getcustomerId() and passing if else statement between Mage::getDesign()->setArea('dashboard') and Mage::getDesign()->setArea('dashboard1') but nothing worked out.


texts: Mysql connection With magento is unstable after upgrade

texts:
I am a beginner in magento. I have enabled the extension on my store.
After upgrade and compile,the mysql connection became unstable.
I have to start connection every time
Can anyone provide a solution


texts:
my site is www.e-miko.com and when:

I add a product to the cart
go to the checkout page
select payment method (cash delivery)
click the button confirm

I have a loop and I can't continue...

If I inspect the code I see these errors


texts: Get postcode and country_id from object mage 2

texts:
I get all data from checkout, with the next code:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
            $cart = $objectManager->get('\Magento\Checkout\Model\Cart');
            $shippingAddress = $cart->getQuote()->getShippingAddress();
            $perri = $shippingAddress->getData();

But i want to get only postcode and country_id from my object, if i use the next code, i can get the specific element:

$perri = $shippingAddress->getData('postcode');

If i use the next code,  the log show an error:

$perri = $shippingAddress->getData('postcode');
 $perri = $shippingAddress->getData('country_id');

How can i get both items?


texts: Customer transaction e-mails only partly translated

texts:
I have a language pack installed. That's giving my shop the language it needs. only when transactional mails are send out some parts are not translated.
I decided to add them myself in a nl_NL.csv file. But unfortunately that's not applied. So How to deal with this and where to have the csv file loacated? I know I could change the templates as well, but that's taking a lot of time and the parts I need are general "subject" phrases.

Like these:

"Your %store_name order confirmation","Uw Bestelling van %store_name"
"Your %store_name order has shipped","Uw Bestelling is verstuurd %store_name"
"Invoice for your %store_name order","Uw Factuur von %store_name"
"Your Order #%increment_id","Uw bestelling #%increment_id"

This is where I have the csv file now:

This is what the mail looks like now:


texts: Magento 2: i need update order summary when click custom option payment method checkmo

texts:
need to know is how to update the order summary like reloading the component when we do something like choosing a select payment terms

My code:

  view/frontend/web/js/payment/method-renderer/checkmo-method.js

getFee: function () {
    return window.checkoutConfig.payment.checkmo.fee;
}

  view/frontend/web/js/action/payment/select-payment-method.js

    define(
    [
        'jquery',
        'ko',
        'Magento_Checkout/js/model/quote',
        'PCarts_PaymentFee/js/action/checkout/cart/totals'
    ],
    function($, ko ,quote, totals) {
        'use strict';
        var isLoading = ko.observable(false);

        return function (paymentMethod) {
            quote.paymentMethod(paymentMethod);
            totals(isLoading, paymentMethod['method']);
        };
    }
);

  view/frontend/web/template/payment/checkmo.html

    <input type="radio"
           name="payment[fee]"
           class="radio"
           data-bind="attr: {'id': fee}, value: fee" />

Tanks for the help!


texts: Why is a simple product not added to the cart for the first time?

texts:
When the page is loaded, for special customers products are added to the cart

automatically, for a bundle products it works good, but for a simple product

only the product name is added in the first time after the first time it works

normally, can someone help?

$data = [

   'qty' => $products_count,

    'product' => $products_id,

    'bundle_option' => $selectionProds,

    'bundle_option_qty' => $selectionQty

     ];

     $this->_cart->addProduct($_product,$data);

     $this->_cart->save();


texts: Magento 1.9.3.2 search returns empty result

texts:
After upgrading the magento search is not working.

I tried this https://magento.stackexchange.com/a/67952

  SELECT e.*, search_result.relevance, price_index.price, price_index.tax_class_id, price_index.final_price, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS minimal_price, price_index.min_price, price_index.max_price, price_index.tier_price, cat_index.position AS cat_index_position FROM catalog_product_entity AS e
   INNER JOIN catalogsearch_result AS search_result ON search_result.product_id=e.entity_id AND search_result.query_id='43'
   INNER JOIN catalog_product_index_price AS price_index ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0
   INNER JOIN catalog_category_product_index AS cat_index ON cat_index.product_id=e.entity_id AND cat_index.store_id='1' AND cat_index.visibility IN(3, 4) AND cat_index.category_id = '2'

Result:

Array (
    [class] => Mage_CatalogSearch_Model
    [resourceModel] => catalogsearch_resource
    [rewrite] => Mage_Core_Model_Config_Element Object
        (
            [layer_filter_attribute] => WeltPixel_LayeredNavigation_Model_CatalogSearch_Layer_Filter_Attribute
        )
)

When I checked the tables, I can find that catalogsearch_result table seems always empty. But catalogsearch_query and catalogsearch_fulltext tables have content.

Why this table shows empty?
How can I fix that?


texts: system.log: Warning: DOMXPath: :query() Invalid expression in /html/lib/Pelago/Emogriphier.php

texts:
I keep seeing the following lines in var/log/system.log after each transaction email is sent:

  2015-10-12T00:11:12+00:00 ERR (3): Warning: DOMXPath::query(): Invalid
  expression  in /html/lib/Pelago/Emogrifier.php on line 326
  2015-10-12T00:11:12+00:00 ERR (3): Warning: DOMXPath::query(): Invalid
  expression  in /html/lib/Pelago/Emogrifier.php on line 326
  2015-10-12T00:11:12+00:00 ERR (3): Warning: Invalid argument supplied
  for foreach()  in /html/lib/Pelago/Emogrifier.php on line 329
  2015-10-12T00:11:12+00:00 ERR (3): Warning: DOMXPath::query(): Invalid
  expression  in /html/lib/Pelago/Emogrifier.php on line 326
  2015-10-12T00:11:12+00:00 ERR (3): Warning: DOMXPath::query(): Invalid
  expression  in /html/lib/Pelago/Emogrifier.php on line 326
  2015-10-12T00:11:12+00:00 ERR (3): Warning: Invalid argument supplied
  for foreach()  in /html/lib/Pelago/Emogrifier.php on line 329

Someone knows what could cause this?

Thanks for your help!


texts: Magento 2 How to Add File Uploader Field in Admin Form UI Component, which allows uploading all types of files?

texts:
Magento 2 How to Add File Uploader Field in Admin Form which allows uploading all types of files?
Also, how can we display thumbnails for uploaded files in admin edit form?
I am using the UI Component form for curd operation.
Anyone has any idea about it, please share.


texts: Can't find where my meta title for the homepage is pulling from - Magento 2.3.6

texts:
So I'll start by saying I'm not a coder, I just work on the 'front end' in Magento 2. I've updated all our sites meta details for products, categories and content pages, but I can't find where to update the homepage.
I checked the content page that was set as the CMS homepage in Stores -> Configuration -> General -> Web -> Default Pages -> CMS Home Page. Went to that page in Content -> Pages, and the metas in there were blank and not showing what is currently displaying (it's clearly been entered somewhere as it isn't text from our hompage). I did enter the new info here just in case but it didn't work.
I also checked in configuration > design > HTML Head to make sure it wasn't a default, but it's not there either.
Is there anywhere else this information could be stored? I don't know how to access or run any code so if that is what needs doing I can ask our techs, but it seems like it should be something I should be able to update!


texts: How to add new phtml block to existing container?

texts:
:)

I made a module in "app/code". Now I created the structure and made a new phtml file called "socialbuttons.phtml".

I created a file called "catalog_product_view.xml" and want to include my "socialbuttons.phtml" inside the container "product.info.social" there.

The Container does currently look like this:

<container name="product.info.social" label="Product social links container" htmlTag="div" htmlClass="product-social-links" after="product.info.overview">
                    <block class="Magento\Catalog\Block\Product\View" name="product.info.addto" as="addto" template="product/view/addto.phtml">
                        <block class="Magento\Catalog\Block\Product\View\AddTo\Compare" name="view.addto.compare" after="view.addto.wishlist"
                               template="Magento_Catalog::product/view/addto/compare.phtml" />
                    </block>
                    <block class="Magento\Catalog\Block\Product\View" name="product.info.mailto" template="product/view/mailto.phtml"/>
                </container>

I want to include my "socialbuttons.phtml" in the first row after "container". How do I do that? What do i need to put into my custom made catalog_product_view.xml?

I tried this now in my module:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<css src="ShareExtension_socialshare::css/mycss.css"/>
</head>
<body>
<referenceContainer name="product.info.social">
<block class="Magento\Catalog\Block\Product\View" name="product.info.share" template="product/view/socialbuttons.phtml"/>
</referenceContainer>
</body>
</page>

This didnt work.


texts: how change the top left logo in admin back-end (dashboard) by code

texts:
i am using Magento 2.2 and i want to change thee default Magento admin panel logo on the top left in admin backend, i have change the default for admin login page but it's not applicable for the admin top left logo

can anyone give me any idea please?


texts: calling css from theme folder using xml layout

texts:
i want to call css from theme folder using xml layout, below is code i am using:

<action method="addCss"><stylesheet>design.css</stylesheet></action>

which calls css from below path:

http://URL-HERE/skin/frontend/base/default/design.css

but it call wrong css file i want to call it from current theme folder

like :

http://URL-HERE/skin/frontend/smartwave/porto/css/design.css

How can i fix it


texts:
Currently we don't use version control for our Magentoshops. Normally we use Subversion/SVN, but when a colleague installed magento, he said it would be too many files, too much trouble with SVN. Our magento installation has 120.000 files in 40.000 folders. That means 40.000 subfolders for SVN, plus the files inside there.

We do have backups for the last 30 days, and as I have copies of the installation in a local VM, I have those snapshots and can go back one year. But for both it's trial and error finding something useful (although the snapshots really are super).

I'm thinking about installing GIT, maybe even only using a local repository. I understand it only has one .git file in the root, so we don't get thousands of files and subfolders.

Can I do this locally without messing the server up too much? What do you use?


texts: Updated the M2E extension via Magento Connect and now I receive blank pages

texts: I noticed Magento was kind enough to remind me that I need to update the M2E Ebay Store Extension. I did so through Magento Connect and now I get nothing but blank pages on both the front end and admin end of the site so I'm stuck with blank pages and not sure what to do. I appreciate any help!


texts: Custom Model Relationship (CMS Page + Product)

texts:
I am trying to assign a Product Object to a CMS Page Object, so when you have the CMS Page Object, you can do something like this:

$product = $page->getProduct();

I have modified the CMS Page Form to have an input field for the Product ID, which saves to the database. I have then created a Custom ReadHandler for the CMS Page to set the relationship like so:

public function execute($entity, $arguments = [])
{
    if ($entity->getId()) {
        $additionalData = $this->resourcePage->getAdditionalData((int)$entity->getId());

        if (!is_null($additionalData)) {
            $additionalData = json_decode($additionalData, true);
            $entity->setData('additional_data', $additionalData);

            if (isset($additionalData['product_id'])) {
                $product = $this->productRepository->getById($additionalData['product_id']);
                $entity->setData('product', $product);
            }
        }
    }
    return $entity;
}

This works on the frontend when the page loads I can see the Product Object is within the CMS Page Object, and I can do $product = $page->getProduct();

However, when I load the page in the backend (for editing) I get this error:

  Uncaught Exception: Serialization of 'Closure' is not allowed in /vendor/magento/framework/Session/SessionManager.php:136

  Stack trace:

  0 /vendor/magento/framework/Session/SessionManager.php(136):
  session_write_close()

  1 [internal function]:
  Magento\Framework\Session\SessionManager->writeClose()

  2 {main} thrown in
  /vendor/magento/framework/Session/SessionManager.php on line 136

I am aware I can't serialize a Closure, but I can't change the Product Object which is what contains the Closures, which is why I am here...

I am guessing some standard Magento Backend functionality is causing this, but I cannot figure out how to get around it.


texts: Admin form select value from dropdown value save in database magento 1.9

texts:
I have created custom extension in Magento 1.9.

The idea is to add dropdown select  question field form the input value and upon saving, store it within database.

    public function getFieldOptionField()
    {
        $field = new Varien_Data_Form_Element_Text();
        $field->setName($this->getFieldName().'[{{index}}]['.$this->getFieldTextString().']')
            ->setId($this->getFieldId().'_{{index}}_'.$this->getFieldTextString())
            ->setStyle('width:300px!important;')
            ->setForm(new Varien_Data_Form())
            ->setAfterElementHtml($this->getIdHiddenField().$this->getDeleteHiddenField());

        return $this->toJSTmplHtml($field);
    }


texts: Simple Product is not associated with configurable product in magento 2.2.5?

texts:
I have Configurable product with 146 associated products.I want to add another associated product to configurable product.I am able to select the simple product but its not showing after save the configurable product.

Selected simple Product attribute set and configurable product attribute set both are equal and simple products have the selected configurable attributes also.

Please any one help?


texts: Multiple Magento SUPPEE Patches Not Installing

texts:
I am having issues applying patches to my Magento store, below I have included the current installed patches and a link to each log of the failing patches. I am unsure why half of these patches installed and the other half did not.

Magento ver. 1.9.2.1

Installed Patches:

SUPEE-9652
SUPEE-9767
SUPEE-10570
SUPEE-10975

Patches Failing To Install:

PATCH 10888: https://hastebin.com/misoxonede.cpp
PATCH 10752:https://hastebin.com/uxuqonodar.makefile
PATCH 8788: https://hastebin.com/eqixagurur.cpp
PATCH 5344: https://hastebin.com/lekitipafo.makefile


texts: How to create a category attribute to list all the searchable attributes of products?

texts:
I want to list all the searchable product attributes in a multiselect as category attribute.

Please see the attached screenshot.

 <?php
 /**
  * @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer
  */
 $this->startSetup();
 if (!$this->getAttribute('catalog_category', 'content_after_products')) {
     $this->addAttribute('catalog_category', 'content_after_products', array(
         'group'                    => 'General Information',
         'input'                    => 'textarea',
         'type'                     => 'text',
         'label'                    => 'Content After Products',
         'backend'                  => '',
         'visible'                  => true,
         'required'                 => false,
         'wysiwyg_enabled'          => true,
         'visible_on_front'         => true,
         'is_html_allowed_on_front' => true,
         'global'                   => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
     ));
 }
 $this->endSetup()


texts:
I added items from Wishlist to my cart.

After you go to the cart page, you will be notified that the item has been added.

But the cart is empty.

Please tell me the solution.


texts: Pragmatically Convert a time to another times zone time

texts:
I am trying to do something like:

My instance Locale default Timezone zone is  Taipei Standard Time (Asia/Taipei)
For a particular case,I want to get  my current time in Tokyo Standard Time (Asia/Tokyo) time.
How can i do this?Please help.

Suppose $order->getCreatedAt() give order creation time.

I would like something like:

$CurrentimeTaipeAsia=$order->getCreatedAt();
$currenttimeinTokyo=Mytimeconvert($order->getCreatedAt());

$currenttimeinTokyo give order create time in Tokyo time .


texts: I need override a model in third party extension

texts:
I'm doing this to override the model in other extension, but doesnt works

    <global>
    <modules>
        <!--<sitemap_resource>
            <rewrite>
                <cms_page>CT_OverwriteXml_Sitemap_Model_Resource_Cms_Page</cms_page>
            </rewrite>
        </sitemap_resource>-->
        <aw_blog>
            <rewrite>
                <sitemap>CT_OverwriteXml_Model_Sitemap</sitemap>
            </rewrite>
        </aw_blog>
    </modules>
</global>

The other extension have something like this

...
            <sitemap>
                <rewrite>
                    <sitemap>AW_Blog_Model_Sitemap</sitemap>
                </rewrite>
            </sitemap>
        </models>


texts:
I'm experiencing this issue with Magento 1.9.1 single store,

probably my database got damaged:

When I edit an existing category or add a new one the option to select if the category is anchored or not is not appearing

I have backups of some days ago but if there is another way to recover that would be better.

In the frontend some categories still have the layered navigation even if in the admin area I can't choose whether to enable it or not.


texts: How to Change hover Color of Configurable drop Down menu in Magento?

texts: It is showing blue color by default and i need to change to different color..


texts: Unable to get payment method from Observer class

texts:
I'm unable to get the payment method from the sales_order_save_after observer class in a custom module, i can get the orderId and Name but i have been unable to work out how to get the payment method (paypal, bank transfer etc)

My observer class:

class MyObserver implements ObserverInterface {

  public function execute(\Magento\Framework\Event\Observer $observer) {

      $order = $observer->getEvent()->getOrder();
      $orderId = $order->getId();
      $customerName = "";

      //$payment = $observer->getEvent()->getPayment();
      //$paymentmethod = $payment->getMethod();

      if ($order->getCustomerFirstname()) {
        $customerName = $order->getCustomerName();
      } else {
       // guest customer
        $billingAddress = $order->getBillingAddress();
        $customerName = $billingAddress->getFirstname() . ' ' .
        $billingAddress->getLastname();
      }

      $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/debug.log');
      $logger = new \Zend\Log\Logger();

      $logger->addWriter($writer);
      $logger->info('User has placed a new order. Order ID: ' . $orderId . '. Name: ' . $customerName . ". Payment Method: " . $paymentMethod);
 }

}

The $paymentmethod commented out throws an error :

 "Fatal Error: 'Uncaught Error: Call to a member function getMethod()
 on null in


texts: I hope this is the right category and someone can help point me in the right direction. I created an instance of a widget and have a static block associated to it. I have it placed to appear in the Category header. However, it is placed below the description and i would like to have up more and place it between the title and description of the category. Where or how can I control the exact placement of this widget inside of the category header? Please attachment. Thanks in advance.


texts: Magento 2 - Programmatically Check Magento Version (CE / EE)

texts: Does anyone know the best way a module can check if it is being executed on Magento 2 Enterprise Edition and which exact version number is being used?


texts: Binding ui components to observables in magento 2

texts:
I'm developing a custom step in magento2 checkout. I'm adding new fields dynamically by injecting appropriate XML in a plugin. New fields are ui components, children of a group (called additionalInformations) that is a child of new step view (uiComponent view). I would like to extend quote with an extra variable like additionalInformations and bind my group to that variable so the data could be accessible everywhere from quote singleton. Extending is quite simple using underscore:

_.extend(quote, {additionalInformations: ko.observable(null)});

My question is how can I bind my additionalInformations group in view to quote.additionalInformations observable?

I am an expert neither of Magento 2 nor knockout so please, guide me to do it in a better way if it is possible.


texts: How to add links to CMS page on default magento header in magento2

texts:
I had created a About US cms page from Admin panel(Content->Pages)

Now, i want to add link to this CMs page in the header of my website.

In the above image i want to add "About Us" link next to "CONTACT US".

This is my xml code

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="logo">
        <arguments>
            <argument name="logo_img_width" xsi:type="number">111</argument>
            <argument name="logo_img_height" xsi:type="number">50</argument>
        </arguments>
    </referenceBlock>
<referenceBlock name="top.links">
        <block class="Magento\Framework\View\Element\Html\Link" name="about-porto">
            <arguments>
                <argument name="label" xsi:type="string" translate="true">About Us</argument>
                <argument name="path" xsi:type="string">about-porto</argument>
            </arguments>
        </block>
</referenceBlock>
    <referenceContainer name="footer" remove="true"/>
    <referenceBlock name="report.bugs" remove="true"/>
    <referenceBlock name="catalog.compare.sidebar" remove="true"/>
    <referenceBlock name="wishlist_sidebar" remove="true"/>
</body>


texts: I search Cc Avenue  extension in Magento 2 but not any extension is display CCAvenue  extension. Please suggests the it is available or not available extension in Magento 2 Cc Avenue  extension.


texts:
I am experiencing some problems with Magento, when I load a product sometimes it works and sometimes I get just this:

The php memory is set to max for the webserver and compilation is enabled I have flushed the cache checked my files etc, I am not sure what the problem is, the page when it loads contains adjustable options powered by javascript, any ideas what this could be ?


texts: Set new order (especially PayPal Express Checkout) to 'pending'

texts:
I am using Magento 2.2. Usually all my orders are set to "Pending" except for "PayPal Express Checkout":
These orders are set to "Processing". Now I want to have new Paypal Express Checkout orders to be "Pending" aswell.

I already checked this post:
Set new order paid via PayPal Express to 'Pending'
but it did not work for me, maybe because it is Magento 1.

Does someone have a solution?


texts: Magento Product URLs are not preserving URL parameters

texts:
EDIT:

This seems to have been caused by my CREARESEO extension. I had to uninstall to find that out since disabling the extension fooled me into thinking it was something else. I am working on locating the file that is interrupting Magento's default redirect, any guidance would be greatly appreciated.

Original Post

  How can I debug product redirect?

  I am tracking products in Google Shopping by appending
  ?utm_source=google_shopping to the product URL. The problem is that
  for some reason Magento will not allow URL parameters on product URLs.

  If my product url is /product-one.html?this=parameter it 301 redirects
  to /product-one.html.

  EDIT: This only happens on product pages. If I append category or CMS page urls with URL parameters they work fine. That said, if my
  category URL is /recipes and I type the old URL of
  /recipes.html?this=parameter "?this=parameter" is lost.

  I have disabled my SEO extensions and when I do a var_dump of $request
  on line 202 of /mage/core/controller/varien/router/standard.php it
  knows that the requested URL has the parameters but it chooses not to
  preserve them in the redirect.

    object(Mage_Core_Controller_Request_Http)#35 (26) {
      ["_originalPathInfo":protected]=>
      string(33) "/cinnamon.html"
      ["_storeCode":protected]=>
      NULL
      ["_requestString":protected]=>
      string(33) "/cinnamon.html"
      ["_rewritedPathInfo":protected]=>
      array(5) {
        [0]=>
        string(7) "catalog"
        [1]=>
        string(7) "product"
        [2]=>
        string(4) "view"
        [3]=>
        string(2) "id"
        [4]=>
        string(4) "9736"
      }
      ["_requestedRouteName":protected]=>
      NULL
      ["_routingInfo":protected]=>
      array(0) {
      }
      ["_route":protected]=>
      string(13) "ajaxaddtocart"
      ["_directFrontNames":protected]=>
      NULL
      ["_controllerModule":protected]=>
      string(17) "FME_Ajaxaddtocart"
      ["_isStraight":protected]=>
      bool(false)
      ["_beforeForwardInfo":protected]=>
      array(0) {
      }
      ["_paramSources":protected]=>
      array(2) {
        [0]=>
        string(4) "_GET"
        [1]=>
        string(5) "_POST"
      }
      ["_requestUri":protected]=>
      string(37) "/catalog/product/view/id/9736?this=ok"
      ["_baseUrl":protected]=>
      string(0) ""
      ["_basePath":protected]=>
      NULL
      ["_pathInfo":protected]=>
      string(35) "/ajaxaddtocart/product/view/id/9736"
      ["_params":protected]=>
      array(1) {
        ["id"]=>
        string(4) "9736"
      }
      ["_rawBody":protected]=>
      NULL
      ["_aliases":protected]=>
      array(1) {
        ["rewrite_request_path"]=>
        string(32) "cinnamon.html"
      }
      ["_dispatched":protected]=>
      bool(true)
      ["_module":protected]=>
      string(13) "ajaxaddtocart"
      ["_moduleKey":protected]=>
      string(6) "module"
      ["_controller":protected]=>
      string(7) "product"
      ["_controllerKey":protected]=>
      string(10) "controller"
      ["_action":protected]=>
      string(4) "view"
      ["_actionKey":protected]=>
      string(6) "action"
    }

I modified the file mentioned above in hopes of forcing the parameters to be inherited by the rewritten rule to no avail.

 $requestedURL=$request->getRequestUri();
     $urlAliases=$request->getAliases();
     $urlAlias=$urlAliases['rewrite_request_path'];
     $parametersOfRequestedURL=strstr($requestedURL,"?",false);
     if($parametersOfRequestedURL){
         echo $newRequestURL=$urlAlias.$parametersOfRequestedURL;
         $request->setRequestUri($newRequestURL);
         var_dump($request);
         die;
         //$request->setRequestUri();
     }

Removed HTACCESS as it seems to not be a part of the problem. Will provide if requested.


texts: Removing product attributes from the order email

texts:
I have 3 attributes assigned to each product (size, color, logo).  All of my products are configurable products thus each SKU contains the size, color, and logo along with the actual SKU for the product (they were auto-generated during the creation process).  What I would like to show on the order email is just the product name, SKU, Qty, and subtotal and can not figure out how to remove the attributes from being displayed under each product ordered.  The issue for my client is typically there are multiple products purchased on each order and when printing the order via email it can get quite long. Below is what is shown today on the email under Item (I used '...' to simulate spaces):

Item..............................SKU.....................................Qty.................Subtotal

Mens Shirt.....................X123-Blue-Small-Logo1.......1.......................$20.00

Color

Blue

Size

Small

Logo

Logo1

What I would like to show is only the item name and NOT each attribute underneath.  Essentially it would look something like the below (I added '...' to simulate spaces):

Item.....................SKU...............................................QTY.................Subtotal

Mens Shirt............X123-Blue-Small-Logo1..................1.......................$20.00

Womans Shirt......X456-Blue-Medium-Logo2...............2.......................$30.00

Has anyone ran into this before and know where I can go to 'hide' the attributes from being shown on the order email.  I have been to many forums looking at the sales.xml and items.phtml files, however I have not yet found the exact place where the attributes are being called and displayed on the order email.  Any assistance would be greatly appreciated.


texts: If category only contains one product then link user directly to the product

texts:
Our category page child category links are generated using the code below. However, some categories only contain one product. If the category contains only one product is there a way to link directly to that product page rather than the category product listing page?

For example; the 'widgets' category contains only 1 product 'widget'. So rather than the code below generating a link to 'mywebsite.com/main-category/widgets.html' the link would go directly to 'mywebsite.com/widget-product.html

<?php
                //If there are sub categories
                $categories = $this->getCurrentChildCategories();
                $categoriescount = $this->getCurrentChildCategories()->count();
                if ($categoriescount > 0):
                ?>

                    <?php
                    //Loop through categories
                    foreach ($categories as $category):
                    ?>

                        <a href="<?php echo $this->getCategoryUrl($category)?>" class="cat-link"><?php echo $category->getName()?>

                        <a href="<?php echo $this->getCategoryUrl($category)?>" class="cat-image">
                        <?php
                        // If there is a thumbnail set for the category - Display it
                        if($imgUrl = Mage::getModel('catalog/category')->load($category->getId())->getImage()):?>
                        <img src="<?php echo $this->getBaseUrl()."media/catalog/category/".$imgUrl ?>" alt="<?php echo $this->htmlEscape($category->getName()) ?>" />
                        <?php endif; ?>

                    <?php endforeach; ?>

                <?php else:?>

No Sub Categories

<?php endif; ?>


texts:
I am sorry if this has been asked before, but I am getting a strange error with mysql whenever I try to load any of the non cached indexed pages, the admin backend seems to work fine, and any non product page like 404 or our location page works, and reindexing always fails.

I'm running 2.2.5 CE
On Ubuntu 16.04.5
PHP 7.0.30
MySQL 5.7.23-0ubuntu0.16.04.1
Server version: Apache/2.4.18 (Ubuntu)

Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[HY000]: General error: 1030 Got error 1 from storage engine


texts: Why payment method does not come in default-Magento 2.0.1

texts:
I need some clarification before proceeding payments methods. Already vendor folder have payment, paypal, offline payment module, it also in enable mode while checking app/etc/config.php. But while checkout page no payment option will come like netbanking, cash on delivery.

my question is Magento 2 have any default payment gateway integration or need to look any extension?

if need to look extension, what is the best and free extension available in the market for magento 2? .

I am searching in magento connect but all are magento 1.x


texts: Magento 1.9.2.4 - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY' while saving categories

texts:
I got the below error while saving some categories(not all categories)

2016-12-14T12:56:58+00:00 ERR (3):
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint    violation: 1062 Duplicate entry '0' for key 'PRIMARY'' in /var/www/vhosts/xxx.com/httpdocs/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /var/www/vhosts/xxx.com/httpdocs/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#2 /var/www/vhosts/xxx.com/httpdocs/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /var/www/vhosts/xxx.com/httpdocs/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /var/www/vhosts/xxx.com/httpdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `lo...', Array)
#5 /var/www/vhosts/xxx.com/httpdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `lo...', Array)
#6 /var/www/vhosts/xxx.com/httpdocs/lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `lo...', Array)
#7 /var/www/vhosts/xxx.com/httpdocs/app/code/core/Mage/Log/Model/Resource/Visitor.php(78): Zend_Db_Adapter_Abstract->insert('log_url_info', Array)
#8 /var/www/vhosts/xxx.com/httpdocs/app/code/core/Mage/Log/Model/Resource/Visitor.php(94): Mage_Log_Model_Resource_Visitor->_saveUrlInfo(Object(Mage_Log_Model_Visitor))
#9 /var/www/vhosts/xxx.com/httpdocs/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(423): Mage_Log_Model_Resource_Visitor->_beforeSave(Object(Mage_Log_Model_Visitor))
#10 /var/www/vhosts/xxx.com/httpdocs/app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Mage_Log_Model_Visitor))
#11 /var/www/vhosts/xxx.com/httpdocs/app/code/core/Mage/Log/Model/Visitor.php(189): Mage_Core_Model_Abstract->save()
#12 /var/www/vhosts/xxx.com/httpdocs/app/code/core/Mage/Core/Model/App.php(1338): Mage_Log_Model_Visitor->saveByRequest(Object(Varien_Event_Observer))
#13 /var/www/vhosts/xxx.com/httpdocs/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Log_Model_Visitor), 'saveByRequest', Object(Varien_Event_Observer))
#14 /var/www/vhosts/xxx.com/httpdocs/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#15 /var/www/vhosts/xxx.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(551): Mage::dispatchEvent('controller_acti...', Array)
#16 /var/www/vhosts/xxx.com/httpdocs/app/code/core/Mage/Core/Controller/Front/Action.php(75): Mage_Core_Controller_Varien_Action->postDispatch()
#17 /var/www/vhosts/xxx.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(422): Mage_Core_Controller_Front_Action->postDispatch()
#18 /var/www/vhosts/xxx.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#19 /var/www/vhosts/xxx.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#20 /var/www/vhosts/xxx.com/httpdocs/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#21 /var/www/vhosts/xxx.com/httpdocs/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#22 /var/www/vhosts/xxx.com/httpdocs/index.php(99): Mage::run('', 'store')
#23 {main}

Anyone face this already.. If so please help me out of this issue.


texts: How I can add security patch for magento 2.2.6 without updating magento

texts:
I have Magento 2.2.6
I want to update security patch
I have lost my server databases (maybe SQL injection)
my questions

1)How to update security patches?
2)Is it will helpful?
3)Is there any other ways to protect my Magento 2 store?


texts: Need to display tier price range on recently viewed products widget

texts:
I need to display the tier price min and max value in recently viewed products widget instead of regular price. It seems completely UI components involved. I found the file where I can see the component and html template.

<item name="regular_price" xsi:type="array">
   <item name="label" xsi:type="string" translate="true">Regular Price</item>
   <item name="component" xsi:type="string">Magento_Catalog/js/product/list/columns/final-price</item>
   <item name="bodyTmpl" xsi:type="string">Magento_Catalog/product/price/regular_price</item>
   <item name="sortOrder" xsi:type="number">2</item>
</item>

in vendor\magento\module-catalog\view\frontend\ui_component\widget_recently_viewed.xml

As I checked the model file,

/**
 * @inheritdoc
 */
public function getPriceInfo()
{
    return $this->getData('price_info');
}

/**
 * @inheritdoc
 */
public function setPriceInfo(PriceInfoInterface $priceInfo)
{
    $this->setData('price_info', $priceInfo);
}

in vendor\magento\module-catalog\Model\ProductRender.php.

As part of price info I need to send and set tier price as well. Because, price info does not render tier price. If it is set then I can able to display them through html file.

How can I display tier price value as range instead of regular price. Like below screenshot.


texts: Potential PHP problems with EE 1.13 or CE 1.8

texts: My client is on an old server running PHP 5.2.17, should I encourage him to upgrade to 5.3 or will it be ok?


texts: Adding PayPal Credit to Checkout (United Kingdom)

texts:
This may be a question for a PayPal forum but if you can help id really appreciate it.

I want to add the PayPal Credit Option to my checkout. I see that the setting shows up when the merchant location is the United States, but not for the United Kingdom. PayPal Credit is available for customers in the UK but I don't see how to add it to Magento.


texts:
I am using Magento ver. 1.9.2.4 with SM Market Template, we have delivery services to few cities, I want to have the city as dropdown list during checkout and to assign the delivery date and time based on each city.

For example we assign Pune city delivery within 2 days from the day order is placed and Bangalor city delivery within 24 hours.

I want the customer to be notified about his order delivery schedule and as well as the the delivery date and time to be included in the invoice contents.

Here, I am asking to suggest me with any available extension, code, idea or a tutorial which can be utilized with our platform in order to overcome this problem.


texts:
We are using the Amasty Gift card extension in our project that was developed into Magento2 enterprise edition & it's working fine for us.
We need to change the 'Balance' field validation from the admin side.
Core module path: vendor/amasty/module-gift-card-account/view/adminhtml/ui_component/amgcard_account_formnew.xml
Overridden file path: app/code/Ghanda/GiftCardAccount/view/adminhtml/ui_component/amgcard_account_formnew.xml
We already added Amasty module dependencies into the module.xml file.
Ui component file has been properly overriding but the validation of the balance calling from the Amasty core module. It should be calling from the overridden file, not the core module.


texts: Magento 2 - how to re-install missing foreign-key constraints?

texts:
I am using a third party extension.
I noticed that a constraint is missing by comparing with a fresh installation. This causes a bug when deleting an item of the extension.
Is there a command which is able to install missing constraints?
I've tried this:

delete entry of module from table setup_modules

php -f bin/magento setup:db-schema:upgrade
php -f bin/magento setup:db-data:upgrade
php -f bin/magento setup:upgrade

but none of these commands re-installed the missing constraint.

The only way I've found is deleting the table and the extension entry from the table setup_module and executing php bin/magento setup:upgrade, but this is too radical since I have to re-add the data


texts: Rename or delete 'My account' top link in header Magento 1.9

texts:
By now, I have 'My account' (with its dropdown menu) next to 'Log in' in my home page.

I want to only have a 'Log in' button that changes to 'Log out' when user is logged.

I've been trying with local.xml but couldn't succeed. I know I should edit something there but can't find out what.


texts: Programmatically trigger admin save action on product

texts:
I have been troubleshooting a problem for hours. I can't explain why, but the problem is resolved when I go to the product in admin and click "Save" for that product (without changing anything). I am guessing this has something to do with the batch upload.

I have written a script that loops through all products and then calls save(), but this doesn't have the same effect as saving the product via the admin controller action (see Mage_Adminhtml_Catalog_ProductController). Here is my basic script, I change the short description just for testing the save success:

#!/usr/local/bin/php

<?php
require 'app/Mage.php';
Mage::app();
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

$products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
foreach ($products as $product) {
    $product->load();
    echo 'Product: ' . $product->getId() . ' - ' . $product->getName() . "\xA";

    $product->setShortDescription('N/A');
    $product->save();
}
?>

Does anyone know how to programmatically trigger the admin save action? That is, I need to replicate clicking the 'Save' button for each simple product in the catalog.

Any help or suggestions are much appreciated!


texts: Magento 2. Migration. Map customer attribute

texts:
Can a customer_attribute be mapped during a M1 -> M2 data migration, if so can anyone provide any clues on how to do that?

e.g M1 attribute tel => M2 attribute telephone


texts:
I am having to revert Security Patch 8788 due to it not applying the patch properly. I have noticed that when I have tried the command

sh PATCH_SUPEE-8788_CE_1.9.2.4_v2-2016-10-14-09-42-47.sh -R

PATCH_SUPEE-8788_CE_1.9.2.4_v2-2016-10-14-09-42-47.sh: 14: PATCH_SUPEE-8788_CE_1.9.2.4_v2-2016-10-14-09-42-47.sh: 127: not found
PATCH_SUPEE-8788_CE_1.9.2.4_v2-2016-10-14-09-42-47.sh: 14: PATCH_SUPEE-8788_CE_1.9.2.4_v2-2016-10-14-09-42-47.sh: 127: not found
PATCH_SUPEE-8788_CE_1.9.2.4_v2-2016-10-14-09-42-47.sh: 25: PATCH_SUPEE-8788_CE_1.9.2.4_v2-2016-10-14-09-42-47.sh: 0: not found
Checking if patch can be applied/reverted successfully...
-e ERROR: Patch can't be applied/reverted successfully.

I have had a look further down for example and it says

The next patch, when reversed, would delete the file app/code/core/Mage/Centinel/Model/Api/Client.php,
which does not exist!  Ignore -R? [n]

I have replaced the files that were deleted by the Patch and when I have tried running the revert patch command, it has not reverted the patch. I have checked the applied patches file and

-e 2016-11-01 11:59:58 UTC | SUPEE-1533 | EE_1.12 | v1 | _ | n/a | SUPEE-          1533_EE_1.12_v1.patch | REVERTED
patching file app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php
patching file app/code/core/Mage/Adminhtml/controllers/DashboardController.php

When I have tried adding the Magento files that 1533 removes it now says:

    sh PATCH_SUPEE-1533_EE_1.12.x_v1-2014-10-03-04-00-32.sh
PATCH_SUPEE-1533_EE_1.12.x_v1-2014-10-03-04-00-32.sh: 14: PATCH_SUPEE-1533_EE_1.12.x_v1-2014-10-03-04-00-32.sh: 127: not found
PATCH_SUPEE-1533_EE_1.12.x_v1-2014-10-03-04-00-32.sh: 14: PATCH_SUPEE-1533_EE_1.12.x_v1-2014-10-03-04-00-32.sh: 127: not found
PATCH_SUPEE-1533_EE_1.12.x_v1-2014-10-03-04-00-32.sh: 25: PATCH_SUPEE-1533_EE_1.12.x_v1-2014-10-03-04-00-32.sh: 0: not found
Checking if patch can be applied/reverted successfully...
-e ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php.rej
patching file app/code/core/Mage/Adminhtml/controllers/DashboardController.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Adminhtml/controllers/DashboardController.php.rej

I am not sure what to do here. As I assumed it would be a simple process of reverting the security patch. I am using GitHub and doing it all via Version Control, is there a method I could use via that?


texts:
I using one page checkout plugin on magento 1.9.4.
https://www.iwdagency.com/extensions/one-step-page-checkout-m1.html

On checkout page, when i change payment method I get below error,

Not connect. Verify Network. Ajax error.

Can You help me? How i can fix it?

Thank


texts: Magento 2.3.4 installation error on Xampp winodws 10

texts:
Getting following error,
Running Magento Commands return : Class Magento\Framework\App\ResourceConnection\Proxy does not exist

How to install Magento 2 on xampp windows 10.


texts: Magento 1.x: Is it possible to rewrite classes in website level?

texts:
I need to rewrite some classes per website level in Magento 1.x. Is it possible?

Basically looking some way as If website is "A" then rewrite this class & its method. But if website is "B" then don't do anything.

As for layout control per website we can do this & if we disable mymodule from backend per website my layout will not be visible.

    <layout>
        <updates>
            <mymodule module="Akhil_Mymodule">
                <file>mymodule.xml</file>
            </mymodule>
        </updates>
    </layout>

Like same way can we do something for rewrite also?


texts: How to filter Multiselect in Magento 2 search Rest API?

texts:
I am using magento search rest api. Now i can filter attributes like neck, sleeve, etc.., but i need to give multiple values for same attribute (like mulitple select)

My Request:

rest/V1/search?searchCriteria[requestName]=quick_search_container
&searchCriteria[filterGroups][0][filters][0][field]=category_id
&searchCriteria[filterGroups][0][filters][0][value]=18
&searchCriteria[filterGroups][1][filters][0][field]=filter_color
&searchCriteria[filterGroups][1][filters][0][value]=20
&searchCriteria[filterGroups][1][filters][0][conditionType]=eq
&searchCriteria[filterGroups][1][filters][1][field]=filter_color
&searchCriteria[filterGroups][1][filters][1][value]=22
&searchCriteria[filterGroups][1][filters][1][conditionType]=eq

when multiselect the same attribute(filter_color) it gives the last filter values(for filter_color= 22) only.

And when i am using conditionType = IN like
&searchCriteria[filterGroups][1][filters][0][field]=filter_color
&searchCriteria[filterGroups][1][filters][0][value]=20, 22
&searchCriteria[filterGroups][1][filters][0][conditionType]=in
 it gives the result of 0 record. So how to get both attributes filtered items and its aggregation


texts: How can I get a custom attribute in my custom shipping carrier file

texts:
I have created a custom attribute "test" in my customer address follwing the
magento docs add new  feild in shipping address
Now this attribute is required in my custom shipping method for rate calculation.
I can see the custom attribute is sent through ajax param in estimate-shipping-method ajax call.
My test field n checkout address

The custom attribute being sent in the ajax request

But I'm not getting this custom attribute in the estimateByAddress define in class

Magento\Quote\Model\ShippingMethodManagement
on printing the getCustomAttributes()

it's returning null.
Please Help. Thanks.


texts: Magento2: override vendor language package

texts:
I've installed the Magento2 language pack (nl_NL) from Crowdin via composer. The package is located in the vendor/magento2translations folder. I want to add some custom translations which will override the translations from the package.

Is there a possibility to add translations which will override the language pack translations? I already created a custom language pack in the app/i18n folder, added translations to my theme, added a module with translations, but none of these will override the translations from the language pack.

If I remove the translation from the language pack, it will get the right translation from my theme folder. But that isn't a solution, because our deployment automatically gets the last version of the language pack so it will be overwritten.


texts: Running observer after “Billing Information” and "Shipping Information" in Magento onepage checkout

texts:
I am trying to run an observer directly after the user has clicked 'submit' on the 'Billing Information' and also on "Shipping Information" on the onepage checkout in Magento.

Here is the code

<events>
<controller_action_predispatch_checkout_onepage_saveBilling>
  <observers>
      <test_orderlog_price_observer>
          <type>singleton</type>
          <class>Test_Orderlog_Model_Price_Observer</class>
          <method>afterBillingMethod</method>
      </test_orderlog_price_observer>
  </observers>
</controller_action_predispatch_checkout_onepage_saveBilling>
</events>

<events>
<controller_action_predispatch_checkout_onepage_saveShipping>
  <observers>
      <test_orderlog_price_observer>
          <type>singleton</type>
          <class>Test_Orderlog_Model_Price_Observer</class>
          <method>afterShippingMethod</method>
      </test_orderlog_price_observer>
  </observers>
</controller_action_predispatch_checkout_onepage_saveShipping>
</events>

Earlier this event was working fine,but currently it has stopped working..

but when i changed the saveBilling to savebilling  and saveShipping to saveshipping,then now its working,its very Strange.
Now why its working ?

Current working code..

<events>
<controller_action_predispatch_checkout_onepage_savebilling>
  <observers>
      <test_orderlog_price_observer>
          <type>singleton</type>
          <class>Test_Orderlog_Model_Price_Observer</class>
          <method>afterBillingMethod</method>
      </test_orderlog_price_observer>
  </observers>
</controller_action_predispatch_checkout_onepage_savebilling>
</events>

<events>
<controller_action_predispatch_checkout_onepage_saveshipping>
  <observers>
      <test_orderlog_price_observer>
          <type>singleton</type>
          <class>Test_Orderlog_Model_Price_Observer</class>
          <method>afterShippingMethod</method>
      </test_orderlog_price_observer>
  </observers>
</controller_action_predispatch_checkout_onepage_saveshipping>
</events>


texts: Does anyone have a recommendation for integrating with Microsoft RMS? I'm looking to sync products (and inventory count) between the two systems, as well as pass sales orders from Magento to RMS. I've read up on some extensions on the Magento site that claim to do this but I was wondering if anyone in this forum can share their experience working with them, or with attempting this kind of integration themselves.


texts: How to display category ,subcategory and image on magento 1.9 on home page

texts:
I have to display category,subcategory and image on home page.I am using custom theme.

Foe example: My home page category,subcategory and image display is like below

Cat1                    Cat2                        Cat3
  Subcat1  Image           Subcat1      Image          Subcat1    Image
  SubCat2                  Subcat2                     Subcat2
  Subcat3                  SUbcat3                     Subcat3

Please help me how to do it.Its urgent please give me idea how to do it.

Many Thanks,
Padma


texts:
I get the following error returned when clicking Edit or Add New Customer in Admin >> Customers >> Manage Customers >> "Edit" or "Add New Customer"

  Fatal error: Call to undefined method Zend_CodeGenerator_Php_File::shutdown() in /var/app/current/lib/Zend/Log.php on line 366

Lines 363 to 367 highlighted below

{
    /** @var Zend_Log_Writer_Abstract $writer */
    foreach($this->_writers as $writer) {
        $writer->shutdown();
    }

How do I fix this?

We have not experienced this error before and the code within the files indicated in the error has not changed from prior application versions.

I should also add that when trying to Create a New Order on the backend, the Create New Customer button and links to existing customers do not respond when clicked. Not sure if the errors are related but they started at the same time.


texts:
We are using Magento with Wordpress and Composer to manage all dependencies.

To include Wordpress functionality in Magento we would normally modify the index.php file:

/**
 * Load Wordpress
 */
if (!strpos($_SERVER['REQUEST_URI'], 'admin') && !strpos($_SERVER['REQUEST_URI'], 'downloader')) {
    require_once(__DIR__ . '/../wp/wp-load.php');
}

However, because we are using Composer the index.php is not checkedin to source control and any modifications to it will be lost.

Is there a better way to include wp-load.php in Magento without modifiying the core index.php file?

Many thanks in advance.


texts:
After install wordpress and added DB for wordpress I have error:
The FishPig WordPress theme is installed but is not active. Please login to the WordPress Admin and enable it.

And i can't use wordpress pages because on pages i have
How to fix it? Please, help me)


texts: How to add admin logged in customer name in column in custom grid.?

texts:
I am adding one custom grid to my module in grid i want to add name of user who has edit or added new item. so how can I get it programatically?

here is my grid.php

<?php
class Maybe_Manager_Block_Adminhtml_Noticeboard_Grid extends Mage_Adminhtml_Block_Widget_Grid
{

        public function __construct()
        {
                parent::__construct();
                $this->setId("noticeboardGrid");
                $this->setDefaultSort("id");
                $this->setDefaultDir("DESC");
                $this->setSaveParametersInSession(true);
        }
        protected function _prepareCollection()
        {
                $collection = Mage::getModel("manager/noticeboard")->getCollection();
                $this->setCollection($collection);
                return parent::_prepareCollection();
        }
        protected function _prepareColumns()
        {
                $this->addColumn("id", array(
                "header" => Mage::helper("manager")->__("ID"),
                "align" =>"right",
                "width" => "50px",
                "type" => "number",
                "index" => "id",
                ));
                $this->addColumn("create_at", array(
                "header" => Mage::helper("manager")->__("Create At"),
                "index" => "create_at",
                ));
                $this->addColumn("created_by", array(
                "header" => Mage::helper("manager")->__("Created By"),
                "index" => "created_by",
                ));
                $this->addColumn("college_list", array(
                "header" => Mage::helper("manager")->__("Colleges"),
                "index" => "college_list",
                ));
                $this->addColumn("city_list", array(
                "header" => Mage::helper("manager")->__("Cities"),
                "index" => "city_list",
                ));
                $this->addColumn('action_edit', array(
                'header'   => $this->helper('manager')->__('Action'),
                'width'    => 15,
                'sortable' => false,
                'filter'   => false,
                'type'     => 'action',
                'actions'  => array(
                                    array(
                                        'url'     => Mage::helper('adminhtml')->getUrl('*/*/edit'),
                                        'caption' => $this->helper('manager')->__('Edit'),
                                    ),
                                    )
                ));

            $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
            $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));

                return parent::_prepareColumns();
        }

        public function getRowUrl($row)
        {
               return $this->getUrl("*/*/edit", array("id" => $row->getId()));
        }
        protected function _prepareMassaction()
        {
            $this->setMassactionIdField('id');
            $this->getMassactionBlock()->setFormFieldName('ids');
            $this->getMassactionBlock()->setUseSelectAll(true);
            $this->getMassactionBlock()->addItem('remove_noticeboard', array(
                     'label'=> Mage::helper('manager')->__('Remove Noticeboard'),
                     'url'  => $this->getUrl('*/adminhtml_noticeboard/massRemove'),
                     'confirm' => Mage::helper('manager')->__('Are you sure?')
                ));
            return $this;
        }


texts: Difference between Extend a layout and Override layout

texts:
In Magento2 currently, I override XML file using below way and make required changes.

  app/design/frontend/Vendor/Theme/Magento_Catalog/layout/default.xml

But I have seen in Magento dev docs different way to override XML.

  app/design/frontend/Vendor/Theme/Magento_Catalog/layout/override/theme/Magento/luma/default.xml

Can anyone explain what is the difference between Extend a layout and Override layout.


texts:
I'm having a bit of trouble understanding how to update a custom block that I include in a CMS page using XML.

I inset the block using the standard shortcode in the CMS page, which works fine:

{{block type="catalog/product_list" category_id="16"
template="catalog/product/slider_list.phtml"}}

I am trying to set the column count of this custom custom block; I've found that I need something like the following piece of XML:

<block type="catalog/product_list" name="catalog.product.slider_list"
template="catalog/product/slider_list.phtml">
    <action method="setColumnCount"><columns>4</columns></action>
</block>

I'm not exactly sure under which <reference /> block I should place the code...  I looked in catalog.xml, and if I try to place it between <reference name="root" />, I do not get the correct behavior.

Thank you.

P.S. I found a solution thanks to this thread. I'd still like to know how to update the block by using XML. The solution I've mentioned is by using the shortcode:

{{block type="catalog/product_list" block_id="my_block" category_id="16"
template="catalog/product/slider_list.phtml" column_count="4"}}


texts: In Magento 1.x How to add item to collection to the beginning?

texts:
It is possible to add element to the collection as the first element, similar to this method which adds element to the end?

$product = Mage::getModel('catalog/product')->load(15879);
$productCollection->addItem($product);


texts: MSRP does not show up product and list page

texts:
Even though there is a value for MSRP (Manufacturer's Suggested Retail Price), the value does not show up on neither the product page or category listing page. Obviously it would be desired to show store price and MSRP crossed out!

Is there a setting in admin to make it get displayed?


texts:
I would like to have in my pages prices shown with and without vat.
I set up that it shows both prices, but no matter what I do prices are always same.
Check:

  http://www.pro-orodje.si/montirke-centrirke/centrirni-stroji/avtomatski-centrirni-stroj-casb96an.html

with vat: 915€
without vat: 915€

915€ is price including vat.
When I go to manage products-prices I have there a window where I put price inside it says:
Price *    915
              [EUR] [Inc. Tax]

What can I do to have different prices, so price with or without vat?


texts: function displaying the number of found products in layered navigation filters in magento2

texts:
Which function is responsible for displaying the total count of products in the filters in the layered navigation.

ie) i need to get the count (eg 50 ) in my custom filterable attributes as well.

This is how i have overridden filter.phtml in my

\Vendor\LayeredNavigation\view\frontend\layout\catalogsearch_result_index.xml

<page layout="3columns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock class="Vendor\LayeredNavigation\Block\Navigation" before="-" name="catalogsearch.leftnav">
      <action method="setTemplate">
        <argument name="template" xsi:type="string">Vendor_LayeredNavigation::layer/view.phtml</argument>
      </action>
    </referenceBlock>

    <referenceContainer name="content">
        <block class="Magento\LayeredNavigation\Block\Navigation\FilterRenderer" name="catalogsearch.navigation.renderer" as="renderer" template="layer/filter.phtml"/>
    </referenceContainer>
</body>

di.xml

<preference for="Magento\LayeredNavigation\Block\Navigation\FilterRenderer" type="Vendor\LayeredNavigation\Block\Navigation\FilterRenderer" />