texts: Price issue with move element in xml file

texts:
catalog_product_view_type_grouped.xml

I have assign configurable product in group product and price is showing properly for configurable product's swatch option.

But when i write below script to move "product-add-form" near page bottom in this XML file after that different price is showing.

Before Price:

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

After Price:


texts: Pass data from Helper Data to Knockout JS file Magento 2

texts:
How i can pass helper data to Knockout JS to show it on my html file. Actually i am working on Checkout page and i want to show the name of product owner on checkout summary.

Any help would be appreciated!


texts:
I've recently upgraded from Magento 2.3.6-p1 to 2.3.7. Front end and everything works great (and on PHP7.3), but the following cron fails:
/usr/bin/php7.x /path/to/magento/bin/magento setup:cron:run >> /path/to/magento/bin/magento/var/log/setup.cron.log

I am aware this cron has been removed in 2.4+, but have found no reference to its removal in Magento 2.3.7, any insight from anyone to confirm? I've been searching the internet but found very little usage examples on 2.3.7!


texts: Solved: Braintree and Magestore Onestepcheckout setData() on a non-object

texts:
we use magestore onestepcheckout 3.5.0 on magento 1.9 with braintree payment integrated. In backend module you can set admin notification email and you can put more than one address separated by a coma ( , ) but there is an error on function that manage this send that thrown in this exception:

exception 'BadMethodCallException' with message 'Call to a member function setData() on a non-object (array)' in app/code/community/Gene/Braintree/Block/Paypal/Info.php:71

So you have to change the file Magestore/Onestepcheckout/Model/Observer.php row 313

 foreach ($sendTo as $recipient) {
                $result = $mailTemplate->setDesignConfig(array('area' => 'frontend', 'store' => $_order->getStoreId()))
                        ->sendTransactional(
                        $template, Mage::getStoreConfig('sales_email/order/identity', $_order->getStoreId()), $recipient['email'], $recipient['name'], array(
                    'order' => $_order,
                    'billing' => $_order->getBillingAddress(),
                    'payment_html' => $paymentBlock->toHtml(),
                        )
                );
            }

with

// Added
$paymentBlockHtml = $paymentBlock->toHtml()

foreach ($sendTo as $recipient) {
                $result = $mailTemplate->setDesignConfig(array('area' => 'frontend', 'store' => $_order->getStoreId()))
                        ->sendTransactional(
                        $template, Mage::getStoreConfig('sales_email/order/identity', $_order->getStoreId()), $recipient['email'], $recipient['name'], array(
                    'order' => $_order,
                    'billing' => $_order->getBillingAddress(),
                    'payment_html' => $paymentBlockHtml,
                        )
                );
            }


texts: Magento 1 :How can I set Any Kind of Discount is not apply for Specified Product?

texts:
I have Five Prime Products in Magento 1 site And I want to set Condition for that

  No any Kind of Discount apply on this particular Product.

Problem is Discount Coupon is Apply on this product and I not wont to apply.

How can i set Condition
If cart contains Prime Product then coupon code should be invalid.


texts: How do you deal with the Sales Order API not having a limit capability?

texts:
Working on an Order API integration for a community module.  Wanted to avoid rewriting the Mage_Sales_Model_Order_Api model, so instead I implemented an observer of the sales_order_collection_load_before event that limits the result set to a hard limit.  Went with 250, that's the limit Shopify uses, seems like a sane number if you're going to hard code something.

If there are API integrations that depend upon the order API not having any limit, then they could run into issues.  For example, if someone has an Order API integration that pulls in the full number of orders on a monthly basis (or even a daily basis, the time range is somewhat arbitrary), then it would now only pull in 250 orders.

While it's possible to filter the result set on a date range, any date range that you pick would be essentially arbitrary.  A day's worth of orders might be way too small and result in an unnecessarily high number of API hits for smaller stores, and for larger stores, it might be way too large of a range.  It really is necessary to be able to limit an API response on an absolute number of results, and that's what most modern API's do.

Has anyone found any good solution to this?


texts: How to get magento store email address and name in my custom module?

texts:
I created own module, there how to get sender name and email ?

I have to create custom admin config option like Email Sender. Here i used below code, to set drop-down then i don't know how to get store email and name in my controller.

<outofstocknotification_admin_email>
    <label>Email Sender</label>
    <frontend_type>select</frontend_type>
    <source_model>adminhtml/system_config_source_email_identity</source_model>
</outofstocknotification_admin_email>


texts: How to remove a specific href from a top-menu link in Magento

texts:
i post before several day this one

