texts: Error connecting EOne SmartConnect to Magento SOAP interface

texts:
Magento V 1.9.2.4

When I try to connect the SmartConnect soap client to my Magento server i am getting the error:

Exception has been thrown by the target of an invocation.
SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.myurl.com:443/index.php/api/v2_soap/index/?wsdl=1'
: failed to load external entity "https://www.myurl.com:443/index.php/api/v2_soap/index/?wsdl=1"

A posting I found seemed to indicate that the server could not access itself. It said to make sure that your have an entry in \etc\host that points to itself. I have done so. It also mentioned using curl to test the connection. Using curl returned the following:

~$ curl https://www.myurl.com:443/index.php/api/v2_soap/?wsdl=1
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

When I used curl with the -k option, I get the wsdl information returned correctly.

At this point I am not sure what to do. My ssl has been working fine with my Storefront for months.

Any suggestions would be appreciated.


texts: How bundle Product doesn't have choice?Difference b/w Bundle Vs Group

texts:
According to my knowledge In "Grouped Product" user has the choice but in "Bundle Product" user doesn't have the choice.

To practically check "Grouped & Bundle" Product feature, I created a Test product of both type.

Please visit here to see screenshots:-

1- Grouped Product:-

http://nimb.ws/iR2M8z

http://nimb.ws/8WMOQ1

2-Bundle Product:-

http://nimb.ws/5sz7Hp

http://nimb.ws/MlKJEC

But as you can see the screenshot user is not restricted to choose all product. he/she still has a choice to choose the product for "Bundle Product".so how can we say that "Bundle Product" doesn't have any choice?

Please let me know how they are different?

Waiting for your reply!!!


texts: How to get different tax for a product in different store view magento2?

texts:
I am working on magento2. I need to get different tax for a product in different store view.
For example:
I need to get:
Tax Class of product A in store 1 is Taxable Goods.
Tax Class of product A in store 2 is None.


texts: Looking for an magento quicklook extension as in www.myntra.com

texts:
I am looking for a quick buy/quick-look/ quick-view extension for my website with same functionality for the quick look module in www.myntra.com.

So far My quick-view uses fancy-box module. Which is entirely different from myntra.com. I am looking for an basic idea to achieve the above quick-look extension.
Even google uses the same concept for their Image search.Please take a look at this.


texts: Magento2 Add Stored Cards functionality in My Account area

texts:
My magnto2 account had option to store and list credit card details of a user. In the my account area, there is option to list all the stored cards details which I had added in the checkout area for placing my orders. Anybody please help me to create a form in the my account area to save new stored cards when I'm clicking Add new Card.

The customer is able to enter the details of a valid credit card in the form and save it. The following are the details that needs be captured.

Credit Card Number
Expiry Date
CVV

I'm using brain tree payment method.


texts: How can i add static block in magento on category page?

texts:
I want to add a static block on my website Category page. This is the link of that page.

  https://flowerportal.in/online-flower-delivery/all-cities/bangalore

I have just created some banners for Bangalore product page but I don't know how to add a static block here. If you guys can help me regarding this then I will be really happy.


texts: Pass category ID to block in XML file and get that category products

texts:
<block class="Magento\Catalog\Block\Product\ListProduct" name="category.products.list" as="product_list" template="Magento_Catalog::product/list.phtml">

This will return all the products. But I want to pass category id and get that category product.
I have also tried category_id="3" in a block like

<block class="Magento\Catalog\Block\Product\ListProduct" category_id="3" name="category.products.list" as="product_list" template="Magento_Catalog::product/list.phtml">

But this has no effect. Any solution?


texts: Fulltext search in layered navigation page

texts:
if we pass a query string in the /catalogsearch/result?q=string page it will return products which match the string with any of its attributes. But in the filter navigation search result page, we can't pass query string like this. After a long research I found there is a fulltext search performs in the former case. My question is, can we implement this search in the layered navigation page like /tops-men/jackets-men.html?q=red&style_general=118

Thanks in advance.


texts: How to extend newcustomer.phtml in Magento 2.3?

texts:
I want to change the default text
-- Creating an account has many benefits: check out faster, keep more than one address, track orders and more.
So how would i extend the path vendor/magento/module-customer/view/frontend/templates/newcustomer.phtml.
Any help is appriciated.


texts:
I want to know is there a way or plugin to set the following rules:

one product can only allow purchase 2 per customer.
For example: Customer A can buy product A for qty <2, after payment Customer A cannot buy the product A.

So it is not only restrict for product A only set for qty maximum to 2, it is also can check for Customer all order can only buy for product A for 2.


texts: I've been using the Search API to fetch the list of products that match a query, but I've seen that manufacturers are not returned as part of the


texts: magento 2 update error - uncommited changes

texts:
I'm trying to update magento-2 from 2.1.9 to 2.2.
I get the following error:

  Source directory /chroot/home/minimoon/staging.ochosbags.com/html/vendor/zendframework/zend-stdlib has uncommitted changes.

How can I fix this?

thanks.


texts:
I am looking a way to restrict access to specific CMS page, allowing only logged in customers with a special customer group to see it.
EDIT:
I have this function, but observer isn't working properly it is redirecting in loops.

public function execute(Observer $observer)
{

    if(!$this->_session->isLoggedIn() && !$this->_helper->isB2DCustomer($this->_session->getCustomer()))
    {
        $request = $this->_objectManager->get('Magento\Framework\App\Request\Http');
        //get instance for URL interface
        /** @var \Magento\Framework\UrlInterface $urlInterface */
        $urlInterface = $this->_objectManager->get('Magento\Framework\UrlInterface');
        // URL to redirect to
        $url = $urlInterface->getUrl('/');
        if(strpos($request->getOriginalPathInfo(), '/b2d') == 0)
        {
            # redirect to root page
            $observer->getControllerAction()
                ->getResponse()
                ->setRedirect($url);
        }
    }
}


texts: Magento 2 add css to order grid on basis of custom column

texts:
I want to add css class and highlight the order from grid on the basis of my custom column value(Yes/No).
Anyone please suggest solution.
 Below is my custom column :

$setup->getConnection()
        ->addColumn(
            $setup->getTable($ordergridTable),
            'custom_column',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
                'unsigned'  => true,
                'nullable'  => false,
                'default'   => '0',
                'comment' =>'Custom column'
            ]
        );

        $setup->getConnection()->addIndex(
        $setup->getTable($ordergridTable),
        $setup->getConnection()->getIndexName(
        $setup->getTable($ordergridTable),
        ['custom_column']
        ),
        ['custom_column']
        );

below is in Ui/Component/Listing/Column/

 public function prepareDataSource(array $dataSource)
{
    if (isset($dataSource['data']['items'])) {
        foreach ($dataSource['data']['items'] as & $item) {

            $fav = isset($item['custom_column']) ? $item['is_favourite_order'] : null;
            $order  = $item['custom_column'];
            switch ($order) {
                case "0":
                    $fav_status = "No";
                    break;
                case "1";
                    $fav_status = "Yes";
                    break;

            }

            // $this->getData('name') returns the name of the column so in this case it would return fav_status
            $item[$this->getData('name')] = $fav_status;
        }
    }

    return $dataSource;
}


texts: Disadvantages and advantages in changing Index mode to Manual update

texts:
we bought magento extension for uploading the products through excel sheet.

we are uploading Products using csv file.

But when we are uploading the csv file , its taking more time to upload.

At the time of uploading, site will load very slowly.

so we are planning to change Index mode to Manual update.

If we set " Manual Update" , is we have to Reindex again once we upload all products through the excel sheet.

Is there any other disadvantage from changing Index mode to Manual update.


texts: Custom Front Controller redirects to 404 when i moved from windows to linux

texts:
I have created a custom controller on my magento project.It worked fine since i did the development in windows environment.But now i have moved to a Linux environment.Now all of my custom modules are not working.I can't find the problem.please help

When i type this URL in my windows server it works but in Linux it redirect to 404 page.
base_path/index.php/Catalogues

This is my code.

/app/etc/modules/AllOther_Catalogues.xml

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

app\code\local\AllOther\Catalogues\etc\config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Magentoexplorer_Catalogues>
            <version>0.1.0</version>
        </Magentoexplorer_Catalogues>
    </modules>
    <frontend>
        <routers>
            <Catalogues>
                <use>standard</use>
                <args>
                    <module>AllOther_Catalogues</module>
                    <frontName>Catalogues</frontName>
                </args>
            </Catalogues>
        </routers>
    </frontend>
</config>

app\code\local\AllOther\Catalogues\controllers\indexController.php

<?php

class AllOther_Catalogues_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {

        $this->loadLayout();
        $block = $this->getLayout()->createBlock(
        'Mage_Core_Block_Template',
        'invoice_',
        array('template' => 'allother/catalogues.phtml')
        );

       $resource = Mage::getSingleton('core/resource');
       $write = $resource->getConnection('core_write');
       $select = $write->select()
      ->from(['tbl' =>"sidcms_block"], ['*'])
      ->where('identifier = ?', "catalogues");

       $results = $write->fetchAll($select);

       $block->assign(array('result'=>$results));

        $this->getLayout()->getBlock('content')->append($block);
        $this->getLayout()->getBlock('head')->setTitle($this->__('Catalogues'));
        $this->renderLayout();

  }
}


texts: Magento1.9: How to add state, city and locality dropdown in magento Checkout page

texts: I am searching the way to add three dropdowns into checkout page but still, I did not get any way to do this.


texts: Magento 2 not showing categories or add products

texts: I added category and subcategory to magento 2 and after that I finished. I reindexed and flushed cash but nothing appears on the website frontend - only the old categories. I tried many times clearing cash and reindexing but it was in vain. Any ideas?


texts: Composer Install throws error downloading Magento Package in Magento 2.4.1

texts:
Trying to run composer install in a Magento 2.4.1 project is netting the following error:
The "https://repo.magento.com/archives/magento/module-page-builder/magento-module-page-builder-2.1.0.0.zip" file could not be downloaded (HTTP/1.1 404 Not Found)
All magento modules previous to this work, which means the Keys works. I have even created a different key to try and still same issue. What can I do?


