texts: use magento rest api to manage attribute sets

texts: i want to manage attribute sets of magento using rest api like i use to manage products (insert, update and delete). The resources in the rest api documentation http://www.magentocommerce.com/api/rest/Resources/resources.html are only for products, orders and customers. This can be achieved using the magento SOAP api but i want to do it using the rest api. Do i have to implement it myself or there is another way? please help!


texts: "Please make sure your passwords match" error on customer registration in Version. 1.9.0.1

texts: I am using Magento version 1.9.0.1. On new customer registration, I am getting "Please make sure your passwords match" error. I have tried different solutions, but nothing works, still same error appears.


texts: Magento 1.9.2.2 possible to the event is from Place Order for customer_save_before

texts:
I have download an open source extension to allow mobile login.

             <events>
                <customer_save_before>
                    <observers>
                    </observers>
                </customer_save_before>
            </events>

Is it possible to know the from the observers function to know that this event is from  checkout "Place Order", I need to do some special event only if it is "Place Order"

or

any event only apply for customer registration? customer_save_before will execuse for registration / checkout.


texts: Set free shipping for base subtotal with discount including tax

texts:
I need to set free shipping on base subtotal with discount including tax. (i.e. grand total)

I have searched a lot but didn't find any proper link, regarding this.

I am in a very bad situation, I need to know whether this is possible to achieve in magento2 or not.


texts: How to add checkbox-set ui-component to static form in layout.xml

texts:
I want to add a multi checkbox of days of the week to the checkout, similar to:

Following the instructions on the Magento Docs - Add a new input form to checkout I have added the following item to my checkout_index_index.xml layout file:
<item name="delivery_days" xsi:type="array">
    <item name="component" xsi:type="string">Magento_Ui/js/form/element/checkbox-set</item>
    <item name="config" xsi:type="array">
        <item name="customScope" xsi:type="string">shippingAddress.custom_attributes</item>
        <item name="template" xsi:type="string">ui/form/field</item>
        <item name="elementTmpl" xsi:type="string">ui/form/element/checkbox-set</item>
    </item>
    <item name="provider" xsi:type="string">checkoutProvider</item>
    <item name="dataScope" xsi:type="string">shippingAddress.custom_attributes.delivery_days</item>
    <item name="label" xsi:type="string" translate="true">What days do you wish to receive your order?</item>
    <item name="validation" xsi:type="array">
        <item name="required-entry" xsi:type="string">true</item>
    </item>
    <item name="options" xsi:type="array">
        <item name="monday" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Monday</item>
            <item name="value" xsi:type="string">monday</item>
        </item>
        <item name="tuesday" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Tuesday</item>
            <item name="value" xsi:type="string">tuesday</item>
        </item>
        <item name="wednesday" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Wednesday</item>
            <item name="value" xsi:type="string">wednesday</item>
        </item>
        <item name="thursday" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Thursday</item>
            <item name="value" xsi:type="string">thursday</item>
        </item>
        <item name="friday" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Friday</item>
            <item name="value" xsi:type="string">friday</item>
        </item>
    </item>
</item>

This is creating a fieldset with the label, but no checkboxes.

If I change the component and elementTmpl from checkbox-set to checkbox then I see a single checkbox. According to the Magento Docs - Checkboxset Component these are the correct values for the appropriate settings.
How do I need to alter the layout.xml file to show multiple checkboxes with the name days[] so that I can select none, one or more of the checkboxes?


texts: Data Migration Tool was used to migrate our Magento store from 1.9.2.2 to Magento 2.3.3 successfully. Upon inspection of the Magento 2 DB, I found out the custom tables weren't migrated which are 6 of them. Is there still a possibility of Data Migration Tool being used again to migrate these custom tables? Or is exporting and importing them a better approach?


texts: I want to override customer-account-index.xml from magento-customer

texts:
If we want to override customer-account-index.xml from magento-customer. Where I should override?

By making folder name as Magento_Customer in app\design\vendor\theme or app\code\vendor\module..

basically i want to section below account information in my account page of customer.


texts: magento 2 Get attribute option label by attribute option Id?

texts:
magento 2 I would like to get an attribute option label by attribute option id.

For Example:-

attribute option value : 53,

attribute option label/text/name : green

from the above scenario i want to get attribute option label/text/name.

Note: without loading product i need to get this.
please suggest me.


texts: getting error “Table doesn't exist” in magento innodb database when browsing in phpmyadmin or sqlYog

texts:
I have moved magento database (copy and paste xampp/mysql directory) from another system to my laptop(windows7,xampp), and configure mysql service path(xampp control panel showing run mysql fine). But now I am not able to access magento database, only 19 tables are listed in phpmyadmin.

all tables are listed in sqlyog, but when i browse them getting error message "table not exist".

I try to recover and follow this article steps, but when I am run this command
mysqld –innodb_log_file_size=5242880 –innodb_force_recovery=6 on command window, getting an error " Can't create test file \usr\local\mysql\data.lower-test". Can you please suggest me why am i getting this error and how can I resolve it?

If above error we can ignore I mean this error not responsible for get back database then please suggest me how can I get back my database?

PS: I also copied "ibdata1", "ib_logfile0" and "ib_logfile1" on mysql directory. Now I can't access database from old system.

Thanks in advance.


texts: Grid Mass Action with childs no longer work with 2.3.3

texts:
i updated from Magento 2.3.2 to 2.3.3, and one module has a problem with grid massactions.

The old way was:

            <action name="change_status">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="type" xsi:type="string">change_status</item>
                    <item name="label" xsi:type="string" translate="true">Change Status</item>
                    <item name="urlPath" xsi:type="string">company_module/customerchange/changeStatus</item>
                    <item name="paramName" xsi:type="string">status</item>
                </item>
            </argument>
            <argument name="actions" xsi:type="configurableObject">
                <argument name="class" xsi:type="string">Company\Module\Ui\Component\MassAction\ChangeStatus</argument>
                <argument name="data" xsi:type="array">
                    <item name="urlPath" xsi:type="string">company_module/customerchange/changeStatus</item>
                    <item name="paramName" xsi:type="string">status</item>
                    <item name="confirm" xsi:type="array">
                        <item name="title" xsi:type="string" translate="true">Confirm</item>
                        <item name="message" xsi:type="string" translate="true">Are you sure to change the status?</item>
                    </item>
                </argument>
            </argument>
        </action>

After update i get the error message:
Exception #0 (InvalidArgumentException): Class argument is invalid: Company\Module\Ui\Component\MassAction\ChangeStatus

The code above was the only i found. Is there another right way to do this? Or is there an error in my code?

Regards,
Andreas


texts:
I'm using CE 1.9.1.0 and my cron.sh file is being run every 5 minutes on my server. I have also set up the template within Configuration -> Transnational Emails but the template is still not being sent.

I'm on the verge of launching the site but want to make sure all functionality works before I do. If any additional information is needed I can provide it, my site is also live (http://decormarket.com)

Are there any other steps I'm looking over? Any help would be great.


texts: How can i add a field mobile number at the time of customer registration form in magento 2?

texts: I need to add mobile number after email in the form of customer registration in magento 2.


texts:
https://docs.magento.com/user-guide/marketing/rewards-loyalty.html
I would like to know if there are many retailers out there using this feature, do you have experience with it yourself if so how stable is it, are magento / adobe keeping up support for it and extending it going forward?


texts: Undefined index error on going to shopping cart page in magento 2.3.3

texts:
After adding Product to cart and clicking on shopping cart link. I am getting this error
Undefined index: 8039,8219 in /srv/public_html/vendor/magento/module-catalog/Model/ProductRepository.php on line 316
See https://nimb.ws/0GCiSF
I am using MAgento 2.3.3
Link to reproduce url : https://wholesale-e92rduand89atx1x.mojostratus.io/v2-zorb-4d-cotton-dimple-pul-silver.html
Any idea on how to fix this issue?


texts: How to get multiple shipping address in checkout?

texts: I need to get multiple shipping address from quote, how do I do this?


texts: Mage::log() will work for writing to system.log (sometimes) but not a custom file

texts:
I have a cronjob for Magento 1.9 running to test some functions, so naturally I want to log the results of these functions, and make sure they're running. Initially, I had the line Mage::log('Running function'); and then another log line to write the variable. And this worked, but with all my testing, it was cluttering system.log so I decided to have it write all of this to a file called test.log instead. I changed that line to Mage::log('Running function', null, 'test.log'); but now no logs are being written. I even tried creating an empty test.log file manually but it isn't being populated. That is the only line I changed.* All my files have 777 permissions set and are owned by www-data (I am on Ubuntu). My logging is enabled (it was just logging to system.log so this is obvious). What could the issue be?

*Edit: I found that it wasn't the only line I changed. I had added a variable declaration (for a variable that wasn't even being used, so I didn't think it would affect my code) and I think magento didn't like that line. Shouldn't this have gone into a log file somewhere though?


texts: Conflict with your requirements or minimum-stability

texts:
i want try doofinder in my magento 2.2.6 ecommerce but when i try to install it i get this error:

Using version ^0.1.7@beta for doofinder/doofinder-magento2
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of
packages.
Problem 1
- The requested package magento/product-community-edition (locked at
2.1.0, required as 2.2.6) is satisfiable by magento/product-community-
edition[2.1.0] but these conflict with your requirements or minimum-stability.
Problem 2
- Can only install one of: magento/framework[101.0.6, 100.1.0].
- Can only install one of: magento/framework[101.0.6, 100.1.0].
- Can only install one of: magento/framework[100.1.0, 101.0.6].
- magento/product-community-edition 2.2.6 requires magento/framework
101.0.6 -> satisfiable by magento/framework[101.0.6].
- Installation request for magento/product-community-edition 2.2.6 ->
satisfiable by magento/product-community-edition[2.2.6].
- Installation request for magento/framework (locked at 100.1.0) ->
satisfiable by magento/framework[100.1.0].


texts: Add block from custom module to product blocks in loop?

texts: When you search and many products are returned, each has a buy button - how would I add another button to each from a custom module?


texts: Magento Multisite domain switching - How to automatically switch customers to a different website

texts:
In a multi-site instance where each website is assigned specific domain name, I currently have a requirement to automatically switch customers to specific website. Please see example scenarios below…

Customer_A is in USA
Customer_B is in France

