texts: magento 2 how to call a method from a block within a phtml

texts:
I have a block within a phtml file: the block is not associated with a controller.

echo $this->getLayout()
      ->createBlock("Top\CmsAndTemplatePages\Block\Cmspages")
      ->setTemplate("Top_CmsAndTemplatePages::categoryPages/rootblock.phtml")
      ->toHtml();

my question now is how do i call the methods of the block.

i.e within the class

Top-> CmsAndTemplatePages->Block->Cmspages is a method called

  $this->_toHtml()

how do i access this method from the phtml page


texts: Adding category filter to loaded product collection?

texts:
Magento 2.3.3
This is my code:
$_productCollection = $block->getLoadedProductCollection();
$values = [66];
$conditionType = "in";
$_productCollection->addCategoriesFilter([$conditionType => $values]);

I am trying to add a category filter to the collection, but it does not work. Any ideas why?
Thanks
Solution looks like this:
$_productCollection = $block->getLoadedProductCollection();
$_productCollection->clear();
$values = "66";
$conditionType = "in";
$_productCollection->addCategoriesFilter([$conditionType => $values])->load();


texts: why getColumnValues('product_id') not work for Mage::getModel('sales/quote_item') collection

texts:
I want to get all product_ids of quote_items without for loop.
 I don't use $cart = Mage::getModel('checkout/cart')->getQuote()->getAllVisibleItems();

I want to use below code
Below code not work and it throws error.Error is Fatal error:  Call to a member function getStoreId() on a non-object

Why below code  not work for getColumnValues('product_id')  ? Any idea ?

$quote_id = Mage::getModel('checkout/cart')->getQuote()->getData('entity_id');
            $collection = Mage::getModel('sales/quote_item')->getCollection()
                    ->addFieldToSelect('*')
                    ->addFieldToFilter('quote_id',$quote_id);
            print_r($collection->getColumnValues('product_id'));


texts: Magento 2 Async WebAPI: Data in topic must be of type mixed. array given

texts:
I'm using magento v2.3.4 and created a Magento 2 rest webapi function like this:
/**
 * POST for create brands api
 * @param mixed $data
 * @return array
 */
public function create($data);

I usually use the API using this URL:
http://m2.local/rest/V1/test/brands

with data like this:
{
    "data": [
        {
            "name": "Adidas",
            "type": "apparel"
        },
        {
            "name": "Nike",
            "type": "apparel"
        }
    ]
}

The problem arise when I tried to use the async function in the REST Webapi url:
http://m2.local/rest/async/V1/test/brands

Then I got the following error:

"error_message": "Data in topic "async.vendor.module.api.brandsinterface.create.post" must be of type "mixed". "array" given."


texts: Correct way to join core tables in magento 2

texts:
I am able to join table something like this..

$totalsales = $this->orderCollectionFactory->create()
                        ->addFieldToSelect('*')
                        ->addFieldToFilter('status', ['complete']);
 $totalsales->join(['item' => 'sales_order_item'], 'main_table.entity_id = item.item_id');

But MEQP2 Codesniffer gives following error.

 186 | WARNING | Data access method JOIN detected outside of Resource
     |         | Model

Please let me know the correct way of doing so.


texts: Translating Transactional Email Magento2

texts:
I have a magento2 store with two languages (en, es) and I would like that my customers receive their emails in the language they sign up with. (new account, forgot password, new purchase, etc).

I'm currently using crowdin module for most of my translations on the site.

I've tried translating the strings that are already in the english email template with the .csv that's in the magento2translations & no luck.

Can anyone explain me in detail how can I get the email translation done?


texts: Restrict shipping method based on product attribute

texts:
I'm trying to restrict a shipping method in afterCollectRates based on a custom product attribute (which I'm injecting with the help of catalog_attributes.xml
public function afterCollectRates(Tablerate $tablerate, $result)
{
    $items = $this->checkoutSession->getQuote()->getAllVisibleItems();
    foreach ($items as $item) {
        if ($item->getProduct()->getMyAttribute()) {
            return false;
        }
    }
    return $result;
}

This hides the shipping method if there's a product with the attribute in cart. However, I need the exact opposite. I need to hide the shipping method if no product in cart does have the attribute.
Obviously the cart can have products with and without the attribute, so I can not simply do !$item->getProduct()->getBulkgood() since the function only accepts return: false;
Any way to make this work?


texts: Grand total is storing as 0 while ordering the products in magento 2

texts: Before placing the order it shows correctly the order total but after placing the order, it stores the grand total as 0 in the database table. How to fix this problem?


texts: Filter collection with OR of AND condition

texts:
I want to filter a product collection with pairs of attributes match. For example get product collection which has (brand="Toyota" AND color="Red") OR (brand="Ford" AND color="Blue") OR (brand="BMW" AND color="White").
How can I do that with addAttributeToFilter or AddFieldToFilter?


texts: Magento 2 Stock Alert not working for every store

texts:
Hope you can help me. I could not find a specific thread regarding this issue.

I have a question regarding stock alerts in Magento 2.3.2. I have a multistore (with shop 1 through 5). They are basically translations.

The problem: When a product is in stock again Magento should send out stock alerts. It does so, but only for store 1, but not store 2/5.

I have checked the settings in Configuration > Catalog > Catalog. For every scope of the multistore Allow Alert When Product Comes Back in Stock is enabled.

I am kinda at a loss on how to proceed next. Is it a know Magento 2.3.2. bug or are there areas I haven't looked yet?

Thank you in advance for your help.


texts: Hide or remove all breadcrumbs from frontend

texts:
I want to remove all breadcrumbs from frontend.
Is there any short or quick way to remove it.
I tried to remove from back-end:

  web > default page > breadcrumbs to NO

But it is still showing on some pages.

Should I manually add xml to remove from each page/layout?

Any suggestions?


texts: How to load data value input correspond to value of option tag when an option tag is selected?

texts:
I set data successfully in option tag but dont know how to show data in input correspond to option tag which is selected.

Here is my code:

Index.phtml

<?php
$member = $block->getMembers();
?>
    <select id="member-id">
        <option selected disabled>Select an ID</option>
        <?php foreach ($member as $p): ?>
            <option value="<?= $p['member_id'] ?>">
                <?= $p['member_id'] ?>
            </option>
        <?php endforeach; ?>
    </select>

        Name
        <input type="text" name="name" id="name" value="value of name">

        Address
        <input type="text" name="address" id="address" value="value of address">

        Phone
        <input type="text" name="phone" id="phone" value="value of phone">

Block/Member.php

class Member extends Template
{
    ...
    public function getMembers()
    {
        return $this->customerFactory->create()->getData();
    }
    ...
}


texts: Is there a Magento2 module similar to Wordpress' Advanced Custom Fields that allows admins to add and manage custom fields to CMS and other pages through the GUI?


texts: Get Special Price products collections programmatically

texts:
I have created some products in magento admin panel by giving Special Price.

So how can I get only the Special Price Products collection programmatically in Observer.php?

I have created custom module to get all special price products.

Any help are welcome with thanks.


texts: Using the default Magento 2 template block class in a Module

texts:
I'm tying to add a simple block to the header using the default template class with the following code

<block class="Magento\Framework\View\Element\Template" name="test.trigger" template="trigger.phtml"/>

This is inside a container next to a custom class block I wrote so i know the containers and everything else all works. If I change the class to the same as my custom class it works.

So i can use my modules custom class and it will render out fine, how can i use the default template class without needing to extend it pointlessly in my module?


texts: How to hide special price based on a checkbox?

texts:
Some people want the ability to hide special price and only show retail price.
I want to do this in knockout by adding a class to the parent container. This class will be set based on a cookie that is set if someone checks a checkbox.
However, knockout isn't recognizing the connection with the checkbox. I keep getting an error saying "Unable to process binding "checked: function(){return checkedValue }
Message: checkedValue is not defined" or if I pass the id of the checkbox, I get an error saying can't load "Magento_Catalog/js/custom" even though that file shows in the network.
app/design/frontend/{vendor}/{theme}/Magento_Catalog/templates/product/list.phtml
    <div class="products wrapper <?= /* @noEscape */ $viewMode ?> products-<?= /* @noEscape */ $viewMode ?>" data-bind="css: {'hidePrice': checkedValue }">

        <input type="checkbox" data-bind="checked: checkedValue" id="checkbox-1">
    ...
    </div>
    <script type="text/x-magento-init">
    {
        "*": {
            "Magento_Ui/js/core/app": {
                "components": {
                    "customer": {
                        "component": "Magento_Catalog/js/custom",
                    }
                }
            }
        }
    }
    </script>

app/design/frontend/{vendor}/{theme}/Magento_Catalog/web/js/custom.js
define([
    'uiComponent',
    'jQuery',
    'ko'
], function (Component, $, ko) {
    'use strict';
    return Component.extend({
        defaults: {
            checkedValue: false,
        },
        initialize: function () {
            this._super();
            this.defaults.checkedValue = $.mage.cookies.get('hidePrice') ? $.mage.cookies.get('hidePrice'): 'false';
        },
        initObservable: function () {
            this._super().observe({ checkedValue: ko.observable(true) });

            this.checkedValue.subscribe(function (newValue) {
                if (newValue) {
                    $.mage.cookies.set('hidePrice', 'true', {});
                } else {
                    $.mage.cookies.set('hidePrice', 'false', {});
                }
            });

            return this;
        }
    });
});


texts: Difference between $this->getData() or $this->getResource()

texts:
In my Collection.php when i get the collection by $this->getData() is give me collection.

But it create some other problem for me .

Now i use $this->getResource() then problem solved But it not return data .

Can any one here, Please tell me why collection is empty when i use $this->getResource() ?

Thank you.


texts: magento2 text description is displaying question mark

texts:
Cut pile�is a process of�carpet�that is shaved, revealing the ends of the�carpet�fibre.�Cut

My text description is displaying question mark.
Following is the code being used to display description

<?= $_product->getData('paragraph_1'); ?>


texts: Overriding _getHtml function in topmenu.php makes navbar disappear

texts:
I'm trying to override the __getHtml function in topmenu.php