texts: add blank attribute in magento backend and use php to calculate the value

texts:
i have added a new atribute called frontend_price in magento's backend in the manage product selection.

In the value of this attribute would like to get the product's price and multiply it with the Vat tax and the currency. Nothing fancy just to se the product's frontend price in the backend, but not stored into any table of the db. This attribute is for internal porpose only, so it does not have to be visible in the frontend.

i was thinking of :

Mage::app()->loadAreaPart(Mage_Core_Model_App_Area::AREA_FRONTEND,Mage_Core_Model_App_Area::PART_EVENTS);
$currencyrate = Mage::app()->getStore()->getCurrentCurrencyRate();
$price_normal = $_product->getPrice();
$_product->getResource()->getAttribute('frontend_price')->getFrontend()->getValue($_product) = $price_normal*$currencyrate*1.24;

Unfortunatly i don't know where to implement this code to see it in the backend. Any ideea where to edit the page for the backend product selection page.

Thank you.


texts: Can not save in db custom json value on block

texts:
In my plugin I created a new table 'myapp_staging' made of three columns: 'id', 'id_api_call' and 'f24_options_value'. In the last field I would like to save a response to my Api call in json format.
I created a new field, the path of this is Vendor\MyApp\Block\System\Config\FieldModelli.php
here below the code:
<?php

namespace Vendor\MyApp\Block\System\Config;

use Magento\Framework\Data\Form\Element\AbstractElement;

class F24Modelli extends \Magento\Config\Block\System\Config\Form\Field
{
    protected $objectManager;

    public function __construct
    (
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\ObjectManagerInterface $objectManager,
        \Fattura24\AppFatturazione\Helper\Data $helper,
        array $data = []
    )
    {
        $this->objectManager = $objectManager;
        $this->helper = $helper;
        parent::__construct($context, $data);
    }

    public function render(AbstractElement $element)
    {
        $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
        return parent::render($element);
    }

    protected function _getElementHtml(AbstractElement $element)
    {
       return $this->F24Modelli();
    }

    public function F24Modelli()
    {
        $storeId = (int) $this->getRequest()->getParam('store', 0);
        $apiKey = $this->helper->getConfig('myApp/generali/api_key', $storeId);
        $templates_res = $this->helper->apiCall('https://www.app.myapp.com/api/v0.3/GetTemplate', $apiKey);
        //$templates_xml = simplexml_load_string($templates_res);
        $templates_xml = simplexml_load_string($templates_res, 'SimpleXMLElement', LIBXML_NOCDATA);
        $json_templates = json_encode($templates_xml);

        $resource = $this->objectManager->get('Magento\Framework\App\ResourceConnection');
        $connection = $resource->getConnection();
        $tableName = $resource->getTableName('myapp_staging');
        $select = "select * from $tableName where id_api_call='1'";
        $tem_result = $connection->fetchAll($select);
        if (count($tem_result) == 0) {
            $insert = "insert into $tableName set id_api_call='1',f24_options_value='$json_templates'";
            $connection->query($insert);
        } else {
            $update = "update $tableName set id_api_call='1',f24_options_value='$json_templates'";
            $connection->query($update);
        }
        return htmlspecialchars($json_templates);
    }
}

first I tried to read xml in this way:
$templates_xml = simplexml_load_string($templates_res);

then I encode the response in json and succeed in saving data in my table.
In my original xml object I have got some tags inside <[!CData[]]> nodes
and I need the content of these nodes, so I tried this:
 $templates_xml = simplexml_load_string($templates_res, 'SimpleXMLElement', LIBXML_NOCDATA);

And then I encode the result in json format. Now after that I'm not more able to save my 'complete' json result in the table.
Anyone could help me?
Thanks


texts: magento 2.1 throws error in custom module when adding drop down in admin form

texts:
I created a custom module in magento2 for admin panel. Grid form is version fine. But When I tried to add/edit a record then its throwing the error like "Changes have been made to this section that has not been saved. This tab contains invalid data. Please resolve this before saving."

also getting error in log file :

  main.INFO: Item Magento_Backend::system_currency was removed [] []


texts: About Admin Side I have a template file in which I have a form submission

texts:
In the admin side, I have a template file in which I have  a form submission.

On form submission, an action would be executed, but it is redirecting to dashboard.

can anyone have any idea, how to overcome this kind of problem in magento 2


texts: How to auto increase product position in Category Products under Catalog > Manage Categories?

texts: Is it possible to increase product position automatically for specific category. For example, when Product 1 is added under Category A, then the position of Product 1 will be 1 in the Position Column under Category Products. When Product 2 is added under Category A, then the position of Product 2 will be 2 in the Position Column under Category Products and so on. Is there a way to do so?


texts: Change site currency along with product prices

texts:
Currently site is using euro and all product prices is in euro.
How can we switch whole site to use usd so that all products also will change their prices according to currency exchange rate ?


texts: https redirection - image logo loaded from unsecure source

texts:
We've recently migrated the whole magento webshop to the https structure.

There comes the issue: The product pages are still unsecure, because each product logo is loaded from an unsecure source. Here is the Google Inspector insight:

  Mixed Content: The page at
  'product-page-url' was loaded
  over HTTPS, but requested an insecure image
  'http://www.safegear.dk/media/brand/birkegaarden.gif'. This content
  should also be served over HTTPS.

The logo that is loaded over http is the one of "Birkegaarden", in the top right (see image)

Thanks to everyone who will be taking a minute to read these few lines!

Enrico


texts: Get custom attribute of simple products that are saleable

texts:
I have a collection of products which consist of configurable products that are visible and active.

How do i get all values in an array of an attribute called manu_color of each configurable product.

I is important that i only get manu_color of the simple products if the simple product are actually saleable.

Any help would be appreciated :)


texts:
Ok so I've created a custom module that has a single table model with a active select (no, yes) and a title and image. Now when I save the title saves and updates fine, the image is deleted or updated correctly all works fine.

All apart from the yes/no select.

I added a vardump of the post data and i see the following:

 ["active"]=> string(1) "0" ["title"]=> string(9) "Test Item"

