texts: Add tabs with attribute content on product page 2.2.x

texts:
I've read many add tabs post here, but can't seem to get any to work the way I need to work.

Attribute is 'sizechart' and is text field added to the default attribute set (but could be dropdown or multiselect)
In admin product add text to "sizechart" attribute eg "levi-size" ("levi-size' is name of CMS/Block already created in the backend).
The product page would then display the new tab with the CMS/Block

Since the size charts for different manufacturers aren't the same, I can't make a static tab, but need one which will use the custom test field or even better, a dropdown where the storefront labels contain the CMS/Block widget code such as below

{{widget type="Magento\Cms\Block\Widget\Block" template="widget/static_block/default.phtml" block_id="3"}}

I had this working very well in 1.9, but since 2.2, I can't seem to find a way to make this work.

The code I've seen here for Magento 2 and 2.1 doesn't seem to work for 2.2 and I'm not sure what the solution is. I expect this to go to bounty in a few days ...

Ideally, creating a drop down where the admin label is "oneill" and the storefront field is

{{widget type="Magento\Cms\Block\Widget\Block" template="widget/static_block/default.phtml" block_id="3"}}

witch would correspond to the oneill warranty information would be much better.

And the same for size charts as well.

EDIT: For 2.3.2, the tabs were before the product details. To change that, I added SORT to the catalog_product_view.xml

This is what I added

<referenceBlock name="product.info.details">
            <referenceBlock name="product.info.description">
                <arguments>
                    <argument name="sort_order" xsi:type="string">10</argument>
                </arguments>
            </referenceBlock>
            <referenceBlock name="product.attributes">
                <arguments>
                    <argument name="sort_order" xsi:type="string">20</argument>
                </arguments>
            </referenceBlock>
        </referenceBlock>

Then, below my added tab I added

<argument name="sort_order" xsi:type="string">50</argument>

So the whole file looks like

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
    <referenceBlock name="product.info.details">
                <referenceBlock name="product.info.description">
                    <arguments>
                        <argument name="sort_order" xsi:type="string">10</argument>
                    </arguments>
                </referenceBlock>
                <referenceBlock name="product.attributes">
                    <arguments>
                        <argument name="sort_order" xsi:type="string">20</argument>
                    </arguments>
                </referenceBlock>
            </referenceBlock>
        <referenceBlock name="product.info.details">
            <block class="Magento\Catalog\Block\Product\View" name="custom.tab" template="HBC_size::product/view/details/custom_tab.phtml" group="detailed_info">
                <arguments>
                    <argument translate="true" name="title" xsi:type="string">Size Chart</argument>
                    <argument name="sort_order" xsi:type="string">50</argument>
                </arguments>
            </block>
        </referenceBlock>
    </body>
</page>


texts: up to date guide to remove telephone required field from checkout

texts:
Please could some one post a guide on the removal of 'required' telephone field in checkout  based on the magento layout Version 1.8.0.0, the majority of current googled resources are out of date and no longer work.
This would seem the perfect place to keep an updated how-to / guide.

It would be helpful if some one could confirm the working solution by downloading Magento 1.8.0.0 and providing proof of it's removal, these code snippets are sometimes helpful, but we have yet to find a working solution in an easy to read / documented fashion.


texts: http error 500 after trying to restore Magento 1.9 from backup

texts:
I have a magento 1.9 website that I took a backup of the database and all files and uploaded them to a new server. However now when I go to the website it gives me a 500 error.

I reset all the file/folder permissions and also the directory ownership is the same as it is on the origional production website
Var/Log is writing no log files. So where else can I look to find the error?


texts: Generating token with using payment form data

texts:
I have a module that needs to inject a token from 2Checkout payment gateway into the form, and use that token to authorize and place order.

I've my custom checkout module, in which 2checkout is enabled with form to enter card info. During checkout, the card authorization is failed because token is created for card validation.

2Checkout is using 2co.js JavaScript library to generate tokens.

I've added a js file to get payment info and generate token from it. Code is like this which works fine with default Magento checkout .

    document.observe("dom:loaded", function() {
        if( typeof( document.getElementById('payment_form_twocheckout') ) !== 'undefined' ) {
            TCO.loadPubKey(TcoEnv);

            IWD.OPC.savePayment = IWD.OPC.savePayment.wrap(
        function(callOriginal) {
  // remaining code to get payment arguments and generate token

I've added js files in customcheckout handle.

<customcheckout_index_index>
        <reference name="head">
            <block type="core/template" name="twocheckout.script" template="twocheckout/script.phtml"/>
            <action method="addJs"><file>twocheckout/2co.js</file></action>
            <action method="addJs"><file>twocheckout/paymentCustomForm.js</file></action>
        </reference>
</customcheckout_index_index>

When I'm navigating to customcheckout page now, I'm getting error in console

  Uncaught ReferenceError: IWD is not defined

due to the line of code IWD.OPC.savePayment = IWD.OPC.savePayment.wrap(

What I should use instead of IWD.OPC.savePayment = IWD.OPC.savePayment.wrap( to wrap it.
As, proxiblue  suggested here, I think my Js file is being loaded before core payment object was defined.


texts: Magento 2 | How can I get the invoice pdf programatically?

texts:
I'm currently creating a module which should send the invoice pdf via eMail to a customer.

How can I get the invoice pdf programatically?

Thanks for any help!


texts: Place order with the Authorize.net payment method Magento 2

texts:
My query is totally silly.
My question is that, i want to place an order using Authorize.net payment method if the customer put the wrong credit card details or Customer don't have sufficient limit for their purchase.

Once order placed, then admin and customer will manage that particular order by out of system(Magento).

Please give me any suggestions or else.

Your help would be appreciated.!!!
Thanks,


texts: CMS Static Blocks - Custom border? (custom css for curved border)

texts:
I am creating a website and I am using the CMS to create static blocks then call them in a widget however I am feeling very limited in the CSS options it gives you under "edit CSS" is there a way that I can input my own css to allow for curved borders?

I can cheat and just curve my images but I am trying to make it easier for the client. So anyway to use CSS, and if so how?


texts:
I am using the Magento 1.7.0.2 and am told by Authorize.net that Magento does not include the original authorization transaction ID in the capture calls. The captures are going through but I am left with pre-auth calls that eventually drop off, rather than capturing funds on the original pre-auth transaction.

Is there any way to have Magento do a capture and send in the original transaction ID? The data is there in Magento since you can see the parent transaction ID but where do I go to add this into the capture call so Auth.net can be happy?

Thanks in advance.


texts: How to set Extension Attributes on a configurable product in a chronological order?

texts:
So, I have tried to save options on setExtensionAttributes. In a specific order, but it always comes out in the backend in a another order. Lets say I save them as Table, Brand, Size. But in the backend they always show as Brand, Table and Size.
$option has [Table, Brand, Size]

 foreach ($o["configurable_attributes"] as $option) {
                $code = "filter_" . $this->parseFilterName($option);
                $confOption = $this->getConfOptionAttribute($code);
                $options[] = $confOption;

            }

        $extAttr = $this->prodExtFactory->create();
        $extAttr
            ->setConfigurableProductLinks($childProducts)
            ->setConfigurableProductOptions($options)
            ->setWebsiteIds([1]);

$product->setExtensionAttributes($extAttr);

$product = $this->prodRepo->save($product);`

So does anyone have an idea, how to change the order of options?
Because I can see it did not pick them in a alphabetical order or the order from the array.


texts: Is there any module to sell a page access?

texts:
Is there any module that allows the admin to sell a page access?

In some e-shops, we refer to this feature as content access selling or pay per reading.


texts: How to debug Uncaught TypeError: Argument must be class A, class B given

texts:
First off, very importantly: This error ONLY happens in production mode. In developer mode it seems to be fine. So those of you who will tell me to clear var/generation: That would break production mode!

Also, this is a 3rd party module that we didn't develop ourselves. I guess I will be contacting the developers of that.

That being said, I want to know how I could debug and solve this myself if I had no other choice. Here is what it looks like in the browser (yes, unlike most Magento exception printing it's all on one line, the browser will linewrap it to avoid horizontal scrolling)

Fatal error: Uncaught TypeError: Argument 1 passed to MGS\Brand\Helper\Data::__construct() must be an instance of Magento\Framework\App\Helper\Context, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /mypath/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php on line 93 and defined in /mypath/app/code/MGS/Brand/Helper/Data.php:38 Stack trace: #0 /mypath/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(93): MGS\Brand\Helper\Data->__construct(Object(Magento\Framework\ObjectManager\ObjectManager)) #1 /mypath/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Mgs\\Brand\\Helpe...', Array) #2 /mypath/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Compiled->create('Mgs\\Brand\\Helpe...') #3 /mypath/lib/internal/Magento/Framework/View/TemplateEngine/Php.ph in /mypath/app/code/MGS/Brand/Helper/Data.php on line 38

So let me format that for your viewing pleasure:

Fatal error: Uncaught TypeError: Argument 1 passed to MGS\Brand\Helper\Data::__construct() must be an instance of Magento\Framework\App\Helper\Context, instance of Magento\Framework\ObjectManager\ObjectManager given,
called in /mypath/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php on line 93 and defined in /mypath/app/code/MGS/Brand/Helper/Data.php:38
Stack trace:
#0 /mypath/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(93): MGS\Brand\Helper\Data->__construct(Object(Magento\Framework\ObjectManager\ObjectManager))
#1 /mypath/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Mgs\\Brand\\Helpe...', Array)
#2 /mypath/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Compiled->create('Mgs\\Brand\\Helpe...')
#3 /mypath/lib/internal/Magento/Framework/View/TemplateEngine/Php.ph
in /mypath/app/code/MGS/Brand/Helper/Data.php on line 38

Notice that the stack trace is cut off at the end of line #3, so I don't know where this could really be called from!

How can I debug this? Is there any way to get the full backtrace?

And how can this only happen in production mode but be totally fine in developer mode?

I'm running Magento 2.1.0 on php-fpm 7.0.12 in an ubuntu-based docker container on an Ubuntu 16.04 server.


texts: Overriding local modules from community pool

texts:
I have an extension in the local pool. I would need to override the Block in the module. Can I do it from the community pool.

(yes, I know this is not how it should be done, but I'm making a small fix to an existing system)


texts: How should I define and use a custom module Exception?

texts:
I want to create a custom Magento exception class for my module.

Are there any rules for how I should do it? Where should I put the new class? How should it be thrown?

I'm familiar with Mage::throwException(), should it be done like that?


texts:
I have added a custom no route handler using the following code

<?xml version="0.1"?>
<config>
    <type name="Magento\Framework\App\Router\NoRouteHandlerList">
        <arguments>
            <argument name="handlerClassesList" xsi:type="array">
                <item name="hello" xsi:type="array">
                    <item name="class" xsi:type="string">Smartie\HelloRouter\App\Router\NoRouteHandler</item>
                    <item name="sortOrder" xsi:type="string">10</item>
                </item>
            </argument>
        </arguments>
    </type>
</config>

Which is all good it addes the handler and i proved it by

<?php

namespace Smartie\HelloRouter\App\Router;

class NoRouteHandler implements \Magento\Framework\App\Router\NoRouteHandlerInterface
{
    public function process(\Magento\Framework\App\RequestInterface $request)
    {
        die('woop');
    }
}

What i have noticed though is that if i return false in the process function i end up with Front controller reached 100 router match iterations. After looking at the NoRouteHandlerList it seems that by adding my new no route handler it actually replaces all of the no route handlers already added (the default one) and i wondered why?

The following similar code for adding a new router has the effect of appending a new router to the list

<type name="Magento\Framework\App\RouterList">
    <arguments>
        <argument name="routerList" xsi:type="array">
            <item name="custom" xsi:type="array">
                <item name="class" xsi:type="string">Smartie\HelloRouter\Controller\Router</item>
                <item name="disable" xsi:type="boolean">false</item>
                <item name="sortOrder" xsi:type="string">20</item>
            </item>
        </argument>
    </arguments>
</type>

Note: This is magento 2 version 0.74.0-beta16


texts: Magento on live site forwarding to localhost!

texts:
i have a problem with the re-setup magento.
i download back-up site on Cpanel. and export DB.
i want setup to localhost.
But it just redirects to the live site. How it works on localhost.
I've edited the content in /app/etc/local.xml and romove var/cache
Thanks all!


texts: Ideal EC2 Instance type for magento 2.2.3

texts:
I am running the magento 2.2.3 version on AWS EC2 currently on c5x.large the performance seems fine for me with proper page speed backed by cloudfront and Redis.

Due to cost optimization I have decided to use m4.large instance and saw the degradation in performance magento page speed from 2.5 second to 6.6 second. I noticed the cpu usage with m4 large type instance it was going up during cache creation and was neutral at other time. I also noticed the cache flush operation from magento admin panel which took approx 3.5 min where as in case of C5 xlarge it was taking 50 seconds to complete same operation.

Is something wrong with my application or it's the cache operation that has direct connection with my cpu? What will be the right Instance series to be choosen for magento 2.2.3 on production?

Also this was not the case with magento 2.1.6, the cache flush operations are very normal even with t2.medium instances we used t2.medium for dev instances earlier.

Specifications: M4 large : 2 vcpu 8 GB RAM C5 Xlarge : 4 vcpu 8 GB RAM


texts: After upgrading to 1.9.3.1 via Magento Connect, check for updates stopped working

texts:
After upgrading from 1.9.2.4 to 1.9.3.1 using Magento Connect, starting it o Mage All package (yes, it worked), my "check for updates" ha just stopped working.

When trying to check for updates, nothing is shown, just an empty column.

Bitnami Container @ Ubuntu 14.04 LTS @ Azure


texts: Arguments type to send Magento SOAP V1 customer.create request from C#

texts:
I'm creating an Magento iterface using C# and Magento SOAP V1 with call method but I don't find the way to send args to the function from c#. The function on PHP is the following:

$result = $client->customerCustomerCreate($session, array('email' => 'customer-mail@example.org', 'firstname' => 'Dough', 'lastname' => 'Deeks', 'password' => 'password', 'website_id' => 1, 'store_id' => 1, 'group_id' => 1));

Error:

  There was an error generating the XML document.
            The type System.Collections.Generic.Dictionary is not supported because it implements IDictionary.

I already tested the function customer.info sending simple value as argument as following and is working fine.

var custinfo = client.call(mlogin, "customer.info", "1");

Any Idea???


texts: Overriding core model class (I did look at other answers ;) )

texts:
I want to override the core class Mage_Sales_Model_Quote_Address_Total_Subtotal

So following different tutorials I did this :

Lebernard is my namespace, Vente, my module

#Lebernard/Vente/etc/config.xml
<?xml version="1.0" encoding="UTF-8" ?>

<config>
<modules>
    <lebernard_vente>
        <version>0.1</version>
    </lebernard_vente>
</modules>
<global>
    <models>
        <sales>
            <rewrite>
                <quote_address_total_subtotal>Lebernard_Vente_Model_Quote_Address_Total_Subtotal</quote_address_total_subtotal>
            </rewrite>
        </sales>
    </models>
</global>
</config>

Then I created the model which is suppose to override it by copying the core class. I want to change the fetch method.

#local/Lebernard/Vente/Model/Quote/Address/Total/Subtotal.php
class Lebernard_Vente_Model_Quote_Address_Total_Subtotal extends Mage_Sales_Model_Quote_Address_Total_Subtotal
{
   ...
}

And then I enabled the module

#etc/modules/Lebernard_Vente.xml
<?xml version="1.0" encoding="UTF-8" ?>
<config>
<modules>
    <Lebernard_Vente>
        <active>true</active>
        <codepool>local</codepool>
    </Lebernard_Vente>
</modules>
</config>

No luck, the module is detected but the new class doesn't show up. Thank you!


texts: Error installing Magento 2 with sample data (max_execution_time is 18000)

texts:
The installation reaches 90% before the error below. If I click retry, it comes back with the same error after 2mins 41secs.

Other info:

I am using the Magento-CE-2.0.2+sample_data-2016-01-28-02-39-03.zip file uploaded to my server and then extracted and run via
mydomain.com/setup.

My host said sql max_allowed_packet is set to 256M (edit: I have confirmed this via SHOW VARIABLES LIKE 'max_allowed_packet';)

There is nothing in the php error log

PHP version 5.5.32

user.ini file has the following settings:
memory_limit=256M &  max_execution_time=18000

I've also tried deleting the whole installation and database and starting from scratch


texts: I have designed a download button in frontend where seller can download invoice but i want to restrict him to download the file only once.How can I that?


texts: I have updated Magefan blog extension to latest version

texts:
After update when I go to the home page it shows me this error on the bottom of the page. Rest of content on the page is ok.
https://turner-sports.co.uk/
Error filtering template: Invalid block type: Magefan\Blog\Block\Post\PostList\Recent


texts: How to use a preference for only one website when there is multisite functionality magento 2?

texts:
I have created a preference to override the functionality of customer save. But the I need to use the core customer save functionality for 1 website and  my preference functionality for another website.
 So how can I implement this?

Please help.

Thanks in advance.


texts: Can't delete block from Magento 2 homepage

texts:
I'm working on Magento 2 website that somebody developed before me. The website has Ultimo Theme.
I'm trying to remove a block with a slider on the top of the home page. In the Ultime guide that block is referenced as "preface" static block (it's located below the navbar and right above the page content).

The actual block has CSS class "slideshow-wrapper-additional", but in the Admin Page in Content -> Blocks there is no block with such name.

So, should I remove using the Admin Panel or the direct connection via ftp/ssh?

I have Magento 2.2.9 and Ultimo Theme 2.


texts: Magento 2 : "The file was not uploaded." error on mageplaza blog module

texts:
Steps to reproduce

Create a blog post without image
Save
or...

Create a blog post including image
Save
Open up for editing
Save it again

Expected result

Blog post should save the updates
Actual result
Magento throws an exception "The file was not uploaded."
So basically the module always expects a new image to be attached to a post even if there already has been uploaded an image to it.

Exception:

  Exception #0 (Exception): The file was not uploaded.
  #1 Magento\MediaStorage\Model\File\Uploader->__construct('image', &Magento\MediaStorage\Helper\File\Storage\Database#0000000060cfa2ea000000004348112d#, &Magento\MediaStorage\Helper\File\Storage#0000000060cfa511000000004348112d#, &Magento\MediaStorage\Model\File\Validator\NotProtectedExtension#0000000060cfa510000000004348112d#) called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:111]


texts: How to do Product wise shipping method Selection in magento2?

texts: Hello I have 3 products in my cart , now i want to select product wise shipping method means in my cart there is 2 product is only for store pickup and 1 product is available for home delivery i want to make Shipping method select on product level , there is extension or any solution available?


texts: When i complete credit card payment as a guest , it is not redirecting to checkout success page. It says "invalid order". It made mix up for my clients. How can i fix it ? I don't have the same problem when i login account as a member.


texts:
I have an issue on a website where if I enter in an email address in the newsletter sign-up field, it fails to submit and says 'There was a problem with the subscription: Please enter a valid date of birth.'

It's using the default Magento newsletter functionality so I'm confused as to why this could be happening. It's on Magento ver. 1.9.2.4.

Any feedback will be greatly appreciated!


texts:
As part of a custom module I input data taken from a user form to a custom table in the database. This is the code that I use to save the data:

Mage::getModel('module/module')->setData(
            array('name'=>$post['name'],
            'email'=>$post['email'],
            'contact_number'=>$post['telephone'],
            'message'=>$post['comment'] )
        )->save();

Does this need validation on the input variables to avoid potential sql injection or is this done automatically via the setData() and/or save() function.

If it does need some kind of validation what should it get?

In the contacts_index_post section I see this:

if (!Zend_Validate::is(trim($post['name']) , 'NotEmpty')) {
                $error = true;
            }

if (!Zend_Validate::is(trim($post['comment']) , 'NotEmpty')) {
                $error = true;
            }

    if (!Zend_Validate::is(trim($post['email']), 'EmailAddress')) {
                $error = true;
            }

Which I assume would work for all of the input variables except telephone variable. If I'm correct about those three validation checks all I need is some advice on validating the telephone field.


texts: Magento 2 add custome attribute to soap api in order list

texts: I have created one custom fee attribute for order i need to add this attribute to soap api can any one tell me


texts:
I have the following error that keeps showing in the system log;
CRIT (2): Not valid template file:

frontend/base/default/template/catalog/product/view/tabs.phtml

There is no tabs.phtml file in the routing shown.

Am I missing something?

Thanks


texts: Magento block cache doesn't work in redis

texts:
I'm using magento 1.14.02 EE on the two server instances with load balancer.

The FPC works fine in redis, but when I put block cache in redis it doesn't work.

If I'm using file system on each instance for block cache its working fine. What can cause this problem?


texts: max price for grouped product in magento 2

texts:
I have a use case where I want to use grouped product

On the category/catalog page it shows the price as "starting from" and it shows the lowest price simple product. I actually want it to show the sum of the all of the attached products.

I have a default qty of 1 in each item

Firstly I would have expected M2 to show a price including both when the default qty equals 1, but apparently it doesn't - ill submit that as a improvement request and see if others agree.

So doing some searching on a solution I found this on SE which shows that tier pricing can manage the price for grouped product - I tried this, it has no impact on the price at all.

I then found this on SE which shows a change to the code for Magento1.

Has anyone got a solution for this? or can that Magento1 solution be adapted to Magento2?


texts: Magento 2 Speed Optimization: default component/events taking too long to load like routers_match taking around 6sec

texts:
I have setup a magento store:

Server Details:
AWS EC2 instance: c4.2xlarge(Region: us-west-1c)
AWS RDS instance: db.t2.xlarge(Region: us-west-1c)

Store Details:
Magento Version: 2.3.1
Theme Installed: AutoStore - Auto Parts and Equipments (from https://themeforest.net)
Total number of products in my site: 360,000 products

I am working on the speed optimization of its pages and getting 40sec TTFB, so to improve that I have enabled Magento 2 default profiler.

I got to know that there is unusual time taken by events/components of default Magento like:

On product detail page: load_entities is taking around 8sec http://prntscr.com/rj0949
And, on enabling Magento 2 default function for current product stock qty taking around 14 sec.

On product cart page: session_start is taking around 6sec http://prntscr.com/rj0mhv

Finding solution to improve time of those default component time as much as possible. Is there any way for this.

Thanks.


texts: Order status change on sales_order_place_after event not working

texts:
I'm trying to change status of order as hold by calling an observer on sales_order_place_after event. When I log the order object, it shows that order status has been set to 'hold' but when I check order status after thank you message. It is again set to 'new'.

Which event should I use to change order status on placing an order.


texts: Memory error while saving product and customer has something in cart

texts:
I'm currently facing a problem with my Magento 1.6 configured for multi-sites.

If a logged customer has something in his shopping cart, and, in the same time, I save a product in the admin, the customer will get blank page after 30 seconds and in my apache log, I get an "Allowed memory size" error.

If I make the same thing but the shopping cart of my customer is empty, there is no problem.

I can't find any error logged in exception.log or system.log, not even in apache log.

The only way to unlock the customer is to delete manually his session file on the server in root/var/session/.

I've already tried to push back my memory_limit parameter to 1024M, but still fails.

What can I do here ? I'm kinda lost for 1 day.


texts: How I Know What Classes Use Magento 2.3 with Bootstrap 3.7?

texts: I learn in a website blog, the magento 2.3 use bootstrap 3.7, but I don't know what classes use this bootstrap edition, Any have a guide for this?


texts: In magento 2 How to call phtml file in static block

texts:
I have created extension in Magento 2 and i want to call index.phtml file from static block (from admin panel).
Module structure

  Ashore>Faq>Block>Faq>Index.phtml

  Ashore>Faq>View>frontend>Templates>faq>index.phtml

how can i call?


texts: How to do customer login via mobile no and password REST API

texts:
I have an issue while using end point of magento-2. I need to do the authentication using mobile no and password rather than email. I am explaining my code below.

$adminUrl1='http://example.com/index.php/rest/V1/integration/customer/token';
$ch1 = curl_init();
$data1 = array("username" => '9438835610', "password" => 'Abcdeg123@');

$data_string1 = json_encode($data1);
$ch1 = curl_init($adminUrl1);
curl_setopt($ch1, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch1, CURLOPT_POSTFIELDS, $data_string1);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch1, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data_string1))
);
$token1 = curl_exec($ch1);
$result = json_decode($token1, 1);
echo json_encode($result);

Here I need to login customer using Mobile no and password. Please help me to resolve this issue.


texts: What is the license on Magento CE User Guide

texts: Is the Magento Community Edition user Guide open source? I mean can I have a copy professionally printed (yes, all ~800 pages). If someone already publishes a print version, that would be great too.


texts: Tax value is not displayed in the cart issue on Magento 2.3.4

texts:
I found this similar post, but I might have a different problem.
In the below images, you can see my settings:

The interesting part is that my tax looks to have the value of zero. See:

After that ajax is loaded, the tax dissappears!  . My tax rule is set to 21% from Stores -> Tax rules
I don't know what other settings should I check ? Would you please suggest me something to check ?  Thank you


texts: search result page not working magento 2

texts:
Hi when I search for my Magento 2 site if product didn't exist its working fine and showing this message

  Your search returned no results.

but when the product exists in the system its showing page like this

can anyone please tell me what the issue with this I have already checked exception and log files nothing is there


texts: Magento 2 - Extending Magento UI /lib/variables/typgraphy.less

texts:
I'm looking at /lib/web/css/source/lib/variables/_typography.less

I was able to add a new @font-family__oswald to my own _theme.less.

Now, I'm trying to edit the h1 tags to make it all uppercase but I can't seem to get it to work. I've placed it in my _theme.less and I also tried creating a _variables_extend.less and import it into my _extend.less file like the Magento documentation.

This is what I've added:

@heading__text-transform__base: uppercase;
@h1__text-transform: @heading__text-transform__base;

I've also deleted the var folder and pub/static/frontend folder. Cleared cache as well.

What am I doing wrong?


texts:
I am trying to change my navigation so that users have to click on it for it to appear. I believe the Magento default is that they just hover, at least that's what's happening on mine. In addition, when they click on the parent nav (level0) they will NOT be diverted to that page, but rather stay on the page they are on and just view the sub-categories.

I thought the coding was linked to /menu.js but using my debugger in FireFox it doesn't even look like this js is connected. I'm really struggling to find out what's causing it to hover to get it changed. There's a lot of .js files linked and none of them seem to be changing it.

I know this is probably too vague, but does anyone have any idea where I can start trying to solve this? I've been trying to fix it for days and it seems like it should be such a simple change.

UPDATE: Here is my CSS for nav-primary:

.nav-primary a {
color:#9a9a9a;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
text-transform: uppercase;
}

.nav-primary a:hover {
color:#000;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
text-transform: uppercase;
}

#header-account li a,
.nav-primary a.level0 {
width: 200px;
text-align: left;
color: #636363;
text-transform: uppercase;
line-height: 20px;
padding-top: 0;
padding-right: 15px;
padding-bottom: 0;
margin-left: 300px;
}

#header-account li:last-child a,
.nav-primary li.level0:last-child a.level0 {
border-bottom: 0;
}

.no-touch #header-account a:hover,
.no-touch .nav-primary a:hover {
text-decoration: none;
}

.nav-primary {
display: block;
padding-top: 30px;
}

.nav-primary a {
text-decoration: none;
position: relative;
display: block;
color: #636363;
line-height: 30px;
font-family: "Raleway", "Helvetica Neue", Verdana, Arial, sans-serif;
}

.nav-primary li {
position: relative;
}

.nav-primary li.level1 a {
margin-left: 350px;
}

.nav-primary .menu-active > ul.level0,
.nav-primary li.level0 li.sub-menu-active > ul {
 display: block;
 }

.nav-primary li.level0 > a {
text-transform: uppercase;
}

/* ============================================ *
* Small Viewports - Accordion Style Menu
* ============================================ */
.nav-primary a.level0,
.nav-primary a {
 line-height: 25px;
 }
 .nav-primary li.level0 ul {
 display: none;
 }
.nav-primary li.level0 li {
 padding: 0 0 0 25px;
 }
 .nav-primary li.level1 a {
 padding: 0 15px 0 25px;
 }
.nav-primary li.parent > a:after {
 content: '';
 position: absolute;
 width: 0;
 height: 0;
 display: block;
 border-top: 5px solid transparent;
 border-bottom: 5px solid transparent;
 border-left: 5px solid #cccccc;
 border-right: none;
 top: 50%;
 left: 10px;
 right: auto;
 margin-top: -5px;
 }
 .nav-primary li.parent.sub-menu-active > a:after,
 .nav-primary li.parent.menu-active > a:after {
 content: '';
 position: absolute;
 width: 0;
 height: 0;
 display: block;
 border-right: 5px solid transparent;
 border-left: 5px solid transparent;
 border-top: 5px solid #cccccc;
 border-bottom: none;
 top: 50%;
 left: 10px;
 right: auto;
 margin-top: -5px;
 }
.nav-primary li.menu-active > a,
.nav-primary li.sub-menu-active > a {
 color: #000;
 }
/* ============================================ *
 * Large Viewports - Dropdown Menu
 * ============================================ */

 .nav-primary li.menu-active > ul {
 display: block;
 }

This is the one that makes them either appear on hover or just be there:

.nav-primary li.level0 ul { display: none; }

but i'm not sure what to change it to to go from hover to click?


texts: Delete custom options from products in specific store

texts:
Within one installation of magento (1.7.0.2) I have 1 website with 2 stores. In store #1 there are 1000 simple products with custom options. In store #2, using Magento Store Manager, I created copies of each 1000 products and was able to changed them to configurable items.

However, now I need to delete the custom options for the items in store #2 since they no longer need custom options as I'll be making associated simple items (to replace the function of custom options). While the store manager makes some tasks very easy to do via the GUI, it doesn't appear to have a simple way of deleting custom options from a group of products.

So, I'm looking for a way to do it via mySQL (phpmyadmin) and any help would be greatful. I searched all over google but all I've found are programmatic ways of adding, which isn't what I need. Thanks in advance!


texts: Uncheck billing and shipping address during checkout in onestep checkout?

texts:
I am using magetop one-step checkout. When i login to store and click on place order button the billing and shipping address checkbox automatically checked .if guest customer or new customer with first time purchase will not see this issue
Any solution or direction for it?


texts: How to get cart in sales_order_create in magento

texts:
I have a custom module admin page from there I want to add product in cart and redirect to admin/sales_order_create/ page to place order for selected product.

For this I have created a controller action as below :

$customer_id = $this->getRequest()->getParam('customer_id');
$productId = $this->getRequest()->getParam('product_id');

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

$form_key = Mage::getSingleton("core/session")->getFormKey();
$params = array('form_key' => $form_key,'qty'   =>1,);

$cart = Mage::getModel('checkout/cart');
$cart->init();
$cart->addProduct($_product,$params);
$cart->save();
/* here I want to set quote in session so that it visible on redirected page */
$this->_redirect('*/sales_order_create', array('customer_id' => $customer_id,'quote_id'=>$cart->getQuote()->getId()));

This controller action redirect to admin/sales_order_create page with customer selected but I want to also set quote in session so that it's product would be seleced on new order page.

How do I do that?


texts: Magento 2 add custom field in customer billing and shipping form

texts:
I want to add custom dropdown field in customer address form of shipping and billing and also customer can add address in checkout so I need to add that custom field in checkout shipping /billing form as well.

How could i able to do this? Please suggest.


texts: How to override an extension admin template

texts:
There is an extension which I want to add a little more features on. To achieve that I need to modify two .phtml files in

  app/design/adminhtml/default/default/template/Orderpreparation/Packing/Index.phtml
  app/design/adminhtml/default/default/template/Orderpreparation/Packing/Products.phtml

I found that Index.phtml is mentioned in

  app/design/adminhtml/default/default/layout/orderpreparation.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <adminhtml_orderpreparation_packing_index>
        <reference name="head">
            ...
        </reference>
        <reference name="content">
            ...
            <block type="Orderpreparation/Packing_Index" name="onepagepreparation" as="onepagepreparation" template="Orderpreparation/Packing/Index.phtml">
            </block>
        </reference>
    </adminhtml_orderpreparation_packing_index>
</layout>

On the packing page in the admin, selecting an option in a dropdown list with trigger Products.phtml to be loaded via AJAX and I can't find anywhere of triggering the Products.phtml.

If I want to override Index.phtml should I just create an xml file in layout folder as below:

  app/design/adminhtml/default/default/layout/my_own_xml_to_override_index.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <adminhtml_orderpreparation_packing_index>
        <reference name="content">
            <block type="Orderpreparation/Packing_Index" name="onepagepreparation" as="onepagepreparation" template="MyOwnFiles/Packing/Index.phtml">
            </block>
        </reference>
    </adminhtml_orderpreparation_packing_index>
</layout>

Do I have  do anything else to make sure Index.phtml will be override by my own phtml?

No idea how to I setup to override the Products.phtml?

Do I need to create a new extension in this case?

I created my own extension and below is the config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Company_ErpFlyerReminder>
            <version>1.0.0</version>
        </Company_ErpFlyerReminder>
    </modules>
    <adminhtml>
        <layout>
            <updates>
                <flyerreminder>
                    <file>packingflyerreminder.xml</file>
                </flyerreminder>
            </updates>
        </layout>
    </adminhtml>
    <frontend>
        <layout>
            <updates>
                <flyerreminder>
                    <file>flyerreminder.xml</file>
                </flyerreminder>
            </updates>
        </layout>
    </frontend>
    <global>
        <blocks>
            <flyerreminder>
                <class>Company_ErpFlyerReminder_Block</class>
            </flyerreminder>
            <adminhtml>
                <rewrite>
                    <packing_index>Company_ErpFlyerReminder_Block_Packing_Index</packing_index>
                </rewrite>
            </adminhtml>
        </blocks>
    </global>
</config>

  app/etc/modules/Company_ErpFlyerReminder.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Company_ErpFlyerReminder>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <MDN_Orderpreparation/>
            </depends>
        </Company_ErpFlyerReminder>
    </modules>
</config>

  app/code/local/Company/ErpFlyerReminder/Block/Packing/Index.php

<?php
class Rycomau_ErpFlyerReminder_Block_Packing_Index extends MDN_OrderPreparation_Block_Packing_Index
{
}


texts:
I need to change my DOCTYPE to HTML5 from <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

This is a requirement of Google in order to be approved as a Google Trusted Store.

Can anyone advise how I do this and if there are any downsides to it?


texts: How to Reload Ui Component Grid Table with Js In Magento 2

texts:
I create grid in product edit page new window.
Now I want to update grid after success ajax call


texts: Magento 2: Cloud commerce version upgrade issue

texts:
I am upgrading Magento version 2.2.7 to 2.2.9
I used following commands on local setup

$ composer require "magento/magento-cloud-metapackage":"2.2.9" --no-update

$ composer update

But I am getting following error

Problem 1
    - The requested package magento/magento-cloud-metapackage (locked at 2.2.7, required as 2.2.9) is satisfiable by magento/magento-cloud-metapackage[2.2.7] but these conflict with your requirements or minimum-stability.

Problem 2
    - Can only install one of: magento/product-enterprise-edition[2.2.9, 2.2.7].
    - Can only install one of: magento/product-enterprise-edition[2.2.9, 2.2.7].
    - Can only install one of: magento/product-enterprise-edition[2.2.7, 2.2.9].
    - magento/magento-cloud-metapackage 2.2.9 requires magento/product-enterprise-edition 2.2.9 -> satisfiable by magento/product-enterprise-edition[2.2.9].

    - Installation request for magento/magento-cloud-metapackage 2.2.9 -> satisfiable by magento/magento-cloud-metapackage[2.2.9].

    - Installation request for magento/product-enterprise-edition (locked at 2.2.7) -> satisfiable by magento/product-enterprise-edition[2.2.7].

please provide solution to this problem.

Thanks in advance


texts: Some Orders after payment not found in database

texts: I would ask, in which cases could an order not be saved in database after payment, or could be deleted. In my case when i look in the database, i cant find some order_id's. For example i find Order_id : 288 and 290 and can't find the order_id 289, although it's autoincremeted. I can't find an explanation for that


texts: Hunting down a redirect / rewrite issue. How many rewrites should there be for a product?

texts:
For SEO value I understand that Magento will redirect system ID urls to pretty urls. I'm trying to find out if there is something wrong with my db. There are several system urls that have 5 different entries. The main entry is the system url to the pretty url but there will be several others that don't seem to make sense.

How many urls should be generated for one system generated url?

System example: mywebsite.com/catalog/category/view/id/712

Pretty Url: mywebsite.com/category-parent/category-sub.html

I've got 700 products with nearly 5000 url rewrites. I thought that was a bit excessive.


texts:
Unable to reindex Product Eav Indexer.. I am getting that error message

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-82-1-7.0000' for key 'PRIMARY', query was: INSERT INTO `catalog_product_index_eav_decimal_idx` SELECT `cpe`.`entity_id`, `pdd`.`attribute_id`, `cs`.`store_id`, IF(pds.value_id > 0, pds.value, pdd.value) AS `value` FROM `catalog_product_entity_decimal` AS `pdd`
CROSS JOIN `store` AS `cs`  LEFT JOIN `catalog_product_entity_decimal` AS `pds` ON pds.entity_id = pdd.entity_id AND pds.attribute_id = pdd.attribute_id AND pds.store_id=cs.store_id
LEFT JOIN `catalog_product_entity` AS `cpe` ON cpe.entity_id = pdd.entity_id
INNER JOIN `catalog_product_entity_int` AS `tad_status` ON tad_status.entity_id = pdd.entity_id AND tad_status.attribute_id = 97 AND tad_status.store_id = 0
LEFT JOIN `catalog_product_entity_int` AS `tas_status` ON tas_status.entity_id = pdd.entity_id AND tas_status.attribute_id = 97 AND tas_status.store_id = cs.store_id WHERE (pdd.store_id=0) AND (cs.store_id!=0) AND (pdd.attribute_id IN('82')) AND (IF(pds.value_id > 0, pds.value, pdd.value) IS NOT NULL) AND (IF(IFNULL(tas_status.value_id, -1) > 0, tas_status.value, tad_status.value)=1)

Also when I Upload csv product file. Its was uploaded successfully. Its is displayed on admin. But when i go frontend, there is  message We can't find products matching the selection. I have done magento upgrade, deploy ,caching, re-indexing.


texts: Prices of products (only some products) not updating on front end

texts: I have changed prices of products in my store, checked it on the website and some of them have been changed but some not.


texts: How to run a specific cron job in Magento2

texts: How can I run a specific cron job code in Magento2 instead of running it by group.


texts: How to make the state/region optional in Magento 2.0.7?

texts:
In a Magento 2.0.7 with very little customization when we disable a country in State is Required for in Stores -> Configuration -> General -> State Options the state field in the checkout process shows up as non required field for this country. However, when we try to proceed without selecting a state this is not possible and we get the error message

  Please select an option.

below this field. If we select a state we can proceed.

This kind of feels like a bug, maybe it's just a rogue javascript validator? How can we make the state field in the checkout truly optional? And do we face a individual problem or a common bug here?

Also worth mentioning, the Allow to Choose State if It is Optional for Country option has no noticeable effect for us.


texts: How to add Discount for a Product base on Quantity

texts:
I was tried to add Product rules but didn't worked.
This is what I tried to do.

Ex: I have 4 products named A,B,C,D. I want to give 50% discount for B product if someone buy more than 2 qty of B product.

How can I achieve this ?


texts: How to handle large number of associated products in bundle products?

texts:
I am facing problem in handling large number of associated products to a bundle product. I have around 50k associated products and page takes around a minute to load which is very slow and affects conversion rate and also adding product to cart also takes around 2 mins and same for cart page load.
Is there any workaround or approach to deal with issue ?
PS: Open to do any sort of customization needed which can work.
Thanks in Advance !


texts: Magento 2 : How be able to export csv from admin as nonadministrator?

texts:
If you  logged in as nonadministrator and try to export any CSV from grid level it will show access denied
this issue is not there in 2.1.0 onwards but exists in 2.0.8 and below

How to fix it?


texts:
I've created a simple module, purely for the block.

I want to add it to the newsletter.phtml file that controls the customers newsletter subscriptions as I need to create custom functionality through my block.

How do I go about adding my custom block to this file or any file?

I'm new to this whole module development, any help would be appreciated.


texts: Magento 2 - How to add onclick on checkbox in admin grid?

texts:
I want to add 'onclick' attribute on checkboxes, added through below code.

$this->addColumn(
    'customer_entity_id',
    [
        'header' => __(''),
        'index' => 'entity_id',
        'filter' => false,
        'sortable' => false,
        'type' => 'checkbox',
        'field_name' => 'customer_entity_id[]',
        'values'=>$this->_getCustomerIds()
    ]
);

I have tried adding 'onclick' and 'action' but this are also not working.


texts: Magento flat rate shipping for Specific State or Postcode

texts: In backend configuration we can only select country for Ship to Specific Countries , I want to do that for state. So that flat rate will be enable for newyork state only.


texts: -malways versus -mdefault on for EE 1.13

texts:
What is the correct cron setting for Magento 1.13 to ensure Cache does NOT invalidate itself.

* * * * * /usr/bin/php html/cron.php -mdefault

or

 * * * * * /usr/bin/php html/cron.php -malways

I am assuming the malways tag should be run for EE?


texts: How to Call Phtml file in Before Add cart button in Product View Page

texts:
I want to call phtml in product view page.

my XML code is

<reference name="product.info.addtocart">
        <block type="catalog/product_view" name="booking" before="addtocart"  template="booking/screenseat.phtml"/>
   </reference>

but My phtml call after add to cart button

so how Can i do?


texts: Payment options limited to specific countries

texts:
If the customer selects billing & shipping for Canada there is no payment option. If they put USA then they see PayPal, etc.

It doesn't seem to be IP specific as I was able to select USA address and got payment options. Just Canada does not work... Any ideas?

Am using 3D secure with CE1.7.0.1 and PayPal Payments pro.


texts: Magento 2: `magento app:config:import` doesn't import system configuration

texts:
I'd like to import system config through the app:config:import command.

I have update app/etc/config.php file with described customer/captch/enable config path:

<?php return array (
  'system' =>
  array (
    'default' =>
    array (
      'customer' =>
      array (
        'captcha' =>
        array (
          'enable' => '0',
        ),
      ),
    ),
  ),

  'modules' =>
  array (
    'Magento_Store' => 1,
    'Magento_Directory' => 1,
    'Magento_Eav' => 1,
    'Magento_Backend' => 1,
    [...]

I'm expecting after magento app:config:import the path customer/captch/enable with value 0 should be added to core_config_data table.

But it's not adding/updating expected record.
What's the point of magento app:config:import in this case?

Is there a way to import this config except using magento config:set?

It's working in the same way for env.php as well, unfortunately.

Magento version: 2.2.5


texts: How to setting switch ldap server 1 and ldap server 2 in ruby on rails?

texts:
I have 2 ldap servers and I want to create 1 convertible setting file using 1 of 2 servers.
For example, I set to choose server ldap 1 or choose server ldap 2 to use for my authentication user.
Can someone help me on this problem?


texts: Customer attribute with Image upload throwing error

texts:
I've created one customer attribute with input type, Check below code for reference.

public function install(
    ModuleDataSetupInterface $setup,
    ModuleContextInterface $context
) {
    $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
    $setup->startSetup();
    $attributesInfo = [
        'upload_documents' => [
            'label' => 'Upload Document',
            'type' => 'varchar',
            'input' => 'image',
            'position' => 1000,
            'visible' => true,
            'required' => false,
            'system' => 0,
            'user_defined' => true,
            "source" => 'Magento\Eav\Model\Entity\Attribute\Source\Table',
            'position' => 1000,
            'is_used_in_grid' => true,
            'is_visible_in_grid' => true,
            'is_html_allowed_on_front' => true,
            'visible_on_front' => true
        ]
    ];
    $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
    $attributeSetId = $customerEntity->getDefaultAttributeSetId();
    /** @var $attributeSet AttributeSet */
    $attributeSet = $this->attributeSetFactory->create();
    $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);
    foreach ($attributesInfo as $attributeCode => $attributeParams) {
        $customerSetup->addAttribute(Customer::ENTITY, $attributeCode, $attributeParams);
    }
    $magentoUsernameAttribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'upload_documents');
    $magentoUsernameAttribute->addData([
        'attribute_set_id' => $attributeSetId,
        'attribute_group_id' => $attributeGroupId,
        'used_in_forms' => ['adminhtml_customer','customer_account_edit','adminhtml_checkout','adminhtml_customer_address','customer_address_edit','customer_register_address'],
    ]);
    $magentoUsernameAttribute->save();

        $setup->endSetup();

This is working fine, I can upload image from registration form. Its working with all image type but when I upload PDF it also working it display's PDF at backend.

Issue happens when I try to save customer which has PDF document its shows me error.

"Upload Document" is not a valid image format

Also after I can't upload PDF files from backend too.

Does anyone has what is I'm missing here ?? Any help would be appreciated.


texts: How to set default value in config.xml file for tables in Magento2 backend system configuration

texts:
To create a table configuration in Magento2 backend, we can use some good tutorial in here:
http://www.ibnab.com/en/blog/magento-2/magento-2-backend-guide-to-create-table-setting-in-the-system-configuration
or
https://magently.com/blog/magento-2-backend-configuration-frontend-model-part-33/

I read this tutorial in Magento 1 https://www.integer-net.com/how-to-create-tables-in-magento-system-configuration/.

They created a table configuration with default value. I knew that in Magento 1, we can set default array value for table in config.xml like that:

<default>
    <namespace_module>
        <settings>
            <shipping_costs>a:1:{s:18:"_1425462208957_957";a:2:{s:10:"from_price";s:1:"0";s:4:"cost";s:4:"4.90";}}</shipping_costs>
        </setting>
    </namespace_module>
</default>

I try to put the same array above from Magento 1 to config.xml file on Magento 2, but it does not work at all.

Here is my example:

system.xml:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
    <tab id="media" translate="label" sortOrder="300">
        MEDIA
    </tab>

        Settings
        <tab>media</tab>
        <group id="setting" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
            <field id="interest_rates" translate="label comment" sortOrder="13" showInDefault="1" showInWebsite="0" showInStore="0">
                Interest Rates
                <frontend_model>Company\Module\Block\Adminhtml\System\Config\Fieldset\InterestRates</frontend_model>
                <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
            </field>
        </group>

<system>

File InterestRates

protected function _prepareToRender()
{
    $this->addColumn('duration', ['label' => __('Duration'), 'style' => 'width:60px']);
    $this->addColumn('effective_interest_rate', ['label' => __('Effective Interest Rate'), 'style' => 'width:170px']);
    $this->addColumn('special_effective_interest_rate', ['label' => __('Special Effective Interest Rate'), 'style' => 'width:170px']);
    $this->_addAfter = false;
    $this->_addButtonLabel = __('Add Interest Rate');
}

Picture demo

I want to set default value for text column Duration, Effective_Interest_Rate and Special Effective Interest Rate

Can someone give me an advice? How can I set default value for table configuration in Magento .


texts: How to get catalog in stock on frontend?

texts:
I have done everything everyone subscribes everywhere
From reindex, in stock, manage all, quantity, databases check, double check

But products just don't appear on front end because it says out of stock when I go to the product url:
https://takoda.online/backup/en/catalog/product/view/id/24

While everything seem to be in stock from admin to database.

This happened since I have transferred from a different server, have import my backup.

This issue stay existing.
Already have add Views in database.

Thanks for the golden tip!
Alain


texts: How to add custom text block in onpage check-out

texts:
I want to add custom text block in onepage checkout in #payment page. That block  will use to remind the "discount code" to customer, it's like popup text.

Please check the sample image.


texts: Programatically set selected option of select

texts:
I have a form which defines this field
    $subMenuType = $fieldset->addField(
        'mega_sub_content_type',
        'select',
        [
            'label' => __('Submenu Content'),
            'title' => __('Submenu Content Type'),
            'name' => 'mega_sub_content_type',
            'required' => true,
            'options' => $model->getSubMenuContentOptions(),
            'disabled' => $isElementDisabled
        ]
    );

And here are the options(but I don't have any setter for that ^^ )
public function getSubMenuContentOptions()
{
    return [
        self::SUB_CONTENT_TYPE_CHILD_ITEMS => __('Child menu items'),
        self::SUB_CONTENT_TYPE_STATIC_BLOCK => __('Static Blocks'),
        self::SUB_CONTENT_TYPE_CUSTOM_CONTENT => __('Custom Content')
    ];
}

When I try to set this field it keep failing (well the menu item is saved but the field keep having his default  Child menu items value.
$data['mega_sub_content_type'] = __('Static Blocks');

This is how the menu item is saved
use Ubertheme\UbMegaMenu\Model\ItemFactory;
$model = $this->menuItemFactory->create()
    ->setData($data)
    ->save();


texts:
I'm trying to load a jQuery plugin, tinyCarousel, for use on the page. The jQuery library is included as follows in the layout.xml file:

<layout>
    ...
    <default>
        <reference name="head">
            <action method="addJs" ifconfig="jquery/general/jqueryEnabled">
                <script>jquery-1.10.1.min.js</script>
            </action>
        </reference>
    </default>
    ...
</layout>

I've checked in the browser and the library is definitely present. Next, tinyCarousel.js is loaded from another layout.xml file:

<layout>
    ...
    <default>
        <reference name="head">
            <action method="addJs">
                <script>jquery.tinyCarousel.min.js</script>
            </action>
        </reference>
    </default>
    ...
</layout>

Again, that script is present on the page and in the correct order (after the jQuery library). On the page, I am trying to call tinyCarousel as follows:

<script type="text/javascript">
//<![CDATA[
    if (jQuery === 'undefined') {
        jQuery.noConflict();
    }

    var container = <?php echo "'#" . $containerClass . "'"; ?>;
    jQuery(document).ready(function(){
        jQuery(container).tinycarousel({ interval: true, duration: 300, display: 1 });
    });
//]]>
</script>

The error returned is:

Uncaught TypeError: Object [object Object] has no method 'tinycarousel'

Thanks for taking a look.


texts: How to get the custom option in magento2

texts:
I have created custom field in custom option by using

custom option, custom fields

I want to get my custom option from $block->getOption();

But my custom field not added in the list ..

Thanks.


texts: oauth/token/request not getting parameter from thirdparty application

texts:
I tried to authorize Magento web api using OAuth. Its successfully completed in local machine. I have used OAuth extenstion.

I implemented magento2 and code-igniter on different hosts. So I want to call magento 2 rest api from codeigniter. In my localhost I implemented magento2 integration authorization successfully. And I got access token also. Below the post data in oauth/token/request

  [2018-04-28 05:20:43] main.DEBUG: oauth request url {"data":"http://localhost/WC/M2_CI/store/index.php/oauth/token/request","is_exception":false} []

  [2018-04-28 05:20:43] main.DEBUG: oauth request {"outh request":{"oauth_consumer_key":"pfnoibfya93hh9i0vwe4m5ciknl2vxjv","oauth_signature_method":"HMAC-SHA1","oauth_nonce":"1901491915ae404ab194899.22211097","oauth_timestamp":"1524892843","oauth_version":"1.0","oauth_signature":"nHwNX8WGHdNuMSkY7/3B0G7dl2o="},"is_exception":false} []

Then I same procedure followed in server host. I got the error that says

  Invalid auth/bad request (got a 400, expected HTTP/1.1 20X or a redirect)

So That's why I debug the post data then got the following result

  [2018-04-28 07:27:31] main.DEBUG: oauth rquest url {"data":[],"is_exception":false} []

  [2018-04-28 07:27:31] main.DEBUG: oauth rquest {"data":[],"is_exception":false} []

Here on the getRequestToken() function call the post data not getting on the magento side. How can i solve this issue?. Thanks in advance Please share your valuable information.


texts: Magento 1 - how can i put review for CMS pages and articles

texts:
I want to put review and rating widget for products, I want to put review plugin for pages and article ,

How can I do this?

thanks


texts: How to set the left menu on the product page?

texts:
I have a link left.phtml in catalog.hml. But I want to show it on the product page too.

    Category layered navigation layout
-->

    <catalog_category_layered translate="label">
        <label>Catalog Category (Anchor)</label>
        <reference name="left_first">
            <block type="catalog/navigation" name="catalog.leftnav.browse" after="currency" template="catalog/navigation/left.phtml">
                <block type="core/text_list" name="catalog.leftnav.state.renderers" as="state_renderers" />
            </block>
            <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml">
                <block type="core/text_list" name="catalog.leftnav.state.renderers" as="state_renderers" />
                <action method="unsetChild"><alias>category_filter</alias></action>
            </block>
        </reference>


texts: Magento get store Name in a file which is in root directory

texts:
I have a file assume abc.php in multisite set up.

If I hit this using url :domain1.com/abc.php, I should get store name of domain1 and if I hit it using domain2.com/abc.php, I should get store name of domain2. I am using the below code:

$storeId = Mage::app()->getStore()->getName();

domain1.com being by default frontstore, when I hit domain2.com/abc.php I get store name of domain1 always. How do I get store specific information in a while placed in root folder?


texts: Magento 2 Ui Component resizeDefaultWidth not working

texts:
I'm building out an admin ui with the built in components, and i have an actionsColumn that i'm using. The label of the said actionsColumn is long, and i want the layout to not wrap the words, so i'm using the config that i see all over the core core (i.e. - vendor/magento/module-search/view/adminhtml/ui_component/search_synonyms_grid.xml) to do this:

<actionsColumn name="actions" class="Vendor\Namespace\Ui\Component\Grid\Amazon\Account\Menu\Delete">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="resizeEnabled" xsi:type="boolean">true</item>
            <item name="resizeDefaultWidth" xsi:type="string">107</item>
            <item name="indexField" xsi:type="string">account_id</item>
            <item name="sortOrder" xsi:type="number">50</item>
            <item name="label" xsi:type="string" translate="true">Delete Action</item>
        </item>
    </argument>
</actionsColumn>

But no matter what value i place in the resizeDefaultWidth node i get the same size in the final layout (i have 107 in there now, as i see this all over core code but any value in there give the same result).

One thing i have noticed, it that on page load, before the content is loaded, the label area is bigger then after the page content is loaded. I know a lot of voodoo is going on there, which is why i think resizeEnabled need to be false.

Also the sortOrder seems to not be working either. Which might be a default of actionsColumn as they are suppose to be at the end of the grid (i'm making the assumption that if i had 3 action column, that the sort order with sort those three).

An ideas out there? Is this a bug in M2? or is there a config that i'm missing here?


texts:
I am using magento C.E. 1.9.2 built in color swatch functionality.

I have enabled color and size swatches from back-end and I have added one configure product.

When I go to detail page it shows drop-down option instead of swatches.

Can any one help me how to solve this.

Here are the links: category Page: http://www.flatcomfort.com/bedding/sets/venice-sets.html

Product details page of Configurable product: http://www.flatcomfort.com/bedding/sets/venice-sets/percale-venice-set.html


texts: Move CMS page title outside of normal layout

texts:
I have a CMS page with the 1-column layout. I'd like to move the page title outside the main container of the page. The current setup is as follows:

Page Title

Some content here..

I would like the page title element to sit outside the main container. Can this be done through an XML update?


texts: Getting all products in a category except a subcategory

texts:
I have a structure like this:

My Root Category

Food

Fixed
Bread
Milk
...

This code lists out all the products in Food.

$category_id = 11;
$catagory_model = Mage::getModel('catalog/category')->load($category_id);
$collection = Mage::getResourceModel('catalog/product_collection');
$collection->addCategoryFilter($catagory_model);

foreach($collection as $_product){
...
}

I want to list out all the products except the ones in Fixed. Is it possible? Thanks.


texts: Magento 2: How to call custom phtml file in another phtml file?

texts:
I'm trying to output custom phtml content of Lapisbard_General::customer_account.phtml in Magento_directory::currency.phtml

If I'm using below code, it works fine.

echo $this->getLayout()->createBlock("Magento\Framework\View\Element\Template")->setTemplate("Lapisbard_General::customer_account.phtml")->toHtml();

But when I'm trying to use my custom block as below, it throws error

echo $this->getLayout()->createBlock("Lapisbard\General\Block\CustomerAccount")->setTemplate("Lapisbard_General::customer_account.phtml")->toHtml();

  Fatal error: Call to a member function dispatch() on null in
  /var/www/html/lapis/vendor/magento/framework/View/Element/AbstractBlock.php
  on line 637

Block code:

namespace Lapisbard\General\Block;
use Magento\Customer\Model\Session;

class CustomerAccount extends \Magento\Framework\View\Element\Template {
    public function __construct(
        Session $customerSession
    )
    {
        $this->_customerSession = $customerSession;
    }
    public function isCustomerLoggedIn() {
        return $this->_customerSession->isLoggedIn();
    }
}

How can I make it work ?


texts:
I'm trying install different modules on my magento2 (v.0.74).
But all of them generates the same error:
exception 'Magento\Framework\Exception\LocalizedException'
with message 'Source class "\Magento\Framework\Module\Updater\Setup"
for "Magento\Framework\Module\Updater\SetupFactory" generation does not exist.'
in /var/www/m2.dev/www/m074/lib/internal/Magento/Framework/Code/Generator.php:179

I'm trying to find this class \Magento\Framework\Module\Updater\Setup, but it doesn't exist.
Modules which I tried to install:

https://github.com/Marko-M/Magento2-Inchoo_SocialConnect
https://www.atwix.com/magento/adding-attribute-programatically-magento2/

I'm just trying to add any attribute anywhere. What are minimal steps for this?


texts: How to add custom option field added to every created product in Magento 2 added to products under specific category?

texts:
i am trying to add custom option programmitically to products created under specific category in Magento 2 ,
But it isn't easy at all doing this, i tried to search for a solution on the internet but all i found was to add custom options programmitically  with no clear instruction on how to make this code work,
also i need to get this custom option value to calculate the price in observer
Thanks in advance


texts:
edited/updated   I need to open this popup when visit home page only..

I tried javascript but doesn't work here..

if ( window.location.pathname == '/' ){
 $( window ).load(function() {
     openFeedbackWindow('feedback_information')

    });
}

I tried more .. like

window.location.href

and php code also in footer.phtml where I load this block..

if(basename($_SERVER['PHP_SELF']=='mywebsiteurl'); ){
load block...
}

window.location

I need to open this popup when website load now it's open by click on left sidebar button.

here is my code where this popup is triggered..

I try this..

  $( window ).load(function() {
     openFeedbackWindow('feedback_information')

    });


texts: Random missing product name in random orders

texts:
On rare and random occasions (once or twice a month) our client receives an order with one missing product name in the items list (see attached screenshot) - however the product name exists and is shown correctly on other orders.

It is never the same product
It is never the same client
It is never the same day, month nor day
It is never the same quantity ordered
The product can contain special characters (as almost every item)

However it seems to happen when there are multiple products ordered.

The problem is not that the quote from Magento would lacking the product name, but there is a third party service hooked up which handles the quotes. And an order with one item lacking its product name is breaking their system (stops adding the following items therefor the quote shows 2 items for a value of ex. 17€ instead of 7 items for 68€).

The issue is not reproducible on our side (we tried multiple times).

Did someone encounter this kind of behaviour from Magento?

Do you need more information, so please don't hesitate to add a comment, thank you all in advance!

Magento version: 1.9.2.1

Edit:

Here is a screenshot of the SQL result asked for in the comments

So what could this mean?


texts:
I am brand new to Magento and completely self-teaching.
We have a site for our company using the SM-Shoppystore theme, Magento ver. 1.9.2.4
The problem currently is when viewed on a mobile device, the top banner goes away.
How do I make these show on mobile?


texts: Ignore some field from VarienForm validate

texts:
I have a form, and it is validated by:

var productAddToCartForm = new VarienForm('product_addtocart_form');

So is there any way for removing some field we want from VarienForm validate? Thank for helping me.


texts:
Magento 2 Model file Const get in Helper.
I want to this type :-
File Path :- GetSomeMojo\CategoryLandingPage\Model\Entity\Attribute\Source
<?php

namespace GetSomeMojo\CategoryLandingPage\Model\Entity\Attribute\Source;

use Magento\Framework\Option\ArrayInterface;

class Landingpageproducts extends \Magento\Eav\Model\Entity\Attribute\Source\Boolean implements ArrayInterface
{

    const VALUE_NO = 'lpage_no';
    const VALUE_NEW = 'lpage_new';
    const VALUE_FEATURED = 'lpage_featured';
    const VALUE_SALE = 'lpage_sale';

    protected $_options;

    public function getAllOptions()
    {
        return [
            ['value' => self::VALUE_NO, 'label' => __('No')],
            ['value' => self::VALUE_NEW, 'label' => __('New Products')],
            ['value' => self::VALUE_FEATURED, 'label' => __('Featured Products')],
            ['value' => self::VALUE_SALE, 'label' => __('Sale Products')]
        ];
    }
?>

Helper code :-
<?php

namespace GetSomeMojo\CategoryLandingPage\Helper;

use \Magento\Framework\App\Helper\AbstractHelper;
use Magento\Cms\Api\BlockRepositoryInterface;

class Data extends AbstractHelper
{

    const VALUE_NO = \GetSomeMojo\CategoryLandingPage\Model\Entity\Attribute\Source:: VALUE_NO;
    const VALUE_NEW = \GetSomeMojo\CategoryLandingPage\Model\Entity\Attribute\Source:: VALUE_NEW;
    const VALUE_FEATURED = \GetSomeMojo\CategoryLandingPage\Model\Entity\Attribute\Source:: VALUE_FEATURED;
    const VALUE_SALE =\GetSomeMojo\CategoryLandingPage\Model\Entity\Attribute\Source:: VALUE_SALE;
}
?>

Above const value get in Helper file.
So Please Help me how to get const in helper.
THANKS.


texts:
i am create one test php file in magento root directory.
i install ar_SA Language pack and try to convert one string English to Saudi Arabia here is my test code.

<?php

ini_set('display_errors', 1);
ini_set('max_execution_time', 0);
ini_set("memory_limit", "-1");
set_time_limit(0);
error_reporting(E_ALL);
require './app/bootstrap.php';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

$localeInterface = $objectManager->create('Magento\Framework\TranslateInterface');
$localeInterface->setLocale('ar_SA');
echo $localeInterface->getLocale(); // it's print ar_SA

echo __('Check Value');

I have the corresponding translation in /i18n/ar_SA.csv file, it doesn't print the translated sentence.


texts: Where can I find credentials for `magento-cloud auth:api-token-login`

texts:
As the title suggest. I am using below command for Magento Cloud CLI tool (https://devdocs.magento.com/cloud/reference/cli-ref-topic.html)
magento-cloud auth:api-token-login

It asks for:
Please enter an API token:
>

Where can I find this "API token"?


texts: How to Create session for customer login with session outside magento

texts:
I am building a small web services code to where I need to have Magento customer login.

But I am not able to create the session. If I create the session from core/session it remains same for all users.

Question 1: Where are the sessions stored in the database?

Question 2: How to create a customer session (customer/session) and then fetch that on different locations with the same session ID??


texts: Can't update product category custom attributes using rest api

texts:
I'm trying to update the value of a custom attribute in a product category using the rest api.  I send in this:
import requests

url = "https://www.thisismyurl.com/rest/all/V1/categories/154"

payload = "{\"category\": {\"id\": 154,\"custom_attributes\": [{\"attribute_code\": \"default_sort_by\",\"value\": \"favorite_product\"}]}}"
headers = {
  'Authorization': 'Bearer dontyouwish',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request("PUT", url, headers=headers, data = payload)

print(response.text.encode('utf8'))

I get the error message:
"Error occurred during \"custom_attributes\" processing. Attribute \"default_sort_by\" has invalid value. The \"string\" value's type is invalid. The \"string[]\" type was expected. Verify and try again.
What is the difference between string and string[]?
How can I make this work?


texts: How can i hide flat rate shipping method when free shipping is available in magento 2.1.5?

texts:
I have set free shipping when amount is greater than 300rs, but when amount is greater than rs 300 two methods are still showing.

How can I hide the Flat rate when cart amount is greater than Rs 300.?


texts: Product Attribute value In Magento schema

texts: Where is the product's attribute value is stored in magento 2 DB ?


texts: When is the calculate method of Magento\CatalogRule\Model\Indexer\ProductPriceCalculator executed?

texts:
I have overridden the implementation of Magento\CatalogRule\Model\Indexer\ProductPriceCalculator with my own in order to have catalog price rules applied to the special price instead of the price. It used to work fine but broke when I updated to 2.3.2.

So now I'm trying to debug my implementation to try to see what's going on. I tried using XDebug to set a breakpoint inside the calculate method, but running bin/magento indexer:reindex doesn't trigger it.

So my question is, when is this method used? How can I trigger it reliably?

Thank you!


texts: Call to Member function on null (plugin help)

texts:
I currently have this Plugin, which is just this at the moment:

di.xm

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Quote\Model\Quote\Item">
      <plugin name="weight_override" type="Ibex\Options\Model\Plugin\Weight" sortOrder="1" />
    </type>
</config>

Weight.php

namespace Ibex\Options\Model\Plugin;

use Magento\Quote\Model\Quote;

class Weight
{

    public function beforeSetProduct(\Magento\Quote\Model\Quote\Item $subject, $product)
    {
        // logging to test override
        $logger = \Magento\Framework\App\ObjectManager::getInstance()->get('\Psr\Log\LoggerInterface');
        $logger->debug('Test');
        $weight = $product->getWeight();
        $logger->debug($weight);
        return $product;
    }
}
?>

Nothing fancy yet, and the debugging is working. However, it's causing this error at the moment:

PHP Fatal error:  Uncaught Error: Call to a member function setStoreId() on null in /pro/vendor/magento/module-quote/Model/Quote/Item.php:425
Stack trace:
#0 /pro/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\Quote\Item->setProduct(NULL, 'cat_p', 'catalog_product', 'product', false, Object(Magento\Catalog\Model\Product\Type\Simple),
Object(Magento\Catalog\Model\Product\Link\Proxy), Array, Object(Magento\Catalog\Model\Product\Url), Array,
Object(Magento\Catalog\Model\Product\OptionFactory), NULL, NULL, true, true, Object(Magento\Catalog\Helper\Product), Object(Magento\Framework\Module\Manager),
Object(Magento\Framework\Data\CollectionFactory), Object(Magento\Catalog\Model\Product\Type\Interceptor), Object(Magento\Catalog\Model\Product\Media\Config),
Object(Magento\Catalog\Model\Product\Attribute\Source\Status\Proxy), Object(Magento\Catalog\Model\Product\Visibility),
Object(Magento\CatalogInventory\Api\Data\StockItemInterfaceFactory),
Object(Magento\Catal in /pro/vendor/magento/module-quote/Model/Quote/Item.php on line 425

And for some context, here's the chunk of the core file that's referenced:

  public function setProduct($product)
    {
        if ($this->getQuote()) {
            $product->setStoreId($this->getQuote()->getStoreId());
            $product->setCustomerGroupId($this->getQuote()->getCustomerGroupId());
        }
        $this->setData('product', $product)
            ->setProductId($product->getId())
            ->setProductType($product->getTypeId())
            ->setSku($this->getProduct()->getSku())
            ->setName($product->getName())
            ->setWeight($this->getProduct()->getWeight())
            ->setTaxClassId($product->getTaxClassId())
            ->setBaseCost($product->getCost());

        $stockItem = $product->getExtensionAttributes()->getStockItem();
        $this->setIsQtyDecimal($stockItem ? $stockItem->getIsQtyDecimal() : false);

        $this->_eventManager->dispatch(
            'sales_quote_item_set_product',
            ['product' => $product, 'quote_item' => $this]
        );

        return $this;
    }

What could be causing this error?


texts: How long does it take to upgrade Magento from 2.0.2 to 2.0.3

texts:
I started magento 2 upgrade over a half hour ago.

The on screen console log shows:

[2016-04-26 20:45:03 EDT] Job "maintenance_mode {"enable":true}" has been started
[2016-04-26 20:45:03 EDT] Magento maintenance mode is enabled.
[2016-04-26 20:45:03 EDT] Job "maintenance_mode {"enable":true}" has successfully completed
[2016-04-26 20:45:04 EDT] Job "update {"components":[{"name":"magento/product-community-edition","version":"2.0.3"}]}" has been started
[2016-04-26 20:45:04 EDT] Starting composer update...
[2016-04-26 20:45:04 EDT] ./composer.json has been updated

It seems to be hung.

Is it working? How long does it take?


texts: Reduce the width of search box in magento

texts:
please vist "http://newtrendzonline.com/boards/"

I wanted to remove REGISTER and SIGN IN, which is present above the search box. Also I wnat to reduce the WIDTH of  the SEARCH BOX.

Thanks in Advance.


texts: How can i open mini cart on add of a product

texts:
I am using the below link to create an observer.

Magento 2 Open minicart when item is added

My question is what code will come here

if ($cartUpdated) {
    // open mini cart
}

How can i open the mini cart?


texts: Why does Magento have two open source releases?

texts: Why is there a 2.1.15 and a 2.2.6? What is the differences between the code sets? Will I have to go to 2.2.X eventually? Is 2.2.6 experimental?


texts: Catalog price rules disappear after night with flat options

texts:
I have activated the flat category and flat product option and furthermore i have activated different cataloge price rules.

After the night my special prices are not shown anymore even when i clicked on "apply rules". I need to disable flat options and apply the rules and then activate flat options with reindex.

So how could i fix that? I just want to keep all rules everyday and reindex myself when doing changes for some products.


texts: Adding text to a product detail page according to the answer of a yes/no attribute

texts:
So I have items in my store that require more expensive shipping than others.

I want to be able to answer a yes/no question when I create a product and if it's yes I want the product page to have a message that says "This product requires more expensive shipping"

I'd also like the shipping price in the cart to be bigger.

But with the yes/no button there is now it only displays yes or no on the product page. Also every value I give to my new attributes goes into the "More information" tab on the product page. Where can I change this?


texts:
I migrated my database from Magento 1 to Magento 2 and it was successful. But I noticed that the Magento 1 was using a 3rd party libraries/Module for their transactions. One example is the Magenest/GiftRegistry Now I'm wondering will all the data from this module be included in the migration from M1 to M2? What I'm saying is will it also migrate all the orders, reports and URL that was done using this 3rd party library. Will this record be carried over to Magento 2?

Assuming I installed the same library in my Magento 2 application will I be able to see the reports/orders from these module?


texts: Magento 2 Product Filter By Category & Multiple Product Attributes

texts:
I'm currently building a custom product filter via Ajax. I've got the basics working but now I'm trying to filter via category and a specific product attribute.

Here is my code

$collection = $this->_productCollectionFactory->create();
$collection->addAttributeToSelect('*');

$categoryData = $this->getRequest()->getParam('whoisitfor');

// Get category selected.
if(isset($categoryData)) {
    $categoryData = $this->expandFormValues($categoryData);
    $categories = [$categoryData];//category ids array
    $collection->addCategoriesFilter(['in' => $categories]);
}

This get's the products for the specific categories that are selected on the frontend, this works fine.

Now when I try and filter it by a specific product attribute it still just returns all the products from the category above not the specific products with the attribute filtered on.

Here is the code:

$collection->addAttributeToFilter('user_experience_level', array('eq' => 3003));

Full code looks like this:

$collection = $this->_productCollectionFactory->create();
$collection->addAttributeToSelect('*');

$categoryData = $this->getRequest()->getParam('whoisitfor');

// Get category selected.
if(isset($categoryData)) {
    $categoryData = $this->expandFormValues($categoryData);
    $categories = [$categoryData];//category ids array
    $collection->addCategoriesFilter(['in' => $categories]);
}

$collection->addAttributeToFilter('user_experience_level', array('eq' => 3003));

If anyone can help me with this, it'd be great.

Thanks.


texts: Magento 2 : Wrong Download Items and Download Link in Invoice Email

texts:
I am developing a website which only selling downloadable products. Guest checkout is enabled with this when customer place an order they receive correct information in email. But when they receive invoice email there are incorrect downloadable item name and download link in invoice email.

I have researched a lot but not understanding what is the issue? is it issue with Magento or something else?


texts: Layout with cacheable="false" doesn't work in Magento Cloud with Fastly

texts:
I am trying to make a whole custom controller not cacheable. In my layout XML I added this:
<?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>
        <referenceContainer name="content">
            <block name="welcome.index" class="Vendor\Welcome\Block\Welcome\Index" template="Vendor_Welcome::welcome/index.phtml" cacheable="false" />
        </referenceContainer>
    </body>
</page>

In my local, it works fine and the page is not coachable. However, when I upload it to our staging environment in Magento Cloud with Fastly enabled, it doesn't work and the page is stored in cache showing the info from another customer. Do I need to do something different to make that the cacheable="false" works with Fastly?


texts: I've installed magento2 on my localserver and when I use PHP bin/Magento c:c for cache cleaning its saying bash: PHP: command not found. Thanks in advance


texts: What does "canRestore" attribute mean in system.xml?

texts:
Maybe someone already saw an <field> attribute canRestore="1":

[...]
<field id="provider"
       translate="label"
       type="text"
       sortOrder="100"
       canRestore="1"
       showInDefault="1">
    <label>Provider</label>
</field>
[...]

Any ideas what does it mean?


texts: After upgrade to Magento2.2, error "Base table or view not found"

texts:
How can I fix this ??

  SQLSTATE[42S02]: Base table or view not found: 1146 Table
  'mydatabase.mg_catalogsearch_fulltext_cl' doesn't exist, query was:
  UPDATE catalog_product_entity SET attribute_set_id = ?, type_id
  = ?, sku = ?, has_options = ?, required_options = ?, created_at = ?, updated_at = ? WHERE (entity_id = '3')

Both catalog_product_entity table and catalogsearch_fulltext_cl are there-
But I am not sure why there is prefix mg_ in the error message above.


texts: How do I quickly add custom attributes to a large subset of customers?

texts:
I have a data-install script that I'd like to update each customer with a new custom id. I'm restricting the update to 2 customer groups, so I'm fetching the customers like so:

 $customers = Mage::getModel('customer/customer')->getCollection()
     ->addFieldToFilter('group_id', array('in' => array('5', '11')));

This returns over 6000 customers. I then loop over the customers, add two new attributes and save:

$myIncrementalValue = 0;
foreach($customers as $customer) {
    $myIncrementalValue++;
    $customer->setData('myincrementalvalue', $myIncrementalValue)
            ->setData('special_code', 'OL-' . $customer->getId() . '-' . $myIncrementalValue)
            ->save();
}

This is very taxing on my server and the script always fatals due to wait timeouts. Can anyone tell me a cheaper way of executing mass custom updates on customers.


texts: Disallow characters in search field? Magento 1.8.1.0

texts:
Is it possible to disallow certain characters in the search bar in Magento 1.8.1.0?

We are getting a few searches of what looks like a Mysql attack using characters like "$().// etc


texts: I have google'd around on this and not finding any real leads here, anyone know how or more to the point the best way to make the purchase of one product only able after they have bought another regardless of if it's in the same order or not?


texts: Magento 2: How to load another customer data on checkout instead of current logged in customer via custom module?

texts:
I want to show a customers list as dropdown on checkout page and when I change the customer from that dropdown list, All details like shipping addresses, customer detail should be change according to that selected customer. But the current loggedin customer should not logout and order should be place for selected customer from that dropdown list.

Best solutions are warmly welcome please!


texts: Configuration Ubuntu Server 14.04 LTS 64-bit

texts:
Good afternoon,

I trying to install Magento on a vps server.
I can't find any instructions how configure the webserver.

I need to know what applications i need to install, such as apache, phpmyadmin, mysql etc.
I allso wanna know if "Ubuntu Server 14.04 LTS 64-bit" is compatible with Magento!
If it's not i can choose another installation. My host provider offers different kind of installations

Can anyone help me please?
Thank you!


texts: XML - Cannot move product.info.review after product.info.overview

texts:
I'm trying to do the following, moving product.info.review after product.info.overview (short description)

I've used the following code, but it is not working:

<move element="product.info.review" destination="content" after="product.info.overview"/>

I've checked if I have the right element by removing it:

<referenceBlock name="product.info.review" remove="true"/>

Above code worked...

Edit for Rakesh:

<?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>
        <referenceContainer name="content">
            <block class="Magento\Catalog\Block\Product\View" name="productpage.image" template="xxx_xxx::productpage.phtml" after="product.info.main"/>
        </referenceContainer>
        <move element="product.info" destination="content" after="productpage.image"/>
        <move element="product.info.review" destination="product.info.main" after="product.info.overview"/>
        <referenceBlock name="product.info.stock.sku" remove="true"/>
    </body>
</page>


texts: Uncaught Error: Cannot instantiate interface Magento\\InventoryReservationsApi\\Model\\GetReservationsQuantityInterface

texts:
I just installed the latest magento 2 (Magento-CE-2.3.2) and imported a database from another working magento 2 store with Magento 2.3.1.

But if I try to load a product in the frontend, then I get a 500 error and the message

  [Wed Jul 17 10:34:29.291844 2019] [php7:error] [pid 10517] [client
  192.168.40.161:59517] PHP Fatal error:  Uncaught Error: Cannot instantiate interface
  Magento\InventoryReservationsApi\Model\GetReservationsQuantityInterface
  in
  /srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50\nStack
  trace:\n#0
  /srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/ObjectManager.php(70):
  Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Invento...')\n#1
  /srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160):
  Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Invento...')\n#2
  /srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246):
  Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array,
  'Magento\\Invento...', NULL, 'getReservations...',
  'Magento\\Invento...')\n#3
  /srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34):
  Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArguments
  in
  /srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php
  on line 50, referer:
  http://entwicklung.hausfux.m2/produkte/insektenschutz/fenster/spannrahmen.html

What am I supposed to do? Im new to magento 2.

Update:

I followed the instructions from Muhammad Hasham's answer and also executed bin/magento setup:upgrade, now I get another error.

  [Wed Jul 17 11:29:03.970607 2019] [php7:error] [pid 10608] [client
  192.168.40.161:63754] PHP Fatal error:  Uncaught ReflectionException: Class Magento\Framework\App\ResourceConnection\Proxy does not
  exist in
  /srv/www/vhosts/hausfux_m2/vendor/magento/framework/Code/Reader/ClassReader.php:19\nStack
  trace:\n#0
  /srv/www/vhosts/hausfux_m2/vendor/magento/framework/Code/Reader/ClassReader.php(19):
  ReflectionClass->__construct('Magento\\Framewo...')\n#1
  /srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Definition/Runtime.php(49): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Framewo...')\n#2
  /srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48):
  Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\\Framewo...')\n#3
  /srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/ObjectManager.php(70):
  Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')\n#4
  /srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160):
  Magento\Framework\ObjectManager\ in
  /srv/www/vhosts/hausfux_m2/vendor/magento/framework/Code/Reader/ClassReader.php
  on line 19, referer:
  http://entwicklung.hausfux.m2/produkte/insektenschutz/fenster/spannrahmen.html


texts: Authorize.net payment method configuration not saving

texts:
I am trying to configure authorize.net payment settings in an magento 2 install. When I edit the payment method values, the default values are reset after I save (i.e. I enable Authorize.net, save and it is disabled).

I tested other payment methods such as braintree and paypal and they all worked fine as expected.

See example screenshots.

Before save - with updated settings input:

After save - returned to default or blank.

I have not been able to find anything online describing this behavior. Any thoughts?


texts: Customer Registration Problem with Magento. Registers Successfully, but doesn't login

texts:
I have a big issue with Customer Registration and Login(which may or may not be connected). When I try to register as a customer on my website, it goes through successfully and redirects to accounts page. However, as soon as I click anywhere to edit any information or check any further detailed information about my account, it redirects to login page, and I can't login at all.

I tried to check at the admin panel, if the account was registered (customers>manage customers), and the account is shown on the table of all the customer accounts. However, if I click on any customer to view or change edit the customer details, I face Fatal error as follows :

Fatal error: Call to a member function setDisabled() on a non-object in /var/www/vhosts/tiendasagatha.co.uk/htdocs/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php on line 83

Also, if I try to add a new customer from the add new customer option (Admin Panel : Customers > Manage Customers), I face the fatal error as follows :

Fatal error: Call to a member function addClass() on a non-object in /var/www/vhosts/tiendasagatha.co.uk/htdocs/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php on line 87

I have another magento website, where it works just fine and I copy/pasted the Account.php file from there to the site that I'm facing this problem with, but it didn't help either.

Can anyone suggest a fix to this?


texts: Magento 2 override pricing / apply custom price on api order

texts: When building an order in the Magento 2.3 admin you can apply custom pricing to line items, is there a way to do this when building an order via the standard Magento 2 API's? If not via the standard API's then how would I best implement this with a custom api endpoint?


texts: Add new custom CMS template directive {{cdnmedia}}

texts:
I want to add a new CMS directive to render CDN media URL's just like the media directive:

{{media url="wysiwyg/image.jpg"}}

Will result in http://www.example.com/media/wysiwyg/image.jpg

Now I have some specific images that will be hosted on a separate CDN. I want to be able to render URL's to those images from CMS pages/blocks:

{{cdnmedia url="images/picture.jpg"}}

This should result in http://cdn.example.com/images/picture.jpg where the CDN base URL would be configurable.

I already have a helper that can take "images/picture.jpg" as input and will return a full CDN URL (based on configured secure and unsecure CDN bas URL's).

How can I add this into the CMS rendering?


texts: Quick search by name not return products but advanced search by name returns products

texts:
I have major issue, when i try to type products name in quick search its return no products, same name typed by advanced search its good, also return products.

  Note : visibility - catalog,search; qty - enough qty; proper cached
  and reindex,still not working. am not using third party search
  extension, using still default magento extension.


texts: How to save customer name for guest checkout?

texts:
Customer name is not being saved in onestepcheckout module. Is there a step I missed in saving order?

$shippingInfo = array(
        'city'=> (string)$shippingAddress->City,
        'country_id' => (string)$shippingAddress->CountryCode,
        'email' => (string)$customerInfo->Email,
        'firstname' => (string)$firstname,
        'lastname' => (string)$lastname,
        'postcode' => (string)$shippingAddress->PostalCode,
        'street' => array(   (string)$shippingAddress->AddressLine1, ),
        'telephone' => (string)$shippingAddress->Phone,
        'use_for_shipping' => '1',
        'name'=>'hello there'
    );
    if(!empty($regionId)){
        $shippingInfo['region_id'] = $regionId;
    }
    else{
        $shippingInfo['region'] = $regionCode;
    }

$quote = $this->getOnepage()->getQuote();
$quote->collectTotals()->save();
$quote->getBillingAddress()
    ->addData($shippingInfo);

$quote->getShippingAddress()
    ->addData($shippingInfo);
$quote->setCheckoutMethod('guest')
        ->setCustomerId(null)
        ->setCustomerEmail('test@example.com')
        ->setCustomerIsGuest(true)
        ->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID)->save();
    $this->getOnepage()->saveOrder();
    $this->getOnepage()->getQuote()->save();