class Topmenu extends \Magento\Theme\Block\Html\Topmenu
{
    protected function _getHtml(
        \Magento\Framework\Data\Tree\Node $menuTree,
        $childrenWrapClass,
        $limit,
        array $colBrakes = []
    ) {
        $html = '';

        $children = $menuTree->getChildren();
        $childLevel = $this->getChildLevel($menuTree->getLevel());
        $this->removeChildrenWithoutActiveParent($children, $childLevel);

        $counter = 1;
        $childrenCount = $children->count();

        $parentPositionClass = $menuTree->getPositionClass();
        $itemPositionClassPrefix = $parentPositionClass ? $parentPositionClass . '-' : 'nav-';

        /** @var Node $child */
        foreach ($children as $child) {
            $child->setLevel($childLevel);
            $child->setIsFirst($counter === 1);
            $child->setIsLast($counter === $childrenCount);
            $child->setPositionClass($itemPositionClassPrefix . $counter);

            $outermostClassCode = '';
            $outermostClass = $menuTree->getOutermostClass();

            if ($childLevel === 0 && $outermostClass) {
                $outermostClassCode = ' class="' . $outermostClass . '" ';
                $this->setCurrentClass($child, $outermostClass);
            }

            if ($this->shouldAddNewColumn($colBrakes, $counter)) {
                $html .= '

';
            }

            $html .= '
_getRenderedMenuItemAttributes($child) . '>';
            $html .= 'getUrl() . '" ' . $outermostClassCode . '>' . $this->escapeHtml(
                $child->getName()
            ) . '' . $this->_addSubMenu(
                $child,
                $childLevel,
                $childrenWrapClass,
                $limit
            ) . '
';
            $counter++;
        }

        if (is_array($colBrakes) && !empty($colBrakes) && $limit) {
            $html = '

' . $html . '

';
        }

        return $html;
    }
}

It's the original function because I first wanted to test the override. But this makes the navbar completely disappear.

Overriding another function like _addSubMenu works, though.


texts:
I used this code for remove special character from text box.

$profile = $partner['profileurl'];
                                $profile = str_replace(' ', '-', $profile);
                                $profile = str_replace('_', '-', $profile);
                                $profile = str_replace('.', '-', $profile);
                                $profile = str_replace('!', '-', $profile);
                                $profile = str_replace('@', '-', $profile);
                                $profile = str_replace('#', '-', $profile);
                                $profile = str_replace('$', '-', $profile);
                                $profile = str_replace('%', '-', $profile);
                                $profile = str_replace('^', '-', $profile);
                                $profile = str_replace('&', '-', $profile);
                                $profile = str_replace('*', '-', $profile);
                                $profile = str_replace('(', '-', $profile);
                                $profile = str_replace(')', '-', $profile);
                                $profile = str_replace('=', '-', $profile);
                                $profile = str_replace('+', '-', $profile);
                                $profile = str_replace('?', '-', $profile);
                                $profile = str_replace('/', '-', $profile);
                                $profile = str_replace('<', '-', $profile);
                                $profile = str_replace('>', '-', $profile);
                                $profile = str_replace('|', '-', $profile);
                                $profile = str_replace('`', '-', $profile);
                                $profile = str_replace('~', '-', $profile);

                                $profile = strtolower($profile);
                                                                ?>
                                <div class="input-box">
                                     <input type="text" id="profileurl" name="profileurl" value="<?php echo $profile; ?>" title="Profile Url" class="input-text" />
                                </div>
                            </div>

But it have lot's of special charecter also i need to remove white space at end of the string.

I used rtrim function but first $profile = str_replace(' ', '-', $profile); i used this so both are conflicted first condition only working rtrim not working

How to fix it?


texts: How to display magento 2 swatches on category page

texts: How to move magento 2 swatches on category page


texts:
Synopsis

I've noticed constantly throughout forum threads, blog articles and Q&A many problems are caused through caching not being cleared.

I think I understand the basics with caching and indexing but i'm hoping someone with extensive knowledge could potentially clear this up for me.

I am not asking for information about NginX or Varnish and the likes, but specifically how Magento caches and indexes content.

There are times when I have physically removed the var/cache directory and let Magento rebuild it and things started to work.

Cache Management

Within the Admin Console under System > Configuration > Cache Management we have:

Flush Magento Cache;
Flush Cache Storage;

Can someone explain to me what caching pools are flushed by the above buttons?

Within the grid there are several default levels of caching for:

XML configuration (which i thought was just config.xml files but it seems is layout local.xml files included)
Layout XML: why is local.xml not cached here?
Collections data: exactly what is it that is being cached and where?
EAV types and attributes: I presume this is to do with associating attributes to catalog_product or customer?

On top of this there is additional caching for CSS/Javascript and Images:

Flush Catalog Images Cache;
Flush CSS/JavaScript Cache;

What are the above buttons flushing and how are those caches built?

Additional information

Can anyone explain any further information or link to an article that might help understand in more details how the caching works with Magento?


texts: Magento2 extend layout from vendor folder

texts:
I have a module which has a visual output and therefore I like to extend an existing layout.

From what I read the magento2 way is to add a ne layout in app/design/frontend (according to http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-extend.html)

So my structure looks like this:

app/code/design/frontend/Magento/luma/Magento_Catalog/layout/catalog_product_view.xml

catalog_product_view.xml

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <container name="product.info.media" htmlTag="div" htmlClass="product media" after="product.info.main">
                <block class="Magento\Catalog\Block\Product\View\Gallery" name="product.info.media.image" template="product/view/gallery.phtml"/>
            </container>
        </referenceContainer>
    </body>
</page>

The content block is not changing in any way, so there seems either to be something missing or I have a missunderstanding here.
Any help is appreciated.

EDIT

My magento2 code is from https://www.magentocommerce.com/download so everything is placed in vendor/. Maybe that's why it is not working ?!

Thanks


texts: How to filter catalogsearch result collection by custom conditions

texts:
I have some product in my magento store and want to filter catalogsearch result collection by some custom condition.

I am using a extra field date in magento serach box and I have a custom attribute "available".

If this attribute is set to no and selected date is after 5 days then product will not be showing in search result.

For this I have created a custom module and override Mage_CatalogSearch_Model_Layer getProductCollection function.

But how to add these condition to filter $collection?


texts:
Can i write over a module js file in Magento 2?

What are the cons doing it?
Are there any build in functions that allows me to write to a modules file (I know php allows it).

The problem - I have data in database that I want to use in autocomplete field. The idea is that when the data gets updated in databases then Magento 2 overwrites the file where the array of the file is stored?
Are there any cons when the array contains about 100+ variables?

What would demand more resource, fetching data from db with ajax or storing it in a js file?


texts:
By having this local layout xml, does magento system has already start generating the block based on core configuration, then reach to local xml it removes that block again? Or, Magento would consolidate all layout xml, then start to generating the block?

<layout>
    <default>
        <reference name="footer">
            <action method="unsetChild"><name>footer_links</name></action>
        </reference>
    </default>
</layout>

Pardon to ask this dummy question. Just having concern in system performance.


texts: Which, if any, MySQL / InnoDB (strict) modes to use?

texts:
I am using Percona Server 5.6 with Magento CE 1.8.  I originally used the percona tool to generate the my.cnf file that I am currently using.  It's been in play for 3-4 weeks now, and I haven't noticed any issues because of these settings as far as I can tell.  However, today, I was trying to consolidate a barely used database server which just held the data for a single wordpress install.  Suddenly, things that were working fine, were not working at all, and I was racking my brain until I finally realized that the set "sql_mode" values in the my.cnf were to blame.  Frankly, I don't know a ton about this setting, though I am quickly learning.  For a quick workaround, I have disabled all sql modes for the wordpress sessions, but it got me thinking - which of these modes, if any, do I need for Magento?  I don't want to disable it all and cause issues if I need some of these, nor do I want to leave any in play if they in fact are causing problems.

Can someone more informed than I tell me which I need to keep and which I should get rid of?  I am more looking for which ones are detrimental or necessary to the daily operation of magento.  If one happens to be, say, user preference, please note as such.  Unfortunately I have not been able to find much information about these options and Magento specifically with my Google-Fu.  I can take the time to research these if you don't feel like writing out an explanation, so don't feel obligated to explain every little detail.

[mysqld]
...
sql-mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY
...
innodb-strict-mode = 1


texts:
I am trying to use sections.xml to return some data(customerData) upon user login. What i want to do is to return customer navigation links in customerData. And i thought that i can achieve this with sections.xml. But i face the problem when trying to load the customer_account_navigation block that actually has those links.

Ok, so i made a module AccountNavigationLinks which has CustomerData directory with .php file. This file has getSectionData method.

public function __construct(
    Session $session,
    \Magento\Framework\View\LayoutFactory $layoutFactory,
    \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory

)
{
    $this->session =$session;
    $this->resultLayoutFactory = $resultLayoutFactory;
    $this->layoutFactory = $layoutFactory;
}

public function getSectionData()
{
    $layout = $this->layoutFactory->create();
    $layout->getUpdate()->addHandle('customer_account')->load(['default']); // i think i need to add this handle. but still unsure of load which handle should i pass into load method
    $layout->generateXml();
    $layout->generateElements();
    $data = $layout->getBlock('customer_account_navigation')->toHtml();
    return ['links'=> 'dome data']; // here i want to return an array of links or whatever i can get from account_navigation_links

}

So, i want to have that customer_account_navigation block in my response and then i will, hopefully, get those links. But i can't get that block in my $layout. How can i get those links returned anyway?

Hope to find some help.

Thanks.


texts: Adding custom attributes to product list

texts:
I'm very confused with a small issue in my catalog/product/list.phtml file.

i'm trying to add the Manufacturer attribute that comes with Magento to my grid listing and have added the following code.

<?php echo $_product->getAttributeText('manufacturer') ?>
<?php if( $_product->getAttributeText('manufacturer') ): ?>

Manufactured by:
<?php echo $_product->getAttributeText('manufacturer')?>

<?php endif; ?>

Now this is the same code I've used on my product/view.phtml page and it works there. But this doesn't work at all, the echo by its self or using it in the if statement. Both return nothing.