So the data is being passed to my saveAction method correctly (I assume it's supposed to be a string with values going up from 0). The following is what I've been using to save the post data which works fine for everything else.

$model = Mage::getModel("tester/tester")
                    ->addData($post_data)
                    ->setId($this->getRequest()->getParam("id"));
                    ->save();

That is the line after my vardump of the post data so I'm just very confused as to why this is not working, this is the same code I've used to add active and in acitve options to other modules and it's all working fine (I can even sort by the select in the admin view).

I did add the functionality via an update to the module but have since uninstalled it and tried it again with no success.

for reference I created the module using the silktouch module creator.


texts: How to assign customer group automatically based on address information

texts:
How to assign customer group automatically following by address information

When customer register on our website, customer write the country where they live.
If customer live in United State, we would set the standard group(just default group).
If not like live in Jamaica, Spain, we'd like to assign to international group automatically.

So, it would show like this,

It seems like if-else statement on any languages but i didn't touch the code because i fix it myself one by one.

How can i do it?
app/code/core/Mage/Customer/Model
have the information about that i guess.


texts: How to add updated shipping cost in grand total

texts:
I have developed A custom module using event observer method, In that I am updating Handling fee(15%) for the customers that reside outside USA.
I can see that this code is updating the carrier's shipping fee correctly but that
change is not reflected in the grand total. i.e the shipping fee cost added to the grand total is set according to the one set in admin panel(8%).

I want to update this grand total using the updated shipping and handling fee. How can i achieve that?

config.xml

<?xml version="1.0" ?>
<config>
<modules>
    <Dynamo_HandleFee>
        <version>0.1.0</version>    <!-- Version number of your module -->
    </Dynamo_HandleFee>
</modules>
<frontend>
    <routers>
        <HandleFee>
            <use>standard</use>
            <args>
                <module>Dynamo_HandleFee</module>
                <frontName>HandleFee</frontName>
            </args>
        </HandleFee>
    </routers>
</frontend>
<global>
    <models>
        <Dynamo_HandleFee>
            <class>Dynamo_HandleFee_Model</class>
        </Dynamo_HandleFee>
    </models>
    <events>
        <sales_quote_save_before>
            <observers>
                <HandleFee>
                    <type>singleton</type>
                    <class>Dynamo_HandleFee/observer</class>
                    <method>customerAddressSaveAfter</method>
                </HandleFee>
            </observers>
        </sales_quote_save_before>
    </events>
</global>

Observer.php

class Dynamo_HandleFee_Model_Observer

{

public function customerAddressSaveAfter(Varien_Event_Observer $observer)
{

        /**@var Mage_Sales_Model_Quote $quote */
        $quote = $observer->getQuote();
        $countryId = $quote->getShippingAddress()->getCountryId();
        $someConditions = true; //this can be any condition based on your requirements
        $newHandlingFee = 15;
        $store    = Mage::app()->getStore($quote->getStoreId());
        $carriers = Mage::getStoreConfig('carriers', $store);
        foreach ($carriers as $carrierCode => $carrierConfig) {

            if($carrierCode == 'pickup'){
                if($countryId != 'US' ){

                    $carrierConfig['handling_fee'] = 15;
                    $store->setConfig("carriers/{$carrierCode}/handling_fee", $newHandlingFee);

                }

            }
            }
            //echo true;exit;

                            //echo  Mage::getSingleton('checkout/cart')->getQuote()->getGrandTotal();

//}
 }
 }


texts: How to create Mobile Application of Magento 2 Native?

texts:
How to create Mobile Application of Magento Native ?
Using Magento 2 default REST API's how to create Front-end Magento 2
application ?


texts: How to hide Tax Amount on cart until Estimate Tax and Shipping has been submitted

texts:
Problem

We are currently implementing the Dots/FastTax  plugin to extend from the initial Mage_Tax_Model_Calculation class. By doing so, we are able to provide a dynamic tax rate for both cart estimate tax quote and actual checkout.

The issue, however, is that tax is currently showing on an initial session. In other words, when a user adds an item to the cart and proceeds to checkout cart, you can see a default tax amount. This default tax amount usually is estimated to 8% of the total item cost.

Discussion

The plugin is responsible for one key method extension, that is the calcTaxAmount:

    /**
     * Calculate rated tax based on price and tax rate.
     * If you are using price including tax $priceInclude should be true.
     *
     * @param float $price
     * @param float $taxRate
     * @param boolean $priceIncludeTax
     * @param boolean $round
     * @return float
     */
    public function calcTaxAmount($price, $taxRate, $priceIncludeTax = false, $round = true)
    {
        $taxRate = 0.00;

        if (in_array($this->shippingState, $this->taxableStates)) {
            $dots_helper = Mage::helper('DOTS_FastTax/DOTS');
            $taxRate = $dots_helper->getTaxRate();
        }

        if ($priceIncludeTax) {
            $amount = $price * (1 - 1 / (1 + $taxRate));
        } else {
            $amount = $price * $taxRate;
        }

        if ($round) {
            return $this->round($amount);
        }

        return $amount;
    }

In the above implementation, we verify that the shipping state (the state to which the product will ship to) is available in a list of pre-configured taxable states (states to which we would like tax to apply). If so, we use a helper object to get the tax rate. The tax returns a decimal value. Since this is the only method to which we extend from the initial object, I am assuming all other behavior is inherited from the parent.

Question

Is there a way to hide the tax rate on cart summary until the user has engaged the Estimate Shipping and Tax Estimate field?


texts: Magento 2 : Layout Processor won't Load Model

texts:
I have a layout processor, for adding dropdown with value from model database. When I try to define model in Layout Processor, the page goes blank and only showing the gif loading circle, heres my custom code:

namespace Test\Hello\Plugin\Checkout\Model\Checkout;
class LayoutProcessor
{

    public function afterProcess(
            \Magento\Checkout\Block\Checkout\LayoutProcessor $subject,
            array  $jsLayout,
            \Lime\Courier\Model\YeezysFactory $yeezyModel
        ) {
           $yeezyz = $yeezyModel->create()->getCollection();

           foreach ($yeezyz as $yeezy) {
             $opt[] = array(
                   'value' => $yeezy['yeezy_id'],
                   'label' => $yeezy['name']
               );
           }
          $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
                ['shippingAddress']['children']['shipping-address-fieldset']['children']['yeezy'] = [
                    'component' => 'Magento_Ui/js/form/element/select',
                    'config' => [
                        'customScope' => 'shippingAddress',
                        'template' => 'ui/form/field',
                        'elementTmpl' => 'ui/form/element/select',
                        'id' => 'yeezy',
                    ],
                    'dataScope' => 'shippingAddress.yeezy',
                    'label' => 'Drop Down',
                    'provider' => 'checkoutProvider',
                    'visible' => false,
                    'validation' => [],
                    'sortOrder' => 254,
                    'id' => 'yeezy',
                    'options' =>  $opt;
                ];
        }
    }


texts:
Magento page cache cached some of the blocks that has dynamic value, like Wishlist count on header for logged in customers

I can make it dynamic using Ajax, but then it came to my knowledge that it could also be done using Hole punch. (Not cacheable="false")

My question is, how can I set hole punch for wishlist count on header? I need a path where I can do some research on this

I have checked this post, but it has no a satisfactory answer:
How to use Identities for to implementing hole punching in my custom module magento 2


texts: I have created multiselect Product attribute but it is not visible on frontend as a filter on Product Listing Page

texts:
Check this code.
        [
            'group' => 'Product Details',
            'type' => 'text',
            'sort_order' => 210,
            'label' => 'Collection',
            'input' => 'multiselect',
            'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend',
            'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
            'visible' => true,
            'required' => false,
            'user_defined' => true,
            'searchable' => true,
            'comparable' => false,
            'filterable' => true,
            'used_for_promo_rules' => true,
            'visible_on_front' => false,
            'used_in_product_listing' => true,
            'apply_to' => implode(',', [Type::TYPE_SIMPLE, Type::TYPE_VIRTUAL]),
            'option' => [
                'value' => [
                    'option_1' => ['Option 1'],
                    'option_2' => ['Option 2'],
                    'option_3' => ['Option 3']
                ],
                'order' => [
                    'option_1' => 1,
                    'option_2' => 2,
                    'option_3' => 3
                ]
            ]
        ]

Thank you in advance.


texts:
I have added a product_id column in my table vaibhav_customtabs_product_entity. Now I am trying to add foreign key on product_id from catalog_product_entity->entity_id column, but it is throwing error.
Below is my code for add foreign key.

<?php

$installer = $this;
$installer->startSetup();

$installer->getConnection()
->addForeignKey(
 $installer->getFkName('vaibhav_customtabs/product_entity', 'product_id', 'catalog/product','entity_id'),
 'product_id',
 $installer->getTable('catalog/product'),
 'entity_id',
 Varien_Db_Ddl_Table::ACTION_CASCADE,
 Varien_Db_Ddl_Table::ACTION_CASCADE
);

$installer->endSetup();

  Error

Error in file: "/Applications/XAMPP/xamppfiles/htdocs/store1/app/code/local/Vaibhav/Customtabs/sql/vaibhav_customtabs_setup/upgrade-1.0.0.1-1.0.0.2.php" - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'store1.product_id' doesn't exist

Do I have to add foreign key or alter the column product_id with foreign key as I have already created the column.


texts: Remove Advanced Search Link From Header Magento 2

texts:
I am trying to remove the advanced search link from the header in Magento 2 but it doesn't seem to be disappearing after I've extended the default.xml layout file found in the catalog search module. My default.xml file is located in the following directory:

(theme_dir)/Magento_CatalogSearch/layout/default.xml

And contains the following contents:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="advanced-search-link" remove="true"/>
</body>
</page>

Is this the correct way to extend the catalog search default layout file? In order to remove a block from layout do you have to override the layout file rather than extend it?


texts:
Is it possible to add rating filter on product listing filter ?
Any help will be appreciated.


texts: Magento2: Dynamic Mass Action in Sales Grid

texts:
I trying to implement dynamic status in admin sales grid under mass action,but unable to get this.

I was able to see the single mass action but not sub mass action under the sales mass action.

I tried many blogs but it didn't work.

I have used below two blogs but it is not coming as expected

http://www.ibnab.com/en/blog/magento-2/magento-2-ui-components-new-dynamic-ui-treemassaction-technique

http://webkul.com/blog/create-dynamic-mass-action-magento-2-grid/

I have added below snippit in view/adminhtml/ui_component/sales_order_grid.xml

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Ui/etc/ui_configuration.xsd">
  <container name="listing_top">
    <massaction name="listing_massaction">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="actions" xsi:type="array">
                    <item name="delete" xsi:type="array">
                        <item name="type" xsi:type="string">Status</item>
                        <item name="label" xsi:type="string" translate="true">Status</item>
                        <item name="url" xsi:type="string">sales/order/massStatus</item>
                    </item>
                </item>
            </item>
        </argument>
    </massaction>
</container>

Please help me to solve above problem.


texts: Mail is not sending in Google Cloud in Vesta panel Magento 2.2

texts: I configured Vesta Panel in Debian 9 for my magento 2 website. But mail is not working, there is no errors. But I am not receiving any mails to my mail from google cloud. I wrote firewall rules. If anybody know anything to resolve this issue, please respond me.


texts: Dropdown first value is empty in select attribute magento 2

texts:
I am getting dropdown custom attribute option values from database in foreach loop.But it show the very first value empty in select option.How i can skip this first empty value.

 <?php    //FOR MULTISELECT
         foreach ($groupCollection as $group) {
            array_push($groupIds, $group->getAttributeGroupId());
            $groupAttributesCollection = $cole->create()
                ->setAttributeGroupFilter($group->getId())
                ->addVisibleFilter()
                ->addFieldToFilter('is_user_defined', array('eq' => 1))
                ->addFieldToFilter('frontend_input', array('eq' => 'multiselect'))
                    ->load(); // product attribute collection
            foreach ($groupAttributesCollection->getItems() as $attribute) {
                ?>
  <?php
                array_push($attributeids, $attribute->getAttributeId());
                $opte=$attribute->getStoreLabel();
                ?>      <?php echo $opte;?> <?php
                array_push($somearray, $attribute->getid());
                $opt=$attribute->getid();
                $optionss=$block->getattributeoptions($opt);
                ?>
               <?php  $opte; ?><?php
                foreach($optionss as $valuess){
                    ?>
                    <?php echo $valuess['label'].':'; ?>
                    <input type="radio"  name="<?php echo $valuess['label']; ?>">

                    <?php } ?>

<?php
                   }
 } ?>


texts: I am unable to apply condition on cart price rule

texts:
In cart price rule condition is not working properly at server
it showing a message won't take long and redirect to dashboard
while applying condition


texts:
UPDATE
I'm updating the question as I solved one of the problem in this question. The original question is below the line.

I'm now able to see the preview of the image as the problem was with the below code

$fieldset->addField('banner', 'image', array(
    'label' => Mage::helper('designer')->__('Banner'),
    'required' => false,
    'name' => 'banner',
));

where instead of image, file was written for the type of field. But now the problem is, I'm unable to delete the previous image. I do check the delete image checkbox but the file still remains there. Why its not deleting?

I'd created a module with module creator and able to save images. But when the next time I do want to edit the record it does not show the preview of the uploaded image or the delete checkbox.

Do I need to write additional code in my adminhtml tab form?


texts: How to use jquery function date time picker in magento 1.9

texts:
<script>
           jQuery(function() {
           jQuery(document).ready(function() {
           jQuery(".date").datepicker();

             jQuery(".date").datepicker({
             onSelect: function(dateText) {
             console.log("Selected date: " + dateText + "; input's current value: " + this.value);
             jQuery(this).change();
             }
             })
             .on("change", function() {
             debugger
             var date = jQuery(this).datepicker('getDate');
             var dayOfWeek = date.getUTCDay();
             if(dayOfWeek == 5 || dayOfWeek == 6)
             {
             //your alert code
             //alert('You Have Selected Day is Saturday Or Sunday Do you wish to Continue');

             var x=window.confirm("Your Selected Date Or Day is Saturday Or Sunday \n Do you wish to Continue")
             if(x){
             window.alert("Ok!")
             }
             else
             {
             //window.close();
              jQuery(this).val("");
             }
             }
             });
             });
          });
          </script>

    function setcal(n)
    {
    var dated= document.getElementById('inspectiondate'+n).value;
                    Calendar.setup({
                        inputField: "inspectiondate"+n,
                        ifFormat: "%Y-%m-%e",
                        showsTime: false,
                        range:"currentYear",
                        button: "Idate"+n,
                        align: "Bl",
                        singleClick : true,
                        dateStatusFunc :    function (date) {
                                    var now= new Date();

                                    if(date.getFullYear() === now.getFullYear())
                                    {

                                        if(date.getMonth() < now.getMonth() && date.getFullYear() == now.getFullYear())
                                        {
                                            return (true);
                                        }
                                        else
                                        {
                                             if(date.getDate() < now.getDate() && date.getMonth() == now.getMonth() && date.getFullYear() == now.getFullYear())
                                                 return (true);
                                             else
                                                 return (false);
                                        }
                                    }

                                    }

                    });

    }

    <input type="text" name="inspectiondate<? echo $sno; ?>" id="inspectiondate<? echo $sno; ?>" placeholder="Date" class="required-entry date" style="width:100px !important;" readonly="readonly" autofocus require>

<img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN). 'adminhtml/default/default/images/grid-cal.gif'; ?>" alt="" class="v-middle date" id="Idate<? echo $sno; ?>" title="Select Date"  onclick="setcal(<? echo $sno; ?>)">


