texts: Magento 2 check if product already in compare list

texts:
I want to check if products is already in compare list on product listing page and show remove compare button there

below is come of my list.phtml

Add to compare

<a  id="compareclick-<?php echo $product->getId();?>" href="#"
                               class="action compare"
                               title="<?php echo $block->escapeHtml(__('+ Compare')); ?>"
                               aria-label="<?php echo $block->escapeHtml(__('+ Compare')); ?>"
                               data-post='<?php /* @escapeNotVerified */ echo $compareHelper->getPostDataParams($_product); ?>'
                               role="button">
                                <?php /* @escapeNotVerified */ echo __('+ Compare') ?>

Remove from compare

                        <a id="rxcompareclick-<?php echo $product->getId();?>" href="#"
                           class="action compare"
                           title="<?php echo $block->escapeHtml(__('+ Compare')); ?>"
                           aria-label="<?php echo $block->escapeHtml(__('+ Compare')); ?>"
                           data-post='<?php /* @escapeNotVerified */ echo $compareHelper->getPostDataRemove($_product); ?>'
                           role="button">
                            <?php /* @escapeNotVerified */ echo __('+ Compare') ?>

I want to add condition so remove code should show If product in compare list


texts: Why Magento catalogsearch catalogsearch/result redirect to shop home page

texts:
We have tried the product search option in shop frontend, so executed the below URl (GET method)

https://www.example.com/catalogsearch/result/?q=searchvalue

Search result output are displayed properly, but URL changed to shop home page (https://www.example.com). How to resolve this case. We need to after searching don't redirect to home page.

Note: We have checked the backend URL rewrite management (Does not use this URL) and also checked the .htaccess file.

Shop version: 1.9.2.4


texts: Magento 2 - Error (ID required) when manually creating an order through the back end

texts: Very weird, when I want to manually create an order I get this error? All mandatory fields are filled and I selected a product, shipment provider and a payment method.


texts: How can i delete products from specified category by using database or control panel of the magento.


texts: Get current Logged user Wishlist products id in Ajax Call Magento 2.3

texts: I Want currently logged user all wishlist products id's json array via ajax call ?


texts: Ajax request not working from validation.js

texts:
I have added one ajax validation for a custom section in magento checkout page as below,

Validation.js :

['validate-otp', 'Please enter valid OTP.', function(v) {
        var url = 'customsect/processing/test?code='+v;
        new Ajax.Request(url, {
            method: 'get',
            onSuccess: function(response){
                alert(response.responseJSON);
            },
            onComplete: function(res){
                alert("complete");
            },
            onFailure: function(err){
                alert("Error"+err);
            }
        });
     }]

app/code/local/myaddon/customsect/controllers/ProcessingController.php :

public function testAction()
    {
        $code = $this->getRequest()->getParams('code');
        $itemArr = array('res' => $code);
        // $data = json_encode($itemArr);
        $this->getResponse()->setHeader('Content-type','application/json');       $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($itemArr));
    }

But am getting alert as "null". When i run below url I'm getting the json response displayed.

http://127.0.0.1/mage3/index.php/customsect/processing/test?code=ADXWZ

{"res":{"code":"ADXWZ"}}


texts: How to check admin user is login or not by externally php script

texts:
I am working on externally php + magento script.My requirement write a php code from which i get all online admin users.

  Example:

  Admin1 - Login  - Action
  Admin2 - Login - Action

And so on....

How can i achieve this by php script.I know to load magento app file in externally php file. Here action is logout script with the help of which i want logout admin user from this page.


texts: how to check which Extensions are installed on a Magento site?