So I have to do something special to get these attributes on the list.phtml file?


texts:
For some reason we face a max_execution_time error of 60 seconds, when running some cronjobs.

Already checked php.ini file and both local and master value of max_execution_time are set to: 220000.

So that can not be the problem, but still we see the errors in the log files.

Does magento somewhere store the max_execution_time of 60 seconds (for cronjobs)?

See error in cron log:

[09-Aug-2018 05:35:31 UTC] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /app/code/core/Mage/Core/Model/Abstract.php on line 135
[09-Aug-2018 07:09:24 UTC] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php on line 1110
[09-Aug-2018 07:41:13 UTC] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php on line 549


texts: how to set a price rule for two specific individual products in magento

texts:
I have to create a shopping cart price rule for two specific products so that when I add these two products I got the discount on the total price.

I tried many conditions in the condition tab but it didn't happening. this is my condition tab

If ALL  of these conditions are TRUE :

If total quantity  is  2  for a subselection of items in cart matching ALL  of these conditions:
    SKU  is one of  zol_b_lrg, sport_b_lrg
    Frequently is 100

Now what is wrong with these condition.
I select the Fixed amount discount for whole cart from the Apply tab and set the value in the next tab eg 10

But nothing is happening. Help me with this please.

Thanks.


texts: What different between 'adding items in to cart' and ''adding item into quote'?

texts:
Using Magento 2.2, I need to add the simple and configuration products into the basket by REST API.

On the stack, I saw someone use cart and other use quote.

What the correct solution for add items?


texts: Customer cannot connect after migration fro Magento 1.9.4.2 -> Megento 2.4.1

texts:
we have migrated our store from magento 1.9.4.2 to magento 2.4.1 via the data migration tool but right now old customers cannot log in correctly in the store.
Every times we try to connect it's just refreshing the page and that's all.
We already run the php bin/magento customer:hash:upgrade and clean cache + reindex but nothing changed we still cannot login.
We can successfull login directly from login page in checkout but not from customer/account/login/
Does someone knows about this issue ?
Thank you in advance


texts: How to set cron schedule dynamically from database?

texts:
I have a module which is basically a grid and has entry for different jobs. Each entry here represent a cron and all these crons are mentioned in crontab.xml. Now I need to use the schedule from a Job entry present in the grid.
For eaxmple : Cron1, I want to use Job1 schedule from database.

I know we can use config_path from system settings but here it is not configuration it is present in the table of a collection so I can not put path of config directly.

Thanks..!


texts: Magento 2: How to create custom validation method

texts:
I have 2 fields for Month (both fields type is number), first one is for "From Month" and second is "To Month".

I want to restrict user to enter the less no. of month in "To Month" field as comparison to "From Month".

Suppose, user enter 8(no. of month) in "From Month" field so he can not enter the no. of month less than 8 in "To Month" filed. if he entered a value in "To Month" field less than "From field" then a validation message (please enter the month greater than "From Month") should be display after clicking on the submit button.

<?php
$monthFrom = $this->getRequest()->getParam('month-from');
$monthTo = $this->getRequest()->getParam('month-to');
?>

                    <?= __('From') ?>:

                        <input id="monthfrom" min="1" max="12" class="input-text month-from admin__control-text required-entry" type="number" placeholder="<?php echo __('') ?>" value="<?php
                        if ($monthFrom) {
                            echo $monthFrom;
                        } else {
                            echo "1";
                        }
                        ?>" name="month-from" />

                    <?= __('To') ?>:

                        <input id="monthto" min="1" max="12" class="input-text month-to admin__control-text required-entry month-validation" placeholder="<?php echo __('') ?>" type="number" value="<?php
                        if ($monthTo) {
                            echo $monthTo;
                        } else {
                            echo "12";
                        }
                        ?>" name="month-to" />

my script code is: (But it's not working)

Please help, How can I create a custom validation method which work according to my needs.

Any help will be appreciated.


texts: Magento 2 : How to Add Custom Fee To Authorized Amount In Backend Order View Page

texts:
I have to add my custom fee amount to authorized amount in backend oreder view comment section.

if anyone have any idea than please tell me.


texts:
I'm using an extension that allows only certain IP addresses to access my Magento admin. If someone tries to access my admin I get a message with the IP address.

Now I get messages that search engines crawlers try to access the URL of my admin page. First, they don't need to index those pages and second, I don't need to get a message every time a crawler tries to access these pages.

I know I can block access in my robot.txt, but then the URL of my admin page is public, while I just changed it to make it different from the default URL.

Is there another good way to block access to the admin URL completely?


texts: Two installation of Magento 2.1.7 each has a completely diff style-l.css

texts:
Anyone know why or came across where 2 installations of the same version have different styles especially the width of columns? e.g .page-layout-?
columns .sidebar-main changed from  20.83333333%; to 16.66666667%; which is quite considerably to me.

I've installed about 2 months ago 2.1.7 on my local server.
Now I have installed same version 2.1.7 on a remote server but this file totally different and I can tell I have not changed any of this core files.
Here is is link diff diffchecker.

Thank's.


texts: Migrate Magento Database to Another Server

texts:
I am trying to migrate our Magento database to another server. Here is what I have done

Cloned the current VPS server to another VPS
Turned off httpd in the new server that I want to be the dbserver
Logged into mysql in the dbserver as root
GRANT ALL ON dbname.* TO 'user'@'webserver_IP_address' IDENTIFIED BY
'password';
From the webserver I was able to login to Mysql in the dbserver
passing the IP address of the dbserver as the hostname
Renamed local.xml and tried to re-run Magento install wizard but
could not get passed the DB connection screen.

I am providing the exact username, the exact password, the only thing that change is the hostname which I am entering the IP address of the dbserver instead of localhost

How can I point Magento to use a different remote db other than localhost


texts: On ajax call Free item sometimes display on list and sometimes disappears

texts:
I have given small product free on purchase of big product.

Items get added in cart but while proceeding to checkout free item sometimes displays and sometimes it disappears.

Can anyone explain its shopping cart's functionality. How it get functioned.

Below is the page where item get disappears.

app\design\frontend\default\test\template\canderecheckout\onestep\review\item.phtml

Can anyone explain $_item = $this->getItem()?

When I refresh the page that time free product is getting deleted from sales_flat_quote_item table.

Is there any code if product price is zero then it will get deleted from sales_flat_quote_item table?


texts: Add Static Block Above Content On Every Page

texts:
I'd like to add a static block above the content on every page.

I've tried adding these to my local.xml but the block appears in the wrong place:

<default>
    <reference name="top.links">
        <block type="cms/block" name="head_images ">
            <action method="setBlockId"><value>head_images</value></action>
        </block>
    </reference>
</default>

And

<default>
    <reference name="after_body_start">
        <block type="cms/block" name="head_images ">
            <action method="setBlockId"><value>head_images</value></action>
        </block>
    </reference>
</default>

Any ideas?


texts: Move Customers, Products and orders to new site

texts:
I have just finished setting up a new site and I need to move the customers, products and orders/invoices to it from an existing Magento site.
Both are v2.3.5, I don't want to just transfer the complete database whats the best way of migrating them?
From what I have read the main issue is going to be with customer passwords


texts:
I am trying to change the top links in the layout.xml base on the store

 <STORE_german>
    <customer_logged_out>
        <reference name="top.links">
        <action method="addLink" translate="label title"><label>Sign Up</label><url>german-url</url><title>Sign Up</title><prepare>true</prepare><urlParams/><position>101</position><liParams>id="link-sign-up"</liParams>
        <aParams>
            <class>top-links-link</class>
        </aParams>
        </action>
       </reference>
   </customer_logged_out>
</STORE_german>

So here the only difference is that the url is now "german-url" however its not picking up. Could anyone advise where I am going wrong


texts: Index Management - Process taking a long time

texts:
I have an issue with my Index Management job stuck in "Processing". I have read about it and found out that I can check if the reindex process is running by checking in MySQL, which I did. It is showing that the process is "working".
I can also do a SHOW FULL PROCESSLIST command and see if there are any inserts or delete commands against the catalog_product_index_eav table, which I have done and there is indeed a process running for the last 2 days...
So it appears that the process is still running but it has been like this for 2 days... However, I am doing random:
SELECT COUNT(entity_id) AS total FROM catalog_product_index_eav;
statements on the database and the number is not changing.

My questions are:

Is it normal for this process to take so long? We have roughly 10,000
products in the store.
Can I stop this process, as it's preventing me from doing any other reindex job... and if so, would this have a negative affect?
What would happen if I delete the files in /var/locks while the process is running? I guess it would allow 2 index processes to run at the same time?

Thanks


texts: Mahento 2: How to incldue third party Library in package for sending to client installed by composer?

texts:
I have installed a library (TCPDF) by composer and it is working fine, but I need to send full package for client. How can I add library without composer?

I followed this but autoloader is not getting aware of the library by this way.


texts:
have a question, maybe somebody knows - how to add to deploy version only 1 pub static file in production mode without flush all deploy version.

For example, i have some customer-side uploader and needs to show these files, all is ok but when Magento setup on production mode these files not showing and needs regenerate all deploy version. maybe exists some ways to do this with only 1 file?

thanks...


texts:
I have Flat rate shipping as the standard for all of my products $6.95, but I have a category that needs to be $14.95 because it is a tube and cost more to ship.  How can I make $14.95 the default for that category only, and hide the Flat rate.

Right now my customers see both.


texts: How to add new table in existing module using UpgradeSchema in Magento 2

texts:
class UpgradeSchema implements  UpgradeSchemaInterface
{
public function upgrade(SchemaSetupInterface     $setup,ModuleContextInterface     $context){
$setup->startSetup();
            if (version_compare($context->getVersion(), '2.0.0', '<=')) {
            $installer = $setup;
            $installer->startSetup();

         $table = $installer->getConnection()
        ->newTable($installer->getTable('my_booster'))
        ->addColumn(
            'review_id',
            Table::TYPE_SMALLINT,
            null,
            ['identity' => true, 'nullable' => false, 'primary' => true],
            'Review ID'
        )
        ->addColumn('pros', Table::TYPE_TEXT, 255, ['nullable' => false], 'What I like about this product')
        ->addColumn('cons', Table::TYPE_TEXT, 255, ['nullable' => false], 'What I dislike about this product')
        ->addColumn('title', Table::TYPE_TEXT, 255, ['nullable' => false], 'Custom Title')
        ->addColumn('review_comments', Table::TYPE_TEXT, 255, ['nullable' => false], 'Custom  Comments')
        ->addColumn('send_to', Table::TYPE_TEXT, 255, ['nullable' => false], 'Send reply to Customer')
        ->addColumn('helpful', Table::TYPE_TEXT, 255, ['nullable' => false], 'Was this review helpful?')
        ->addColumn('product_quality', Table::TYPE_TEXT, 255, ['nullable' => false], 'Product Quality ')
        ->addColumn('Product Value', Table::TYPE_TEXT, 255, ['nullable' => false], 'Product Value')
        ->addColumn('product_price', Table::TYPE_TEXT, 255, ['nullable' => false], 'Product Price')
        ->addColumn('image', Table::TYPE_TEXT, 255, ['nullable' => false], 'Viemo');

        $installer->getConnection()->createTable($table);
        $installer->endSetup();
    }
}

}

I am using this script.


texts: Magento2 + Fishpig Wordpress Integration - Wordpress RSS Feed Not Working

texts: I am using Magento2 + Fishpig Wordpress Integration. WordPress Rss feed not working  in my project. Please help me how to solve this issue.


texts: Magento 2, include plaintext version of html mail

texts: How can I include a plaintext version of my html mail in Magento using the transportbuilder?


texts:
Our store has blanket free shipping in the UK, and flat rate shipping elsewhere.

I need to create a shopping cart rule (discount code) for 50% off everything, but I also need that code to trigger the shipping to be chargable.

So let's say the cart is £100 with free shipping, the user enters a 50% discount code, the new total would be £50cart + £5 shipping.

Is this possible?


texts: Force inserted new lines below the totals in Magento PDF invoice

texts:
I have been able to insert new lines on my pdf invoice. It is working perfectly with positioning in right place.

However, when invoice content gets bigger but only total part goes to second page, my inserted new lines don't go to second page.

If products are moving to second page then only those new lines moves to second page after total.

I have tried with setting $this->y -=10 (any number), but it keeps moving in first page.

How do I force them to be below the total all the time? Any idea on this?

UPDATE 1

Screenshots:


texts: How do you void a shipment in Magento 2? I didn't see an option for this in the Admin GUI.


texts: Code for buy one get one free adds free products for all products in cart

texts:
I have modified this code below to add a buy one get one free for all products of a category id 525 but when product of this category is added, it gives one free product for all products in cart. How do I filter this code so that it gives one free if only a product from category 525 is added. Thanks

$cartItems = $quote->getAllVisibleItems();
    foreach ($cartItems as $item) {
    $Qty1 = $item->getQty();
    if(($Qty1=>1) && ($rule->getGiftSku()=='TBFTIGI009')){

                  $f1product = $item->getProduct();
                  $f1_productsku =$f1product->getSku();
                   //$rule->setGiftSku($f1_productsku);
                  $freeItem1 = static::_getFreeQuoteItem($quote, $f1_productsku, $item->getStoreId(), (int)$rule->getDiscountAmount());

                  $quote->addItem($freeItem1);
                  $freeItem1->setApplyingRule($rule);
                  $rule->setIsApplied(true);           }
    }
    ////

    /** @var Mage_Sales_Model_Quote_Item $freeItem */
    $freeItem = static::_getFreeQuoteItem($quote, $rule->getGiftSku(), $item->getStoreId(), (int)$rule->getDiscountAmount());
    if ($freeItem && $rule->getGiftSku()!='TBFTIGI009')
    {
        $quote->addItem($freeItem);
        $freeItem->setApplyingRule($rule);
        $rule->setIsApplied(true);
    }
    else
    {
        Mage::log(
            sprintf(
                'C4B_Freeproduct: Gift product not saleable. Rule ID: %d, Gift SKU: %s, Store ID: %d',
                $rule->getId(), $rule->getGiftSku(), $quote->getStoreId()
            ), Zend_Log::ERR
        );
    }
}