texts: How to Modify core Module webapi.xml in Magento2

texts:
Magento 2 Core API to get products in GET method but want to make it POST method .

How to do it and also open API ?


texts: dateFormat in issue in Mangento_UI on rules.js in magento 2

texts:
Backend:

After saved data:

a:2:{s:14:"date_range_min";i:1591747200;s:14:"date_range_max";i:1593129600;}

Frontend

rules.js


texts: Get 'Minimum Order Value' For specific payment method Magento 2

texts:
I want to call the minimum order value for a specific payment method within a block and have not been able to find a question that has asked this. The closest bit of code I could find was something like below that finds min value for free shipping:

private $scopeConfig;

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

public function getFreeShippingValue()
{
    return $this->scopeConfig->getValue('carriers/freeshipping/free_shipping_subtotal', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
}

I however want the minimum order value and am unsure how to find the path for payment method configurations. I want something like below however and to know how to figure out the paths so guessing and asking questions on here are not required in future:

public function getMinLeasingValue()
{
    return $this->scopeConfig->getValue('paymentmethods/banktransfer/min_order_value', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
}


texts: How to add custom field next to “Purchased From” column in order view section

texts:
In admin panel Order View section how to add custom field next to "Purchased From" column
It should look like

Purchased From:

Main Website
Main Website Store
Default Store View

Purchase Channel:
Facebook


texts: decide wich interface to implement base on system configuration magento 2

texts:
I have created a dropdown to select which data source to use (system.xml) and I got the value selected using a plugin after clicking to button 'save configuration'.

Now I need to specific which interface to implement based on that param .

  exp : if I choose 'mysql' as a data source . My class will implement
  interface which contains Methods related to this data source .

Anyone has any idea ?


texts: What is the order that we should follow, while creating an extension in magento?

texts:
The question I am sharing here is not about creating an extension, but about the order in which we should proceed.

This question will help a lot of people who want to create extensions. Because whenever we are creating an extension we usually try to check the impact our code has done so far.

So the question here is while creating an extension in magento which file/folder should be created in the order of first to last.

Also the extension I am talking about here, is a basic admin extension, with a tab in header in admin as well.


texts: Translate minicart , captcha module and other module Magento2

texts:
I have a website with 3 differents language : arabic, french , english. i created the i18n under my

  app/code/Maget/MyModule/i18n

but there is the minicart, captcha module, strength of password and other text not translated to the french none to arabic. Can any one explain to me how to create and install the french and arabic patch of translation step by step?


texts: programmatically add color swatches to color attribute Magento2

texts:
I am using Magento 2.1.10 and have around 580 different colors in my color attribute. Since the Javascript obviously has trouble showing all of them in the backend (does not matter which browser, message appears the script took too long and break up, can't increase my script time), and the color names with swatches can change sometimes, so I want to write a CLI plugin which updates the color attribute with color swatches through a CSV file.
I already googled, tried different ideas and tested some scripts I found, but nothing really works.

I hope someone has an idea or maybe a working script which add a hexcode to the color attribute swatch. Creating the plugin for getting all information from the file is already built, but the important thing is missing to update the swatches.
What do I mean with "color swatches"? I mean the small colored boxes in the frontend instead of the drop-down.

Thank you in advance


texts: Magento2 - Get "Sort By" value in catalog search page

texts:
How get Sort By value Relevance in this page.

Using $productListToolbar return only price, name, position value, but I need relevance.

Attached the Screenshot here.


texts: Add Custom Product Attributes to Order Invoice

texts:
I would like to add 2 custom product attributes onto our order Invoice that gets emailed out to our customers.

Also it would be ok, if I can show parent and child product together.


texts: Magento2 Subtotal Displaying Wrongly Based on Country

texts:
When i added a product to cart which is 136.35 cost , If india is shipping destination under shopping cart Estimation Shipping And tax block then it is showing subtotal finely. But if you selected United States as the destination then it is showing subtotal as 101 . How can we get same cost of all countries except shipping prices.

Attaching my configurations for tax caluculations.


texts: How to force save address book during checkout

texts: I am making a module that enables automatic shipments for our clients. There is a new step in the checkout process that allows customers to choose how often they receive this order. If they are making a new re-recurring order I want to be able to force them to save their shipping address in the address book so that they can receive this order multiple times. (we are also developing a secure way to charge their cards as well, so thats been thought of as well.)


texts:
I need to include a block in another block and launch it directly.
What I do now is this code in the first block

$this->getLayout()->createBlock('module/block');

then on that newly created block I have this

public function _prepareLayout()
{
    $this->setTemplate('module/block.phtml');
    echo $this->_toHtml();
}

This works fine, but having a echo in a the block model I don't really feel comfortable.

Is there any proper way to auto-launch this template at call of this block?

== EDIT ==
After trying the solution of @Keyul Shah it doesn't display anything.
So here is a more precise code of what I did.

I'm trying to call the block from a Admin Widget Form, so I put this in my XML:

<reference name="widget_instance_edit">
    <block type="myModule/adminhtml_my_block" name="block_name" output="toHtml" template="myModule/toShow.phtml" />
</reference>

The module is called as everything in _prepareForm() displays, but the phtml is not displayed.
If I try to do echo $this->_toHtml(); this time it has an error because it launches it before the parent.

=== FULL CODE ===
app/code/local/NameSpace/Module/Block/Adminhtml/Module/Images/Edit.php

class NameSpace_Module_Block_Adminhtml_Module_Images_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
{
    protected function _prepareForm()
    {
        // I want to call a specific block on top of the Edit Form
        $this->getLayout()->createBlock('module/adminhtml_module_images_tagger');

        // addFields stuff
        ...
    }
}

app/code/local/NameSpace/Module/Block/Adminhtml/Module/Images/Tagger.php

class NameSpace_Module_Block_Adminhtml_Module_Images_Tagger extends Mage_Adminhtml_Block_Template
{
    public function _prepareLayout()
    {
        // This works but is ugly and want to change it in a correct thing
        $this->setTemplate('module/tagger.phtml');
        echo $this->_toHtml();
    }
}

The tagger.phtml doesn't matter.

=== Revision ===

After much more experience in Magento, I come back to this question and I realize that I was just on the wrong path.
The best way to do it is to create a block extending Mage_Adminhtml_Block_Widget_Form, then simply call $this->setTemplate('path/to/your.phtml'); and then get inspired by the phtml report/grid/container.phtml


texts: How to extend email-inline css in custom module

texts:
I have extend email css in my custom module but its not working here is how i have extend it
Vender
Module
    web
        css
            source
                _email.less

but it's not working.


texts: Switch excluding/including VAT prices on productpage

texts:
I want to change price view of my products on my Magento 2 sites.
In the standard config, I only have these three options:
1) show including VAT
2) show excluding vAT
3) show including & excluding VAT

We want to show the price excluding & including VAT.
So leading price is the excluding VAT price.

Can anybody help me?


texts: How to Create Custom Login or Register Page Layout in Magento 2

texts: I want to create a custom layout for the login & register page. I want to remove the header and footer sections. How can I achieve this?


texts: Magento get product current subcategory of specific parent category

texts:
I need to find a solution to get product current subcategory from specific parent category.

For example: I have a product that has like 2 parent categories like authors and publishers. And in those i have like 500-800 subcategories, and this product has one of subcategories in each parent categories selected. I need to get those subcategory names. My solution:

function getSubsName($_product,$cat_id)
    {
        $categories = $_product->getCategoryIds();
        $cat = Mage::getModel('catalog/category')->load($cat_id);
        $subcats = $cat->getChildren();
        $content = "";
        foreach(explode(',',$subcats) as $subCatid):
           $_category = Mage::getModel('catalog/category')->load($subCatid);
           foreach($categories as $cat_id):
              if($cat_id == $_category->getId()):
                  $content = 'getUrl() .'">' .      $_category->getName() . '';
              endif;
           endforeach;
        endforeach;
        return $content;
    }

But there is a problem because it loads very long. Like 8-10 seconds or more. I can't afford that. Anyone know any more simple and fast solution for this?


texts: How to get Original image URL in magento 2

texts:
I need to create a link of an image that should not be resized by magento2.That original image should be cached.
Any help would be appreciated.


texts:
Hi I am having an issue with my magento site. The place order button is not working at all.

Here is a screenshot of the errors I am getting on inspect:

Can anyone help me please?
Magento Version: Magento ver. 1.5.1.0 and using Onepage


texts: Credit Card Payment accepted But no Order in Magento

texts:
I've have a few small instances where payment was collected in auth net but no order shows up in magento ?

I've searched for similar issues but nothing very informative.

Anyone else ran into this ?


texts: Magento change sort order of selective categories in Admin