Hello I am trying to make 3 items on menu to be not click-able and I want to ask how to remove a specific href from a top-menu link in magento? (I don't want to remove from all menu items just for 3 as you can see here http://prntscr.com/kqtt77) also I don't want to use href="#" any suggest?

well when i set url from admin panel it duplicate the urls... after flush and shows me in db this

<a href="https://url/"https://url/" class="level0 dropdown-

any suggest??? :/


texts: URL subfolders for multi-language Store Views in Magento 2

texts:
I have many shops in many languages and plan to migrate to magento 2, so i need to do something like this.

shop1.com/en/
shop1.com/fr_fr/
shop2.com/en/
shop2.com/it_it/

I do not want to use "Store Code to Urls" because I have many store codes and they are build like this "shop1_fr_fr" so look dirty in the url.

I already spent a lot of time reading many topics here and there but i am still not able to make it working, answers are for magento1 or incomplete or i am stupid.

I have ssh access so i can do whatever it require to do (symlinks, update index.php or .htaccess, etc).

If someone can give help.


texts:
I am working on Magento 2.3.3. I am getting an error on my instance

Fatal error: Uncaught Error: Class 'Magento\Framework\Profiler' not found in vendor/magento/framework/App/ObjectManagerFactory.php:144

I have found Magento Commands are also not executing on the instance.
Please guide to resolve this error.
Thanks!!!


texts: Magento 2 shipping rule product specific

texts:
Have minimum cart total for free shipping. But want to apply specific product  shipping price to be configured and should add up to total.
Please help.


texts: Create an extra price attribute (for container deposit)

texts:
I need an extra cost attribute so I can add an extra price per product. I'm creating a beer webshop. In my country we have a deposit on glass bottles. So I need to show the price of a bottle without the deposit. On the final checkout page the deposits must be calculated and showed to the customer.

So the extra cost attribute must be calculated on top of the regular price.


texts: magento - use jalali calendar instead of gregorian

texts:
I want to change the way that dates are shown in magento and use jalali calendar instead.

In order to do that, I want to just edit the parts that are responsible for showing dates and before showing them, change gregorian dates to jalali. and also whenever user is entering any jalali date, I convert them to gregorian before saving in db.

The second part (convert to gregorian before saving) is somehow done. But I got stuck in first part. For example How can I edit the way that dates are shown in "Set Product as New from Date" in Creating product in admin?

any idea is appreciated.

P.S : I ask the same question in stackoverflow too : link


texts: How to create Custom Form in magento for custom module with form helper

texts:
I need to create vendor registration from for our vendor. How to create Form helper in custom form

<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">

                    *<?php echo $this->__('Email Address') ?>

                        <input type="text" name="email" id="email_address" value="<?php echo $this->escapeHtml($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />

</form>

I m getting error  Fatal error: Call to a member function getEmail() on a non-object
I need to know how can i crete form object in magento...


texts: Magento 2 How to get serialized data and use in Dropdown Box

texts:
I am using Dynamic Rows in a module that saves data to the core_config_data table like this:

{"_1564763325005_5":{"addresses":"123 My Street, Bldg. 1, Reno, NV 85234"},"_1566830530708_708":{"addresses":"2123 My Street 2, Bldg 2, Reno, NV, 12345"}}

I am using this to take values and populate a dropdown box in a form that was built for checkout:

use Magento\Framework\Stdlib\ArrayManager;

class Options
{
    protected $arrayManager;

    public function __construct( ArrayManager $arrayManager )
    {
        $this->arrayManager = $arrayManager;
    }

    public function afterProcess(
        \Magento\Checkout\Block\Checkout\LayoutProcessor $subject,
        array $jsLayout
    ) {
        $checkoutBuildingAddressOptionsPath = $this->arrayManager->findPath(
                'checkout_building_address',
                $jsLayout
            ).'/options';
        return $this->arrayManager->set(
            $checkoutBuildingAddressOptionsPath,
            $jsLayout,
            $this->getCustomOptions()
        );
    }

    /**
     * @return array
     */

    protected function getCustomOptions(): array
    {
        // TODO:: get it from somewhere
        $options = [
            [
                'value' => '1',
                'label' => 'This is the first option',
            ],
            [
                'value' => '2',
                'label' => 'Opt 2',
            ],
            [
                'value' => '3',
                'label' => 'Opt 3',
            ],
            [
                'value' => '4',
                'label' => 'Opt 4',
            ],
        ];
        return $options;
    }
}

I am having a hard time getting the data from the table into the $options array.  How do I do this?

Thanks!


texts: How do I link to external images on Magento 2?

texts:
I have an external dynamic image server. I would like to link directly to these external images and not upload to Magento's media library.  I cannot seem to find any setting and/or extension.

It appears this may be impossible because there is no option to disable Magento's image cache service.

Anyone know how to do this?  Any help is much appreciated.


texts: custom options on configurable products with no associated products

texts:
I see in magento admin configurable products, that have no associated products custom options don't show on frontend,I set that product inventory but still nothing. I know it is possible but I am not programmer so I dont have a clue where to start and havent found any useful info on the web,any help is much appreciated.
Thx


texts:
I m new to magento and php. while I m learning, try to write some code but unable to find where the error is. for example I m trying to build the grid in admin panel. I have followed the instructions from different tutorials. But could not find where the error is. there is no line or clue in exception log or system log.
So how to find where the error is or Actually what happening so that I could not see my output. I m using php storm IDE.
On creating Admin panel grid I could not load adminhtml/mymodule.php, what would be the issue?


texts: Dashboard's Lifetime Sales And Total Order Revenue are displaying different values ? Any Solutions?

texts:
I have a problem with dashboard's Lifetime Sales and Revenue displays different figure.

i have tried displayed lifetime sales by following code:

Mage::getResourceModel('reports/order_collection')->calculateSales()->load()->getFirstItem()->getLifetime();

and it is displaying correct, same amount as Lifetime Sales on dashboard.

so i am getting confused whether lifetime sales is wrong or /revenue is wrong.

Another Snap :

Can any body help me???


texts: Transaction email - I like to change the order detail fonts

texts:
My goal is to have the Order Confirmation Email have a uniformed look. I am able to make changes the using the Transnational Email admin function in Magento but some parts of the Order Confirmation are not programmed in the HTML coding using the Transnational Email.
I have attached a copy of the final copy that is sent to our customer and i have inserted a copy of the Transnational Email html coding.
I'm looking to have the Logo moved to the center of the heading, and the line item font, look the same for total, sub total, shipping, and Grand total.

{{template config_path="design/email/header"}}

{{inlinecss file="email-inline.css"}}

                        Thank you for your BIOTONE order.
                        Once your package ships you will receive an email with a link to track your order. Your order summary is below.

                        Order Questions?

                            {{depend store_phone}}
                            Call:
                            {{var store_phone}}
                            {{/depend}}
                            {{depend store_hours}}
                            {{var store_hours}} PST (M-F)
                            Closed Weekends and Holidays
                            {{/depend}}
                            {{depend store_email}}
                            Email: {{var store_email}}
                            {{/depend}}

            Your order #{{var order.increment_id}}
            Placed on {{var order.getCreatedAtFormated('long')}}

            {{if order.getEmailCustomerNote()}}

                    {{var order.getEmailCustomerNote()}}

            {{/if}}
            {{layout handle="sales_email_order_items" order=$order}}

                        Bill to:
                        {{var order.getBillingAddress().format('html')}}

                    {{depend order.getIsNotVirtual()}}

                        Ship to:
                        {{var order.getShippingAddress().format('html')}}

                    {{/depend}}

                    {{depend order.getIsNotVirtual()}}

                        Shipping method:
                        {{var order.shipping_description}}

                    {{/depend}}

                        Payment method:--

{{template config_path="design/email/footer"}}


texts: Default Transactional Emails containing Var_Grid

texts:
In the default transactional emails admin panel there is a function within an email called var_grid.

It populates with details like "Wishlist Contents" and such.

However the format is a bit archaic and ancient and i wish to change the way that it appears, spacing, lines etc.

Any idea where this information is stored so i can edit it? I thought itd be in a CSS file somewhere but ive had no luck in finding it.

Thankyou.


texts: Css and js not getting reflected in Magento 2.0.13 after installation

texts:
I tried,

Deleted files and folder from pub/static except .htaccess file.
In app/etc/di.xml - Replaced Symlink to Copy

But still no effect.

I am using ubuntu.


texts: Magento2 Delete config row while Extension Uninstall

texts:
I have created a custom module which is being installed via composer.

When I run the command - php bin/magento module:uninstall Vendor_Faq

It is removing all the corresponding tables which I wrote in Uninstall script. But how to remove the entry from core_config_data and setup_module table using Uninstall script.


texts: Disable search Input field hide/show functionality of Magento 2

texts:
I have to remove default search input hide/show functionality of magento 2.

currently in responsive view when we click on search Icon search input field is displaying. when we click on label of focus in input it's adding "active" class to form and lable.

I have to remove this and add custom jquery code to hide/show search input.


texts: Create credit memo for zero product value

texts: Is there anyway to create credit memo for zero product value and the intention is to keep track of in and out, however, credit memo value has to be positive as per the system.


texts: 1.9.4 thumbnails not loaded correctly from .thumbs dir

texts:
... or "breaking already broken features - what is Mage_Core_Model_File_Uploader::getCorrectFileName() for?"

M1 has a bug that thumbnails used in CMS blocks/pages (insert image button) are not stored/loeaded correctly.

To fix this we have used solution from https://www.ctidigital.com/blog/fixing-magento-improving-performance-of-the-wysiwyg-editor/

Worked well for years but now I've seen 1.9.4 also broke this!

1.9.4 replaced

  Mage_Cms_Model_Wysiwyg_Images_Storage::getFilesCollection()

$thumbUrl = $this->getThumbnailUrl($item->getFilename(), true);

with

$thumbUrl = $this->getThumbnailUrl(
    Mage_Core_Model_File_Uploader::getCorrectFileName($item->getFilename()),
    true);

This passes the complete image path to getCorrectFileName() (instead of filename only) and replaces all backslashes with underscores leading to always failed checks in getThumbnailUrl() - so every thumb is generated new every time.

/**
 * Correct filename with special chars and spaces
 *
 * @param string $fileName
 * @return string
 */
static public function getCorrectFileName($fileName)

This turns var/www/[...]/Some/Image.jpg into _var_www_[...]_Some_Image.jpg ...

Do you have a better idea then this?

$thumbImg = Mage_Core_Model_File_Uploader::getCorrectFileName($item->getBasename());
...
$thumbUrl = $this->getThumbnailUrl($path . DS . $thumbImg, true);


texts:
I am trying to figure out how that an automatic feed (csv or xml) works within Magento 2. Does anyone know a page with information on how to do so?

I have the xml product feed or the CSV product field but ofcourse i still need to convert their fields into magento fields and visa versa.

Since its the first time that i work with feeds i'm hoping that someone of you knows where i can start reading about this and learn how to do this.

Thanks!


texts: Get the value of a dropdown attribute of an associated product

texts:
I'm trying to display the (non empty) attribute values of all associated products in a grouped product.

My main issue are the dropdown attributes

I can display the manufacturer value but not the color one. Any other custom attribute is not visible either.

I have tried to solve it using this solution:
https://stackoverflow.com/questions/8754579/is-it-possible-to-show-custom-attributes-of-associated-products-under-a-grouped

I have also tried loading a specific associated product by Sku without success.


texts: Filter attribute value inside layered navigation

texts: Is there anyway to make a search tool to filter value inside an attribute like this


texts: Magento2: setFilterGroups(array) SearchCriteria Error

texts:
I have the following code:

$filter1 = $this->_filterBuilder->setField('name')
    ->setValue('%'.$searchTerm.'%')
    ->setConditionType("like")
    ->create();
$filter2 = $this->_filterBuilder->setField('description')
    ->setValue('%'.$searchTerm.'%')
    ->setConditionType("like")
    ->create();
$filterOR = $this->_filterGroupBuilder->addFilter($filter1)->addFilter($filter2)->create();
$this->_searchCriteriaBuilder->setFilterGroups([$filterOR]);
$this->_searchCriteriaBuilder->addSortOrder($searchOrder, SortOrder::SORT_ASC);
$searchCriteria = $this->_searchCriteriaBuilder->setCurrentPage($page)->setPageSize($pageSize)->create();
$searchResults = $this->_productRepository->getList($searchCriteria);

It throws an error:

  Call to undefined method
  Magento\Framework\Api\Search\SearchCriteriaBuilder::setFilterGroups()

why?


texts: how to find Payment Response URL, in Magento account?

texts:
We are configuring, a payment gateway from Worldpay to Magento our website. it says, we need to copy the value of Payment Response URL from Magento to Worldpay,
Payment Response URL. How can i find it in Magento ?

please inform,
many thanks
sham


texts: Magento 2.3.4. This JavaScript error "Uncaught TypeError: Cannot set property 'status' of undefined" appears only on the configurable products

texts:
This error originates from the line data[l].status = 1,. Could you please someone point out what is wrong with this line?

        t(n).on("load", function() {
            **data[l].status = 1,**
            t(r).on("load", function() {
                (r.width > u.width() || r.height > u.height()) && (showWrapper = !0,
                f(v, d),
                data[l].status = 2,
                r.width > r.height ? data[l].zoom = r.width / u.width() : data[l].zoom = r.height / u.height(),
                c(d, data[l]),
                o(l, d, r, u))
            }),
            r.src = data[l].largeUrl
        }),
        n.src = d.src
    }


texts: Magento2 - Is it possible to get base url in a static block?

texts:
I'm trying to get the base url in a static block.

I've tried the following code:

<a href="{{base url=""}}../business">

I knew this wasn't going to work because it needs <?php ?> around it.
Is there an alternative way to get the base url in a static block through the backend?

Screenshot for clarification:


texts:
My second question. i am trying to help make small changes to my Dad's website. I have made changes to his css which work fine when i inspect element and copy modified css into it. Then i logged into his server where the file is and got to the correct path which is http://www.brooklynbigandtall.co.uk/skin/frontend/default/magezon/css/styles.css. Then i cleared the cache at both ends, cleared out css/javascript cache but it still isnt taking effect. When i look into the server and get the css file called styles.css it shows my changes in there BUT when i view page source and look at the css thats loaded from the same path, my changes are not in it.

His web address is www.brooklynbigandtall.co.uk
Really puzzled. Any help would be greatly appreciated. Template used is magezon and we are running magento 1.9.1.0


texts: Show Account information tab as active in admin customer edit page Magento2

texts:
I want to show account information tab as active,

when admin goes to customer edit page. By default it shows customer view tab as active.

I checked Magento Ui module but still no luck. Is there anyone who did this type of customisation.

Appreciate if anyone can help!!


texts: How to add a website switcher instead of store view switcher?

texts:
I have 3 websites (mydomain.com/us/, mydomain.com/en/ and mydomain.com/eu/), each has one store view. I want to switch between these 3 Magento websites with a dropdown switcher similar to that used for switching store views, but there isn't one for switching websites. There are dropdowns for switching language, currency and storeviews but not for switching websites.

I know this has been asked previously and I have tried to apply those solutions.

I found a previous solution to this at;
https://stackoverflow.com/questions/4270490/how-do-i-get-a-website-switcher-instead-of-store-switcher