texts:
I am building a module for magento2. My module needs to interact with my own server, so I decide to use ZendClient for it.
When the merchant activates my module, I send a request to my server to register a merchant then receive a jwt token for future API call. My questions are:

Where should I save the jwt token?
I need to send request to my server when the merchant activates my module? How to do it?

Magento 2 : Activation/Deactivation and uninstallation module event


texts: In Magento 2 after ajax success can't redirect page in admin

texts:
After ajax success can't redirect page in admin in Magento 2
 var redirectUrl = "<?php echo $block->getBaseUrl().'admin/trackorder/shipinfo' ?>";
 $.ajax({
    url: urlLabel,
    type: "POST",
    data: {counsumerNumber:counsumerNumber,courierService:courierService},
    showLoader: true,
    done: function(data, statusText, xhr){
        var status = xhr.status;
        if(status != 200) window.location = redirectUrl;
    }
});


texts: PATCH_SUPEE-6788 not installed correctly

texts:
I am trying to install PATCH_SUPEE-6788 for my magento installation ver. 1.8.1.0
like below :

$ sh PATCH_SUPEE-6788_CE_1.8.1.0_v1-2015-10-26-11-59-27.sh

But i get below error:

It says Reversed (or previously applied) patch detected!

But in the file /app/etc/applied.patches.list the patch 6482 is not present.

Can anyone let me know the solution. Thanks in advance.


texts:
I'm trying to display javascript code if a user is on category page, however my code is displaying on all the pages including product page.

<?php
$_category = Mage::registry('current_category');

if ($_category->getId()) {
      echo '<script>
jQuery(function($){
var url = window.location.href;
window.location.href = url+"#dir=desc&order=bestsellers";
});
</script>';
}
  else {

      echo '';
  }

?>


texts: Creating custom header extending Magento blank in Magento 2

texts:
I am trying to create a theme with Magento Blank as parent in Magento 2 but I can't figure it out how to change the header with a custom one.

I first remove header.container from magento blank and create my container but it is created inside page-wrapper between main-content and footer and I can't make it go before main-content.

This is my layout.xml:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="register-link" remove="true" />
        <referenceBlock name="authorization-link" remove="true" />
        <referenceBlock name="wish-list-link" remove="true" />
        <referenceBlock name="my-account-link" remove="true" />
        <referenceBlock name="top.links" remove="true" />
        <referenceBlock name="header.panel.wrapper" remove="true" />
        <referenceBlock name="header.container" remove="true" />

        <referenceContainer name="page.wrapper">
            <container name="custom.header" htmlClass="headerSection" htmlTag="div">
                <block class="Magento\Framework\View\Element\Template" name="navigation.sections" before="-" template="Magento_Theme::html/sections.phtml">

                </block>
            </container>
        </referenceContainer>

    </body>
</page>

And this is how it looks the HTML:


texts: Modify or add validation code to customer registration screen

texts:
I have a javascript code that connects with the Civil Registry of Ecuador and validates that the identity number entered is correct.
I have implemented this script easily with php and html on other systems.
Currently I have the M2 Customer fields manager extension from Swissuplabs installed in the Magento store, where I create the fields that I need for the moment of customer registration.
What I need is that when the client types his identification and clicks on register, before doing the normal process of validation of magento fields, the javascript that I have is executed first and if it returns true, then perform the normal process of registering clients in magento.
It is something like the id vat tax validation number of europe.

The validation code only takes the data from the text box and validates with javascript that the number is a valid identification number.
(I can give a complete code on php + html + javascript to see the operation complete)


texts: migration- except home page all pages redirecting to old domain

texts:
we are migrating from one domain to another domain.

usually we will foloow the procedure of

"open the database file in notepadd++ software and find and replace

old-doamin-name to new-domain-name.

but as the database file size is 1000mb, we can not able to do in notepad++

we change the base urls in core_config_data table.

but now only home page is working the new domain but rest of the other pages is still

redirecting to old domain.

so is there any way in phpmyadmin or through ssh, we can change the old doamin name to new domain name in all places

thanks in advance


texts: How to get categories list for multiple stores on same page?

texts:
I have a website which is separated into two stores: Mens and Womens. I am trying to list the categories of both stores in the footer template which is shared by both sites.

Ideally I would have:

MENS
-MensCat1
-MensCat2
-MensCat3
-MensCat4

WOMENS
-WomensCat1
-WomensCat2
-WomensCat3
-WomensCat4

etc.

I can pull the categories of a particular store with the following:

$children = Mage::getModel('catalog/category')->load(306)->getChildrenCategories();
                foreach($children as $child){
                    echo $child->getName() . " " . $child->getUrl() . "<br/>";
                }

where 306 is the id of the Mens Root Category.

That will give me

-MensCat1
-MensCat2
-MensCat3
-MensCat4

The problem is the URLs will be http://{{base_url}}/womens/MensCat1 if I am in the womens store.

Is there a better way to do this so that the URLs are relative to the stores they belong to, or to force the store url to change in the getUrl request?


texts: Embed images in transactional emails (only the store logo!)

texts:
Recently we started upgrading our transactional email templates: making it somewhat responsive, work on all devices and more snappy.

For example when you receive an order confirmation, what do you really need to know? Why copy all the order info ot the order you just placed? So we just said: order confirmed, see attachment via http://www.magentocommerce.com/magento-connect/fooman-email-attachments.html

Then we realized that the store logo (almost the only unique bit in a multistore environment) is attached and often doesn't show directly in gmail.

Ths gives us 3 options:
option 1: dont show the image at all, just show the store name (they have seen your logo before)
option 2: embed the store logo inline.
option 3: don't bother, leave as is

Now my question is related to option 2: have you come across some extension that ONLY embeds/inlines* the store logo? I understand there are some extension to inline all images.

And in addition: Is there a place where all the optimized and secret email templates for Magento reside?

Many thanks

Some links:
http://www.magentocommerce.com/blog/responsive-design-quick-guide-for-email-templates-and-websites/
http://www.magentocommerce.com/magento-connect/magentron-emailimages.html
and an extension from mageex (cannot find)

