texts: "Undefined index: interface" error from Magento 2 swagger webapi

texts:
I'm getting the following error when loading the swagger routes:

Undefined index: interface in /mnt/c/develop/php/mage2/vendor/magento/module-webapi/Model/AbstractSchemaGenerator.php on line 156 {"exception":"[object] (Exception(code: 0)

I'm trying to add my own swagger endpoint.  My webapi.xml looks like:

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">

<route url="/V1/my/custom/route" method="GET">
    <service class="Vendor\Module\Api\MyInterface" method="myMethod"/>
    <resources>
        <resource ref="anonymous" />
    </resources>
</route>

What does this error mean?


texts: Elasticsearch 5.0+ not working magento 2.3

texts:
I have installed elasticsearch in my local server successfully.I am not able to reindex the catalog search indexer.Please check attached screenshots.

When i click on the test connection then it shows me successful connection.Please check the configuration and let me know why it does not working?

Do i need to any third party extension to use elasticsearch like smile elastic search or else etc...?

I am using Magento 2.3 version.


texts:
Below code won't work when i put it in Content -> Homepage -> Show/Hide Editor

 @media (min-width: 768px), print
    .nav-sections {
        margin-bottom :0;
     }


texts: Magento 2: how to set background color for product photo

texts:
anyone know how or it is possible to set background color for product photo?

example when I added clean product photo then final I want after save magento display (now display on white bg):

@ Kalyan Chakravarthi V

Now when I added product with image and save then display on white background:

I want after add product with image (background transparent or white) and save then display on website with an automatic background (grey) added by magento.

example:

@update code theme.less

.label,
label {
    font-size: 13px;
    color: #5f5f5f;
    padding: 0;
    margin: 0 0 9px;
    font-weight: 400;
    text-align: left;
    line-height: inherit;
}

::-webkit-input-placeholder {
    color: #c1c1c1
}

:-moz-placeholder {
    color: #c1c1c1
}

::-moz-placeholder {
    color: #c1c1c1
}

:-ms-input-placeholder {
    color: #c1c1c1
}
.gallery-placeholder {
    background-color: yellow;
}


texts: Magento 2 view product give different result for different category

texts:
For learning purpose I just added following css in my Module:

.newcolor
{
   background: #ffff00 !important;
   box-shadow: 1px 5px 5px 1px rgba(66, 103, 178, 0.51);
   font-size: 23px !important;
   font-weight: bold !important;
   border-radius: 10px;
   height: 60px;
   font-family: cursive !important;
}

Class newcolor implementation in addtocart.phtml

        <button type="submit"
                title="<?= /* @escapeNotVerified */ $buttonTitle ?>"
                class="action primary tocart newcolor"
                id="product-addtocart-button">
            <?= /* @escapeNotVerified */ $buttonTitle ?>
        </button>
        <?= $block->getChildHtml('', true) ?>

Here is my Layout

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

        <css src="Senheng_Mycart::css/colorcart.css"/>

       <referenceBlock name="product.info.addtocart">
           <action method="setTemplate">
               <argument name="template" xsi:type="string">Senheng_Mycart::catalog/product/view/addtocart.phtml</argument>
           </action>
       </referenceBlock>

</page>

Result:

Its working well for this product (button become yellow).

But does not work for "short pant" product.

My Question is why class 'newcolor' does not shown in the product with category "short pant" ?


texts: Magento1 order extra steps for custom items

texts:
We have a Magento1 store that sells shirts. The customers can upload a logo, or send some text that we will print on the shirt for them.

Currently, for each order that needs a print job (as opposed to just picking an item off the shelf and shipping it), we print the shirt, then set the order status to "printed" and then the warehouse knows to ship out the order.
When we're dealing with 10 orders a day, that's feasible, but dealing with 1000 orders a day, means that a lot of orders that need a print job get skipped until the shipping staff realizes it, orders get delayed and customers aren't happy.
We want to create a new grid in the admin that will loop through all non completed orders, and find items that need to be printed, this way no items get overlooked.
Once the item is printed, a team member can mark it (the item not the order) as printed and it won't show on that grid.

My question is what's the best programming approach from the following two options:

Option 1:
Every time the new grid is loading, it will just loop through the sales_flat_order_item table and pull all the relevant products from there - we would add a print_status column to that table so that we could know what was printed already and not display it.

Option 2:
We create a new table in the database called items_to_print and we add an observer after each order that will populate that table with the necessary information (order number, the logo file, customer comments...). Then when we load our new grid it will simply load the items_to_print table.

The advantage of option 1 is that we're not adding extra tables and duplicate data to the database, but I'm concerned that the load time on that grid will be too heavy if it's loading a table of which it only needs a fraction, since not all items need a print job.

The advantage of option 2 is that getting the data into our new grid should be super fast, but I'm concerned about unnecessary and duplicate data in the database. I'm also concerned about orders failing if the observer runs into an error for some reason (we could use a cron instead of an observer)

I hope my question is clear enough, I just want to know programmatically speaking, what would be the best approach - thanks!


texts: Difference between "Mage_Core_Exception $e" and "Exception $e"

texts: I found different cases to use Magento throw exception, I want to know what is the difference between  (Mage_Core_Exception $e) and (Exception $e) ? I found What's the preferred way of throwing exceptions in Magento? answer, but it's not precise for me. Is Mage::throwException is the correct one and that we should use ?


texts:
How to create a new attribute and put it in the product creation form as custom field?

It may be that I am calling it wrong, may be it's not an attribute but a product feature or characteristic.

The idea is to have an additional field, like the log description or the short description.

Thanks!


texts: Why Product attribute assigned to all attribute set

texts:
While creating set of product attributes via program, it gets assigned to existing Product Sets as well as to newly created Product Sets. I don't want to assign those created attribute to any Attribute Set.

Can anyone help me to solve this issue.

Code Used:

       $eavSetup->addAttribute(
        \Magento\Catalog\Model\Product::ENTITY,
        'attribute_id',
        ['type' => 'varchar',
            'backend' => '',
            'frontend' => '',
            'label' => 'Attribute Name',
            'input' => 'text',
            'class' => '',
            'source' => '',
            'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
            'visible' => true,
            'required' => false,
            'user_defined' => false,
            'default' => '',
            'searchable' => false,
            'filterable' => false,
            'comparable' => false,
            'visible_on_front' => false,
            'used_in_product_listing' => true,
            'unique' => false

        ]
    );


texts: Magento 2.3.3 PayPal payflow pro problem while checkout

texts:
I have upgraded my store to latest magento version 2.3.3. I have started testing and found one issue on checkout. I have tried placing order through paypal payflow Pro(credit card payment method) and I couldn't place order successfully. However, when I have tried paying thorough PayPal Express then order got placed successfully but using payflow Pro I couldn't place order.

Any one have facing this type of issue or any one know the solution of this issue?


texts: is there a way to get Breadcrumbs to display correct information

texts:
when you navigate to an item that was in a 3rd level category, if you copy that url and go to a completely different product in a completely different 3rd level category and then paste in the URL you copied only the product name in the breadcrumbs is updated, the category path wont change

ie
go to Men's, Clothing, Coats, Men's Coat 1, the Breadcumbs will say something like "Home > Men's > Clothing > Coats > Men's Coat 1",

copy the URL than go to Women's, Footwear, Heels, Women's Heel 1, the breadcrumb will be "Home > Women's > Footwear> Heels > Women's Heel 1"

Now if you paste the URL you copied from the Coat, the Breadcrumbs will be "Home > Women's > Footwear> Heels > Men's Coat 1" which isn't correct

i set up a clean build of magento without any of the extensions and duplicated the test and it did the same so it's obviously a problem with magento, i'm wondering if there already exists a way to fix this

UPDATE: my current solution that i am using now is to rebuild the breadcrumbs when a customer enters the product view which is hardly efficient so i still want to know if there is a better why


texts:
Our catalog staff accidentally changed URL key so we have to revert it back to original.

We have changed and updated the product URL key to its original value:

And flushed both Index and Cache Storage. However the wrong URL is still being used but the updated URL key is not working.

Why? It's really weird. What are we doing wrong here?

Update

After some tests, it seems updating the URL Key of the product only affects the URL rewrites of the French store view but NOT the Default store view. However I update the URL key, the URL rewrite of the Default store view stays the same. Why?


texts: Problem when validating city field when registering new address at checkout M2

texts:
In Magento 2 I replaced the city text field with a select in the new address registration form in the checkout, but selecting a select option and trying to send the form shows that the field is required, it appears that it does not recognize the value.

The procedure I followed was as follows:

In my module, file checkout_index_index.xml

<item name="shipping-address-fieldset" xsi:type="array">
  <item name="city" xsi:type="array">
      <item name="config" xsi:type="array">
        <item name="elementTmpl" xsi:type="string">Vendor_Module/form/element/select</item>
      </item>
      <item name="sortOrder" xsi:type="string">900</item>
  </item>
</item>

And my element template html is:

<select name="city" id="city" class="city"></select>

When hit save:

The values of the select are being populated with ajax when the zip code is filled.

when I click Save the following js error is displayed:

How to make it work?


texts: upgrade magento 2.3.0 to 2.4.1 admin not working

texts: How can I fix “Refused to load the stylesheet because it violates the following Content” in Magento 2.4.1


texts:
I had developed an ecommerce site. I have both simple and virtual products in my site.so when i add simple product to cart and then i add virtual product then i am getting the following error.

Nominal item can be purchased standalone only. To proceed please remove other items from the quote.

I think we cannt add virtual and simple both at a time.

please help me how to add both to cart at a time.


texts: Magento Security Patch SUPEE-5994, how do I verify installation?

texts: After installing security patch SUPEE-5994, how do I verify whether patch is installed successfully. Will the test at http://magento.com/security-patch find out if the patch is installed?


texts: How to save multiselect values programmtically in magento 2?

texts:
I am unable to save product multiselect values .I tried both ways
Here is code
Way 1
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $_product = $objectManager->create('Magento\Catalog\Model\Product');
        $_product->load(757);
        $string = '5641,5642'; // option ids
     $_product->setData('multi_select_color_code',$string);
                $_product->save();

Way 2:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $_product = $objectManager->create('Magento\Catalog\Model\Product');
        $_product->load(757);
        $array= array('5641','5642'); // option ids
     $_product->setData('multi_select_color_code',$array);
                $_product->save();


texts:
I am currently using Magento 2.2 Community Edition. I want the feature of Enterprise Edition B2B.

So where can i purchase this feature. I don't want to buy Enterprise Edition i just want the extension.


texts:
I have magento 2.1.1 and I want to remove custom field label which is added by 3th party module. In that module appropriate xml file is placed by path Namespace_ModuleName/view/frontend/layout/checkout_index_index.xml
I copied that file by path app/design/frontend/mynamespace/custom-theme/Namespace_ModuleName/layout/checkout_index_index.xml
and it works because I can easily overwrite label text in this file. But  I need to remove label at all. I tried to just remove a line which add label but seems like original file add it during xml merging.
Is it possible to remove it? Here is xml fragment


texts: Applying No Coupon & Specific Coupon to one Cart?

texts:
****Update: I just disabled "No Coupon" and only applied the "Specific Coupon" and it is still applying the discount to excluded category 1298. This tells me that this is NOT the correct way to exclude a category? How do I correctly exclude a category for "line items"???

I have a "No Coupon" (or an auto applying 15% off coupon) that only applies to category (id) 1298. But I also have a "Specific Coupon" (or a 10% off coupon requiring a code) running where I have excluded category (id) 1298 but that the customer should also be able to apply to the same cart as other items may be eligible by certain brands.

This does not work though. If you put an item in your cart from category 1298 the auto 15% discount is correctly applied to category (id) 1298 items only BUT you can still apply the "Specific 10% Off Coupon" to category 1298 even though that category is excluded under conditions?!

Within the "Specific Coupon" I setup the following conditions under ACTIONS:
Apply the rule only to cart items matching the following conditions
If ALL of these conditions are TRUE:
Category is not 1298
Brand is not Nearly
Brand is not Fortan
Brand is not etc

Thank You for any help.


texts: add custom field to admin > permission > add user

texts:
i want to add custom field to admin permission add user.

Via module / observer pls guide me how can i do it


texts: How to set default Product In Websites attribute for all new products?

texts: When adding new products you have to set Product In Websites attribute in Websites tab. Is there a way to set a default website automatically? I only have one website, so I think it is an unnecessary step to check the main website checkbox for every product. Am I wrong?


texts: Magento 2 custom email template not including header

texts:
When I load my custom template in Marketing->Email Templates and look at the preview the email looks fine and includes the header, but when I send an email using the custom template only the footer is included, the header and css styles are not included.

How the template header and footer are added:

<!--@subject My Subject  @-->
<!--@vars {
"var customer.email":"Customer Email",
"var customer.name":"Customer Name"
} @-->

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

template content

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


texts: Magento 2.2.6 issue: php bin/magento catalog:image:resize

texts:
When run command php bin/magento catalog:image:resize, it stops after few images and shows error.

How fix this?

I tried manually reupload images to this folder after this problem.


texts: Product page images cache generation issue after Magento upgrade

texts:
Product page images are showing thumbnails instead of product images. On the same page related products images are showing fine. Only products images are having issues. The image url is accessible but shows thumbnail.
I tried debugging and found that the cache folder for respective product images aren't generating. I have tried giving permissions, changing ownership, deleting cache folder and refreshing page to generate again. But none works.
The catalog:image:resize command generates the cache folders and images are shown after that, but if I flush images cache or creates a product that have different image name which will require new cache folder, then issue appears again.
Is their any permanent solution rather than just running catalog:image:resize command again n again?
I have upgraded my Magento from 2.1.7 to 2.3.4


texts:
In Magento 2 the profiler can easily be turned on with an environment variable

SetEnv MAGE_PROFILER [output]

with [output] one of "html", "firebug", or "csvfile"

Now if I want to profile a CLI script, i.e. a bin/magento command, this does not work. Of course, the "firebug" and "html" output formats do not make much sense, but "csvfile" does, which writes the profile result in var/log/profiler.csv.

I tried

MAGE_PROFILER=csvfile bin/magento

to no avail.

I found this code in app/bootstrap.php that checks for the MAGE_PROFILER environment variable:

if (!empty($_SERVER['MAGE_PROFILER'])
    && isset($_SERVER['HTTP_ACCEPT'])
    && strpos($_SERVER['HTTP_ACCEPT'], 'text/html') !== false
) {
    \Magento\Framework\Profiler::applyConfig(
        $_SERVER['MAGE_PROFILER'],
        BP,
        !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'
    );
}

And apparently it only activates the profiler for HTTP requests (excluding AJAX request)

This works:

HTTP_ACCEPT="text/html" MAGE_PROFILER=csvfile bin/magento

But it's a mere workaround. Is there another, more standard way to profile CLI calls?


texts: Add an event observer after customer enters his shipping adress in checkout

texts:
I want to add an event when a customer enters his shipping adress in checkout
I tried to create a module but it goes back to the cart
here is as follows

Observer.php:

class Mantel_Shippingredirect_Model_Observer
{
       public function controller_action_predispatch_checkout_onepage_saveBilling($observer)
        {
            $address = $observer->getCustomerAddress();
            if($address->getCountry() =='US'){
                              $observer->getRequest()->setParam('return_url','http://www.google.com/');
                             }

        }
}
?>

config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <Mantel_Shippingredirect>
            <version>0.1.0</version>    <!-- Version number of your module -->
        </Mantel_Shippingredirect>
    </modules>
    <frontend>
        <routers>
            <shippingredirect>
                <use>standard</use>
                <args>
                    <module>Mantel_Shippingredirect</module>
                    <frontName>shippingredirect</frontName>
                </args>
            </shippingredirect>
        </routers>
        </frontend>
        <global>
            <models>
              <mantelshippingredirect>
                <class>Mantel_Shippingredirect_Model</class>
              </mantelshippingredirect>
            </models>
            <events>
                <controller_action_predispatch_checkout_onepage_saveBilling>
                    <observers>
                        <shippingredirect>
                            <type>singleton</type>
                            <class>mantelshippingredirect/observer</class>
                            <method>controller_action_predispatch_checkout_onepage_saveBilling</method>
                        </shippingredirect>
                    </observers>
                </controller_action_predispatch_checkout_onepage_saveBilling>
            </events>
        </global>
</config>

and my Mantel_Shippingredirect.xml

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

What is wrong? Please help me!!


texts: Magento2 Custom Multi shipping address in checkout page

texts:
I am working on magento2 checkout and I want to 1order split into multiple orders based on number of shipping addresses and other orders as child order so how can I handle it?
Thanks in advance!!!


texts: Change all category page layouts to one column in Magento 1.9

texts:
How do I change all category page layouts to one column, no layered navigation, no compared products, no recently viewed products on sidebar, etc.?

NOTE: I want to achieve scope with XML layout not from admin; I know admin stuff.

How do I achieve the above scope?


texts: How to get PDF file URL uploaded in system.xml. Magento 2

texts:
I'm trying to upload PDF file via system.xml my code is
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="infozzle" translate="label" sortOrder="11">
            Infozzle Extension
        </tab>

            Product PDF File
            <tab>infozzle</tab>
            <resource>Infozzle_ProductPageCustom::config_productpagecustom</resource>
            <group id="general" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                General Setting
                    <field id="custom_file_upload" translate="label" type="Magento\Config\Block\System\Config\Form\Field\File" sortOrder="6" showInDefault="1" showInWebsite="1" >
                    PDF File Upload
                    <upload_dir config="system" scope_info="1">pdf</upload_dir>
                </field>

            </group>

    </system>
</config>

n my Helper Function is
public function getPDFfile()
    {
        $getarray = $this->scopeConfig->getValue('infozzle_productpagecustom/general/custom_file_upload',
        \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
        return $getarray;
    }

so when I get the file using Helper in phtml like
echo $helper->getPDFfile();

then it returns me
Asad's Resume.pdf,application/pdf,/tmp/phpDGlEAI,0,65105 While When I tried to Delete the existing file it is not deleting n adding more files

how can I get the exact url of the file n why it returns such ambiguous result


texts: When I check /pub/media/catalog/product/cache/, there are many folders. Each folder contains the same images with different size. So I'm not sure about why there are same images with different size.


texts: Currently I have weight vs destination added as shipping method which works but it only calculates the item weight and gives the shipping charges accordingly, I would like to show the shipping charges for the item after its packaging is done. How do I configure that?


texts: addFieldToFilter() method with OR conditions between groups of fields with AND conditions inside

texts:
Is it possible to get the SQL condition like this:

  WHERE (
  (field_1 = 'a' AND field_2 = 'b')
   OR
  (field_1 = 'c' AND field_2 = 'd')
   OR ...
  ) ?

using addFieldToFilter() method?

I know about getSelect() method. The question about addFieldToFilter method only.


texts:
I have a problem with the .htaccess file in the root category of my server. It is not there.
I searched for hours (google), but i haven't found any solutions. (Magento 1.9)

I activated "display hidden files" in Filezilla (I'm not working with APACHE - I'm working with a Testdomain), but it is still lost...

I need the .htaccess file for setting up Multilingual Websites on my Server.

The only .htaccess file I Found is the one in the var folder:

Order deny,allow Deny from all

Thanks.!


texts: Magento1.9 Assign products to different categories for different storeviews

texts:
I have a product that I want it to be displayed under different categories for different store views.

My problem is, for example if I set this product to Macbook Pro for English store view, and then in another storeview I set this product to Macbook, then it will change the category I set for the English site. It seems I cannot have products set to different categories for different storeviews.


texts: Invalid key when accessing admin and cart stops working

texts:
Looking for help with the following invalid key error:

I keep getting this every couple of days. When it happens the cart seems to stop working too. Nothing gets added when clicking add to cart. Any ideas?


texts: how to check availability of custom image attribute

texts:
i know this question is just being asked many times but i have some problem in custom image attribute
i create new custom image(image180) attribute with magento admin & using this code to get image in frontend & this code working properly & showing image
how to correct this & thanks in advance

<img src="<?php echo $this->helper('catalog/image')->init($_product, 'image180'); ?>">

but i have to check if this image is avabile then run the code if not avaible don't run this code because if this attribute not avaible fir specific product the product page is not load & show the error & i am using this code to check avability of custom image but not working what going wrong

<?php if ($_product->getimage180()):?>

<img src="<?php echo $this->helper('catalog/image')->init($_product, 'image180'); ?>">

                <?php endif;?>


texts: Rest Api add additional attribute filter in Layer navigation API

texts:
I have successfully created Layer navigation REST API using given solution on this question Magento 2 api - How to get layer navigation filters available in rest api?
However I want if someone clicked on a particular brand then other brand should be remove from layer navigation
Currently it's return result based on category id, I would like to add more filter like Brand, color etc

 public function __construct(\Magento\Framework\Webapi\Rest\Request
        $request){

                $this->_request         = $request;
        }

/**
     * Retrieve filterlist
     *
     * @api
     * @return array
     */
    public function retrieve(){

        $category = $this->_request->getParam('categoryId');

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

        $filterableAttributes = $objectManager->getInstance()->get(\Magento\Catalog\Model\Layer\Category\FilterableAttributeList::class);

        $appState = $objectManager->getInstance()->get(\Magento\Framework\App\State::class);
        $layerResolver = $objectManager->getInstance()->get(\Magento\Catalog\Model\Layer\Resolver::class);
        $filterList = $objectManager->getInstance()->create(
            \Magento\Catalog\Model\Layer\FilterList::class,
                [
                    'filterableAttributes' => $filterableAttributes
                ]
            );

            $layer = $layerResolver->get();
            $layer->setCurrentCategory($category);
            $filters = $filterList->getFilters($layer);
            $maxPrice = $layer->getProductCollection()->getMaxPrice();
            $minPrice = $layer->getProductCollection()->getMinPrice();

        $i = 0;
       foreach($filters as $filter)
       {
           //$availablefilter = $filter->getRequestVar(); //Gives the request param name such as 'cat' for Category, 'price' for Price
           $availablefilter = (string)$filter->getName(); //Gives Display Name of the filter such as Category,Price etc.
           $items = $filter->getItems(); //Gives all available filter options in that particular filter
           $filterValues = array();
           $j = 0;
           foreach($items as $item)
           {

               $filterValues[$j]['display'] = strip_tags($item->getLabel());
               $filterValues[$j]['value']   = $item->getValue();
               $filterValues[$j]['count']   = $item->getCount(); //Gives no. of products in each filter options
               $j++;
           }
           if(!empty($filterValues) && count($filterValues)>1)
           {
               $filterArray['availablefilter'][$availablefilter] =  $filterValues;
           }
           $i++;
       }

        echo json_encode($filterArray);
        exit;

    }


texts: Use Magento opConfig.reloadPrice() with jQuery and Custom options

texts:
I am trying to use the Magento reloadPrice() with jQuery to refresh the price. I have a configurable product with custom options. Without jQuery, the SELECT code for the option is :

<select id="select_281" class=" required-entry product-custom-option" title="" name="options[281]" onchange="opConfig.reloadPrice()">
<option value="0"></option>
<option rel="1" price="0" value="275"></option>
<option rel="2" price="0" value="276"></option>
</select>

With jQuery I remove the Prototype onchange code and try to calculate the price for my option (say $50) :

jQuery('#select_281').removeAttr('onchange').change(function(){

//Price of the option to add to a basic price of the conf product
price = 50;

optionsPrice.changePrice('opConfig', price);
optionsPrice.reload();

});

Price of the configurable product: $150.

Add an option (SELECT): we add $50.

The new price $200 is displayed in the product page, But not in the cart page : the cart page displays just $150 which is not correct.


texts: Hello i want to firstly disable cache while backup & after complete it again enable cache. how to do that kindly reply me


texts: admin url redirects to customer view page in magento2.3

texts:
I am a beginner to magento. I am currently using magento version 2.3 and
http://localhost/myproject/admin url redirects to customer view page instead of appearance of admin login form. Thank you in advance.


texts: File permission change to 640 after uploading via Wysisyg - [Patch 7882 fixes]

texts:
UPDATE: Since the duplicate ticket on this doesn't actually answer this question I have posted this patch SUPEE-7882

https://github.com/brentwpeterson/magento-patches/blob/master/EE1.14/PATCH_SUPEE-7882_EE_1.14.2.2_v1.sh

Our Media folder has the files permissions set for 644 and if we switch 640 we can a 404 that image.

Problem: When we upload a file through wysisyg it saves as 640.

Host is Nexcess

I have even tested by changing the entire media folder to 777, then uploading a file.

Here is the file after uploading

-rw-r----- 1  121079 Jan 29 17:55 wagentoAfter.png


texts: REST API Update Product HTTP Method PUT or POST?

texts:
The REST API documentation says that PUT /V1/products/{sku} creates rather than updates.

Is that an error in the docs because I would have assumed that it is an update method and POST being the method to create?


texts: Create custom Attributes in Customer Form in magento 1.9

texts:
I am trying to create custom attributes in customer forms. create an account, edit account, admin forms. But every time it is not creating in database eav_attribute table. plz, give me proper solution steps.

<?php

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

$installer->addAttribute("customer", "cust_flat_type",  array(
"type"      => "varchar",
"input"     => "select",
'option'    => array('values' => array (
                  0 => 'Owner',
                  1 => 'Tenant',
                )),
"label"     => "Category Of Person",
"visible"   => true,
"frontend"  => "",
"backend"   => "",
"required"  => false,
"unique"    => false,
"comment"   => "Customer flat type",
'global'    => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
'visible_on_front' => true,
'used_in_forms' => array(
                    'customer_account_create',
                    'customer_account_edit',
                    'checkout_onepage_register',
                    'adminhtml_customer'
                ),
));

$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "cust_flat_type");
Mage::getSingleton('eav/config')
->getAttribute('customer', "cust_flat_type")
->setData('used_in_forms', array(
    'customer_account_create',
    'customer_account_edit',
    'checkout_onepage_register',
    'adminhtml_customer'
))
->save();

$installer->endSetup();

is there any way in which I will not need to create a new phtml page for create account or other


texts: Magento 2 : Custom Module Only Working One Time

texts:
I made a custom module to add an extra field into a Magento 2 table. It worked fine when I run

        php bin/magento setup:upgrade

The extra field is added into table. I deleted field, and tried to run module with same command again, but extra field is not added.

I didn't get any error when I ran same command again. But at the end, it show a green line with text "Please re-run Magento compile command". I'm not sure if this is the reason?

or did I miss anything?


texts: Magento 2 What is the best practices to override the luma theme

texts: I have created a custom theme, parent theme is luma. I want to override the luma theme and implement a new design on custom theme.I know the _extend.less is the file to write extended css, I have added @layout__max-width:1170px; in _extend.less and it's working, but not sure that how to override the top category navigation, should I override the existing less files such as _navigation.less or just add regular css code in the _extend.less file?


texts: Get product attribute in cart with flat products enabled

texts:
I am using a forced_shipping attribute and the below code in Mage\Shipping\Model\Carrier\Flatrate.php to restrict shipping method for items with the forced_shipping attribute set to Yes.

$items = Mage::getModel('checkout/session')->getQuote()->getAllItems();
$forcedShipping = false;
foreach ( $items as $item ) {
    $_products = Mage::getModel('catalog/product')->getCollection()->addAttributeToFilter('sku', $item->getSku())->addAttributeToSelect('forced_shipping', 'inner');
    foreach ( $_products as $_product) {
        if ( $_product->getForced_shipping() == 1 ) {
            $forcedShipping = true;
        }
    }
}
if ( !$forcedShipping ) {
    return false;
}

While this is working great with flat products disabled, it will fail once I enable them. How do I need to modify my code to make it work with flat products, is it possible at all?


texts:
Any reason why my custom module's route would work on local, but not in production? I've nuked caches, upgraded, compiled, etc. Is there something I'm not considering?

routes.xml:

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

module.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Ibex_Seeinstore" setup_version="0.0.1"/>
</config>

registration.php:

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

Ibex/SeeInStore/Controller/Index/Index.php:

namespace Ibex\Seeinstore\Controller\Index;

use Magento\Framework\App\Action\Context;

class Index extends \Magento\Framework\App\Action\Action
{
    protected $_resultPageFactory;

    public function __construct(Context $context, \Magento\Framework\View\Result\PageFactory $resultPageFactory)
    {
        $this->_resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

    public function execute()
    {
        $resultPage = $this->_resultPageFactory->create();
        return $resultPage;
    }
}

New info: In my nginx error log, this is the only error that seems potentially relevant:

464045 access forbidden by rule, client: [redacted], server: [redacted], request: "POST /app/etc/config.php HTTP/1.1", host: [redacted]

Still totally bewildered by this -- any help would be greatly appreciated!


texts: How to get all products of specific category in magento

texts:
Everyone I am new to Magento and php and stucked in a problem I am trying to getting all products belongs to specific category (category_id=9).

This question is also asked so many times on this platform but, anyone of them is not working for me.

What have I done ?
 I tried mostly answers available on https://magento.stackexchange.com

and all solution of question Get product collection from a category id

Below is my code I have tried so far

class Wri_HelloWorld_IndexController extends Mage_Core_Controller_Front_Action{

/**
 * Index action
 *
 * @access public

 * @return void
 */
public function indexAction() {

    /*echo "Hello";*/

    echo $this->getProducts();

}

private function getProducts(){
    $category_id =9;
    $category = Mage::getModel('catalog/category')->load($category_id);
    echo $category;
    $products = Mage::getResourceModel('catalog/product_collection')
                    ->setStoreId(Mage::app()->getStore()->getId())
                    ->addCategoryFilter($category);

    return $products;
}

But this does not print anything.

Below is my Task TODO Admin Panel


texts: segmentation fault while reindexing catalogsearch_fulltext in magento2

texts:
I am trying to reindex all indexes using CLI which results segmetation fault. I am using magento2 version 2.0.8 and previously using 2.0.7 but later updated to 2.0.8. I am getting error in both version. My shop have about 200000 products.

memory_limit is

4096M Local Value in magento directory
512M Master value

Anyone have any idea about this issue?


texts: How to get the product image with custom size?

texts:
How to get product image with custom size for api in magento2.2.4

   use Magento\Catalog\Helper\ImageFactory;
$imageCode = 'upsell_products_list';
    $imageHelper = $this->_imageFactory->create()->init($product, $imageCode)->getUrl();

I tried above code .But i can't get  the correct image url..


texts: Issue with Multi Store setup - New NZ site does not load the right store

texts:
I have a staging environment using Magento 1.9.2.4 Community, where I want to set up an additional New Zealand store. The site which redirects to the magento site is not loading the New Zealand store, but loads the default store instead. The following are the steps taken to set up the multi-store:

Set up a temporary re-direct from my domain to Magento site in cPanel
Created a new website

Name - Pharmadeal NZ
code - kiwi
sort order - 2

Created a Store view

Name - New Zealand Store
Code - pharmadeal_nz
sort order - 2

Added the domain to the secure and insecure url paths and changed the default country in the nz website
Edit the .htaccess file following this sites as a reference.

RewriteBase /magento/:

RewriteCond %{HTTP_HOST} .mysite.com.au [NC]
RewriteRule . - [E=MAGE_RUN_CODE:kiwi]

RewriteCond %{HTTP_HOST} .mysite.com.au [NC]
RewriteRule . - [E=MAGE_RUN_TYPE:pharmadeal_nz]
Then updated the index.php file with the details below:

/* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';

/* Run store or run website*/
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : '';

switch($_SERVER['HTTP_HOST']) {
    case 'mysite.com.au':
    case 'www.mysite.com.au':
        $mageRunCode = 'kiwi';
        $mageRunType = 'pharmadeal_nz';
    break;
}

Mage::run($mageRunCode, $mageRunType);

This is not the first time I have tried to set up the multi store and I have been trying to find an answer as to how my setup is incorrect. I would like to have this issue solved once and for all, so I am now putting it out there for the good people of stackexchange to answer my question.


texts:
Redirect to billing address form while clicking on back button in shipping method form in magento 1.9 one page checkout. I want when user click on back button while user on shipping method rediect back to billing form rather to shipping address form. one page check

login form
billing address form > ship on same address checked.
Shipping Method

When user click on back button from shipping method form, redirect to shipping method page but I want use get redirected to billing page


texts:
I'm trying to add a sript for sidebar only where the sidabar appear.
In my local.xml I added:

<page_two_columns_left>
    <reference name="head">
        <action method="addItem"><type>skin_js</type><name>js/sidebar.js</name></action>
    </reference>
</page_two_columns_left>
<page_two_columns_right>
    <reference name="head">
        <action method="addItem"><type>skin_js</type><name>js/sidebar.js</name></action>
    </reference>
</page_two_columns_right>
<page_three_columns>
    <reference name="head">
        <action method="addItem"><type>skin_js</type><name>js/sidebar.js</name></action>
    </reference>
</page_three_columns>

but it does not work.
It works in default handler

    <default>
        <reference name="head">
            <action method="addItem"><type>skin_js</type><name>js/sidebar.js</name></action>
        </reference>
    </default>

but in this case it is loaded in 1 column layout and give me a javascript error

how to add the script only where is needed?


texts: Magento 2 : X-Magento-Cache-Debug:MISS, over SSL, pages are not being cached by varnish

texts:
I have configure varnish with magento 2 with the reverse proxy in apache ubuntu.

But, when I see at the headers, I always get the header MISS from the host.

So, page is not being cached by the varnish. Also I have noticed that page speed is decrease after done the reverser proxy to work varnish over SSL 443 port.

Can anyone help me with this issue?


texts: Using the Inchoo PHP 7 patch on Magento 1.9.1

texts:
I have a client who wants to move his Magento site from PHP 5.2 to PHP 7.2, but it is running Magento 1.9.1. I see that the Inchoo patches only handle Magento 1.9.2 upwards.

What are the possible outcomes of using the patch on 1.9.1, and is there a feasible way to do it?

Note: the client resolutely refuses to update the store to 1.9.2 or upwards.

Thanks in advance.


texts: Protecting different websites within a magento instance

texts:
I want to have 3 different websites all running from 1 magento instance. Each website will have the same root domain but different suffix eg

http://www.example.com/website_1
http://www.example.com/website_2
http://www.example.com/website_3

I know how to set this up but what I cant figure out is how I can protect website_2 & website_3 so that only logged in customer can view them and only customers in a particular customer group can view website_3.

I am guessing it would need to be a 3rd party extension as I cant see a native way of doing this.Can anyone point me in the right direction please.


texts:
I want a pdf to be attached with the mail which is sent when I ship my order and tick the option 'Email Copy of shipment'.
pdf should contain same content as mail, as only those items list from the order which i had shipped not all items.
I know how to attach files with the mail, but what I want to know is how to generate pdf each time and attach with the mail or any other simpler solution.


texts: Magento 2.2 unable to create new account

texts:
Whenever I try to create new customer account from home page, the page refreshes after submit and nothing is submitted. There is no any error message.

I have check the register.phtml file in module-customer and it has form key as follow.

<?php /* @noEscape */ echo $block->getBlockHtml('formkey'); ?>

However, my app/design/frontend/Magento folder is empty and does not contain any files.


texts: I made a website in Angular, Node.JS. But backend is using Magento 2.1.12. How to make a secure website by calling admin token, customer token generated. This Angular frontend call rest API for products, it needs admin token. But if I give admin token, it creates security issues.


texts: Changing config/connection type for consumers

texts:
I would like to set this consumers: 'async.operations.all' connection type from rabbitmq (amqp) to crontab+sql (message queue & mysqlmq)as default so my setup of external crontab can execute .

how to configure Consumer_run for async.operations.all?


texts: Magento 1.9 performance - product with custom options

texts:
What's your opinion about Magento performance - especially for checkout (indexing) when store is using products with custom options.

Does it slow down the store a lot ? I have one store (Magento 1.7.0.2) 200 simple/virtual products with custom options added (3-5 options for each products) and even I tried to use redis backend caching - I'm still getting 5-8s checkout comparing to 0.5-1s for fresh Magento 1.9 store with only straight simple products (doesn't contain custom options YET).

Can I expect similar slow down of checkout if I add 3-5 custom options for each product on Magento 1.9.0.1 or it may be already tweak/fixed in 1.9? I'm using VPS with SSD, database is a bit slow (but I'm using also CM Redis cache backen).

Are simple products with custom options slower than setting configurable products > ? How both affect indexing/checkout ?
Do you have any thoughts about that.

Thanks for help
Tomek


texts: Deploy Production mode via SSH gets stuck at 'Static content deployment'

texts:
So, I guess this is kinda vague and hard to explain, so I'll try to give some detail to help contextualise the problem.

I have a Magento 2.0.0 install, that I installed via cPanel's Installatron. When accessing the site via SSH using Terminal, I am able to set the mode to 'developer' using deploy:mode:set developer, but when attempting to use deploy:mode:set production, Terminal will display Enabled maintenance mode, followed by Static content deployment start, and then thats it, nothing else happens. Terminal just sits there doing nothing until I ctrl+c to stop it doing nothing.

I've attempted this a couple times, and waited an hour or longer sometimes for something to happen, and still nothing. Has anyone experienced something like this before? Any light anyone could shed on this topic would be amazingly appreciated.


texts: Static composer tests fail on fresh install

texts:
If I clone a fresh copy of magento2 and run vendor/bin/phpunit -c dev/tests/static/phpunit.xml.dist, the ComposerTest fails because each packaged module has a 'version' property.

Version must not be specified in the root and package composer JSON files in Git
Failed asserting that object of class "stdClass" does not have attribute "version".

Am I missing something? I could mark the ComposerTest as skipped but it seems a bit messy. Does php bin/magento dev:tests:run static handle multiple composer files any better?


texts: Magento 1.9 How to get Guest user id in CMS pages?

texts:
How to get Guest user id in CMS pages header section?

Let me know your suggestions.

Thanks.


texts: I have restored my Magento1 store to another server and cannot reach the store on the Internet anymore. I need to change the Base URLs. Where can I find these stored?


texts: PDF Generation in Magento is Really slow

texts:
I have a problem with my Magento installation, at the hour of print the PDF with the invoices and packing Slips it is really slow, around 3-4 minutes in give the file in PDF.

No matter if u print 1 page or more, the time of the print is the same.


texts: Advice to build a 2-step filtering system (brainstorming)

texts:
we'd be pleased if somebody could borrow us some brain power to work out how to approach this.

We have a list of remote controls that work on different TV brands and models.
The client asked us to develop a page where people can select a TV manufacturer from a dropdown list. This, should then load another dropdown with a list of all related TV models, so that when one of this is selected, the correct remote control product page opens up.

So far, we created two multi-selectable attributes (manufacturers and models) and wrote a small module that loops each of the remote controls to build the manufacturer list. When one of the manufacturer is selected, the module loops through each product to find which one is related. Per each match found, we look at the other attribute (TV models) and we generate the second dropdown list.
when the user also selects the model, we send the ids of both manufacturer and model selected to loop again every product looking for the match. Finally, the remote controle of interest is opened up.

It works, however due to the large amount of products (the store has an overall of 8kk) the searching process can take up to 30 seconds - in particular when generating the models list.

What better approach would you suggest?
Thank you very much


texts: How to move copyrights at the end of page in magento 2?

texts:
I want to display copyrights under my custom footer

<block class="Magento\Theme\Block\Html\Footer"name="footer"template="html/footer_menu.phtml"/>

Edited Question
Answer

<move element="copyright" destination="before.body.end"/>


texts: How to insert a image in payment page (offer banner)?

texts:
i want to insert offer banner in the payment page.
For reference please find the attached image and url
https://vitalticks.in/checkout/#payment


texts: Error creating store view - An error occurred while saving. Please review the error log

texts:
Hi I am getting this error for no apparent reason and I see nothing in my system.log which is related to this.

I also cannot find any other similar questions that relate to an error creating store views specifically and so am stuck on what I can try!

Any suggestions are appreciated!


texts: Updated Magento to 1.9.01 - All pages blank

texts:
I have updated my site to v.1.9.0.1 and uploaded all the new version of my Joomlart theme to my hosting. All files uploaded successfully and now the frontend and backend of the site is just blank white pages.

A few people have suggested turning off compiler and flushing cache in the control panel or through shell, but I don't know how you do this? I can get access to phpmyadmin but don't know where to go from there.

I went to error logs on my hosting account and this came up:

[Sat May 24 19:30:25 2014] [error] [client 38.100.21.64] client denied by server configuration: /home/shop/public_html/errors/design.xml
[Sat May 24 19:30:25 2014] [error] [client 38.100.21.64] client denied by server configuration: /home/shop/public_html/errors/.htaccess
[Sat May 24 19:30:24 2014] [error] [client 38.100.21.64] client denied by server configuration: /home/shop/public_html/errors/default/report.phtml
[Sat May 24 19:30:24 2014] [error] [client 38.100.21.64] client denied by server configuration: /home/shop/public_html/errors/default/503.phtml
[Sat May 24 19:30:24 2014] [error] [client 38.100.21.64] client denied by server configuration: /home/shop/public_html/errors/default/404.phtml
[Sat May 24 19:30:24 2014] [error] [client 38.100.21.64] client denied by server configuration: /home/shop/public_html/errors/default/page.phtml

Any suggestions on a fix?


texts: IFrame got lost on save using WYSIWYG (TinyMCE) - Magento 1.9.4.4

texts:
Embedding video content is possible only using a simple text editor. Using WYSIWYG dialog data is serialized in the  tag which is showing blank white space on the product page.

If IFrame is inserted with a simple text editor it works fine on the product page, but when someone makes an edit with WYSIWYG editor, the  code gets also transformed in the  code which is showing blank space on the product page.

Looks like a bug same as described here: https://github.com/magento/magento2/issues/18550

I have exactly the same problem with Magento 1.9.4.4.


texts: 1.9 Validation returns true but error message appears when other are wrong

texts:
I've implemented a new function to validate a single date field with format 'dd/mm/YYYY'. It works well but if another field is wrong, it's error message appears.

Here is my js

var frenchDateReg = /^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((19|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((19|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((19|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$/g;
Validation.add('validate-date-fr', 'Please enter a correct date. For example 24/12/2017', function(v) {
        console.log(v);
        console.log(Validation.get('IsEmpty').test(v));
        console.log(frenchDateReg.test(v));
        console.log(frenchDateReg);
        return Validation.get('IsEmpty').test(v) || frenchDateReg.test(v)
    });

on log when error appears and not I have the same showing :

[Log] 05/05/1995 (fonctions.js, line 8)
[Log] false (fonctions.js, line 9)
[Log] true (fonctions.js, line 10)
[Log] /^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((19|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((19|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((19|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$/g (fonctions.js, line 11)

But in front I get the error :

Theses fields are in the customer edit form. So to generate the date field I override the template customer/account/widget/dob.phtml like this :

<label for="dob"<?php if ($this->isRequired()) echo ' class="required"' ?>><?php if ($this->isRequired()) echo '*' ?><?php echo $this->__('Date of birth') ?>

    <?php
    $time = $this->getTime();
    $date = null;
    if ($time) {
        $date = $this->getDay().'/'.$this->getMonth().'/'.$this->getYear();
    }
    ?>
    <input type="text" id="dob" name="dob" value="<?php echo $date ?>" title="dob" class="input-text required-entry validate-date-fr" <?php echo $this->getFieldParams() ?> placeholder="<?php echo $this->__('Fill this field') ?>" />

Can you help me please ? I don't understand why the error is showing with a correct js validation return.


texts: Javascript show array of value depending on if statment

texts:
I need to show an array of values based on current date, for example show only 10am to 13am if we are on current date, if not show all...this is what i have done so far but i cant get it working again after i select the same day as today..
            var getDatePickerValue = $('[name="datepicker"]').val();
            var tdate = new Date();
            var dd = tdate.getDate(); //yields day
            var month = tdate.getMonth()+1;
            var yyyy = tdate.getFullYear(); //yields year
            var currentDate= dd + "/" +((month < 10 ? '0' +  month : month)) + "/" + yyyy;

            var newOptions = [];
            this.options.each(function (obj) {
                newOptions.push({
                    value: obj.value,
                    label: obj.label,
                    disabled: obj.disabled,
                });
            });

            if (getDatePickerValue == currentDate) {

                newOptions.shift(); //here i remove the first value, i guess 10mam

            } else {
               //if we are not on same day i need to show again all obj from the each statment
            }


texts:
Maybe I'm just stupid and can't see the obvious thing but ..

There's are 3 different calculation methods available with table rates in Magento and one of them is "# of Items vs. Destination". So I can hope the idea of this method is to specify different rates depending on the number of items in the cart.

Let's take a example.

Let's assume that we want the shipping rate to be X if number of items in cart is below 60 and Y for 60 items and above.

For this purpose we compile the following CSV:

Country,Region/State,"Zip/Postal Code","# of Items (and above)","Shipping Price"
*,      *,           *,                1.0000,                  X
*,      *,           *,                60.0000,                 Y

After quick debugging of Mage_Shipping_Model_Resource_Carrier_Tablerate::getRate() I found out that it will result in the following query:

  SELECT `shipping_tablerate`.*
    FROM `shipping_tablerate`
   WHERE (website_id = :website_id)
     AND ((dest_country_id = :country_id
           AND dest_region_id = :region_id
           AND dest_zip = :postcode)
         OR (dest_country_id = :country_id
          AND dest_region_id = :region_id
          AND dest_zip = '')
         OR (dest_country_id = :country_id
          AND dest_region_id = :region_id
          AND dest_zip = '*')
         OR (dest_country_id = :country_id
          AND dest_region_id = 0
          AND dest_zip = '*')
         OR (dest_country_id = '0'
          AND dest_region_id = :region_id
          AND dest_zip = '*')
         OR (dest_country_id = '0'
          AND dest_region_id = 0
          AND dest_zip = '*')
         OR (dest_country_id = :country_id
          AND dest_region_id = 0
          AND dest_zip = '')
         OR (dest_country_id = :country_id
          AND dest_region_id = 0
          AND dest_zip = :postcode)
         OR (dest_country_id = :country_id
          AND dest_region_id = 0
          AND dest_zip = '*'))
     AND (condition_name = :condition_name)
     AND (condition_value <= :condition_value)
ORDER BY `dest_country_id` DESC, `dest_region_id` DESC, `dest_zip` DESC
   LIMIT 1

Don't be confused with all those conditions. The only one that matters is this one:

     AND (condition_value <= :condition_value)

This means that if we have let's say 63 items in the cart it will satisfy both lines of our CSV because 1 <= 63 as well as 60 <= 63. This means all will come down to ORDER BY which as you can see not making any sense. As a result we will be always getting the first line and X rate.

So I will finish with the same pattern as I startet. Am I missing something obvious or is there something horribly wrong?


texts: Clone magento product attributes, both in-built and custom

texts:
I have a magento site in which there are simple products having language videos attributes.

Currently there are two language video sections being maintained, each section containing six different videos & their thumbs.

Now I want to add three more sections of same number of video attributes, resulting into 18 attributes to be newly created.

So my question is, how can I clone all those attributes(video attributes which are textfields & thumb attributes which are WYSIWYG editors) by script, without doing the tedious task of manually creating each attribute ?


texts: Add custom requred checkbox to checkout Order Review step

texts:
I want to add a custom required checkbox to checkout, in Order Review step.

I don't want to store anywere this value, only to show to the customer, before placing orders.

Does anyone know where i need to place my checkbox, and can i make this required?

Thank you in advance.


texts: Dynamically create block from controller

texts:
I'm creating a popup that loads via ajax default Magento login box.

The default login block template is located in template/persistent/customer/form/login.phtml.

I already have successfully implemented a controller the outputs data for ajax request:

<?php

class My_Module_LoginController extends Mage_Core_Controller_Front_Action {

    public function loginwindowAction() {

        echo 'Hello world'; // I can see this text in ajax response

        // Now, how to print here login block?
    }

}

What I'm trying to do is just to create block and echo its HTML. Just the block, without the rest of page layout.

Is there any way of doing this without creating page layout xml?


texts: How to find a reliable Magento developer?

texts:
I am the owner of a start up business that sells on eBay, but I've been working a lot with the Magento back end setting up a store with a template. I got tired of the template after a time because I felt that it didn't have the specific functionality or look and feel that I wanted. So I created a PSD with my theme laid out and am looking for someone to perform PSD to Magento services.

It seems that everywhere I look, I get very different quotes or answers, and now I'm more confused than ever. Some companies tell me that Magento is definitely not the choice for me because of how small my business is, and that I will not be able to afford the maintenance Magento will require. Other companies want to say they can do everything I need and the price they quote is excellent, but then I become dubious of their quality of work due to their cheap prices and online reviews. I have also looked at solutions outside of Magento and they don't seem to offer the functionality I want or need.

I guess my question is, does Magento really require too vast a cost for a small business to consider? And if not, how would you recommend seeking a developer and looking into the quality/worth of their work? What would you say is a good range for the cost of a PSD to Magento theme before any custom functionality has been implemented? $2,000-$5,000? $5,000 to $10,000? More?

Thanks for your time!


texts: “We can't save the customer” getting this error while creating new customer on Magento 2

texts:
I am getting error when new user comes on register page after filling all data when click on submit button got this error "We cant save customer". when i check my system.log
it shows me this type of error.

Exception message:
 Class Lotus\Override\Observer\ChangeCustomerGroupId does not exist
Trace:

 **Magento\Framework\Code\Reader\ClassReader->getConstructor('Lotus\Override\O...') called at [vendor/magento/framework/ObjectManager/Definition/Runtime.php:49]**

I dont know where this error comes because there is no Lotus_Observer module in my magento 2.3.2

Can anyone have an idea how to solve this error ?


texts: I'm trying to change the size of the images of the upsell products shown on the product page, but can't figure out how to do it. I've got the Ultimo theme.


texts: Change into a theme Top link (login my wishlist check out My account). But My cart creates separate link.

texts:
I just use Magento top.links function. but it will display all link Like Myaccont,My wishlist,Mycart,checkout,login. but  i want create sepate link OF mycart i can display anywhere in my header. Can you Please tell me what type of step i can do create sepate link of

I want to create this type of. i want to create separate  cart Link?
Please Help me?


texts: Progressive Web APP (PWA) - Magento 2.2.2 Not working

texts:
I am using Magento 2.2.2.

I have configured Progressive Web App PWA in my Magento Site. It is working fine in development server. Not working in Live Server. Both Servers having HTTPS. But, live server HTTPS is running in the particular port.

When I checked in mobile, in both live and development server popups are coming. but, I configured as fullscreen app, but it is opening in browser tab.

How to solve this. Is that issue came because of HTTPS running in port? Thanks in advance.


texts: Magento 2 Pagination List Address on Checkout Page

texts:
Is there a way to make pagination for list address on the checkout page?
I have some peoples who help my customer to make order on my website and the list addresses added every day, it makes slow the checkout page because all addresses loaded at once.


texts: How to return search API response from controller in magento 2?

texts:
I have an API(ukvehicledata) for search using registration id.

I want to integrate with magento 2.2

I am getting response in controller as JSON format. I have converted it into an array.

Now I want to return the response to the search result page.

I am using below code:

<?php
public function execute()
    {
        $this->layerResolver->create(Resolver::CATALOG_LAYER_SEARCH);

        /* @var $query \Magento\Search\Model\Query */
        $query = $this->_queryFactory->get();

        $storeId = $this->_storeManager->getStore()->getId();
        $query->setStoreId($storeId);

        $queryText = $query->getQueryText();

        if ($queryText != '') {

        // Init cURL session
        $curl = curl_init();

        // Set API Key
        $ApiKey = "675D83AAC4C8-E9C9-E9C9-E9C9-675D83AAC4C8";

        // Construct URL String
        $url = "https://uk1.domainname.co.uk/api/datapackage/%s?v=2&api_nullitems=1&key_vrm=%s&auth_apikey=%s";
        $url = sprintf($url, "VehicleData", $queryText, $ApiKey); // Syntax: sprintf($url, "PackageName", "VRM", ApiKey);
        // Note your package name here. There are 5 standard packagenames. Please see your control panel > weblookup or contact your account manager

        // Create array of options for the cURL session
        curl_setopt_array($curl, array(
          CURLOPT_URL => $url,
          CURLOPT_RETURNTRANSFER => true,
          CURLOPT_MAXREDIRS => 10,
          CURLOPT_SSL_VERIFYPEER => false,
          CURLOPT_TIMEOUT => 30,
          CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
          CURLOPT_CUSTOMREQUEST => "GET"
        ));

        // Execute cURL session and store the response in $response
        $response = curl_exec($curl);

        // If the operation failed, store the error message in $error
        $error = curl_error($curl);

        // Close cURL session
        curl_close($curl);

        // If there was an error, print it to screen. Otherwise, unserialize response and print to screen.
        if ($error) {
          echo "cURL Error: " . $error;
        } else {
          //$respons = json_decode($response, true); // For demonstration purposes - Unserialize response & dump array contents to screen
          $results = json_decode($response, true);
          $responsee = $results->Response->DataItems->VehicleRegistration;
          /*echo '
';
          foreach ($responsee as $key => $value) {
              echo '
'.$key.' => '.$value.'

';
          }
          echo '
';*/

        } else {
            $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl());
        }
    }


texts:
In Magento2, want to add css, specifically for IE 8, using

 <css src="css/ie-8.css" />

Not able to find anywhere in native source code.


texts:
I got this situation that when I Add Products on my site I sometimes got Internal Server Error.

What can be the solution to prevent the "Internal Server Error"?

Someone suggested increasing the Timeouts.

  try changing the following MySQL settings for connection timeouts: connect_timeout=15 wait_timeout=30 interactive_timeout=500 to connect_timeout=90 wait_timeout=600 interactive_timeout=600

Can this be a solution?


texts: Magento custom module blocks and config.xml help

texts:
I have created a custom module but having a little difficulty with blocks in the config.xml

For some reason I'm not able to get the blocks to show on the dump of all the xml...maybe I've missed something?

I have the following structure:

app\code\local\Site\SiteTest\etc\config.xml

app\code\local\Site\SiteTest\Block\test.php

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Site_Test>
            <version>1.0.0</version>
        </Site_Test>
    </modules>
    <global>
        <blocks>
            <highest>
                <class>Site_Block</class>
            </highest>
        </blocks>
    </global>
</config>

I am trying to link this to  a custom layout for example:

<block type="sitetest/test" name="home.catalog.product.test" template="catalog/product/test.phtml" after="cms_page">

If anyone could shed some light on this would really be appreciated.


texts:
I need to override Magento\Payment\Model\Method\AbstractMethod class. because I need to customize getTitle method of this class.

I searched in Google all are saying to use plugin but how I could?

Can anyone let me know how we can override abstract class method?


texts: Automatic URL redirect after deleting a product

texts:
Is it possible to add in an automatic redirect for when you delete a product from Magento?

E.g. If you delete a product that is in Category A, it will then automatically redirect to the Category A page when someone visits the URL of the product that has been deleted?


texts:
I want to see if my module is enabled in config are through html using Knockout JS.

ko if: module_enabled ==1 show a button if not don't show a button
But i get this following error Uncaught ReferenceError: Unable to process binding "if: function(){return module_enabled() }"
Message: module_enabled is not defined


texts: Adding attributre label and attribute option value label to get cart rest api in magento2

texts:
Hi I want to add attribute label and attribute option value label to Magento 2 Guest cart REST API response like below screen shot by overriding default magento 2 files.

https://prnt.sc/i73dxm

Please help to me


texts: Add custom column to customer admin grid

texts:
In my module I have custom db table that connected with magento customers by customer_id field.
What I need is to add field value from this table to customer admin grid.
How can I add join with my table and add my column value to customer grid collection, so it looks like other native grid fields with ability to sorting and filtering ?


texts: how to Show address fiels in new form registration for Customer magento 2

texts:
I created a new form registration for customer and according to group, they will be redirected to a form.

I added the fields of address in the first one by adding this code at customer_account_create.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer_form_register">
            <action method="setShowAddressFields">
                <argument name="show.address.fields" xsi:type="boolean">true</argument>
            </action>
        </referenceBlock>
    </body>
</page>

But when I tried the same for the second form by adding below:

<referenceBlock name="customer_form_register_2">
    <action method="setShowAddressFields">
        <argument name="show.address.fields" xsi:type="boolean">true</argument>
    </action>
</referenceBlock>

I got an error, also I have tried to setShowAddressFields(true) in phtml, but I got the same error too


texts: What is the optimal setting for max_execution_time?

texts: I'm looking at improving our server performance, and noticed that the stock EE .htaccess file sets the max_execution_time to 18000, which really seems like a typo. 18000 seconds is 5 hours. Should this be 1800?


texts: Can we show different add-ons and upsell product in per website by passing the same SKU?

texts:
Currently if we add upsell/add-on products to default it wont let you to change it on each store view. All the upsell and add-ons will be the exact same as default.

Is it possible to change upsell/add-on on per website rather than picking it up from default


texts: Magento2.3.3 Commerce Could not save product "25500" with position 1 to category 389

texts:
I am facing an issue in Magento2.3.3(commerce) after migration from M1, can't unassign category from some of the products.
I have checked and there is no duplicate url_key for product or category.
If anyone faced the same issue and got a fix, please share.
Thank you.


texts: How to show dropdown configurable attribute in Product Category View in Magento 2?

texts: I have color attribute of type visual swatch, which is displayed on category view as well as catalog search view below the product images, on selecting the swatches, it changed the image as well price. But when I change this color attribute to type dropdown, I am not able to see the same on category and search view. Is there any configuration from the Admin panel to make it appear on the category views? If not, then can someone please guide on how to write custom code for it?


texts: Customize price with currency switcher magento 2

texts:
Hi I need some customization with price module in magento 2.2.x version.
I have setup 2 product currency USD and EUR, default currency is USD if an product have $100 USD and if I will change the price currency from USD to EUR and if  Standard Conversion rate to Euros is 1.16547 then price of product will be 85.80 Euro but I need to add 10% price extra that means it should be approx 94.30.
Hope it does make sense can anyone help how Can I customize it so product price will be change everywhere.


texts: How to get image path in magento 2 module

texts:
My image path is

  app/code/Vendor/Module/frontend/web/images/tool/test.png

How to get this image path?

Please see screenshot:


texts:
We need to add quite a lot of payment methods that are really simple and require nothing beyond what the built-in "Bank Transfer Payment" method already offers, for example:

Bank Transfer
Prepayment
In-store pickup

So now I'm looking for a way to "duplicate" the "Bank Transfer Payment" method so I can show all three (or even more) of the above options to the customer when they check out. They select one of the payment methods and submit their order, and nothing else has to happen.

Does anyone have any recommendations how I would go about this?


texts: magento2 category page cached as JSON data in varnish

texts: Occasionally for absolutely no reason varnish will cache a JSON version of the page with the exact same URL.  It is an awful bug and I haven't been able to find anyone else saying they experienced the issue.


texts: upgrade issue from 2.1.14 to 2.2 :: magento2

texts:
I have upgrade magento version from 2.1.14 to 2.2.0.

First time when i run run php bin/magento setup:upgrade command it gives this error:

Module 'Magento_TaxImportExport':
Module 'Magento_BundleStaging':
Upgrading schema.. SQLSTATE[HY000]: General error: 1025 Error on rename of './databasem2/#sql-3b4_94f' to './databasem2/catalog_product_bundle_selection' (errno: 150 - Foreign key constraint is incorrectly formed)

Now every time upgrade command gives this error:

Module 'Magento_TaxImportExport':
Module 'Magento_BundleStaging':
Upgrading schema.. SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'sequence_product_bundle_option' already exists, query was: CREATE TABLE sequence_product_bundle_option (
                     sequence_value integer UNSIGNED NOT NULL AUTO_INCREMENT,
                     PRIMARY KEY (sequence_value)
            ) AUTO_INCREMENT = 0 ENGINE = INNODB

I have try to remove tables but it gives same error.

I have read this link1 and link2 but still not working for me.

Any help will be appreciated, Thanks in advanced.


texts: Script error while uploading category image in Magento 2.1.9 using IE11

texts:
I have a Magento 2.1.9 installed. When I try to upload an image for a category from backend in the IE11 browser it shows a script error

  SCRIPT438: Object doesn't support property or method 'set'

and failed to upload the image. The script error has occurred in the file.

  Magento_Ui/js/form/element/file-uploader.js

in line number 307 ie,

postData.data.set('param_name', this.paramName);

We have checked the same scenario in a lower Magento version Magento 2.1.2, but here this is working fine and no error occurs. So we have compared the js files and find out the difference in both versions. In Magento 2.1.9 the "onBeforeFileUpload" function is like as follows

onBeforeFileUpload: function (e, data) {
            var file     = data.files[0],
                allowed  = this.isFileAllowed(file),
                target   = $(e.target);

            if (allowed.passed) {
                target.on('fileuploadsend', function (event, postData) {
                    postData.data.set('param_name', this.paramName);
                    $(event.currentTarget).off('fileuploadsend');
                }.bind(data));

                target.fileupload('process', data).done(function () {
                    data.submit();
                });
            } else {
                this.notifyError(allowed.message);
            }
        },

But in Magento 2.1.2 it is like

onBeforeFileUpload: function (e, data) {
    var file = data.files[0],
    allowed = this.isFileAllowed(file);
    if (allowed.passed) {
        $(e.target).fileupload('process', data).done(function () {
            data.submit();
        });
    } else {
        this.notifyError(allowed.message);
    }
},

Note : This issue is only in IE browser. I have tested this in IE11


texts: How to include navigation.phtml file in custom page?

texts:
I have added in mywallet.xml file below codes -

<?xml version="1.0"?>
<layout version="0.1.0">
<customer_account>
    <!-- Mage_Sales -->
    <reference name="customer_account_navigation">

        <action method="addLink" translate="label" module="mywallet">
            <name>mywallet_index</name>
            <path>mywallet/index/index</path>
            <label>My Wallet</label>
        </action>
    </reference>
</customer_account>
<mywallet_index_index>
<reference name="root">
      <action method="setTemplate"><template>page/1column.phtml</template>  </action>
</reference>
<reference name="content">
  <block type="mywallet/index" name="mywallet_index" template="mywallet/index.phtml"/>
</reference>
</mywallet_index_index>
</layout>

But no effect. Links are not displayed on custom page. Can anyone tell me how to display?

Below is my Order History Page -


texts:
What is the $subject in a plugin?
My code is:
 Class Product {
          public function afterGetPrice(\Magento\Catalog\Model\Product $subject, $result) {
               return $result*2;
               }
}


texts: Page Builder product carousel only one item per slide always

texts:
Is it possible to have one product per slide always no matter the size of the screen using the product Carousel with page builder?
The default is 5 items.


texts: How to create custom module after installing Magento 2 Docker Image?

texts:
I have installed Magento docker Image and frontend, backend is working fine. The directory structure of Magento docker Image installed is:

Now I am looking how to start my first module. I have these concerns:

Where are magento files like app, pub, var, vendor that we get on downloading normal magento version.

How do we run magento commands like static-content:deploy or setup:upgrade when we are usinng docker

My machine is macOS Mojave 14.10.2.
Thanks.


texts: How to get attribute value in magento 2.0.6 product view and list page

texts: How to get product attribute value in magento 2.0.6 product view page and list page


texts: Magento 1.9x How to increase shipping costs when mutiple products are ordered?

texts:
I'm implenting a shipping costs rate into our webshop, however, i'm looking for a way that when customers buy more products at once, the shipping costs increase, so in short:

Customers buy 1-4 laptops; shipping is 5$.

Customers buy 5-10 of the same laptops; shipping becomes 10$

Is there a way to implent this in our magento webshop?

Thanks in advance!


texts: I have been unable to access my website this morning. Getting this message - Invalid User Name or Password. I have changed my password but it seems to be the username that's the issue. Can anyone help me?


texts: Can I migrate from Magento 1 to Magento 2 locally and then upload files to host server?

texts: In order to migrate from M1 to M2, is it ok to do the migration process on a local environment and then just copy all M2 files and DB to my hosting server? or I need to do something on the host side before/after copying files and db?


texts: Observe customer address save, update collection

texts:
I have a custom customer/address attribute gmap_lat which I would like to be included in the sales/order_address_collection.

I would like to observe the customer_address_save_before event, but it isn't dispatched and I'm not sure how to hook into the Observer:

magento\app\code\core\Mage\Customer\etc\config.xml:

422              <customer_address_save_before>
423                  <observers>
424:                     <customer_address_before_save_viv_observer>
425                          <class>customer/observer</class>
426                          <method>beforeAddressSave</method>
427:                     </customer_address_before_save_viv_observer>
428                  </observers>
429              </customer_address_save_before>

Should I make my own observer in addition to this one, or extend the customer/observer or what?  What is the best and fastest approach here?

** EDIT **:

By the way, this attribute is HIDDEN, installed in part by:

//Add attribute that will be used for Google Maps as a coordinate lat
$installer->addAttribute('customer_address', 'gmap_lat', array(
    'type'     => 'varchar',
    'input'    => 'hidden',
    'visible'  => false,
    'required' => false,
    'label'    =>   'GMap Latitude',
    'user_defined' => 0,
    'visible_on_front' => 0,
));


texts: Can I install a copy of Magento Enterprise Cloud Edition in local server

texts:
I am working on a project where the client has taken subscription of Magento Enterprise Cloud Edition.

I know that Magento Enterprise Cloud Edition enables us to use the following three types of environments, i.e. integration, staging, and production.

I want to a clone of production environment in my machine. Is it possible to do so?


texts: Unable to create customer using curl command

texts:
I am new to magento. I am facing an issue will trying to create customer using curl command. I am passing the correct json values as customer data as well, but still getting decoding error.Can some one please help!

This is the command that I am using for creating the customer:

  curl -X POST "http://127.0.0.1/magento2/index.php/rest/V1/customers"
  -H "Authorization: Bearer pvcp6auic4likpucpi07peas89hxivhe" -H "Content-Type: application/json" -d
  "{"customer":{"email":email@gmail.com","firstname":"first","lastname":"last","storeId":1,"websiteId":1}}"

The error thrown is {"message":"Decoding error."}


texts: Display both reduced amount and also percentage in cart page

texts:
http://www.customy.com/blog/show-product-discount-percent-in-magento/

The amount reduced will be shown in percentage in above link.

I need to display percentage of discount along with "HOW MUCH PRICE SAVED

IN NUMBER", as like this :

You Save: 5,810.00 (18%)

amazon.com

what changes I have to do for this.

please help me to find solution.

thanks in advance


texts:
I have Magento 2.3.6 Instance on my local machine (Vagrant) now i am trying to add the merchant information in magento admin and validating the VAT ID for my merchant, but when i added it is saying "Error during VAT Number verification."
I have already checked the PHP-SOAP is enabled  and also tried the following solutions as well
Zero tax for those with valid VAT Number (maybe via customer groups)
But still not validating the VAT it and thats why ZERO tax is not calculating for the customers.
Can anyone help in this regards, either is due to the LOCAL machine or something else i am missing?
Thanks!


texts: I would like to set Free Shipping only for the USA. and does not include Hawaii, puerto rico.


texts: Change breadcrumbs after search product in Magento 2

texts:
After search product i have short breadcrumbs like Home > 'product'. I want to add category / subcategory to breadcrumbs after search product like this Home > Category > Subcategory > Product.
Short breadcrumbs is only after search product


texts: Displaying category view in custom controller

texts:
How do I display category view in my custom controller?
Basically I am creating a "readystock" controller to show all products that are ready stock from category view. Thanks!


texts:
I am preparing module which displays cart item list on every page. I have a problem with retrieving cart items from session quote. When I am on page with cart ([magento_url]/checkout/cart) everything is fine and I get all items which are currently in the cart. But when I move to any other page (e.g. product list or product detail) the expression $this->checkoutSession->getQuote()->getAllVisibleItems(); gives me an empty array (I have the cart nonempty :-).

I use this block to get items:

<?php

namespace <VENDOR>\FootCart\Block;

use Magento\Framework\View\Element\Template;

class FootCart extends Template
{
    protected $checkoutSession;

    public function __construct(
            Template\Context $context,
            \Magento\Checkout\Model\Session $checkoutSession,
            array $data = array())
    {

        $this->checkoutSession = $checkoutSession;

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

    }

    public function getCartItems()
    {
        $items = $this->checkoutSession->getQuote()->getAllVisibleItems();

        return $items;
    }

}

And in my template .phtml file I use the above function getCartItems() to list the items. This function returns empty array when I am on any page except the cart page.

To display the module on every page I use default.xml:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="footer-content">
            <block class="<VENDOR>\FootCart\Block\FootCart" name="footcart-footcart" template="<VENDOR>_FootCart::footcart.phtml" />
        </referenceContainer>
    </body>
</page>

What I'm doing wrong? Thank you for any help!


texts: Where to add custom JS for checkout page after the page is loaded

texts: I want to add the custom js file to the checkout page. please let me know where to place the file with an example.


texts: Magento 2: Add color option to cart REST API

texts:
I am calling this API to get product details:

GET   https://domain.com/index.php/rest/V1/products/:SKU

and get this response:

<id>678</id>
  <sku>Mysku</sku>
  <name>myName</name>
  <attribute_set_id>4</attribute_set_id>
  <price>0</price>
  <status>1</status>
  <visibility>4</visibility>
  <type_id>configurable</type_id>
  <created_at>2017-04-23 15:01:05</created_at>
  <updated_at>2017-04-30 17:57:28</updated_at>
  <weight>0.1</weight>
  <extension_attributes>
    <configurable_product_options>
      <item>
        <id>38</id>
        <attribute_id>93</attribute_id>
        <label>Color</label>
        <position>0</position>
        <values>
          <item>
            <value_index>56</value_index>
          </item>
          <item>
            <value_index>61</value_index>
          </item>
          <item>
            <value_index>62</value_index>
          </item>
        </values>
        <product_id>678</product_id>
      </item>
    </configurable_product_options>
    <configurable_product_links>
      <item>675</item>
      <item>676</item>
      <item>677</item>
    </configurable_product_links>
  </extension_attributes>
....

I have a color in response. How can I add color option to cart. I tried with:

POST   https://domain/rest/V1/guest-carts/3f9a39f1524fb936d932b7e80a3e8cc1/items

Params:
{

"cartItem" :
{
"sku" : "Mysku",
"qty" : 1,
"quoteId" : "3f9a39f1524fb936d932b7e80a3e8cc1",

   "productOption":{
            "extensionAttributes":{
                "customOptions":[
                    {
                        "optionId":"38",
                        "optionValue":"56"
                    }
                    ]
            }
        }

}
}

And get this error:

message "You need to choose options for your item."

I think I have something wrong in parameters. can any one help ?


texts:
Since about 2 weeks we're getting about 2-3 faked orders each day in one of our Magento stores (v1.5.1). Every order is placed following the same scheme:

the user visits the storefront
accesses 1 or 2 random products from the frontpage
order is placed with faked data:

the addresses seem legit (street + zipcode/city do exist)
all addresses are in the same region/province
every order is using the same payment method (debit payment with valid bank code)
phone == fax with two leading zeros: 00...
email adresses look spammy: uedjloa@gmail.com qfjfe07@live.de ..

The order process from first visit until the order is placed always takes about 3 minutes. The IP addresses are always different (but not from foreign countries). The user agent is always Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20100101 Firefox/21.0

At first this all looks to me like some automated testing, but then why are all orders placed from different IP addresses? Why is the address valid except the name?

Any help or thoughts on that?


texts: Magento 2 How to get product collection of all products?

texts:
I am trying to fetch the product collection in Magento 2 which return the all products including

-> with all instock and out of stock products
-> with all Visibility (Not Visible Individually,Catalog,Search,Catalog, Search)
-> with all status (Enabled,Disabled)

Is it possible to get this type of product collection?


texts: how to set all products to taxable goods?

texts:
I have added 1000s of products to my store without set those as taxable goods. It will take more time to update each product from Store Backend. Now I want to set "Taxable Goods" in Tax class field for all products in my store. How can I set all products as Taxable Goods at once ?
Thanks in advance


texts: "Check permissions" Extension Uninstall Error Magento connect

texts:
Trying to uninstall the extension by Magento connect but am getting

/var/www/mageboy/downloader/.././app/design//app/design/adminhtml/default/default/template/outofstocknotification/widget/grid.phtml

Check permissions

I have followed some magento.stackexchange answers but I can not find the solution. like
Error with unistalling a theme through Magento-Connect


texts: Magento 2: Any Observer event trigger when product back in stock?

texts:
Hi guys I am looking for an observer event which triggered when product back in stock.
So I do not know which Magento 2 event I have to be called when product back is in stock.


texts:
Due to some reason client asked me to change the position of csv columns.

They need necessary fields at starting of csv and blank fields(mostly) at end of csv so that they can easily fill the csv for product import.

Kindly suggest any solution or any hint.


texts:
I am creating a page that will contain 2 selects/dropdowns. One will have the name of the configurable product, based on this drop down the second drop down will populate all of the colors available within the simple products associated to the configurable.

Problem: I'm not sure on how to pass the ID of the product that is selected, into a variable in php.

<script>
jQuery(document).ready(
    function(){

        jQuery('#frame').on('change', function() {

            jQuery('.lens').html(this.value); // this is just for me to see if its showing the right ID
            <?php
            $productId = 1164; //how do i set this to be this.value
            $product = Mage::getModel('catalog/product')->load($productId);
            $configurable= Mage::getModel('catalog/product_type_configurable')->setProduct($product);
            $simpleCollection = $configurable->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions();

             ?>

            <?php foreach($simpleCollection as $simpleProduct): ?>

            jQuery("#swcolors").append('<option value="<?php echo $simpleProduct->getAttributeText('color'); ?>"><?php echo $simpleProduct->getAttributeText('color'); ?></option>');

            <?php endforeach;?>

        });

    });


texts: How to set cron job interval in magento 2

texts:
I have created a crontab.xml
My server is in UTC time zone.But I need to run my cron job at 2.30 a.m EST timezone.
Please provide me the solution
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="default">
         <job instance="VendorName\ModuleName\Model\AddUpdateTierPrice" method="addTierPrice" name="dynamic_pricing_cron">
            <schedule>* * * * *</schedule> <!--how to set EST time zone at 2.30 am -->
        </job>
    </group>
</config>


texts: Magento 2 Programmatically set theme for specific stores

texts: Programmatically How can set a theme for specific stores in Magento 2.1


texts: What are the top useful Phpstorm plugins for Magento 2 development?

texts:
What are the list of useful magento2 development tools?
What are the top phpstorm useful plugins for magento2 development?


texts:
I want to be able to enable/disable the following ui_configuration fieldset via configuration conditions.  Much like an ifconfig.  I know I can provide a boolean item named 'disabled' in ordered to toggle the functionality.  But I would like to toggle more dynamically, based on conditional logic/settings set in the admin config.  Is there any way to achieve this?

  <?xml version="1.0" encoding="UTF-8"?>
    <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
        <fieldset name="foundation_catalog_remote_gallery">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Remote Images and Videos</item>
                    <item name="provider" xsi:type="string">foundation_catalog_remote_gallery.foundation_catalog_remote_gallery_data_source</item>
                    <item name="dataScope" xsi:type="string">data.product</item>
                    <item name="sortOrder" xsi:type="number">23</item>
                    <item name="collapsible" xsi:type="boolean">true</item>
                    <item name="opened" xsi:type="boolean">false</item>
                    <item name="ns" xsi:type="string">product_form</item>
                     <item name="disabled" xsi:type="string">${ $.provider }:data.disabled</item>
                </item>
            </argument>
            <argument name="dataProvider" xsi:type="configurableObject">
                <argument name="class" xsi:type="string">Foundation\Catalog\Ui\DataProvider\RemoteGalleryDataProvider</argument>
                <argument name="name" xsi:type="string">sccfoundation_catalog_remote_gallery_data_source</argument>
                <argument name="primaryFieldName" xsi:type="string">entity_id</argument>
                <argument name="requestFieldName" xsi:type="string">id</argument>
            </argument>
            <container name="remote_image_and_video_group">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="sortOrder" xsi:type="number">1</item>
                    </item>
                </argument>
                <htmlContent name="html_content">
                    <argument name="block" xsi:type="object">Foundation\Catalog\Block\Adminhtml\Product\Edit\Tab\RemoteImages</argument>
                </htmlContent>
            </container>
        </fieldset>
    </form>


texts: Configurable products and price attribute in layered naviagtion

texts:
I have a rugs category in my store and each rug is a configurable product with a base price, and has associated simple products that either add or subtract from the base price depending on the size.

Given that smaller sizes subtract from the base price (so they have a "negative" price) the price attribute in layered navigation only has one option 0.00 and above, which makes it pointless to have and useless for the customer.

I'm sure others have faced a similar situation -- what is the best way of dealing with this?

How can I have the price attribute in layered nav. use the simple products pricing instead of the config products? Maybe there is an extension that can help?


texts: MIME type not valid when uploading image using REST API

texts:
I'm trying to set a product image using the web api by POSTing to this url:

http://my_magento_server/rest/V1/products/my-url-key/media

With the following content:

{"entry":
  {
    "media_type": "image",
    "label": "Image",
    "position": 1,
    "disabled": false,
    "types": [
      "image",
      "small_image",
      "thumbnail"
    ],
    "file": "/m/b/mb01-blue-0.jpg",
    "content": {
      "base64EncodedData": "iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWtJREFUeNpi/P//P8NgBkwMgxyMOnDUgTDAyMhIDNYF4vNA/B+IDwCxHLoakgEoFxODiQRXQUYi4e3k2gfDjMRajsP3zED8F8pmA+JvUDEYeArEMugOpFcanA/Ef6A0CPwC4uNoag5SnAjJjGI2tKhkg4rLAfFGIH4IxEuBWIjSKKYkDfZCHddLiwChVhokK8YGohwEZYy3aBmEKmDEhOCgreomo+VmZHxsMEQxIc2MAx3FO/DI3RxMmQTZkI9ALDCaSUYdOOrAIeRAPzQ+PxCHUM2FFDb5paGNBPRa5C20bUhxc4sSB4JaLnvxVHWHsbVu6OnACjyOg+HqgXKgGRD/JMKBoD6LDb0dyAPE94hwHAw/hGYcujlwEQmOg+EV9HJgLBmOg+FMWjsQVKR8psCBoDSrQqoDSSmoG6Hpj1wA6ju30LI9+BBX4UsC+Ai0T4BWVd1EIL5PgeO+APECmoXgaGtm1IE0AgABBgAJAICuV8dAUAAAAABJRU5ErkJggg==",
      "type": "image/jpeg",
      "name": "new image"
    }
  }
}

But I get 400 response:

The image MIME type is not valid or not supported

Any idea how I can upload a file as product image in Magento 2?


texts:
I found extension with mass delete product attributes:
https://www.mexbs.com/magento-blog/mass-delete-attributes-free-magento-extension/
We have issue because I have more than 600 attributes set:

Does any have solution how to mass  delete attributes sets?


texts:
in my magento 1.9.2.1 I insert the patch 8788 but i if I check my web site with MageReport.com the patch seems not fixed.

when i insert the patch the response is
"Patch was applied/reverted successfully."

The patch is applied or not?