Following these instructions, I copied;

  app/design/frontend/base/default/template/page/switch/stores.phtml

to;

  app/design/frontend/{my_theme_package}/{my_theme}/page/switch/stores.phtml

and replaced existing with following code;

<?php
$websites = Mage::app()->getWebsites();

if (count($websites) > 1): ?>

    <?php echo $this->__('Select Store:') ?>
    <select id="select-website" title="<?php echo $this->__('Select Store') ?>" onchange="location.href=this.value">
    <?php foreach ($websites as $website): // print out each website name and code as a dropdown box item ?>
        <?php $_selected = $website->getCode() == Mage::app()->getWebsite()->getCode() ? ' selected="selected"' : '' ?>
        <option value="<?php echo $website->getDefaultStore()->getBaseUrl()?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($website->getName()) ?></option>
    <?php endforeach; ?>
    </select>

<?php endif; ?>

I then refresh cache and when I check the site, there is no switcher where I expect it to be?

Currently each website has one storeview but I may want to add additional storeviews to the EU site for different language versions at some future point.
 I have already tested this by adding an additional storeview to the EU website and when I go to mydomain.com/eu/ the storeview switcher does appear for these eu-en and eu-de storeviews.
Additionally, for testing purposes I have also added an additional storeview to US website, the storeview switcher does appear for us or canada storeviews.
 When I go to either the mydomain.com/ or mydomain.com/uk/ websites there is no storeview switcher which is correct.
 Looking at it now I probably need a website switcher and possibly a storeview switcher together in the scenario of having more than one EU storeview, other than Geo-IP Default Store, is there an extension for this?


texts: no possibility to log in / register after transferring files

texts:
I moved and run all my online site files and database to localhost.

everything works fine but when I try to login or create new account (front-page) nothing reacts.

In the first place entered correct data then I click login - then the page refreshes and deletes only all data from the form.

the same problem is when trying to set up a new customer account on the fron page, I checked in the administration panel and there is no any new account.

when I add product to the basket, a message is displayed after a while

"You do not have any products in your cart. Click here to continue shopping."

everything works fine on the online site so I do not know why I get this error on localhost.


texts: While getting the productCollection trough $block->getLoadedProductCollection(), no access on custom attributes - why?

texts:
The Problem:
I am modifying the Magento_Catalog/templates/product/list.phtml and I'm trying to access my custom attribute ku_untetitel.

In the .phtml, I'm using the following code to get the productCollection (magento default):

$_productCollection = $block->getLoadedProductCollection();

And I try this to get my custom attribute:

    <?php
            if(!empty($_product->getData('ku_untertitel'))):
            echo $_product->getData('ku_untertitel');
        endif;
    ?>

When taking a look at the frontend, the HTML is there, but the content is empty, like this:

What am I doing wrong here, and why can't I access custom attributes when getting the product Collection trough something else then my own Collection? I suppose the collection doesn't contain much more information then the basic attributes, but not the custom attributes.

How can I modify my files in order to achieve what I want?


texts:
I am really struggling to find the file I need to edit to change the text for new and sale labels on products. I'm referring to the labels that appear on products when you set the new date range or when it's on special offer.

Does anyone know where to locate the file that controls this?


texts: Magento 2 - Check if user is loggen in header.html

texts:
I'm trying to create a piece of code to check if the customer is loggen in or not. I read not to use the objectmanager for that, but I don't know where to put which code.

What I need:

if customer is logged in {
Go to my account
} else {
Login
}

How can this be achieved?

I'm using Magento 2.2.6


texts: Magento 2.3 Upgrade : Undefined class constant 'WYSIWYG_EDITOR_CONFIG_PATH' in vendor/magento/module-ui/Block/Wysiwyg/ActiveEditor.php:56

texts: After Upgrading from Magento 2.2.7 to Magento 2.3, I am getting this error Undefined class constant 'WYSIWYG_EDITOR_CONFIG_PATH' in admin and frontend. Received this issue right after upgrading. The upgrade process was successful.


texts: Placing orders programmatically from 3rd party ordering system

texts:
Before I start pulling my hair out with this one as I think its going to be a complicated one I would really appreciate someones advice.

The current situation is a company I'm working on makes all of their orders over the telephone and put into a backend ordering system.
I've built a Magento frontend that I'm going to roll out to their existing customers who are all on Purchase Order numbers. No payment needed!

The customer will be able to place an order through Magento which is fine. If the customer makes a telephone order though, the order will be placed directly into the 3rd party backend ordering system.
I want to keep a full track of all orders placed so customers can see all order history in Magento.

I essentially want to be able to have the 3rds party system spit out order information to csv or DB and have Magento pick up the order information and create the order within Magento.
That is it in its most simple form.

Is there a best practice for this?

Would really appreciate your help!

Thanks


texts: New Product DROPDOWN Attribute (IF THEN ELSE)

texts:
I made a new Product Dropdown Attribute that will show on a Group Product Page.

My idea:

<?php IF echo $this->htmlEscape($_item->getAttributeText('etickettype')) = 'GREEN'?>

<?php IF echo $this->htmlEscape($_item->getAttributeText('etickettype')) = 'RED'?>

<?php IF echo $this->htmlEscape($_item->getAttributeText('etickettype')) = 'BLUE'?>

<?php endif; ?>

I know this code is not the correct, but does anyone know how I can find or explain the correct code?


texts:
Need to align the title of the column(header_css_class) and content(align) dynamically of return of a method.

I tried like this in after calling a methodo and failed.

Example:

<?xml version="1.0"?>
<layout>
    <sales_order_grid_update_handle>
        <reference name="sales_order.grid">
            <action method="addColumnAfter" ifconfig="dexxtz_customgrid/general/active">
                <columnId>payment_method</columnId>
                <arguments>
                    <header>Payment Method</header>
                    <index>payment_method</index>
                    <header_css_class>a-center</header_css_class>-->
                    <align>center</align>
                    <filter_index>payment.method</filter_index>
                    <type>text</type>
                    <width>100px</width>
                </arguments>
                <after helper="customgrid/getAfter" />
            </action>
        </reference>
    </sales_order_grid_update_handle>
    <adminhtml_sales_order_grid>
        <update handle="sales_order_grid_update_handle" />
    </adminhtml_sales_order_grid>
    <adminhtml_sales_order_index>
        <update handle="sales_order_grid_update_handle" />
    </adminhtml_sales_order_index>
</layout>


texts: Magento 2 : remove delete image checkbox from admin edit form

texts:
I have add an image upload field in my modules edit form using-

$fieldset->addField(
    'image',
    'image',
    [
        'name' => 'image',
        'label' => __('Image'),
        'id' => 'image',
        'title' => __('Image'),
        'class' => 'required-entry',
        'required' => true,
    ]
);

While editing row it displays checkbox to delete image, I have only one image upload field and that is required also.  So I want to remove this checkbox. How can I remove this checkbox?


texts: magento 2 - In what case we need to run this command magento setup:di:compile?

texts: In what case we need to run this command magento setup:di:compile ?


texts: Should I allow google to index Magento filters/attributes?

texts:
What are the pros and cons to allowing Google to index attributes/filters?
I have all SEO urls setup correctly and run a footwear store.
One possible url could be:

www.shoestore.com/size6/black/hiking-boots

Allowing google to index all of my attributes will create thousands of more URLs for google to crawl/index - could this be a negative?


texts: Customer unable to login on frontend Magento 1.9.2.4

texts:
Customer visits website and they are able to login, but when they logout, they are unable to login again. When they click login, the login page just refreshes.

Additionally, if i clear the site cache using our Supercacher utility located in our Siteground control panel, the customer is then able to login again, but if they logout, they are then unable to login again.


texts: Magento2 filter not working for request parameter for order grid

texts:
I want to filter Sales Order query based on request parameter passed in querystring like following:

http://127.0.0.1/website/admin/sales/order/index/key/b42c90e9ca2c5bb07e616df1140b07770910383e85e83f878d7f37b65e548b41/?vendorname=CFM

so when there is vendorname=CFM in request parameter i want to filter order grid query with vendorname in where clause, for this i have done all necessary code, but request parameter not working with filter so i am not getting proper results, can anyone help me i am stuck from 2 days for this task but didn't find any solution. please find attached screenshots for reference what i have done so far.


texts: How to call getReviewsCollection() function from Magento\Review\Block\Product\View?

texts:
At the bottom of the page I have created a custom module in that I want to call getReviewsCollection() function to display information of reviews?

Can anyone please help me?

Bottom of the page custom module is displayed.

I have used https://github.com/MauroNigrele/magento2-test-modules/tree/master/Test/Catalog/view/frontend to create custom module.

Test/Review/registration.php

 <?php
     \Magento\Framework\Component\ComponentRegistrar::register(
     \Magento\Framework\Component\ComponentRegistrar::MODULE,
     'Test_Review',
      __DIR__
 );

Test/Review/etc/module.xml

 <?xml version="1.0"?>
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
 <module name="Test_Review" setup_version="1.0.0">
    <sequence>
        <module name="Magento_Catalog"/>
        <module name="Magento_Review"/>
    </sequence>
 </module>
 </config>

Test/Review/Block/Product/View/Extra.php

  <?php
 namespace Test\Review\Block\Product\View;
 use Magento\Catalog\Block\Product\AbstractProduct;
 class Extra extends AbstractProduct
 {

 }

Test/Review/view/frontend/templates/product/view/extra.phtml

 <?php /* @var $block \Test\Catalog\Block\Product\View\Extra */?>
 <?php $_product = $block->getProduct() ?>

<?php echo 'My Product Name Is: ' . $_product->getName(); ?>

Test/Review/view/frontend/layout/catalog_product_view.xml

 <?xml version="1.0"?>

<referenceContainer name="product.info.social">
    <block class="Test\Review\Block\Product\View\Extra"
        name="product.view.extra"
        template="Test_Review::product/view/extra.phtml"
        after="-">
    </block>
</referenceContainer>


texts: Magento 2: Remove custom customer attribute from register form