Like so: https://stackoverflow.com/questions/4312687/how-to-embed-images-in-email


texts: I'm making magento2 shop for my malawian client. I want to add new currency in magento2... "Malawian Kwacha" which is not listed in default currency list. How could i add new currency and work successfully. Please help!


texts: I want to Rename the by default error message when anyone hit the button without selecting the color.


texts: Magento 2 Reorder functionality missing for migrated orders

texts:
We have migrated customers and orders data from M1 (1.14.3.1 EE) to M2 (2.3.1 commerce)  successfully But when we are doing testing at the admin end for the orders found that the Reorder button was missing. Then we checked below scenarios

Reorder settings enabled  (System -> Configuration -> Sales -> Sales -> Reorder)

Crated an order in the frontend then it is showing reorder at admin end.

Can anyone have faced this kind of issue could you please advise.


texts: Please enter a valid full date translate

texts:
We want to translate "Please enter a valid full date", but when we edit the csv file, nothing happens.

This is the default Magento validation line in the one page checkout.
When a user enters the data of birth incorrect, Magento displays the default error that is written in English.

Place the line in the Mage_Core.csv file and translate it, does not work.

How can we translate this line?


texts: Show notification message on custom phtml file?

texts:
<block class="Magento\Customer\Block\Account\Dashboard\Info" name="customer_account_dashboard_info" as="info" template="account/dashboard/info.phtml" cacheable="false">
    <referenceContainer name="page.messages2">
        <block class="Magento\Framework\View\Element\Template" name="ajax.message.placeholder2" template="Magento_Theme::html/messages.phtml"/>
        <block class="Magento\Framework\View\Element\Messages" name="messages2" as="messages2" template="Magento_Theme::messages.phtml"/>
    </referenceContainer>
</block>

and in phtml file
<?php echo $block->getChildHtml('page.messages2') ?>

How to show notification?


texts: File & folder permission needed before installation of extension from Magento connect

texts:
I am trying to install an extension using magento connect but facing some issue.

Can anybody let me know what files &  folders permission we need to set before starting any magento extension installation from magento connect in magento 1.9.

Thanks in advance.


texts: Magento 2 registration form validation not working

texts:
I've copied across register.phtml across to my theme. I've changed nothing as of yet but now the JS validation doesn't work.

Is there something else I need to copy across?

EDIT:

[theme name]/Magento_Customer/templates/form/register.phtml


texts: How to hide the bubble when placing the cursor on option-label?

texts: I wish to hide this information, because it is useless :


texts: Magento2 : customer-data.js:86 Uncaught Error: [object Object]

texts:
customer-data.js:86 Uncaught Error: [object Object]

at Object. (customer-data.js:86)
at fire (jquery.js:3099)
at Object.fireWith [as rejectWith] (jquery.js:3211)
at done (jquery.js:9312)
at XMLHttpRequest.callback (jquery.js:9720)


texts: Programmatic Login fails when SSL enabled

texts:
Magento 1.9.1

I'm using a PHP script to programatically login a customer by customer id. Below is a working cut down test script:

require '../../app/Mage.php';
umask(0);
// Initialize Magento
Mage::app('default');

$customer = Mage::getModel('customer/customer')->setWebsiteId(Mage::app()->getStore()->getWebsiteId());
$customer->load('8'); //sample customer id
$mySession = Mage::getSingleton('customer/session');
$mySession->setCustomerAsLoggedIn($customer);

if ($mySession->isLoggedIn()) {
    $custSessionId = $mySession->getEncryptedSessionId();
    Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getBaseUrl() . '?SID=' . $custSessionId)->sendResponse();
}

This basically works fine and on redirect the SID is passed and the customer is logged in.

Problem: when I enable SSL throughout the site (and change the unsecure baseurl to HTTPS) then the customer is not logged in on redirect.

Aside from this login issue, HTTPS / SSL on the site is working fine when enabled.

Any suggestions of things to try/check?

My URL / Cookie settings:

The server is apache with PHP 5.5.30, no Varnish etc and caching is all off.

With SSL disabled, when passed across to the site the customer is logged in and 1 cookie is set:

adminhtml (not secure)

The SID matches the cookie value. All is fine, however, the session/basket etc is then lost later on when we do go to a secure page (checkout, my account etc)

With SSL enabled for the entire site, when passed across to the site the customer is not logged in and 3 cookies are set:

_cid (secure)
adminhtml (not secure)
adminhtml_cid (secure)

however, none of the cookies match the SID passed across (do new ones get created?)


texts: How to replace browser back button on cart page?