Here are three websites in the multi-site..
Website_1 (website.com)
Website_2 (website.com.au)
Website_3 (website.fr)

So if customer_A visits ‘website.com.au’, I want to automatically redirect him/her to ‘website.com’ while preserving his/her session.

Similarly if customer_B visits ‘website.com’, I want to automatically redirect him/her to ‘website.fr’ while preserving his/her session.

I’m able to detect and automatically reassign some locale parameters such as currency, language and store but the main challenge is where/when/how to redirect between websites while preserving customer session.

The multisite is set up without separate folders - as in here… https://www.magentocommerce.com/knowledge-base/entry/tutorial-multi-site-multi-domain-setup

Thanks for your help.


texts: Cannot send headers; headers already sent

texts:
I have used renderer in a file in custom extension for attribute label but getting above error.

my code is below:

<?php

class Baltech_Stock_Block_Adminhtml_Stock_Renderer_Size extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
   public function render(Varien_Object $row)
   {
        $value = $row->getData($this->getColumn()->getIndex());
        $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'size');
        $options = array();
        foreach( $attribute->getSource()->getAllOptions(true, true) as $option ) {
          $id = $option['value'];
           if ($id==$value)
           {
            echo $option['label'];
           }

        }

   }
}


texts: Adding images via CSV with non standard file extensions

texts:
I'm importing several thousand images from an existing system via a CSV upload referencing them in an Amazon S3 bucket.

I'm having difficulty with images which are perfectly valid images but do not have a .jpg file extension. Magento 2 seems to reject these with an error without actually attempting to get the image in question.

Some of these image file names were just miskeyed by whoever uploaded them as .jpe etc. In other cases I would like to run them through a file size standardiser like Imgx when uploading them as some are huge, but the query string to tell Imgx what size to make means that Magento rejects the URLs.

Is there any way to make Magento less fussy and actually download the image from the URL even if it does not end .jpg?


texts: Magento 2 breadcrumbs issue on product view page?

texts:
I have been facing one issue with breadcrumbs in Magento 2.2.3 CE i.e  As per our observation, when the user browses the product from the category page, for some products breadcrumb full path is displaying on the view page.

home -> main category -> sub category -> Name of the product

https://prnt.sc/m5sly9

For some products product name only displaying home -> Name of the product

https://prnt.sc/m5smah

Can anyone please suggest and know the reason why it is happening?


texts: How to get customizable option values for not visible item configurable product in magento 2

texts:
via graphqlAPI

i set Customizable options
for Child product (Configurable items) - not visible item

when i add
configurable product to  cart with customizable options   - it's working

but while getting cart details
that one not showing choose customizable options in (CartItem) - Configurable Child Product?
how i can get customizable option for not visible child product (Cart)


texts:
I've downloaded the .zip of a module (for a slider), extracted it and ran setup:upgrade.

I can see the module through the backend, but when I go to the page to main page I have this error :

  SQLSTATE[42S02]: Base table or view not found: 1146 Table
  'magento.sy_slider' doesn't exist, query was: SELECT COUNT(*) FROM
  sy_slider AS main_table

I tried many thing to update the database, but nothing changed.


texts: Is there a roadmap for official support PHP 7 for Magento 1?

texts:
Is there a roadmap (or will there be in the near future) for official support for PHP 7 for Magento 1.x?

I know there is a community extension for making it compatible. And I know about the several PHP 7 topics here. But I am specifically wondering about official support, it would make the process a bit more convinient.

EDIT: I am looking for an official source or statement or maybe a post from the core team or something. In other words a source which is less opinion based.


texts:
How to create theme in magento 2 stable version?

There are tutorials available for Beta but not stable.

The steps I took are as follow :-

Created folder inside app/design/frontend/Themevendorname/Themename/ in that created theme.xml & composer.json

but when I gone to admin stores->configuration->General->Design in that Design Theme drop-down........there the new theme is not displayed.

Here are the lines of composer.json

{
    "name": "themevendorname/theme-frontend-themename",
    "description": "N/A",
    "require": {
        "php": "~5.4.11|~5.5.0",
        "magento/framework": "0.1.0-alpha107",
        "magento/magento-composer-installer": "*"
    },
    "type": "magento2-theme",
    "version": "0.1.0-alpha107",
    "extra": {
        "map": [
            [
                "*",
                "frontend/themevendorname/themename"
            ]
        ]
    }
}

Please check the image attached. Another thing is that I also created a folder named theme-frontend-themename inside vendor->magento folder & put the same folders here too but still not getting that theme in admin store->configuration->General->Design in that Design Theme drop-down.

Any Help Please.


texts: Magento 2: Header and footer not loading in custom module's CMS layout

texts:
I am developing a custom theme which inherits from Magento/blank. I am attempting to develop a CMS homepage layout within a custom module.

I have created the module and successfully applied the layout to the homepage.

When I visit the homepage I should see a header and footer, and an empty container for the content.

Instead, I see an entirely blank page with the styles loaded from my custom theme.

My first thought is that my module is not able to fall back to the layouts contained within the Magento_Theme module and so the container "page.wrapper" cannot be referenced because it does not exist within my custom module. I'm just not certain what the solution would be.

My module is written as follows:

CatalogFilter
    ├── composer.json
    ├── etc
    │   └── module.xml
    ├── README.md
    ├── registration.php
    └── view
        └── frontend
            ├── layouts.xml
            └── page_layout
                └── cms_page_view_id_catalogfilter.xml

  app/code/JcfTools/CatalogFilter/composer.json

{
    "name": "jcftools/module-catalogfilter",
    "description": "",
    "type": "magento2-module",
    "version": "1.0.0",
    "license": "Private License",
    "authors": [
        {
          "name": "Joshua Flood",
          "email": "info@joshuaflood.com",
          "homepage": "https://www.joshuaflood.co.uk",
          "role": "Owner"
        }
    ],
    "autoload": {
        "files": [
            "registration.php"
        ],
        "psr-4": {
            "JcfTools\\CatalogFilter\\": ""
        }
    }

}

  app/code/JcfTools/CatalogFilter/registration.php

<?php
/**
 * Copyright © Joshua Flood. All rights reserved.
 * See COPYING.txt for license details.
 */

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'JcfTools_CatalogFilter',
    __DIR__
);

  app/code/JcfTools/CatalogFilter/etc/module.xml

<?xml version="1.0"?>
<!--
  /**
   * Copyright © Joshua Flood. All rights reserved.
   * See COPYING.txt for license details.
   */
-->

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="JcfTools_CatalogFilter" setup_version="1.0.0">
    </module>
</config>

  app/code/JcfTools/CatalogFilter/view/frontend/layouts.xml

<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
    <layout id="jcftools-catalogfilter">
        <label translate="true">JcfTools Catalog Filter</label>
    </layout>
</page_layouts>

  app/code/JcfTools/CatalogFilter/view/frontend/page_layout/cms_page_view_id_catalogfilter.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © Joshua Flood. All rights reserved.
 * See COPYING.txt for license details.
 */
-->

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="empty"/>
    <referenceContainer name="page.wrapper">
        <!-- Header container -->
        <container name="header.container"
                   as="header_container"
                   label="Page Header Container"
                   htmlTag="header"
                   htmlClass="page-header"
                   before="main.content" />
        <!-- Page top -->
        <container name="page.top"
                   as="page_top"
                   label="After Page Header"
                   after="header.container"/>
        <!-- Footer container -->
        <container name="footer-container"
                   as="footer"
                   before="before.body.end"
                   label="Page Footer Container"
                   htmlTag="footer"
                   htmlClass="page-footer" />
    </referenceContainer>
</layout>


texts: Get order collection by order id in Magento 2?

texts:
I am trying to get order collection by order id in Magento 2.

Here is my code:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$orders = $objectManager->create('Magento\Sales\Model\Order')->getCollection()->load($oid);

echo $custLastName= $orders->getCustomerLastname();

But its is giving fatal error:

 Call to undefined method Magento\Sales\Model\ResourceModel\Order\Collection::getCustomerLastname()


texts: Changing Magento Product Review Page Titles

texts:
I have found a tutorial, which seems to work only on very old version of Magento, it changes title from PRODUCT NAME TO.

(Product Name) Review - (Review Title)

It just displays old default url instead .

<?php

class Mage_Review_Block_View extends Mage_Catalog_Block_Product_Abstract
{

      public function __construct()
        {
            parent::__construct();
            $this->setTemplate('review/view.phtml');
        }

        /**
         * Retrieve current product model from registry
         *
         * @return Mage_Catalog_Model_Product
         */
        public function getProductData()
    {
        return Mage::registry('current_product');
    }

    /**
     * Retrieve current review model from registry
     *
     * @return Mage_Review_Model_Review
     */
    public function getReviewData()
    {
        return Mage::registry('current_review');
    }

    /**
     * Prepare link to review list for current product
     *
     * @return string
     */
    public function getBackUrl()
    {
        return Mage::getUrl('*/*/list', array('id' => $this->getProductData()->getId()));
    }

    /**
     * Retrieve collection of ratings
     *
     * @return Mage_Rating_Model_Mysql4_Rating_Option_Vote_Collection
     */
    public function getRating()
    {
        if( !$this->getRatingCollection() ) {
            $ratingCollection = Mage::getModel('rating/rating_option_vote')
                ->getResourceCollection()
                ->setReviewFilter($this->getReviewId())
                ->setStoreFilter(Mage::app()->getStore()->getId())
                ->addRatingInfo(Mage::app()->getStore()->getId())
                ->load();
            $this->setRatingCollection( ( $ratingCollection->getSize() ) ? $ratingCollection : false );
        }
        return $this->getRatingCollection();
    }

    /**
     * Retrieve rating summary for current product
     *
     * @return string
     */
    public function getRatingSummary()
    {
        if( !$this->getRatingSummaryCache() ) {
            $this->setRatingSummaryCache(Mage::getModel('rating/rating')->getEntitySummary($this->getProductData()->getId()));
        }
        return $this->getRatingSummaryCache();
    }

    /**
     * Retrieve total review count for current product
     *
     * @return string
     */
    public function getTotalReviews()
    {
        if( !$this->getTotalReviewsCache() ) {
            $this->setTotalReviewsCache(Mage::getModel('review/review')->getTotalReviews($this->getProductData()->getId(),

  false, Mage::app()->getStore()->getId()));
              }
              return $this->getTotalReviewsCache();
          }