texts:
I have a custom attribute test on the customer entity. By default it appears on the register form. I wish it would not.

EDIT The attribute has is_user_defined set to 1

Any tips?


texts: PHP How can i get the Coupon code discount amount for the current session order

texts:
Guys i'm trying to find a code that will give me the discount amount for the current session order when i discount code is used.

Here is what i have right now but it is not working:

        $coupon = Mage::getModel('salesrule/rule');
        $couponCollection = $coupon->getCollection();
        foreach($couponCollection as $c){
            $CouponDiscount = $c->getDiscountAmount();
        }
        echo $CouponDiscount;

How can i get the amount of the discount used in the current session order ?

Thanks in advance!


texts: Magento 2: How to fetch data from custom table and show in Cart page

texts:
Magento 2: How to fetch data from a custom table and show in Cart page
I want to show custom table data values in cart page and add those values in total.
Please help me with some tutorials or code.
Thanks


texts: List of files those are updated in upgrade Magento 2.2.x1 to 2.2.x2

texts: I need to list all the files which are modified as we upgrade Magento 2.2.x1 to 2.2.x2.So that I can figure out the rewrites and the other plugins which I have made are working properly after the upgrade.


texts: Getting this jquery error on homepage of my Magento store

texts: Can anyone help? Seems to be a jquery issue.


texts: Migrate Magento EE 2.1.8 to Magento CE 2.1.8

texts:
How to migrate Magento Enterprise Version 2.1.8 to Magento Community Version 2.1.8?

I have installed a fresh copy of Magento CE with new database then Transfered the theme and the extensions.

Everything works fine.

Then I changed the database connection to the EE database. When I view a product and go to checkout/Cart, I got the below error:

Fatal error: Class 'Magento\GiftCard\Model\Attribute\Backend\Giftcard\Amount' not found in /home/user/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

Knowing that I have disabled all the GiftCard Extensions on the EE version before migration.


texts: How to add a order to Transactions and billing agrrements?

texts:
I’m new to Magento. I know the little bit of definition about transactions and billing agreements modules under sales module.

Transactions: sometimes customer calls to the site admin and order some item at that time we can use to transaction details.

Billing agreements: billing agreement use when customer purchase item EMI based at that we can use billing agreement for customer.

But when I came to Transactions and Billing Agreements module only Reset Filter and Search options is there.

Where I can set the above methods (transactions & Billing Agreements) to product.
And how can I implement that functionality?
Can you give me brief information?

Thanks in advance.


texts: Currency Rate not importing correctly from Webservicex

texts:
For the past few days it seems Magento's default currency rate updater has not been working.

As you can see, after I click import, most of the currency rates show 1:1 which is obviously not right. We are on Magento CE 1.9.2.1.


texts: Facing Issue while configuring Fedex shipping method

texts:
Tried to configure fedex with magento 2 and refered the following url:
http://inchoo.net/magento/how-to-set-fedex-shipping-in-magento/

Shipping method for fedex is visible on front end but not being enable even after disabling the soap cache.

Log exception is :
main.CRITICAL: SoapFault exception: [HTTP] Could not connect to host in
\Magento_13\vendor\magento\module-fedex\Model\Carrier.php:491
Stack trace:

0 [internal function]: SoapClient->__doRequest('https://wsbeta....', 'getRates', 1, 0)


texts: How to display multiple instances of products list, each by category id

texts:
I have this code and it displays the product name and product url by category id. Question 1 = How do I add the product image to the echo? Question 2 = How can I change the code so I can use multiple instances of the code (in same template file) with different category id's?

Block file:

<?php
namespace Company\Module\Block;
class Custom extends \Magento\Framework\View\Element\Template
{
    protected $_categoryFactory;

    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Catalog\Model\CategoryFactory $categoryFactory,
        array $data = []
    )
    {
        $this->_categoryFactory = $categoryFactory;
        parent::__construct($context, $data);
    }

    public function getCategory($categoryId)
    {
        $category = $this->_categoryFactory->create();
        $category->load($categoryId);
        return $category;
    }

    public function getCategoryProducts($categoryId)
    {
        $products = $this->getCategory($categoryId)->getProductCollection();
        $products->addAttributeToSelect('*');
        return $products;
    }
}

Template file:

$categoryId = 6;
$categoryProducts = $block->getCategoryProducts($categoryId);
foreach ($categoryProducts as $product) {
    // print_r($product->getData());
    // printing category name and url
    echo $product->getName() . ' - ' . $product->getProductUrl() . '<br />';
}


texts: How can i apply coupon code if order total value is greater than 100 INR?

texts: How to create and apply coupon codes for total order value is greater than 100 INR?


texts: How i can extend more than one class in magento 2?

texts:
<?php

use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;

    use Magento\Framework\View\Result\PageFactory;
    use Magento\Framework\App\RequestInterface;
    use Webkul\Mpquotesystem\Helper\Data;
    use Magento\Framework\Controller\ResultFactory;

    class Index extends \Magento\Customer\Controller\AbstractAccount
    {
        /**
         * @var \Magento\Customer\Model\Session
         */

I want to extend my module controller here

how i can extend two classes

else any ideas???


texts: Magento 2 how to check module enabled or not for override html?

texts:
How to check module enabled or not for override html?

I have answer to hide "new address" button from checkout page here
Magento 2 - Checkout. Remove “New Address” button from billing/shipping address with module or theme
. I am using first answer, But I need to check  module is  enabled or not. So, from where i can check this?

I have admin configuration where admin can enable/disable module. now i want to check check if this module is enabled or not?

Also it would be website/store wise.


texts:
I have a multi select attribute with some values. I get the values with this code:

<?php $targetValue = explode(",", $_product->getResource()->getAttribute('nf_allergie')->getFrontend()->getValue($_product)); ?>

    <?php if(count($targetValue) > 0 ): ?>
        <?php foreach($targetValue as $key=>$val): ?>
            <div class="<?php echo $key ?>">

                    <?php echo $val ?>

        <?php endforeach; ?>
    <?php endif;?>

For example some values:
- Gluten
- Mosterd
- Noten
- Schaaldieren

How can I check if the value is Gluten, then show Gluten.jpg. And if also Mosterd is selected, then show also Mosterg.jpg

  How can I achieve such thing?


texts: Check if it is new address on Payment method step

texts:
Is there any way to check via PHP, whether user selected new address in billing step?

Mage::getSingleton('checkout/session')->getQuote()->getBillingAddress()->getCustomerAddressId();

running above snippet provides customer adderss ID of existing address, but even after changing billing address to 'New Address' customer address ID value is not updated to NULL in quote.

Is there any other alternative to check this via PHP?


texts: Sharing data between interceptor (plugin) and block. How?

texts:
I want to use some data from intercepters in a block.

To start with I have attempted to use DI to inject a simple custom model but by logging I see that a instance is been used by the interceptor and the block.

What should I be doing to share data between the interceptor (plugin) and block given that this will always be in the same request lifecycle (i.e. not persisting between requests)?


texts: how to read from database table in system.xml for config?

texts:
I want to use 2 tables in database for system.xml in my module as toOptionArray only for adminhtml config, how can I use it?

it work same as origin country and state ins shipping settings but want use my own table and they are states and cities, means when I select region from dropdown then cities of this state load and I can select one of them

Created 2 table in databse with the name of directory_region and directory_region_city and inserted region_id , region_name , code , city_id , city_name in these 2 tables


texts: Magento 2 - Html Tags in Comment Section of Transactional E-Mails

texts:
I'm struggling around trying allowing html tags in order/invoice comments which are sending out to customer via transaction emails.

What i did:

{{var comment |raw}}

Edited the comment variable, removing the |escape|nl2br tags and adding the |raw tag. In my understanding the raw tag is for allowing html without beeing striped out, but it's not working.

Any ideas?


texts: call Static block, in header section (magento2)

texts:
I have created cms block with id ="headerlink"

I want to add this in header area of magento 2.

My theme, is default magento theme. I am adding following code, in module-theme\default.xml

<referenceBlock name="top.links">
            <block class="Magento\Theme\Block\Html\Header" name="header" as="header" before="-">
                <arguments>
                    <argument name="show_part" xsi:type="string">welcome</argument>
                </arguments>
            </block>
            <block class="Magento\Cms\Block\Block" name="headerlink">
                <arguments>
                    <argument name="block_id" xsi:type="string">headerlink</argument>
                </arguments>
            </block>
        </referenceBlock>

But it is not working.


texts: Magneto2 - How can I remove product image fullscreen and zoom in mobile product page

texts:
I want to enable product zoom and fullscreen light box on desktop but disable them on mobile. I am working on 2.1.6 in theme etc/view.xml.
I can remove/enable product images fullscreen light box on desktop.
<var name="allowfullscreen">false</var> <!-- Turn on/off fullscreen (true/false) -->

remove/enable product image zoom in desktop
<var name="magnifier">
    <var name="enabled">false</var> <!-- Turn on/off magnifier (true/false) -->
</var>

I tried to apply this in mobile breaks points like below, but it does not work for both fullscreen and zoom.
<var name="breakpoints">
    <var name="mobile">
        <var name="conditions">
            <var name="max-width">767px</var>
        </var>
        <var name="options">
            <var name="options">
                <var name="nav">dots</var>
                <var name="allowfullscreen">false</var>
                <var name="magnifier">
                    <var name="enabled">false</var> <!-- Turn on/off magnifier (true/false) -->
                </var>
            </var>
        </var>
    </var>
</var>

Thanks for any help and comments


texts: magento 2 get first level category from current catgeory ID in controller

texts:
I am trying to get first level category from current category ID in my controller .
For example- I have

  Maincategory

  SubCategory1

  SubCategory2

  SubChild1
  SubChild2.

I want to access Maincategory in my controller whether my current catgeory id is SubChild1 or it's SubCategory1.

How can I do this?


texts: Magento 2 add youtube video to media gallery programmatically

texts:
I have some youtube video urls and the matching products. How can I add the videos to the media galleries of my products, as it would be added when I do this via the backend?

I tried using the class ProductAttributeMediaGalleryManagement, but I would have to set a content value that is validated in the create method, but I have no idea to what value this should be set. I also tried to create the Entry and the VideoEntry over factories, but there I have to set a image file, otherwise I also get an exception. I don't have an image file, if I add the video via Backend it creates some placeholder image.

I just want the same behavior as when I go to the backend click Add Video, input URL, Title and Description and click Save.


texts:
After upgrading amasty SEO toolkit from 1.17 to 1.18 i get this error when I try to access to the product edition from the administration page.
If a add an attribute to the group seo toolit optimisation in the attribute set I can access to the product but I'm not supposed to.
Thanks for help

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): The "componentType" configuration parameter is required for the "search-engine-optimization" component.