texts:
i am working on a product page with lots of selections. (they are required by industry, so i can't really remove them)

About every 5th customer makes the needed selections, and then presses "add to cart" - and than goes back to product page to change smng.

We've added "Change product options" button which brings them back to product pages with their selections saved, so they can change options easily without needing to select everything again - the page url looks like this ourmagentostore.com/checkout/cart/configure/id/5231/

However some people still click back button in browser, and it brings them to ourmagentostore.com/product-name - it's not saving any selections, so they have to start over again, and some people give up at this point.

How i can replace the browser back button on cart page with checkout/cart/configure/id/XXXX/ ?

I know it's possible with js, but is there a better way to do it?


texts: Custom Module for Friquently asked question in magento 2

texts: develop module for creating FAQ's of visitor's of our website using admin grid(Crud Operation) and on FAQ page those FAQ's can be viewed and all answer's also viewed on that page.


texts: Changed Layout to 2colums-left.phtml but still getting 2colums-right

texts:
Please check the below image

I changed in my local.xml file from 2 columns-right to 2colums left but still getting it in 2 column-right please help me


texts: How to change color of cart icon in minicart?

texts:
I am trying to change color of cart icon in header/minicart , as currently it's in grey shade

I tried changing via adding following css in my custom.css at \web\css\custom.css

.minicart-wrapper .action.showcart::before{
   color:#fe0404;
}

but some how it's not working


texts: I upgraded magento 2.3.4 to 2.3.5. But magento site https://magento.com/tech-resources/download is available version 2.3.5-p1? Something different with versions 2.3.5 and 2.3.5-p1?


texts: How to disable category in magento 2 programmatically

texts: I would like to disable category from navigation bar under some conditions like for certain customer groups I would like to show certain categories. Is there any way to do that and how can I do that.


texts:
I have edited some translations in my multi language e-commerce site.

In particular, I want to change some words in the English version site. In the homepage there is a menu which contains word BAG: I want to translate BAG to SHOPPING BAG.

Translations files are contained in two folders:

app\locale\en_US : where there are lot of translations files with different names.
app\design\frontend\enterprise\tName\locale\en_US : where there are only two csv files: translate.csv and alp.csv.

I edited every translations file adding in the csv file the string

  "Bag","Shopping bag"

But this editing is not shown in the fronted site.

What files should I change to achieve my goal ? Why can't I see any changes ?


texts: how to add bootstrap Data tables to my customer order grid

texts: how to add bootstrap Data tables to my customer account Dashboard order grid on front-end?


texts: How to add payment method's info to the PDF invoice?

texts:
I am trying to add payment method's info text to the PDF invoice but I can't figure out the right code.

Any ideas how to do this?


texts: create module garage in customer like addresses

texts:
I need to create a module garage in customer like addresses where I can add new garage.
Could you give me some ideas?
thanks
For the moment, this is what I have

this is my code bellow

PMC/Garagetab/Block/Adminhtml/Garage/Tab.php

<?php
class PMC_Garagetab_Block_Adminhtml_Garage_Tab
extends Mage_Adminhtml_Block_Template
implements Mage_Adminhtml_Block_Widget_Tab_Interface {
   /**
     * Set the template for the block
     *
     */
    public function _construct()
    {
        parent::_construct();
       $this->setTemplate('garagetab/tab.phtml');
    }
   /**
     * Retrieve the label used for the tab relating to this block
     *
     * @return string
     */
    public function getTabLabel()
    {
        return $this->__('Mes Garages');
    }
   /**
     * Retrieve the title used by this tab
     *
     * @return string
     */
    public function getTabTitle()
    {
        return $this->__('Click here to view your garages tab content');
    }
   /**
     * Determines whether to display the tab
     * Add logic here to decide whether you want the tab to display
     *
     * @return bool
     */
    public function canShowTab()
    {
        return true;
    }
    /**
     * Stops the tab being hidden
     *
     * @return bool
     */
    public function isHidden()
    {
        return false;
    }
}

file config.xml

<config>
   <modules>
       <PMC_Garagetab>
           <version>0.1.0</version>
       </PMC_Garagetab>
   </modules>
   <adminhtml>
        <layout>
           <updates>
               <garagetab>
                  <file>garagetab.xml</file>
               </garagetab>
           </updates>
       </layout>
   </adminhtml>
   <global>
       <blocks>
           <garagetab>
               <class>PMC_Garagetab_Block</class>
           </garagetab>
       </blocks>
 </global>
</config>

file design/adminhtml/default/default/template/garagetab/tab.phtml

Action Tab

                        Garage Custom Action Tab Contents Here


texts:
A customer has placed an order successfully and transaction was successful because customer is having transaction ID but there is no sign of order in admin-end.

Can anyone please help me to debug the issue?

I can notice an entry for that order in 'sales_flat_quote' table but there is no entry for that order in 'sales_flat_order' table


texts: Upgrade to 1.9.2.2 - Base table or view already exists: 1050 Table 'mage_permission_variable' already exists

texts:
I am trying to upgrade to 1.9.2.2 from 1.9.2.1 through Magento Downloader.  On the little screen at the bottom I am getting the error message below:

  Exception during cache and session cleaning: Error in file: "app/code/core/Mage/Admin/sql/admin_setup/upgrade-1.6.1.1-1.6.1.2.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'mage_permission_variable' already exists, query was: CREATE TABLE `mage_permission_variable` ( `variable_id` int UNSIGNED NOT NULL auto_increment COMMENT 'Variable ID' , `variable_name` varchar(255) NOT NULL default '' COMMENT 'Config Path' , `is_allowed` bool NOT NULL default '0' COMMENT 'Mark that config can be processed by filters' , PRIMARY KEY (`variable_id`, `variable_name`), UNIQUE `UNQ_MAGE_PERMISSION_VARIABLE_VARIABLE_NAME` (`variable_name`) ) COMMENT='System variables that can be processed via content filter' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci.........................

It repeats this quite a few times and then just stays there and the website is broken.

I'm not at all technical with Magento - could someone help me diagnose what's wrong and how I fix it (in as simple steps as possible!)?


texts: Which folder to use as default web root?

texts:
I see some projects using the Magento 2 root folder as webroot and other projects using the pub folder as the web root, independently of using Apache or NGINX, both worked.
Which webroot folder should I use in a new Magento 2 installation and why?


texts: I want to send attachment with newsletter in magento, I want to find, which file is using for sending newsletter email. I tried with this file /app/code/local/Mage/Newsletter/Model/Subscriber.php and add attachment code sendConfirmationRequestEmail in this function, but its not a write file. Can any one help ?


texts: Magento 2.1.5 In product detail page Price remove after decimal

texts: In Magneto2.1.5 product detail page remove decimal after price display like this $20.00 instead of $20 but this is not fix it please if any solution reply my post I have share my site screen


texts: Import Products Dataflow Profile - 500 server error in console

texts:
I've successfully exported my products.  I made a few changes to the file (new sku, new product name), saved the file with a new filename and want to import the csv file.  This is what it shows my on screen.

 Starting profile execution, please wait...
 Warning: Please do not close the window during importing/exporting data
 Starting Mage_Dataflow_Model_Convert_Adapter_Io :: load
 Loaded successfully: "/myfolder/myfile.csv".
 Starting Mage_Dataflow_Model_Convert_Parser_Csv :: parse
 Found 1 rows.
 Starting catalog/convert_adapter_product :: parse
Processed 0% 0/1 records

When I view my Javascript console, I see -

Failed to load resource: the server responded with a status of 500 ()   /index.php/admin/system_convert_gui/batchRun/key/12f765063f452bb84d1a1e57e84db089/

Any suggestions on where to go from here?


texts: How to add simple product to grouped product as Associated products?

texts:
I have grouped product with the name Group1. And also I have category with the same name(Group1). I have several simple product under the Group1 category. How to add these products under this category only as Associated product to grouped product programmatically?

I got a product collection under the category named as Group1 by

$productCollection = Mage::getResourceModel('catalog/product_collection')
                      ->addCategoryFilter($category);

Now i want to add these products to the Grouped product as Associated product

If anybody know, please help me guys


texts: How to resolve the Error "Call to a member function getChildren() on null"

texts:
I wish to display the level1 and level2 subcategories of current active category in layered navigation in list page. So I gave the below code in catalog/category/view.phtml :

<?php
$html = '';

$children = $menuTree->getChildren();
$parentLevel = $menuTree->getLevel();
$childLevel = is_null($parentLevel) ? 0 : $parentLevel + 1;

$counter = 1;
$childrenCount = $children->count();
$category = Mage::getSingleton('catalog/layer')->getCurrentCategory();
$categories = $category->getCollection()
        ->addAttributeToSelect(array('name', 'thumbnail'))
        ->addAttributeToFilter('is_active', 1)
        ->addIdFilter($category->getChildren())
 ?>

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

foreach ($children as $child) {
    $child->setLevel($childLevel);
    $child->setIsFirst($counter == 1);
    $child->setIsLast($counter == $childrenCount);
    $child->setPositionClass($itemPositionClassPrefix . $counter);

    $outermostClassCode = 'level'. $childLevel;
    $_hasChildren = ($child->hasChildren()) ? 'has-children' : '';

    $html .= '
_getRenderedMenuItemAttributes($child) .'>';

    $html .= 'getUrl() .'" class="'. $outermostClassCode .' '. $_hasChildren .'">'. $this->escapeHtml($this->__($child->getName())) .'';

    if (!empty($childrenWrapClass)) {
        $html .= '
';
    }

    $nextChildLevel = $childLevel + 1;

    if (!empty($_hasChildren)) {
        $html .= '
';
        $html .=     $this->render($child, $childrenWrapClass);
        $html .= '
';
    }

    if (!empty($childrenWrapClass)) {
        $html .= '
';
    }

    $html .= '
';

    $counter++;
} ?>
            <?php endforeach; ?>

am getting the error like Call to a member function getChildren() on null
How to resolve this? What should be done.Or is this approach wrong? Help please. am stuck.


texts: magento 2 Default image file types not acceptable

texts:
I have an issue where I cannot add images to products on Magento 2.0.7.  Attempts to do so with jpg, png, jpeg, and/or gif yield the following error:

Attention
We don't recognize or support this file extension type.

I have tried every file type known to man or woman.  . Can anyone advise as to where this info is stored?  The console in Chrome says nothing at all.  The admin lists nothing.
Thanks to @krishna ijjada we can find this Javascript validation code at

/vendor/magento/module-catalog/view/adminhtml/web/catalog/base-image-uploader.js

acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i
My code matches this.  I can find no other instance in any forum of this happening.  Anyone else?


texts: Magento 2.3.3 - Rating filter in Layer navigation

texts:
I have tried below solution given by Pradeep Kumar which has 7 upvoted but the filter is not appearing in Layer navigation.

Link: Magento 2 : Rating Filter in Layered Navigation

I have already cross-checked all the files. Someone guide me How to add rating filter in layer navigation Magento 2.3.3


texts: How to get product image and URL in Magento 2?

texts:
This is my observer:

public function execute(\Magento\Framework\Event\Observer $observer)
{
    $orderIds = $observer->getEvent()->getOrderIds();
    $order = $this->_orderRepositoryInterface->get($orderIds[0]);
    $items =$order->getAllVisibleItems();
    $productQuantity = array();
    $productPrice = array();
    $productName = array();
    $productIds = array();
    foreach($items as $item) {
        $productIds[]= $item->getProductId();
        $productName[]= $item->getSku();
        $productPrice[] = $item->getPrice();
        $productQuantity[]= floor($item->getQtyOrdered());
    }
}

How can I get the product image and product URL from the item?


texts:
I am looking to develop a bulk quantity (10+ of any single sku) shopping cart price rule that abides by these three scenarios:

10 of SKU #1, 10 of SKU #2, 10 of SKU #3.  Discount for all three SKU's.
10 of SKU #1, 5 of SKU #2, 6 of SKU #3.  Discount applied to SKU #1 only.
8 of SKU #1, 3 of SKU #2, 1 of SKU #3.  Discount is not applied to any SKU.

I am able to apply the discount if the number of items in the cart exceed 10 in total, but it will not ignore the price rule if any single SKU is below 10 quantity.  Can Magento 1.9 allow you to check upon quantities of individual line items and not the total order quantities?

DISCLAIMER:  The full solution is limited to over a hundred different SKU's coming from only 3 specific Vendors/Suppliers.  It's unrealistic to develop a price cart rule for each of the 100+ SKU's.  (I have worked out how to narrow the Vendor/Supplier in the rule conditions.)


texts:
I have done magento 1.9 to 2 migration(data, settings) using this link and this link.

Is it possible to migrate code from 1.9 to 2.


texts:
I got the below error in magento 2.2.5
Interface Magento\Framework\App\Action\HttpPostActionInterface' not found in /var/www/html/app/code/Sm/CartQuickPro/Controller/Product/Compare/Remove.php


texts: Add images from Configurable Product to Associated product?

texts:
Essentially, when using the 'Quick Create' from the 'Associated Products' while making or editing a Configurable Product, no images are applied to the Simple Product that is made.

I'm using the M2E extension to list my items on eBay and it's required that I have an image for my simple products that were created as 'associated products' from the configurable parent.

Is there a way to use Observer / Event Handlers or rewrite some controllers to add whatever images from the configurable parent product to the associated simple child product?

There is an extension '
Automatically Copy Images for Configurable Product Variants' that says it does this, however, myself and others have installed it and never can get it to display in admin>configuration. I've contacted them, and others have to, never to here responses.

Using Magento 1.9.2


texts:
I am creating a custom module in Magento which send emails. I've created the email template in the "transactional email templates" section in the backend, and it works.

Now I would like to add the email template in the files of Magento to have a durable solution (currently, if I reset the database configuration, my template will be removed). I can't find a way to load the template.

I've created my template file in app/locale/en_GB/template/email/notification.html
I've tried to declare this template in my config.xml

<template>
    <email>
        <vendor_report_notification_email_template translate="label" module="namespace_ordersReport">
            <label>Vendor Report Notification Template</label>
            <file>notification.html</file>
            <type>html</type>
        </vendor_report_notification_email_template>
    </email>
</template>

I can't find how to add an email template and how to load it to 1. be able to send an actual email, 2. customize it in the backend if needed through the load template function of the transactional emails.


texts: How can i set color to floating menu block

texts: How can i set color for floating menu block. when i scroll down its not highlighted menu block.


texts: Magento 2: getting error when calling external js file using require-js-config.js

texts:
I am trying to call the external js file using requiresjs
require-js-config.js:
var config = {
    map: {
        '*': {
            Stronghold:'https://api.strongholdpay.com/v2/js'
        }
    },shim: {
            "Stronghold": {
                'deps': ["jquery"]
            }
        }
};

Js file call
require(['jquery','jquery/ui','Stronghold'], function($,Stronghold){

  var strongholdPay = Stronghold.Pay({
      environment: 'xxxxxxxxx',
      publishableKey: 'xxxxxxxxxx'
  });

});

Error:
Uncaught TypeError: Stronghold is undefined


texts: Magento 2.3 : How to add Custom button on a custom grid in customer view Adminhtml

texts: You have already answer this question , I have to do this in magento2. How can i do?Where i have to add this code


texts: How to add a sub block for contact form when called by a cms page

texts:
I'am trying to add Magento Captcha in my custom contact form and it's not working...

I added into contacts.xml the following :

<block type="core/template" name="contactForm" template="contacts/form.phtml">
    <block type="captcha/captcha" name="captcha">
        <reference name="head">
            <action method="addJs"><file>mage/captcha.js</file></action>
        </reference>
        <action method="setFormId"><formId>contact_form</formId></action>
        <action method="setImgWidth"><width>230</width></action>
        <action method="setImgHeight"><width>50</width></action>
    </block>
</block>

In my contact.phtml I added :

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

I think the problem is because my template file is called in a static block like this and the child captcha isn't known.

{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}

So the getChildHtml is null like it doesn't exist.


texts: Magento 2.3.5 error gd2.php on installation

texts:
While installing Magento 2.3.5 in windows, I got this Error:

[Progress: 698 / 1369]
Module 'Magento_Theme':

In PatchApplier.php line 170:

Unable to apply data patch Magento\Theme\Setup\Patch\Data\RegisterThemes for module Magento_Theme. Original exception message: Wrong file

In Gd2.php line 64:

Wrong file


texts: Set minimum order amount for a payment method only in frontend for a store

texts:
I need to set the minimum order amount for a purchase order payment type only in the frontend for a particular store.

I used system/configuration/payment method/custom payment ->set minimum order to 100 for that store in the admin panel.

But this filter gets applied even when an order is placed from the admin side

I need the minimum order amount filtered only when an order is placed from the admin side.

Any thoughts will be really appreciated.

Thanks


texts: Multi store Magento 2 sitemaps to Google webmaster tools

texts:
I have 3 websites running in 1 install of Magento 2. There I have created for each store a sitemap. But how can i add the sitemap in webmaster tools?

The sitemap link start all with www.deal-finder.nl. But when I want to add it into webmaster tools it ask a sitemap with his own url, like www.uitverkoopgigant.nl.

How can i fix this?


texts:
I am new to Magento and I am having an issue with the use of the rest API.

I see some blogs/tutorials on the Internet where they create modules to use the web API.
Also in magento2 API doc, they tell to create the webapi.xml file but it is not cleared/told that the file should be in a module or where exactly.

My question is do we need a module to use the Rest API?
I didn't find out also the webapi.xml doc.

Btw I need the API to create new products in the store. I am using API of a website which gives me the images and name of products.


texts: I want to set up a shopping cart rule Buy 3 for £40

texts:
I sell coffee so a lot of my products are configurable. I want customers to but 3 tins of coffee for £40 but it is not working.

In actions I have changed the apply to:
Fixed price for product set

the discount amount is: 40

and I have added the sku's for simple products.. and the category.

Can anyone help?


texts:
On my store we have a product that costs £2.95 including tax (at current UK rate of 20%). The tax seems to calculate fine here.

However, I then have a Customer Group that gets 30% off, which should make the price £2.07. When I first load both the Category and Product page, it correctly shows £2.07 for this configurable product and logged in with the Customer Group.

But then when I choose one of the Simple Product options, the price displays as £2.06 - 1p difference. However, when the product is added to the cart, it goes in at the correct amount of £2.07 so the issue appears to be the rounding on the display price.

I'm using Magento 1.9.0.1 and wondered if other people have the same issue with the combination of tax and customer group discount?

Regards,
Neil


texts: magento 1.8 : how to keep Last name under First Name in billing and shipping addresses in checkout

texts:
How can I change the layout for the first and last name fields so that they are placed one on top of another, instead of one being next to another?
The same thing is needed for "city" and "state/province" fields.
The reason I need this is that in my russian magento, in mobile view those entry fields overlap each other which confuses the user. Thanks


texts: How to Remove Prefix & Suffix from admin Customer Account Magento 1

texts:
I want to remove Prefix and Suffix from the Customer Information tab in the admin section.

Can any tell me how to remove both from the admin customer tab?

Thanks.


texts:
Does anyone have a list of Payment Method codes that I could use? There are questions out there saying to use Dependency Injection to discover the codes however, my module does not use Frontend or Backend so I can't view PHP echo's. As far as i'm aware there are no payment methods on the server additional to the original payment methods.

So far I have found "checkmo" as the Check / Money Order payment method and "purchaseorder" but I can't find anything else. I am mainly after the Bank Transfer payment code.


texts:
I'm running Magento 1.9.1.1. I have an IWD one page checkout installed with a compatible theme. I have also installed MSP multi-flat shipping.

Upon testing my site, everything works fine. However with the IWD One page checkout module activated, the site hangs on checkout when selecting a different delivery option. I have logs activated, and below is the exception error:

Exception error
2016-07-10T19:20:25+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Braintree_Payments_Block_Datajs' in /home/onyxclot/public_html/app/Mage.php:595
Stack trace:
#0 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('braintree_payme...', Array)
#2 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('braintree_payme...', 'braintree_payme...')
#3 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('braintree_payme...', 'braintree_payme...')
#4 /home/onyxclot/public_html/app/code/local/Smartwave/All/Model/Core/Layout.php(40): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(205): Smartwave_All_Model_Core_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#6 /home/onyxclot/public_html/app/code/local/Smartwave/All/Model/Core/Layout.php(31): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#7 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(210): Smartwave_All_Model_Core_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#8 /home/onyxclot/public_html/app/code/local/Smartwave/All/Model/Core/Layout.php(31): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#9 /home/onyxclot/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Smartwave_All_Model_Core_Layout->generateBlocks()
#10 /home/onyxclot/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#11 /home/onyxclot/public_html/app/code/community/IWD/Opc/controllers/IndexController.php(155): Mage_Core_Controller_Varien_Action->loadLayout()
#12 /home/onyxclot/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): IWD_Opc_IndexController->indexAction()
#13 /home/onyxclot/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#14 /home/onyxclot/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#16 /home/onyxclot/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#17 /home/onyxclot/public_html/index.php(87): Mage::run('', 'store')
#18 {main}

Would someone be able to advise what is wrong and what needs to be done to resolve this?


texts:
Excluding child products from category that is anchor through code/filter

Hi we have a category with a complex filter set-up: it shows 43 products in backend. When we grab the collection however and show it on the frontend it shows 52 products. I understand this is because we enable anchor = yes because it needs to be layered.

My question now is: how can we filter out the child products of our collection?

Our current collection call in template file: $_productCollection=$this->getLoadedProductCollection();

I have read some semi-similar questions, but none with a concrete results. I was thinking along the lines of adding a filter like this
$_productCollection=$this->getLoadedProductCollection()->addAttributeToSelect('is_anchor'); or maybe this $this->_productLimitationFilters['category_is_anchor'] = 1; or maybe this $category->setIsAnchor(true); or maybe when looping over the products collection? (Add a continue statement)

Another solution would be if I can retrieve all the "genuine" product ids of the parent category (so this time without children) I can then merge exclude the ID's? Or do this is the foreach loop?


texts: Using a different PHP version to compile Magento project

texts:
I have a site running Magento-CE-2.1.5 in a ubuntu server.

I have 2 PHP versions running alongside:

PHP 7.0.18
PHP 7.1.6.

Each time i try to setup Magento it shows PHP version 7.0.18 but the real problem is that I need to make few changes and compile the projects.

At the time of compiling, the Magento PHP command uses PHP version 7.1.6. How can i make the project use PHP version 7.0.18 during compilation?

I have PHP 7.1.6 version as it was required by a Laravel site running PHP 7.1.6.


texts: Facing issue while using php bin/magento sampledata:deploy

texts:
Using Magneto 2.3

Error 1

Installation failed, reverting ./composer.json to its original content.

Second

In RemoteFilesystem.php line 745:
Invalid credentials for 'http://repo.packagist.org/p/facebook/webdriver%241f44a7a8e585405db9a679fa76431db357cd88442e6aa69f74f2bef9fc8a5d30.json', aborting.


texts: Customer created via API is always associated with admin website?

texts:
I'm creating new customers in C# via the SOAP v2 API because why not.

I've set the website_id and store_id attributes of my customerCustomerEntity object to 1 which is the default main website and default main store respectively. The customerCustomerCreate() request then goes off without a hitch.

Unfortunately, when I check out the created customer in my Magento admin panel, I see that it's incorrectly associated with the admin site and not my default main site.

I'm using Magento 1.8.1.

If anyone have any ideas about why this is happening and how to fix it, I'd be eternally grateful.

Thanks. :)