    /**
     * Format date in long format
     *
     * @param string $date
     * @return string
     */
    public function dateFormat($date)
    {
        return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_LONG);
    }
}

    /**
     * Set Page title
     */
    protected function _prepareLayout()
    {
        $headBlock = $this->getLayout()->getBlock('head');
        if ($headBlock)
        {
          $title = array();
          if ($product = $this->getProductData())
          {
              $title[] = $product->getName() . ' Review';
          }

          if ($review = $this->getReviewData())
          {
              $title[] = $review->getTitle();
          }

          $title = implode(' - ', $title);
            $headBlock->setTitle($title);
        }

        return parent::_prepareLayout();
    }
}

http://icebergcommerce.com/software/blog/iss/article/seo-tip-changing-magento-product-review-page-titles/#comments

Has anyone ever figured out a way to display "(Product Name) Review - (Review Title)" for each review in meta title on Magento 1.9.?


texts: Full calendar integration in Magento 2.2.2

texts:
I am trying to integrate the full calendar in Magento 2.2.2 with event management extension(custom).

I have follows all steps as suggested But still, it is not working.

Please help me to execute the Full-calendar.


texts: I assume this is not normal but i have catalog_product_index_eav table and then catalog_product_index_eav_replica table

texts:
I'm not sure why and if it's normal but i'm assuming it's not suppose to be there.

Lately, i've been having some problems with saving products and getting these errors on the admin upon save:

SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: UPDATE `catalog_product_entity` SET `entity_id` = ?, `created_in` = ?, `updated_in` = ?, `attribute_set_id` = ?, `type_id` = ?, `sku` = ?, `has_options` = ?, `required_options` = ?, `created_at` = ?, `updated_at` = ?, `mst_search_weight` = ?, `mageworx_is_require` = ? WHERE (row_id = '4987')

I know you can probably fix it by updating the innodb_lock_wait_timeout to a higher value but that's just a bandaid and not addressing the actual problem.

Concurrently on the same product save sometimes i get this error: "There is no active transaction" and this one Code does not exist

I've tried killing any and all sleeping processes to free up the active ones but still to no avail nothing has fixed the issue. Occasionally it saves without a problem but it's like once in every 5 tries or more.

Any ideas?


texts: How to convert select box into radio in checkout page

texts:
I want to change credit card type option into radio button. for that i have found file ccsave.phtml

Here is the code of select box that appear in checkout page.

<div class="input-box">
            <select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Credit Card Type')) ?>" class="required-entry validate-cc-type-select">
                <option value=""><?php echo $this->__('--Please Select--') ?></option>
            <?php $_ccType = $this->getInfoData('cc_type') ?>
            <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
                <option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_ccType): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
            <?php endforeach ?>
            </select>
        </div>

thanks in advance.


texts: Change maximum number of items in paging navigation

texts:
On catalog page there is a pagination links that look like this (for 17 pages):

<- 1 2 3 4 5 6 7 8 9 10 ... 17 ->

Is there any way to reduce number of items before ... without rewriting paging block completely? So it'll look like this:

<- 1 2 3 4 ... 17 ->


texts:
I want to add custom prices for certain customers (individual customer not customer groups), is there a way in Magento that i can do this or will i need an extension for this? As i have found quite a few but wondered if there was an easy way of doing it myself first?

Thanks


texts:
I want to implement an pdf attachment to my invoice mail to the customer. I have a pretty good guess on how to do that, however this time I would like to solve the task with an event observer.

Not having worked much with Magento Observers before, I have some troubles figuring out which event to hook into.

What I need is an event which happens when the standard email is composed, so that I can simply attach my pdf copy of the invoice. Funnily enough all the helpful sites I found on the internet omit exactly on explaining that step in order to keep the tutorial generic or something.

Any hint about the event, or even better on a generic way to figure out the right event to use in any task, would be greatly appreciated. Thank you.


texts:
is there any way remove specific crumb from breadcrumbs ?

we can add crumb method addCrumb from Block Class Mage_Page_Block_Html_Breadcrumbs

but I didn't find any method to remove crumbs like removeCrumb like method which remove crumbs from bread crumbs from any position


texts: What is good practise for getting resource/collection models?

texts:
Which one is more correct:
 Mage::getResourceModel() or
Mage::getModel('catalog/product')->getCollection()

I always use the first method unless I already have a model that I can call the getCollection on. I'm just wondering if there are any advantages/disadvantages to it.


texts: Can't print invoice after edited Currency file on Magento 1.7

texts:
I have modified Currency file (app/code/local/Mage/Directory/Model/Currency.php) in order to show price with superscript decimals.

Everything was fine but i can't print invoices anymore.
Can you help me fix that problem? Thank you!

This is what I have modified:

I have replaced this function:

public function formatTxt($price, $options = array())
{
    if (!is_numeric($price)) {
        $price = Mage::app()->getLocale()->getNumber($price);
    }
    /**
     * Fix problem with 12 000 000, 1 200 000
     *
     * %f - the argument is treated as a float, and presented as a floating-point number (locale aware).
     * %F - the argument is treated as a float, and presented as a floating-point number (non-locale aware).
     */
    $price = sprintf("%F", $price);
    if ($price == -0) {
        $price = 0;
    }
    return Mage::app()->getLocale()->currency($this->getCode())->toCurrency($price, $options);
}

With this one:

public function formatTxt($price, $options = array())
{
    if (!is_numeric($price)) {
        $price = Mage::app()->getLocale()->getNumber($price);
    }
    /**
     * Fix problem with 12 000 000, 1 200 000
     *
     * %f - the argument is treated as a float, and presented as a floating-point number (locale aware).
     * %F - the argument is treated as a float, and presented as a floating-point number (non-locale aware).
     */
    $price = sprintf("%0.2f", $price);
    $parts = explode('.', $price);
    if ($price == -0) {
        $price = 0;
    }
    echo "$parts[0] ,$parts[1] USD";
}


texts: basic product repository save not work in cron - magento2

texts:
I tried the below code in custom controller and cron job method [just load and save] after that I felt some issues

$product = $this->productRepository->getById(548);
$this->productRepository->save($product);

From Controller:

It change the product type from simple to virtual
No issues in product detail page
It removes the product from category page.

From Cron

It change the product type from simple to virtual
product detail page goes to 404 page not found
It removes the product from category page.

Update

I checked the same in Magento 2.1.3

From Cron

It change the product type from simple to virtual
No issues in product detail page
It removes the product from category page.

is there any limitation to use product repository in cron? or did I something wrong?


texts: what should we do if data size greater than post size ?


texts: How I can get new products of the last 30 days in Magento 1.9.


texts: The requested URL could not be retrieved

texts:
I was using my magento setup on my local, but now allaof a sudden it stopped working and I got this error.
Help me out
Thanks in advance


texts: Magento2 : Error: Required parameter 'theme_dir' was not passed

texts:
I had a theme and I deleted it from its folder and when I want to go back to Magento default theme I got this error.
I tried a lot of solutions from other threads but nothing work...

my website front gives me this error:


texts:
During checkout, I get a long list of "€0" for my shipping methods:

However, in the admin panel, I enabled only the fixed shipment option and set it to €5 per order.

I'm using Magento 2.0.8.

Nothing happens when I click the "next" button to proceed to payment.

I have no JS errors, neither I find errors in var/reports.


texts: which is better way to fetch category products?

texts:
I am writing REST api to retrieve category (featured products) which is on homepage. I am using homepage/featured as endpoint. Now in _retrieveCollection() method of v1.php I am using following code.

  $maincategory = Mage::getModel ( 'catalog/category' )->load ( 191 )//cateogy id
                  ->getProductCollection ()
                  ->addAttributeToSelect ( '*' );

Is this a hard coding retrieving categories by their id? we can retrieve like this also

  $category  = Mage::getModel('catalog/category')->getCollection()
             ->addFieldToFilter('name',array('eq'=>'Featured Products'));

  $products = Mage::getModel('catalog/category')->load($category->getFirstItem()
            ->getId())->getProductCollection();

So which is the better way to fetch products from category and why?


texts: How does magento2 create background administrators

texts: The group leader gave me an installed magento2 and told me that I could create an administrator by myself. I am a novice, how should I operate? Thank you


texts: Moving magento page titles to a new place

texts:
I'm working on a magento website and would like to move all titles to another place(See images for an example).

Right now it looks like this

https://puu.sh/x2bGu/4d47221c65.jpg

It must look like this

https://puu.sh/x2buz/36bf62ecf5.jpg

It's need to be done for the following templates. (1column and 2columns-left templates)

How can i place the magento titles to a new block??


texts:
For a couple of days I've spend many hours trying to connect Magento to my Facebook store. After following all the steps provided in the Magento manual I always keep getting the following notification:

Unable to connect, please activate your token.

  Go to the Magento Admin panel and click on System tab.
  In the "Integrations" menu select "Magento Social".
  Next to the Magento social line, click activate.
  Come back to this page and click Refresh

So, I've followed these steps and still it doesn't seem to work.

Another option the screen gives me is the following:

Still unable to connect? Insert the token manually

  Next to the Magento social line, click Reactivate.
  In the opened popup click Reactivate.
  Copy the Consumer Key code line and paste it here, click Send.

However, when I enter the code manually the following message appears:

The customer key you've entered cannot be found, please check code.

I already contacted the Facebook Business customer support, but they tell me they can't help me with it, since it's an Magento issue.

Anyone who knows where it might go wrong? I've seen another topic on here with the same question, but there they only referred to the manual again. I'm 100% sure I followed all the steps, since I've tried it over 15 times and used different manuals.


texts: Override 3rd party extension plugin name in di.xml

texts:
I have two 3rd party extensions, Magedelight_Storepickup and Amasty_Deliverydate, that both have a plugin named "save-in-quote". This is causing conflict and errors.
<type name="Magento\Checkout\Model\ShippingInformationManagement">
    <plugin name="save-in-quote" type="Amasty\Deliverydate\Plugin\Checkout\ShippingInformationManagement"/>
</type>

<type name="Magento\Checkout\Model\ShippingInformationManagement">
    <plugin name="save-in-quote" type="Magedelight\Storepickup\Model\Checkout\ShippingInformationManagementPlugin" sortOrder="10"/>