texts: Magento 2 theme fallback to blank regardless of parent

texts:
I am attempting to create a custom theme utilizing the fallback mechanism. The issue I have encountered is that my theme is only falling back to blank.

This is occurring even though I have set the parent to be luma. I have confirmed in the 'core_config_data' table that my theme is applied. As well as the 'theme' table, my theme (vendor_theme) has the correct parent id that corresponds to luma.

theme.xml:

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Vendor Theme</title>
<parent>Magento/luma</parent></theme>

registration.php:

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/Vendor/vendor_theme',
__DIR__
);

Is there a step that I am missing here?

Also are there any comprehensive tutorials/guides related to custom theme development?


texts: What requirement to create CUSTOM SHIPPING METHOD IN MAGENTO?

texts:
[ Theoretical answer NOT CODE Example ]

Why we required to create custom shipping method in Magento.

OR

we can say in which case(s) it is important to make custom shipping method for our eCommerce?

Required theoretical answer ONLY or You can explain by an example.


texts: Can I override default.xml in app/code/Vendor/Module/view/frontend/layout in Magento2

texts:
I try to declare a layout in

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

but it keep getting override by default.xml set in

Vendor/Magento/Magento_Theme/layout/default.xml

do I have to declare a custom theme to override layout?


texts: Link {{store url}} not linking to the right spot

texts:
I'm using {{store url}} linking in some static pages to link to other product pages. But when I'm linking to .html pages, they end up with a / after, so .html/ and that dosen't work correctly.

I want to link to some pre-selected layered navigation with this:

... onclick="location.href='{{store url='www.site.com/category1/category2/product.html?attribute=1383'}}'"

This gives the url http:.//www.site.com/category1/category2/product.html?attribute=1383/ <- and because of the / my sorting is not showing up. Is the / normal, or am I doing something the wrong way?


texts: Magento 1.9: How to override core payment model

texts:
I want to override the default payment model class in a custom magento extension, as placing the file in local pool with same directory structure working fine but my hosting providers are telling that we have to proceed with overriding this in a custom module.

the class that I want to override is Mage_Payment_Model_Method_Cc and I want to override this in a custom module that I am developing but don't know how to write the config file for this and how to override the functionality. actually I want to overcome the error message "Please enter a valid credit card verification number." when I try to place the order using CC as a payment method and using the SOAP API. I want to comment this validation section to go ahead.

Can anyone help me with this?

thanks


texts:
I am using this extension https://github.com/webspeaks/productsgrid_magento2/tree/master/Webspeaks/ProductsGrid for my custom module where am attaching the product to the series. But when I post data of Main tab & Select Product tab, I am getting only product tab data. If I don't select products then I get main tab data.

Does anyone face the same issue?


texts:
I have a big problem. When one person will buy in my online shop. All work but after select the shipping, and klick on forth, they not forwarding to point 4 the payment method.

That only remains on point 3.

Please help me.


texts:
When upgrading Magento 2.2 to 2.3, I am using php 7.1

However, during the readiness check, I am getting these errors:

  magento/module-sales 100.1.12 requires php ~5.6.5|7.0.2|7.0.4|~7.0.6
  -> your PHP version (7.1.26) does not satisfy that requirement.

If it requires atleast 7.1, how come its telling me it now requires php 7.0 for some modules??


texts: How to disable display error message in magento 1.9

texts:
I am trying to place an order for the product FELINE/CANINE SPAY PACK
in store I am getting struck at shipping methods.
I am viewing the display error message like, This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.
May I know why I am viewing that error message. I am unable to find out the solution for this issue.
Can someone suggest me to get rid of this issue? Is a problem with the product or with shipping methods?
What changes should I do in backend Magento 1.9? Please guys suggest something.


texts: Magento 2.3 - Need detail about some newly introduced feature

texts:
I need to know about some of the newly introduced featured of Magento 2.3

GraphQL
Declarative DB Schema
Asynchronous and Bulk Web API

There are few blogs information but not elaborating properly. I need short and to the point answer not full articles on this.

Any help would be appreciated


texts: Include SKU within Product Drop-Down (Bundle Options) for Magento 2

texts:
I am trying to reproduce some functionality that i did in m1. For my m1 I followed this article to display the sku on the dropdown of my bundle products: Include SKU within Product Drop-Down (Bundle Options)
How can i reproduce this in m2?
I believe this is the file that i should be editing in m2:
app/design/frontend/xxx/xxx/Magento_Bundle/templates/catalog/product/view/type/bundle/option/select.phtml


texts: Magento 2 - Empty arguments in adapter __construct()

texts:
I am creating an adapter for a third party module by following the Magento_Braintree structure.

In the Braintree module, they have a factory BraintreeAdapterFactory that creates an adapter BraintreeAdapter and passes some arguments. I have duplicated the same structure for my module. However, I am getting empty arguments in the __construct() even if I try hard coding values in my factory.

I added a di.xml in an attempt to fix it, but still nothing unless I hardcode values for my arguments. I have also made sure to compile, clean cache and delete files from /generated.

Am I missing something?

Factory:

namespace Vendor\Module\Model\Adapter;

use Vendor\Module\Model\Config;
use Magento\Framework\ObjectManagerInterface;

/**
 * This factory is preferable to use for Module adapter instance creation.
 */
class ModuleAdapterFactory
{
    /**
     * @var ObjectManagerInterface
     */
    private $objectManager;

    /**
     * @var Vendor\Module\Model\Config
     */
    private $config;

    /**
     * @param ObjectManagerInterface $objectManager
     * @param Config $config
     */
    public function __construct(
        ObjectManagerInterface $objectManager,
        Config $config
    ){
        $this->objectManager = $objectManager;
        $this->config = $config;
    }

    /**
     * Creates instance of Contentul Adapter.
     *
     * @return ContentulAdapter
     */
    public function create()
    {
        return $this->objectManager->create(
            ModuleAdapter::class,
            [
                'accessToken' => $this->config->getAccessToken(),
                'spaceId' => $this->config->getSpaceId()
            ]
        );
    }
}

Adapter:

namespace Vendor\Module\Model\Adapter;

use ThirdParty\Delivery\Client;

/**
* Class ModuleAdapter
* Use \Vendor\Module\Model\Adapter\ModuleAdapterFactory to create new instance of adapter.
* @codeCoverageIgnore
*/
class ModuleAdapter
{

    /**
    * @var Client
    */
    private $client;

    /**
    * @param string $accessToken
    * @param string $spaceId
    */
    public function __construct($accessToken, $spaceId)
    {
        $this->client = new Client($accessToken, $spaceId);
    }

}

di.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Vendor\Module\Model\Adapter\ModuleAdapter">
        <arguments>
            <argument name="accessToken" xsi:type="string"></argument>
            <argument name="spaceId" xsi:type="string"></argument>
        </arguments>
    </type>
</config>


texts: Custom selectbox trigger onchange event multiple times

texts:
We have implemented a jQuery selectbox plugin and created a custom trigger event to get the data when a selectbox is changed. For example, we use this to select the desired product attribute options.

Everything goes well until we select an option which has already triggered in the same 'session'. Then nothing happens. How is that possible?

The trigger event:

Element.prototype.triggerEvent = function(eventName)
{
    if (document.createEvent)
    {
        var evt = document.createEvent('HTMLEvents');
        evt.initEvent(eventName, true, true);

        return this.dispatchEvent(evt);
    }

    if (this.fireEvent)
        return this.fireEvent('on' + eventName);
}

var global_select = '';

function customEvent(id, event) {
    global_select = id;
    $(id).triggerEvent(event);
    global_select = '';
}

The jQuery code:

jQuery('select').change(function(e) {
    id = jQuery(this).attr('id');
    if (id && id != global_select)
        customEvent(jQuery(this).attr('id'), 'change');

    jQuery('select').each(function() {
        var id = jQuery(this).attr('id');
        if (jQuery(this).css('display') == 'none') {
            jQuery(this).selectbox('detach');
            jQuery(this).hide();
        } else {
            jQuery(this).selectbox('attach');
        }
    });
});

jQuery('select').each(function(){
    if (jQuery(this).css('display') != 'none') {
        jQuery(this).selectbox();
    }
});


texts:
Every time I access admin panel I get this error message.

I encountered this problem after I change base_url in core_config_data to http://magento.local/magento/, the previous is http://localhosts/magento/. Anyway I changed it back but the problem still be exist.

Note: Also add "127.0.0.1 magento.local" in host file

Here is a full trace