texts: How to add button and tab after save data in admin form

texts:
In magento admin form Is that possible if status is applied than add button in form.

I mean in custom form there is one field status. Now i want to add button and new tab in form when status is applied.

Is that possible??

If yes than how can i do this?


texts: Export my products for Facebook products feed

texts:
Is there a way to export my products from a certain category to create a CSV file to import into our Facebook page products?

Results need to look like this


texts: Magento 2 | Access custom order attribute

texts:
I created an custom attribute for orders:

  UpgradeSchema.php

<?php

use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;

class UpgradeSchema implements UpgradeSchemaInterface
{
    /**
     * Upgrades DB schema for a module
     *
     * @param SchemaSetupInterface $setup
     * @param ModuleContextInterface $context
     * @return void
     */
    public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();

        $quote = 'quote';
        $orderTable = 'sales_order';

        $setup->getConnection()
            ->addColumn(
                $setup->getTable($quote),
                'mediabasebestellnummer',
                [
                    'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                    'length' => 255,
                    'comment' =>'MediabaseNummer'
                ]
            );
        //Order table
        $setup->getConnection()
            ->addColumn(
                $setup->getTable($orderTable),
                'mediabasebestellnummer',
                [
                    'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                    'length' => 255,
                    'comment' =>'MediabaseNummer'
                ]
            );

        $setup->endSetup();
    }
}

Right now my question is how get the custom attribute when I have an order.
This is NOT working:

$custom = $order->getCustomAttribute('mediabasebestellnummer');

Thanks for any help!


texts: Magento2: Conflict functionality when i install third party module

texts:
I have to use custom module for out of stock product shows at the end of product listing is working it but when I use third party module for layer navigation magebees than my previous out of stock functionality stop and out of stock product showing randomly in order. when I disable layer navigation module than previous functionality works it.

If anyone idea replies to me how to work on both functionality.


texts: magento2 not showing changes in frontend

texts:
I am new in Magento 2. I want to add new custom text on listing page. I've attached a screenshot for reference.I have copy list.phtml  from

 /vendor/magento/module-catalog/view/frontend/templates/product/list.phtml