texts:
I am trying to change sort order of sub-categories from the array of category id's following is my code.

$catOrder = array(47,54,66,88,89);

$position = 1;

foreach ($catOrder as $catId) {

    $category = Mage::getModel('catalog/category')->load($catId);
    if($category->getId()){
        $category->setPosition($position);
        $category->save();
    } else {
        echo "Could not load category</br>";
        die();
}

$position++;

}

The problem is when script is run no error but the result is not as expected. Category changes position though but chose random position not that i wanted.


texts: how to show image by product attribute value in magento additional product information on product page

texts:
I need to show product image in product page on additional information tab.
I created a attribute name certification marks.
that attribute contain CE, CLASSE II, ENEC, F, IP20 these values.
on additional information page i want to show the logo of these certification marks.
Basically i want to konow that how to show images instead of product attribute value on product page page in additional tab in magento.

I add image of additional  details.

here you can see the attributes values is showing...here i want to show logo of these values...

my logos

this is individuals logo..i want to show in additional information page in magento instead of attribute value.


texts: How to extend SOAP v2 API to make Order Attributes Writable

texts:
I have Amasty "Order Attributes" installed and working.
I need to be able to extend SOAP API v2 to allow me to programmatically create an order and update these custom order attributes.
What all needs to be extended to programmatically create an order with custom order attributes?
an example of a custom order attribute is "original_order_id"

UPDATE

Thanks to Alex and Kevin for answering it.

I have applied this process, modified heavily to suit the situation I'm coding for, up to the "update" method, however, I cannot get the order to accept these Amasty order attribute keys and values as $data.

The $order->save() does not update the data on the actual order.

    /**
 * Update order data
 *
 * @param int $orderIncrementId
 * @param array $data
 * @return boolean
 */
public function update($orderIncrementId, $data)
{
    $data = (array) $data;
    Mage::log('orderIncrementId:' . $orderIncrementId, null, 'apiFile.log');
    foreach ($data as $key => $value) {
        Mage::log($key . ':' . $value, null, 'apiFile.log');
    }

    $order = $this->_initOrder($orderIncrementId);
    foreach ($data as $key => $value) {
        $order->setData($key,$value);
    }
    $order->save();

    return true;
}

For the record, also tried $order->addData($data)->save(); with the same results.

My log file registers:

2015-12-23T22:13:53+00:00 DEBUG (7): erp_customer_id:WILSON
2015-12-23T22:13:53+00:00 DEBUG (7): original_order_id:100001767
2015-12-23T22:13:53+00:00 DEBUG (7): shipping_date:12/15/2015

Which is exactly the data I expect to see, but this data will not apply to the order. The data shown here follows the format key:value for simplicity.

When I manually create orders this data populates, but will not update the order through this API call. Any help would be greatly appreciated.

So close I can TASTE it! Currently, we are required to create brand new orders to update these fields with information from our ERP system.
I am very hopeful someone can help me avoid that fate.

In case it helps, here is the XML for the call:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:salesOrderUpdate soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <sessionId xsi:type="xsd:string">a9c83197fb991bc969e904594ee58777</sessionId>
         <orderIncrementId xsi:type="xsd:string">100001768</orderIncrementId>
         <data xsi:type="urn:salesOrderUpdateEntity">
            <!--You may enter the following 3 items in any order-->
            <!--Optional:-->
            <erp_customer_id xsi:type="xsd:string">WILSON</erp_customer_id>
            <!--Optional:-->
            <original_order_id xsi:type="xsd:string">100001767</original_order_id>
            <!--Optional:-->
            <shipping_date xsi:type="xsd:string">12/15/2015</shipping_date>
         </data>
      </urn:salesOrderUpdate>
   </soapenv:Body>
</soapenv:Envelope>


texts: Magento 2 Fileld email template dropdown is not defined in System XML

texts:
i create a system xml to load a field dropdown for selecting email template, but when i access the configuration page there is an error like this:

Exception #0 (UnexpectedValueException): Email template 'paymentconfirmation_general_payment_confirmation_email' is not defined.

here's my system.xml:

<group id="general" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="10" translate="label">
                Payment Confirmation E-Mail
                <field id="email" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="1" translate="label" type="text">
                    Store E-Mail Receivers
                    <comment>Insert ',' between e-mail addresses</comment>
                </field>
                <field id="payment_confirmation_email" translate="label comment" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
                E-Mail Template
                <source_model>Magento\Config\Model\Config\Source\Email\Template</source_model>
                </field>
            </group>

here's my config.xml:

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <paymentconfirmation>
            <general>
                <email/>
                <payment_confirmation_email/>
            </general>
        </paymentconfirmation>
    </default>
</config>


texts: Magento : Error in creating new attribute set

texts:
I've having issue when creating a new attribute set based on the existing one.

When you try to do this, it creates the new set but fails to bring over the attributes - it’s as if you simply created a blank set.

I'm trying hard looking into many database tables and class but can't find the actual problem.

any one has any experience in this issue, Please help

Thanks


texts:
Using Magento 2.1.1. I have to add some bundle products programatically. Any post on stack doesn't work for me.

Here is my code - it adds bundle products with some options and every option should has only one selection. Althought it seems to work and options and selections are present in admin, saving from admin brakes product totally what indicates it was not added properly. If anyone has some working script for that please share.

Some example data:

$product['children'] = [
                        'name' => ['id' => 1345,
                                   'license_extended_can_change_qty' => 1
                                  ],
                                  ....
                       ];

Functions converting data to migrate for arrays used for adding bundle items:

private function prepareBundleOptionsMap($product)
{
    $bundle_options_map = array();

    foreach ($product['children'] as $childName => $childId) {
        $child_map = [
            'title' => $childName,
            'default_title' => $childName,
            'type' => 'select',
            'required' => 1,
            'delete' => '',
        ];

        $bundle_options_map[] = $child_map;
    }

    return $bundle_options_map;
}

private function prepareBundleSelectionsMap($product)
    {
    $bundle_selections_map = array();

    foreach ($product['children'] as $childName => $childData) {
        $child_map = [[
            'product_id' => $childData['id'],
            'selection_qty' => 1,
            'selection_can_change_qty' => $childData['license_extended_can_change_qty'],
            'delete' => '',
            'user_defined' => $childData['license_extended_can_change_qty']
        ]];

        $bundle_selections_map[] = $child_map;

        if ($childData['status'] == Status::STATUS_DISABLED) {
            $this->_logger->addInfo(__(' Bundle ' . $product['title'] . ' - one of children is disabled: ' . $childData['name']));
        }
    }

    return $bundle_selections_map;
}

And fragment of bigger script using above methods:

$bundle_options_map = $this->prepareBundleOptionsMap($migrated_product);
$bundle_selections_map = $this->prepareBundleSelectionsMap($migrated_product);

    $product->setBundleOptionsData($bundle_options_map);
    $product->setBundleSelectionsData($bundle_selections_map);

    if ($product->getBundleOptionsData()) {
        $options = [];
        foreach ($product->getBundleOptionsData() as $key => $optionData) {
            if (!(bool)$optionData['delete']) {
                $option = $this->optionFactory->create(['data' => $optionData]);
                $option->setSku($product->getSku());
                $option->setOptionId(null);

                $links = [];
                $bundleLinks = $product->getBundleSelectionsData();
                if (!empty($bundleLinks[$key])) {
                    foreach ($bundleLinks[$key] as $linkData) {
                        if (!(bool)$linkData['delete']) {
                            $link = $this->linkFactory->create(['data' => $linkData]);
                            $linkProduct = $this->productRepository->getById($linkData['product_id']);
                            $link->setSku($linkProduct->getSku());
                            $link->setQty($linkData['selection_qty']);
                            $link->setCanChangeQuantity($linkData['selection_can_change_qty']);
                            $links[] = $link;
                        }
                    }
                    $option->setProductLinks($links);
                    $options[] = $option;
                }
            }
        }
        $extension = $product->getExtensionAttributes();
        $extension->setBundleProductOptions($options);
        $product->setExtensionAttributes($extension);
        $product->save();
    }


texts: passing param to a controller must be instance error

texts:
I have a jquery post coupon value to a controller

 $.post(url,{coupon:coupon},function(obj)

below is the constructor method

namespace Lti\QuickID\Controller\Index;

class verify extends \Magento\Framework\App\Action\Action {

    protected $_date;
    protected $resultJsonFactory;
public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Framework\Stdlib\DateTime\TimezoneInterface $date,
    \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
){

    $this->_date = $date;
    $this->resultJsonFactory = $resultJsonFactory;
    parent::__construct($context);
}

public function execute(){

    $result = $this->resultJsonFactory->create();

    $params         = $this->getRequest()->getParams();

    $coupon = $params['coupon'];

    ........

    return $result->setData([
                "error" => $error,
                "response" => $msg,
                'quickid' => $coupon]);
}

I have verified that $post is passing correct value

whenever I do di:compile and static-content:deploy, passing value to controller give following error

Argument 1 passed to L__construct() must be an instance of Magento\Framework\App\Action\Context, instance of Magento\Framework\ObjectManager\ObjectManager given

the problem occur in both production and developer mode, and can be fixed by doing rm -rf var/di/*

my question is why this is happening?


texts: Magento 2: Query For Product Attributes, SKU, SetID, AttributeID

texts:
I need a full table query of all my SKUs in the following structure.  I feel I am pretty close but can't seem to figure out the relationships:

valueID = eav_attribute_option_value.value
AttributeSetID =eav_attribute_set.attribute_set_id WHERE
eav_attribute_set.entity_type_id = 4
AttributeID =
eav_attribute.attribute_id WHERE eav_attribute.entity_type_id = 4
SKU =
catalog_product_entity.sku
value =
eav_attribute_option_value.value
JOIN ON eav_attribute_option.option_id = eav_attribute_option.option_id

I believe I need to utilize eav_attribute_group table as well but I need to merge all these together somehow I think.

Any ideas would be appreciated.

`

valueID   |  AttributeSetID  | AttributeID  | SKU   |  value
   2                3               9        324       Yes
   12               3               11       324       Roast
   3                3               7        324       1
   19               5               10       21069     Jumbo


texts: How to add new submenu in Magento customers Admin menu?

texts:
I'd like to add submenu in Customer admin menu. I have this code below to show my custom submenu of customer support.
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="../../../Backend/etc/menu.xsd">
    <menu>
        <add id="Ced_CsCustomerSupport::customers_support_information"
            title="Customer Information"
            translate="title"
            module="CsCustomerSupport"
            sortOrder="50"
            parent="Magento_Customer::customer"
            action="cscustomersupport/customer/index"
            resource="Ced_CsCustomerSupport::customers_support_information"/>
    </menu>
</config>

But it's not showing up. Anything I can do with this?
Thank you in Advance


texts: what is proper way to get object manager, entity collection in magento2 api?

texts:
How to get properly access to objectManager/entityCollection (products or categories for example) from custom API class ?

Should I use DI in constructor ?

Is this approach correct, or it breaks DI concept ?

<?php
    namespace Company\Module\Model;

    use Company\Module\Api\ModuleInterface;

    class Connector implements ModuleInterface
    {
        protected $_objectManager;

        public function __construct() {
            $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
            /** @var \Magento\Catalog\Model\ResourceModel\Product\Collection $productCollection */
            $this->_objectManager = $objectManager;
        }

       public function myMethod(){

            $productCollection = $this->_objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
            /** Apply filters here */
            $productCollection->load();
       }

    }