a:5:{i:0;s:67:"Illegal scheme supplied, only alphanumeric characters are permitted";i:1;s:2782:"#0 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Model\Store.php(773): Zend_Uri::factory(' `http://localho...`')
1 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Model\Store.php(607): Mage_Core_Model_Store->isCurrentlySecure()
2 C:\xampp\htdocs\Magento\app\Mage.php(382): Mage_Core_Model_Store->getBaseUrl('skin', NULL)
3 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Model\Design\Package.php(349): Mage::getBaseUrl('skin', NULL)
4 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Model\Design\Package.php(503): Mage_Core_Model_Design_Package->getSkinBaseUrl(Array)
5 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Block\Abstract.php(1035): Mage_Core_Model_Design_Package->getSkinUrl('reset.css', Array)
6 C:\xampp\htdocs\Magento\app\design\adminhtml\default\default\template\login.phtml(32): Mage_Core_Block_Abstract->getSkinUrl('reset.css')
7 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Block\Template.php(241): include('C:\xampp\htdocs...')
8 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml\defau...')
9 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView()
10 C:\xampp\htdocs\Magento\app\code\core\Mage\Adminhtml\Block\Template.php(81): Mage_Core_Block_Template->_toHtml()
11 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Block\Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
12 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Block\Text\List.php(43): Mage_Core_Block_Abstract->toHtml()
13 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Block\Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
14 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Model\Layout.php(555): Mage_Core_Block_Abstract->toHtml()
15 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Controller\Varien\Action.php(390): Mage_Core_Model_Layout->getOutput()
16 C:\xampp\htdocs\Magento\app\code\core\Mage\Adminhtml\controllers\IndexController.php(82): Mage_Core_Controller_Varien_Action->renderLayout()
17 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Controller\Varien\Action.php(418): Mage_Adminhtml_IndexController->loginAction()
18 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('login')
19 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
20 C:\xampp\htdocs\Magento\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
21 C:\xampp\htdocs\Magento\app\Mage.php(684): Mage_Core_Model_App->run(Array)
22 C:\xampp\htdocs\Magento\index.php(87): Mage::run('', 'store')
23 {main}";s:3:"url";s:25:"/magento/index.php/admin/";s:11:"script_name";s:18:"/magento/index.php";s:4:"skin";s:5:"admin";}


texts: layered Navigation price filter issue when configurable products exist in the list Magento 2

texts:
I have an issue with the product minimum and maximum price in the layered navigation.
Please see screenshot below,


texts: Add block below short description on product page

texts:
I am developing a module and would like to put a block on the product page, immediately underneath the short description and above the dropdown selection. I have looked at every single answered question on this site and none of the options work. I honestly have no idea why this should be so difficult but I have spent half a day trying various solutions and can get it near where I want it but not where I actually want it.

Magento 2.3, developing a module (not a theme), I just need to put my block immediately beneath product short description.

This is the closest I can get:

app/code/MyVendor/MyModule/frontend/layout/catalog_product_view.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product.info.options.wrapper.bottom">
            <block class="Magento\Framework\View\Element\Template"
                   name="product.info.my_block_name"
                   template="MyVendor_MyModule::template_name.phtml"
                   before="-" />
        </referenceBlock>
    </body>
</page>

This code puts the block above the quantity field but still below the selection dropdowns which I don't want. I'm assuming something else needs to go into referenceBlock name but I can't find it.


texts: Custom form field not showing validation message

texts:
I have created one custom form and implemented magento validation. Magento validation works for all fields but message of one field is not displaying. I have added datepicker in this field.

Below is the code of my field:

Reward Distribution Date

    <input type="text" name="reward_date" class="input-text _has-datepicker mage-error" data-validate="{'required':true, 'validate-reward-date':true}" id="dp1544438747646" aria-required="true" autocomplete="off" aria-invalid="true">

It shows red border when field is not valid, but it not show the message.

Please let me know if anyone can help.


texts: Custom php code in magento not working / magento block path wrong

texts:
i am new to magento & using magento 2  . I have to run a php code in my cms page . When i check the website i can understand that the theme is Alothemes Bencher6 . So what i did is

  app/design/frontend/Alothemes/bencher6/Magento_Theme/templates

i create a new folder called myphp and file myphpcode.phtml insidethis folder .

So

  app/design/frontend/Alothemes/bencher6/Magento_Theme/templates

there is two folder

html  (this folder is there previously)
myphp (my custom folder )

in myphpcode.phtml i write the following code

<?php echo 'hiiiiiiiiiiii' ; ?>

Now i created a new page in magento and write the following code in content section

<block type="core/template" name="myphpcode" template="myphp/myphpcode.phtml" />

But for some reason this code is not working . I clear the cache . But still same . Please help


texts: How to get actual decimal price of tax without round in Magento 2?

texts:
How to remove the round function from tax price calculation and get decimal point tax price in cart in Magento 2.

Thanks


texts: How to change value to X-Magento-Vary cookie based on URL parameter?

texts:
I would like to change the value of the 'X-Magento-Vary' cookie based on URL query string, just like when a customer logs in or store is beeing changed.

I created a plugin to set a value to the http contexts:

<type name="Magento\Framework\App\Action\AbstractAction">
    <plugin name="my_page_cache_variation" type="My\Module\Plugin\Framework\App\Http\ChangeCustomerContext" />
</type>

In the plugin code I have:

 /**
 * @param \Magento\Framework\App\ActionInterface  $subject
 * @param \Magento\Framework\App\RequestInterface $request
 */
public function beforeDispatch(
    \Magento\Framework\App\ActionInterface $subject,
    \Magento\Framework\App\RequestInterface $request
)
{
    $code_ref = $request->getParam('url_code');
    if ( $code_ref ) {
        $this->httpContext->setValue(
            Context::CONTEXT_GROUP,
            $this->customerSession->getCustomerGroupId(),
            0
        );
    }
}

But the 'X-Magento-Vary' is not changing as expected.


texts: Magento version 1.7.0.2 security patches update

texts:
I am using Magento  version 1.7.0.2 .I have not upgraded it newer version.There are several security patches update notification in my admin notification panel.

Which security patches do I need to update for my Magento version? Any help would be appreciated.


texts: how to implement add to cart functionality on custom module

texts:
I am new in magento. I have made a custom module of price calculator in which a user enter the height and width of a product and it gets its price.
I want to implement add to cart functionality so that height,width and price goes to cart. But i don't know the code and syntax to implement it.

Cart functionality is already installed on my project.

This is controller

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

    public function calculateAction()
    {
        $request = $this->getRequest();
        $printdata = $request->getPost();

        if($this->getRequest()->isPost())
         {
             $obj = Mage::getModel("test_mymodule/results");

             $show_results = $obj->showshuttersprice($printdata['width'],$printdata['height']);

         }

         Mage::register('data', $show_results);// In the Controller

         Mage::register('width', $printdata['width']);// In the Controller

         Mage::register('height', $printdata['height']);// In the Controller

            $this->loadLayout();
            $this->renderLayout();

    }
}

This is my view in which i want to implement add to cart

<?php
 $data = Mage::registry('data');// In the View;

 $width = Mage::registry('width');// In the View;

 $height = Mage::registry('height');// In the View;

if($data == "0" || $data == "NULL" || $data == "")
{
    echo "Sorry, Product is Unavailable";
}
else
{
?>

Price Results for <?php echo $width; ?> mm by <?php echo $height; ?> mm Domestic Rollershutter

               Price	 <?php echo "$"." ".$data; ?>

<?php
}
?>

Add to cart

Any body help me...


texts: How to set type when using setTemplate in action

texts:
I am rewriting the template of newsletter_manage_index like this:

<newsletter_manage_index>
    <reference name="customer_newsletter">
       <action method="setTemplate">
            <template>fekete/Newsletter2Go/customer/form/newsletter.phtml</template>
        </action>
    </reference>
</newsletter_manage_index>

But I need to set the block type of that new template,
e.g.

<template type="fekete_newsletter2go/form">fekete/Newsletter2Go/customer/form/newsletter.phtml</template>

How can I achieve this?


texts:
I'm trying to upgrade to Magento 2.3.1 and I'm running into a problem. I was on PHP 7.1.3 and noticed in the system requirements that it requires 7.1.3 and 7.2.X. We've upgraded the server PHP version to 7.2.16.

Running composer update after doing the other steps brings up this error:

[user@machine public_html]$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 138 installs, 163 updates, 0 removals
  - Installing magento/inventory-composer-installer (1.1.0): Loading from cache

Warning: Unsupported declare 'strict_types' in /home/site/public_html/vendor/magento/inventory-composer-installer/src/Plugin.php on line 6

Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/site/public_html/vendor/magento/inventory-composer-installer/src/Plugin.php on line 55

Running $ php -v returns this info:

[user@machine public_html]$ php -v
PHP 7.2.16 (cli) (built: Mar 25 2019 18:26:43) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

and in my composer.json I have:

... etc ...
"config": {
    "platform": {
        "php": "7.2.16"
    },
    "use-include-path": true
},
... etc ...

I've scoured the internet and it all leads back to upgrade PHP version - which ... it is. What step am I missing?

edit

question replies

  Are you following the steps outlined in the Magento DevDocs or another resource? - Did you update using the Magento script at https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html#upgrade-cli-script?

following the steps for manual CLI upgrade.

  Do you have a cache storage system like Redis or Memcached that needs to be cleared?

Nope.

  Do you have any other errors if you disable the inventory-composer-installer module?

nope.

  Are you upgrading php-fpm?

Not using it.

  What version of Composer do you have after upgrading?

composer -V shows

  Composer version 1.5.2 2017-09-11 16:59:25


texts: Magento After adding the double quote in attribute option swatch images not change in front-end

texts:
In Magento 1.9.1, I have added a size attribute and add a option to that size attribute as Large 9.5" Tall x 7.5" Diameter & Small 2" Tall x 5.75" Diameter. After adding this option with double quote (“) for inch the images not change after select the large or small option from dropdown. Please let me know how to fix this issue. Because we need double quote for display the inches.

  Error in console :- Uncaught SyntaxError: Unexpected token t in JSON
  at position 28


texts: the very first item picture can't show Magento

texts:
I'm using Magento CE 1.9.2.1

For the very first item of the first list on every page(if this page has a list, of course), the picture can't show. If there are more than one lists on that page, only the first has the problem.

So that means the very first item shown on every page has this problem.

I checked dev tools, it can be seen that image src has some problem. src="gethttp:......". And it should be src="http.....".

I thought it might be the problem with list.phtml code. But if that's the case, every first item in every list should have this problem.

Totally confused here. So which file should I look into?

Need help. Thanks