to dafault LUMA theme

   app/design/frontend/Magento/Luma/Magento_Catalog/templates/product/list.phtml

I have added text in list.phtml of theme location file.my problem is that changes is not showing list page. but when i have same text changed in core list.phtml file changes is showing.

After Following commands run

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento cache:flush
php bin/magento cache:clean


texts: How to make the check-out steps land at the top of the screen as oppose to closer to the bottom where people have to use the scroll bar to scroll up

texts:
Magento 1.9.1
Porto theme

I had this problem for a long time. I tried to fix it before but no luck yet...Apparently, this is not just my problem but many people are experiencing this very same issue. The problem is that some customers are having problems seeing the top of the page when moving forward in the check-out process and they have to scroll up to get to the relevant information on the page. I suspect this happens if they scroll down on the previous step for some reason then when they move to the next step - the scroller bar remains where it was on the previous step....Is there any way to fix that?

EDITED on May 7th, 2018:

I am still experiencing this issue. It is a serious problem for me because customers abandon sales when they get to 4-Payment Information. The screen scrolls all the way down on this step of the check-out (perhaps because I have a few different options in 3-Shipping Method and also a Delivery Comments section and Gift Options section there). Customers then do not see the Payment options at all. I've tried some of the steps here but I was not able to fix this problem:

Product pages load at the bottom of the screen

I've tried to follow these suggestions but they did not work either:

https://minhducnho.wordpress.com/2015/12/23/fix-one-page-checkout-scrolling-to-the-footer-bottom-of-screen-on-next-step/comment-page-1/#comment-86

I've put that code in the "onepage.phtml" file in:

/public_html/app/design/frontend/base/default/template/checkout

(it just shows me the steps to go through 1, 2, 3....etc but does not open step #1 automatically and it cannot even be opened by clicking on it)

Just to clarify browser compatibility - this happens on all the browsers I've tested - Chrome, Opera and IE.

The solution that worked for me is the one from Chirag Rajput:

I've put this code:

<script type="text/javascript">
jQuery(window).bind("load", function() {
     jQuery(this).scrollTop(0);
});
</script>

in the onepage.phtml file in:

/public_html/app/design/frontend/base/default/template/checkout

There are a few questions that remain though:

1. it almost brings the Payment options on the one-page-checkout too far up (all the way) so that now the Payment options are presented on the bottom of a 15.6" display and the CONTINUE button (being right underneath) is no longer visible and customers will now have to scroll down to see it and click it. Is there any way to display the landing page just right? (not all the way to the bottom but also NOT all the way to the top?) and 2. would this change, change it for all other pages? (front page, product page etc.)


texts: magento wrong product price for international orders

texts:
Our online shop is located in Australia. When an international order is placed the price of products in the cart are wrong, it is less than in the catalogue. Example: t-shirt 25.80, for international order's it would be $23.50. Same for the shipping cost, international shipping cost is $15, it displays $14.55
For all australian orders it shows correct product and shipping fees.
Configurable and Simple products have the same price.
Shipping costs are uploaded with an csv file.
Tax settings double checked, all include tax.

Please help!!


texts: How to extend or override default graphql query, mutation or schema

texts:
I want to include some changes in default graphql response but no idea how can I do that and what is the right way to do that as there is not documentation available there. Do I have to create always new graphql APIs(without referencing old one) in order or extend prev. one.

Please let me know if anyone has already done this.

Thanks


texts: I want to scan magento missing patches in my laravel 5.2 application. How can I do that?


texts: How can assign multiple categories to product programatically

texts:
I Have a multiple categories for products . I want to assign these categories to specific products programtically .
Here is my code to run now.

$categories = Mage::getModel('catalog/category')->getCollection()->addFieldToFilter('name', $cat)->addFieldToFilter('is_active', array('eq'=>'1'))
->addAttributeToSelect('id');
foreach($categories as $cget){
    $cat_ids = $cget['entity_id'];
//  echo $checksku; echo "<br/>"; die();
$prodLoad = Mage::getModel('catalog/product');
$prodID = $prodLoad->getIdBySku($pid);
if ($prodID != '' || $prodID != null ){
    $prodLoad->load($prodID);
    $cat_ids= array();
    $cat_ids = $prodLoad->getCategoryIds();
    $cat_ids[] = $cat_id;
    $prodLoad->setCategoryIds($cat_ids);
    $prodLoad->save();


texts: When creating an order via the Magento2 Rest V1 API, can I disable customer emails?

texts:
I'm working through integration of orders from external sources into our Magento store.  We sell directly through our Magento instance as well as through some other carts (cartLoom).  When an order is received in CartLoom, it is sent along to some middleware scripts I've written that massage the CartLoom order data into a new Magento order, and submits it so the Magento store. This is working fine, but Magento is sending an order confirmation email, which is not desired because CartLoom has already done so.

In essence, I am just copying the order from an external source into Magento so we can centralize all our sales records. I don't want to completely disable all email confirmations though, since orders placed directly in our Magento store should notify the customer.

Is there an API call or cart/quote setting I can use to turn off customer notifications just for the order confirmation?


texts: How to rewrite widget function with mixins Magento 2.1.1

texts:
We have swatch-renderer.js

In this file there are some widgets.

....
    $.widget('mage.SwatchRenderer', {
....

    /**
     * @private
     */
    _init: function () {
        if (this.options.jsonConfig !== '' && this.options.jsonSwatchConfig !== '') {
            this._sortAttributes();
            this._RenderControls();
        } else {
            console.log('SwatchRenderer: No input data received');
        }
    },

    /**
     * @private
     */
    _sortAttributes: function () {
        this.options.jsonConfig.attributes = _.sortBy(this.options.jsonConfig.attributes, function (attribute) {
            return attribute.position;
        });
    },

I'd like to rewrite some of its functions.

What is the proper way how to do it?

Explanations in magento library are not actual anymore, they are linked on classes which are using another approach (I'm speaking about place-order.js / place-order-mixin.js). And described examples doesn't explain somehow how to rewrite widget functions.


texts: Magento2: how to filter categories by parent id?

texts: I want to create a category collection which I can filter by its parent category id. How to do this?


texts: Magento 2 call list.phtml with custom collection

texts:
I have custom collection in $collection I want to pass it to list.phtml so that I don't have to create listing UI again. I am trying to do this but it is not working

<?php
echo $this->getLayout()
                ->createBlock("Magento\Catalog\Block\Product\ListProduct")
                ->setProductCollection($collection)
                ->setTemplate("Magento_Catalog::product/list.phtml")
                ->toHtml();
?>


texts:
Where "Get Social" extention is shown ?

I have installed Get Social extention for magento 1.9

It is not getting displayed at the Admin end.


texts:
I have a problem with a site which I have taken on which was coded by another company.

I need to make a change to the page template used by the reviews section. Normally I would use local.xml to create an update such as:

<review_product_list translate="label">
    <reference name="root">
        <action method="setTemplate"><template>page/empty.phtml</template></action>
    </reference>
</review_product_list>

Doing this on another site correctly updates the template, as does modifing the reviews.xml file directly.

However on this particular site the template change is ignored, which leads me to believe the template is being set elsewhere (overriding these files). But where exactly can override local.xml I thought this took precedence for a theme?

Searching review_product_list in the app directory doesn't reveal anything out of the ordinary in the xml structure.

The site is running 1.8.1.0


texts: Maximum execution time exceeded. Clearing cookies only solution

texts:
I am running in into this weird error on our site http://amanvida.eu.
The problem is hard to recreate, and I haven't been able to pin point a cause. It does happen more often when you are logged in and left the page open for a long time.

At some point the website will not load, it just keeps requesting and after a while an Maximum execution time error pops up which refers to a random line somewhere in Magento.

  Fatal error: Maximum execution time of 99 seconds exceeded in
  /home/users/amanvftp/amanvida.eu/app/code/core/Zend/Db/Select.php on
  line 1018

or

  Fatal error: Maximum execution time of 99 seconds exceeded in
  /home/users/amanvftp/amanvida.eu/lib/Varien/Object.php on line 109

  Fatal error: Call to a member function quote() on a non-object in
  /home/users/amanvftp/amanvida.eu/lib/Zend/Db/Adapter/Pdo/Abstract.php
  on line 296

or

  Fatal error: Maximum execution time of 99 seconds exceeded in
  /home/users/amanvftp/amanvida.eu/lib/Varien/Object.php on line 0

The error is different with every refresh.

The only solution to getting this error solved is to clear the cookies in your browser cache. Problem is that regular users won't know this and will have to wait a long time before they can reach the site again.

Has anyone every encountered this error before? I have no idea where to start looking to solve this.

Nothing shows up in the exception.log or system.log

PS This error does not show up in the admin section.


texts: modify cache expiration of existing full page cache hole punch

texts:
I'd like to punch a hole in the full page cache for the top menu of a site.  While digging through some Enterprise code, I see that the top menu has an existing hole punched:

//  app/code/coe/Enterprise/PageCache/etc/cache.xml
<catalog_navigation>
    <block>page/html_topmenu</block>
    <name>catalog.topnav</name>
    <placeholder>TOPMENU</placeholder>
    <container>Enterprise_PageCache_Model_Container_Catalognavigation</container>
    <cache_lifetime>86400</cache_lifetime>
</catalog_navigation>

However, I'd like to change the cache_lifetime to be much shorter (1 second).  What is the best way to modify the cache_lifetime without modifying core code?


texts: strange sign in Magento (Frontend/Backend)

texts:
I have this Value in my page and database:

  Baden-Württemberg

But in my Backend and Frontend i get both:

  Baden-WÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â¼rttemberg

Can somebody tell me where I should look for the wrong information?
I'm using UTF-8 encryption


texts: Questions to expect in an interview for a Junior Magento Developer Position

texts:
Firstly I would like to say that I hope I am not posting in the wrong place with this question and if I am please advice me of where (if anywhere in the stackexchange world is appropriate) I should post it.

I have a couple of interviews coming up for junior Magento developer positions. I have some Magento development experience but I never did an interview for these jobs so I am not sure what to expect.

I would appreciate all comments and answers and I think this post could potentially be very helpful to other junior developers trying to break into magento