texts:
I am about to take over an existing Magento 1.9 store and one of the tasks would be to 'clean up' no longer used extension. Two questions in that regard (I'm fairly new to Magento in general, so those may be pretty novice questions):

is removing an Extension a good idea or even possible in the first place? I coudl imagine there may be a risk of mesing up the backenend/database? If 'not a good idea' ... can you hide extensions from sight in the backend and likewise at least clean up the interface?
how can you check which extension are installed on a Magento store (backend, or ftp)? I guess you should be able to see it via ftp, but where exactly to look (guessing somewhere in the /app/code/ directory. Maybe everything inside ~/community & ~/local)?


texts: Magento2: How do I remove 'My Orders' in Luma sidebar

texts:
This just suddenly showed up in my left sidebar. It says "My Orders" with a list of past purchases and an "Add to Cart" button. What is this? The block hint is "Magento\Sales\Block\Reorder\Sidebar".

I've tried "referenceBlock name="sidebar.Reorder" remove="true" in my default.xml but that doesn't work.

Any help is appreciated. Thanks.

V 2.0.13 Luma child theme


texts: How to delete custom customer attribute?

texts:
I added some attribute for customer entity. This causes some error on checkout page. That I described in other question.

Getting validation error on checkout billing tab for custom attribute

How can I make those attributes as not required field or delete those attributes?


texts: How to upgrade the default TinyMCE editor on Magento 1.7.0.2

texts:
I'm using Magento 1.7.0.2 version and I need to upgrade it's default TinyMCE editor(version 3.4.7) to TinyMCE 4.0.12.

Any help would be much appreciated.


texts: Remove My billing and shipping address are the same checkbox in checkout based on customer group in Magento2

texts:
Remove My billing and shipping address are the same checkbox in checkout based on customer group condition in Magento2.
When Retail customer is logged in then remove "My billing and shipping address are the same" checkbox otherwise it should be come in checkout page.


texts:
This is the error, can anyone help me with a solution to this?

There has been an error processing your request

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'f4p_sales_bestsellers_aggregated_yearly.product_type_id' in 'field list',

Query was:

SELECT COUNT(*) FROM (SELECT MAX(DATE_FORMAT(period, '%Y-%m-%d')) AS `period`, SUM(qty_ordered) AS `qty_ordered`, `f4p_sales_bestsellers_aggregated_yearly`.`product_id`, MAX(product_name) AS `product_name`, MAX(product_price) AS `product_price`, `f4p_sales_bestsellers_aggregated_yearly`.`product_type_id` FROM `f4p_sales_bestsellers_aggregated_yearly` WHERE (EXISTS (SELECT 1 FROM `f4p_catalog_product_entity` AS `existed_products` WHERE (f4p_sales_bestsellers_aggregated_yearly.product_id = existed_products.entity_id))) AND (store_id IN(0)) GROUP BY `product_id` LIMIT 5) AS `t`


texts:
I'm building rest api for mobile application and it was working fine and result was returned in 3 seconds at most.
Two days ago I added ssl to my server and since then it takes about 10 to 13 seconds to return result.

and on time it returned result in 14 minutes.

what are causes of that?

Note: I've also tried search criteria api and it takes 5 minutes


texts:
I am working on an enterprise project. Actually getting started. But I want to know or understand why the Enterprise extension are costing triple the amount of community of an extension. What is the basic difference that it makes?

The question shared was asked 4 years ago. This is Magento2. Plus, how to verify if the cost that the vendor is asking is actually worth the price?

Note:-

From my experience I have asked various vendors if the extension is verified on Enterprise no one is giving a satisfactory answer. What I have came to the conclusion is that extension companies are charging extra money from enterprise customers just because they know that they can pay. And if the company has actually got verified then Magento should give some license to sell. So that buyer knows that its not fake but a genuine product.


texts: Magento : Configurable product option selected

texts:
I have created a configurable product in Magento 1.9.3.0 with default Magento "
Configurable Swatches" feature. I have display all simple product with configurable product on product listing page.

I want that when I click on simple product(suppose : Red color product), open configurable product, selected with "Red color" option and Red color image display.

Please check http://uboardindia.com/shop/classic.html


texts: magento 242 admin error The account sign-in was incorrect or your account is disabled temporarily Please wait and try again late

texts: magento 242 admin error The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later.


texts: Download link takes guest customers to a login

texts:
Forgive me if this has already been answered somewhere.

I am using Magento version 2.0.7-0 CE with the Luma theme.

I am planning to sell downloadable files from my website.

File sharing is disabled, and needs to remain as such.

I'm testing everything in demo store mode, and using a PayPal sandbox account.

I have checkout as guest enabled, but when I click the download link in the confirmation e-mail at the e-mail address that I gave during checkout, I am taken back into my store's site to sign in, in order to download the file.  What I want to happen instead is for the guest customer to be able to click the download link and actually download the file, without logging into my website.

Is there a feature/module/switch in Magento's backend that does what I want?

I have looked at:

Downloadable products unique external URL for each order

and

https://magento.stackexchange.com/questions/94728/link-to-download-product-in-order-email-breaking

and others.

My Google searches have not panned out.

Concerning the above situation, I have looked at Marketing> Email Templates> Load default template> and Previewed Templates, but nothing said "Order Confirmation", so I guess I will have to make my own custom email template and reference it in "New Order Confirmation Template for Guest" in STORES > Settings > Configuration > SALES > Sales Emails.  If I get the guest direct download to work, and I make a new template, will Magento automatically make a single-use download link for my template?

If there isn't anything to change in the backend to achieve what I want, I am a programmer and I can write code in PHP, JavaScript, and HTML, and would just need to be pointed in the right direction so that I can write a solution, but I would prefer a backend solution instead of changing the Magento files.

Thanks everyone.


texts: What is the easiest way to run a magento instance locally to test my requests with the rest API?

texts: I need to write working requests but I cant test them on our live systems. My idea was to run a local instance of Magento and test my requests there. Is that a good idea? What is the easiest way to do that? Any help is appreciated.


texts:
When I opened my site I had a

  Fatal error: Uncaught TypeError: Argument 1 passed to
  Mage_Core_Model_Store::setWebsite() must be an instance of
  Mage_Core_Model_Website, null given, called in
  /var/www/hosts/mage-composer/src/app/code/core/Mage/Core/Model/App.php
  on line 645 and defined in
  /var/www/hosts/mage-composer/src/app/code/core/Mage/Core/Model/Store.php
  on line 453 ( ! ) TypeError: Argument 1 passed to
  Mage_Core_Model_Store::setWebsite() must be an instance of
  Mage_Core_Model_Website, null given, called in
  /var/www/hosts/mage-composer/src/app/code/core/Mage/Core/Model/App.php
  on line 645 in
  /var/www/hosts/mage-composer/src/app/code/core/Mage/Core/Model/Store.php
  on line 453

I opened my database and in core_store I saw

but but the admin must have id = 0. I tried

update core_store
set `store_id` = 0
where `website_id` = 0

but it's id(ai), and I had error

Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails (`usatravel`.`label_core_store`, CONSTRAINT `FK_LABEL_CORE_STORE_WEBSITE_ID_LABEL_CORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `label_core_website` (`website_id`) ON DELETE CA)

how I can fix it? Thanks in advance


texts: Disable/ Remove "Estimate Shipping and Tax" Magento 1.9

texts: anyone care to advise on how to remove the "Estimate Shipping and Tax" option on Shopping Cart page ?


texts: Move element navigation.sections into header-wrapper in XML

texts:
Guys I am trying to move the categories menu upward's. I want it to display the logo, the categories, the search bar and mini-cart at the same level.

Here is my code :

<move element="navigation.sections" destination="header-wrapper" />

Now the problem is after applying the code the categories get's moved upwards but the mini-cart get's invisible. As far i understood that the full width of the navigation bar is getting moved upwards and because of the z-index the mini cart might have been hidden.

The alignment is also not proper as I need to  make the categories display at the centre.

I am using Magento 2.1.7 so the naming might be different.

I have been breaking my head on this magento for a long time but still now i am not able to understand the workflow and the templating system.

Please help

If there's any good tutorial for this please recommend in the comments. I am using Magento version 2.1.

Thank you.


texts:
In magento **CMS->managepages->Homepage->**in Content i have added a WIDGET called New Products.
I want to change the Name of the Widget. IS there any way to change the name of the Widget.


texts: Magento 2 sales order grid custom column export csv issue

texts:
I have added a tracking number(custom field) column in sales order grid. It is displaying in sales order grid and export by XML also working fine. But while I export the data by csv only the following error has occurred.

  You cannot define a correlation name 'sst' more than once

The following steps I have implemented in the custom module.

Added the custom column into app/code/Vendor/Modulename/view/adminhtml/ui_component/sales_order_grid.xml

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_columns">
        <column name="track_number">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">Tracking Number
                    </item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

And override the sales_order_additional_columns function by plugin in app/code/Vendor/Modulename/etc/di.xml file

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
        <plugin name="sales_order_additional_columns" type="Vendor\Modulename\Plugins\AddColumnsSalesOrderGridCollection" sortOrder="100" disabled="false" />
    </type>
</config>

Overrite the Collection of sales order grid file. app/code/Vendor/Modulename/Plugins/AddColumnsSalesOrderGridCollection.php

<?php
namespace Vendor\Modulename\Plugins;

use Magento\Framework\Message\ManagerInterface as MessageManager;
use Magento\Sales\Model\ResourceModel\Order\Grid\Collection as SalesOrderGridCollection;

class AddColumnsSalesOrderGridCollection
{
    private $messageManager;
    private $collection;

    public function __construct(MessageManager $messageManager,
        SalesOrderGridCollection $collection
    ) {

        $this->messageManager = $messageManager;
        $this->collection = $collection;
    }

    public function aroundGetReport(
        \Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory $subject,
        \Closure $proceed,
        $requestName
    ) {
        $result = $proceed($requestName);
        if ($requestName == 'sales_order_grid_data_source') {
            if ($result instanceof $this->collection
            ) {
                $select = $this->collection->getSelect();
                $select->join(
                    ["sst" => "sales_shipment_track"],
                    'main_table.entity_id = sst.entity_id',
                    'sst.track_number'
                )
                    ->distinct();
            }

        }
        return $this->collection;
    }
}


texts: Magento 2: How to show order total in 2 different currencies in checkout page of onepage checkout

texts:
I have 2 different currencies in my site with USD as base currency and EURO as secondary currency. My client wants to show the total in these 2 currencies in the checkout page. So in all other places price will be show in USD but in checkout page the total should be show in 2 currencies like

Order Total : USD 100
              EUR 150

Can anybody direct me which template I have to override and how I can show the total in 2 currencies. I have already set up the 2 currencies in the back end but not sure how I can show both of them in the front end. Any help will be much appreciated. I am using Magento 2.2.5 community edition.


texts:
I've been having an issue with getting the product images to load properly.

I migrated the site from M1 to M2 and brought over all of the media files per the recommended methods. Some of the product images are loading, but the vast majority are just using the placeholder image.

I have tried to run php bin/magento catalog:image:resize but it terminates after ~10min or so (never in the same spot) and always starts back at the beginning if I run it again. I have talked with the hosting company (bluehost) and they said this:

  I have checked the command that you are running and also tried
  executing the command which gets terminated. Since you are on a shared
  hosting account, we have limitations on the shared server.
  Unfortunately the command times out after a certain time. So you would
  need to make a batch of these images and then execute it.  Instead of
  running the complete 8680, please make batches of 500 images and then
  execute the command one by one.

So, is there a way to get the image resize process to use batches? I couldn't find any documentation on this.

What alternatives might I have to get the product images working?

Thanks.


texts: Want to Add product in Guest User Cart through API for Magento App

texts: I want to add product in a shopping cart for guest user and if product is out of stock then it should show message that product is out of stock otherwise add product in the cart. I am using Magento API . Please help.


texts: how to save API xml request and response files

texts:
I want to save magento customer(or other module) API(V1,V2) request and response XML files. for this i have found usefule [link][http://www.techytalk.info/magento-extension-for-logging-soap-v1-and-v2-api-requests/]1, it uses

public function call($sessionId, $apiPath, $args = array())
    {
        Mage::helper('inchoo_soaplogger/v1')
            ->logPostXml();

        return parent::call($sessionId, $apiPath, $args);
    }

With this i can save request xml file, but i could not achieve response xml file, we do not have method callResponse to call from parent.

Please help me on how to save both response and request API XML files.


texts:
I want to create API route which can list/return products data in JSON or XML format.

By creating this endpoint I will be able to fetch the all the products from Magento. Then I will access it on my website. What I tried is below:

public function getMagentoProducts()
{
    $productArr = array('' => 'Select Product');
    try {
        $proxy = new SoapClient('https://shop.mysite.com/soap?wsdl');
        $sessionId = $proxy->login(sfConfig::get('app_mgt_api_user'), sfConfig::get('app_mgt_api_key'));
        try {
            $mgtProducts = $proxy->call($sessionId, 'product.list');
            if (count($mgtProducts) > 0) {
                foreach ($mgtProducts as $product) {
                    $productArr[$product['product_id']] = $product['name'];
                }
            }
            return $productArr;
        } catch (Exception $e) {
            $this->forward404($e->getMessage());
        }
    } catch (Exception $e) {
        $this->forward404($e->getMessage());
    }
}

But by running the above code it throws the below error:

  SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://shop.mysite.com/soap?wsdl' : failed to load external entity "https://shop.mysite.com/soap?wsdl"

Am I doing something wrong here?

Is there any easy way to fetch products list from Magento2 on my website?


texts:
I am using a third-party theme called Porto.

It has a slider on the main screen, and I can't figure out which files are used in displaying it. Turning on backend template hints doesn't help located it. In fact, template hints show that it doesn't have a template of it's own. There are a few items on my homepage for which this is true.

I have searched the root directory via Visual Studio Code (my IDE) for every class and ID related this slider, and I still cannot find it. I have been trying for hours to figure out where this slider is being called from. Ideally, I would like to find out where in the XML it is being called, so that I can remove it and place something else in its place.

As a side note, why is it so terribly difficult to understand what is causing what in Magento, and isn't this painful for most developers?


texts:
I created a custom column "product_name" in sales/order grid,

When I am sorting this column grid showing error:

  Item
  (Magento\Framework\View\Element\UiComponent\DataProvider\Document)
  with the same id "146" already exist

My collection code is :

 parent::_initSelect();
        $joinTable = $this->getTable('mg_dispatch_date');
        $joinTable2 =$this->getTable('customer_entity_varchar');
        $joinTable3 = $this->getTable('catalog_product_entity_varchar');
        $this->getSelect()->join($joinTable . ' as mdd', 'main_table.entity_id = mdd.order_id', array('*'));
        $this->getSelect()->join($joinTable2. ' as fn', 'main_table.customer_id = fn.entity_id and fn.attribute_id = 177',array('value'));
       $this->getSelect()->join($joinTable3.' as cpev','main_table.entity_id = cpev.entity_id', array('*'));
        return $this;

and sales_order_item.xml code is :

<column name="product_name" class="Magecoder\Customerref\Ui\Component\Listing\Column\Productname">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">

            <item name="filter" xsi:type="boolean">false</item>
            <item name="sortable" xsi:type="boolean">true</item>
                    <item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="label" xsi:type="string" translate="true">Product Name</item>
                </item>
            </argument>
        </column>

Please help is anyone have suggestion, Thanks in Advance.


texts: Magento2 - How to display image inside dropdown?

texts:
I want to display image inside drop down option like below image, Can anyone suggest me how can i achieve this?

Any help would be appreciate.

Thanks In Advance..!


texts: Magento 2: Is it possible to update order by customer after placing it?

texts:
After placing an order, is it the possible customer can manually update
  order Qty or delete an item from order?


texts:
we have a site that was running fine, we just move site to new instance and got an error. All js file's map urls, that we define in require-config.js file not loading on frontend.

Like, we define -

var config = {
    map: {
        '*': {
                customjs : 'Magento_Theme/js/custom'
            }

        }
};

on frontend,site making url -  http://localhost/Mysite/pub/static/frontend/Magento/Commerce/en_US/customjs.js

And giving error

  File Not Found Error

To make it work, I removed pub/static/all_files and re-run the static-content deploy command, cache flush, re-index multiple times, but non making effect.

Please help me to solve it.
Thanks


texts: Trouble displaying two modules correctly. Both use modernizr library

texts:
http://snowcoredev.co.uk/magento/

The menu and item slider seem to render correctly in full screen, but as soon as you scale down to the mobile view, the menu stops producing subcategories.

I have tried to establish which file causes the problem, and it looks like the modernizr library is at fault (removing it from the slidebar xml declaration fixes the problem, but breaks the slider obviously). I've noticed that my theme (modified 'rwd') already loads one instance of the library. I tried removing one or the other, but it removes my menu completely, or breaks the slider as mentioned before.

I'm trying to establish how to use both modules together, but I don't have any experience with modernizr, so I'm not sure how to go about it.


texts: Retrieve guest cart using token in Magento 2

texts:
When you create a guest cart you will receive a token that may look like this "696EreQdYt2AAtEceQsHfD2gxGyWFodG" and you can use it to retrieve a guest cart that has an id number.

I know how to retrieve the guest cart using the id. My question is, can I retrieve the guest cart using the token (programmatically)?


texts: Magento2 rewrite _prepareCollection method in wishlist returning blank page

texts:
I am trying to rewrite the protected function _prepareCollection method inside \Magento\Wishlist\Block\Customer\Wishlist however the wishlist page in my account now returns blank and it never makes it into the rewritten method.

Here is my di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <preference for="Magento\Wishlist\Block\Customer\Wishlist" type="Namespace\Module\Block\Customer\Favorites" />
</config>

And here is my php file located at Namespace/Module/Block/Customer/Favorites

<?php

namespace Namespace\Module\Block\Customer;

class Favorites extends \Magento\Wishlist\Block\Customer\Wishlist
{
    protected function _prepareCollection($collection)
    {
      parent::_prepareCollection($collection);
      die('working');
    }
}

Am i missing something here ? I know that I can't use a plugin because they don't work with protected methods. Is that now the same with class rewrites as well ? Help!


texts: Magento 2 : Catalog images resize command stops and gives an error

texts:
I have run the command catalog:images:resize on Magento 2.1.17.
It has stopped after some time and gave me the following error:
Warning: getimagesize(): corrupt JPEG data: 1156 extraneous bytes before marker in /vendor/magento/module-catalog/Model/Product/Image.php on line 411

How can I solve this issue?


texts: How to remove pagination(pager) from My Orders section in My Account (Magento 2)

texts:
I am showing all orders, in My orders section of My Account, when the list of orders gets more than 10 Magento creates a pagination().

How to remove that pagination.

I am trying to remove pagination and added LOAD MORE button which shows rest of the orders.

Is there any admin setting to remove pagination.

I found this piece of code in My Orders phtml

 <?php if ($block->getPagerHtml()): ?>

<?= $block->getPagerHtml() ?>

<?php endif ?>


texts: Proper path to place template overrides and translations for Mageplaza Blog extension

texts:
I recently installed Magento 2 Blog extension FREE and I want to adjust templates to suite my theme and add some translation strings.

I know that template overrides should be placed in:

app/design/frontend/ThemeVendor/themeName/ExtVendor_ExtName/templates

but I don't know what is proper path for this particular module.
I tried alot of naming conventions - small and big letters, with and without hypens - but any of them works.

Now I have:

app/design/fontend/Gbitdev/theme-green/Mageplaza_Magento-2-blog-extension/templates/widget/posts.phtml

and after any change I just copy this file to:

vendor/mageplaza/magento-2-blog-extension/view/frontend/templates/widget/posts.phtml

Second problem are translations for third-party extensions:
I cant find on web where they should be placed?
Is proper way is place e.g. pl_PL.csv in

app/design/frontend/ThemeVendor/themeName/ExtVendor_ExtName/i18n

or I should just add translation strings to my template translations theme/i18n/pl_PL.csv. Second way is not working at now becouse (I think) I don't know 4th column (e.g. Magento_Search).


texts: Magento 2.3.1 Error on checkout getAdditionalInformation()

texts:
I've migrated an old webshop from 1.9 to 2.3.0 and then upgraded to 2.3.1. And I've come across a problem that I can't quite find out why it is happening. There are about 300 products migrated into Magento 2.3, they all have the price of zero. When I try to use the onepage checkout, I get an error at the final step and it stops there.

I've got multiple extensions installed:
- Forced Login
- Disable Register
- Infortis (To edit theme)

Example when I try to checkout:

I get a 500 error on the path: /index.php/rest/nl/V1/carts/mine/payment-information

With a report saying this error:

  Fatal Error: 'Uncaught Error: Call to a member function
  getAdditionalInformation() on null in
  domain.nl/public_html/vendor/magento/module-sales/Model/OrderRepository.php:172\nStack
  trace:\n#0
  domain.nl/public_html/vendor/magento/module-sales/Model/OrderRepository.php(134): Magento\Sales\Model\OrderRepository->setPaymentAdditionalInfo(Object(Magento\Sales\Model\Order\Interceptor))\n#1
  domain.nl/public_html/vendor/magento/framework/Interception/Interceptor.php(58):
  Magento\Sales\Model\OrderRepository->get('668')\n#2
  domain.nl/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Model\OrderRepository\Interceptor->___callParent('get',
  Array)\n#3
  domain.nl/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\OrderRepository\Interceptor->Mage' in
  'domain.nl/public_html/vendor/magento/module-sales/Model/OrderRepository.php'
  on line 172

I can't find anything about it online and I have no idea how to fix this or what's causing it.

Some other insight I'd be thankful for, if you need any other information, please do not hesitate to ask!

Thank you!


texts: Changing product prices based on the current currency

texts:
The client doesn't want to create 2 websites for 2 base currencies. But they want the prices of the alternative currency to be rounded to 0.5 or 0.9. The pre-calculated prices should be shown on listings, product pages, cart page etc.

Example:
Price in base currency: 5 GBP. In EUR it would be ~6.31 but should be shown as 6.5.

Is this possible at all?

Magento version is 1.9. The currencies are GBP (base) and EUR.


texts:
I was faced with this issue before and didn't find a "one size fits all" solution.
For an easier versioning I usually add content to a website using upgrade and data-upgrade scripts.
But I'm faced with an issue when my modules use resources that should go into the media folder and that's not versioned.
Let me give you an example.
I'm working on magento project that needs to have a slider on homepage. The code, no issue, I created a CRUD module that allows admin to manage the sliders and banners inside the sliders.
But the client already decided on the content for the slider for starters.
I don't want to manually add this content on each instance I deploy my module (staging, live, other developer's machines).  I want everything to be replicated just by doing a git pull and a cache refresh.
So this should be easily done if I create a data-upgrade script, where I create an instance of my slider entity, a few instances of the banner entities and attach them to the slider.
Everything goes smoothly except that the banners should be placed in the media folder. That's not versioned (and should not be).
Any ideas on how I should handle this?


texts: Magento 2: Use Custom Variable in Layout File

texts:
We can use Magento default variables in layout file using

<item name="link" xsi:type="string">{{baseUrl}}</item>

I would like to create one variable in Block File & Use it. Like

protected function _prepareLayout() {
    parent::_prepareLayout();

    $this->myVar = 'google.com';

    return $this;
}

In layout file

<item name="link" xsi:type="string">{{myVar}}</item>

Can i define & access it or i have to manage through Controller file?


texts:
The Lightbox jquery is not working.
For Photo Gallery it is hover by mouse and zoom in zoom out effect and modal open when user clicks on that


texts: display all products with "attribute value = 1" by single click

texts:
we use catalog price rules to give discount for all products.

we have 1000 products in a site. i have to give 50 % discount for 200 products.

what i did is i created an attribute "my_attribute" and gave value = 1 for all 200 products.

after that all 200 products in a site got 50 % discount.

now i have to display all 200 products with one "click url".

as we have some 20 categories in our site, those 200 products are in all 20 categories.

how to give a link for "attribute" , means if we click on one image, it should display all 200 products with

attribute value = "1 "

please help me to find solution.


texts: How to change /usr/bin/php to /Applications/AMPPS/php/bin/php on magento?

texts:
When I try to run "which php" from my magento root folder , this say: /usr/bin/php

But, I need that this point php to: /Applications/AMPPS/php/bin/php

How can I do it?


texts: Show/Hide product configurable attributes depending on another attribute

texts:
For a configurable product I have 3 configurable attributes (color, collar & size). I want the ablity so that the collar attribute dropdown is shown only if the color black is selected. If white is selected as the color then the colloar attribute dropdown would be hidden.

Is this possible? I know one way around it and that is to have "not applicable" to the collar values but thats not great UX for the customer


texts: How to get category ids of specific store in Magento 2?

texts:
I want to get category ids of specific store.

$product->getCategoryIds()

This will get all categories of product

Array ( [0] => 63 [1] => 178 )

63 is category of store 1 and 178 is category of store 2 but I want only category 63.


texts: Magento cron or mysql event scheduler which one is best based on perfomance?

texts:
I know in some case we have to run Magento cron as if it is some file or logic base.

But If I just want to perform some task regarding just database like want to update or delete some record from database in this case which one is best based on performance?

Should I create event scheduler in MySQL or Magento cron?


texts:
we made a totally custom login page in our Magento 2.2

on form submit, we send the credentials to a custom php page.

In the custom page we get $_POST['email'] and $_POST['password'].

How to trigger the magento customer login in this custom PHP script?

We tried some, but without success...


texts: After upgrading from Magento 2.1 to Magento 2.3.3 getting error at checkout step cart-items.js of getCartLineItemsCount() method

texts:
I am upgraded my Magento V2.1 to Magento V2.3.3 after I'm getting below error in the checkout step.

With the above error not able to see the Order Summary items in the right sidebar Items in the cart.

Any help with this?


texts:
we are close to launching a Magento site but I'm wondering if there is a way to set up custom delivery options, we need to set up the following options:

Standard delivery (UK) (3-5 working days) £4.95
Next day delivery (UK)-Order Weekday Before 12pm £10.00
Next day Saturday delivery (UK)-Order on Weekday Before 12pm £12.00
Furniture Courier-Mainland Only £30.00
Collect In-Store £0.00
£50 or higher free

It doesn't look like this is possible in out the box Magento, if not does anyone know a plugin which will do it?

Thanks


texts: Something is overriding my onchange script?

texts:
I made a script that selects an option from a dropdown. The dropdown has onchange trigger and it trigger correctly when i run the script as a snippet (in a sandbox environment), but when i active the script on my Magento site the onchange script doesn't trigger?

This is my code:

 Click to change

<select onchange="alert('Content changed')" id="bundle-option-132" name="bundle_option[132]" class="bundle-option-132 bundle-option-select change-container-classname" wtx-context="276DE744-A364-4DD3-AEFC-0D9F9A9AAE19">
  <option value="">Udvælg...</option>
  <option value="875">Bianco</option>
  <option value="695">T400</option>
  <option value="697">T402</option>
  <option value="698">T403</option>
  <option value="699">T404</option>
  <option value="700">T405</option>
  <option value="702">T407</option>
  <option value="703">T408</option>
  <option value="704">T409</option>
  <option value="705">T410</option>
</select>

I made a code snippet here: https://www.w3schools.com/code/tryit.asp?filename=FJWGP8WR16DD

On my Magento site the onchange script looks like this: onchange="bundle.changeSelection(this)" but if i replace this with onchange="alert(Something)" the script still doesn't trigger.

I'm using an extension called OptionBundle that needs the onchange trigger to calculate the content of the next dropdown.
The onchange trigger works when choosing an option manually from the dropdown but not when choosing an option with JS?

The only other script I can see that's monitoring change on this dropdown is prototype.js, but I just can't see why this would conflict with my script?


texts: Install and data-install script with different versions?

texts:
I have a custom module with several install and upgrade scripts under the sql directory, that create and alter my sql table.

When Magento runs the scripts it updates both version and data_version fields in core_resource table.

Now I need to add a data script to add data to the table. If I create a data-install-0.1.0.php under my data directory, it wouldn't run since version in DB is already 0.1.3.

The only way I could make it work is naming my data script data-upgrade-0.1.3-0.1.4.php and changing version in config.xml to 0.1.4. Of course this sets also version (resource version) to 0.1.4.

If in the future I want to create an sql upgrade script will it have to be upgrade-0.1.3-0.1.5.php or upgrade-0.1.4-0.1.5.php?

Is this the correct way to do it? Is there any way to change only version or only data_version?


texts: All my directories are accessible magento 1

texts:
All my directories (except app/) and my root files (install.php, index.php,.gitignore...) are accessible to the users..
Is it a problem ?
I need to create a .htaccess for each my directories ?

Thanks !

PS: i don't know why but i can't say hello (when i'm editing this message)


texts:
I've noticed on the backend under recent and top search terms several strange searches.

'EKGQ') AND 4671=CAST((CHR(113)||CHR(116)||CHR(117)||CHR(97)||CHR(113))||(SELECT (CASE WHEN (4671=4671) THEN 1 ELSE 0 END))::tex

EKGQ%' AND (SELECT 4655 FROM(SELECT COUNT(*),CONCAT(0x7174756171,(SELECT (CASE WHEN (4655=4655) THEN 1 ELSE 0 END)),0x7169756471

EKGQ%' AND 4671=CAST((CHR(113)||CHR(116)||CHR(117)||CHR(97)||CHR(113))||(SELECT (CASE WHEN (4671=4671) THEN 1 ELSE 0 END))::text

EKGQ%' AND 6277=CONVERT(INT,(SELECT CHAR(113)+CHAR(116)+CHAR(117)+CHAR(97)+CHAR(113)+(SELECT (CASE WHEN (6277=6277) THEN CHAR(49

There are about 20 of those in different variations over the past few weeks, any ideas as to what they are/where they are coming from? They seem to return all products in my store.


texts: Console command becomes increasingly slow

texts:
I have a CSV file with about 6K SKUs that I need to loop through to update the products in Magento 2. I'm having issue where the product saves become increasingly slow, so much so that after letting it run for 24 hours, it's still not done.
I checked memory_get_usage and memory_get_peak_usage, and it hovers around 275MB for the duration, so it doesn't seem to be memory related.
I'm saving the products using ProductRepository::save. I'm stepping through the stack, and I see saving the product attributes is slow. Dispatching the events seems to be even slower, but have no idea why the saving comes to a crawl only increasingly and not from the start.
I tried production mode. This is a vanilla installation other than the module I'm working on. Any ideas?


texts: make a left block to show categories on a page?

texts: How can I create a left block and assign it to categories left panel in magento 2?


texts:
I need a explanation about using saved CC payment method. First of all, as I read Magento CE is not PCI compliant, so this method should not be used in live store using CE ?

I really cannot find a the full steps to be able of using this method. For example What I found is how to activate the method, then if the customer used this method you can find the card information to process the payment offline.

What is and how is processing the payment offline done ?

So when the admin get the card information, he should go to bank to take the money from the customer's account or is it using a payment gateway such as paypal or authorize ? called I have a explanation in details of the process?


texts: Magento2, Adding Ids of Recent order in the customer dashboard navigation

texts:
I need to add recent orders of the customer in their dashboard navigation.

Currently i am able to locate how the navigation is created

  Magento_sales/layout/customer_account.xml

which uses

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer_account_navigation">
            <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-orders-link">
                <arguments>
                    <argument name="path" xsi:type="string">sales/order/history</argument>
                    <argument name="label" xsi:type="string" translate="true">Order History</argument>
                </arguments>
            </block>
        </referenceBlock>
    </body>
</page>

How can i display recent orders for customers in this navigations, under the Order History nav item


texts: How to get the all quote ids in cart items from magento soap api

texts:
I have created a soap client Api for magento, my requirement is to get all quote id in shopping cart added items. How can i get this?

i am using mservice.shoppingCartInfo(sessionid,quoteid,storeid) here i am passing storeid as null and sessionid autenticated the problem is i need to fetch all quoteid which i am unable to fetch from added cart items.


texts:
Front end product search not working for any keywords. Advanced search works if you don't use product name or description. Custom attr. works, as does SKU.

Every time you search you get 'Your search returned no results.'.

Cleared caches, re-indexed multiple times.

I note that catalogsearch_fulltext_scope1 is empty (not sure if it should be).

It was working a week ago and we've changed no files. There was a server crash.

No errors in var/reports and the logs aren't displaying anything.

All products visible on the front end in categories and working as normal.

I'm running around in circles! Has anybody encountered zero search results before? There's 600 odd products, Magento 2.2.1

Have also tried changing 'name' attribute details, disabling and re-enabling products.


texts: Magento 2 did not sign in correctly or your account is temporarily disabled

texts: When trying to login to admin account in my local test setup it says : Account is temporarily disabled even i used correct user and password.


texts: How to display the image, name and short description for a bundle product items

texts:
I need to display in a bundle product tab the image, name and short description for its items.

To do this for a grouped product items would be very simple, but for bundle products is different because the items are options rather than regular products so you don't have direct access to the product image, name, etc..


texts: Magento redirect to previous url not working?

texts:
I created custom page(url:order-your-own-design) in website.

I used magento default redirection

System > Config > Customer
> Custumer Redirect Customer to Account Dashboard after Logging in > NO

it works all page except my custom page

I added login page url button in that page

<button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="setLocation('<?php echo Mage::getUrl('customer/account/login/'); ?>')"><?php echo $this->__('Continue') ?></button>

How i fix that?


texts: afterCopy plugin only fires if beforeCopy affects param

texts:
There is an issue with Magento 2.2.2 (and possibly previous versions) where products that have a url_path set on them cannot be duplicated - "The value specified in the URL Key field would generate a URL that already exists." For us these came from migrated products, but this is just background for my current problem.

To get around the issue, I added an afterCopy plugin to clear url_path from the duplicated product. However, it would not fire, and after debugging I decided to just add a beforeCopy to clear it from the product prior to copying. This resulted in both before and after methods running. Some more experimentation and without the $product->setUrlPath(null); call it will not run the afterCopy method.

<?php

namespace My\Namespace\Model\Plugin;

class CopierPlugin
{
    public function afterCopy(\Magento\Catalog\Model\Product\Copier $subject, $duplicate)
    {
        $duplicate->setUrlPath(null);
        return $duplicate;
    }

    public function beforeCopy(\Magento\Catalog\Model\Product\Copier $subject, \Magento\Catalog\Model\Product $product)
    {
        $product->setUrlPath(null); // without this line, the afterCopy will not fire
        return [$product];
    }
}

Has anyone else seem similar behavior with plugins? I don't have time to delve further into the depths of how Magento determines to run specific plugin methods at the moment, but if I get some more time I may dig in further.


texts: how to change copyright field website level to store level

texts:
I have multiple website and multiple store configuration where I need to set different copyright text for each store.

I checked the system->configuration->general->design->footer

Their is a copyright field but this scope is website level, so I can set one copyright text to one website not for each store.

How Can I do this, Is their any other way to do this?

Or

How to change the scope of Copyright field from website level to store level, That is easy to show different Copyright content to different store.

Suggest any idea,
Thanks for your time,:)


texts:
I'm seeing a strange layout-error in my backend. I try to add a new Page and this is what I keep seeing : http://i.stack.imgur.com/NW3Zv.png  (the content for each tab get's loaded in the tab-space itself instead of next to it).

There are no console errors, I'm running in developer mode (2.0.4), have cleared the /var/ multiple times as well as reindexed/recompiled the whole installations; no luck.

I might figure it's a problem with the VES PageBuilder plugin, but I've had that installed for a while now, and this problem really just randomly popped up after a refresh. And now it won't go away.

Has anyone else seen this happen / have a fix for this?

Edit: I figured; let's see what goes wrong in the HTML of the page, maybe a tag didn't close or something. But that's the strangest thing; it looks like the content-edit screen is neatly tucked in an <li> item as the rest of them:


texts: Impossible to find core_config_data table

texts:
A very noob question: it's my first time working on Magento2 e-commerce and I would like to move pages from IP to the domain name.

Reading the documentation, I've found that I've to edit the core_config_data table in PHPMyAdmin. The problem is that actually there isn't such a table in my DB...

Is this normal? I'm not a developer and the guy that made the installation doesn't respond to my emails.

Thank you for your help!


texts: Magento 1.9 Soap Api Response 500 Internal server error

texts:
I have just started learning magento.

I was trying to use magento SOAP services. For that I have created SOAP user and SOAP user role. Assigned role to user.

Now, my code to access SOAP service is something like this.

$client = new SoapClient('http://HOST_NAME/index.php/api/v2_soap/?wsdl');
print_r($client);
$sessionId = $client->login('USER_XX', 'XXXXXX');
var_dump($sessionId);
exit;

here I got proper object to $client but when I try to login with that I am getting this error.
Output of above code is:

SoapClient Object
(
    [_soap_version] => 1
    [sdl] => Resource id #2
)

Fatal error:  Uncaught SoapFault exception: [Client] DTD are not supported by SOAP in /PATH_TO_FOLDER/test.php:6
Stack trace:
#0 /PATH_TO_FOLDER/test.php(6): SoapClient->__call('login', Array)
#1 /PATH_TO_FOLDER/test.php(6): SoapClient->login('USER_XX', 'XXXXXX')
#2 {main}
  thrown in /PATH_TO_FOLDER/test.php on line 6

After some googling I came to know that above error occurs because webservice returning some html response. For like 404, 403 or 500 server errors.

So I have checked same webservice using software "SoapUI" and I got this result.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

      <title>Server error!</title>
      <link rev="made" href="mailto:info@edenweb.ch"/>

Server error!

The server encountered an internal error and was
    unable to complete your request. Either the server is
    overloaded or there was an error in a CGI script.

         If you think this is a server error, please contact
the
         webmaster
         .

Error 500

      <address>
         b2c.biodis.ch

            Thu Apr 23 10:45:35 2015

            Apache

      </address>

Do you have any idea what's going wrong?

Thank you.


texts:
I am trying to extend Magento 2's core ProductsList widget, but getting following error:

Fatal error: Uncaught TypeError: Argument 1 passed to VendorName\ModuleName\Block\ProductsList\Interceptor::__construct() must be an instance of Magento\Catalog\Block\Product\Context, instance of Magento\Catalog\Model\ResourceModel\Category\CollectionFactory given, called in D:\xampp\htdocs\magento226\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php on line 111 and defined in D:\xampp\htdocs\magento226\generated\code\VendorName\ModuleName\Block\ProductsList\Interceptor.php:11 Stack trace: #0 D:\xampp\htdocs\magento226\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111): VendorName\ModuleName\Block\ProductsList\Interceptor->__construct(Object(Magento\Catalog\Model\ResourceModel\Category\CollectionFactory)) #1 D:\xampp\htdocs\magento226\vendor\magento\framework\ObjectManager\Factory\Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('VendorName\\ModuleName\\B...', Array) #2 D:\xampp\htdocs\magento226\vendor\magento\framework\ObjectManager\ObjectManager.php(56): Mage in D:\xampp\htdocs\magento226\generated\code\VendorName\ModuleName\Block\ProductsList\Interceptor.php on line 11

Below is my custom ProductsList class code

<?php
namespace VendorName\ModuleName\Block;

use \Magento\CatalogWidget\Block\Product\ProductsList as MagentoProductsList;
use \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory as CategoryCollectionFactory;

class ProductsList extends MagentoProductsList {

    protected $_categoryCollectionFactory;

    public function __construct(
           CategoryCollectionFactory $categoryCollectionFactory)
    {
        $this->_categoryCollectionFactory = $categoryCollectionFactory;
    }

    public function test() {
        //other code here
    }

Please tell me how I can use categoryCollectionFactory like I did in my other custom modules, or am I missing something basic.


texts: How can I add a custom button by using a custom module in Magento 2.3?

texts:
I wanted to add my own button in the Shopping Cart as I tried to show you in the screenshot.

But I didn't find a tutorial that worked for me. Do you have any idea how I can do this? (I want to make my own extension)

(EDIT) This is what I have done so far:

In the registration.php file:

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

In the module.xml file:

<?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="Vendor_ModuleName" setup_version="1.0.0"></module>
</config>

In the Button.php file:

<?php
namespace Vendor\ModuleName\Block;
class Button extends \Magento\Framework\View\Element\Template
{
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        array $data = []
    ) {
        parent::__construct($context, $data);
    }

}

In the checkout_cart_index.xml file:

<?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">
        <referenceContainer name="cart.summary">
                <block class="Vendor\Module\Block\Button" after="-" name="custom_button" template="Vendor_ModuleName::button.phtml" />
        </referenceContainer>
</page>

In the button.phtml file:

<button>Your Button</button>

I also ran all commands you have told me.


texts: Create custom attribute same like related products in magento 2

texts:
I want to create a custom attribute as "Similar product" which will behave like "Related products" attribute.

How can i do that in magento 2?


texts: How to get custom address attributes in Magento 2

texts:
I am trying to display all custom address (Added programmatically) attributes on address add/edit page in My Account section.

I have looked into below interface

module-customer/Model/Address/CustomAttributeListInterface.php

It does have the getAttributes() function but the class which implements this interface is module-customer/Model/Address/CustomAttributeList.php and has

public function getAttributes()
{
   return [];
}

I don't know why the core team has left it like this. Was this intentional or this will get an update in next versions?


texts: Remove quantity for some products in minicart

texts:
I need to remove the quantity from some product of my minicart.

But as the minicart is loaded in ajax, I need to deal with this with JS.
Sometime of remove the input, sometime it doesn't. And if I remove a product, it seems that the minicart is fully reloaded, so my code is ignored.

I've added some timer that are checking if the cart contains product.
If so, then go through the children and remove the input if the product options contains "Quantit" (quantité).

See my code :

let minicartLoaded  = setInterval(function(){
let miniCart = $("#mini-cart");
if(miniCart.length > 0){
    let intProduct = setInterval(function(){
        let minicartItems = miniCart.find("li");
        if(minicartItems.length > 0){
            $.each(minicartItems, function(){
                let item = $(this);
                let options = item.find("div.product.options");
                if(options.length > 0){
                    let optionsListe = options.find('.product.options.list').find("dt.label");
                    $.each(optionsListe, function(){
                        let value = $(this).text();
                        if(value.includes("Quantit")){
                            item.find(".details-qty.qty").remove();
                        }
                    });
                }
            });
            clearInterval(intProduct);
        }
    },100);
    clearInterval(minicartLoaded);
}
},100);


texts:
I want add a new button in customer edit page.

Here:

Between Reset and Create Order.

I try override "Mage_Adminhtml_Block_Customer_Edit" but when go to the customer edit page return this error:

This is my config.xml:

    <?xml version="1.0"?>
<config>
    <modules>
        <company_unblock>
            <version>1.0.0</version>
            <depends>
                <!-- no dependencies -->
            </depends>
        </company_unblock>
    </modules>
    <global>
        <models />
        <blocks>
            <adminhtml>
                <rewrite>
                    <customer_edit>Company_Unblock_Block_Adminhtml_Customer_Edit</customer_edit>
                </rewrite>
            </adminhtml>
        </block>
        <resources />
        <extraconfig />
        <helpers>
            <unblock>
                <class>Company_Unblock_Helper</class>
            </unblock>
        </helpers>
    </global>
    <admin>
        <routers>
            <company_unblock>
                <use>admin</use>
                <args>
                    <module>Company_Unblock</module>
                    <frontName>unblock</frontName>
                </args>
            </company_unblock>
        </routers>
    </admin>
</config>

In the Block override only modify function construct:

class Company_Unblock_Block_Adminhtml_Customer_Edit extends Mage_Adminhtml_Block_Customer_Edit
{
    public function __construct()
    {
        $this->_objectId = 'id';
        $this->_controller = 'customer';

        if ($this->getCustomerId() &&
            Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/create')) {
            $this->_addButton('order', array(
                'label' => Mage::helper('customer')->__('Create Order'),
                'onclick' => 'setLocation(\'' . $this->getCreateOrderUrl() . '\')',
                'class' => 'add',
            ), 0);

        }

        parent::__construct();

        $this->_updateButton('save', 'label', Mage::helper('customer')->__('Save Customer'));
        $this->_updateButton('delete', 'label', Mage::helper('customer')->__('Delete Customer'));

        if (Mage::registry('current_customer')->isReadonly()) {
            $this->_removeButton('save');
            $this->_removeButton('reset');
        }

        if (!Mage::registry('current_customer')->isDeleteable()) {
            $this->_removeButton('delete');
        }
    }
}

Can you help me?


texts: How to get list of attribute options in frontend view?

texts:
I'm writing a custom display for certain attributes based on its label. Within the 'configurable.phtml' file, it has the following lines:

$_product = $this->getProduct();
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());

I can loop through the attributes array and check the label no problem:

$special_attr = false;
foreach ($_attributes as $_attribute) {
    echo $_attribute->getLabel().'<br>';
    if ($_attribute->getLabel() === 'FooBar') {
        $special_attr = $_attribute;
    }
}

This will print out all of the labels ("Color", "Size", etc.). I'm trying to get a list of all options and their values given this special attribute now, and I'm completely stumped. All of the other questions I have found have said something along the lines of using ->getSource()->getAllOptions(false), however, calling getSource() on this attribute just returns null.

How can I get all options given this special attribute?

if ($special_attr) {
    $options = $special_attr->??????
    // list all options??
}


texts:
I see where to add them, and I've created a new one called mpn (Manufacturer Part Number). Type=Text

How do I get that to appear by default on every product editing / entry page?

Also, I added it to one product by pressing "Add Attribute" on the product page. I then tried a sample bulk upload with one row of data and 2 column headers: SKU and mpn. It imported apparently without errors, BUT the new mpn data is not present in the product listing when I go back in to look at / edit the product.


texts: While installing extension Readiness check fails in Magento 2

texts:
PHP Version 7.0.22-0ubuntu0.16.04.1

Mysql version : 5.7.19-0ubuntu0.16.04.1
(Is mysql version is one of the issues ? asMagento requirement prefer mysql 5.6.5–5.6.x )

I am trying to activate the plugin from admin panel on localhost.


texts: supee 7405 Hunk #2 FAILED at 472. Magento 1.8.1

texts:
I am trying to install this via shell, but this supee 7405 is giving me a problem.

Originally line 82 was failing too, (failed at line ending)
So I removed the \r line endings in notpad++

The only error I get now is:

app/code/core/Mage/Checkout/controllers/CartController.php Hunk #2 FAILED at 472. 1 out of 2 hunks FAILED

As a workaround, I tried uploading the patched file, and then running the patch to update the rest of the files, but it still does not work..

No one else seems to have this issue with this file. All previous patches are applied

Any ideas please.


texts: Magento 2 How to add "Store view" Filter to add new product grid inside bundle product

texts:
Here am having a bundle product. While adding a New product to bundle I need to add Store View filter to add product grid.
here is the image for default add new product to Bundle

Required Format on add new product to Bundle page

How to achieve it. Can I get Help?. Thank you in advance.


texts: Magento 2 Indexer Command Line Mac Parse Error Line 93

texts:
Just done a fresh install of Magento 2.1.2 on my Mac running MAMP PHP Version 5.6.10 and MySQL Version 5.6.25. When I attempt to reindex

php bin/magento indexer:reindex

I get the error:

Parse error: parse error in /Applications/MAMP/htdocs/magento.dev/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93


texts:
I need information please. For the SEO, I must generate 3 sitemap.xml.

One with the categories, sub-categories, pages with filters, guides, and corporates page
One with the products list
One with images.

Do you know if exists an extension or if I can configure magento for that or create these functionalities

Thanks


texts: Magento admin skin loading from base/default instead of default/default

texts:
I am migrating my server from the dev to live, on the live server when I go to the admin section I am getting 404s for the css.

For example instead of trying to load the css from

/skin/adminhtml/default/default/reset.css

it is trying to load from here:

/skin/adminhtml/base/default/reset.css

What could cause this?


texts: insert custom item variable through xml in magento admin order detail Magento

texts:
Hi I  am developing a magento extension in which I need to show a product custom attribute in the magento order detail. I want to add it through xml without
editing/ overwriting  any core file ..
For now i have edit the following file to show custom attribute value
app/design/adminhtml/default/default/template/sales/items/column/name.phtml

but I know this is not the correct way. So please suggest me how can I insert it by blocks through xml.
Below is the screen-shot link
http://awesomescreenshot.com/0e42y3ac8d


texts: How to set a product to be in/out of stock programatically

texts:
I tried a few snippets found online but with no success.

Just trying to set a product to be in stock / out of stock with code, this is as far as I've gotten:

$product = Mage::getModel('catalog/product')->load( 'id' );

$stockItem = $product->getStockItem();
$stockItem->setData('manage_stock', 1);
$stockItem->setData('is_in_stock', 0);
$stockItem->setData('use_config_notify_stock_qty', 0);
$stockItem->setData('qty', 0);

$stockItem->save();
$product->save();

It's making no changes to the product information when viewed through the admin panel, any ideas?


texts: All product images missing from admin but show in DB and front end

texts:
Using Magento v1.9.2.2 with patches SUPEE-7405 v1, SUPEE-7405 v1.1, SUPEE-8788, SUPEE-9652. Browsers: Safari & Chrome on Mac OSX.

I'm having an issue where none of the images in the product admin are displaying for some reason. It's not just images uploaded since any of the patches have been applied, it's all images, ever uploaded (see image for example).

All the images are still in the media folder, they still exist in the database and they still show up on the frontend.

I've tried various fixes but nothing seems to be coming up trumps, including:

http://www.blog.magepsycho.com/how-to-fix-the-issue-product-images-missing-in-backend-but-not-in-frontend/
Checked the Media folders exist and have the correct files
Checked the permissions on the folders
media_attribute is correct in the DB
Renamed the .htaccess file in the media folder
Flash installed and working
JS/CSS file merge disabled

When inspecting the code in the admin panel I'm getting an "Unexpected Token ','" error in the media_gallery_contentJsObject script

//<![CDATA[var media_gallery_contentJsObject = new Product.Gallery('media_gallery_content', , {"cover_image":{"label":"Cover Image ","field":"product[cover_image]"},"image":{"label":"Base Image ","field":"product[image]"},"small_image":{"label":"Small Image ","field":"product[small_image]"},"thumbnail":{"label":"Thumbnail ","field":"product[thumbnail]"}});//]]>

Where just after 'media_gallery_content' there is a piece missing.

Comparing this to another store it would appear to be something along the lines of id_69c186495899f5764a731df5baafee05_UploaderJsObject that is missing.

Any ideas how to resolve this would be greatly appreciated.


texts: query returns correct result but collection returns wrong result

texts:
I added this condition to my collection for adding the or condition:

$collection->addFieldToFilter(
array('city','mobile_badge'),
 array(array('eq' => $arealist),
'1'));

But it returns the wrong result.
This $collection->getAllIds(); also returns the correct ids.
But when I execute

$collection->getSelect();

it's gives me correct values.


texts: I want get all used block names of current pages kindly reply me


texts: change stock availability programmatically

texts: How I can change stock availability ie in stock and out of stock of product programmatically using product ID?


texts: how to login as admin in magento without commenting domain,secure and httponly

texts:
when I without commenting these 3 lines of code it's not login as admin.
if I comment those 3 lines it's login.

Varien.php

// session cookie params
    $cookieParams = array(
        'lifetime' => $cookie->getLifetime(),
        'path'     => $cookie->getPath()
        /*
        'domain'   => $cookie->getConfigDomain(),
        'secure'   => $cookie->isSecure(),
        'httponly' => $cookie->getHttponly()
        */
    );

So what is the use of it?
why it's acting like this?
If I Login as admin without commenting those 3 lines what should I do?

thanks in advance.............


texts: When i request for token(REST API).It returns the following error...

texts:
When I am using content type="application/json",I cant passing any parameters and also returns
                "message": "Decoding error."

When I am using content type="application/x-www-form-urlencoded",I cant passing any parameters and also returns

"message": "Server cannot understand Content-Type HTTP header media type application/x-www-form-urlencoded"


texts: Magento 2.1.3 billing address in checkout shipping step

texts: The checkbox "My billing and shipping addresss are the same" is not coming in frontend. I have to show the billing address form under shipping address in shipping step Magento 2.1.3.


texts: Cron generating a lot of process causing the server to hang (Magento 2.0.2)

texts:
I have a VM running ubuntu with no problem:

  Tasks: 124 total,   1 running, 123 sleeping,   0 stopped,   0 zombie

  %Cpu0  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st

  MiB Mem:   992.473 total,  800.410 used,  192.062 free,   87.496 buffers

  MiB Swap: 4095.996 total,  124.945 used, 3971.051 free.   95.289 cached Mem

However, if cron jobs are enabled it seems it run fine just for a couple of hours:

  server# ps -ef | grep -i php | grep -v grep | wc -l

  3

even though the server is totally idle, after some hours (randomly) those jobs stop completing but they are still being raised:

  server# ps -ef | grep -i php | grep -v grep | wc -l

  279

On magento user's cron I have:

  */1 * * * * /usr/bin/php -c /etc/php5/apache2/php.ini /var/www/html/bin/magento cron:run >> /var/log/magento/magento.cron.log&

  */1 * * * * /usr/bin/php -c /etc/php5/apache2/php.ini /var/www/html/update/cron.php >> /var/log/magento/update.cron.log&

  */1 * * * * /usr/bin/php -c /etc/php5/apache2/php.ini /var/www/html/bin/magento setup:cron:run >> /var/log/magento/setup.cron.log&

I used to have memory_limit = 128M on php.ini then increased to 512M but didn´t work (had apache rebooted).

Logs:

magento.cron.log

  Ran jobs by schedule.

update.cron.log

  Cron readiness check failed

setup.cron.log

  PHP 5.5.9-1ubuntu4.14 (cli) (built: Oct 28 2015 01:34:46)

  Copyright (c) 1997-2014 The PHP Group

  Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
     with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

I usually reboot the server since it stop responding through ssh.
Any idea?
Thanks!


texts: Magento – Display New Products on Homepage

texts:
i am using this code

{{block type="catalog/product_new" column_count="6" products_count="12" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}}

but did not show on front end.


texts:
is there any way to create product that you can change name when you are sending invoice? We have some small products that we don't want to create as new products. We use it only when we are doing invoice.

We want to change name and price.


texts:
A client uses bundle products with discounts, which are set as a percentage of the original price.

The discounted price is rounded to two decimals on the PDP and used in the total price calculation (price * qty)

Because of the percentages the actual price of the product has 4 decimals, which is stored in the quote items.

The problem is that the cart will show a different price that previously calculated because of the rounding before / after applying the qty

Is it possible to force the same calculation for quote items, for example by prerounding the product price ?


texts: how to add custom order variable value to new order email

texts:
I have created a custom field in "sales_flat_order" table and updating it over "checkout_type_onepage_save_order_after" event.
Now I want to send this field's value in new order email to customer.
How can I do this ? by override any block or something else.


texts: Plugin Grid not loading/block doesn't exist

texts:
So I have a plugin called Vendor/PluginName.

It's fairly simple and has a grid layout (view/adminhtml/layout/pluginname_index_grid.xml) that has the contents of ....

<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="formkey"/>
    <container name="root" label="Root">
        <block class="Vendor\PluginName\Block\Adminhtml\PluginName\Grid" name="admin.plugnname.grid"/>
    </container>
</page>

So locally it works, but one the server debug.log shows the following.

  main.CRITICAL: Class Vendor\PluginName\Block\Adminhtml\Pluginname\Grid does not exist [] []

  main.CRITICAL: Invalid block type: Vendor\PluginName\Block\Adminhtml\Pluginname\Grid [] []

  main.CRITICAL: Block admin.pluginname.grid throws exception and cannot be rendered. [] []

All of the folders and namespaces are correct which is making this strange.

It looks like Magento is taking the adminhtml path and only having the first letter being uppercase and ignoring the case provided in the XML?

Any advice would be helpful.


texts: how to change url text of a magento module which is display in address bar

texts: I am using store locator extension when I click on its link from home page its URL in address bar is looking like this www.mydomain/datta_store_locator but I want to change like this www.mydomain/storelocation how could I change this name


texts: Magento2 method beforeSavePaymentInformation not firing adding parameters to billing address

texts:
I am trying to save two new parameters, but the method beforeSaveAddressInformation is not firing. I have added the extension attributes to extension_attributes.xml
  <extension_attributes for="Magento\Quote\Api\Data\PaymentInterface">
        <attribute code="company_code" type="string"/>
        <attribute code="company_vat_code" type="string"/>
    </extension_attributes>

the plugin is included in di.xml
<type name="Magento\Checkout\Model\PaymentInformationManagement">
        <plugin name="Test_Checkout_PaymentInformationManagement" type="Test\Checkout\Plugin\Checkout\Model\PaymentInformationManagement"/>
    </type>

PaymentInformationManagement.php
declare(strict_types=1);

namespace Test\Checkout\Plugin\Checkout\Model;

use Magento\Quote\Api\Data\PaymentInterface;
use Magento\Quote\Api\Data\AddressInterface;
use Test\Checkout\Model\Address\ExtensionAttributes;
use Magento\Checkout\Model\PaymentInformationManagement as Subject;

/**
 * Class PaymentInformationManagement
 * @package Test\Checkout\Plugin\Checkout\Model
 */
class PaymentInformationManagement
{
    /**
     * @var ExtensionAttributes
     */
    protected $extensionAttributes;

    /**
     * BillingAddressPlugin constructor.
     * @param ExtensionAttributes $extensionAttributes
     */
    public function __construct(ExtensionAttributes $extensionAttributes)
    {
        $this->extensionAttributes = $extensionAttributes;
    }

    /**
     * @param Subject $subject
     * @param $cartId
     * @param PaymentInterface $paymentMethod
     * @param AddressInterface|null $billingAddress
     */
    public function beforeSavePaymentInformation(
        Subject $subject,
        $cartId,
        PaymentInterface $paymentMethod,
        AddressInterface $billingAddress = null
    ) {
        if (null === $billingAddress) {
            return;
        }

        $this->extensionAttributes->copy($billingAddress);
    }
}

The module's distributor is named here purposely "test"
in the debugger, the variables show up in the extension_attributes data array.


texts: Developing and distributing a commercial Magento extension with non-osl 3.0 licence

texts:
I'm planning on developing a commercial Magento extension following Magento's developers guide (http://www.magentocommerce.com/magento-connect/create_your_extension/) - meaning that i would extend my extensions classes from Magento's general classes, follow best practices, etc.

I would not do the following:
-physically edit any Magento's core files
-copy any code physically from core to my extension

I would only extend Magento's general classes, as advised in the guidance, and use Magento's core functions.

As i'm newbie to open source licences, i have read a LOT on open source licences, but you cannot know definitely what they (licences) mean (the more you read, the more confused you're : ) ). But because Magento and free and commercial extension developed for it are already established, there must be some sort of common wisdom on Magento, osl 3.0 and developing and distributing commercial extensions for Magento.

So my question goes as follows:
Is it common knowledge, and therefore safe to assume, that you are not creating a Derivative Work and do NOT need a dual licence (commercial Magento licence), when distributing a commercial Magento extension with non-osl 3.0 licence following the developers guide, if you are NOT physically editing, copying osl 3.0 licenced code?

Note: i'm not seeking for a legal advice as i understand that no one can say anything definitely on this issue, but i'm seeking to understand what is the common wisdom concerning this issue in Magento community, so i don't make any stupid newbie mistakes.

Thanks for all answers!


texts:
I have just entered into the world of e-commerce, and I am trying to get my Magento website up and running.

I am using AWS cloud for hosting my website. I am trying to use an architecture, where I can run multiple servers connected to a single DB server. Specifically, I want to use an AWS Auto scaling group along with ELB to start multiple EC2 instances, during high load. There is only one Mutli AZ RDS Database instance.

As initial trials, I tried creating 2 ec2 instances, and installed magento on both of them. I have used same RDS DB for both of them. But as is turns out, magento stores the base url of webserver in the database itself. Which means, I can only store one base url of magento website running one particular server.

To be precise magento stores base url in table core_config_data in column 'path' where row values ares "web/unsecure/base_url" and "web/secure/base_url", and the column 'value' for corresponding row specifies the url address of magento installed web server.
My question is how can I use multiple server using EC2 auto scaling, if magento permits only one server address in the base url.

Here's a partial view of the table with 2 rows -

config_id   scope     scope_id    path                      value
5           default   0           web/unsecure/base_url     http://server1.com/magento/
6           default   0           web/secure/base_url       http://server1.com/magento/

Are there any other known methods to somehow use horizontal scaling during heavy load conditions in Magento.


texts: Magento 2.1.1 - product import error - looking for solution

texts:
csv file checks out perfectly, no errors, but I get:

  General system exception happened Additional data: Notice: Undefined
  index: in C:\Program Files
  (x86)\Ampps\www\jblattert\magento2\vendor\magento\module-catalog-import-export\Model\Import\Product\Type\AbstractType.php
  on line 496

I see this in reply of another post, but don't know where to start to correct. Additionally, I deleted all unused attributes (from sample data) that were Multiple Select. There are now no multiple select attributes. Problem still occurs.

This occurs when your input attribute is a one-to-one relationship in the database. You set this up when you setup the Attribute - you need to choose Multiple Select for multiple values to work. The column value such as red|blue|green is taken whole and Magento kicks this out because as a whole, "red|blue|green" is not a valid column value. Change your product attribute so it can take multiple values.


texts: Batch Removing Broken Images from Magento

texts:
We just had a team mass import about 2500 products to our magento store and the only way they could do it from Zen Cart's Image Handler 2 plugin was to import 4 images for each product even if the product only had 2 images on zen cart. So that leaves 1000's of products with unnecessary broken images.

Is there any way to batch remove these? Any kind of plugin or tool? You'll have to excuse me, I'm a ui guy and don't know much about the backend.


texts: API with swagger in magento 1 or other tool

texts:
I am trying to find out way to create api for magento 1.

can we use swagger for magento 1 or any other tools available for magento 1.9.

Please give suggestion or need to create from scratch ?


texts: Is it possible to add date picker in checkout magento 2

texts:
I been trying to figure out how to add date picker in checkout. I can add date picker by plugin but I am not sure if that is correct way. I was expecting this to be done through knockout js but I couldn’t get anywhere with it
Is it possible I could get the value of date picker to Database


texts: Display Shipping method chosen by customer during checkout using AJAX

texts: In the one page checkout, above the progress tab in right side, we have displayed a block called Order Summary which contains the cart details [Pl refer screenshot]. There now we have to display the shipping method chosen by the customer in one page checkout as soon as they click continue button in shipping method section. I guess this can be done through AJAX like how the chosen shipping method is getting updated in the progress tab in one page checkout. Can someone help me with this?


texts: Magento 2 homepage bestseller, latest and most viewed products

texts: How i can add these magento 2 homepage? bestseller, latest and most viewed products. I use version magento 2.1.6.


texts: Magento 2 product model override not working correctly

texts:
I've created a model override for Magento\Catalog\Model\Product. My override functions for getName() and getPrice() are working. But getTierPrices() and getTierPrice() in the same class are not being invoked. When I open a category page or a product details page, the name and price are showing the hard-coded values in my overrides, but the tier prices show the standard Magento values. I've even throw an exception on the first line of getTierPrices() to check if it's invoked but the exception isn't thrown.

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">
    <preference for="Magento\Catalog\Model\Product" type="MyCompany\Pricing\Catalog\Model\Product" />
</config>

Product.php:

<?php
namespace MyCompany\Pricing\Catalog\Model;

class Product extends \Magento\Catalog\Model\Product
{
    public function getName()
    {
        // Do something here
        //return parent::getName();
        return 'Name override';
    }

    public function getPrice()
    {
        // Do something here
        return 100;
    }

    public function getTierPrices()
    {
        throw new Exception("This isn't invoked.");
        $tierPrices = [
            [ 'customer_group_id' => '0',
                'price_qty' => 2,
                'price' => 12,
                'website' => 'all'
            ]
        ];
        return $tierPrices;
    }

    public function getTierPrice($qty = null)
    {
        return 10;
    }
}


texts: Is there any way to change the product description and additional information of configurable products in view page based on weight selected


texts: How do I add an id/parameter to a frontend route?

texts:
I want to add an "id"/"parameter" to a front-end route in the following way:

store.example.com/blogpost/view/**213**

where 213 is the parameter I want to pass.

I have been looking at the Magento 2 dev docs, but I can't seem to find anything regarding adding this parameter.

And I can't seem to find anything that adds the "id" to the existing product route (catalog/product/view/id/:id) in magento/module-catalog. I'm probably missing something.

etc/frontend/routes.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="blogpost" frontName="blogpost">
            <module name="MyModule_BlogPost" />
        </route>
    </router>
</config>

Controller/View/Index.php

<?php

namespace MyModule\BlogPost\Controller\Search;

class Index extends \Magento\Framework\App\Action\Action
{
    public function execute()
    {
        // This only includes url query parameters ?param1=123&param2=active
        $params = $this->getRequest->getParams();

        // But I'd like to do this like the catalog/product/view/id/:id route ...
    }
}

Do I need to make a custom router for this, or is there another way?


texts:
How is the  tag defined and handled and when we want to use this tag?
I prefer https://mage2.pro/t/topic/1186 but can't get actual idea.


texts: get order by string/value in product_options array

texts:
We are working with a third party plugin that interacts with the Magento cart process prior to an order being placed.

In that it is dealing with a product configuration that is still in a 'quote' state at the time, it doesn't have an orderId yet to reference so they issue their own Id which is eventually placed into the finished order in a json serialized key in the product_options array.

After the order is placed, we need to be able to link a response we get from their API to the actual order in the database for our fulfillment system. We were considering doing this by creating a custom Rest API within magento that the fulfillment system could query to get the remainder of the order details that are not returned by the third party app.

As a result, the fulfillment system first receives a response from the third party with a hexidecimal "Project ID" that shows up in the product_options of a finished order. We need to build the REST api to use this "Project ID" supplied in the third-party API to search for the corresponding order in which it appears and return the rest of the order options.

But I'm still somewhat new to Magento and I'm not sure if anything already exists to retrieve an order by a string match in the product_options fields/values.

Any help is greatly appreciated.


texts: Move/Push page.main.title block into Breadcrumbs Magento2

texts:
I want to move page.main.title block to my breadcrumbs container, not before or after it, I want to push it inside breadcrumbs template and remove other wheres.

So this is my ~/Magento_Theme/templates/html/header/breadcrumbs.phtml :

            <?php
                 /*** I NEED PAGE.MAIN.TITLE BLOCK HERE ***/
            ?>

            <?php /* showing breadcrumb items */ ?>

in above template in .current-name class I need the title block!

I did this in ~/Magento_Theme/layout/default.xml, but it goes before breadcrumbs block not inside it:

<?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">

        <move element="page.main.title" destination="page.top" before="breadcrumbs"/>
        <referenceContainer name="page.top">
            <block class="Magento\Theme\Block\Html\Breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
        </referenceContainer>

</page>

and I did this in breadcrumbs.phtml too, It works perfectly but the Title exists in other wheres and I have 2
 tag in my page, so that is wrong!:

echo $block->getBlockHtml('page.main.title');

and I want to use this block(page.main.title) for showing my title Because of SEO stuff and I think this is the proper way! not the bad ways like show title from latest crumb label in loop or anything like that!

Note that the '~' character above is pointing my theme folder (app/design/frontend/MyVendor/myTheme).

Note that I'm using Magento 2.1.9 with PHP 7.0.24.


texts: how to add content in checkout page magento 2?

texts: I need to add my own content in this area which is checkout page. I can't find the phtml file.


texts:
I have a module, and I want to add a javascript generated in the module at the frontend footer.

The javascript has to be built dynamically because it depends on server variables. I've thought of a phtml.

How do I add this?


texts:
I have installed and enable one-page checkout extension by IWD Agency it shows correctly but removes my theme header and footer how to prevent it and Show my header footer as it was before.
Here I can attach a screen shot.Please review.

Thanks in advance,
Abdullah Shahid


texts: Magento Onepage checkout horizontal Design

texts:
Hi 'm working on the magento responsive theme using bootstrap.

In my onepage Checkout page, i need to customize that as horizontal listing.

  I have followed some tutorial. But in those tutorial they have use
  fixed height for that.I don't want to use like that.

So i have tried in app\design\frontend\default\default\template\checkout\onepage.phtml as follow

<?php $i=0; foreach($this->getSteps() as $_stepId => $_stepInfo): ?>
<?php if (!$this->getChild($_stepId) || !$this->getChild($_stepId)->isShow()): continue; endif; $i++ ?>
    <div id="opc-<?php echo $_stepId ?>1" class="span3 section<?php echo !empty($_stepInfo['allow'])?' allow':'' ?><?php echo !empty($_stepInfo['complete'])?' saved':'' ?>">

            <?php echo $i ?>
            <?php echo $_stepInfo['label'] ?>

<?php endforeach ?>

<?php $i=0; foreach($this->getSteps() as $_stepId => $_stepInfo): ?>
<?php if (!$this->getChild($_stepId) || !$this->getChild($_stepId)->isShow()): continue; endif; $i++ ?>
    <li id="opc-<?php echo $_stepId ?>" class="section<?php echo !empty($_stepInfo['allow'])?' allow':'' ?><?php echo !empty($_stepInfo['complete'])?' saved':'' ?>">

        <ul id="checkout-step-<?php echo $_stepId ?>" class="step a-item unstyled cart-list" style="display:none;">

 <?php echo $_stepInfo['label'] ?>

<?php echo $this->getChildHtml($_stepId) ?>

<?php endforeach ?>

  This code display 'll display as i want. But the Accordion was not
  working.

Can some one explain to do this.

I don't want to install extension for this.


texts: Custom status label not showing on admin grid Magento2

texts:
I am showing my custom modules grid in magento2 admin and that is showing fine with some filter options. In the start, I have only two status of the row - "New & Canceled" that was showing right in the grid column.
Today I added some more statuses like - "Completed, Rescheduled".
Via forms respective row data updating successfully, but in grid view its showing wrong, always showing "New".

Here is my code in

  app/code/NameSpace/Module/view/adminhtml/ui_component/booking_booking_listing.xml

<column name="status" >
    <argument name="data" xsi:type="array">
        <item name="options" xsi:type="object">Namespace\MyModule\Model\Booking\Source\IsActive</item>
        <item name="config" xsi:type="array">
            <item name="filter" xsi:type="string">select</item>
            <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
            <item name="dataType" xsi:type="string">select</item>
            <item name="label" xsi:type="string" translate="true">Status</item>
            <item name="sortOrder" xsi:type="number">8</item>
        </item>
    </argument>
</column>

  Namespace\MyModule\Model\Booking\Source\IsActive.php

namespace Namespace\MyModule\Model\Booking\Source;

use Namespace\MyModule\Model\Booking;
use Magento\Framework\Data\OptionSourceInterface;

    class IsActive implements OptionSourceInterface
    {
        protected $booking;

        public function __construct(Booking $booking)
        {
            $this->booking = $booking;
        }

        public function toOptionArray()
        {
            $options[] = ['label' => '', 'value' => ''];
            $availableOptions = $this->booking->getAvailableStatuses();
            foreach ($availableOptions as $key => $value) {
                $options[] = [
                    'label' => $value->getText(),
                    'value' => $key,
                ];
            }
            return $options;
        }
    }

Returning array is  -

Array
(
    [0] => Array([label] => [value] => )
    [1] => Array([label] => New [value] => 1)
    [2] => Array([label] => Rescheduled [value] => 2)
    [3] => Array([label] => Completed [value] => 3)
    [4] => Array([label] => Canceled [value] => 0)
    [5] => Array([label] => Did not show up [value] => 4)
)

In admin grid filter its showing right options and filtering also right as per datbase values.

But In grid its not showing right label.

Here is the Grid screenshot -

Please check and let me know what I am doing wrong.

Thanks


texts: Products stock status change after csv import

texts:
For some reason my out-of-stock products reappear as 'in stock' whenever I update the product by a csv import.

Even if I import a single column; the 'sku' column, the affected products suddenly appear in stock.

I don't want imports to affect the stock level, as I'm constantly updating products via csv on a live store. I have intentionally left out all qty or stock related columns on my import sheets.

Does anyone know why this is happening? Is it an intended feature, a bug, or configurable?
Stock management is enabled in config, and all products use config settings for stock management. I'm using Magento 2.1.7


texts: Multidomain store checkout redirected to default url

texts:
I have a multi site store set up as follows:

Website1 (base) - Store1 - View1 (default)

Website2 - Store2 - View2

Each website has it's own domain (ie store.co.uk for Website1 and store.com for Website2).  My problem is that that checking out on Website2 redirects to the url for Website1 (store.co.uk/checkout/onepage/) which is not what I expected - we want the domain to remain store.com.

I'm not aware of any redirect rules in .htaccess that would cause this. Are there any admin settings that govern which checkout is to be used?

As this is the first multidomain store I've configured any advice given would be gratefully received.

Magento CE 1.9.2.4

It's worth pointing out that the contacts page for both stores has a secure url too and isn't redirected like checkout.


texts: Saving as order when paypal transaction cancelled by user

texts: How to save the order to order table under any state when the payment is cancelled via paypal standard.


texts:
After updating to magento 2.3.0 experienced an error on the store frontend.

  Base table or view not found: 1146 Table
  '.catalog_product_entity_boolean' doesn't exist.


texts: Magento 2 Product Images Not Showing in detail page

texts:
http://madressingroom.com/black-and-white-varsity-jacket-10.html
Here is a link I have spent more than 1 week on it, please help me to get the solution. It's a Magento Molly Theme. Js file, not L

Uncaught SyntaxError: Unexpected token >
black-and-white-varsity-jacket-10.html:14 Uncaught SyntaxError: Unexpected token , in JSON at position 1018
    at JSON.parse (<anonymous>)
    at getNodeData (scripts.js:87)
    at Array.map (<anonymous>)
    at scripts.js:117
    at HTMLDocument.apply (main.js:70)
    at fire (jquery.js:3232)
    at Object.add [as done] (jquery.js:3291)
    at jQuery.fn.init.jQuery.fn.ready (jquery.js:3542)
    at jQuery.fn.init (jquery.js:2967)
    at new jQuery.fn.init (jquery-migrate.js:241)

Here is an error shown in the console


texts: Give a percentage off to everyone that has a specific email address. ie. employee@mywebsite.com

texts:
So anyone with our email address @mywebsite.com gets put into a group with a certain amount off.

They would still have to register. I know this can be done but I'm not sure how.

Can someone please assist me with this task?

I feel like the only way to accomplish this is by writing and event / Observer method to look for these events customer_save_before or customer_save_before.

Then the Observer would just assign them to a group number ID like 5 or whatever it may be.


texts: Override Extension (/vendor) in app/frontend

texts:
I'm trying to override a layout .phtml file for a 3rd party extension which is located in /var/vendor_name/extension.
As I understand, I should not be modifying the /vendor files, but this extension has no files located in the app/code or app/frontend.
The file I'm trying to override is located in <magento_root>/vendor/vendor_name/module_name/view/frontend/templates/product/view/list.phtml
I read through the following thread but I'm not sure how to apply it in my situation Magento 2: How to Override File in Vendor Folder
Please let me know if more information needed.
Thanks


texts: I have many spam customer in Magento 1.9 so how can i remove?

texts:
Guy's I have a Magento 1.9 site and some days ago I check my admin side so found lot's of spam customer so I can add google Recaptcha at that time.

But it already has many customers are in site so how can I remove in my site if any suggestions like any module or custom script so please help me.


texts: How to upload image or file and display it in Custom Module using form field in Magento 2

texts:
Hello everyone in my case I want to add an image field in a custom form inside a custom module I have already the crud worked fine with the other fields like file_id,name,created_at updated_at, but I don't know how to add the field 'logo', and what files I have to change.

if anyone can help me please I will be appreciated ?


texts: Catalog URL Rewrite reindex issue after version upgrade

texts: After upgrading Magento 1.6 to 1.9.1 Catalog URL rewrite index mode is in running status,after that indexing is done from shell ,but catalog_url is still in running mode, due to this newly added products are redirecting to 404 not found page with catalog/product/view/category/90/. If anyone can give solution for it


texts: Magento 2 - Override an xml file defined in the etc folder in a theme?

texts:
I am attempting to override the email templates for the Aheadworks_Giftcard extension. It seems that the email templates are defined in a xml file in the etc directory called sample_email_templates.xml.

Aheadworks/Giftcard/etc/sample_email_templates.xml snippet:

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

    <template>
        <template_code>Christmas</template_code>
        <template_subject>You've been sent a gift from {{var sender_name}}</template_subject>
        <template_styles><![CDATA[img {
    max-width: 100%;
    height: auto;
    outline: none !important;
    border: 0 !important;
    text-decoration: none !important;
}
body {
    font-size: 16px;
    font-family: Arial, 'Helvetica', Helvetica, sans-serif;
    line-height: 1.5em;
    margin: 0;
    padding: 0;
    width: 100% !important;
    height: 100%;
    -webkit-text-size-adjust: none;
    background: #e1e1e1;
}]]></template_styles>
        <template_text><![CDATA[

                                <img class="center" src="{{var card_image_base_url}}christmas.png"

I am not quite sure where to place the overridden sample_email_templates.xml with the updated email templates within the theme.