First, I am the author, can't you see the author is maggie as a guest and This is maggie3003 as a newly registered user?
I really want to post code here and get help, so please don't reject my edit again.
If I can leave code in comment, of course I'll do it. But I can't. I don't have enough reputation.

This is from list.phtml

<li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
        <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />

I finally found where went wrong.
I wanted to make magento be able to show gif pics. So I add something in code/local/Mage/Catalog/Model/Product/Image.php. In about line 490, I change the code to

public function getUrl()
{
    $baseDir = Mage::getBaseDir('media');
    $file = ('gif' == strtolower(pathinfo($this->_baseFile, PATHINFO_EXTENSION))) ? $this->_baseFile : $this->_newFile;
    $path = str_replace($baseDir . DS, "", $file);
    return Mage::getBaseUrl('media') . str_replace(DS, '/', $path);
}

After I change it back, everything is fine now.

But now I can't use gif...


texts: Magento 1.9x occasionally displays unfriendly URLs

texts:
Magento will occasionally display unfriendly URLs even though SEF is enabled in the admin. At first glance, I believe this has something to do with indexing and the order we re-index and refresh caches. Or maybe has something to do with the url_rewrites table growing in size and unable to parse the URL quickly.

Currently using ->getProductUrl() to get product URL.


texts: How to implement service contract for a custom module in Magento 2?

texts:
As seen in this post : Deprecated save and load methods in Abstract Model the save and load methods are deprecated in the Magento 2 develop branch.

Thus, the good practice is now to be implement service contracts to deal with CRUD entities.

What is the step by step process I need to follow to implement service contracts for my custom module entities ?

NB: I know there can be a thousands of methods in my CRUD models, I'm just asking for the obvious methods as stated here: http://devdocs.magento.com/guides/v2.0/extension-dev-guide/service-contracts/design-patterns.html:

get
save
getList
delete
deleteById


texts: The following exception is caused by a lack of memory and not having swap configured in magento 2

texts:
When trying to install the sample data via this command php bin/magento sampledata:deploy got an error

  The following exception is caused by a lack of memory and not having
  swap configured.

Can you please help for the same?


texts:
I created a custom module but it doesn’t work on live. On staging it works fine.
The module is installed and enabled.
I also checked config.php and setup_module table, run bin/magento module:status and the module is there.

  Does anyone know what might be the reason for this?


texts: How to change default shipping method on button click (ajax call) on checkout page?


texts: Get my Attribute in details.phtml file on Product Page

texts:
I need to get my Attribute code and it should be printed its values on details.phtml in my theme's template.

I have tried below but no luck.

$attribute = $_product->getResource()->getAttribute('identifier');
if ($attribute)
{
echo $attr_value = $attribute ->getFrontend()->getValue($_product);
}

Any other ideas to get this?


texts: try to get all products by category id but get only enable products in magento2

texts:
How can i get all the products(including disable) programmatically? in Magento2.
try to get all products by category id but got only enable status products.

My code is :

$category = $objectManager->get('Magento\Catalog\Model\CategoryFactory')->create()->load($categoryid);
$collection = $objectManager->get('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory')->create();
$collection->addAttributeToSelect('*');
$collection->addCategoryFilter($category);


texts:
I'm currently on Magento 1.8 and want to get to Magento 2.0

Would it be recommended I first upgrade 1.8 -> 1.9.? before attempting the 2.0 upgrade?


texts: Magento 2.3.3 - Cash On Delivery payment method not showing in checkout page

texts:
I am using cash on delivery & check/make order payment method but it is not displayed in frontend.

I am using slowin theme to create eCommerce website.

Does anyone have any idea?


texts: Magento uploading large resolution images will be compressed

texts:
The magento version I am using is 2.1.5

Uploading product images on the product image upload interface will be compressed.

  For example: I uploaded a 4000*5119 resolution image size of 659kb. After uploading, the file size will be compressed to 66kb, and the resolution will be compressed to 937*1200.

How can I not compress it?


texts: How to display multiple select attribute values in product detail page in Magento 2?

texts:
I am using Magento 2.3

I have an attribute named "Test" and input type for this attribute is multiple select. I have displayed the selected values of this attribute in product detail page. Please refer below screenshot:

These are the selected attribute values in one of the products. Now I want to display them in custom format just like below screenshot:

Desired Format:

attribute value

I have set this attribute in Layered navigation as well

We all know that when we click on any attribute value in layered navigation then filter will be applied and corresponding products with the same attribute values will be shown

So I want the same functionality for the values which I have displayed in product detail page in "More Information" tab. So How can I achieve this?

It means I want to display each values as a hyperlink and when we click on any of the attribute value then I want it to work like Layered navigation that I have explained above.


texts: How to get root directory path in a phtml magento 2?

texts:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface');

$mediaPath  =   $fileSystem->getDirectoryRead(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA)->getAbsolutePath();

it returns media path. How to get the root path of a project in a phtml page?


texts: Delete or modify number of invoice in Magento 1.9

texts:
I want to modify the single number of the invoice in Magento (not modify the start increment ID).

Or alternatively delete only the invoce (not also the order), if after i can recreate the invoice from the single order in backoffice and consequently I'll have the correct number in the invoice.

I want to renumber like this:


texts: I have a developer who is saying we don't need to bother to convert a local/Mage module that does not override core to a local/Module namespace. I was under the assumption we should never user local/Mage and we have started to convert everything? Are we wasting out time. For example many third party payment module use the Mage namespace and put their code in the local directory. (Linkpoint, USAePay)


texts: Magento 2 Uncaught Error: Script error for: tinymce

texts:
Magento 2.3 version
In admin pages,i am getting this error -

Failed to load resource: the server responded with a status of 404 (Not Found)

    Uncaught Error: Script error for: tinymce
    http://requirejs.org/docs/errors.html#scripterror
        at makeError (require.js:166)
        at HTMLScriptElement.onScriptError (require.js:1681)

i checked other magento same questions like this but not getting actual results.

Did any one face this type of issues and How can we solve this ?


texts:
How can I know if a product is configurable (color, size, shape) or can be added directly to the cart (it is unique without configuration possible) programmatically?

For example: I have a shirt without attributes, then my method canBeAddedDirectly($product) should return true.

However, another shirt has 3 colors then, my method canBeAddedDirectly($product) should return false, because I need to choose a color (or other attributes) before.


texts: Adding payment information additional information via *$this->getChildChildHtml('additional')*

texts:
I want to add some custom information below the payment method list in the "Payment Information" tab.

I have noticed the following method call in app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml:

<?php echo $this->getChildChildHtml('additional'); ?>

This would be perfect for me as it would allow me to add my custom block without modifying any templates.

However, looking at the XML layout for that specific template, I see no reference to that additional block (app/design/frontend/base/default/layout/checkout.xml):

<checkout_onepage_index translate="label">
    ...
        <block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="checkout/onepage/payment/methods.phtml">
            <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
        </block>
    ...
</checkout_onepage_index>

Since the method call in the methods.phtml template file uses the getChildChildHtml (and not getChildHtml) method, I can't simply add a block with the name additional to my custom XML layout. Instead I have to do this:

<checkout_onepage_index translate="label">
    <reference name="checkout.payment.methods">
        <block type="core/text_list" name="checkout.payment.methods.additional" as="additional" translate="label">
            <block type="cms/block" name="my.custom.block" as="custom"><action method="setBlockId"><block_id>test</block_id></action></block>
        </block>
     </reference>
</checkout_onepage_index>

This works, because I have created a text list block with the name additional and have added my custom block as a child to that block.

But now I feel like this is not the perfect solution. If another XML layout had to use that additional block, my definition would get overwritten, right?


texts: How to get the number of times a product has been searched

texts:
I want to get the number of times the product has been searched in a month.

Is there any similar table like 'report_viewed_product_aggregated_monthly'?


texts: Promo rules not applied when using custom attribute in condition

texts:
In magento2, I'm using the product custom attribute and setting a condition in promo rule.

When the product is in a cart and if I use that promo rule, it's showing the coupon is not valid.
Somebody suggest an idea.


texts: Migration Mismatch of entities in the document and Volume Check Failed

texts:
migration Map step after below error showing

  [2019-03-15 08:59:48][WARNING]: Mismatch of entities in the document:
  catalog_product_website Source: 7821 Destination: 7758

  Volume Check failed


texts: Re-arranging tabs on product page - Magento 2

texts:
I've added custom tabs to our Magento 2 store called "features","in the box" and "specification".

Currently the tabs on the site display in this order:

Details
Reviews
Warranty Info
Features
In the box
Specifications

We'd like to rearrange our tabs such that our custom ones come first, then the rest. We've tried everything we looked up so far with no success.


texts: How to use NOT BETWEEN SQL with magento collection

texts:
Here is my sql query

select * from my_table where status = 1 and CURDATE() NOT BETWEEN start_date and end_date

I tried the following code but it is giving me wrong answer when both dates are NULL or any of them. I want to compare the date if it is available.

$currentDate = date('Y-m-d');
Mage::getModel('mymodule/module')
            ->getCollection()
            ->addFilter('status',1)
            ->addFieldToFilter(
                array('start_date', 'end_date'),
                array(
                    array('gt' => $currentDate),
                    array('lt' => $currentDate),

                )
            );


texts:
I have created plugin to add link for every product as below:

<?php
namespace Vendorname\Modulename\Plugin;

class ProductData
{

    protected $urlInterface;

    protected $scopeConfig;

    public function __construct(
        \Magento\Framework\UrlInterface $urlInterface,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
        ) {
        $this->urlInterface = $urlInterface;
        $this->scopeConfig = $scopeConfig;
    }

    public function aroundGetProductDetailsHtml(
        \Magento\Catalog\Block\Product\ListProduct $subject,
        \Closure $proceed,
        \Magento\Catalog\Model\Product $product
        )
    {
        $result = $proceed($product);

         return $result . 'mydata';

        return $result;
    }
}

Above is working fine added mydata link to every product. But it is not working on search page. Can anyone help me to add link to search page product using plugin