Maybe someone can give the path to existing api in magento from which I can learn from ?


texts:
I'm not able to access customer session in my block. Session does not return customer. Here is my code:

<?php
namespace YS\India\Block;

use Magento\Customer\Model\Session;
use Magento\Framework\View\Element\Template\Context;
use Magento\Framework\View\Element\Template;

class Header
extends Template
{
protected $session;
protected $customerRepository;

public function __construct(
    Context $context,
    Session $session,
    array $data = []
)
{
    $this->session = $session;

    parent::__construct($context, $data);
}

public function getBaseUrl(){
    return $this->_storeManager->getStore()->getBaseUrl();
}

public function isCustomerLogged(){
    return $this->session->isLoggedIn();
}

public function getLoggedCustomerName(){

    return $this->session->getCustomer()->getFirstname();
}
}

Then I created a test controller:

<?php

namespace YS\India\Controller\Auth;

use Magento\Framework\App\Action\Context;
use Magento\Customer\Model\Session;
use Magento\Customer\Controller\AbstractAccount;

class Test extends AbstractAccount
{
protected $session;

public function __construct(
    Context $context,
    Session $customerSession
)
{
    $this->session = $customerSession;
    parent::__construct($context);
}

public function execute()
{
    echo $this->session->isLoggedIn() ? "yes" : "no";

    echo "<br/>" . $this->session->getCustomer()->getFirstname();
}
}

This controller works fine and gives the first name.

Please help what is I'm missing in block

Thanks


texts: Magento 2.0.x Remove Account Tab in Mobile Menu

texts:
Summary:

I'd like to remove the entire Account tab from the Magento 2.0.x mobile menu. Our site doesn't have accounts for users, it's more like a catalog with no purchasing.

I've found many examples of how to remove items from the Account tab, but none to remove the tab itself.

Steps already taken:

I'm working in developer mode with cache disabled.
I've overridden app/code/Magento/Customer/view/frontend/layout/customer_account.xml to remove the customer_account_navigation block, but the menu still shows:

e.g. <my_theme_dir>/Magento_Customer/layout/customer_account.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="Customer My Account (All Pages)" design_abstraction="custom">
    <body>
        <referenceBlock name="customer_account_navigation" remove="true" />
    </body>
</page>

I've tried removing the block in default.xml in the same folder above. Didn't work.
I've done a bin/magento setup:di:compile and bin/magento cache:clear after updating the XML just to be sure that wasn't required. Neither helped.
I've hunted all throughout the code base to find anything related to "Account" or the navigation menu. Nothing I found and changed removed the tab.

Questions:

Am I overriding the correct file?
Am I overriding it in the correct location in my theme directory?


texts: Google indexing https for homepage - solutions?

texts:
It seems google has started indexing the secure url for my site's homepage - this has caused the CSS and JS links to break a la Https - layout broken, but I'm not sure how to fix it, as the answer in that thread didn't explain what needed to be changed, and I wouldn't even know where to start with google

Does anyone know of a solution to either stop google indexing the secure homepage, or what to do to allow the CSS and JS files to have secure urls?


texts: How to check which admin user has added the products in admin backend magento 2.3.2

texts: I have multi websites site. I have multiple users with different user roles. Is there any way to save and check which admin user has added the product in admin panel backend.


texts:
I need to create a module which lets the backend user add tooltips to the products custom options. So I created a field which the user fills with the unique identifier of a cms block which contains the text for the tooltip.

So my train of thought here was to create a plugin which appends the content of the given cms block to the html of my custom options.

Vendor/Module/Plugin/OptionsBlockPlugin.php

<?php

namespace Vendor\Module\Plugin;

class OptionsBlockPlugin {

protected $resultPageFactory;

public function __construct
(
       \Magento\Framework\View\LayoutFactory $layoutFactory
    ){
       $this->_layoutFactory = $layoutFactory;
    }

public function aroundGetOptionHtml(\Magento\Catalog\Block\Product\View\Options $subject, callable $proceed, \Magento\Catalog\Model\Product\Option $option)
{
     $returnValue = $proceed($option);
     $tooltip = $option->getData('tooltip'); //string of identifiert (for example: 'myBlock')

      if ($tooltip) {

          $block = $this->_layoutFactory->create()->createBlock('Vendor\Module\Block\Product\View\Options\Tooltip');
          $content = $block->getContent($tooltip);

          if($content){
              $returnValue = $returnValue.'
'.$content.'
';
         }

     }

        return $returnValue;
    }

 }

And my block class:

Vendor/Module/Block/Product/View/Options/Tooltip.php

<?php

namespace Vendor\Module\Block\Product\View\Options;

use Magento\Cms\Api\BlockRepositoryInterface;
use Magento\Cms\Api\Data\BlockInterface;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\View\Element\Template;
use Magento\Framework\View\Element\Template\Context;

class Tooltip extends Template
{

    private $blockRepository;
    public function __construct(
        BlockRepositoryInterface $blockRepository,
        Context $context,
        array $data = []
    ) {
        $this->blockRepository = $blockRepository;
        parent::__construct($context, $data);
    }

    public function getContent($identifier)
    {
        try {
            $block = $this->blockRepository->getById($identifier);
            $content = $block->getContent();
        } catch (LocalizedException $e) {
            $content = false;
        }

        return $content;

    }

}

What am I doing wrong here? I just can't get the content of my cms block by its identifier. Can somebody help me out a bit?


texts: How to do the server side validation for login form?

texts: I have done client-side validation but how to do the server side validation for the login form.


texts:
In responsive mode, I can inspect element to see class and values of the search icon.

However in "desktop" mode, when inspecting element I haven't found the corresponding class to edit the search icon.

I know magento 2 uses font icons. I don't want to replace the icon. I just want to edit the color and size.

I created a custom theme which inherits from the Blank magento theme.


texts: Magento2 - Make zipcode requried for all countries

texts:
I want to make the zip-code fields on my website required, no matter the country the address is from. I've checked the magento settings

  Stores -> configuration -> general -> general -> country options

and under Zip/Postal Code is Optional for, there's always one country selected, I can't unSelect it. I have unchecked use system value.

Do I have to have at least one selected ?


texts:
I am working on a website geared for the South East Asia market. I have been told that many S.E.A. websites will add a randomly generated "fee" of some sort, perhaps equivilant to 1-2 cent USD to the order to either use as a reference number or to make the order totals different to differentiate the order when people are sending in bank wires and such.

The way it was explained to me is that it would be hard to tell what a bank wire is for if there are multiple orders with the same total value. It seems like Groupon Indonesia incorporates something like this under the "Payment Code" name.

Is there a way to accomplish this in Magento? The main thing is that the fee would need to be randomly generated and within a specific currency range.


texts: Product name is not showing up correctly on front-end

texts:
I have created simple and configurable products named
Orange OYOBox Maxi,
Aqua OYOBox Maxi,
Niagara OYOBox Maxi,
Dusty Cedar OYOBox Maxi,
Yellow OYOBox Maxi
Here simple and configurable product has different SKU.
here is my front-end

but when I click on color, for example orange, Maxi word disappears

I have named correctly, still, I am getting this problem.
here is a screenshot of associate products of orange oyobox maxi(configurable product)


texts: Magento 2 - Can't go to Category page from admin panel

texts:
so I have a few problems that I want to solve but I can't and I tried everything!

  I don't have any root category and I can't create via PHP file don't know why
  I can't go to admin>products>categories, it gives me a to many redirects error

Yesterday I had a Root Category...

So I'm scared because I probably deleted the category from the database and now I don't know what to do.


texts: Magento 2 : Add Search by Category in Advanced search

texts:
I tried the code of @Nitesh here Add search by category by Nitesh

and I got this error:

  Notice: Undefined property:
  Magento\CatalogSearch\Model\Advanced::$_objectManager in
  /opt/lampp/htdocs/mwh-das-original/vendor/magento/module-catalog-search/Model/Advanced.php
  on line 269

and also notice that category list doubled


texts: Which Magento version to use? Magento Community Edition (free version) or Magento Go or Magento Enterprise

texts:
I need to develop an e-commerce solution for a small scale business. Due to the limited budget, the development team is thinking of using the Magento Community Edition (free version) for this solution. However, based on the details given in http://www.magentocommerce.com/product/overview-compare, Magento Community Edition does not have Built-in Security. The solution to be developed needs to have a shopping cart and secure payment support, probably using an external payment gateway. In this case, would it be good enough to use Magento Community Edition ? (Because the site needs to have credit card payment handling, secure logins) Or would it be required to use Magento Go or Magento Enterprise ?

Thanks in advance for your feedback!


texts: zero subtotal cart - can I automatically select 'no payment information required'?

texts:
I'm on Magento 1.7 and use Magestore's gift-card plugin.

When someone buys something with a gift card, it's possible that the cart total can be zero.