</type>

I would like to refrain from updating the modules directly. Is it possible to resolve update the name by overriding in my own custom extension, or what would be the best/proper way to resolve this? A custom patch?


texts:
Can't use soap service
When I test soap with this script:

try {
$opts = array(
            'http'=>array(
                'header' => 'Authorization: Bearer token'
            )
        );
$wsdlUrl = 'https://host/soap/default?wsdl=1&services=testModule1AllSoapAndRestV1';
$serviceArgs = array("id"=>1);

$context = stream_context_create($opts);
$soapClient = new SoapClient($wsdlUrl, ['version' => SOAP_1_2, 'stream_context' => $context]);

$soapResponse = $soapClient->testModule1AllSoapAndRestV1Item($serviceArgs);
}
catch (Exception $e) {
    echo $e;
}

I get this error:

SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://host/soap/default?wsdl=1&services=testModule1AllSoapAndRestV1' : failed to load external entity "https://host/soap/default?wsdl=1&services=testModule1AllSoapAndRestV1" in /var/www/vhosts/host/httpdocs/scripts/soaptest.php:12 Stack trace: #0 /var/www/vhosts/host/httpdocs/scripts/soaptest.php(12): SoapClient->SoapClient('https://host...', Array) #1 {main}


texts: Shipping Error. Invalid value in Region ID field

texts:
Just testing my shipping for a logged-in customer on Magento 2.2.5

When I come to the checkout I get the following error.

  Please check the shipping address information. Invalid value of "183" provided for the regionId field.

An address that I previously used is going through fine but this seems to happen when I try to enter a new address. A screenshot is provided

Having tested this it seems that this error occurs when the billing and shipping addresses are in a different country.

I realize that it would be a rare occurrence when the payment method is registered to a different country to a billing address but I wondered if there was any way to get around this for instances where the user is in temporary accommodation (working in another country for example) or is ordering for someone else (for example if someone in Northern Ireland is ordering for an address in the Republic of Ireland then they would technically be in a different country).


texts: Error when trying to add custom attribute programmatically

texts:
I got this error when I try to create a custom attribute for products:

The configuration parameter "formElement" is a required for "instruction" field.

  InstallData.php

<?php
namespace MyVendor\MyModule\Setup;

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{
private $eavSetupFactory;

public function __construct(EavSetupFactory $eavSetupFactory)
{
    $this->eavSetupFactory = $eavSetupFactory;
}

public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
    $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
    $eavSetup->addAttribute(
        \Magento\Catalog\Model\Product::ENTITY,
        'instruction',
        [
            'type' => 'text',
            'backend' => '',
            'frontend' => 'text',
            'label' => 'Installation Manual',
            'input' => '',
            'class' => '',
            'source' => '',
            'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
            'visible' => true,
            'required' => false,
            'user_defined' => false,
            'default' => '',
            'searchable' => false,
            'filterable' => false,
            'comparable' => false,
            'visible_on_front' => false,
            'used_in_product_listing' => true,
            'unique' => false,
            'apply_to' => 'simple,configurable,virtual,bundle,downloadable,grouped',
            'group'=> 'General'
        ]
    );
}
}

I'm using magento 2.1.8.
I read that I have to change the frontend_input in the eav_attribute table in the database, but I don't want to add it manually, and I don't know what do I have to add there.

How can I add this attribute at the setup?

Thanks


texts: Magento 2 - good practice to use/avoid magic getters?

texts:
Magic getters on Varien_Object (M1) and DataObject (M2) are common practice, but with Magento 2 it feels wrong to use it.

Good:

easy to read/write

Bad

It causes problems when using digits in keys (see: Magento 2: different way get field of a collection or Get Custom Product attribute using camel case)
code analyzation tools complain about non-existing methods

Question

With Magento 2 we have two new methods:

getDataByKey($key)
getDataByPath($path)

Is there any good reason to still use getData($key) or any magic getters?

Edit:

@Vinai thanks. I did not mention the @method method, because my approach was quite different.

It only helps the IDE, but has no impact on other things.

There are several mergedf PRs on that are "micro-optimizations" like casting to (int) instead of intval() or get array size outside loops (even for small arrays).

At the other hand there are

magical getters, that have some "overhead" as Marius described ....

strtolower(trim(preg_replace('/([A-Z]|[0-9]+)/', "_$1", $name), '_'));

getData($key) mehtods also have to 2-3 additional checks ...