di.xml file

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">

     <type name="Magento\Catalog\Block\Product\ListProduct">
        <plugin name="my-block"
                type="Vendorname\Modulename\Plugin\ProductData"
                sortOrder="10"/>
    </type>
</config>


texts: No photo for configurable product in cart

texts:
After added product to the basket no display photo for configurable product.

In magento photo have only main product. Sizes no have photo. (simple product work perfect).

@ update

I dont know why magento download photo from sizes (variants) no from main product.

Any one know how to solve this issue?


texts: How to add Custom Step on Checkout and move Shipping methods in that step In Magento 2.3.5

texts:
In this i want one custom checkout step can having only shipping methods inside the step means shipping address and Shipping methods are on different steps on checkout page.
So, Please can anyone have idea than share with me.


texts: Magento 2 - 404 on category page if said category has no products

texts:
I've got a problem with category pages: whenever a subcategory has any number of products inside, then the category page works. But, if the subcategory is empty, it just returns 404, not "no items in this category" or something like that, just 404, even if i select "show blocks and products", it doesn't find the page. Not even if I try to reach it via /catalog/category/view/id/xxx...
I'm absolutely clueless as to why this happens. Has anyone got any idea? I've already looked for solutions on google and stack-overflow, but I didn't find anything related to my specific problem. Maybe I'm doing something wrong? I've also tried to indexer:reindex and setup:static-content:deploy, but to no effect...


texts: How to rewrite a class that has already been rewritten?

texts:
Update: I found that the class I actually need to rewrite is SMDesign_SMDZoom_Block_Product_View_Media and not SMDesign_ColorswatchProductView_Block_Product_View_Media like I originally thought. However, the exact same issue still applies.

The SMDesign SMDZoom extension rewrites block class 'catalog/product_view_media'. The xml for that looks like this:

       <global>
    ...
       <blocks>
        <smdzoom>
            <class>SMDesign_SMDZoom_Block</class>
        </smdzoom>
    </blocks>
    <blocks>
        <catalog>
            <rewrite>
                <product_view_media>SMDesign_SMDZoom_Block_Product_View_Media</product_view_media>
            </rewrite>
        </catalog>
    </blocks>
           ....
       </global>

I want to rewrite this class again. I want to rewrite the catalog/product_view_media class that this smdzoom module is rewriting. Can this be done? What would the config xml look like in my module to do this?

Currently this is my module init xml file:

<config>
    <modules>
        <Goorin_SMDZoom>
            <active>true</active>
            <codePool>local</codePool>
        </Goorin_SMDZoom>
        <depends>
            <Mage_Catalog />
            <SMDesign_SMDZoom />
        </depends>
    </modules>
</config>

and the module config.xml file:

<global>
        <blocks>
            <gbismdzoom>
                <class>Goorin_SMDZoom_Block</class>
            </gbismdzoom>
            <catalog>
                <rewrite>
                    <product_view_media>Goorin_SMDZoom_Block_Product_View_Media</product_view_media>
                </rewrite>
            </catalog>
        </blocks>
    </global>

My new class simply looks like this for testing:

class Goorin_SMDZoom_Block_Product_View_Media extends SMDesign_SMDZoom_Block_Product_View_Media
{
    public function _construct() {
        parent::_construct();
    }
}

I'm testing this by displaying template path hints, and I'm seeing SMDesign block still being used on the product view page. What am I doing wrong?


texts:
Does anyone know what are the meaning of the messages? Not successful? How to upgrade?

sh-4.2$ composer require magento/product-community-edition 2.2.0 --no-update
./composer.json has been updated
sh-4.2$ composer update
No patches supplied.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - magento/module-wishlist-sample-data 100.1.1 requires magento/module-wishlist 100.1.* -> satisfiable                                             by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 10                                            0.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.0-rc1 requires magento/module-wishlist 100.1.* -> satisfi                                            able by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2                                            , 100.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.0-rc2 requires magento/module-wishlist 100.1.* -> satisfi                                            able by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2                                            , 100.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.0-rc3 requires magento/module-wishlist 100.1.* -> satisfi                                            able by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2                                            , 100.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.0 requires magento/module-wishlist 100.1.* -> satisfiable                                             by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 10                                            0.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.1 requires magento/module-wishlist 100.1.* -> satisfiable                                             by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 10                                            0.1.3, 100.1.5, 100.1.6].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.4].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.0-rc1].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.0-rc2].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.0-rc3].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.0].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.1].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.2].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.3].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.4].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.5].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.6].
    - magento/product-community-edition 2.2.0 requires magento/module-wishlist 101.0.0 -> satisfiable by                                             magento/module-wishlist[101.0.0].
    - Installation request for magento/product-community-edition 2.2.0 -> satisfiable by magento/product-                                            community-edition[2.2.0].
    - Installation request for magento/module-wishlist-sample-data 100.1.* -> satisfiable by magento/modu                                            le-wishlist-sample-data[100.1.1, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0].


texts:
Error in add or update a cart in magento 2?

In magento2 ,  when create a new cart_price_rule in admin  after update or add a product to cart its shows a error

In admin, i was create a new cart_price_rule  with custom  option action

Admin:

Add or update a product in cart:

I was check in the exception.log

I faced an invalid argument exception error.


texts: how can i display products selection on top of product list in magento

texts:
I want to display products between range of 5000 to 10000 on top in my category page, how can i do this in magento?

I tried to merge collection using

$_productCollection1 = Mage::getModel('catalog/product')
                            ->getCollection()
                             ->addStoreFilter(Mage::app()->getStore()->getId())
                               ->addCategoryFilter($category)
                              ->addAttributeToFilter('showontop', 1)
                               ->setOrder('price','asc')
                            ->load();

$_productCollection2 = array();
$_productCollection2 = Mage::getModel('catalog/product')
                            ->getCollection()
                             ->addStoreFilter(Mage::app()->getStore()->getId())
                               ->addCategoryFilter($category)
                              ->addAttributeToFilter('showontop', 0)
                               ->setOrder('price','desc')
                            ->load();
//print_r($_productCollection1->getAllIds());
print_r($_productCollection2->getAllIds()); die();
$merged_ids = array_merge($_productCollection1->getAllIds(), $_productCollection2->getAllIds());

$_productCollection = Mage::getResourceModel('catalog/product_collection')
->addFieldToFilter('entity_id', array('in' => $merged_ids))
->addAttributeToSelect('*');

but no result


texts: Internal Server Error after changing store product configuration in magento 2

texts:
While turning on the "anchor" switch option and click save inside store product category,then it will return Internal Server Error.
I already Increased the php_execution_time to 6000
and also turned on the developer more,and error log,also increased memory_limit in .htaccess file
but this Internal Server Error still appears.
how to solve this issue?


texts: How to delete the order Items from magento using Rest API

texts:
I want to delete the order Item form the Successfully placed Order how to delete the order item.Can anyone help to solve this situation.

Thanks in Advance :)


texts: creating a plugin to disable the save and continue button in customer but its not working....want to know am i using right approach?

texts:
namespace User\Role\Plugin;

use Magento\Backend\Block\Widget\Button\ButtonList;

use Magento\Backend\Block\Widget\Button\Toolbar as ToolbarContext;

use Magento\Framework\View\Element\AbstractBlock;

class Change

{

public function beforePushButtons(

        ToolbarContext $toolbar,
        AbstractBlock $context,
        ButtonList $buttonList
    ) {
        if (!$context instanceof \Magento\Customer\Block\Adminhtml\Edit) {
            return [$context, $buttonList];
        }
          $buttonList->remove('save_and_continue');
        return [$context, $buttonList];
    }
}


texts: Pagination for products, coupons and orders by usin api

texts: How to use pagination for products, orders and coupons lists using api? For now i use  SOAP v2. Soap v2 has a filters, but i cant use them for pagination, because they allow to define specific boundary id, e.g. 1 to 10, or less than 400, more than 200. But if products are deleted, pages can be empty. So I need the first 20 records are in the database, rather than the first 20 items with id from 1 to 20. How can this be implemented?


texts: Magento 2: Export All Products with their custom options

texts: I want to export all products with their custom options through database.


texts: M2: Creating a magento2-component "base" composer package for project

texts:
Issue
We are trying to wrap all our build into composer packages to comply with best practises.
The problem is there are files that need to be added or modified which do not fit in Magento module structure for various reason, in the case I am just trying to get some sample images for the build, it does seem like we will have to change some files such as dev/tools/grunt/configs/themes.js
Magento overcome this by creating the "magento/magento2-base" package as type "type": "magento2-component",.
Attempt
I tried creating a composer file like:
{
    "name": "namespace/project-base",
    "description": "Project Base Components",
    "type": "magento2-component",
    "version": "0.0.1",
    "require": {
        "magento/magento-composer-installer": "*",
        "php": "~5.5.0|~5.6.0|~7.0.0",
        "magento/magento2-base": "*"
    },
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "extra": {
        "map": [
            [
                "pub/media",
                "pub/media"
            ]
        ]
    }
}

And my file structure is:
.
├── composer.json
└── pub
    └── media
    └── catalog
        ├── category
        │   └── new-arrivals.JPG
        └── product
            └── p
                └── r
                    ├── product-photo1x.jpg
                    ├── product-photo2x.jpg
                    ├── product-photo3x.jpg
                    ├── product-photo4x.jpg
                    └── product-photo5x.jpg

When I run composer update it doesn't map the files across, I'm not sure what is wrong, does anybody have any insight into how the composer map feature works with the magento-composer-installer?
Update
I made it work, see my answer below, I still can't work out how to make the declaration work for folders though.


texts: Add query string to url when redirect to 404 page

texts:
Please advice to add query string param to URL when magento2 redirect to 404 no-route page

for example here is no route path: magento2demo.firebearstudio.com/noroute I need to append query like ?test=001 after URL magento2demo.firebearstudio.com/noroute?test=001

I tried to use setParam in NoRouteHandler class but still, it is not working