When it does that, it still offers both payment options: "Credit Cards" and "No Payment Information Required" (I've got the "Zero Subtotal Checkout" option enabled.)

Is it possible to:

Have the "No Payment" option automatically selected? And/or:
Have the "Credit Card" option hidden?

I think the current system is confusing. If the total is zero, defaults should be selected so the user can just skip onward, rather than making the user click things.


texts:
I'm currently using Magento 1.9.
When i do a search in the search bar, search always returns me a page with all results(even above 900 results,so it's really really slow).
Pagination of results appears but when i click on any page number it simply reshows me all the results...it seems like that pagination doesn't work!
Could this behaviour depend on my installed Magento theme?
Is there a way to programmatically fix this problem?
Thank you.


texts: Remove index.php for multiple domains in htaccess

texts:
I have a multistore magento setup using domain aliases.
How do I remove the index.php from the domain alias sites in the htaccess file?
Below is my current code, which only removes it from the main site.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


texts: How can display group price greater than regular price in magento?

texts: I have list of products in which some products have group price is greater than regular price.currently I am getting only minimum price. Please help?


texts:
After 3 months of upgrading a Magento 2.0 to 2.3, I noticed many stock inconsistencies like items reserved and never removed, and the orders are closed.
Why does it happen and how could I check it?


texts: Magento 2 EE 2.1.x - is it possible to unarchive orders?

texts:
I would like to unarchive a set of orders that were inadvertently archived?

What happens in the database when you archive an order? Can that be safely reversed?


texts:
Is there a step needed to get Pagination to work when Solr Search is enabled?

Some background on our where we are:

We have Solr Search enabled and dialed in solrconfig.xml.  The results look good but we just noticed the Pagination isn't working? Do we have to pass different parameters so Solr?


texts: Customer email is required on facebook login

texts:
I'm Struggling with magento exeption when im trying to log in via facebook login and like free extension in Magento 1.9.1

This is my exeption log. I can see that Customer Email is required, does somebody know how to fix this exeption ?

a:5:{i:0;s:26:"Customer email is required";i:1;s:1863:"#0
appURL/app/code/core/Mage/Customer/Model/Resource/Customer.php(76): Mage::exception('Mage_Customer', 'Customer email ...')
#1 appURL/app/code/core/Mage/Eav/Model/Entity/Abstract.php(1122): Mage_Customer_Model_Resource_Customer->_beforeSave(Object(Mage_Customer_Model_Customer))
#2 appURL/app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Eav_Model_Entity_Abstract->save(Object(Mage_Customer_Model_Customer))
#3 appURL/app/code/community/Belvg/FacebookFree/controllers/CustomerController.php(101): Mage_Core_Model_Abstract->save()
#4 appURL/app/code/community/Belvg/FacebookFree/controllers/CustomerController.php(74): Belvg_FacebookFree_CustomerController->_registerCustomer(Array, Object(Mage_Customer_Model_Session))
#5 appURL/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Belvg_FacebookFree_CustomerController->LoginAction()
#6 appURL/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('login')
#7 appURL/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#8 appURL/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#9 appURL/app/Mage.class.php(656): Mage_Core_Model_App->run(Array)
#10 appURL/index.php(87): Mage::run('', 'store')
#11 {main}";s:3:"url";s:148:"APPURL/index.php/facebookfree/customer/login/?referer=aHR0cDovL2tpbmdkb21zb2x1dGlvbnMucGwvZnJ5a2FzeS9pbmRleC5waHAvY3VzdG9tZXIvYWNjb3VudC9sb2dpbi8,";s:11:"script_name";s:18:"APPURL/index.php";s:4:"skin";s:7:"default";}


texts: Magento 2: Showing grid in configuration page

texts:
How can I show the grid view of a table inMagento 2 configuration page?

I have a table of certain data and I need it to show it on the configuration page.

Is there a way to do so?

I want the gird to appear in this red area.


texts: Duplicate url issue when removing products from category in magento 2.3.3

texts:
When i try to remove products from category https://prnt.sc/vl7rt3, i get duplicate url error.
https://prnt.sc/vkscz9.
I know how to resolve it. but need to understand when a product is removed from a subcategory - how is it generating a duplicate url?
Can any one please explain me this?


texts: Invert product regular-price and old-price

texts:
someone could help me to know how to invert regular-price and old-price on bundles products (M2).
I found other threads about but them seems to not run on my site.
So I need to have as first old-price (strikethrough text) and than Regular-price.
Thanks in advance.


texts: How to add custom text to all email templates?

texts:
I want to add a custom text input field to admin/Marketing/Email templates/Add New Template.

This new text input should save it's value to the current email template content which I am creating.

I want to achieve that text appears after all rest content of the email template.

For a while, I'm trying to google it, unfortunately, I can't find what I am looking for.

Does anyone have an idea?


texts:
I have a controller rewrite (working fine) that rewrites the customer login action.

It's just an exercise, and I'm trying to automatically direct the user to the men's section of the store immediately upon login.

In the module's config (the one rewriting the controller), I have the following section:

<default>
    <customer_rewrite>
        <customer>
            <target_category_id>16</target_category_id>
        </customer>
    </customer_rewrite>
</default>

The overwritten login controller looks like this:

public function loginAction()
{
    parent::loginAction();

    $categoryId = Mage::getStoreConfig('customer_rewrite/customer/target_category_id');
    // Do more stuff here...
}

My question is this: When using Mage::getStoreConfig(), how does Magento know which config.xml to look in? Does it parse through all of them to find my unique node, or does it somehow get told which module's config to use?


texts: Placing an order returns MYSQL Duplicate Entry!

texts:
The error is as follows:

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
  '000000000-3' for key 'SALES_ORDER_INCREMENT_ID_STORE_ID', query was:
  INSERT INTO sales_order (state, status, protect_code,
  shipping_description, is_virtual, store_id, customer_id,
  base_discount_amount, base_grand_total, base_shipping_amount,
  base_shipping_tax_amount, base_subtotal, base_tax_amount,
  base_to_global_rate, base_to_order_rate, discount_amount,
  grand_total, shipping_amount, shipping_tax_amount,
  store_to_base_rate, store_to_order_rate, subtotal, tax_amount,
  total_qty_ordered, customer_is_guest, customer_note_notify,
  customer_group_id, quote_id, base_shipping_discount_amount,
  base_subtotal_incl_tax, base_total_due,
  shipping_discount_amount, subtotal_incl_tax, total_due,
  weight, increment_id, applied_rule_ids, base_currency_code,
  customer_email, customer_firstname, customer_lastname,
  customer_middlename, discount_description, global_currency_code,
  order_currency_code, remote_ip, shipping_method,
  store_currency_code, store_name, x_forwarded_for,
  total_item_count, customer_gender,
  discount_tax_compensation_amount,
  base_discount_tax_compensation_amount,
  shipping_discount_tax_compensation_amount, shipping_incl_tax,
  base_shipping_incl_tax, gift_message_id, base_credit_amount,
  credit_amount, msp_cod_amount, base_msp_cod_amount,
  msp_cod_tax_amount, base_msp_cod_tax_amount) VALUES (?, ?, ?, ?,
  ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
  ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
  ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

Have made the required entries in the sales_sequence_meta and sales_sequence_profile tables aswell.


texts: Upgrade to 1.92 Category tree showing, bug general information not

texts:
Upgraded to 1.92 and the front end works fine, but the back end there is only the category tree under manage categories. General information blank, as well there are no products linked to the category.

Any help to populate these would be greatly appreciated!


texts: How to install magento2.3.5-p1 in ubuntu20.04

texts:
I want to install magento2.3.5-p1 on ubuntu 20.04 LTS so can anyone having idea of how to do this please share with me.
Thank you in advance.


texts: How to regenerate product thumbs programatically?

texts:
I know there is a way to delete image cache:

protected function cleanImageCache()
{
    try {
        echo "Cleaning image cache... ";
        flush();
        echo Mage::getModel('catalog/product_image')->clearCache();
        echo "[OK]" . PHP_EOL . PHP_EOL;
    } catch (Exception $e) {
        die("[ERROR:" . $e->getMessage() . "]" . PHP_EOL);
    }
}

How to I regenerate the images after that?

I know that by browsing the site they get generated but before that happens (e.g. if some of them have not been browsed yet) Google Image bot gets 404 from the server which I want to avoid.


texts: Magento Multi-Store - What to be aware of?

texts:
So I have somethings I am wondering about using the multi-store capabilities of Magento.  So we just got Magento CE 1.8 setup for my company's main brand.  It is running great and we are loving it.  Now, the marketing department is working on getting another brand launched.  It will have it's own website and visual style.  We want to have the store portion of that site run on Magento as well.  I think we should give the multi-store option a try, but some of my colleagues feel that this is out of the question.  They are worried that modules we have purchased will either not work with multiple stores and/or that we will have conflicts.

What I am wondering is, what do we need to be aware of for using multi-store?  Can it host a second store that has it's own unique theme and style, and that is on it's own domain?  Will I have to worry about modules breaking on the second (or both) sites?  Are there things that I should know or check for that I have not even thought about?

I would really like to give this a try on our store, but frankly I would need to convince my colleagues it would work.  I want to jump on it and have a multi-store setup on one of our dev servers, but I want to be sure I do that properly as if it doesn't work there, then my idea will be axed.

Thank you!


texts: Magento API call doesn't return categories images

texts:
I'm currently working on an application that requires the display of categories images and was able to get the category image via this endpoint:
http://example.com/rest/V1/categories/12 where 12 is the category id.
It returns:
{
    "id": 12,
    "parent_id": 11,
    "name": "Tops",
    "is_active": true,
    "position": 1,
    "level": 3,
    "children": "14,15,16,17",
    "created_at": "2020-10-26 13:04:12",
    "updated_at": "2020-11-09 15:31:03",
    "path": "1/2/11/12",
    "available_sort_by": [],
    "include_in_menu": true,
    "custom_attributes": [
        {
            "attribute_code": "image",
            "value": "/pub/media/catalog/category/31uKiYhGcSL._AC_.jpg"
        },
        {
            "attribute_code": "display_mode",
            "value": "PRODUCTS"
        },
        {
            "attribute_code": "is_anchor",
            "value": "1"
        },
        {
            "attribute_code": "path",
            "value": "1/2/11/12"
        },
        {
            "attribute_code": "children_count",
            "value": "4"
        },
        {
            "attribute_code": "custom_use_parent_settings",
            "value": "0"
        },
        {
            "attribute_code": "custom_apply_to_products",
            "value": "0"
        },
        {
            "attribute_code": "url_key",
            "value": "tops-men"
        },
        {
            "attribute_code": "url_path",
            "value": "men/tops-men"
        }
    ]
}

But the problem is it doesn't return the subcategories of that category, to get the subcategories, I need to go to http://example.com/mag24/rest/V1/categories?depth=1&rootCategoryId=12
Which returns:
{
    "id": 12,
    "parent_id": 11,
    "name": "Tops",
    "is_active": true,
    "position": 1,
    "level": 3,
    "product_count": 678,
    "children_data": [
        {
            "id": 14,
            "parent_id": 12,
            "name": "Jackets",
            "is_active": true,
            "position": 1,
            "level": 4,
            "product_count": 176,
            "children_data": []
        },
        {
            "id": 15,
            "parent_id": 12,
            "name": "Hoodies & Sweatshirts",
            "is_active": true,
            "position": 2,
            "level": 4,
            "product_count": 208,
            "children_data": []
        },
        {
            "id": 16,
            "parent_id": 12,
            "name": "Tees",
            "is_active": true,
            "position": 3,
            "level": 4,
            "product_count": 192,
            "children_data": []
        },
        {
            "id": 17,
            "parent_id": 12,
            "name": "Tanks",
            "is_active": true,
            "position": 4,
            "level": 4,
            "product_count": 102,
            "children_data": []
        }
    ]
}

One solution would be to get all the subcategories and then loop through each of them to get the details, but I'm looking for a simpler and efficient approach if possible?


texts: Apply discount to bundle based on selected options

texts:
I have about 300 bundle products consisting of a set of wall art products. Each option represents a certain design, and each option has 2 possible selections: a framed print and an unframed print of the same design.

From the front end, the user can either select all framed prints, or all unframed prints for a single bundle (mixing is not allowed).

I would like to apply a discount only if the user selected the framed prints, but not if they selected the unframed prints.

What are my options? I've taken a short look at the Product Bundled Discount extension, but it doesn't seem to support this.


texts:
<action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>

I know this is how we set image in magento using layout xml files. But I tried to locate this function in my magento app. but I was not able to find the function definition.

And i believe there are some more function i tried to locate, but failed

eg: setImgAlt


texts:
I have deployed Magento 2.1.2 CE and have setup the database to use with this instance.

# http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-install.html#instgde-install-cli-magento
php ${DIR_MAGE}/bin/magento setup:install  \
--admin-firstname="${ADMIN_FIRSTNAME}" \
--admin-lastname="${ADMIN_LASTNAME}" \
--admin-email="${ADMIN_EMAIL}" \
--admin-user="${ADMIN_USER}" \
--admin-password="${ADMIN_PASSWORD}" \
--base-url="${BASE_URL}" \
--backend-frontname="${BACKEND_FRONTNAME}" \
--language="${LANGUAGE}" \
--currency="${CURRENCY}" \
--timezone="${TIMEZONE}" \
--use-rewrites="${USE_REWRITES}" \
--use-secure="${USE_SECURE}" \
--use-secure-admin="${USE_SECURE_ADMIN}" \
--admin-use-security-key="${ADMI_USE_SECURITY_KEY}" \
--session-save="${SESSION_SAVE}" \
--cleanup-database \
--db-host="${DB_HOST}" \
--db-name="${DB_NAME}" \
--db-user="${DB_USER}" \
--db-password="${MAGE_DBPASS}" \

I want to re-deploy Magento instance and I want to use the same DB. I tried to run this command after re-deployment:

php ${DIR_MAGE}/bin/magento setup:config:set  \
--backend-frontname="${BACKEND_FRONTNAME}" \
--key="${SECURE_KEY}" \
--session-save="${SESSION_SAVE}" \
--db-host="${DB_HOST}" \
--db-name="${DB_NAME}" \
--db-user="${DB_USER}" \
--db-password="${MAGE_DBPASS}" \

this message is displayed:

We saved default values for these options: db-host, db-engine, db-prefix, db-model, db-init-statements.

but when I go to the front of my site I see that setup mode is started:

How can I re-deploy Magento 2 CE and re-connect to existing DB?


texts: prevent form submit on enter in magento catalogsearch

texts: default magento search work using hit enter key or submit button.but now i need this search work only for pressing submit button and not work for hit enter key.is there any way for this?. I am using magento 1.8.


texts:
I am having some issues with security patch SUPEE-8788 ON Magento version 1.9.2.3 I have looked in the applied patches and it only lists 7405. So when I have ran 8788 v2 I came across some errors:

app/etc/modules/Mage_All.xml
skin/adminhtml/default/default/boxes.css
patching file skin/adminhtml/default/default/media/flex.swf
patching file skin/adminhtml/default/default/media/uploader.swf
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file skin/adminhtml/default/default/media/uploader.swf.rej
patching file skin/adminhtml/default/default/media/uploaderSingle.swf
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file skin/adminhtml/default/default/media/uploaderSingle.swf.rej
patching file skin/adminhtml/default/default/xmlconnect/boxes.css
Hunk #1 FAILED at 90.
1 out of 1 hunk FAILED -- saving rejects to file skin/adminhtml/default/default/xmlconnect/boxes.css.rej

I have tried replacing the files with different version from Magento but that has not worked either.

Could anyone help with why the patch is failing?

Thanks


texts: How to configure sales emails for Magento 1.x.

texts:
I would like to setup sales emails.
like, When customer purchase an order or make payment or abandoned checkout, website sends me an email.

How to configure it ?
our website is : https://thevcollection.com

Thanks


texts: render dropdown from product dropdown attribute- Magento 2.0.1

texts: I have created one drop down attribute, I followed this tutorial to get selected values from that attribute. I successfully get the result, But I want to render whole drop down.What I do for achieve this?


texts:
I'm having trouble displaying the group price to all users, i'm running 1.9

it obviously works if you're logged in and a user, but i need to display it to non members to entice them to become a member.


texts: Magento2 - Understanding dev/travis/before_script.sh

texts:
I am trying to set up Travis to be used as our Continuous integration server. Magento comes with a .travis.yml where it has:

matrix:
    - TEST_SUITE=unit
    - TEST_SUITE=integration INTEGRATION_INDEX=1
    - TEST_SUITE=integration INTEGRATION_INDEX=2
    - TEST_SUITE=integration INTEGRATION_INDEX=3
    - TEST_SUITE=static

and dev/travis/before_script.sh

        # divide test sets up by indexed testsuites
    i=0; j=1
    for test_set in $test_set_list; do
        test_xml[j]+="            <directory suffix=\"Test.php\">$test_set</directory>\n"

        if [[ $j -eq $INTEGRATION_INDEX ]]; then
            echo "  + including $test_set"
        else
            echo "  - excluding $test_set"
        fi

        i=$((i+1))
        if [ $i -eq $test_set_size ] && [ $j -lt $INTEGRATION_SETS ]; then
            j=$((j+1))
            i=0
        fi
    done

Am I reading it right - that the above does nothing but split the tests up into three test_suites so that we don't go over some presumable limit set by travis-ci.org?


texts: Magento 2: Redirect from Observer Not Working on Category Page

texts:
I have below code, which in not working from Category Listing Page.

Example: http://magento2-demo.nexcess.net/gear/bags.html

namespace Custom\Module\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Event\Observer;

class TestObserver implements ObserverInterface {
    protected $_responseFactory;
    protected $_url;
    protected $_objectManager;

    public function __construct(\Magento\Framework\App\ResponseFactory $responseFactory,\Magento\Framework\UrlInterface $url, \Magento\Framework\ObjectManagerInterface $objectManager)
    {
        $this->_responseFactory = $responseFactory;
        $this->_url = $url;
        $this->_objectManager = $objectManager;
    }

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

        $controller = $observer->getControllerAction();
        $response = $observer->getResponse();
        $controllerAction = $observer->getEvent()->getControllerAction();
        $cartUrl = $this->_url->getUrl('checkout/index/index');
        $observer->getResponse()->setRedirect($cartUrl);
        exit;

        $response = $observer->getEvent()->getData('response');
        $response->setRedirect($cartUrl)->sendResponse();
        exit;
        $observer->getEvent()->getFront()->getResponse()->setRedirect($cartUrl);
        //$observer->getResponse()->setRedirect($cartUrl);
        exit;

        $response = $observer->getEvent()->getResponse();
        $response->setRedirect($cartUrl);
        exit;
    }
}

It gives below error

  Fatal error: Call to a member function setRedirect() on null in

In Plugin it works fine Magento 2: How to redirect to checkout page after product added to cart via Observer/Plugin from category page?

How to use same thing in Observer?


texts: Magento 2 - Get Collection using custom product Ids and also sort them as the same order as product Ids passed

texts:
I need to get the collection using custom product Ids but it should sort the collection based on the sequence product Ids given

Here is what I am doing now, but it is not sorting in sequence

$collection->addAttributeToFilter('entity_id', array('in' => $productIdsarray));

Any help would be appreciated


texts: magento 2 cannot do shipment for the order 404

texts:
In Magento 2 - I'm trying to change the order from processing to shipped, I seem to have no problem doing this in chrome, however when I hit the ship button I get the following error:

Its IE11 so its not a super old browser but it keeps happening, I can't find any error logs for it and I'm pretty stumped.

Has anyone else encountered this issue? Is there a fix for it?


texts:
I am trying to upload image in backend but i am getting below error in admin.

I am not handling to debug php code and only familiar with html/css + basics js and many modules are already installed in default system  so don't know where the exactly the issue is might be fileuploader.php file.

So if anyone has idea about patch work or quick fix then it would be helpful.I am in windows system. I don't want to fix it in proper way but i need some patch so i can later revert that patch.|

I already tried deleting pub/media gave permission to them but it seems not an issue.

I have checked in console and got below