if ('' === $key) {
if (strpos($key, '/')) {
if ($index !== null) {

For own code a totally agree to prefer real methods, but in same cases it's not possibly ... e.g. you've created a custom event ...

$value = $observer->getVar_1();
$value = $observer->getData('var_1');
$value = $observer->getDataByKey('var_1');

Using 3rd with /** @var some $value */ seem best to me. (?)


texts: Magento 2.3.4 Product List Grid not rendering HTML Character Entities of Product Name

texts: In Magento 2.3.4 Product List Grid,Product Name with  HTML Character Entities not showing properly . HTML Character Entities rendered as  its character reference.


texts: Custom page showing 500 error in Magento 2

texts:
I have created a custom page when clicking on a button this page should be displayed, but its showing HTTP ERROR 500.

Here is the xml file in frontend/layout/rma_customer_createrequest.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left"  xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="customer_account"/>
    <body>
       <referenceContainer name="content">
      <block class="Company\Vendor\Block\Customer\ListReturns" name="customer.rma.create.request" template="Company_Vendor::customer/rma/createrequest.phtml" cacheable="false"/>
      </referenceContainer>
    </body>
</page>

Accordingly I have created a controller Company/Vendor/Controller/Customer/CreateRequest

public function execute()
{
    $resultPage = $this->resultPageFactory->create();
    $resultPage->getConfig()->getTitle()->prepend(__('New Manage Page'));
   return $resultPage;
 }


texts: Magento 2: Adding a template file before the page footer (invalid template file error)

texts:
I am trying to add a template file above my footer to show a subscribe form.

In my template I have created a file app/design/frontend/<vendor>/<theme>/Magento_Theme/layout/default.xml. Here's the contents:

                <block class="Magento\Framework\View\Element\Template"
                    name="prefooter.subscribe"
                    template="Magento_Theme::footer-subscribe.phtml" />

                <block class="Magento\Cms\Block\Block" name="ofihudui">
                  <action method="setTitle"><argument name="title" xsi:type="string">TEST</argument></action>
                  <action method="setBlockId"><argument name="block_id" xsi:type="string">test</argument></action>
                </block>

            </container>
        </referenceContainer>

</page>

I have also created the file app/design/frontend/<vendor>/<theme>/Magento_Theme/template/footer-subscribe.phtml and here's the contents:

test

The page will show the second block fine, but when I try to add the prefooter.subscribe block Magento gives me this error:

1 exception(s):
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'Magento_Theme::footer-subscribe.phtml' in module: '' block's name: 'prefooter.subscribe'

Is it because I have the file in the wrong place? I'm not sure what to do here, it seems like it should work to me.


texts: Magento 2 Sample Data installation Error

texts:
After bin/magento sampledata:deploy;

i m trying to do  bin/magento  setup:upgrade; Following error thrown.

Unable to apply data patch Magento\GroupedProductSampleData\Setup\Patch\Data\InstallGroupedProductSampleData for module Magento_GroupedProductSampleData. Original exception message: Rolled back transaction has not been completed correctly.

Magento Version is 2.3.4


texts: Magento 2: How to optimize the execution of the CLI?

texts:
I run the command php bin/magento many times a day, so I'd like to know if I can optimize the execution of this one?

For example:

php bin/magento cache:flush


texts: Create discount rule to give rounded discount

texts: We are a mail order fashion retailer and often send catalogues with rounded discount prices. I want to create a shopping basket rule which gives rounded discount. For eg. style A costs £199 and discount is 25%. Now instead of final price £149.25, I want £149 at the checkout (and not just truncate/hide the decimals but actually charge £149 to customer).


texts: Disable free shipping with Catalog Price Rule

texts:
we use magento 1.8.1CE

People now get Free shipping over 49,95 (with free shipping shipment method)

But we want to disable this when a product gets a special price (defined by a catalog price rule).

But when they have a mixed cart ....
With some Sale items and some Not-Sale items, and the none sale items get over the 49,95 the free shipping is applied.

What i would like to have ...
Is that the free shipping is only being calculated with non-sale items.

Can this be done in magento?


texts: How to change when the 'low stock' message appears

texts: I'm currently adding products to a new Magento website. We only stock small many items. When I put 3 or less items in the product inventory (manage products) the Low Stock message show on the item image at the front end. How can I stop this?


texts: Cant continue past shipping when in Checkout

texts:
I have a super weird issue. MY shipping just started giving an error out of the blue, I'm not sure if this is a result of updating to magento 1.8 whcih could have configured some files that I edited previously.

Anyways basically whats happening is everything works fine up to the Shipping section of the checkout point, if I use developer tools and remove the dispaly :none css code on the next section I can acess this and all works ok, it just seems to be getting stuck at the shipping - I cant see any errors on cpanel logs or anything.

What could be wrong ?

I've used google developer tools - pressed SHIFT+CTRL+J to open the console and getting these errors


texts:
This has to do with coming up with php for the google trusted store badge - specifically setting the estimated delivery date.

I have this code on my success page that prints the data:

<?php
$order_items = $order->getAllItems();

foreach($order_items as $item) {
    $product = Mage::getModel('catalog/product')->load($item->getProductId());

    echo $product->getAttributeText('estdelivery'); //changed getAttributeText to getData
    echo '|';
}

 ?>

if there is more than one item in the order it will print the attribute data - in this case 6 and 7

as one item has 6 days set in the attribute the other item has 7 days set in the attribute

I need a way in php to only print the higher number i.e. 7

the code i am currently using in the badge is

<?php echo $deliveryDate=Date('Y-m-d', strtotime("+7 days")); ?>

But I need it to find all the delivery date attributes of all the items and enter the larger number into that code for delivery date

updated so I am using this and it successfully returns the higher of the variables

<?php
$order_items = $order->getAllItems();

foreach($order_items as $item) {
    $product = Mage::getModel('catalog/product')->load($item->getProductId());

}

$a=array($product->getAttributeText('estdelivery'));
$c=0;
foreach($a as $b)
{
if($b>$c)
$c=$b;

}
echo $c;

 ?>

So how do i got from that to the code I am using for estimated delivery date?? will this work below?

<?php echo $deliveryDate=Date('Y-m-d', strtotime("$order_items = $order->getAllItems();

foreach($order_items as $item) {
    $product = Mage::getModel('catalog/product')->load($item->getProductId());

}

$a=array($product->getAttributeText('estdelivery'));
$c=0;
foreach($a as $b)
{
if($b>$c)
$c=$b;

}
echo $c;
 days")); ?>


texts: Magento 2: How to Set Bulk Product Position in Category?

texts:
I'm using Magento 2 CE Version 2.1.2

We are only able to set product position within Category by going to Admin -> Products -> Categories -> Products in Category Tab.

I have 5000 SKU's which are assigned to different Categories. If do one by one then is gonna take a long time.

Not able to find in Import/Export Product CSV this field.

I have CSV file which contains SKU's & Position. Lastly, I have to with Script.

What is the best way to achieve this?


texts: Show price including VAT in registered customer's shopping cart in Admin page

texts: I have set 20% VAT with catalog prices -> Including VAT and Shipping Prices-> Including VAT and VAT is working fine. In Admin side, Customers->Manage Customers->Shopping Cart Tab, the price and total shows excluding VAT. I want to show the price and total including VAT. In all other areas price is shown correct except in admin shopping cart. Please help. I have attached some screenshots. In the admin shopping cart it shows, 104.17 instead of 125. I need to show 125 there.


texts: How to get value from sales_flat_order_item table using quote_item_id?

texts:
Using the sales_order_place_after event in my custom Observer.
I have the quote_item_id value (example 324).
How to get the corresponding item_id value from the sales_flat_order_item table?

I am able to successfully use getCollection method, but it returns the order item as an array.
($sales_order_item_id in below example)

How to get the string value? Eg 224 in example table
(in an efficient manner)

class Custom_Model_Observer {
 public function booking(Varien_Event_Observer $observer) {
    $OrderId = $observer->getEvent()->getOrder()->getId(); //order entity id
    $QuoteObject = Mage::getSingleton('checkout/session')->getQuote(); //quote object

    foreach ($QuoteObject->getAllVisibleItems() as $item) {

      //get the quote item id - in example $quote_itemId = 324
      $quote_itemId = $item->getData('item_id');

      //get data from sales_flat_order_item table
      $sales_order_item_id = Mage::getModel('sales/order_item')
       ->getCollection()
       ->addFieldToFilter('quote_item_id', $quote_itemId)
       ->getData('item_id');
     //do more stuff here

    }
  }
}

Example sales_flat_order_item table:


texts: Which files under Magento webroot should be executable?

texts:
Security best practices suggest that you should never have an executable in a public web directory. However, in a typical Magento install (in my very limited experience), this is not true.

Even in production, it seems bin/magento needs to remain executable. Are there other files that need to be executable?

Our setup is a Magento 2.3.3 store running on a dedicated (not shared) host. We have full root access and can create any users, groups and file permissions needed. We also have a filesystem that supports ACL's.

The site is under active development at this time.

Here are the executables under the Magento webroot. How many of these should we keep now? How many are needed in production?

find . -type f -executable
./vendor/magento/magento-composer-installer/run_phpcs.sh
./vendor/magento/zendframework1/bin/zf.bat
./vendor/magento/zendframework1/bin/zf.sh
./vendor/magento/magento2-functional-testing-framework/bin/all-checks
./vendor/magento/magento2-functional-testing-framework/bin/copyright-check
./vendor/magento/magento2-functional-testing-framework/bin/mftf
./vendor/magento/magento2-functional-testing-framework/bin/phpunit-checks
./vendor/magento/magento2-functional-testing-framework/bin/static-checks
./vendor/composer/composer/bin/compile
./vendor/composer/composer/bin/composer
./vendor/seld/jsonlint/bin/jsonlint
./vendor/justinrainbow/json-schema/bin/validate-json
./vendor/wikimedia/less.php/bin/lessc
./vendor/paragonie/random_compat/build-phar.sh
./vendor/yubico/u2flib-server/do-source-release.sh
./vendor/yubico/u2flib-server/examples/cli/u2f-server.phps
./vendor/elasticsearch/elasticsearch/travis/download_and_run_es.sh
./vendor/elasticsearch/elasticsearch/travis/generate_docs.sh
./vendor/elasticsearch/elasticsearch/travis/run_es_docker.sh
./vendor/braintree/braintree_php/ci.sh
./vendor/tubalmartin/cssmin/cssmin
./vendor/tubalmartin/cssmin/tests/bin/runner
./vendor/squizlabs/php_codesniffer/bin/phpcbf
./vendor/squizlabs/php_codesniffer/bin/phpcs
./vendor/squizlabs/php_codesniffer/bin/phpcs.bat
./vendor/grasmash/yaml-expander/scenarios/install
./vendor/consolidation/self-update/scripts/release
./vendor/sebastian/phpcpd/phpcpd
./vendor/phpunit/phpunit/phpunit
./vendor/codeception/codeception/codecept
./vendor/behat/gherkin/bin/update_i18n
./vendor/friendsofphp/php-cs-fixer/dev-tools/bin-download.sh
./vendor/friendsofphp/php-cs-fixer/dev-tools/build.sh
./vendor/friendsofphp/php-cs-fixer/dev-tools/check-shell-scripts.sh
./vendor/friendsofphp/php-cs-fixer/dev-tools/trigger-website.sh
./vendor/friendsofphp/php-cs-fixer/php-cs-fixer
./vendor/pdepend/pdepend/scripts/compare.sh
./vendor/pdepend/pdepend/src/bin/pdepend
./vendor/phpmd/phpmd/src/bin/phpmd
./bin/magento


texts:
I am overriding the default Magento2 model file Product.php in my custom module and for my custom API creation. In my custom API call data is coming from default Magento2 Product.php file rather than my custom module file.
My di.xml file:

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Test\Test\Api\ProductRepositoryInterface" type="Test\Test\Model\ProductRepository"/>
    <preference for="Test\Test\Api\Data\ProductSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
    <preference for="Magento\Catalog\Model\Product" type="Test\Test\Model\Product"/>
    <preference for="Test\Test\Api\Data\ProductInterface" type="Test\Test\Model\Product"/>
</config>

Default Product.php file using with name space changes in my custom module


texts: Magento2: Update Qty of product in bundle

texts:
I am updating the quantity of a radio button in a bundle via jQuery: $ ('input. Qty'). Val (4)

Unfortunately the product summary does not change. When I put the value ("4") in the same input field and go with "TAB" to the next element in the product summary is changing.

I guess there is a function I could use to dynamically recalculate the product summary as it works in Magento 1. Any idea?


texts: Best practices or tips for modules with multiple websites/stores/views

texts:
I haven't really seen this topic covered much, but I was wondering what are some things that need to be taken into account when implementing modules when the Magento setup is using multiple websitess.

Some things I'm hoping someone can cover in addition to anything else they think would be good to know.

What is the best way to ensure a module is only activated per website?
When dealing with entities such as customers, products, and orders, what would I need to do differently than if I was only working with one website?

Thanks!


texts:
I am trying to implement after plugin to the following method.

public function getCategoryUrl($category)
{
    if ($category instanceof ModelCategory) {
        return $category->getUrl();
    }
    return $this->_categoryFactory->create()->setData($category->getData())->getUrl();
}

Please note the $category parameter passed to the above method.

As the resolution, I have implemented below code.

public function afterGetCategoryUrl(\Magento\Catalog\Helper\Category $subject, $result)
{
    return $result;
}

Now, my question is: How do I get the $category parameter passed in parent method to my plugin? I just want to modify result based on the certain value in $category object.


texts: Magento 2 migration Tool: does PRODUCTS model support DELTA (incremental)?

texts:
when browsing and reading guides it looks like Customers + Orders support incremental data migration (delta: the newly added items) .... bu I also read that this is supported for products : but is this really so?

Somehow it seems it was the plan to support Products Delta migration .... but it never made it through?

Using Magento 2.3.1 : does the 2.3.1 Data Migration Tool support incremental migration for Products?

thx


texts: Magento 2: How to submit custom html content from ui_form to controller?

texts:
I am developing a module using ui_form. I have developed ui_form and on submit it post all fields except custom html fields.

For example:

<container name="pl_labelposition" >
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="sortOrder" xsi:type="number">30</item>
                <item name="label" xsi:type="string" translate="true">Label Position</item>
            </item>
        </argument>
        <htmlContent name="html_content">
            <argument name="block" xsi:type="object">Company\Module\Block\Adminhtml\ProductLabel\Edit\LabelPosition</argument>
        </htmlContent>
    </container>

I also use conditions  of sales rules:

        <container name="conditions_apply_to" >
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="sortOrder" xsi:type="number">10</item>

            </item>
        </argument>
        <htmlContent name="html_content">
            <argument name="block" xsi:type="object">Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Conditions</argument>
        </htmlContent>
    </container>

Could you help me to resolve this problem? I am not able to submit such fields to controller. How can i use in controller?

Help will be appreciated

Thank You in Advance


texts: addCategoryFilter() not working or working wrong

texts:
I want the top sellers from magento store. I become the bestseller but when I want to using a category i get nothing. Here is my code I use:

$category = Mage::getModel('catalog/category')->setId($cat_id);
        $_productCollection = Mage::getResourceModel('reports/product_collection')
                ->addAttributeToSelect('*')
                ->setStoreId($storeId)
                ->addStoreFilter($storeId)
                ->addOrderedQty()
                ->addCategoryFilter($category)
                ->addAttributeToFilter('visibility', $visibility)
                ->setOrder('ordered_qty', 'desc')
                ->setPageSize($productCount)->load();
        Mage::getSingleton('catalog/product_status')
                ->addVisibleFilterToCollection($_productCollection);
        Mage::getSingleton('catalog/product_visibility')
                ->addVisibleInCatalogFilterToCollection($_productCollection);

I didn't find the error in this code. Hope you can help me.


texts: Distinguish Offline payment methods in Magento

texts: How can I distinguish which are offline payment methods and online payment methods in Magento?


texts:
In my custom theme I have placed a cms block in a .phtml file like this:

<div class="data item content" id="footer-impressum-tab" data-role="content">
    <?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('footer_impressum')->toHtml();?>
</div>

How can I get the CMS block title in Magento 2?

In magento 1.x I was using the following code:

$blockid = 'my-block-id';
$block = Mage::getModel('cms/block')->load($blockid);
echo $block->getTitle();


texts: Magento 2 search by keywords does not works in grid

texts:
In ui_component XML config file, there is a node <filterSearch name="fulltext"> to control the search box positioned in listingToolbar. But seem this full-text search function doesn't work. Does it require a MyISAM table in order to use this function?

I'm looking for an explanation of how to use it. Thanks!


texts: Why are prices rounded in magento 2.3 administration?

texts:
I have a product that on the website has a price of 15.5 USD but when I go to consult it in the sales reports the price of that product is rounded up to 16USD.
Can someone help me so that the prices are not rounded in the administrator, thank you very much !


texts: How to integrate RabbitMQ with Magento 2.2.* EE

texts:
The way of setting up magento queues in M2 EE 2.2.* is different from how it used to be in version prior to 2.2.*. The queue.xml is deprecated and there are 3 new configuration files queue_consumer.xml, queue_publisher.xml and queue_topology.xml.

I've worked on a project to integrate AWS S3 Buckets with Magento. This task uses various cool technologies one of them is RabbitMQ.

So below is an answer which might or might not save some time on setting up message queues in Magento 2.2.*


texts: Setting additional options for configurable product in Quote Item [Solved]

texts:
I am trying to add the option 'additional_options' to a quote item representing a configurable after I add it to the cart.

$newItem = $quoteItem->getQuote()->addProduct($product,$productOptions);
$newItem->addOption('code'=> 'additional_options', 'product_id'=> $product->getId(), 'value'=> $value);
$newItem->addOption(array('code' => 'my_custom_data', 'value' => serialize($myCustomData)));
$newItem->setCustomPrice(0)->setOriginalCustomPrice(0);

This is working perfectly with a simple product but on a configurable none of the additional_options show up in the cart and the price remains unmodified.

I checked the sales_flat_quote_item_options and the new configurable product does not have the additional_options entry, but the simple products do. The my_custom_data option is saved and usable in the cart just not the additional_options.

It seems like the quote is purposefully ignoring the changes to the configurable product. I have attempted to set this information on both the parent item and the child item, but getting the child item before the quote is saved seems to be unreliable since the $newItem->getChildren() always returns an empty and there are no Id's set yet.

Is there another way to set this information for configurable products or is this just some more of Magento's magical repeated code that was overlooked during an update?

----- Edit - Solved --------

I solved the problem with the following:

$newItem = $quoteItem->getQuote()->addProduct($product,$productOptions)->getParentItem();

Looks like adding a configurable product to the quote actually returns the child and not the visual product. This seems a little bit unexpected since you supply the options for the parent product but get the derived product in return. Although this does fix all of my issues.


texts: Assign multiple role to single user in magento

texts:
I am working on System->Permissions->users part. I have a user who can work on three roles like Administrator,Retailer as well as Merchant. How should I will able to assign multiple roles to single user?
I was thinking to change radio button to checkbox but it will just like patchwork.Thanks.


texts: I have a link in my static-block that says "subscribe". When users click that (and ONLY when they click that), I want a pop-up box to appear on the page that allows them to enter their email address to sign up to the newsletter, etc. Is this possible and what would be the best way to achieve this?


texts: Rewrite Credit Memo API in Magento CE 1.9

texts:
I am trying to rewrite the model sales_order_credit_memo_api with my own "info" function.
I have created all the files yet when I access the API call "order_creditmemo.info" it uses the base Mage model, instead of using the class defined in my rewrite.

I have successfully rewritten other models, but I cannot get this one to work.
Does anyone know what I'm doing wrong?

With all the coding shown below in place if I use the magerun.phar tool and run this command magerun.phar dev:class:lookup model sales/order_creditmemo_api it results in Model sales/order_creditmemo_api resolves to Kane_MultiDiscountAPI_Model_Order_Creditmemo_Api which should mean everything is working.

The file that contains the class I'm trying to rewrite is: app/code/Mage/Sales/Model/Order/Creditmemo/Api.php

FILES IN MY EXTENSION:

app/etc/modules/Kane_MultiDiscountAPI.xml

<?xml version="1.0" encoding="UTF-8"?>
 <config>
    <modules>
        <Kane_MultiDiscountAPI>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Sales />
            </depends>
        </Kane_MultiDiscountAPI>
    </modules>
</config>

app/code/local/Kane/MultiDiscountAPI/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Kane_MultiDiscountAPI>
            <version>0.1.0</version>
        </Kane_MultiDiscountAPI>
    </modules>
    <global>
        <models>
            <sales>
                <rewrite>
                    <order_api>Kane_MultiDiscountAPI_Model_Order_Api</order_api>
                    <order_creditmemo_api>Kane_MultiDiscountAPI_Model_Order_Creditmemo_Api</order_creditmemo_api>
                </rewrite>
            </sales>
        </models>
    </global>
</config>

app/code/local/Kane/MultiDiscountAPI/Model/Order/Creditmemo/Api.php

class Kane_MultiDiscountAPI_Model_Order_Creditmemo_Api extends Mage_Sales_Model_Order_Creditmemo_Api
{
    public function info($creditmemoIncrementId)
    {
        $result = parent::info($creditmemoIncrementId);
        // Extended logic
        return $result;
    }
}


texts: Magento 2: How override native crontab.xml

texts:
I would like to override some cron jobs of native crontab.xml

for example,

  vendor/amzn/amazon-pay-and-login-magento-2-module/src/Payment/etc/crontab.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="default">
        <job name="get_amazon_capture_updates" instance="Amazon\Payment\Cron\GetAmazonCaptureUpdates" method="execute">
            <schedule>*/5 * * * *</schedule>
        </job>
        <job name="get_amazon_authorization_updates" instance="Amazon\Payment\Cron\GetAmazonAuthorizationUpdates" method="execute">
            <schedule>*/5 * * * *</schedule>
        </job>
        <job name="amazon_payments_process_queued_refunds" instance="Amazon\Payment\Cron\ProcessAmazonRefunds" method="execute">
            <schedule>*/5 * * * *</schedule>
        </job>
    </group>
</config>

I've created a very simple extension here

  app/code/CustomVendor/Cron/

with file

  app/code/CustomVendor/Cron/etc/crontab.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="default">

        <job name="get_amazon_capture_updates" instance="Amazon\Payment\Cron\GetAmazonCaptureUpdates" method="execute">
            <schedule>0 1 * * 1</schedule>
        </job>
        <job name="get_amazon_authorization_updates" instance="Amazon\Payment\Cron\GetAmazonAuthorizationUpdates" method="execute">
            <schedule>0 1 * * 1</schedule>
        </job>
        <job name="amazon_payments_process_queued_refunds" instance="Amazon\Payment\Cron\ProcessAmazonRefunds" method="execute">
            <schedule>0 1 * * 1</schedule>
        </job>

        <job name="magento_newrelicreporting_cron" instance="Magento\NewRelicReporting\Model\Cron" method="runCron">
            <schedule>0 2 * * 1</schedule>
        </job>

    </group>
</config>

I ran the commands:

  php bin/magento setup:upgrade

  php bin/magento cron:run

  php bin/magento setup:cron:run

Checked cron_schedule table. As I see it does not help.

What I did wrong. Please help.


texts: How to access Magento 2 soap api from C#

texts:
I would like to know (a sample code if it is not too much to ask for) how to talk to Magento 2's SOAP API from C# using Webservice (not service reference). With Magento 1.x versions I used something like

static MagentoWebService.MagentoService MyService = new MagentoWebService.MagentoService();

static string Login = MyService.login(Config.Login, Config.Password);

where as login being,

    public string login(string username, string apiKey)
    {
        object[] results = this.Invoke("login", new object[] {
                    username,
                    apiKey});
        return ((string)(results[0]));
    }

How do I do the same/similar one with Magento 2. I have seen few example given in PHP. However, I am struggling to convert that in to C# or understand properly. Could someone please help with this.

So far in my new code I tried this:

catalogProductRepositoryV1Service productservice = new catalogProductRepositoryV1Service();
        CatalogProductRepositoryV1GetResponse response = new CatalogProductRepositoryV1GetResponse();
        CatalogProductRepositoryV1GetRequest request = new CatalogProductRepositoryV1GetRequest();
        request.sku = "WJ01";
        response = productservice.catalogProductRepositoryV1Get(request);
        Console.WriteLine(response.result.id.ToString());

But it wont work, since I haven't logged in to the SOAP service yet.


texts: Magent2 Modal Widget - change width and height

texts:
I am interesting in all the options that are available for the Magento Ui  modal popup widget. Like:

var options = {
 type: 'popup',
 responsive: false,
 innerScroll: false,
 ......
}

Mainly for the size of the popup itself. I tried a couple of options like

size: 'sm'

as well as

width: 400,
height: 400

but nothing works. Is there documentation for the possible options you can pass to the modal widget?


texts: Disallow sell of a simple product but allow that product to be sell in bundled product

texts:
I have simple product with SKU say: SKU01 and SKU02

And I have a bundled product with its own SKU say: SKUB01,

This SKUB01 have bundled items consist of two simple SKU: SKU01 and SKU02,

The question is:
I want to disable the selling of SKU01 meanwhile still be able to sell the bundled product SKUB01,

How to do that in Magento v1.9.8?


texts: unable to serialize value string is corrupted in magento2 (update command not working )

texts:
Hi i am trying to run upgrade command but it is giving me this error and due to this error my admin panel and front end both are showing error to run upgrade command, whenever i run this command :

php bin/magento setup:upgrade

it gives me error on cmd :

Although i am in developer mode and already run di:compile command many times along with cleaning cache,
can anyone guide me please what's creating issue and quick solution to fix it ,Thanks.

----------------edit --------------

i have pasted following code in json.php

public function unserialize($string)
{
    if($this->serialize($string))
    {
        $string = $this->serialize($string);
    }
    $result = json_decode($string, true);
    if (json_last_error() !== JSON_ERROR_NONE) {
         throw new \InvalidArgumentException('Unable to unserialize value.');

    }
    return $result;
}

public function serialize($value, &$result = null)
{
    // Bit of a give away this one
    if (!is_string($value))
    {
        return false;
    }
    // Serialized false, return true. unserialize() returns false on an
    // invalid string or it could return false if the string is serialized
    // false, eliminate that possibility.
    if ($value === 'b:0;')
    {
        $result = false;
        return true;
    }
    $length = strlen($value);
    $end    = '';
    switch ($value[0])
    {
        case 's':
            if ($value[$length - 2] !== '"')
            {
                return false;
            }
        case 'b':
        case 'i':
        case 'd':
            // This looks odd but it is quicker than isset()ing
            $end .= ';';
        case 'a':
        case 'O':
            $end .= '}';
            if ($value[1] !== ':')
            {
                return false;
            }
            switch ($value[2])
            {
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                case 8:
                case 9:
                    break;
                default:
                    return false;
            }
        case 'N':
            $end .= ';';
            if ($value[$length - 1] !== $end[0])
            {
                return false;
            }
            break;
        default:
            return false;
    }
    if (($result = @unserialize($value)) === false)
    {
        $result = null;
        return false;
    }
    return true;
}

i search it on internet its because of older version issue , i am currently using 2.2.0 magento version. but still getting another error


texts: Use imagick within Magento2 Custom controller

texts:
I have a beginners question.. I've built a custom module. I want to use Imagick for image manipulation from within the controller.

Imagick is properly installed on my server and works like charm from a normal .php file.

In my Controller I have

namespace <vendor>\<moduleName>\Controller\Index;

When trying to use Imagick

$image = new Imagick($imageFname);

I get an error:

  Fatal error: Uncaught Error: Class
  '\\Controller\Index\Imagick' not found.

Obviously it looks for Imagick in the wrong place because of the namespace, but I don't know how to solve it.

Any ideas?


texts: New products don't get Salable Quantity update until reindexed manually

texts:
I have an issue with my Magento 2.3.2 store where a new product, after it is created, never gets Salable Quantity updated until we manually go in and reindex at the command line. It stays at Default Stock:0 (thus not sellable) no matter what changes we make to stock status / quantities, but then it is corrected when we index at the command line and clear the cache. This is a big inconvenience for us because the person making the products is not the same person who would log into the server to manually update the index.

Other facts:

On a development box with a copy of the same database I do not have this issue (new products get Salable Quantity just fine).
I can see that the indexer runs once a minute and has no hang-ups.
Once bin/magento indexer:reindex is run manually, the Default Stock value properly updates.
I do have a view inventory_stock_1 that seems properly created. In fact my issue seems to be that an entry into cataloginventory_stock_status never gets inserted on product creation or update.

I know this has been answered similarly in other places but mine seems to be different, specifically that it's only new products and that it does work it just needs to be done manually.

Any help would be appreciated.


texts: What does 'cataloginventory/item_options/' means?

texts:
What does 'cataloginventory/item_options/' means in Mage_CatalogInventory_Model_Stock_Item class?

could you please explain briefly?


texts: Assign associated products and attributes to configurable products via soap v2 api

texts:
I have created the simple and configurable products by soap v2 api.
But I can't able to assign the associated products and attributes to the configurable products. I tried the below code,

$proxy = new SoapClient('http://localhost/magento/api/v2_soap/?wsdl');
$session = $proxy->login('******', '********');

$attributeSets = $proxy->catalogProductAttributeSetList($session);
$attributeSet = current($attributeSets);
    $productData = array(
                'name'=>'Configurable Product',
                'description'=>'Configurable Product',
                'short_description'=>'Configurable Product',
                'website_ids'=>array('base'),
                'categories'=>array(2),
                'status'=>1,
                'visibility'=>4,
                'tax_class_id'=>0,
                'weight'=>0,
                'stock_data'=>array(
                    'qty'=>10000,
                    'is_in_stock'=>1,
                ),
                'associated_skus' => array('V - Neck'),
                'additional_attributes' => array(
                    'single_data' => array(
                        array(
                            'key'   => 'color',
                            'value' => 5,
                        ),
                    ),
                ),
                'price'=>10,
        );
        $proxy->catalogProductCreate($session,'configurable',$attributeSet->set_id,'Configurable Product 23',$productData);


texts: What is the difference of stock_status and is_in_stock in stockItem object?

texts:
code:

        $inventory = "http://example.com/index.php/rest/V1/stockStatuses/".$products_object->sku;
        $ch1 = curl_init($inventory);
        curl_setopt($ch1, CURLOPT_CUSTOMREQUEST, "GET");
        curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch1, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));
        $stock_item = json_decode(curl_exec($ch1));

debug:

    object(stdClass)#28 (5) {
    ["product_id"]=> int(259)
    ["stock_id"]=> int(1)
    ["qty"]=> int(103)
    ["stock_status"]=> int(0)
    ["stock_item"]=> object(stdClass)#29 (26) {
        ["item_id"]=> int(259)
        ["product_id"]=> int(259)
        ["stock_id"]=> int(1) ["qty"]=> int(103)
        ["is_in_stock"]=> bool(false)
        ["is_qty_decimal"]=> bool(false)
        ["show_default_notification_message"]=> bool(false)
        ["use_config_min_qty"]=> bool(true)
        ["min_qty"]=> int(0)
        ["use_config_min_sale_qty"]=> int(1)
        ["min_sale_qty"]=> int(1)
        ["use_config_max_sale_qty"]=> bool(true)
        ["max_sale_qty"]=> int(10000)
        ["use_config_backorders"]=> bool(true)
        ["backorders"]=> int(0)
        ["use_config_notify_stock_qty"]=> bool(true)
        ["notify_stock_qty"]=> int(1)
        ["use_config_qty_increments"]=> bool(true)
        ["qty_increments"]=> int(0)
        ["use_config_enable_qty_inc"]=> bool(true)
        ["enable_qty_increments"]=> bool(false)
        ["use_config_manage_stock"]=> bool(true)
        ["manage_stock"]=> bool(true)
        ["low_stock_date"]=> NULL
        ["is_decimal_divided"]=> bool(false)
        ["stock_status_changed_auto"]=> int(0)
    }

}

if i want to update a product from "no stock" to a positive interger, which one of them i need to update actually?


texts: Magento 2.2.4 - Order header status is different than detail section

texts: I'm getting a weird error in one of my orders where the header status is processing but order details are all cancel. Can anyone give me a SQL command that I can use to update the table status for the orders tables?


texts: Require.js loads the function (it exists in bundle.js), but console throws "not defined"

texts:
Having an issue with one of the plugins recently installed.
My DEV server and local DEV servers both are working normal, not throwing errors, but PRODUCTION server throws "Uncaught ReferenceError: tmlsOwlCarousel is not defined".
Both PRODUCTION and DEV are running in the PRODUCTION mode. Local DEV runs in DEVELOPMENT mode.
Here is the code that executes it:
require([
'jquery',
 // tried DOM READY, didn't work.
'domReady!',
"Ves_All/lib/owl.carousel/owl.carousel.min",
'Ves_Testimonial/js/testimonial-carousel',
], function ($) {
    $( document ).ready(function() {
    // tried to see if it ever loads the function - it doesnt
    //setInterval(function(){ console.log(typeof tmlsOwlCarousel); }, 1000);

    tmlsOwlCarousel("#testimonial-carousel-10199329431611963779", ".owl-carousel");
        $('#testimonials10199329431611963779 .tmls-readmorelink').click(function() {
            var parent = $(this).parents('.tmls-testimonial');
            $(parent).find('.tmls-excerpttext').hide();
            $(parent).find('.tmls-fulltext').fadeIn('slow');
        });
        $('#testimonials10199329431611963779 .tmls-item').mouseleave(function() {
            $(this).find('.tmls-excerpttext').fadeIn('slow');
            $(this).find('.tmls-fulltext').hide();
        });
    });
});

I have looked inside of the bundle.js file and that function exists and is being loaded.
I also tried onLoad / onReady / domReady and setInterval to see if that function ever loads, but it doesn't.
bundle.js file is about 2MB, so I'm not sure if it's the file size or what is happening here.
Why would it never load if it does exist in the bundle file?
UPDATE:
The function that fails exists in: Ves_Testimonial/js/testimonial-carousel.js file. The file exists in the /static folder and is being loaded into the bundle.js
UPDATE:
requirejs-config.min.js also contains Ves_Testimonial/js/testimonial-carousel.js
(function () {
    var config = {
      map: {
        '*': {
          testimonial_fancybox: 'Ves_Testimonial/js/jquery.fancybox.pack',
          rating: 'Ves_Testimonial/js/rating',
          testimonial_rating: 'Ves_Testimonial/js/testimonial_rating',
          testimonial_carousel: 'Ves_Testimonial/js/testimonial-carousel',
          testimonialtowlcarousel: 'Ves_Testimonial/js/owl.carousel.min'
        }
      },
      shim: {
        'testimonial_carousel': {
          deps: [
            'jquery',
            'Ves_All/lib/owl.carousel/owl.carousel.min'
          ]
        },
        'Ves_Testimonial/js/carouFredSel': {
          deps: [
            'jquery'
          ]
        },
        'Ves_Testimonial/js/testimonial-carousel': {
          deps: [
            'jquery',
            'Ves_All/lib/owl.carousel/owl.carousel.min'
          ]
        },
        'testimonialtowlcarousel': {
          deps: [
            'jquery'
          ]
        }
      }
    };
    require.config(config);
  }) ();


texts:
HI I am trying to change the look of the customer login page.
How do add a line or separator in between this 2 blocks?
like the image I found on net. When in mobile view the line will gone.


texts: How to add custom condition in Action tab in Shopping cart price rule

texts:
I want to add some custom condition in magento shopping cart price rule action tab as shown in figure :

How to add custom date type condition here and apply on cart it on frontend?


texts:
What is the most Optimal Development Workflow using Magento 2.3.5 in 2020?
I've got a Task to create Magento 2 Module.
When i upload the written code to server the page doesn't update the code (CSS for Example).
I've tried:

disabling Cache
using Cache/Flush
changing to Developer Mode
removing generated code

The only way for the Page to take my changes is:
php bin/magento setup:upgrade
php -d memory_limit=-1 bin/magento setup:di:compile
php -d memory_limit=-1 bin/magento setup:static-content:deploy
php bin/magento index:reindex
php bin/magento cache:clean

The Problem is that this way of doing things takes a lot of time.
There must be a better Way of doing this, but i couldn't find the right solution for it.
Any Ideas?


texts: How to add mage_captcha on newsletter form in magento 1.9

texts:
I just want to know how can I add captcha on mage_newsletter on each page of site. Here my .xml code block for view captcha

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


texts: Magento 2.3 EE: Can't able to run installation

texts:
I'm very new to Magento, i have Magento_2.3-EE, I'm using Ubuntu-16.4, I created a virtual host, extract Magento_2.3 folder in it, now when i type and hit URL mg.local, i get blank white page...

Also when i type this command to switch to developer mode sudo php bin/magento deploy:mode:set developer i get this error There are no commands defined in the "deploy:mode" namespace.

Thanks in advance.


texts: Product Page not responsive in mobile (Porto Theme)

texts:
I created a child theme for Porto theme
responsiveness is working on desktop, but not in mobile. can anybody help me? could I be missing the viewport metatag only in product page? I`m a newbie to magento and frontend development.
It actually loads right, but then suddenly it gets full width again. It`s only when I open a product, other pages are resizing in mobile.


texts: Call custom function using events and observer

texts: I need to call our own custom function after save, delete, add products in Magento. I need to call in the separate file that is located in Magento root folder.


texts: adding backorder message to the order email

texts:
I've enabled backorders, and it works as expected - showing a message in the checkout when required.

How can I show the same message in the order email that is sent?

Thanks.


texts:
I`m on Magento 1.9 and have a strange issue.
When I share my wishlist via email, it says; wishlist saved, and below; wishlist empty.

When I open up the email and click the link to the wishlist, it`s also empty.

What gives?


texts: Magento 2 - Display product collections some column using knockout js binding

texts:
I am trying to display product collection using knockout js binding. But not working. Please guide me.

Also in Magento2 is require to manually applyBinding when using component.?

Also please anyone know how to pass data from phtml to js file and bind it with function. Its very difficult structure to implement knockout in Magento2. Can't understand what should we do for even simple render using table with template file.

Here is the code I have implemented.

List PHTML Code.

<?php $_productCollection = $block->getLoadedProductCollection(); ?>
<?php
$jsonData = array(array('Name'=>'chandu','Aje'=>25));
?>

Js File is:

define(['ko', 'uiComponent'], function(ko, Component) {
    'use strict';
    return Component.extend({
        defaults: {
            items: 'hello',
            template: 'Kite_Boxes/productrender'
        },
        initialize: function() {
            this._super();
            this.items = ko.observableArray();
             this.setProductData();
            console.log(this.items);
        },
        setProductData: function() {
         var VM = function () {
         this.columnNames = ko.computed(function () {
              if (this.items().length === 0)
                  return [];
              var props = [];
              var obj = this.items()[0];
              for (var name in obj)
                  props.push(name);
              return props;
          });
      };
      var vm = new VM();
      //ko.applyBindings(vm);
        }
    });
});

HTML Template is:

ERROR is::

  Uncaught TypeError: Cannot read property 'items' of undefined


texts: Magento 2.3 - Get category of item related foreach

texts:
I want to load the category name and category url of the item that is displayed as a related item on the productpage.

So inside the foreach element, I want to load the category name and url of the related item itself.

How can I get the category name of a item in Magento 2.3?

I tried the following that seems to work well, but I do not want to a load a objectManager on frontend, so what is the best way to load this otherwise?

<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->get('Magento\Framework\Registry')->registry('current_product');
$categories = $product->getCategoryIds(); /*will return category ids array*/
foreach($categories as $category){
    $cat = $objectManager->create('Magento\Catalog\Model\Category')->load($category);
    echo $cat->getName();
    }

?>

HTML:

                                    <?php $items = $block->getProductCollection()->getItems();?>
                <?php foreach ($items as $item) : ?>
                    <?= /* @noEscape */ ($iterator++ == 1) ? '' : '</' . $tag . '>' ?><<?= /* @noEscape */ $tag?> class="product-item">

                                <a title="<?= $block->escapeHtml($item->getName()) ?>"
                                   href="<?= $block->escapeUrl($block->getProductUrl($item)) ?>"
                                   class="product-item-link">
                                    <?= $block->escapeHtml($item->getName()) ?>

                            <?= /* @noEscape */ $block->getProductPriceHtml($item, \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE) ?>

                            <?php $CatName = $block->getCategoryCollection();
                                echo '
';print_r($CatName);?>

                <?php endforeach ?>


texts: How to Get Layout Name in which is block is placed

texts:
I have My block

 <block class="Vendor\ModuleName\Block\Frontend\Linked" name="catalog.product.linked" template="Vendor_ModuleName::slide.phtml" />

in this file

  app\code\Vendor\ModuleName\view\layout\catalog_product_view.xml

all i need to do is i want catalog_product_view name in my slide.phtml file


texts: Different language code for Magento 1.9 to Magento 2.3 migarion

texts:
I have a multi store in my magento 1.9 and i successfully migrated to Magento 2.3.4
one of my stores have language code and store code set to zn_HK in my Magento 1.9 , but in Magento 2.3.4 there is no more zn_HK language code for the locale configuration, so i changed it to zh_Hant_HK
then i tried to create a csv for one of the module like this:
app/code/Vendor/Module/i18n/zh_Hant_HK.csv
"original","翻譯"

but when i switch the store, the language didn't change
and when i change to production mode i got this error:
zh_HK argument has invalid value, run info:language:list for list of available locales

should i change my store code to zh_Hant_HK or did i miss something else?


texts:
How can I get the same product from two different categories on the same URL?
Like, I have two categories 1. Men, 2. Women.
And Also i have one Product 1. testdev.

Now i want the same URL for this product for two different categories when men product quantity is zero then get a product from women category but URL same.

like, http://domainexample.in/men/testdev.html
and manage stock automatically from men category to women


texts: Error after enable the use_flat_Catalog_category option in admin catalog,

texts:
After enable the use_flat_Catalog_category option in admin catalog , and i did reindex, then catalog_category_flat_store_1 table was create.

And then when i try to launch the store, it's show below SQL error

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'main_table.thumbnail' in 'field list', query was: SELECT `main_table`.`entity_id`, `main_table`.`level`, `main_table`.`path`, `main_table`.`position`, `main_table`.`is_active`, `main_table`.`is_anchor`, `main_table`.`name`, `main_table`.`url_key`, `main_table`.`thumbnail`, `main_table`.`cattop_thumb` FROM `tt_catalog_category_flat_store_1` AS `main_table` WHERE (is_active = '1') AND (catslider = '1') ORDER BY name ASC

because catalog flat table does not have thumbnail column.

And i understand that catalog_flat_table column are created based on below sql query

SELECT `tt_eav_attribute`.* FROM `tt_eav_entity_type` INNER JOIN `tt_eav_attribute` ON tt_eav_attribute.entity_type_id = tt_eav_entity_type.entity_type_id WHERE  (tt_eav_entity_type.entity_type_code = 'catalog_category')

even this query also does not have attribute name like 'thumbnail'


texts: Can any conditional operators be used with an element while defining a multidimensional array?

texts:
While building a multi-dimensional array as shown below, I need to use a loop to retrieve some value from $this_fulfillment_record to be assigned to "amount" =>. Can a if statement be used while defining the array "[trackingInfo]" => array( If so, please show me an example.
    // Array to be built to match JSON structure.
    $fulfillment_array['orderShipment']['orderLines']['orderLine'] = [];

    foreach ($fulfillment_records as $this_fulfillment_record) {
        // Assemble the fulfillment array for Walmart.
        $fulfillment_array['orderShipment']['orderLines']['orderLine'][] = array
        [trackingInfo] => Array(
                           [shipDateTime] => 1580821866000
                           [carrierName] => Array(

                                               otherCarrier] =>
                                                [carrier] => FedeX
                                            )
                                        [methodCode] => Standard
                                        [trackingNumber] => 22344
                                        // Can if statment be used like this?
                                        if ($this_fulfillment_record['carrier'] == "FedeX") {
                                            [trackingURL] => http://walmart/tracking/ups?&type=MP&seller_id=12345&promise_date=03/02/2020&dzip=92840&tracking_numbers=92345
                                        } else {
                                            [trackingURL] => =""
                                        }

                            )


texts: order and Invoice tab is missing under sales tab magento 1.9

texts:
if I hit this URL I got all my order but order tab is missing

http://www.website.com/index.php/admin0_tara/sales_order/index/key/6b72aec96dd9dbb2bd2121471a238316/

1) From which file these tabs are created or what will be the issues that make it hidden.

Any help.

Thanks In advance.

Update: I used my backup to overcome this issue , because I tried my best to solve the issue and find exact cause , but failed each time .


texts: Update Grand Total based on Discount/Points

texts:
I am using magento 1.9.3.3 version.
I have Customised Reward Points Extension.

In that i need to update Checkout cart Grand Total price while updating the cart based on Discount/Offer applied.(Attached Screenshot).

I used observer sales_quote_save_after with following code:

$quote = Mage::getModel('checkout/session')->getQuote();
$quote->collectTotals()->save();

But site is not working after this code inserted.

How to solve it.


texts: Product Gallery And Image Types Confusion (Thumbnail, Base, Small) all in gallery

texts: There are three images on my product (all different sizes of the same image) one used for base, one for thumbnail, one for large - why are all three showing up in the product gallery?


texts: Magento2 : Custom Sales Rule condition and validation

texts:
I am using this article to create custom condition in cart rule where I want to add the stock qty including other product attributes in rule condition.

For example
if product_attribute1 = Adidas and product_qty >= 100 apply the rule on that product.

I am able to add condition successfully, but when I try to validate rule with product qty. I am facing some issue.

When I debug the code and find that there is wrong class attached in $model

echo get_class($model);

result: Magento\Quote\Model\Quote\Address

I have changed Customer (Magently\CustomerRule\Model\Rule\Condition\Customer) class to Product (Magently\CustomerRule\Model\Rule\Condition\Product) class, but still it showing Magento\Quote\Model\Quote\Address in validate function.

I need Magento\Quote\Model\Quote\Item class, as I review the core functionality, so that I can get the product qty and validate the product qty before apply the rule in cart.

Please let me know where address class is defined SO I able to change it or is there any other way to do this.